diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2fed9b..bf8447d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,7 +48,6 @@ jobs: - name: Generate dynamic debian rules run: | bash src/gen-rules.sh >> debian/rules - bash src/gen-rules.sh conffiles >> debian/pve-mod.conffiles - name: Build deb package run: | diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index 67e9a8d..060ff3d 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -47,7 +47,6 @@ jobs: - name: Generate dynamic debian rules run: | bash src/gen-rules.sh >> debian/rules - bash src/gen-rules.sh conffiles >> debian/pve-mod.conffiles - name: Build package run: dpkg-buildpackage -us -uc -b diff --git a/debian/pve-mod.conffiles b/debian/pve-mod.conffiles index 0c4d9d3..e69de29 100644 --- a/debian/pve-mod.conffiles +++ b/debian/pve-mod.conffiles @@ -1 +0,0 @@ -/etc/pve-mod/pve-mod.conf diff --git a/debian/rules b/debian/rules index 366b1a2..4061449 100644 --- a/debian/rules +++ b/debian/rules @@ -10,19 +10,14 @@ override_dh_install: # NOT committed to the repository. # # Patch helpers (generic, manifest-driven) - install -Dm755 src/Scripts/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/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 # Configure tool - install -Dm755 src/Scripts/pve-mod-configure \ - debian/pve-mod/usr/sbin/pve-mod-configure + install -Dm755 src/Scripts/pve-mod-configure debian/pve-mod/usr/sbin/pve-mod-configure # Main config (conffile for user edits) - install -Dm644 src/pve-mod.conf \ - debian/pve-mod/etc/pve-mod/pve-mod.conf + install -Dm644 src/pve-mod.conf debian/pve-mod/etc/pve-mod/pve-mod.conf # Main config reference copy for upgrade key-diff (not a conffile) - install -Dm644 src/pve-mod.conf \ - debian/pve-mod/usr/share/pve-mod/pve-mod.conf.default + install -Dm644 src/pve-mod.conf debian/pve-mod/usr/share/pve-mod/pve-mod.conf.default # ── Dynamic section ──────────────────────────────────────────────────── # `bash src/gen-rules.sh >> debian/rules` appends per-module install lines # here during CI, just before dpkg-buildpackage. Do not commit them. diff --git a/src/gen-rules.sh b/src/gen-rules.sh index 4631f43..cef6578 100644 --- a/src/gen-rules.sh +++ b/src/gen-rules.sh @@ -11,12 +11,11 @@ # pve-mod.conf and the install path usr/lib/pve-mod/patches//). # # Usage: -# gen-rules.sh Emit dpkg install lines (tab-indented, no header). -# Append to debian/rules' override_dh_install recipe: -# bash src/gen-rules.sh >> debian/rules -# gen-rules.sh conffiles Emit per-module conffile paths (one per line). -# Append to debian/pve-mod.conffiles: -# bash src/gen-rules.sh conffiles >> debian/pve-mod.conffiles +# gen-rules.sh Emit dpkg install lines (tab-indented, no header). +# Append to debian/rules' override_dh_install recipe: +# bash src/gen-rules.sh >> debian/rules +# Conffiles under etc/ are detected automatically by +# debhelper (compat 13+); no separate conffiles step needed. # # For each module it emits, in order: # 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" PKG_DIR="debian/pve-mod" -MODE="${1:-install}" - # Print the list of module directory names (basenames), sorted, that contain a # files/ or patches/ subdirectory. list_modules() { @@ -110,31 +107,6 @@ emit_install_rules() { fi } -emit_conffiles() { - 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" - done - ;; - conffiles) - for mod in $(list_modules); do - emit_conffiles "$mod" - done - ;; - *) - echo "Usage: $0 [install|conffiles]" >&2 - exit 2 - ;; - esac -} - -main +for mod in $(list_modules); do + emit_install_rules "$mod" +done