]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
meson: fix incorrect substitutions in configured files
authorEli Schwartz <eschwartz93@gmail.com>
Fri, 24 Dec 2021 00:14:22 +0000 (19:14 -0500)
committerEli Schwartz <eschwartz93@gmail.com>
Fri, 24 Dec 2021 00:17:19 +0000 (19:17 -0500)
commitbdec2257ef4a68efb519233f3a9e01c8fce7dfaf
tree481e46ab43e1b5c572f818970b9bbb1cd8bc12fb
parent6e6e4eaee79e0c21e3bde78752b313ce1a638799
meson: fix incorrect substitutions in configured files

The custom Makefile rules performed this substitution:

@@VAR@@ -> VAL

However, meson did this substitution:

@@VAR@@ -> @VAL@

This produced incorrect behavior, such as configuring a udev file to
read:

install_items+=" @/usr/etc/udev/rules.d@/70-nvmf-autoconnect.rules "

muon, meanwhile, failed loudly with:

/tmp/nvme-cli/nvmf-autoconnect/dracut-conf/70-nvmf-autoconnect.conf.in:1:19: error: key of zero length not supported
  1 | install_items+=" @@UDEVRULESDIR@@/70-nvmf-autoconnect.rules "
                        ^
/tmp/nvme-cli/meson.build:161:1: error: in function configure_file
161 | configure_file(
      ^

Since meson does not support custom token rules for configuring
replacements, and there is no real benefit to doubling the @@, just fix
this to use one @.
Makefile
nvme.control.in
nvme.spec.in
nvmf-autoconnect/dracut-conf/70-nvmf-autoconnect.conf.in