sbuild breaks lp-buildd with symlinks to .dsc files

Bug #1976257 reported by Dave Jones
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sbuild (Debian)
Fix Released
Unknown
sbuild (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

We're currently carrying a delta in our sbuild which reverts a commit in the upstream [1] which purports to fix a bug [2]. There's no bug associated with this delta, which allegedly fixes a build failure in lp-buildd. The delta in question is documented under d/p/abs-path-revert.patch (I say "documented" as sbuild is a native package, so the patch itself does nothing more than document the delta that exists in the base tar-ball), and contains:

--- a/bin/sbuild
+++ b/bin/sbuild
@@ -84,10 +84,6 @@ sub main () {
  my $jobname = $ARGV[0];
  my $source_dir = 0;

- if (-e $jobname) {
- $jobname = abs_path($jobname);
- }
-
  if (-d $jobname) {
      $jobname = create_source_package($jobname);
      if ($jobname eq '.') {
@@ -171,6 +167,7 @@ sub main () {

 sub create_source_package ($) {
     my $dsc = shift;
+ $dsc = abs_path($dsc);

     open(my $pipe, '-|', 'dpkg-parsechangelog',
   '-l' . $dsc . '/debian/changelog')

Despite digging around the bug and code history of lp-buildd around the time the sbuild patch was introduced, I've come up empty for additional information on why this change was introduced. As requested in the merge LP: #1974177, I'm filing this bug largely to try and track whether this delta is still required.

We could simply remove the patch and "see what happens" but I'm reluctant to do that given the potentially wide-ranging breakage that could result. Ideally, this needs some more in-depth investigation by someone either more familiar with lp-buildd, or the time to set up a local test environment to determine whether we should still be carrying this patch.

[1]: https://salsa.debian.org/debian/sbuild/-/commit/d15d5ea67b81cde811207ff6853b381c3ebe4b41
[2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801436

Revision history for this message
Benjamin Drung (bdrung) wrote :

The changelog entry that introduces this changes says: abs-path-revert.patch: Revert upstream commit that breaks lp-buildd by causing symlinks to files not ending in .dsc to no longer be buildable.

I was able to reproduce the problem:

pull-debian-source -d distro-info 1.1
mv distro-info_1.1.dsc distro-info_1.1_with_diffent_ending.txt
ln -s distro-info_1.1_with_diffent_ending.txt distro-info_1.1.dsc
sbuild -d unstable distro-info_1.1.dsc

abs_path() expands jobname from 'distro-info_1.1.dsc' to '/full/path/to/distro-info_1.1_with_diffent_ending.txt'. Then it tries to fetch that source file (instead of using it as dsc file).

Changed in sbuild (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.2 KiB)

This bug was fixed in the package sbuild - 0.83.1ubuntu1

---------------
sbuild (0.83.1ubuntu1) kinetic; urgency=medium

  * Merge from Debian unstable (LP: #1974177). Remaining changes:
    - d/t/control: add isolation-machine to the test flags
    - no-pkg-mangle-deps.patch: Set NO_PKG_MANGLE=1 when building dummy
      packages, as pkgbinarymangler's dpkg-deb expects to be run from a source
      package.
    - abs-path-revert.patch: Revert upstream commit that breaks lp-buildd by
      causing symlinks to files not ending in .dsc to no longer be buildable.
      (LP: #1976257)
    - debian/tests/control: Skip unshare-qemuwrapper test where linux-image-
      amd64 is missing. It is missing in Ubuntu making the test fail.
    - debian/tests/unshare: Run the test, but skip it if user namespaces are
      not supported
    - debian/tests/unshare*: Test with current release
  * Removed obsolete patches/changes:
    - debian/tests/control: Don't depend on linux-image-amd64 package
      It does not exist on Ubuntu.
    - debian/tests/unshare-qemuwrapper: Don't use linux-image-amd64 package in
      bootrstrapping test on Ubuntu
    - debian/tests/unshare-qemuwrapper: Drop delta
  * Fix the unshare tests
    - Make dscverify available by adding devscripts to EXTRA_DEPS
    - Ensure dscverify tests actually run by re-writing verify()
    - Remove the release=unstable check (there's no reason we shouldn't
      check the orig-tarball and deb output)
    - unshare test requires isolation-machine to execute
  * Fix build-procenv to work under Ubuntu by removing unstable deb-src
    reference
  * Fix the diffoscope tests
    - Change the expected .deb output to match xz or zstd compression
    - Use "unstable" as d/changelog release name so the test can remain
      static across releases
    - Patch umask differences otherwise diffoscope barfs on differing group
      modes in the generated orig-tar

sbuild (0.83.1) unstable; urgency=medium

  [ Johannes Schauer Marin Rodrigues ]
  * bin/sbuild-cross-resolver: we don't need the English module (closes:
    #1005957)
  * debian/tests/unshare: run with -x
  * lib/Sbuild/Utility.pm: add warning about missing libwww-perl (closes:
    #1009859)

  [ Jochen Sprickerhof ]
  * lib/Sbuild/ChrootUnshare.pm: mkdir for bind mounts

  [ Daniel Kahn Gillmor ]
  * Use --batch with gpg when importing secret key (Closes: #1010171)

sbuild (0.83.0) unstable; urgency=medium

  * sbuild-qemu (package):
    - Support for new architectures: armhf, arm64, ppc64el
    - Move vmdb2 to Depends
    - Depend on autopkgtest (>= 5.17~)
  * sbuild-qemu:
    - Fix looking for images when --arch was specified
    - sbuild-qemu: rename --ram to --ram-size. This matches the
      autopkgtest-virt-qemu option
    - Reduce default CPU count to 2, rather than equal to host cores. This is
      more likely to work on all platforms
  * sbuild-qemu-create:
    - Update shared dir setup (deprecated QEMU syntax). Existing images will no
      longer work and will need to be recreated
  * sbuild-qemu-update:
    - Fix QEMU launch issues (network, serial)
    - Reduce memory requirement. 1GiB is sufficient for apt-get operations
  * sbuild-qe...

Read more...

Changed in sbuild (Ubuntu):
status: New → Fix Released
Changed in sbuild (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.