[Bug 1807750] Re: Use of 'sudo' without dependency on 'sudo' package
Robert C Jennings
1807750 at bugs.launchpad.net
Mon Dec 10 18:29:21 UTC 2018
I was verifying bug #1799736 on amd64 with livecd-rootfs 2.408.41 from
-proposed following the test case in that bugs description which
performs a build of ubuntu-core16 snap. My testing diverged from the
test plan in that I was driving livecd-rootfs with ubuntu-old-
fashioned[1] which builds with launchpad-buildd tools in a lxd container
to replicate the buildd environment. In that environment the build fails
due to the lack of 'sudo':
[2018-12-10 18:06:08] lb_build
P: Executing auto/build script.
Fetching core
Fetching pc-kernel
Fetching pc
Warning: for backwards compatibility, `ubuntu-image` falls back to `ubuntu-image snap` if no subcommand is given
-o/--output is deprecated; use -O/--output-dir instead
Crash in state machine
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/ubuntu_image/__main__.py", line 341, in main
list(state_machine)
File "/usr/lib/python3/dist-packages/ubuntu_image/state.py", line 82, in __next__
step()
File "/usr/lib/python3/dist-packages/ubuntu_image/common_builder.py", line 337, in populate_filesystems
self._populate_one_volume(name, volume)
File "/usr/lib/python3/dist-packages/ubuntu_image/common_builder.py", line 290, in _populate_one_volume
preserve_ownership=True)
File "/usr/lib/python3/dist-packages/ubuntu_image/helpers.py", line 233, in mkfs_ext4
with mount(img_file) as mountpoint:
File "/usr/lib/python3.5/contextlib.py", line 59, in __enter__
return next(self.gen)
File "/usr/lib/python3/dist-packages/ubuntu_image/helpers.py", line 207, in mount
run('sudo mount -oloop {} {}'.format(img, mountpoint))
File "/usr/lib/python3/dist-packages/ubuntu_image/helpers.py", line 115, in run
**args)
File "/usr/lib/python3.5/subprocess.py", line 693, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'sudo'
Build failed
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_livefs.py", line 161, in run
self.build()
File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_livefs.py", line 152, in build
self.run_build_command(["lb", "build"], env=base_lb_env)
File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_livefs.py", line 79, in run_build_command
return self.backend.run(args, cwd="/build", **kwargs)
File "/usr/lib/python2.7/dist-packages/lpbuildd/target/lxd.py", line 490, in run
subprocess.check_call(cmd, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['lxc', 'exec', 'lp-xenial-amd64', '--env', 'PROJECT=ubuntu-core', '--env', 'ARCH=amd64', '--', '/bin/sh', '-c', 'cd /build && linux64 lb build']' returned non-zero exit status 1
The rootfs used by the builders does not have 'sudo' installed; python3
-ubuntu-image should have a package dependency on 'sudo' based on this
testing. However, I did install 'sudo' manually in the build environment
and this resulted in a successful build with output in /build of livecd
.ubuntu-core.img.xz, livecd.ubuntu-core.manifest, livecd.ubuntu-core
.model-assertion, and snaps.manifest.
[1] https://github.com/chrisglass/ubuntu-old-fashioned/blob/master/old-
fashioned-image-build
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-image in Ubuntu.
https://bugs.launchpad.net/bugs/1807750
Title:
Use of 'sudo' without dependency on 'sudo' package
Status in ubuntu-image package in Ubuntu:
New
Bug description:
The launchpad builders do not have 'sudo' installed by default. When
attempting to verify bug #1799736 I found that the build would fail
when 'sudo' could not be found. The python3-ubuntu-image package
should depend on 'sudo'
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-image/+bug/1807750/+subscriptions
More information about the foundations-bugs
mailing list