From: "MOESSBAUER, Felix" <felix.moessbauer@siemens.com>
To: "quirin.gylstorff@siemens.com" <quirin.gylstorff@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: [PATCH] debianize: use debhelper-compat to generate compat file
Date: Thu, 1 Feb 2024 07:26:54 +0000 [thread overview]
Message-ID: <6026083eaaa28853632ec38d361a59a32072a3db.camel@siemens.com> (raw)
In-Reply-To: <20240131161943.3331272-1-Quirin.Gylstorff@siemens.com>
On Wed, 2024-01-31 at 17:08 +0100, 'Quirin Gylstorff' via isar-users
wrote:
> 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.
Hi Quirin,
thanks for bringing this up. In more and more layers we see people
removing the compat file and manually patching the control. This makes
it much easier.
>
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
> meta/classes/debianize.bbclass | 13 ++-----------
> 1 file changed, 2 insertions(+), 11 deletions(-)
>
> 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"
Can we set the default compat version based on the distribution?
E.g. buster: 12, bullseye: 13, bookworm: 13, trixi / sid: 13
Felix
> 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
> --
> 2.43.0
>
--
Siemens AG, Technology
Linux Expert Center
next prev parent reply other threads:[~2024-02-01 7:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 16:08 Quirin Gylstorff
2024-02-01 7:26 ` MOESSBAUER, Felix [this message]
2024-02-01 9:53 ` Gylstorff Quirin
2024-02-01 10:00 ` MOESSBAUER, Felix
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=6026083eaaa28853632ec38d361a59a32072a3db.camel@siemens.com \
--to=felix.moessbauer@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=quirin.gylstorff@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