Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 680836 Details for
Bug 715202
sys-libs/libsmbios with app-shells/dash: /bin/sh: 3: Bad substitution
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
libsmbios-avoid-indirect-expansion-in-shell.patch
libsmbios-avoid-indirect-expansion-in-shell.patch (text/plain), 1.96 KB, created by
kfm
on 2021-01-03 10:55:30 UTC
(
hide
)
Description:
libsmbios-avoid-indirect-expansion-in-shell.patch
Filename:
MIME Type:
Creator:
kfm
Created:
2021-01-03 10:55:30 UTC
Size:
1.96 KB
patch
obsolete
>commit ab745e729a98232d4a5914b3692e6a13a77589bb >Author: Kerin Millar <kfm@plushkava.net> >Date: Sun Jan 3 10:23:34 2021 +0000 > > Don't rely on support for indirect expansion in the shell > > POSIX does not define the indirect expansion syntax. Moreover, if going > to the trouble of executing Perl, one may as well take full advantage of > it. To that end, have Perl perform the replacement without utilising any > form of code injection. Instead, export 'name' into Perl's environment. > That way, Perl can reference the variable name as $ENV{name} and its > value as $ENV{$ENV{name}}. > > Signed-off-by: Kerin Millar <kfm@plushkava.net> > Closes: https://bugs.gentoo.org/715202 > Closes: https://github.com/dell/libsmbios/issues/89 > >diff --git a/Makefile-std b/Makefile-std >index 7ac6fa2..63594cd 100644 >--- a/Makefile-std >+++ b/Makefile-std >@@ -38,7 +38,7 @@ install-data-hook: > file=$(DESTDIR)/$$i ;\ > for var in $(REPLACE_VARS) ;\ > do \ >- perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $$file;\ >+ name="$$var" perl -p -i -e 's|^\Q$$ENV{name}\E\s*=.*|$$ENV{name}="$$ENV{$$ENV{name}}"|' $$file;\ > done ;\ > done > >@@ -48,7 +48,7 @@ install-exec-hook: > file=$(DESTDIR)/$$i ;\ > for var in $(REPLACE_VARS) ;\ > do \ >- perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $$file;\ >+ name="$$var" perl -p -i -e 's|^\Q$$ENV{name}\E\s*=.*|$$ENV{name}="$$ENV{$$ENV{name}}"|' $$file;\ > done ;\ > done > >diff --git a/src/python/Makefile.am b/src/python/Makefile.am >index 693b6d9..d4ea682 100644 >--- a/src/python/Makefile.am >+++ b/src/python/Makefile.am >@@ -29,5 +29,5 @@ src/python/_vars.py: src/python/libsmbios_c/_vars.py configure Makefile config. > cp $< $@ > for var in $(REPLACE_VARS) ;\ > do \ >- perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $@;\ >+ name="$$var" perl -p -i -e 's|^\Q$$ENV{name}\E\s*=.*|$$ENV{name}="$$ENV{$$ENV{name}}"|' $@;\ > done
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 715202
:
626620
|
680836
|
680839