group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #23770
[Bug 1771858] Re: /snap/bin not in default PATH for units
** Description changed:
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.
** Also affects: snapd (Ubuntu)
Importance: Undecided
Status: New
** Changed in: systemd (Ubuntu Cosmic)
Status: New => Won't Fix
** Changed in: systemd (Ubuntu Bionic)
Status: New => Won't Fix
** Changed in: systemd (Ubuntu Xenial)
Status: New => Confirmed
** Description changed:
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.
** Summary changed:
- /snap/bin not in default PATH for units
+ /snap/bin not in default PATH for units, snapd should ship system-environment-generators to inject /snap/bin into $PATH
** Description changed:
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
--
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:
New
Status in systemd package in Ubuntu:
New
Status in snapd source package in Xenial:
New
Status in systemd source package in Xenial:
Confirmed
Status in snapd source package in Bionic:
New
Status in systemd source package in Bionic:
Won't Fix
Status in snapd source package in Cosmic:
New
Status in systemd source package in Cosmic:
Won't Fix
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