kumquat-buildroot/support/scripts
Yann E. MORIN 3b7c7e6106 support/scripts: fix fix-rpath
Commit 134900401f (support/scripts/fix-rpath: parallelize patching
files) broke the rpath fixup, because it improperly quoted or expanded
variables:

  - $@ was expanded in the main() context, rather than in the sub-bash
    as expected, propagating incorrect parameters to patch_file();

  - an array was passed without array expansion, so only the first item
    was passed; that was in turn assigned to a string, anyway loosign
    the array. Liuckily, we only ever put a single item in that array,
    so that worked by chance.

We fix that by inverting the parameters to patch_elf(), where the extra
args are passed last, so we can put as many we want in the future. We
also pass every variables as positional parameters outside the bash -c
command, which allows us proper quoting of all variables, specifically
of the extra args array which now comes last.

The ultralong line was split, too, in a hopefully easier-to-read form.

Fixing all that also required fixing the many shellcheck issues at the
same time (wome were pre-existing before 134900401f).

While at it, expand two TABs into spaces like the rest of the script.

Note: shellcheck does not seem to warn when a variable expansion will be
used as the command to run, i.e. ${PATCHELF} does not trigger the
quoting error. Still, for consistency, we also double-quote it (we know
it is a single word, as it is already double-quoted once in the script).

Fixes: 134900401f

Cc: Victor Dumas <dumasv.dev@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-08-07 23:20:31 +02:00
..
apply-patches.sh support/scripts/: remove -E flag from patch call 2022-01-03 21:14:32 +01:00
boot-qemu-image.py support/scripts/boot-qemu-image.py: increase the timeout by 10 2022-07-27 15:56:57 +02:00
br2-external br2-external: make version of external trees available 2023-05-13 12:06:08 +02:00
brpkgutil.py
check-bin-arch
check-dotconfig.py support: fix flake8 error E741 ambiguous variable name 2021-10-18 22:31:11 +02:00
check-host-rpath support/scripts: fix TABs/spaces in check-host-rpath 2022-07-30 18:15:08 +02:00
check-kernel-headers.sh
check-merged-usr.sh
cpedb.py
cve.py support: utils: use python3 explicitly 2021-09-22 21:30:24 +02:00
expunge-gconv-modules toolchain: support gconv modules from glibc >= 2.34 2022-10-21 21:02:40 +02:00
fix-configure-powerpc64.sh
fix-rpath support/scripts: fix fix-rpath 2023-08-07 23:20:31 +02:00
gen-bootlin-toolchains toolchain: invert glibc <-> !static dependency 2022-07-27 11:11:19 +02:00
gen-missing-cpe
generate-gitlab-ci-yml support/misc/gitlab-ci.yml.in: pass emulator builtin binaries as artifacts 2023-07-18 23:03:23 +02:00
genimage.sh
graph-build-time support/scripts/graph-build-time: add support for timeline graphing 2022-03-20 23:52:24 +01:00
graph-depends support: utils: use python3 explicitly 2021-09-22 21:30:24 +02:00
hardlink-or-copy
mkmakefile
mkusers support/scripts/mkusers: allow option for system uid/gid 2022-02-05 23:09:31 +01:00
pkg-stats support/scripts/pkg-stats: fix flake8 errors 2022-08-27 23:02:38 +02:00
pyinstaller.py package/pkg-python: clean conflicting pep517 packages before install 2022-08-22 11:54:25 +02:00
setlocalversion
size-stats support/scripts/size-stats: count compiled python (.pyc) files 2022-09-24 10:34:30 +02:00