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.
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 python3/ dist-packages/ ubuntu_ image/_ _main__ .py", line 341, in main state_machine) python3/ dist-packages/ ubuntu_ image/state. py", line 82, in __next__ python3/ dist-packages/ ubuntu_ image/common_ builder. py", line 337, in populate_ filesystems _populate_ one_volume( name, volume) python3/ dist-packages/ ubuntu_ image/common_ builder. py", line 290, in _populate_ one_volume ownership= True) python3/ dist-packages/ ubuntu_ image/helpers. py", line 233, in mkfs_ext4 python3. 5/contextlib. py", line 59, in __enter__ python3/ dist-packages/ ubuntu_ image/helpers. py", line 207, in mount python3/ dist-packages/ ubuntu_ image/helpers. py", line 115, in run python3. 5/subprocess. py", line 693, in run python3. 5/subprocess. py", line 947, in __init__ signals, start_new_session) python3. 5/subprocess. py", line 1551, in _execute_child _type(errno_ num, err_msg) python2. 7/dist- packages/ lpbuildd/ target/ build_livefs. py", line 161, in run python2. 7/dist- packages/ lpbuildd/ target/ build_livefs. py", line 152, in build run_build_ command( ["lb", "build"], env=base_lb_env) python2. 7/dist- packages/ lpbuildd/ target/ build_livefs. py", line 79, in run_build_command run(args, cwd="/build", **kwargs) python2. 7/dist- packages/ lpbuildd/ target/ lxd.py" , line 490, in run check_call( cmd, **kwargs) python2. 7/subprocess. py", line 541, in check_call ror(retcode, cmd) ubuntu- core', '--env', 'ARCH=amd64', '--', '/bin/sh', '-c', 'cd /build && linux64 lb build']' returned non-zero exit status 1
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/
list(
File "/usr/lib/
step()
File "/usr/lib/
self.
File "/usr/lib/
preserve_
File "/usr/lib/
with mount(img_file) as mountpoint:
File "/usr/lib/
return next(self.gen)
File "/usr/lib/
run('sudo mount -oloop {} {}'.format(img, mountpoint))
File "/usr/lib/
**args)
File "/usr/lib/
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/
restore_
File "/usr/lib/
raise child_exception
FileNotFoundError: [Errno 2] No such file or directory: 'sudo'
Build failed
Traceback (most recent call last):
File "/usr/lib/
self.build()
File "/usr/lib/
self.
File "/usr/lib/
return self.backend.
File "/usr/lib/
subprocess.
File "/usr/lib/
raise CalledProcessEr
CalledProcessError: Command '['lxc', 'exec', 'lp-xenial-amd64', '--env', 'PROJECT=
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