debianize: set appropriate Standards-Version for each debian suite

Message ID 20251027115328.97284-1-srinuvasan.a@siemens.com
State Under Review
Headers show
Series debianize: set appropriate Standards-Version for each debian suite | expand

Commit Message

srinuvasan.a Oct. 27, 2025, 11:53 a.m. UTC
From: srinuvasan <srinuvasan.a@siemens.com>

The Standards-Version field in debian/control declares the Debian Policy
version that the package complies with. Currently, the custom source packages
use a hard-coded Standards-Version: 3.9.6, which is obsolete and does not align
with the policies of newer Debian releases

Update the packaging to set the correct Standards-Version dynamically based on
the target Debian suite, ensuring compliance with the appropriate Debian Policy
version for each release.

Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
---
 meta/classes/debianize.bbclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
index 1f54e8f9..0d7b804b 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -83,11 +83,18 @@  deb_create_control[vardeps] += "DEBIANIZE_BUILD_DEPENDS \
                                 DEBIAN_RULES_REQUIRES_ROOT"
 deb_create_control() {
 	# Add Source section
+	case "${BASE_DISTRO_CODENAME}" in
+		buster)   STANDARDS_VERSION="4.3.0" ;;
+		bullseye) STANDARDS_VERSION="4.5.1" ;;
+		bookworm) STANDARDS_VERSION="4.6.2" ;;
+		trixie|sid|*) STANDARDS_VERSION="4.7.2" ;;
+	esac
+
 	cat << EOF > ${S}/debian/control
 Source: ${BPN}
 Section: ${@ deb_list_beautify(d, 'DEBIAN_SECTION')}
 Priority: optional
-Standards-Version: 3.9.6
+Standards-Version: ${STANDARDS_VERSION}
 Maintainer: ${MAINTAINER}
 Build-Depends: ${@ deb_list_beautify(d, 'DEBIANIZE_BUILD_DEPENDS')}
 EOF