debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #00534
[Bug 2109853] Re: [SRU] Make sbuild usable for 'user@xxxxxxx' users
The issue and fix is in
libsbuild-perl: /usr/share/perl5/Sbuild/Chroot.pm
I had modified that to overcome the issue, but for verification I go back and test proposed.
$ dpkg --verify libsbuild-perl
??5?????? /usr/share/perl5/Sbuild/Chroot.pm
$ sudo apt install --reinstall libsbuild-perl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 86.9 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://de.archive.ubuntu.com/ubuntu noble-updates/main amd64 libsbuild-perl all 0.85.10ubuntu0.1 [86.9 kB]
Fetched 86.9 kB in 0s (603 kB/s)
(Reading database ... 287078 files and directories currently installed.)
Preparing to unpack .../libsbuild-perl_0.85.10ubuntu0.1_all.deb ...
Unpacking libsbuild-perl (0.85.10ubuntu0.1) over (0.85.10ubuntu0.1) ...
Setting up libsbuild-perl (0.85.10ubuntu0.1) ...
$ dpkg --verify libsbuild-perl
Ok, back to the beginning, the issue is present
lappi 10:25:22 ~/work/qemu id
uid=1474078681(christian.ehrhardt@xxxxxxxxxxxxx) gid=1323124718(christian.ehrhardt@xxxxxxxxxxxxx) groups=1323124718(christian.ehrhardt@xxxxxxxxxxxxx),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),100(users),114(lpadmin),127(libvirt),131(sbuild)
lappi 10:25:23 ~/work/qemu DEB_BUILD_OPTIONS="parallel=12" sbuild -Adquesting-amd64 qemu_10.0.0+ds-2ubuntu1~questingppa4.dsc
sbuild (Debian sbuild) 0.85.10ubuntu0.1 (15 December 2024) on lappi
+================================================================================+
| qemu 1:10.0.0+ds-2ubuntu1~questingppa4 (amd64) Thu, 22 May 2025 08:25:28 +0000 |
+================================================================================+
Package: qemu
Version: 1:10.0.0+ds-2ubuntu1~questingppa4
Source Version: 1:10.0.0+ds-2ubuntu1~questingppa4
Distribution: questing-amd64
Machine Architecture: amd64
Host Architecture: amd64
Build Architecture: amd64
Build Type: binary
I: 01launchpad-chroot: [questing-amd64] Processing config
I: 01launchpad-chroot: [questing-amd64] Doesn't exist.
I: NOTICE: Log filtering will replace 'var/run/schroot/mount/questing-amd64-6a1d7c4a-d4ae-42cf-aeda-658446f36322' with '<<CHROOT>>'
Possible unintended interpolation of @canonical in string at -e line 50.
Global symbol "@canonical" requires explicit package name (did you forget to declare "my @canonical"?) at -e line 50.
Execution of -e aborted due to compilation errors.
Keeping session: questing-amd64-6a1d7c4a-d4ae-42cf-aeda-658446f36322
E: Error locking chroot session: skipping qemu
Testing from proposed
$ apt policy libsbuild-perl
libsbuild-perl:
Installed: 0.85.10ubuntu0.1
Candidate: 0.85.10ubuntu0.1
Version table:
0.85.10ubuntu0.2 100
100 http://de.archive.ubuntu.com/ubuntu noble-proposed/main amd64 Packages
*** 0.85.10ubuntu0.1 500
500 http://de.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
100 /var/lib/dpkg/status
0.85.7 500
500 http://de.archive.ubuntu.com/ubuntu noble/main amd64 Packages
Installing from proposed
lappi 10:28:37 ~/work/qemu sudo apt install libsbuild-perl/noble-proposed sbuild/noble-proposed
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Selected version '0.85.10ubuntu0.2' (Ubuntu:24.04/noble-proposed [all]) for 'libsbuild-perl'
Selected version '0.85.10ubuntu0.2' (Ubuntu:24.04/noble-proposed [all]) for 'sbuild'
Suggested packages:
default-mta | mail-transport-agent deborphan
The following packages will be upgraded:
libsbuild-perl sbuild
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 174 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://de.archive.ubuntu.com/ubuntu noble-proposed/main amd64 sbuild all 0.85.10ubuntu0.2 [87.0 kB]
Get:2 http://de.archive.ubuntu.com/ubuntu noble-proposed/main amd64 libsbuild-perl all 0.85.10ubuntu0.2 [87.1 kB]
Fetched 174 kB in 0s (569 kB/s)
(Reading database ... 287078 files and directories currently installed.)
Preparing to unpack .../sbuild_0.85.10ubuntu0.2_all.deb ...
Unpacking sbuild (0.85.10ubuntu0.2) over (0.85.10ubuntu0.1) ...
Preparing to unpack .../libsbuild-perl_0.85.10ubuntu0.2_all.deb ...
Unpacking libsbuild-perl (0.85.10ubuntu0.2) over (0.85.10ubuntu0.1) ...
Setting up libsbuild-perl (0.85.10ubuntu0.2) ...
Setting up sbuild (0.85.10ubuntu0.2) ...
usermod: unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password.
Processing triggers for man-db (2.12.0-4build2) ...
Testing again
lappi 10:28:49 ~/work/qemu DEB_BUILD_OPTIONS="parallel=12" sbuild -Adquesting-amd64 qemu_10.0.0+ds-2ubuntu1~questingppa4.dsc
sbuild (Debian sbuild) 0.85.10ubuntu0.2 (02 May 2025) on lappi
+================================================================================+
| qemu 1:10.0.0+ds-2ubuntu1~questingppa4 (amd64) Thu, 22 May 2025 08:29:06 +0000 |
+================================================================================+
Package: qemu
Version: 1:10.0.0+ds-2ubuntu1~questingppa4
Source Version: 1:10.0.0+ds-2ubuntu1~questingppa4
Distribution: questing-amd64
Machine Architecture: amd64
Host Architecture: amd64
Build Architecture: amd64
Build Type: binary
I: 01launchpad-chroot: [questing-amd64] Processing config
I: 01launchpad-chroot: [questing-amd64] Doesn't exist.
I: NOTICE: Log filtering will replace 'var/run/schroot/mount/questing-amd64-471f4b5b-1a3d-4c48-b37a-2e3c24c644bb' with '<<CHROOT>>'
I: NOTICE: Log filtering will replace 'build/qemu-A7EBmc/resolver-vMpCAn' with '<<RESOLVERDIR>>'
+------------------------------------------------------------------------------+
| Update chroot Thu, 22 May 2025 08:29:08 +0000 |
+------------------------------------------------------------------------------+
Get:1 http://archive.ubuntu.com/ubuntu questing InRelease [249 kB]
Get:2 http://security.ubuntu.com/ubuntu questing-security InRelease [110 kB]
Get:3 http://archive.ubuntu.com/ubuntu questing/main Sources [1387 kB]
Get:4 http://archive.ubuntu.com/ubuntu questing/universe Sources [21.3 MB]
Get:5 http://archive.ubuntu.com/ubuntu questing/multiverse Sources [309 kB]
Get:6 http://archive.ubuntu.com/ubuntu questing/universe amd64 Packages [16.5 MB]
Get:7 http://archive.ubuntu.com/ubuntu questing/main amd64 Packages [1446 kB]
Get:8 http://archive.ubuntu.com/ubuntu questing/multiverse amd64 Packages [273 kB]
Fetched 41.5 MB in 2s (22.8 MB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+------------------------------------------------------------------------------+
| Fetch source files Thu, 22 May 2025 08:29:11 +0000 |
+------------------------------------------------------------------------------+
Local sources
-------------
/home/christian.ehrhardt@xxxxxxxxxxxxx/work/qemu/qemu_10.0.0+ds-2ubuntu1~questingppa4.dsc exists in /home/christian.ehrhardt@xxxxxxxxxxxxx/work/qemu; copying to chroot
I: NOTICE: Log filtering will replace 'build/qemu-A7EBmc/qemu-10.0.0+ds' with '<<PKGBUILDDIR>>'
I: NOTICE: Log filtering will replace 'build/qemu-A7EBmc' with '<<BUILDDIR>>'
+------------------------------------------------------------------------------+
| Install package build dependencies Thu, 22 May 2025 08:29:11 +0000 |
+------------------------------------------------------------------------------+
Setup apt archive
-----------------
...
Things now work fine, verified on Noble
** Tags removed: verification-needed-noble
** Tags added: verification-done-noble
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to sbuild in Ubuntu.
https://bugs.launchpad.net/bugs/2109853
Title:
[SRU] Make sbuild usable for 'user@xxxxxxx' users
Status in sbuild package in Ubuntu:
Fix Released
Status in sbuild source package in Noble:
Fix Committed
Status in sbuild source package in Oracular:
In Progress
Status in sbuild source package in Plucky:
Fix Committed
Bug description:
[Impact]
With the increasing adoption of tools like authd, it's very likely
that Linux desktop users in corporate environments end up with their
usernames like 'user@xxxxxxx', what doesn't play nice with
sbuild/schroot. Without properly escaping the username, the '@'
character ends up being interpreted as a string interpolation what
breaks the lock_chroot() subroutine.
Fore more information about the issue, please check the upstream bug:
https://salsa.debian.org/debian/sbuild/-/issues/4
[ Test plan ]
1. Make sure to have a user account containing the '@' character in its name, such as 'user@xxxxxxx'.
2. Make sure to have a schroot environment ready. `mk-sbuild oracular` for example to create one for oracular. Note: the mk-sbuild command is provided by the ubuntu-dev-tools package, so make sure to have it installed.
3. Retrieve the sources of a simple package: `pull-lp-source hello noble`
4. Build the binary package with sbuild: `cd hello-2.10/ && sbuild -d noble-amd64` (adjust the schroot environment name according to your computer's architecture)
Expected results without the patches herein proposed is a failure
like:
```
I: NOTICE: Log filtering will replace 'var/run/schroot/mount/plucky-amd64-c9a17ed0-5932-4df1-ad6e-d4df512a37b0' with '<<CHROOT>>'
Possible unintended interpolation of @org in string at -e line 50.
Global symbol "@org" requires explicit package name (did you forget to declare "my @org"?) at -e line 50.
Execution of -e aborted due to compilation errors.
E: Error locking chroot session: skipping livecd-rootfs
```
Building the package should proceed normally with the patches applied.
[ Where problems could occur ]
The scope of the changes herein proposed is so small and self-contained that I
don't expect any issues arising from it under any circumstances.
[ Other Info ]
I'm skipping 'Questing', as I expect it to receive the fix via debian merges,
sbuild version 0.89.2 (just accepted into Debian unstable) contains this patch (alongside other stuff).
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sbuild/+bug/2109853/+subscriptions