Source: u-boot
Followup-For: Bug #1051098

Hello.
Here is an updated version rebased on a609e1d2:

>From 27ec150b506234e1a3e24688ed400627133ab5e2 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <nico...@debian.org>
Date: Sat, 2 Sep 2023 23:24:10 +0200
Subject: Delegate the Built-Using field to the dh-builtusing debhelper tool


diff --git a/debian/control b/debian/control
index 7a6bbc31cc..c6aec92cf6 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Build-Depends:
  bc,
  bison,
  debhelper-compat (= 13),
+ dh-sequence-builtusing,
  flex,
  libpython3-dev:native [linux-any],
  libssl-dev,
@@ -186,7 +187,8 @@ Description: A boot loader for omap systems
 Package: u-boot-sunxi
 Architecture: armhf arm64
 Multi-Arch: same
-Built-Using: ${u-boot-sunxi:Built-Using}
+Built-Using: ${dh-builtusing:arm-trusted-firmware} [arm64],
+ ${dh-builtusing:crust-firmware} [arm64],
 Depends: ${misc:Depends}
 Recommends: u-boot-tools [arm64]
 Suggests: arm-trusted-firmware [arm64]
@@ -240,7 +242,7 @@ Description: A boot loader for marvell systems
 Package: u-boot-rockchip
 Architecture: armhf arm64
 Multi-Arch: same
-Built-Using: ${u-boot-rockchip:Built-Using}
+Built-Using: ${dh-builtusing:arm-trusted-firmware} [arm64]
 Depends: ${misc:Depends}
 Recommends: python3, u-boot-tools [arm64]
 Suggests: arm-trusted-firmware [arm64]
@@ -294,7 +296,7 @@ Package: u-boot-sifive
 Architecture: riscv64
 Multi-Arch: same
 Depends: ${misc:Depends}
-Built-Using: ${u-boot-sifive:Built-Using}
+Built-Using: ${dh-builtusing:opensbi}
 Description: A boot loader for SiFive systems
  Das U-Boot is a cross-platform bootloader for embedded systems,
  used as the default boot loader by several board vendors.  It is
@@ -312,7 +314,7 @@ Package: u-boot-starfive
 Architecture: riscv64
 Multi-Arch: same
 Depends: ${misc:Depends}
-Built-Using: ${u-boot-starfive:Built-Using}
+Built-Using: ${dh-builtusing:opensbi}
 Description: A boot loader for Starfive systems
  Das U-Boot is a cross-platform bootloader for embedded systems,
  used as the default boot loader by several board vendors.  It is
diff --git a/debian/rules b/debian/rules
index fc7c8e54d4..9cc8ee3e52 100755
--- a/debian/rules
+++ b/debian/rules
@@ -159,6 +159,6 @@ override_dh_clean:
        find . -type d -name __pycache__ -delete
 
 override_dh_gencontrol:
-       dh_gencontrol -- $(dpkg-gencontrol_args) $(foreach package,\
+       dh_gencontrol -- $(foreach package,\
          u-boot-qemu $(subarchs),\
          '-V$(package):platforms=$(subst $() 
,$${Newline},$($(package)_platforms))')
diff --git a/debian/targets.mk b/debian/targets.mk
index 12eb78b9b8..f7e10d2ea0 100644
--- a/debian/targets.mk
+++ b/debian/targets.mk
@@ -51,9 +51,6 @@ ifeq (${DEB_HOST_ARCH},arm64)
 
 # u-boot-rockchip
 
-  dpkg-gencontrol_args += "-Vu-boot-rockchip:Built-Using=$(shell dpkg-query 
-Wf \
-    '$${source:Package} (= $${source:Version})' arm-trusted-firmware)"
-
   # Vagrant Cascadian <vagr...@debian.org>
   u-boot-rockchip_platforms += firefly-rk3399
   firefly-rk3399_assigns := BL31=/usr/lib/arm-trusted-firmware/rk3399/bl31.elf
@@ -145,9 +142,6 @@ ifeq (${DEB_HOST_ARCH},arm64)
   u-boot-sunxi_assigns = \
     SCP=$(or $(wildcard /usr/lib/crust-firmware/$(platform).bin),/dev/null)
 
-  dpkg-gencontrol_args += "-Vu-boot-sunxi:Built-Using=$(shell dpkg-query -Wf \
-    '$${source:Package} (= $${source:Version})' arm-trusted-firmware)"
-
   u-boot-sunxi_platforms += a64-olinuxino
   a64-olinuxino_assigns := 
BL31=/usr/lib/arm-trusted-firmware/sun50i_a64/bl31.bin
   a64-olinuxino_targets := arch/arm/dts/sun50i-a64-olinuxino.dtb \
@@ -386,9 +380,6 @@ else ifeq (${DEB_HOST_ARCH},armhf)
 
 # u-boot-rockchip
 
-  # Silent a debhelper warning about an unused substvar.
-  dpkg-gencontrol_args += -Vu-boot-rockchip:Built-Using=
-
   # Vagrant Cascadian <vagr...@debian.org>, 2GB and 4GB variants
   u-boot-rockchip_platforms += firefly-rk3288
   firefly-rk3288_targets := idbloader.img spl/u-boot-spl.bin u-boot.bin \
@@ -423,9 +414,6 @@ else ifeq (${DEB_HOST_ARCH},armhf)
 
 # u-boot-sunxi
 
-  # Silent a debhelper warning about an unused substvar.
-  dpkg-gencontrol_args += -Vu-boot-sunxi:Built-Using=
-
   # Christian Kastner <deb...@kvr.at>
   u-boot-sunxi_platforms += A10-OLinuXino-Lime
   A10-OLinuXino-Lime_targets := u-boot-sunxi-with-spl.bin uboot.elf
@@ -544,9 +532,6 @@ else ifeq (${DEB_HOST_ARCH},riscv64)
 
 # u-boot-sifive
 
-  dpkg-gencontrol_args += "-Vu-boot-sifive:Built-Using=$(shell dpkg-query -Wf \
-    '$${source:Package} (= $${source:Version})' opensbi)"
-
   # Hector Oron <zu...@debian.org>
   u-boot-sifive_platforms += sifive_unleashed
   sifive_unleashed_targets := u-boot.bin uboot.elf spl/u-boot-spl.bin 
u-boot.itb
@@ -559,9 +544,6 @@ else ifeq (${DEB_HOST_ARCH},riscv64)
 
 # u-boot-starfive
 
-  dpkg-gencontrol_args += "-Vu-boot-starfive:Built-Using=$(shell dpkg-query 
-Wf \
-    '$${source:Package} (= $${source:Version})' opensbi)"
-
   # Anatoliy Gunya <csm.su...@gmail.com>
   u-boot-starfive_platforms += starfive_visionfive2
   starfive_visionfive2_targets := u-boot.bin uboot.elf 
spl/u-boot-spl.bin.normal.out u-boot.itb

Reply via email to