[Group.of.nepali.translators] [Bug 1771858] Re: /snap/bin not in default PATH for units, snapd should ship system-environment-generators to inject /snap/bin into $PATH
** Changed in: snapd (Ubuntu Bionic) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1771858 Title: /snap/bin not in default PATH for units, snapd should ship system- environment-generators to inject /snap/bin into $PATH Status in snapd package in Ubuntu: Fix Released Status in systemd package in Ubuntu: Fix Released Status in snapd source package in Xenial: Won't Fix Status in systemd source package in Xenial: Fix Released Status in snapd source package in Bionic: Fix Released Status in systemd source package in Bionic: Fix Released Status in snapd source package in Cosmic: Fix Released Status in systemd source package in Cosmic: Fix Released Bug description: [Impact] * This means that software installed via snap isn't transparently available for units to use. As snaps are first-class citizens in Ubuntu, we should update the PATH. * When a generator started to be provided by systemd, it was recognized that $PATH is not correctly set, nonetheless, due to an environment bug that systemd generators run in. [Testcase] # make snapd-env-generator executable if it is not $ sudo chmod +x /usr/lib/systemd/system-environment-generators/snapd-env-generator # reboot, then test the effect of the fix $ systemd-run /usr/bin/env $ journalctl -e | grep PATH Output should contain /snap/bin Output should contain a complete and a valid PATH, i.e. PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" or similar. [Regression Potential] * snapd generator was already fixed separately to cause no harm, when running under a broken systemd. With the corrected environment, generators will now run with a correct PATH out of the box. A slight change of PATH will be observed by all generators, when running in containers/initramfs-less boots. However most generators will not be affected as they typically do not execute external binaries. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1771858/+subscriptions ___ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp
[Group.of.nepali.translators] [Bug 1771858] Re: /snap/bin not in default PATH for units, snapd should ship system-environment-generators to inject /snap/bin into $PATH
Installed snapd from proposed, rebooted, and /snap/bin is now in path of systemd-run unit Nov 18 18:25:26 well-monkey env[298]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin # dpkg-query -W snapd snapd 2.42.1+18.04 Prior to reboot it was not in PATH of a systemd-run unit. ** Changed in: snapd (Ubuntu Bionic) Status: Confirmed => Fix Committed ** Changed in: snapd (Ubuntu) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1771858 Title: /snap/bin not in default PATH for units, snapd should ship system- environment-generators to inject /snap/bin into $PATH Status in snapd package in Ubuntu: Fix Released Status in systemd package in Ubuntu: Fix Released Status in snapd source package in Xenial: Invalid Status in systemd source package in Xenial: Fix Released Status in snapd source package in Bionic: Fix Committed Status in systemd source package in Bionic: Fix Released Status in snapd source package in Cosmic: Fix Released Status in systemd source package in Cosmic: Fix Released Bug description: [Impact] * This means that software installed via snap isn't transparently available for units to use. As snaps are first-class citizens in Ubuntu, we should update the PATH. * When a generator started to be provided by systemd, it was recognized that $PATH is not correctly set, nonetheless, due to an environment bug that systemd generators run in. [Testcase] # make snapd-env-generator executable if it is not $ sudo chmod +x /usr/lib/systemd/system-environment-generators/snapd-env-generator # reboot, then test the effect of the fix $ systemd-run /usr/bin/env $ journalctl -e | grep PATH Output should contain /snap/bin Output should contain a complete and a valid PATH, i.e. PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" or similar. [Regression Potential] * snapd generator was already fixed separately to cause no harm, when running under a broken systemd. With the corrected environment, generators will now run with a correct PATH out of the box. A slight change of PATH will be observed by all generators, when running in containers/initramfs-less boots. However most generators will not be affected as they typically do not execute external binaries. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1771858/+subscriptions ___ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp
[Group.of.nepali.translators] [Bug 1771858] Re: /snap/bin not in default PATH for units, snapd should ship system-environment-generators to inject /snap/bin into $PATH
This bug was fixed in the package systemd - 229-4ubuntu21.22 --- systemd (229-4ubuntu21.22) xenial; urgency=medium [ Dan Streetman ] * d/t/systemd-fsckd, d/t/cmdline-upstart-boot: - skip on s390x; requires grub (LP: #1830477) * d/p/ask-password-prevent-buffer-overrow-when-reading-fro.patch: - prevent buffer overflow when reading keyring (LP: #1814373) [ Dimitri John Ledkov ] * Specify Ubuntu's Vcs-Git [ Balint Reczey ] * Append /snap/bin to default PATH. Snapd ships snapd-env-generator, but systemd does not not support environment generators. Hard-coding /snap/bin is less risky than backporting environment generator support and since snaps are considered to be first class packages on Ubuntu /snap/bin can safely added to the default PATH. (LP: #1771858) [ Ioanna Alifieraki ] * d/p/systemctl-Replace-check_one_unit-by-get_state_one_un.patch - Backport upstream PR#2768 needed for next patch * d/p/systemctl-load-unit-if-needed-in-systemctl-is-active.patch - Backport upstream PR#7997 to fix alias service reports inactive while aliased is active (LP: #1828892) -- Dan Streetman Wed, 24 Apr 2019 17:15:36 -0400 ** Changed in: systemd (Ubuntu Xenial) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1771858 Title: /snap/bin not in default PATH for units, snapd should ship system- environment-generators to inject /snap/bin into $PATH Status in snapd package in Ubuntu: Confirmed Status in systemd package in Ubuntu: Fix Released Status in snapd source package in Xenial: Invalid Status in systemd source package in Xenial: Fix Released Status in snapd source package in Bionic: Confirmed Status in systemd source package in Bionic: Fix Released Status in snapd source package in Cosmic: Fix Released Status in systemd source package in Cosmic: Fix Released Bug description: [Impact] * This means that software installed via snap isn't transparently available for units to use. As snaps are first-class citizens in Ubuntu, we should update the PATH. * When a generator started to be provided by systemd, it was recognized that $PATH is not correctly set, nonetheless, due to an environment bug that systemd generators run in. [Testcase] # make snapd-env-generator executable if it is not $ sudo chmod +x /usr/lib/systemd/system-environment-generators/snapd-env-generator # reboot, then test the effect of the fix $ systemd-run /usr/bin/env $ journalctl -e | grep PATH Output should contain /snap/bin Output should contain a complete and a valid PATH, i.e. PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" or similar. [Regression Potential] * snapd generator was already fixed separately to cause no harm, when running under a broken systemd. With the corrected environment, generators will now run with a correct PATH out of the box. A slight change of PATH will be observed by all generators, when running in containers/initramfs-less boots. However most generators will not be affected as they typically do not execute external binaries. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1771858/+subscriptions ___ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp
[Group.of.nepali.translators] [Bug 1771858] Re: /snap/bin not in default PATH for units, snapd should ship system-environment-generators to inject /snap/bin into $PATH
This bug was fixed in the package systemd - 237-3ubuntu10.24 --- systemd (237-3ubuntu10.24) bionic; urgency=medium [Dimitri John Ledkov ] * core: export environment when running generators. Ensure that manager's environment (including e.g. PATH) is exported when running generators. Otherwise, one is at a mercy of running without PATH which can lead to buggy generator behaviour. (LP: #1771858) -- Balint Reczey Mon, 24 Jun 2019 14:50:38 +0200 ** Changed in: systemd (Ubuntu Bionic) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1771858 Title: /snap/bin not in default PATH for units, snapd should ship system- environment-generators to inject /snap/bin into $PATH Status in snapd package in Ubuntu: Confirmed Status in systemd package in Ubuntu: Fix Released Status in snapd source package in Xenial: Invalid Status in systemd source package in Xenial: Fix Released Status in snapd source package in Bionic: Confirmed Status in systemd source package in Bionic: Fix Released Status in snapd source package in Cosmic: Fix Released Status in systemd source package in Cosmic: Fix Released Bug description: [Impact] * This means that software installed via snap isn't transparently available for units to use. As snaps are first-class citizens in Ubuntu, we should update the PATH. * When a generator started to be provided by systemd, it was recognized that $PATH is not correctly set, nonetheless, due to an environment bug that systemd generators run in. [Testcase] # make snapd-env-generator executable if it is not $ sudo chmod +x /usr/lib/systemd/system-environment-generators/snapd-env-generator # reboot, then test the effect of the fix $ systemd-run /usr/bin/env $ journalctl -e | grep PATH Output should contain /snap/bin Output should contain a complete and a valid PATH, i.e. PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" or similar. [Regression Potential] * snapd generator was already fixed separately to cause no harm, when running under a broken systemd. With the corrected environment, generators will now run with a correct PATH out of the box. A slight change of PATH will be observed by all generators, when running in containers/initramfs-less boots. However most generators will not be affected as they typically do not execute external binaries. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1771858/+subscriptions ___ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp
[Group.of.nepali.translators] [Bug 1771858] Re: /snap/bin not in default PATH for units, snapd should ship system-environment-generators to inject /snap/bin into $PATH
Tested 229-4ubuntu21.22 on Xenial: ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo systemd-run /usr/bin/env [sudo] password for ubuntu: Running as unit run-r22d04a00a8304e2da719773bb14b6fb4.service. ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ journalctl -a | grep PATH Jul 02 14:31:04 ubuntu-Standard-PC-i440FX-PIIX-1996 env[2093]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ dpkg -l systemd Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ NameVersion Architecture Description +++-===---=== ii systemd 229-4ubuntu21.22 amd64system and service manager ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ dmesg | grep initr [0.243635] Unpacking initramfs... [0.891349] Freeing initrd memory: 54320K The fix for Xenial does not depend on snapd's environment generator, just hardcodes including /snap/bin in the PATH. ** Changed in: snapd (Ubuntu Xenial) Status: Confirmed => Invalid -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1771858 Title: /snap/bin not in default PATH for units, snapd should ship system- environment-generators to inject /snap/bin into $PATH Status in snapd package in Ubuntu: Confirmed Status in systemd package in Ubuntu: Fix Released Status in snapd source package in Xenial: Invalid Status in systemd source package in Xenial: Fix Committed Status in snapd source package in Bionic: Confirmed Status in systemd source package in Bionic: Fix Committed Status in snapd source package in Cosmic: Fix Released Status in systemd source package in Cosmic: Fix Released Bug description: [Impact] * This means that software installed via snap isn't transparently available for units to use. As snaps are first-class citizens in Ubuntu, we should update the PATH. * When a generator started to be provided by systemd, it was recognized that $PATH is not correctly set, nonetheless, due to an environment bug that systemd generators run in. [Testcase] # make snapd-env-generator executable if it is not $ sudo chmod +x /usr/lib/systemd/system-environment-generators/snapd-env-generator # reboot, then test the effect of the fix $ systemd-run /usr/bin/env $ journalctl -e | grep PATH Output should contain /snap/bin Output should contain a complete and a valid PATH, i.e. PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" or similar. [Regression Potential] * snapd generator was already fixed separately to cause no harm, when running under a broken systemd. With the corrected environment, generators will now run with a correct PATH out of the box. A slight change of PATH will be observed by all generators, when running in containers/initramfs-less boots. However most generators will not be affected as they typically do not execute external binaries. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1771858/+subscriptions ___ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp
[Group.of.nepali.translators] [Bug 1771858] Re: /snap/bin not in default PATH for units, snapd should ship system-environment-generators to inject /snap/bin into $PATH
@mvo /usr/lib/systemd/system-environment-generators/snapd-env-generator is working in Bosmic and up, but in Bionic it is not executable. Could this please be fixed? ** Changed in: snapd (Ubuntu Cosmic) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1771858 Title: /snap/bin not in default PATH for units, snapd should ship system- environment-generators to inject /snap/bin into $PATH Status in snapd package in Ubuntu: Confirmed Status in systemd package in Ubuntu: Fix Released Status in snapd source package in Xenial: Confirmed Status in systemd source package in Xenial: Confirmed Status in snapd source package in Bionic: Confirmed Status in systemd source package in Bionic: Fix Committed Status in snapd source package in Cosmic: Fix Released Status in systemd source package in Cosmic: Fix Released Bug description: [Impact] * This means that software installed via snap isn't transparently available for units to use. As snaps are first-class citizens in Ubuntu, we should update the PATH. * When a generator started to be provided by systemd, it was recognized that $PATH is not correctly set, nonetheless, due to an environment bug that systemd generators run in. [Testcase] # make snapd-env-generator executable if it is not $ sudo chmod +x /usr/lib/systemd/system-environment-generators/snapd-env-generator # reboot or run systemctl-daemon-reload, then test the effect of the fix $ systemd-run /usr/bin/env $ journalctl -e | grep PATH Output should contain /snap/bin Output should contain a complete and a valid PATH, i.e. PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" or similar. [Regression Potential] * snapd generator was already fixed separately to cause no harm, when running under a broken systemd. With the corrected environment, generators will now run with a correct PATH out of the box. A slight change of PATH will be observed by all generators, when running in containers/initramfs-less boots. However most generators will not be affected as they typically do not execute external binaries. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1771858/+subscriptions ___ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp
[Group.of.nepali.translators] [Bug 1771858] Re: /snap/bin not in default PATH for units, snapd should ship system-environment-generators to inject /snap/bin into $PATH
This bug was fixed in the package systemd - 239-7ubuntu9 --- systemd (239-7ubuntu9) cosmic; urgency=medium * core: export environment when running generators. Ensure that manager's environment (including e.g. PATH) is exported when running generators. Otherwise, one is at a mercy of running without PATH which can lead to buggy generator behaviour. (LP: #1771858) -- Dimitri John Ledkov Wed, 26 Sep 2018 11:01:58 +0100 ** Changed in: systemd (Ubuntu Cosmic) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1771858 Title: /snap/bin not in default PATH for units, snapd should ship system- environment-generators to inject /snap/bin into $PATH Status in snapd package in Ubuntu: Confirmed Status in systemd package in Ubuntu: Fix Released Status in snapd source package in Xenial: Confirmed Status in systemd source package in Xenial: Confirmed Status in snapd source package in Bionic: Confirmed Status in systemd source package in Bionic: Confirmed Status in snapd source package in Cosmic: Confirmed Status in systemd source package in Cosmic: Fix Released Bug description: This means that software installed via snap isn't transparently available for units to use. As snaps are first-class citizens in Ubuntu, we should update the PATH. Specifically, this is evident by e.g. $ systemd-run env. Or any other daemons that spawn shell scripts (e.g. cloud-init metadata acquired shell hooks, etc.). Since v232 systemd provides support for environment generators, snapd should package/ship a snippet that injects the correct snapd path into systemd environment. E.g.: $ sudo mkdir -p /usr/lib/systemd/system-environment-generators $ printf '#!/bin/sh\nPATH=$PATH:/snap/bin\n' | \ sudo tee /usr/lib/systemd/system-environment-generators/90-snapd Something similar can be done for user-environment-generators too. Note that user-environment-generators can generate unique variables per user. Note please use /usr/lib path, as it appears that /lib/systemd path is not working atm. Will check if that needs to be fixed up. systemd in xenial does not support system-environment-generators, thus we probably need to upload a patch to change the DEFAULT_PATH compiled in default there. [Testcase] $ systemd-run /usr/bin/env $ journalctl -e | grep PATH Output should contain /snap/bin To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1771858/+subscriptions ___ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp
[Group.of.nepali.translators] [Bug 1771858] Re: /snap/bin not in default PATH for units, snapd should ship system-environment-generators to inject /snap/bin into $PATH
Using this bug to fix systemd exported environment to the generators. ** Changed in: systemd (Ubuntu Cosmic) Status: Won't Fix => Fix Committed ** Changed in: systemd (Ubuntu Bionic) Status: Won't Fix => Confirmed -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1771858 Title: /snap/bin not in default PATH for units, snapd should ship system- environment-generators to inject /snap/bin into $PATH Status in snapd package in Ubuntu: Confirmed Status in systemd package in Ubuntu: Confirmed Status in snapd source package in Xenial: Confirmed Status in systemd source package in Xenial: Confirmed Status in snapd source package in Bionic: Confirmed Status in systemd source package in Bionic: Confirmed Status in snapd source package in Cosmic: Confirmed Status in systemd source package in Cosmic: Fix Committed Bug description: This means that software installed via snap isn't transparently available for units to use. As snaps are first-class citizens in Ubuntu, we should update the PATH. Specifically, this is evident by e.g. $ systemd-run env. Or any other daemons that spawn shell scripts (e.g. cloud-init metadata acquired shell hooks, etc.). Since v232 systemd provides support for environment generators, snapd should package/ship a snippet that injects the correct snapd path into systemd environment. E.g.: $ sudo mkdir -p /usr/lib/systemd/system-environment-generators $ printf '#!/bin/sh\nPATH=$PATH:/snap/bin\n' | \ sudo tee /usr/lib/systemd/system-environment-generators/90-snapd Something similar can be done for user-environment-generators too. Note that user-environment-generators can generate unique variables per user. Note please use /usr/lib path, as it appears that /lib/systemd path is not working atm. Will check if that needs to be fixed up. systemd in xenial does not support system-environment-generators, thus we probably need to upload a patch to change the DEFAULT_PATH compiled in default there. [Testcase] $ systemd-run /usr/bin/env $ journalctl -e | grep PATH Output should contain /snap/bin To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1771858/+subscriptions ___ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp