[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
This bug was fixed in the package livecd-rootfs - 24.10.28 --- livecd-rootfs (24.10.28) oracular; urgency=medium [ jchittum ] * Explicitly create home directory for buildd system user to avoid issues with installing and running snaps. (LP: #2083240) [ Ćukasz 'sil2100' Zemczak ] * Add comment re: the cohort key in prepare-image. -- Michael Hudson-Doyle Fri, 08 Nov 2024 11:46:38 +1300 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
This bug was fixed in the package livecd-rootfs - 24.04.81 --- livecd-rootfs (24.04.81) noble; urgency=medium * Introduce unminimize as a package in OCI images. (LP: #2078583) livecd-rootfs (24.04.80) noble; urgency=medium * Explicitly create home directory for buildd system user to avoid issues with installing and running snaps. (LP: #2083240) -- Utkarsh Gupta Wed, 20 Nov 2024 15:43:55 +0530 ** Changed in: livecd-rootfs (Ubuntu Noble) Status: Fix Committed => Fix Released ** Changed in: livecd-rootfs (Ubuntu Oracular) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
slightly abbreviated re-verification: 1. checked to ensure commit was not dropped 2. published to my PPA and executed a livefs build on launchpad 3. downloaded the artifact 4. followed comment #10 https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/comments/10 to unpack and repack for an lxc container 5. ensured that `/home/buildd` existed looks like nothing was dropped in the re-upload. ** Tags removed: verification-needed verification-needed-noble ** Tags added: verification-done verification-done-noble -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
Hello John, or anyone else affected, Accepted livecd-rootfs into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd- rootfs/24.04.81 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed- noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed-noble. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Tags removed: verification-done verification-done-noble ** Tags added: verification-needed verification-needed-noble -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
Change has been confirmed with the launchpad team as well. They followed the manual steps above, with a little bit of extra work for containers. for testing a container: 1. download the $ROOTFS.tar.gz 2. untar 3. cd chroot-autobuild 4. tar (thus making the root _not_ chroot-autobuild) 5. image import is the same as above. everything worked for them as well. ** Tags removed: verification-needed verification-needed-noble verification-needed-oracular ** Tags added: verification-done verification-done-noble verification-done-oracular -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
Oracular SRU Testing (long and fiddly): 1. created package using livecd-rootfs source with change (NOTE: This is how livecd-rootfs is utilized in building buildd). utilizes a git build recipe in a private PPA in a restricted group (cloudware) 2. build the image on launchpad: * livefs-owner: cloudware * livefs-name: cpc-development * archive: cloudware/secret-sauce-jchittum * project: ubuntu-base * subproject: buildd * image-target: all 3. Build completed successfully (private link : https://launchpad.net/~cloudware/+livefs/ubuntu/oracular/cpc-development/+build/710527 ) 4. downloaded latest buildd lxd metadata from https://cloud-images.ubuntu.com/buildd/daily/oracular 5. import *-disk1.img into lxc * lxc image import ./oracular-server-cloudimg-amd64-lxd.tar.xz ./public/oracular-server-cloudimg-amd64-disk1.img --alias oracular-buildd-sru-vm 6. launch vm * lxc launch oracular-buildd-sru-vm 7. lxc shell 8. check for buildd homedirectory * $ls -alh /home/buildd . .. * it's there. 9. check for snap install running (this takes further setup) 10. add buildd to sudoers 11. set buildd passwd 12. $ sudo snap install cpc-sbom --edge --classic 2024-11-15T15:56:48Z INFO Waiting for automatic snapd restart... cpc-sbom (edge) 2024.09.17+gitb2edab3 from Canonical Public Clouds (canonical-cpc) installed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
Noble SRU Testing (long and fiddly): 1. created package using livecd-rootfs source with change (NOTE: This is how livecd-rootfs is utilized in building buildd). utilizes a git build recipe in a private PPA in a restricted group (cloudware) 2. build the image on launchpad: * livefs-owner: cloudware * livefs-name: cpc-development * archive: cloudware/secret-sauce-jchittum * project: ubuntu-base * subproject: buildd * image-target: all 3. Build completed successfully (private link : https://launchpad.net/~cloudware/+livefs/ubuntu/noble/cpc-development/+build/709364 ) 4. downloaded latest buildd lxd metadata from https://cloud-images.ubuntu.com/buildd/daily/noble 5. import *-disk1.img into lxc * lxc image import ./noble-server-cloudimg-amd64-lxd.tar.xz ./public/noble-server-cloudimg-amd64-disk1.img --alias noble-buildd-sru-vm 6. launch vm * lxc launch noble-buildd-sru-vm 7. lxc shell 8. check for buildd homedirectory * $ls -alh /home/buildd . .. * it's there. 9. check for snap install running (this takes further setup) 10. add buildd to sudoers 11. set buildd passwd 12. $ sudo snap install cpc-sbom --edge --classic 2024-11-15T15:56:48Z INFO Waiting for automatic snapd restart... cpc-sbom (edge) 2024.09.17+gitb2edab3 from Canonical Public Clouds (canonical-cpc) installed I'll reach out to the buildd team to see if they can consume from either the secret link for a test, or if it's acceptable (for them) to expedite based on this test. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
Hello John, or anyone else affected, Accepted livecd-rootfs into oracular-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd- rootfs/24.10.28 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed- oracular to verification-done-oracular. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-oracular. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Changed in: livecd-rootfs (Ubuntu Oracular) Status: Confirmed => Fix Committed ** Tags added: verification-needed verification-needed-oracular ** Changed in: livecd-rootfs (Ubuntu Noble) Status: Confirmed => Fix Committed ** Tags added: verification-needed-noble -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
livecd-rootfs in Plucky has been accepted, and the latest buildd-daily has the homedir: https://cloud-images.ubuntu.com/buildd/daily/plucky/20241112/ * download the root.tar.gz * untar * $sudo cat etc/passwd buildd:x:2001:2501:Build Daemon user,,,:/home/buildd:/bin/bash * $ls home/ buildd -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
This bug was fixed in the package livecd-rootfs - 25.04.2 --- livecd-rootfs (25.04.2) plucky; urgency=medium * Explicitly create home directory for buildd system user to avoid issues with installing and running snaps. (LP: #2083240) -- jchittum Wed, 06 Nov 2024 07:40:42 -0500 ** Changed in: livecd-rootfs (Ubuntu Plucky) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
** Changed in: livecd-rootfs (Ubuntu Noble) Assignee: (unassigned) => John Chittum (jchittum) ** Changed in: livecd-rootfs (Ubuntu Oracular) Assignee: (unassigned) => John Chittum (jchittum) ** Changed in: livecd-rootfs (Ubuntu Plucky) Assignee: (unassigned) => John Chittum (jchittum) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
** Also affects: livecd-rootfs (Ubuntu Plucky) Importance: Undecided Status: Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: livecd-rootfs (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: livecd-rootfs (Ubuntu Noble) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2083240] Re: buildd system user lacks homedir leading to issues with snaps[and more]
** Description changed: when running a Noble buildd image as a CI runner, the following error occurs ``` Running job phase... Running test:0 cmd_run.go:1129: WARNING: cannot create user data directory: cannot create snap home dir: mkdir /nonexistent: permission denied Sorry, home directories outside of /home needs configuration. See https://forum.snapcraft.io/t/11209 for details. ``` the buildd user is created with the following code in livecd- rootfs/live-build/buildd/02-user.chroot ``` # Create the buildd user and group. addgroup --gid 2501 buildd adduser --system --disabled-password --gecos 'Build Daemon user' \ - --ingroup buildd --uid 2001 --shell /bin/bash buildd + --ingroup buildd --uid 2001 --shell /bin/bash buildd mkdir -p /build/buildd chown buildd:buildd /build/buildd ``` as of 24.04 (maybe earlier), adduser does not create a homedir for system users: > If no home directory is specified, the default home directory for a new system user is /nonexistent. This directory should never exist on any Debian system, and adduser will never create it automatically. on jammy and earlier images, the following ends up the user conf ``` buildd:x:2001:2501:Build Daemon user,,,:/home/buildd:/bin/bash ``` and on 24.04 ``` buildd:x:2001:2501:Build Daemon user,,,:/nonexistent:/bin/bash ``` this is fixed by adding an explicit `--home /home/buildd` to the user creation call + + [ Impact ] + + * Current buildd images are unable to use snaps (and likely other + issues, since it has assumed an existing $HOME) + + * fix has no impact outside buildd, as the fix is only in a buildd hook + + [ Test Plan ] + + * basic testing: + * build image locally + * check the created buildd user does have a homedir + * attempt to install and run a snap + * expanded testing: + * NOTE: this may not be possible, depending on how launchpad is able to consume images. if not possible, do not consider blocking, and instead get sign off from the Launchpad team that the basic testing is acceptable + * build image in launchpad using a PPA of livecd-rootfs + * point launchpad team to build + * consume buildd image from the launchpad build + * execute a build in the qa environment that requires a snap + + [ Where problems could occur ] + + * if the call is incorrect, no homedir will be made and the fix will fail. + * it's livecd-rootfs, so layers and layers of bash. that can always go wrong. + + [ Other Info ] + + * we'll need to expedite as this is causing issues in launchpad + production now. ** Also affects: livecd-rootfs (Ubuntu Noble) Importance: Undecided Status: New ** Also affects: livecd-rootfs (Ubuntu Oracular) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2083240 Title: buildd system user lacks homedir leading to issues with snaps[and more] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2083240/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
