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

Add project detection for Debian packaging directories #1657

Merged
merged 1 commit into from
May 24, 2021

Conversation

DanielG
Copy link
Contributor

@DanielG DanielG commented Mar 7, 2021

This adds project detection for unpacked Debian source packages. We detect
this type by the presence of a debian/control even though technically we
should probably check for all of debian/{rules,contro,changelog}. I found
documenting this too cumbersome so I went with just the control file.

In Debian there's two main (lightweight) ways of building packages:
dpkg-buildpackage and debuild. The latter is pretty much just a wrapper for
the former that also runs static checks across the resulting package.

Developers usually use debuild so that's what we use here. The -uc -us
options we hardcode are extremely common. They disable codesigning which
you'd usually not want to do for a simple developmnet build since it can
always be done using debsign before uploading the package.

Since tests usually run as part of the Debian package build and there isn't
a unified way to run just the tests we don't add a :test command.

Technically there's autopkgtest for running special 'as installed' tests
after the package build, but this requires setting up some virtualisation
drivers beforehand so it doesn't make much sense here either.


  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • The new code is not generating bytecode or M-x checkdoc warnings
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the readme (if adding/changing user-visible functionality)

This adds project detection for unpacked Debian source packages. We detect
this by checking for the presence of a debian/control file even though
technically we should probably check for all of
debian/{rules,contro,changelog}. I found documenting this too cumbersome so
I went with just the control file.

In Debian there's two main (lightweight) ways of building packages:
dpkg-buildpackage and debuild. The latter is pretty much just a wrapper for
the former that also runs static checks across the resulting package.

Developers usually use debuild so that's what we use here. The -uc -us
options we hardcode are extremely common. They disable codesigning which
you'd usually not want to do for a simple developmnet build since it can
always be done using debsign before uploading the package.

Since tests usually run as part of the Debian package build and there isn't
a unified way to run just the tests we don't add a :test command.

Technically there's autopkgtest for running special 'as installed' tests
after the package build, but this requires setting up some virtualisation
drivers beforehand so it doesn't make much sense here either.
@@ -2702,6 +2702,9 @@ test/impl/other files as below:
:compile "bazel build"
:test "bazel test"
:run "bazel run")
(projectile-register-project-type 'debian "debian/control"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like debian-pkg would be a more descriptive name.

@bbatsov bbatsov merged commit 9923c3f into bbatsov:master May 24, 2021
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

Successfully merging this pull request may close these issues.

2 participants