Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

debhelper-compat should allow >= relations

562 views
Skip to first unread message

Dima Kogan

unread,
Jul 30, 2022, 2:30:04 PM7/30/22
to
Hi. This probably has been covered before, but it's so consistently
annoying that I'd like to bring it up again.

Currently the Debian build tools strongly encourage packages to have
exactly

Build-Depends: debhelper-compat (= 13)

This works fine if you're building for Debian/sid in 2022. It does not
work in any other context. I have a very common use case: at work I'm
maintaining several APT repos for the packages we use for several
distros (the last few releases of Debian and Ubuntu). The latest Debian
already has the packages in it, so the Build-Depends line is exactly as
above. But this means that building the package for any of the older
releases fails. And if I say something reasonable like

Build-Depends: debhelper-compat (>= 11)

Then this happens when building the package on sid:

dh: warning: Found invalid debhelper-compat relation: debhelper-compat (>= 11)
dh: warning: * Please format the relation as (example): debhelper-compat (= 13)
dh: warning: * Note that alternatives, architecture restrictions, build-profiles etc. are not supported.
dh: warning: * If this is not possible, then please remove the debhelper-compat relation and insert the
dh: warning: compat level into the file debian/compat. (E.g. "echo 13 > debian/compat")
dh: error: Could not parse desired debhelper compat level from relation: debhelper-compat (>= 11)
make: *** [debian/rules:8: clean] Error 255

It isn't helpful. Most packages (including mine) are very vanilla, and
there isn't any difference between debhelper 11 or 12 or 13. I'm having
to patch debian/control every time I do a build, and this isn't a useful
use of my time. Can we please loosen this in some way?

Thanks!

Scott Kitterman

unread,
Jul 30, 2022, 2:40:02 PM7/30/22
to
Is your package compatible with debhelper 14? If so, how do you know?

Scott K

Andrey Rahmatullin

unread,
Jul 30, 2022, 4:20:03 PM7/30/22
to
On Sat, Jul 30, 2022 at 11:15:30AM -0700, Dima Kogan wrote:
> Hi. This probably has been covered before
It wasn't, but it's completely identical to putting 13 into debian/compat,
which never supported >= either.

> This works fine if you're building for Debian/sid in 2022. It does not
> work in any other context. I have a very common use case: at work I'm
> maintaining several APT repos for the packages we use for several
> distros (the last few releases of Debian and Ubuntu). The latest Debian
> already has the packages in it, so the Build-Depends line is exactly as
> above. But this means that building the package for any of the older
> releases fails. And if I say something reasonable like
>
> Build-Depends: debhelper-compat (>= 11)
And the recommendation was always "put 11 into debian/compat if you want
to build on older distros".

> It isn't helpful. Most packages (including mine) are very vanilla, and
> there isn't any difference between debhelper 11 or 12 or 13.
(there can be important changes even in very vanilla packages)

> I'm having to patch debian/control every time I do a build
You presumably also have to patch debian/changelog, and building a single
unchanged (apart from debian/changelog) package for multiple distros is
not going to always work either (even for very vanilla packages, e.g.
because of different versions for versioned B-D in Debian and Ubuntu).

--
WBR, wRAR
signature.asc

Dima Kogan

unread,
Jul 31, 2022, 1:30:03 AM7/31/22
to
Andrey Rahmatullin <wr...@debian.org> writes:

> it's completely identical to putting 13 into debian/compat

Oh. So it is. I vaguely remember that using debian/compat and
"Build-Depends: debhelper" generated some lintian complaints. I don't
see those anymore, though. Is doing something like that frowned-upon?
I'd probably stick with compat level 11 or so.


>> I'm having to patch debian/control every time I do a build
> You presumably also have to patch debian/changelog, and building a single
> unchanged (apart from debian/changelog) package for multiple distros is
> not going to always work either (even for very vanilla packages, e.g.
> because of different versions for versioned B-D in Debian and Ubuntu).

Totally. Yeah. There aren't a huge number of packages here, and there
aren't a ton of people using them. If something breaks, I'll get a bug
report, and I'll fix it. It's well worth it to get APT as a distribution
mechanism.

Thanks much

Andrey Rahmatullin

unread,
Jul 31, 2022, 2:30:03 AM7/31/22
to
On Sat, Jul 30, 2022 at 10:21:06PM -0700, Dima Kogan wrote:
> > it's completely identical to putting 13 into debian/compat
>
> Oh. So it is. I vaguely remember that using debian/compat and
> "Build-Depends: debhelper" generated some lintian complaints.
Using debian/compat and "Build-Depends: debhelper-compat" generates them,
because the latter replaces the former.


--
WBR, wRAR
signature.asc

Dima Kogan

unread,
Jul 31, 2022, 2:10:03 PM7/31/22
to
OK. I'm doing it wrong, then. Thanks for the clarification!
0 new messages