diff options
author | Martin Liska <mliska@suse.cz> | 2022-08-16 15:14:26 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-08-16 15:26:23 +0200 |
commit | 538f0c744dd4e1d931b98d01425b45137afcd9a4 (patch) | |
tree | ff0027cddee66bb5c465408b7908a34b0b4a5111 | |
parent | 31d6b1fe74ab89138b4d256742997b730dc5cba8 (diff) | |
download | elfutils-538f0c744dd4e1d931b98d01425b45137afcd9a4.tar.gz |
Support nullglob in profile.*.in files
In openSUSE we have the following RPM checker that uses
shopt -s nullglob:
https://github.com/openSUSE/post-build-checks/blob/master/checks/50-check-libtool-deps#L31
The script loads all /etc/profile.d/*.sh files via source $FILE which
can end up by stuck cat (with no arguments):
shopt -s nullglob ; cat "/etc/debuginfod"/*.urls
(stuck)
-rw-r--r-- | config/profile.csh.in | 2 | ||||
-rw-r--r-- | config/profile.sh.in | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/config/profile.csh.in b/config/profile.csh.in index 74c20c99..d962d969 100644 --- a/config/profile.csh.in +++ b/config/profile.csh.in @@ -6,7 +6,7 @@ if (! $?DEBUGINFOD_URLS) then set prefix="@prefix@" - set DEBUGINFOD_URLS=`sh -c 'cat "$0"/*.urls 2>/dev/null; :' "@sysconfdir@/debuginfod" | tr '\n' ' '` + set DEBUGINFOD_URLS=`sh -c 'cat /dev/null "$0"/*.urls 2>/dev/null; :' "@sysconfdir@/debuginfod" | tr '\n' ' '` if ( "$DEBUGINFOD_URLS" != "" ) then setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS" else diff --git a/config/profile.sh.in b/config/profile.sh.in index bad20b1e..3f4397dc 100644 --- a/config/profile.sh.in +++ b/config/profile.sh.in @@ -6,7 +6,7 @@ if [ -z "$DEBUGINFOD_URLS" ]; then prefix="@prefix@" - DEBUGINFOD_URLS=$(cat "@sysconfdir@/debuginfod"/*.urls 2>/dev/null | tr '\n' ' ') + DEBUGINFOD_URLS=$(cat /dev/null "@sysconfdir@/debuginfod"/*.urls 2>/dev/null | tr '\n' ' ') [ -n "$DEBUGINFOD_URLS" ] && export DEBUGINFOD_URLS || unset DEBUGINFOD_URLS unset prefix fi |