This bug was initially created as a copy of Bug #1688302 I am copying this bug because: This will get fixed in 8, therefore, cloning it for Fedora to prevent regression. Same issue in rhel8: # rpm -qa setup setup-2.12.2-1.el8.noarch # egrep '(id|tty|tput|dircolors|grep)' -r /etc/profile # System wide environment and startup programs, for login setup # It's NOT a good idea to change this file unless you know what you if [ -x /usr/bin/id ]; then EUID=`id -u` UID=`id -ru` USER="`id -un`" # Current threshold for system reserved uid/gids is 200 # You could check uidgid reservation validity in # /usr/share/doc/setup-*/uidgid file if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then # +++ This bug was initially created as a clone of Bug #1228282 +++ ================== This bug has been copied from Bug #1222140 because "/etc/profile" belongs to "setup", "/etc/profile.d/colorls.sh" belongs to "coreutils". ================== Description of problem: Rlative path is used in /etc/profile.d/colorls.sh. Those are id, tty, tput, dircolors and grep. If NFS is mounted to /usr/local/sbin and NFS is unresponsive, it would take long time for root to login. Version-Release number of selected component (if applicable): setup-2.8.14-20.el6_4.1.noarch How reproducible: Always Steps to Reproduce: # egrep '(id|tty|tput|dircolors|grep)' -r /etc/profile Actual results: ~~~ # System wide environment and startup programs, for login setup # It's NOT a good idea to change this file unless you know what you if [ -x /usr/bin/id ]; then EUID=`id -u` UID=`id -ru` USER="`id -un`" # Current threshold for system reserved uid/gids is 200 # You could check uidgid reservation validity in # /usr/share/doc/setup-*/uidgid file if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then ~~~ Expected results: All commands are with fullpath. ~~~ EUID=`/usr/bin/id -u` UID=`/usr/bin/ -ru` USER="`/usr/bin/ -un`" ...snip... if [ $UID -gt 199 ] && [ "`/usr/bin/ -gn`" = "`/usr/bin/ -un`" ]; then ~~~ Additional info: See also: Bug #1222140
some of the needed changes introduced already by: Bug 1648589 - recursively repeats command until no more processes https://pagure.io/setup/c/020de8300a7679cc280f672d6262935a42464b19 current results (searched also for hostname, sed and locale): ~~~ $ egrep '(id|tty|tput|dircolors|grep|hostname|sed|locale)' csh.cshrc csh.login lang.csh lang.sh profile | grep -v "#.*" csh.cshrc:if ($uid > 199 && "`id -gn`" == "`id -un`") then csh.cshrc: set prompt=\[$user@`hostname -s`\]\$\ csh.login: if ( $uid == 0 ) then csh.login: if ( $uid == 0 ) then csh.login:setenv HOSTNAME `/usr/bin/hostname` lang.csh:set locale_error=`(locale >/dev/null) |& cat` lang.csh:if ("${locale_error}" != "") then lang.csh:foreach config (/etc/locale.conf "${HOME}/.i18n") lang.csh: eval `sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/setenv \1 \2;/;t;d' ${config}` lang.csh:unset LANG_backup config locale_error lang.csh:set in_console=`tty | grep -vc -e '/dev/tty'` lang.csh: set utf8_used=`echo ${LANG} | grep -vc -E -i -e '^.+\.utf-?8$'` lang.csh: if (${utf8_used} == 0) then lang.csh:unset in_console utf8_used lang.sh:if [ -n "$(locale 2>&1 1>/dev/null)" ]; then lang.sh:for config in /etc/locale.conf "${HOME}/.i18n"; do lang.sh: if [ -x /usr/bin/sed ]; then lang.sh: eval $(/usr/bin/sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/export \1=\2/;t;d' ${config}) lang.sh:if [ -n "${LANG}" ] && [ "${TERM}" = 'linux' ] && tty | grep --quiet -e '/dev/tty'; then lang.sh: if grep --quiet -E -i -e '^.+\.utf-?8$' <<< "${LANG}"; then profile:if [ -x /usr/bin/id ]; then profile: EUID=`/usr/bin/id -u` profile: UID=`/usr/bin/id -ru` profile: USER="`/usr/bin/id -un`" profile:HOSTNAME=`/usr/bin/hostname 2>/dev/null` profile:if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then $ ~~~ patch for this: https://pagure.io/setup/c/c66b84814334be0d7fe82812f0c5312aa36c0bf6?branch=master results after the patch: ~~~ $ egrep '(id|tty|tput|dircolors|grep|hostname|sed|locale)' csh.cshrc csh.login lang.csh lang.sh profile | grep -v "#.*" csh.cshrc:if ($uid > 199 && "`/usr/bin/id -gn`" == "`/usr/bin/id -un`") then csh.cshrc: set prompt=\[$user@`/usr/bin/hostname -s`\]\$\ csh.login: if ( $uid == 0 ) then csh.login: if ( $uid == 0 ) then csh.login:setenv HOSTNAME `/usr/bin/hostname` lang.csh:set locale_error=`(/usr/bin/locale >/dev/null) |& cat` lang.csh:if ("${locale_error}" != "") then lang.csh:foreach config (/etc/locale.conf "${HOME}/.i18n") lang.csh: eval `/usr/bin/sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/setenv \1 \2;/;t;d' ${config}` lang.csh:unset LANG_backup config locale_error lang.csh:set in_console=`/usr/bin/tty | /usr/bin/grep -vc -e '/dev/tty'` lang.csh: set utf8_used=`echo ${LANG} | /usr/bin/grep -vc -E -i -e '^.+\.utf-?8$'` lang.csh: if (${utf8_used} == 0) then lang.csh:unset in_console utf8_used lang.sh:if [ -n "$(/usr/bin/locale 2>&1 1>/dev/null)" ]; then lang.sh:for config in /etc/locale.conf "${HOME}/.i18n"; do lang.sh: if [ -x /usr/bin/sed ]; then lang.sh: eval $(/usr/bin/sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/export \1=\2/;t;d' ${config}) lang.sh:if [ -n "${LANG}" ] && [ "${TERM}" = 'linux' ] && /usr/bin/tty | /usr/bin/grep --quiet -e '/dev/tty'; then lang.sh: if /usr/bin/grep --quiet -E -i -e '^.+\.utf-?8$' <<< "${LANG}"; then profile:if [ -x /usr/bin/id ]; then profile: EUID=`/usr/bin/id -u` profile: UID=`/usr/bin/id -ru` profile: USER="`/usr/bin/id -un`" profile:HOSTNAME=`/usr/bin/hostname 2>/dev/null` profile:if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then $ ~~~
a follow up to comment 1... with the below commit: https://pagure.io/setup/c/c66b84814334be0d7fe82812f0c5312aa36c0bf6?branch=master I introduced a regression and fixed it by: https://pagure.io/setup/c/55c2a3703fe54eb7333d39fa7f89df323a85656b?branch=master
besides the two commits mentioned in comment 2: https://pagure.io/setup/c/c66b84814334be0d7fe82812f0c5312aa36c0bf6?branch=master https://pagure.io/setup/c/55c2a3703fe54eb7333d39fa7f89df323a85656b?branch=master the below one is also needed to fully fix this, /etc/bashrc still called 'id' instead of '/usr/bin/id' like it is on RHEL6, RHEL7 and soon also on RHEL8: https://pagure.io/setup/c/302a086bf59415a22f5d4435a48e6ab248231719?branch=master
CI test: /CoreOS/setup/Sanity/bz1228282-Not-all-utilities-are-called-with-full-path-in OLD: setup-2.13.3-1.fc30.noarch NEW: setup-2.13.6-1.fc30.noarch failed with affected OLD: ~~~ :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Cleanup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /tmp/tmp.5LXKV3LDXT: ----------------------- /etc/bashrc: if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then /etc/csh.cshrc:if ($uid > 199 && "`id -gn`" == "`id -un`") then /etc/csh.cshrc: set prompt=\[$user@`hostname -s`\]\$\ /etc/profile:if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then /etc/profile.d/lang.csh:set locale_error=`(locale >/dev/null) |& cat` /etc/profile.d/lang.csh: eval `sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/setenv \1 \2;/;t;d' ${config}` /etc/profile.d/lang.csh:set in_console=`tty | grep -vc -e '/dev/tty'` /etc/profile.d/lang.csh: set utf8_used=`echo ${LANG} | grep --quiet -E -i -e '^.+\.utf-?8$'; echo $?` /etc/profile.d/lang.sh:if [ -n "$(locale 2>&1 1>/dev/null)" ]; then ----------------------- ... :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test for BZ#1688302 on Fedora release 30 (Thirty) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 05:08:38 ] :: [ FAIL ] :: Command 'grep '`[[:alnum:][:space:][:punct:]]\{1,\}`' $(for Input in $(rpm -ql setup | grep /etc); do [ -f "$Input" ] && echo "$Input"; done) | grep -v /bin &> /tmp/tmp.5LXKV3LDXT' (Expected 1, got 0) :: [ 05:08:38 ] :: [ FAIL ] :: Command 'grep '$([[:alnum:][:space:][:punct:]]\{1,\})' $(for Input in $(rpm -ql setup | grep /etc); do [ -f "$Input" ] && echo "$Input"; done) | grep -v /bin >> /tmp/tmp.5LXKV3LDXT' (Expected 1, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Assertions: 0 good, 2 bad :: RESULT: FAIL (Test for BZ#1688302 on Fedora release 30 (Thirty)) ~~~ passed with fixed NEW: ~~~ :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Cleanup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /tmp/tmp.Y6XgBCVPv6: ----------------------- ----------------------- ... :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test for BZ#1688302 on Fedora release 30 (Thirty) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 05:09:57 ] :: [ PASS ] :: Command 'grep '`[[:alnum:][:space:][:punct:]]\{1,\}`' $(for Input in $(rpm -ql setup | grep /etc); do [ -f "$Input" ] && echo "$Input"; done) | grep -v /bin &> /tmp/tmp.Y6XgBCVPv6' (Expected 1, got 1) :: [ 05:09:57 ] :: [ PASS ] :: Command 'grep '$([[:alnum:][:space:][:punct:]]\{1,\})' $(for Input in $(rpm -ql setup | grep /etc); do [ -f "$Input" ] && echo "$Input"; done) | grep -v /bin >> /tmp/tmp.Y6XgBCVPv6' (Expected 1, got 1) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Assertions: 2 good, 0 bad :: RESULT: PASS (Test for BZ#1688302 on Fedora release 30 (Thirty)) ~~~
FEDORA-2019-d30f1a7dd4 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-d30f1a7dd4
FEDORA-2019-c423bdade3 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-c423bdade3
setup-2.13.6-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-c423bdade3
setup-2.13.6-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-d30f1a7dd4
setup-2.13.6-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
setup-2.13.6-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.