Source: u-boot
Severity: wishlist
Tags: patch

Hello.
The following suggestion removes a Debian-specific patch.


>From 1f2cf0d0fd82ce4941111d960e28585f657814d1 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <nico...@debian.org>
Date: Wed, 13 Apr 2022 13:46:54 +0200
Subject: [PATCH] Simplify the parts displaying a Debian-specific revision
 during boot

Use the LOCALVERSION dedicated Kconfig string instead of maintaining a
Debian-specific patch on the upstream Makefile.
The result at boot time should be similar.
---
 .../patches/add-debian-revision-to-u-boot-version  | 14 --------------
 debian/patches/series                              |  2 --
 debian/rules                                       |  5 ++++-
 3 files changed, 4 insertions(+), 17 deletions(-)
 delete mode 100644 debian/patches/add-debian-revision-to-u-boot-version

diff --git a/debian/patches/add-debian-revision-to-u-boot-version 
b/debian/patches/add-debian-revision-to-u-boot-version
deleted file mode 100644
index e6dcdfce23..0000000000
--- a/debian/patches/add-debian-revision-to-u-boot-version
+++ /dev/null
@@ -1,14 +0,0 @@
-Add the debian revision to the U-boot version, which is displayed at
-boot and can be helpful to determine which specific version is used.
-
---- a/Makefile
-+++ b/Makefile
-@@ -447,7 +447,7 @@
- 
- # Read UBOOTRELEASE from include/config/uboot.release (if it exists)
- UBOOTRELEASE = $(shell cat include/config/uboot.release 2> /dev/null)
--UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if 
$(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-+UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if 
$(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)$(DEBIAN_REVISION)
- 
- export VERSION PATCHLEVEL SUBLEVEL UBOOTRELEASE UBOOTVERSION
- export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR
diff --git a/debian/patches/series b/debian/patches/series
index d9683fee22..c85336b306 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,3 @@
-add-debian-revision-to-u-boot-version
-
 tools-generic-builds.patch
 
 mx53loco
diff --git a/debian/rules b/debian/rules
index fed6b6b092..680209f295 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,6 @@ include /usr/share/dpkg/architecture.mk
 include /usr/share/dpkg/pkg-info.mk
 
 DEBIAN_REVISION ?= $(shell echo $(DEB_VERSION) | sed -e 's,.*+dfsg,+dfsg,')
-common_make_args += DEBIAN_REVISION='$(DEBIAN_REVISION)'
 
 include debian/targets.mk
 
@@ -85,6 +84,10 @@ define build_template
          CROSS_COMPILE=$(or $($(platform)_CROSS_COMPILE),$(CROSS_COMPILE)) \
          $($(package)_assigns) $($(platform)_assigns) \
          $(platform)_defconfig
+
+       sed -i '/^CONFIG_LOCALVERSION="/s/"$$$$/$(DEBIAN_REVISION)"/' \
+         debian/build/$(platform)/.config
+
        dh_auto_build -- $(common_make_args) \
          O=debian/build/$(platform) \
          CROSS_COMPILE=$(or $($(platform)_CROSS_COMPILE),$(CROSS_COMPILE)) \
-- 
2.30.2

Reply via email to