Merge autopkgtest-cloud:snap-bin into autopkgtest-cloud:master

Proposed by Brian Murray
Status: Merged
Merged at revision: b7e22bec050e7fa88eead86bb01f71ce51d7821f
Proposed branch: autopkgtest-cloud:snap-bin
Merge into: autopkgtest-cloud:master
Diff against target: 13 lines (+1/-1)
1 file modified
charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/armhf-lxd.userdata (+1/-1)
Reviewer Review Type Date Requested Status
Paride Legovini Approve
Steve Langasek Approve
Review via email: mp+430401@code.launchpad.net

Description of the change

I don't know why we are setting $PATH but if we are we should add in /snap/bin.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

"why we are setting path" - because write_files overwrites the whole file rather than appending

review: Approve
Revision history for this message
Paride Legovini (paride) wrote :

LGTM, thanks!

---

Digression: it would be nice to use /etc/environment.d to set the extra env vars we need, but that's not as easy as it seems. For starters, Xenial does not support it. Then we have to remember that /etc/environment is a PAM thing (pam_env), while /etc/environment.d is a systemd thing and those settings apply to systemd service environments (see environment.d(5)), so it's not obvious as all that /etc/environment assignments can be moved under /etc/environment.d.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/armhf-lxd.userdata b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/armhf-lxd.userdata
2index 06c705f..e64eb8f 100644
3--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/armhf-lxd.userdata
4+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/armhf-lxd.userdata
5@@ -25,7 +25,7 @@ growpart:
6 write_files:
7 - path: /etc/environment
8 content: |
9- PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
10+ PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
11 http_proxy=http://squid.internal:3128
12 https_proxy=http://squid.internal:3128
13 no_proxy=127.0.0.1,127.0.1.1,localhost,localdomain,novalocal,internal,archive.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,10.0.0.0/8

Subscribers

People subscribed via source and target branches