public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2] debianize: use debhelper-compat to generate compat file
@ 2024-02-01 10:12 Quirin Gylstorff
  2024-02-15  8:37 ` MOESSBAUER, Felix
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Quirin Gylstorff @ 2024-02-01 10:12 UTC (permalink / raw)
  To: isar-users, felix.moessbauer

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

debhelper supports the versions debhelper-compat (= 9) till
debhelper-compat (= 13).

This patch also adds the variable `DEBIAN_COMPAT` to set the compat
to the desired version.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 meta-isar/conf/distro/raspios-bullseye.conf |  2 ++
 meta-isar/conf/distro/ubuntu-focal.conf     |  2 ++
 meta-isar/conf/distro/ubuntu-jammy.conf     |  2 ++
 meta/classes/debianize.bbclass              | 13 ++-----------
 meta/conf/distro/debian-bookworm.conf       |  2 ++
 meta/conf/distro/debian-bullseye.conf       |  2 ++
 meta/conf/distro/debian-buster.conf         |  2 ++
 meta/conf/distro/debian-sid-ports.conf      |  2 ++
 meta/conf/distro/debian-sid.conf            |  2 ++
 9 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/meta-isar/conf/distro/raspios-bullseye.conf b/meta-isar/conf/distro/raspios-bullseye.conf
index cc64a015..2515f0fd 100644
--- a/meta-isar/conf/distro/raspios-bullseye.conf
+++ b/meta-isar/conf/distro/raspios-bullseye.conf
@@ -25,3 +25,5 @@ THIRD_PARTY_APT_KEYS += "http://archive.raspberrypi.org/debian/raspberrypi.gpg.k
 COMPAT_DISTRO_ARCH:arm64 = "armhf"
 
 DISTRO_GCC = "10"
+
+DEBIAN_COMPAT = "13"
diff --git a/meta-isar/conf/distro/ubuntu-focal.conf b/meta-isar/conf/distro/ubuntu-focal.conf
index 7b400bc7..81728dec 100644
--- a/meta-isar/conf/distro/ubuntu-focal.conf
+++ b/meta-isar/conf/distro/ubuntu-focal.conf
@@ -8,3 +8,5 @@ require conf/distro/ubuntu-common.inc
 BASE_DISTRO_CODENAME = "focal"
 
 DISTRO_GCC = "9"
+
+DEBIAN_COMPAT = "12"
diff --git a/meta-isar/conf/distro/ubuntu-jammy.conf b/meta-isar/conf/distro/ubuntu-jammy.conf
index ce6ae511..afc4a731 100644
--- a/meta-isar/conf/distro/ubuntu-jammy.conf
+++ b/meta-isar/conf/distro/ubuntu-jammy.conf
@@ -8,3 +8,5 @@ require conf/distro/ubuntu-common.inc
 BASE_DISTRO_CODENAME = "jammy"
 
 DISTRO_GCC = "11"
+
+DEBIAN_COMPAT = "13"
diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
index 16f3638d..7de98673 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -10,6 +10,7 @@ DEBIAN_BUILD_DEPENDS ??= ""
 DEBIAN_DEPENDS ??= ""
 DEBIAN_CONFLICTS ??= ""
 DEBIAN_MULTI_ARCH ??= "no"
+DEBIAN_COMPAT ??= "10"
 DESCRIPTION ??= "must not be empty"
 MAINTAINER ??= "Unknown maintainer <unknown@example.com>"
 
@@ -60,19 +61,15 @@ EOF
 	fi
 }
 
-deb_create_compat() {
-	echo 10 > ${S}/debian/compat
-}
 
 deb_create_control() {
-	compat=$( cat ${S}/debian/compat )
 	cat << EOF > ${S}/debian/control
 Source: ${BPN}
 Section: misc
 Priority: optional
 Standards-Version: 3.9.6
 Maintainer: ${MAINTAINER}
-Build-Depends: debhelper (>= ${compat}), ${DEBIAN_BUILD_DEPENDS}
+Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), ${DEBIAN_BUILD_DEPENDS}
 
 Package: ${BPN}
 Architecture: ${DPKG_ARCH}
@@ -103,12 +100,6 @@ EOF
 deb_debianize() {
 	install -m 755 -d ${S}/debian
 
-	# create the compat-file if there is no file with that name in WORKDIR
-	if [ -f ${WORKDIR}/compat ]; then
-		install -v -m 644 ${WORKDIR}/compat ${S}/debian/compat
-	else
-		deb_create_compat
-	fi
 	# create the control-file if there is no control-file in WORKDIR
 	if [ -f ${WORKDIR}/control ]; then
 		install -v -m 644 ${WORKDIR}/control ${S}/debian/control
diff --git a/meta/conf/distro/debian-bookworm.conf b/meta/conf/distro/debian-bookworm.conf
index d0599dc6..ce7279e3 100644
--- a/meta/conf/distro/debian-bookworm.conf
+++ b/meta/conf/distro/debian-bookworm.conf
@@ -15,3 +15,5 @@ DISTRO_KERNELS ?= "4kc-malta 5kc-malta 686-pae 686 alpha-generic alpha-smp \
 	s390x sh7751r sh7785lcr sparc64-smp sparc64"
 
 DISTRO_GCC = "12"
+
+DEBIAN_COMPAT = "13"
diff --git a/meta/conf/distro/debian-bullseye.conf b/meta/conf/distro/debian-bullseye.conf
index 9b76e68a..2cb9d20e 100644
--- a/meta/conf/distro/debian-bullseye.conf
+++ b/meta/conf/distro/debian-bullseye.conf
@@ -12,3 +12,5 @@ DISTRO_KERNELS ?= "4kc-malta 5kc-malta 686 686-pae amd64 arm64 armmp \
     rt-686-pae rt-amd64 rt-arm64 rt-armmp"
 
 DISTRO_GCC = "10"
+
+DEBIAN_COMPAT = "13"
diff --git a/meta/conf/distro/debian-buster.conf b/meta/conf/distro/debian-buster.conf
index 025fc936..57cfac33 100644
--- a/meta/conf/distro/debian-buster.conf
+++ b/meta/conf/distro/debian-buster.conf
@@ -12,3 +12,5 @@ DISTRO_KERNELS ?= "4kc-malta 5kc-malta 686 686-pae amd64 arm64 armmp \
     rt-686-pae rt-amd64 rt-arm64 rt-armmp"
 
 DISTRO_GCC = "8"
+
+DEBIAN_COMPAT = "12"
diff --git a/meta/conf/distro/debian-sid-ports.conf b/meta/conf/distro/debian-sid-ports.conf
index f045a3f2..64f3717e 100644
--- a/meta/conf/distro/debian-sid-ports.conf
+++ b/meta/conf/distro/debian-sid-ports.conf
@@ -25,3 +25,5 @@ THIRD_PARTY_APT_KEYS += "${DEBIAN_PORTS_KEYS}"
 IMAGE_PREINSTALL += "init"
 
 IMAGER_INSTALL:wic += "python3-distutils"
+
+DEBIAN_COMPAT = "13"
diff --git a/meta/conf/distro/debian-sid.conf b/meta/conf/distro/debian-sid.conf
index 631f9b5a..fdf9775c 100644
--- a/meta/conf/distro/debian-sid.conf
+++ b/meta/conf/distro/debian-sid.conf
@@ -19,3 +19,5 @@ DISTRO_KERNELS ?= "4kc-malta 5kc-malta 686-pae 686 alpha-generic alpha-smp \
 	s390x sh7751r sh7785lcr sparc64-smp sparc64"
 
 DISTRO_GCC = "13"
+
+DEBIAN_COMPAT = "13"
-- 
2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-19  9:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-01 10:12 [PATCH v2] debianize: use debhelper-compat to generate compat file Quirin Gylstorff
2024-02-15  8:37 ` MOESSBAUER, Felix
2024-02-16  6:12 ` Uladzimir Bely
2024-02-20 19:07 ` Jan Kiszka
2024-04-17  9:00 ` Florian Bezdeka
2024-04-17 21:16   ` MOESSBAUER, Felix
2024-04-18 12:15     ` Florian Bezdeka
2024-04-19  9:48       ` Gylstorff Quirin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox