Skip to content

Fix issues reported by lintian#1253

Open
adombeck wants to merge 20 commits intomainfrom
UDENG-8984-fix-lintian-issues
Open

Fix issues reported by lintian#1253
adombeck wants to merge 20 commits intomainfrom
UDENG-8984-fix-lintian-issues

Conversation

@adombeck
Copy link
Contributor

@adombeck adombeck commented Feb 9, 2026

No description provided.

@adombeck adombeck force-pushed the UDENG-8984-fix-lintian-issues branch 8 times, most recently from df4a7b9 to a6d6a7a Compare February 10, 2026 00:31
@adombeck adombeck force-pushed the UDENG-8984-fix-lintian-issues branch 9 times, most recently from ed5afd3 to dbba07a Compare February 11, 2026 17:39
@adombeck adombeck force-pushed the UDENG-8984-fix-lintian-issues branch 6 times, most recently from 3d782b8 to e27d0a5 Compare February 13, 2026 01:28
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.68%. Comparing base (1b9ea6b) to head (2b93744).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1253      +/-   ##
==========================================
+ Coverage   85.00%   85.68%   +0.67%     
==========================================
  Files         119       99      -20     
  Lines        7669     6685     -984     
  Branches      111      111              
==========================================
- Hits         6519     5728     -791     
+ Misses       1094      901     -193     
  Partials       56       56              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adombeck adombeck force-pushed the UDENG-8984-fix-lintian-issues branch from e27d0a5 to da162eb Compare February 13, 2026 02:08
Fixes the build of the Debian package to fail with:

    dh_missing: warning: usr/bin/docgen exists in debian/tmp but is not installed to anywhere
    dh_missing: error: missing files, aborting
This message is shown during the package build and sounded like an
error, which was confusing.
@adombeck adombeck force-pushed the UDENG-8984-fix-lintian-issues branch 7 times, most recently from 572edcc to 65b1394 Compare February 17, 2026 22:01
@adombeck adombeck marked this pull request as ready for review February 17, 2026 22:05
Also adjusts debian/lrc.config and debian/source/lintian-overrides.

The debian/copyright file was updated with the help of

    decopy --group-by copyright --output debian/copyright --exclude '.*/snapcraft.yaml|debian/.*'

with my decopy fork [1] and a lot of manual adjustments of the result.

[1] https://salsa.debian.org/adombeck/decopy

If you regenerate the copyright file with decopy, check the following:

* The copyright and license of these entries:
  * "Files: *"
  * "Files: pam/integration-tests/pam_mkhomedir/pam_mkhomedir.c"
  * "Files: pam/internal/gdm/extensions/*"
  * "Files: pam/internal/gdm/extensions/gdm-pam-extensions-common.h"
* The "Files: cmd/*" entry should not be removed
* No "Files: vendor/*" entry
* No "Files: vendor_rust/*" entry
* No MIT license, it should be "Expat"
* No BSD or BSD-3 license, it should be "BSD-3-clause"
* No Apache-2.0, it should be "Apache-2"
* No "Comment: Add the corresponding license text here"
* The occurrences of "License: CC0" are probably false positives
* The occurrences of "License: Unlicense" are probably false positives
* Run licenserecon aka lrc
* Rebuild the Debian package and run lintian (both on source and binary
  package)
We are seeing weird lintian behavior along with the output

  N: Some overrides were ignored.
  N: Use --verbose for more information.
Older lintian versions used the silent-on-rules-requires-root tag to
complain when the "Rules-Requires-Root:" field was missing:

  P: authd source: silent-on-rules-requiring-root [debian/control]

That tag was removed in newer lintian versions and replaced with
redundant-rules-requires-root-no-field which checks the opposite, i.e.
that there is *no* "Rules-Requires-Root: no" field.  We comply with the
new lintian versions by not setting the field.

To avoid older lintian versions to fail, we ignore the tag by adding it
to debian/source/lintian-overrides. We only do that on Nobel and Plucky
because the tag was removed in later lintian versions which would cause
lintian to fail with:

    E: authd source: alien-tag silent-on-rules-requiring-root
@adombeck adombeck force-pushed the UDENG-8984-fix-lintian-issues branch from 84d9971 to 3e2cced Compare February 17, 2026 22:33
@adombeck adombeck requested a review from 3v1n0 February 17, 2026 23:14
@@ -3,415 +3,2633 @@ Upstream-Name: authd
Source: https://github.com/canonical/authd

Files: *
Copyright: 2023 Canonical Ltd.
Copy link
Contributor Author

@adombeck adombeck Feb 17, 2026

Choose a reason for hiding this comment

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

@3v1n0 FYI you can ignore the changes to debian/copyright done in 073cc9e because they are overwritten by d49cb08 (in case you review commit by commit, which I recommend because of the explanations in the commit messages)

I kept the commit because it documents what we tried and why I ended up implementing our own tool to generate copyright entries.

Comment on lines +34 to +38
vendor_rust/pin-project/src/lib.rs
vendor_rust/pin-project/examples/enum-default-expanded.rs
vendor_rust/pin-project/examples/enum-default.rs
vendor_rust/pin-project/examples/not_unpin-expanded.rs
vendor_rust/pin-project/examples/not_unpin.rs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, we should be able to just use vendor_rust/pin-project/. Let me try that

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, but also they can be excluded using debian/copyright's file-excluded, no?

Copy link
Contributor Author

@adombeck adombeck Feb 18, 2026

Choose a reason for hiding this comment

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

Oh, we should be able to just use vendor_rust/pin-project/. Let me try that

so that didn't work, even though the comment from /usr/share/lrc/lrc.config says it should:

# Directories identified by trailing slash /
# Entire contents will be (recursively) excluded.
debian/patches/

I'll report that on the Debian bug tracker

Yeah, but also they can be excluded using debian/copyright's file-excluded, no?

I don't know what you mean. debian/copyright has no "file-excluded" stanza

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll report that on the Debian bug tracker

That's https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1128312

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know what you mean. debian/copyright has no "file-excluded" stanza

https://www.debian.org/doc/manuals/debmake-doc/ch08.en.html#files-excluded

Not sure if that applies to uscan only, but in theory it should be to avoid files being included in a tarball and ignore their copyright.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@3v1n0 3v1n0 left a comment

Choose a reason for hiding this comment

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

I went through commits, so some of my review comments are outdated.

However, in general it looks very good and an huge effort.

I checked the generation script but not into full details, but the final result seems acceptable to me, so let's go with this.

# With this approach, libnss is not using soname to track compatibility, so this override is safe.
authd: shared-library-lacks-version usr/lib/*/libnss_authd.so.2 libnss_authd.so

# Static-Built-Using is a valid field introduced in dpkg 1.21.0 but not yet recognized by lintian
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm unsure if archive admins are happy to support something that is meant for 26.04 with code for 24.04, but it should also not be harmful

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's try

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, worth considering adding this to a generic repo, or even ubuntu dev scripts, since we are vendoring more and more these days.

Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering also if some of the reuse tools could help here: https://reuse.software/dev/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I looked into the reuse tool and many other tools, none of which were able to generate correct entries. The reuse tool is only a linter, it can't be used to print the license information it detects.

Comment on lines +34 to +38
vendor_rust/pin-project/src/lib.rs
vendor_rust/pin-project/examples/enum-default-expanded.rs
vendor_rust/pin-project/examples/enum-default.rs
vendor_rust/pin-project/examples/not_unpin-expanded.rs
vendor_rust/pin-project/examples/not_unpin.rs
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, but also they can be excluded using debian/copyright's file-excluded, no?

fi
allow-sudo: true
lintian: --fail-on error,warning,info,pedantic
lintian: --fail-on error,warning,info,pedantic --verbose
Copy link
Contributor

Choose a reason for hiding this comment

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

I hope this does not break the parser for the summary :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

which parser?

Copy link
Contributor

Choose a reason for hiding this comment

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

tar-ignore = */.vscode
tar-ignore = *.so
tar-ignore = *.o
tar-ignore = authd/docs
Copy link
Contributor

Choose a reason for hiding this comment

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

Well, not for now, but the reason would be generating an authd-docs with the HTML files readable locally.

This is more a debian-stuff, that does not make much sense in an online-facing product, but still it's not unusual

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had a discussion the other day regarding a GTK app I co-maintain with a GNOME person who says we should remove the help pages because apparently yelp is not the way to go anymore.

For authd I would find a man page a lot more useful, and from that we can link to the online docs for further information.

Copy link
Contributor

Choose a reason for hiding this comment

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

GNOME person who says we should remove the help pages because apparently yelp is not the way to go anymore.

Yeah, well, gi-codgen format and Biblioteca reader are good alternatives, but anyways, still in debian there are a lot of docs even outside the gnome world.

But again, it was just a note, I don't think anybody of our targets really cares (given that it's quite expected to have the network working with authd anyways).

All the other tools I tried were not able to generate valid entries in
debian/copyright for our vendored dependencies. The tool which came
closest was decopy, but it still required a lot of manual effort to fix
things after running it (see commit message of commit "debian: Update
copyright file") and its output is non-reproducible, so we can't use it
in CI to check if the file needs to be regenerated.

I took time to implement our own script to generate these entries in
debian/copyright for our vendored dependencies.
licensecheck doesn't detect SPDX identifiers so it reports the wrong
license for a lot of files with SPDX identifiers.
We now have a way to automatically generate valid entries for vendored
files in debian/copyright, so now it's an acceptable effort to keep this
file maintained so that licensrecon is happy.
Many of our vendored dependencies do not declare a copyright holder.
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

Comments