Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nthykier opened this issue Jul 25, 2020 · 4 comments

Comments

@nthykier
Copy link

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
Copy link

yurtpage commented Jul 5, 2024

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

@yurtpage
Copy link

yurtpage commented Jul 5, 2024

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
Copy link

yurtpage commented Jul 5, 2024

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
Copy link
Author

nthykier commented Jul 6, 2024

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

ilkermeliksitki added a commit to ilkermeliksitki/mpv-build that referenced this issue Dec 18, 2024
While building the package, by using equivs-build and debian/control
file, I got the following error:

```
root@a625b7a1de7c:/mpv-build# equivs-build --full debian/control
dpkg-buildpackage: info: source package mpv
dpkg-buildpackage: info: source version 1.0
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Kevin Mitchell <[email protected]>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
 debian/rules clean
dh clean
dh: error: Please specify the compatibility level in debian/compat or via Build-Depends: debhelper-compat (= X)
make: *** [debian/rules:3: clean] Error 255
dpkg-buildpackage: error: debian/rules clean subprocess returned exit status 2
Error in the build process: exit status 2
```
Based on the error message, I replaced debian/compat with
debhelper-compate (= 12) in debian/control file. The existing
compat file didn't help to build the package.

[Reference](FooBarWidget/debian-packaging-for-the-modern-developer#8 (comment))

Changes to be committed:
      deleted:    compat
      modified:   control
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants