Package: etckeeper Version: 1.18.12-1 Followup-For: Bug #946055 Find a patch attached. I intend to NMU if this isn’t fixed RSN.
The patch fixes the issue by reimplementing the -mmessage feature introduced in 1.18.11 in portable shell *and* fixing issues with messages starting with -n or -c or containing backslashes as well. -- System Information: Debian Release: bullseye/sid APT prefers buildd-unstable APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.3.0-3-amd64 (SMP w/2 CPU cores) Kernel taint flags: TAINT_WARN Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8) Shell: /bin/sh linked to /bin/lksh Init: sysvinit (via /sbin/init) Versions of packages etckeeper depends on: ii debconf [debconf-2.0] 1.5.73 ii git 1:2.24.1-1 Versions of packages etckeeper recommends: ii cron [cron-daemon] 3.0pl1-135 Versions of packages etckeeper suggests: ii sudo 1.8.29-1 -- debconf information: etckeeper/purge: true
diff -Nru etckeeper-1.18.12/debian/changelog etckeeper-1.18.12/debian/changelog --- etckeeper-1.18.12/debian/changelog 2019-12-01 21:08:30.000000000 +0100 +++ etckeeper-1.18.12/debian/changelog 2019-12-18 20:11:25.000000000 +0100 @@ -1,3 +1,13 @@ +etckeeper (1.18.12-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * debian/patches/fix-sh-syntax.diff: new (Closes: #946055) + - reimplements -mmessage from 1.18.11 in portable shell + - fixes potential bugs with messages starting with hyphen-minus + (in particular -n, -c) and containing backslashes + + -- Thorsten Glaser <t...@mirbsd.de> Wed, 18 Dec 2019 20:11:25 +0100 + etckeeper (1.18.12-1) unstable; urgency=medium [ Antoine Beaupré ] diff -Nru etckeeper-1.18.12/debian/patches/fix-sh-syntax.diff etckeeper-1.18.12/debian/patches/fix-sh-syntax.diff --- etckeeper-1.18.12/debian/patches/fix-sh-syntax.diff 1970-01-01 01:00:00.000000000 +0100 +++ etckeeper-1.18.12/debian/patches/fix-sh-syntax.diff 2019-12-18 20:11:17.000000000 +0100 @@ -0,0 +1,19 @@ +# DP: fix #946055 by reimplementing in portable shell +# DP: also fixes issues with echo -n, -c, and backslashes + +--- a/commit.d/50vcs-commit ++++ b/commit.d/50vcs-commit +@@ -12,10 +12,9 @@ if [ -n "$1" ]; then + if [ "x$1" = "x--stdin" ]; then + cat > "$logfile" + else +- if [ "x$1" = "x-m" ]; then +- shift 1 +- fi +- echo "${@#-m}" > "$logfile" ++ sed '1s/^-m \{0,1\}//' >"$logfile" <<-EOF ++ $* ++ EOF + fi + else + logfile="" diff -Nru etckeeper-1.18.12/debian/patches/series etckeeper-1.18.12/debian/patches/series --- etckeeper-1.18.12/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ etckeeper-1.18.12/debian/patches/series 2019-12-18 20:02:00.000000000 +0100 @@ -0,0 +1 @@ +fix-sh-syntax.diff