Fix duplicate deb config warning (#247)
* d * f * oneline rules * remove duplicat warning * simplify gen rules * also fix release --------- Co-authored-by: Meliox <na>
This commit is contained in:
parent
32ed174c0c
commit
6e3fd7958e
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@ -48,7 +48,6 @@ jobs:
|
|||||||
- name: Generate dynamic debian rules
|
- name: Generate dynamic debian rules
|
||||||
run: |
|
run: |
|
||||||
bash src/gen-rules.sh >> debian/rules
|
bash src/gen-rules.sh >> debian/rules
|
||||||
bash src/gen-rules.sh conffiles >> debian/pve-mod.conffiles
|
|
||||||
|
|
||||||
- name: Build deb package
|
- name: Build deb package
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
1
.github/workflows/test-release.yml
vendored
1
.github/workflows/test-release.yml
vendored
@ -47,7 +47,6 @@ jobs:
|
|||||||
- name: Generate dynamic debian rules
|
- name: Generate dynamic debian rules
|
||||||
run: |
|
run: |
|
||||||
bash src/gen-rules.sh >> debian/rules
|
bash src/gen-rules.sh >> debian/rules
|
||||||
bash src/gen-rules.sh conffiles >> debian/pve-mod.conffiles
|
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: dpkg-buildpackage -us -uc -b
|
run: dpkg-buildpackage -us -uc -b
|
||||||
|
|||||||
1
debian/pve-mod.conffiles
vendored
1
debian/pve-mod.conffiles
vendored
@ -1 +0,0 @@
|
|||||||
/etc/pve-mod/pve-mod.conf
|
|
||||||
15
debian/rules
vendored
15
debian/rules
vendored
@ -10,19 +10,14 @@ override_dh_install:
|
|||||||
# NOT committed to the repository.
|
# NOT committed to the repository.
|
||||||
#
|
#
|
||||||
# Patch helpers (generic, manifest-driven)
|
# Patch helpers (generic, manifest-driven)
|
||||||
install -Dm755 src/Scripts/apply-patches.sh \
|
install -Dm755 src/Scripts/apply-patches.sh debian/pve-mod/usr/lib/pve-mod/apply-patches.sh
|
||||||
debian/pve-mod/usr/lib/pve-mod/apply-patches.sh
|
install -Dm755 src/Scripts/revert-patches.sh debian/pve-mod/usr/lib/pve-mod/revert-patches.sh
|
||||||
install -Dm755 src/Scripts/revert-patches.sh \
|
|
||||||
debian/pve-mod/usr/lib/pve-mod/revert-patches.sh
|
|
||||||
# Configure tool
|
# Configure tool
|
||||||
install -Dm755 src/Scripts/pve-mod-configure \
|
install -Dm755 src/Scripts/pve-mod-configure debian/pve-mod/usr/sbin/pve-mod-configure
|
||||||
debian/pve-mod/usr/sbin/pve-mod-configure
|
|
||||||
# Main config (conffile for user edits)
|
# Main config (conffile for user edits)
|
||||||
install -Dm644 src/pve-mod.conf \
|
install -Dm644 src/pve-mod.conf debian/pve-mod/etc/pve-mod/pve-mod.conf
|
||||||
debian/pve-mod/etc/pve-mod/pve-mod.conf
|
|
||||||
# Main config reference copy for upgrade key-diff (not a conffile)
|
# Main config reference copy for upgrade key-diff (not a conffile)
|
||||||
install -Dm644 src/pve-mod.conf \
|
install -Dm644 src/pve-mod.conf debian/pve-mod/usr/share/pve-mod/pve-mod.conf.default
|
||||||
debian/pve-mod/usr/share/pve-mod/pve-mod.conf.default
|
|
||||||
# ── Dynamic section ────────────────────────────────────────────────────
|
# ── Dynamic section ────────────────────────────────────────────────────
|
||||||
# `bash src/gen-rules.sh >> debian/rules` appends per-module install lines
|
# `bash src/gen-rules.sh >> debian/rules` appends per-module install lines
|
||||||
# here during CI, just before dpkg-buildpackage. Do not commit them.
|
# here during CI, just before dpkg-buildpackage. Do not commit them.
|
||||||
|
|||||||
@ -14,9 +14,8 @@
|
|||||||
# gen-rules.sh Emit dpkg install lines (tab-indented, no header).
|
# gen-rules.sh Emit dpkg install lines (tab-indented, no header).
|
||||||
# Append to debian/rules' override_dh_install recipe:
|
# Append to debian/rules' override_dh_install recipe:
|
||||||
# bash src/gen-rules.sh >> debian/rules
|
# bash src/gen-rules.sh >> debian/rules
|
||||||
# gen-rules.sh conffiles Emit per-module conffile paths (one per line).
|
# Conffiles under etc/ are detected automatically by
|
||||||
# Append to debian/pve-mod.conffiles:
|
# debhelper (compat 13+); no separate conffiles step needed.
|
||||||
# bash src/gen-rules.sh conffiles >> debian/pve-mod.conffiles
|
|
||||||
#
|
#
|
||||||
# For each module it emits, in order:
|
# For each module it emits, in order:
|
||||||
# 1. files/files.list -> install each mapped file at its destination.
|
# 1. files/files.list -> install each mapped file at its destination.
|
||||||
@ -41,8 +40,6 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|||||||
SRC_DIR="$REPO_ROOT/src"
|
SRC_DIR="$REPO_ROOT/src"
|
||||||
PKG_DIR="debian/pve-mod"
|
PKG_DIR="debian/pve-mod"
|
||||||
|
|
||||||
MODE="${1:-install}"
|
|
||||||
|
|
||||||
# Print the list of module directory names (basenames), sorted, that contain a
|
# Print the list of module directory names (basenames), sorted, that contain a
|
||||||
# files/ or patches/ subdirectory.
|
# files/ or patches/ subdirectory.
|
||||||
list_modules() {
|
list_modules() {
|
||||||
@ -110,31 +107,6 @@ emit_install_rules() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
emit_conffiles() {
|
for mod in $(list_modules); do
|
||||||
local mod="$1"
|
|
||||||
if [[ -f "$SRC_DIR/$mod/$mod.conf" ]]; then
|
|
||||||
echo "/etc/pve-mod/conf.d/$mod.conf"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
local mod
|
|
||||||
case "$MODE" in
|
|
||||||
install)
|
|
||||||
for mod in $(list_modules); do
|
|
||||||
emit_install_rules "$mod"
|
emit_install_rules "$mod"
|
||||||
done
|
done
|
||||||
;;
|
|
||||||
conffiles)
|
|
||||||
for mod in $(list_modules); do
|
|
||||||
emit_conffiles "$mod"
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 [install|conffiles]" >&2
|
|
||||||
exit 2
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
main
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user