public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Zhihang Wei <wzh@ilbers.de>
To: srinuvasan.a@siemens.com, isar-users@googlegroups.com
Cc: jan.kiszka@siemens.com
Subject: Re: [PATCH v6 1/2] debianize: set appropriate Standards-Version for each debian suite
Date: Fri, 7 Nov 2025 14:26:53 +0100	[thread overview]
Message-ID: <e02b3427-d807-4952-b069-4e8642068ce8@ilbers.de> (raw)
In-Reply-To: <20251105101503.283956-1-srinuvasan.a@siemens.com>

Applied to next, thanks.

Best regards,
Zhihang

On 11/5/25 11:15, srinuvasan.a via isar-users wrote:
> 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.
>
> Debian Policy evolves over time, newer versions may add, remove, or deprecate
> control fields and packaging behaviors. Using an outdated Standards-Version
> can miss required or recommended fields, leading to QA or functional issues.
>
> Examples:
> - Rules-Requires-Root (Policy 4.1.0): declares if root privileges are needed
> during debian/rules execution, improves reproducibility and isolation.
> - Homepage (Policy 3.9.3): provides upstream project link for better metadata.
>
> Older Standards-Version(Policy 3.9.6) may trigger lintian warnings such as:
> W: source: missing-rules-requires-root-field
> W: source: missing-homepage-field
>
> Keeping Standards-Version current ensures clean builds, QA compliance,
> and future compatibility.
>
> Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> ---
>   RECIPE-API-CHANGELOG.md                     | 9 +++++++++
>   meta-isar/conf/distro/raspios-bookworm.conf | 2 ++
>   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-isar/conf/distro/ubuntu-noble.conf     | 2 ++
>   meta/classes/debianize.bbclass              | 6 ++++--
>   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 ++
>   meta/conf/distro/debian-trixie.conf         | 2 ++
>   13 files changed, 35 insertions(+), 2 deletions(-)
>
> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
> index 1826667a..34194b39 100644
> --- a/RECIPE-API-CHANGELOG.md
> +++ b/RECIPE-API-CHANGELOG.md
> @@ -242,6 +242,15 @@ consumption by imaging classes.
>   Additional build dependencies of auto-debianized packages can now be defined
>   by setting DEBIAN_BUILD_DEPENDS.
>   
> +### Add DEBIAN_STANDARDS_VERSION as a deb_debianize parameter
> +
> +By default, the Standards-Version field in the debian/control file is automatically
> +set based on the corresponding Debian suite.
> +If you need to override this default value, you can do so by defining
> +the DEBIAN_STANDARDS_VERSION variable in your recipe.
> +
> +E.x: `DEBIAN_STANDARDS_VERSION:<suite-name> = <version>`
> +
>   ### Separation of ${S} and ${D} in dpkg-raw
>   
>   ${S} can now be used for checking out sources without being linked implicitly
> diff --git a/meta-isar/conf/distro/raspios-bookworm.conf b/meta-isar/conf/distro/raspios-bookworm.conf
> index 079dba24..edba011f 100644
> --- a/meta-isar/conf/distro/raspios-bookworm.conf
> +++ b/meta-isar/conf/distro/raspios-bookworm.conf
> @@ -25,3 +25,5 @@ THIRD_PARTY_APT_KEYS += "http://archive.raspberrypi.org/debian/raspberrypi.gpg.k
>   COMPAT_DISTRO_ARCH:arm64 = "armhf"
>   
>   DISTRO_GCC = "12"
> +
> +DEBIAN_STANDARDS_VERSION ?= "4.6.2"
> diff --git a/meta-isar/conf/distro/raspios-bullseye.conf b/meta-isar/conf/distro/raspios-bullseye.conf
> index a362289d..60782f67 100644
> --- a/meta-isar/conf/distro/raspios-bullseye.conf
> +++ b/meta-isar/conf/distro/raspios-bullseye.conf
> @@ -28,3 +28,5 @@ COMPAT_DISTRO_ARCH:arm64 = "armhf"
>   DISTRO_GCC = "10"
>   
>   DEBIAN_COMPAT = "13"
> +
> +DEBIAN_STANDARDS_VERSION ?= "4.5.1"
> diff --git a/meta-isar/conf/distro/ubuntu-focal.conf b/meta-isar/conf/distro/ubuntu-focal.conf
> index 81728dec..155644c1 100644
> --- a/meta-isar/conf/distro/ubuntu-focal.conf
> +++ b/meta-isar/conf/distro/ubuntu-focal.conf
> @@ -10,3 +10,5 @@ BASE_DISTRO_CODENAME = "focal"
>   DISTRO_GCC = "9"
>   
>   DEBIAN_COMPAT = "12"
> +
> +DEBIAN_STANDARDS_VERSION ?= "4.5.0"
> diff --git a/meta-isar/conf/distro/ubuntu-jammy.conf b/meta-isar/conf/distro/ubuntu-jammy.conf
> index afc4a731..492ab126 100644
> --- a/meta-isar/conf/distro/ubuntu-jammy.conf
> +++ b/meta-isar/conf/distro/ubuntu-jammy.conf
> @@ -10,3 +10,5 @@ BASE_DISTRO_CODENAME = "jammy"
>   DISTRO_GCC = "11"
>   
>   DEBIAN_COMPAT = "13"
> +
> +DEBIAN_STANDARDS_VERSION ?= "4.6.0"
> diff --git a/meta-isar/conf/distro/ubuntu-noble.conf b/meta-isar/conf/distro/ubuntu-noble.conf
> index 531f085f..5a9bd100 100644
> --- a/meta-isar/conf/distro/ubuntu-noble.conf
> +++ b/meta-isar/conf/distro/ubuntu-noble.conf
> @@ -10,3 +10,5 @@ BASE_DISTRO_CODENAME = "noble"
>   DISTRO_GCC = "13"
>   
>   DEBIAN_COMPAT = "13"
> +
> +DEBIAN_STANDARDS_VERSION ?= "4.7.0"
> diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
> index 1f54e8f9..e29bfb1e 100644
> --- a/meta/classes/debianize.bbclass
> +++ b/meta/classes/debianize.bbclass
> @@ -17,6 +17,7 @@ DEBIAN_BREAKS ??= ""
>   DEBIAN_BUILT_USING ??= ""
>   DEBIAN_MULTI_ARCH ??= "no"
>   DEBIAN_COMPAT ??= "10"
> +DEBIAN_STANDARDS_VERSION ??= "3.9.6"
>   DEBIAN_CHANGELOG_TIMESTAMP ??= "3600"
>   DEBIAN_RULES_REQUIRES_ROOT ??= ""
>   DESCRIPTION ??= "must not be empty"
> @@ -80,14 +81,15 @@ deb_create_control[vardeps] += "DEBIANIZE_BUILD_DEPENDS \
>                                   DEBIAN_BREAKS \
>                                   DEBIAN_BUILT_USING \
>                                   DEBIAN_CONFLICTS \
> -                                DEBIAN_RULES_REQUIRES_ROOT"
> +                                DEBIAN_RULES_REQUIRES_ROOT \
> +                                DEBIAN_STANDARDS_VERSION"
>   deb_create_control() {
>   	# Add Source section
>   	cat << EOF > ${S}/debian/control
>   Source: ${BPN}
>   Section: ${@ deb_list_beautify(d, 'DEBIAN_SECTION')}
>   Priority: optional
> -Standards-Version: 3.9.6
> +Standards-Version: ${DEBIAN_STANDARDS_VERSION}
>   Maintainer: ${MAINTAINER}
>   Build-Depends: ${@ deb_list_beautify(d, 'DEBIANIZE_BUILD_DEPENDS')}
>   EOF
> diff --git a/meta/conf/distro/debian-bookworm.conf b/meta/conf/distro/debian-bookworm.conf
> index ee8f2ced..fc5fd5cc 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 686-pae amd64 arm64 armmp \
>   DISTRO_GCC = "12"
>   
>   DEBIAN_COMPAT = "13"
> +
> +DEBIAN_STANDARDS_VERSION ?= "4.6.2"
> diff --git a/meta/conf/distro/debian-bullseye.conf b/meta/conf/distro/debian-bullseye.conf
> index ee4ecca2..8bda582a 100644
> --- a/meta/conf/distro/debian-bullseye.conf
> +++ b/meta/conf/distro/debian-bullseye.conf
> @@ -17,3 +17,5 @@ DISTRO_KERNELS ?= "4kc-malta 5kc-malta 686 686-pae amd64 arm64 armmp \
>   DISTRO_GCC = "10"
>   
>   DEBIAN_COMPAT = "13"
> +
> +DEBIAN_STANDARDS_VERSION ?= "4.5.1"
> diff --git a/meta/conf/distro/debian-buster.conf b/meta/conf/distro/debian-buster.conf
> index cd58710b..49a073c6 100644
> --- a/meta/conf/distro/debian-buster.conf
> +++ b/meta/conf/distro/debian-buster.conf
> @@ -13,3 +13,5 @@ DISTRO_KERNELS ?= "686 686-pae amd64 arm64 armmp armmp-lpae cloud-amd64 \
>   DISTRO_GCC = "8"
>   
>   DEBIAN_COMPAT = "12"
> +
> +DEBIAN_STANDARDS_VERSION ?= "4.3.0"
> diff --git a/meta/conf/distro/debian-sid-ports.conf b/meta/conf/distro/debian-sid-ports.conf
> index 940dc051..e141327c 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"
>   
>   DEBIAN_COMPAT = "13"
> +
> +DEBIAN_STANDARDS_VERSION ?= "4.7.2"
> diff --git a/meta/conf/distro/debian-sid.conf b/meta/conf/distro/debian-sid.conf
> index 081ec7b4..c76b15e4 100644
> --- a/meta/conf/distro/debian-sid.conf
> +++ b/meta/conf/distro/debian-sid.conf
> @@ -20,3 +20,5 @@ DISTRO_KERNELS ?= "5kc-malta 686 686-pae alpha-generic alpha-smp amd64 arm64 \
>   DISTRO_GCC = "13"
>   
>   DEBIAN_COMPAT = "13"
> +
> +DEBIAN_STANDARDS_VERSION ?= "4.7.2"
> diff --git a/meta/conf/distro/debian-trixie.conf b/meta/conf/distro/debian-trixie.conf
> index b3677f45..999e38a3 100644
> --- a/meta/conf/distro/debian-trixie.conf
> +++ b/meta/conf/distro/debian-trixie.conf
> @@ -17,3 +17,5 @@ DISTRO_KERNELS ?= "5kc-malta amd64 arm64 armmp armmp-lpae cloud-amd64 \
>   DISTRO_GCC = "14"
>   
>   DEBIAN_COMPAT = "13"
> +
> +DEBIAN_STANDARDS_VERSION ?= "4.7.2"

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/e02b3427-d807-4952-b069-4e8642068ce8%40ilbers.de.

      parent reply	other threads:[~2025-11-07 13:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-05 10:15 srinuvasan.a via isar-users
2025-11-05 10:15 ` [PATCH v6 2/2] meta/*, meta-isar/*: update hardcoded Standards-Version to current policy srinuvasan.a via isar-users
2025-11-05 10:18   ` 'Jan Kiszka' via isar-users
2025-11-07 13:26 ` Zhihang Wei [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e02b3427-d807-4952-b069-4e8642068ce8@ilbers.de \
    --to=wzh@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=srinuvasan.a@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox