8000 Add project detection for Debian packaging directories by DanielG · Pull Request #1657 · bbatsov/projectile · GitHub
[go: up one dir, main page]

Skip to content

Add project detection for Debian packaging directories#1657

Merged
bbatsov merged 1 commit intobbatsov:masterfrom
DanielG:master
May 24, 2021
Merged

Add project detection for Debian packaging directories#1657
bbatsov merged 1 commit intobbatsov:masterfrom
DanielG:master

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.
: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

0