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

Run lintian on Debian packages #1845

Merged
merged 1 commit into from Mar 6, 2024
Merged

Run lintian on Debian packages #1845

merged 1 commit into from Mar 6, 2024

Conversation

legoktm
Copy link
Member

@legoktm legoktm commented Feb 19, 2024

Status

Ready for review

Description

lintian is the Debian package linter and catches a number of things we can improve in our packages. For now I've suppressed everything and annotated them with TODO/FIXME for others to take on or address incrementally.

lintian is run at the end of make build-debs unless the "FAST" environment variable is set. Any warning or error causes the build to fail, but it can be suppressed in the corresponding lintian-overrides file.

Internally there's a bit of work so we can identify the *.changes file that we just built, so we first build into a temporary directory, copy the files into our repository's build, then run lintian in the temporary directory.

Refs #1785.

Test Plan

  • make build-debs passes locally
  • DEBIAN_VERSION=bookworm make build-debs passes locally too
  • FAST=1 make build-debs doesn't run lintian
  • CI passes
  • Infra moving the "Required" label from the now-renamed build-debs2/bullseye job to lintian/bullseye.

Copy link
Member

@cfm cfm left a comment

Choose a reason for hiding this comment

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

  • make build-debs passes locally

Failed with source-is-missing until I deleted:

  • ./client/htmlcov/; and
  • ./target/.

We can't realistically enforce make clean before a local make build-debs. Can we further ignore these transient paths that are generated by other tools?

  • DEBIAN_VERSION=bookworm make build-debs passes locally too
  • FAST=1 make build-debs doesn't run lintian
  • CI passes
  • Infra moving the "Required" label from the now-renamed build-debs2/bullseye job to lintian/bullseye.

I will coordinate this in #infrastructure after approval and before merge.

debian/securedrop-client.lintian-overrides Show resolved Hide resolved
scripts/build-debs.sh Outdated Show resolved Hide resolved
@legoktm
Copy link
Member Author

legoktm commented Mar 5, 2024

We can't realistically enforce make clean before a local make build-debs. Can we further ignore these transient paths that are generated by other tools?

Yes, we can exclude those two paths from the package itself (ideally we'd just do something like git clean -ffdx but that would take away our ability to test uncommitted changes in the packaging workflow, which I think would be more irritating).

@legoktm legoktm force-pushed the lintian branch 2 times, most recently from d0dadb6 to 9c4671f Compare March 5, 2024 01:20
lintian is the Debian package linter and catches a number of things we
can improve in our packages. For now I've suppressed everything and
annotated them with TODO/FIXME for others to take on or address
incrementally.

lintian is run at the end of `make build-debs` unless the "FAST"
environment variable is set. Any warning or error causes the build to
fail, but it can be suppressed in the corresponding lintian-overrides
file. A number of file and directories that may exist in the tree are
excluded from the package build process through d/source/options to
prevent lintian from seeing them.

Internally there's a bit of work so we can identify the *.changes file
that we just built, so we first build into a temporary directory, copy
the files into our repository's build, then run lintian in the temporary
directory.

Refs #1785.
@legoktm
Copy link
Member Author

legoktm commented Mar 5, 2024

OK, files have now been excluded via d/source/options. I also rebased because some new things in the export package needed suppression.

@legoktm legoktm requested a review from cfm March 5, 2024 01:44
Copy link
Member

@cfm cfm left a comment

Choose a reason for hiding this comment

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

Great. Thanks, @legoktm. Approving now; will merge pending consultation in #infrastructure.

@cfm cfm merged commit 024a00e into main Mar 6, 2024
92 checks passed
@cfm cfm deleted the lintian branch March 6, 2024 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants