On 2025-05-30 11:19, Aurelien Jarno wrote:
> control: tag -1 + patch
> 
> 
> Hi,
> 
> On 2025-05-30 09:00, Chris Hofstaedtler wrote:
> > * Theodore Ts'o <ty...@mit.edu> [250530 02:15]:
> > > On Thu, May 29, 2025 at 10:53:20PM +0200, Aurelien Jarno wrote:
> > > > Package: e2fsck-static
> > > > Version: 1.40.4-1
> > > > Severity: serious
> > > > Justification: Policy 7.8
> > > > 
> > > > Dear maintainer,
> > > > 
> > > > The e2fsck-static package provides /usr/sbin/e2fsck.static which is
> > > > statically linked against glibc.
> > > > 
> > > > glibc is mostly is mostly licensed under the LGPL, which requires that
> > > > the full source code of the incorporating binary package be made
> > > > available. According to Debian Policy ยง7.8 [1] such a binary package
> > > > MUST list the glibc source package (and possibly others) in the
> > > > Built-Using: field.
> > > 
> > > Is there an idiomatic way to automatically determine in debian/rules
> > > what version of glib was used to build the binary package, so the
> > > exact version can be specified in Built-Using?
> > 
> > Here's an example I found using codesearch, from the grub package:
> > 
> > https://sources.debian.org/src/grub2/2.12-7/debian/rules/?hl=593#L593
> > 
> > BUILT_USING=$(shell dpkg-query -f '$${source:Package} (= 
> > $${source:Version}), \n' -W liblzo2-dev)
> > 
> > ...
> > 
> > override_dh_gencontrol:
> >     dh_gencontrol -- -VBuilt-Using="$(BUILT_USING)"
> 
> Yep, that's the way to do it, but you also need to define Built-Using in 
> debian/control. Please find attached a full patch to do that.

I have been pointed out at dh-builtusing, which is another way to 
achieve the same result. I have attached a patch with that alternative, 
at the end it's mostly a question of taste.

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                     http://aurel32.net
--- e2fsprogs-1.47.2/debian/control
+++ e2fsprogs-1.47.2/debian/control
@@ -2,7 +2,7 @@
 Section: admin
 Priority: important
 Maintainer: Theodore Y. Ts'o <ty...@mit.edu>
-Build-Depends: dpkg-dev (>= 1.22.5), gettext, texinfo, pkgconf, libarchive-dev <!nocheck>, libfuse3-dev [linux-any kfreebsd-any] <!pkg.e2fsprogs.no-fuse2fs>, debhelper-compat (= 12), dh-exec, libblkid-dev, uuid-dev, m4, udev [linux-any], systemd [linux-any], systemd-dev [linux-any], cron [linux-any], dh-sequence-movetousr
+Build-Depends: dpkg-dev (>= 1.22.5), gettext, texinfo, pkgconf, libarchive-dev <!nocheck>, libfuse3-dev [linux-any kfreebsd-any] <!pkg.e2fsprogs.no-fuse2fs>, debhelper-compat (= 12), dh-exec, libblkid-dev, uuid-dev, m4, udev [linux-any], systemd [linux-any], systemd-dev [linux-any], cron [linux-any], dh-sequence-movetousr, dh-sequence-builtusing
 Rules-Requires-Root: no
 Standards-Version: 4.7.0
 Homepage: http://e2fsprogs.sourceforge.net
@@ -49,6 +49,7 @@
 Priority: optional
 Depends: ${misc:Depends}
 Recommends: sash | bash-static | zsh-static | busybox-static
+Built-Using: ${dh-builtusing:libc-dev-bin}
 Architecture: any
 Description: statically-linked version of the ext2/ext3/ext4 filesystem checker
  This may be of some help to you if your filesystem gets corrupted enough

Reply via email to