* [PATCH] debianize: use debhelper-compat to generate compat file
@ 2024-01-31 16:08 Quirin Gylstorff
2024-02-01 7:26 ` MOESSBAUER, Felix
0 siblings, 1 reply; 4+ messages in thread
From: Quirin Gylstorff @ 2024-01-31 16:08 UTC (permalink / raw)
To: isar-users
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/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"
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] debianize: use debhelper-compat to generate compat file
2024-01-31 16:08 [PATCH] debianize: use debhelper-compat to generate compat file Quirin Gylstorff
@ 2024-02-01 7:26 ` MOESSBAUER, Felix
2024-02-01 9:53 ` Gylstorff Quirin
0 siblings, 1 reply; 4+ messages in thread
From: MOESSBAUER, Felix @ 2024-02-01 7:26 UTC (permalink / raw)
To: quirin.gylstorff, isar-users
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] debianize: use debhelper-compat to generate compat file
2024-02-01 7:26 ` MOESSBAUER, Felix
@ 2024-02-01 9:53 ` Gylstorff Quirin
2024-02-01 10:00 ` MOESSBAUER, Felix
0 siblings, 1 reply; 4+ messages in thread
From: Gylstorff Quirin @ 2024-02-01 9:53 UTC (permalink / raw)
To: Moessbauer, Felix (T CED OES-DE), isar-users
On 2/1/24 08:26, Moessbauer, Felix (T CED OES-DE) wrote:
> 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
I can do we increase the default to 13 and use 12 for buster or each
supported distro separately.
Quirin
>
> 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
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] debianize: use debhelper-compat to generate compat file
2024-02-01 9:53 ` Gylstorff Quirin
@ 2024-02-01 10:00 ` MOESSBAUER, Felix
0 siblings, 0 replies; 4+ messages in thread
From: MOESSBAUER, Felix @ 2024-02-01 10:00 UTC (permalink / raw)
To: quirin.gylstorff, isar-users
On Thu, 2024-02-01 at 10:53 +0100, Gylstorff Quirin wrote:
>
>
> On 2/1/24 08:26, Moessbauer, Felix (T CED OES-DE) wrote:
> > 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
>
> I can do we increase the default to 13 and use 12 for buster or each
> supported distro separately.
The first option seems to be more future proof. At a second thought, it
might be better to just configure the default in the distro config. By
that, we can easily extend this for other debian based distros like
ubuntu.
Felix
>
> Quirin
>
> >
> > 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-01 10:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-31 16:08 [PATCH] debianize: use debhelper-compat to generate compat file Quirin Gylstorff
2024-02-01 7:26 ` MOESSBAUER, Felix
2024-02-01 9:53 ` Gylstorff Quirin
2024-02-01 10:00 ` MOESSBAUER, Felix
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox