[Bug 1806728] [NEW] shell config /etc/profile does not set $PATH
mila nuts
1806728 at bugs.launchpad.net
Tue Dec 4 16:55:02 UTC 2018
Public bug reported:
lsb_release -rd
Description: Ubuntu 16.04.5 LTS
Release: 16.04
apt-cache policy base-files
base-files:
Installed: 9.4ubuntu4.7
grep -e PATH -e environment /usr/share/base-files/profile | wc -l
0
expectation:
/etc/profile should source /etc/environment to set the $PATH variable
reality:
/etc/profile does not set $PATH
scenario:
when chroot-ing from arch linux into ubuntu linux,
and running 'source /etc/profile'
then $PATH does not contain /bin:/sbin:/usr/sbin
which are needed to run 'apt-get update && apt-get upgrade'
... otherwise 'apt-get update' fails with
Unknown error executing apt-key
and 'apt-get upgrade' fails with
Processing triggers for cracklib-runtime (2.9.2-1ubuntu1) ...
/var/lib/dpkg/info/cracklib-runtime.postinst: 7: /var/lib/dpkg/info/cracklib-runtime.postinst: update-cracklib: not found
dpkg: error processing package cracklib-runtime (--unpack):
subprocess installed post-installation script returned error exit status 127
only after 'source /etc/environment' all runs fine.
/etc/environment vs /etc/profile:
environment is for all programs, profile is only for shells.
but shells also need the $PATH variable,
so including environment in profile does make sense, at least to me.
** Affects: base-files (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to base-files in Ubuntu.
https://bugs.launchpad.net/bugs/1806728
Title:
shell config /etc/profile does not set $PATH
Status in base-files package in Ubuntu:
New
Bug description:
lsb_release -rd
Description: Ubuntu 16.04.5 LTS
Release: 16.04
apt-cache policy base-files
base-files:
Installed: 9.4ubuntu4.7
grep -e PATH -e environment /usr/share/base-files/profile | wc -l
0
expectation:
/etc/profile should source /etc/environment to set the $PATH variable
reality:
/etc/profile does not set $PATH
scenario:
when chroot-ing from arch linux into ubuntu linux,
and running 'source /etc/profile'
then $PATH does not contain /bin:/sbin:/usr/sbin
which are needed to run 'apt-get update && apt-get upgrade'
... otherwise 'apt-get update' fails with
Unknown error executing apt-key
and 'apt-get upgrade' fails with
Processing triggers for cracklib-runtime (2.9.2-1ubuntu1) ...
/var/lib/dpkg/info/cracklib-runtime.postinst: 7: /var/lib/dpkg/info/cracklib-runtime.postinst: update-cracklib: not found
dpkg: error processing package cracklib-runtime (--unpack):
subprocess installed post-installation script returned error exit status 127
only after 'source /etc/environment' all runs fine.
/etc/environment vs /etc/profile:
environment is for all programs, profile is only for shells.
but shells also need the $PATH variable,
so including environment in profile does make sense, at least to me.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1806728/+subscriptions
More information about the foundations-bugs
mailing list