On 2019-12-18 20:16:50, Thorsten Glaser wrote: > 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.
This package, like all of mine, is LowNMU so upload whenever you feel ready. > 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. Thanks for the patch! I do have a comment though... > 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 ... isn't there a simpler way than piping this through sed? does that regex really do the same as ${@#-m}? it seems there's some whitespace and anchoring stuff going on here that would subtly change behavior... I also encourage you to submit your patch upstream in: https://etckeeper.branchable.com/ specifically here: https://etckeeper.branchable.com/todo/ Let me know if you want me to carry that for you. Thanks again! a. -- If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr