]> arthur.barton.de Git - bup.git/commit
Fix the handling of the configure MAKE and PYTHON vars
authorRob Browning <rlb@defaultvalue.org>
Thu, 26 Dec 2019 00:08:13 +0000 (18:08 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sat, 11 Jan 2020 20:39:27 +0000 (14:39 -0600)
commit813aa7d002f141db50ff6d2d276542ed91088043
tree29d941995ad2dc417516269c5f9f212ef8947c84
parent2f683ba03ca73475f003b63fff29e8e7691615ea
Fix the handling of the configure MAKE and PYTHON vars

Instead of trying to negotiate the maze of twisty quoting
passages (bash vs sh, how do you get it to work correctly from a
makefile target, etc.), drop config.vars.sh and just store each
variable value in a separate config/config.var/NAME file, and read
that file whenever we need the value, so that we should be able to
handle more or less arbitrary values, e.g.:

  make PYTHON='srsly?
  why?'

Along the same lines, instead of trying to figure out, in any given
case, how to quote values for sed (through various layers), add
dev/replace, which just does literal replacements of values provided
on the command line.

Also along the same lines, add dev/shquote that quotes values properly
for POSIX sh, and use it.  Previously we produced bash %q quotations,
which can result in $'' bashisms, and then handed them to /bin/sh.

These changes (particularly the switch to the literal @bup_python@
replacement) also lay the groundwork for forthcoming adjustments to
cmd/bup.

Thanks to Johannes Berg for pointing out a couple of bugs, including
that I'd forgotten to use fsdecode after adding it.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Makefile
cmd/python-cmd.sh
config/.gitignore
config/configure
dev/replace [new file with mode: 0755]
dev/shquote [new file with mode: 0755]
t/test-release-archive.sh