Convenience script schroot failed on Debian Bookworm
Starting with generic cloud image (https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2)
Console output
debian@server:~/pulseaudio-module-xrdp$ scripts/install_pulseaudio_sources_apt_wrapper.sh
- Need to install packages : debootstrap schroot
These can be removed when this script completes with:-
sudo apt-get purge debootstrap schroot && apt-get autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
arch-test libboost-program-options1.74.0 schroot-common
Suggested packages:
squid-deb-proxy-client ubuntu-archive-keyring aufs-tools | unionfs-fuse btrfs-progs lvm2 qemu-user-static
zfsutils-linux
The following NEW packages will be installed:
arch-test debootstrap libboost-program-options1.74.0 schroot schroot-common
0 upgraded, 5 newly installed, 0 to remove and 26 not upgraded.
Need to get 1065 kB of archives.
After this operation, 5974 kB of additional disk space will be used.
Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [30 B]
Get:2 https://deb.debian.org/debian bookworm/main amd64 libboost-program-options1.74.0 amd64 1.74.0+ds1-21 [329 kB]
Get:3 https://deb.debian.org/debian bookworm/main amd64 schroot-common all 1.6.13-3 [73.7 kB]
Get:4 https://deb.debian.org/debian bookworm/main amd64 schroot amd64 1.6.13-3+b2 [606 kB]
Get:5 https://deb.debian.org/debian bookworm/main amd64 arch-test all 0.20-1 [12.4 kB]
Get:6 https://deb.debian.org/debian bookworm/main amd64 debootstrap all 1.0.128+nmu2+deb12u1 [45.0 kB]
Fetched 1065 kB in 0s (19.3 MB/s)
Preconfiguring packages ...
Selecting previously unselected package libboost-program-options1.74.0:amd64.
(Reading database ... 155395 files and directories currently installed.)
Preparing to unpack .../libboost-program-options1.74.0_1.74.0+ds1-21_amd64.deb ...
Unpacking libboost-program-options1.74.0:amd64 (1.74.0+ds1-21) ...
Selecting previously unselected package schroot-common.
Preparing to unpack .../schroot-common_1.6.13-3_all.deb ...
Unpacking schroot-common (1.6.13-3) ...
Selecting previously unselected package schroot.
Preparing to unpack .../schroot_1.6.13-3+b2_amd64.deb ...
Unpacking schroot (1.6.13-3+b2) ...
Selecting previously unselected package arch-test.
Preparing to unpack .../arch-test_0.20-1_all.deb ...
Unpacking arch-test (0.20-1) ...
Selecting previously unselected package debootstrap.
Preparing to unpack .../debootstrap_1.0.128+nmu2+deb12u1_all.deb ...
Unpacking debootstrap (1.0.128+nmu2+deb12u1) ...
Setting up debootstrap (1.0.128+nmu2+deb12u1) ...
Setting up libboost-program-options1.74.0:amd64 (1.74.0+ds1-21) ...
Setting up schroot-common (1.6.13-3) ...
Setting up arch-test (0.20-1) ...
Setting up schroot (1.6.13-3+b2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/schroot.service → /lib/systemd/system/schroot.service.
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u7) ...
- Creating bookworm build root. Log file in /var/tmp/pa-build-debian-debootstrap.log
- Creating schroot config file /etc/schroot/chroot.d/pa-build-debian.conf
- Copying /etc/apt/sources.list to the root
- Creating the build directory /build
- Copying the wrapped script to the build directory
- Building PA sources. Log file in /var/tmp/pa-build-debian-schroot.log
** schroot failed. Check log file /var/tmp/pa-build-debian-schroot.log
Schroot log
$ cat /var/tmp/pa-build-debian-schroot.log
Reading package lists...
Reading package lists...
Building dependency tree...
E: Unable to locate package sudo
E: Unable to locate package lsb-release
/bin/sh: 1: cannot create /etc/sudoers.d/nopasswd-debian: Directory nonexistent
chmod: cannot access '/etc/sudoers.d/nopasswd-debian': No such file or directory
/build/wrapped_script: 55: lsb_release: not found
/build/wrapped_script: 55: lsb_release: not found
Sudo and lsb-release are confirmed to be installed. Running script as debian user, but I do not get prompted for sudo password.
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
$ ls -lah /usr/bin/sudo
-rwsr-xr-x 1 root root 276K Jun 27 2023 /usr/bin/sudo
$ ls -lah /bin/lsb_release
-rwxr-xr-x 1 root root 2.6K Sep 26 2022 /bin/lsb_release
$ sudo apt install sudo
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
sudo is already the newest version (1.9.13p3-1+deb12u1).
0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
$ sudo apt install lsb-release
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
lsb-release is already the newest version (12.0-1).
0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
The schroot log looks similar to this issue, however I am using the latest: https://github.com/neutrinolabs/pulseaudio-module-xrdp/issues/73
Any help appreciated, not sure where to look next. Thanks
Looks like #106
Are you using the latest version from git (not the release?)
Hi yes I am pulling with git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
I can see that the script has 106 merged in:
cat scripts/install_pulseaudio_sources_apt_wrapper.sh | grep "apt-get update"
$schroot -u root -- apt-get update
I'm out of ideas then.
I'll try to reproduce this and get back to you.
Just to follow up on this, the non-wrapper script worked fine. Is the wrapper just to clean up build dependencies afterwards? I am working on a VM for a specific project so this is not a problem for me.
I noticed some comments in https://github.com/neutrinolabs/pulseaudio-module-xrdp/issues/85 having a similar issue but they did not mention what OS.
Anyway, it is working nicely. Pulseaudio is no longer included with GNOME by default so the only other steps needed were to install it and start that service.
Yes - the wrapper is just to clean up dependencies afterwards.
Potential fix here:-
https://github.com/matt335672/pulseaudio-module-xrdp/blob/support_bookworm_cloud_img/scripts/install_pulseaudio_sources_apt_wrapper.sh
I'll do some more testing before I release this, but it seem to work OK for me on the Debian 12 cloud image.
Confirmed working. Thanks!