@@ -21,6 +21,10 @@ ok() { printf '%s✓%s %s\n' "$c_grn" "$c_rst" "$*"; }
2121warn () { printf ' %s!%s %s\n' " $c_ylw " " $c_rst " " $* " ; }
2222die () { printf ' %s✗ ERROR:%s %s\n' " $c_red " " $c_rst " " $* " >&2 ; exit 1; }
2323
24+ # policy knobs
25+ SUITE=" ${SUITE:- unstable} "
26+ STDVER=" ${STDVER:- 4.6.2} "
27+
2428# ---------- parse args ----------
2529ARCH=" " ; VERSION=" "
2630while [[ $# -gt 0 ]]; do
@@ -116,7 +120,7 @@ Section: utils
116120Priority: optional
117121Maintainer: $MAINT
118122Build-Depends: debhelper-compat (= 13)
119- Standards-Version: 4.7.0
123+ Standards-Version: ${STDVER}
120124Homepage: $HOMEPAGE
121125Rules-Requires-Root: no
122126
141145# changelog
142146DATE_RFC2822=" $( LC_ALL=C date -R) "
143147cat > debian/changelog << EOF
144- safexec (${VERSION} ) unstable ; urgency=medium
148+ safexec (${VERSION} ) ${SUITE} ; urgency=medium
145149
146150 * Binary-only release for Debian/Ubuntu (glibc shim only).
147151 - Installs safexec to /usr/bin/safexec (static musl).
@@ -175,9 +179,8 @@ override_dh_auto_install:
175179> install -m 0644 -D "$(SHIM_GLIBC)" "debian/safexec/usr/lib/$(TRIPLET_GLIBC)/npp/libnpp_norm.so"; \
176180> install -d -m 0755 debian/safexec/usr/lib/npp
177181
178- override_dh_fixperms:
179- > dh_fixperms
180- > # SUID handled via dpkg-statoverride in postinst
182+ override_dh_missing:
183+ > dh_missing --fail-missing
181184MAKE
182185sed -i " s|#SAFEEXEC_BIN#|$SAFEEXEC_BIN |g" debian/rules
183186sed -i " s|#SHIM_GLIBC#|$SHIM_GLIBC |g" debian/rules
@@ -225,12 +228,12 @@ EOF
225228sed -i " s|#TRIPLET_GLIBC#|$CPU_TRIPLET_GLIBC |g" debian/safexec.postinst
226229chmod +x debian/safexec.postinst
227230
228- # prerm : tidy statoverride
229- cat > debian/safexec.prerm << 'EOF '
231+ # postrm : tidy statoverride on remove
232+ cat > debian/safexec.postrm << 'EOF '
230233#!/bin/sh
231234set -e
232235case "$1" in
233- remove|deconfigure )
236+ remove)
234237 if dpkg-statoverride --list /usr/bin/safexec >/dev/null 2>&1; then
235238 dpkg-statoverride --remove /usr/bin/safexec || true
236239 fi
239242#DEBHELPER#
240243exit 0
241244EOF
242- chmod +x debian/safexec.prerm
245+ chmod +x debian/safexec.postrm
243246
244247# manpage + list
245248mkdir -p debian/man
0 commit comments