FooBarWidget / debian-packaging-for-the-modern-developer

Debian packaging tutorials for the modern developer
434 stars 70 forks source link

debian/compat can be replaced by debhelper-compat (= 9) with a "new enough" debhelper #8

Open nthykier opened 3 years ago

nthykier commented 3 years ago

In recent versions of debhelper, it has become possible to remove the debian/compat file by replacing it with a Build-Depends: debhelper-compat (= X), where X is the number you would have put in debian/compat (requires debhelper >= 11.3 and X >= 9). This makes packaging feel a bit more "DRY". :)

The existing method still works and is still supported if you are stuck on older versions of debhelper or need older compat versions than 9.

yurtpage commented 4 days ago

So now it's recommended to use the Build-Depends: debhelper-compat (= X) instead of the compact file, right?

yurtpage commented 4 days ago

I removed the compact file and debuild returned an error:

dh: error: Please specify the compatibility level in debian/compat or via Build-Depends: debhelper-compat (= X)

So it looks like this is a default and recommended way now.

yurtpage commented 4 days ago

It would be really good to make the notice and mention the new preferred way in the Debain control files docs here https://www.debian.org/doc/manuals/maint-guide/dother.en.html#compat

nthykier commented 3 days ago

Thanks for flagging that being out of date. I have filed #1075842 to have it updated. :)