Merge ppa-dev-tools:packaging-debian into ppa-dev-tools:main

Proposed by Bryce Harrington
Status: Merged
Merge reported by: Bryce Harrington
Merged at revision: b08453d9ef3d6f952dfe05586f3a0cff06e77814
Proposed branch: ppa-dev-tools:packaging-debian
Merge into: ppa-dev-tools:main
Diff against target: 190 lines (+96/-6)
9 files modified
debian/changelog (+14/-0)
debian/control (+37/-0)
debian/copyright (+24/-0)
debian/install (+1/-0)
debian/rules (+4/-0)
debian/source/format (+1/-0)
tests/test_result.py (+3/-2)
tests/test_scripts_ppa.py (+9/-1)
tox.ini (+3/-3)
Reviewer Review Type Date Requested Status
Canonical Server Pending
Canonical Server packageset reviewers Pending
Canonical Server Reporter Pending
Review via email: mp+430594@code.staging.launchpad.net

Description of the change

Implementation of the Debian packaging. This successfully produces an installable .deb for me, that sets up a functional /usr/bin/ppa and modules. Broader testing is appreciated of course, but in review I'm hoping for some detailed nitpicking of the packaging itself.

In particular one issue I'm scratching my head over is when running `debuild` I see lintian errors like these::

dpkg-buildpackage: info: full upload; Debian-native package (full source is included)
Now running lintian ppa-dev-tools_0.2.0~focal3_amd64.changes ...
E: ppa-dev-tools: bad-owner-for-doc-file usr/share/doc/ppa-dev-tools/ root/0 != root/root (or 0/0)
E: ppa-dev-tools: bad-owner-for-doc-file usr/share/doc/ppa-dev-tools/changelog.gz root/0 != root/root (or 0/0)
E: ppa-dev-tools: bad-owner-for-doc-file usr/share/doc/ppa-dev-tools/copyright root/0 != root/root (or 0/0)
E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/ 0/1001
E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/bin/ 0/1001
E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/bin/ppa 0/1001
E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/ 0/1001
E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/ 0/1001
E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/dist-packages/ 0/1001
E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/dist-packages/ppa/ 0/1001
E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/dist-packages/ppa/__init__.py 0/1001
E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/dist-packages/ppa/_version.py 0/1001
...

I'm not sure what's causing the group to be set to 1001. The installation still works, and I don't think the group permission should affect anything, but it's definitely incorrect:

  triage-jammy+22.04:~/src/PpaDevTools$ ls -l /usr/bin/ppa
  -rwxr-xr-x 1 root 1001 18303 Sep 21 03:30 /usr/bin/ppa*

I'm going to continue debugging this and get it sorted before landing this branch, but if anyone has advice or knows what's going on it'd be appreciated.

Another question I've pondered is whether to keep the debian packaging on a separate branch and/or repo from the upstream tree, as we do with ordinary upstream packages. However, I'm leaning towards keeping it all in the same repo both for simplicity and to facilitate future release automation via the Makefile (ultimately I'd like to run one command to generate all the various packages).

Although this seems to package 0.2.0 adequately, my intent is to produce a 0.2.1 release that includes this branch as well as the snap branch, to pick up all the documentation and other misc. fixups.

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote (last edit ):

Hey,
FYI building this in sbuild locally as I usually do does NOT show those ownership issues.

The only W I see is
 W: ppa-dev-tools: no-manual-page [usr/bin/ppa]

Which I think you could fix to be warning-free :-)

buildlog: https://paste.ubuntu.com/p/m5DG9mPVf7/

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

On Tuesday, September 27 2022, Bryce Harrington wrote:

> In particular one issue I'm scratching my head over is when running `debuild` I see lintian errors like these::
>
> dpkg-buildpackage: info: full upload; Debian-native package (full source is included)
> Now running lintian ppa-dev-tools_0.2.0~focal3_amd64.changes ...
> E: ppa-dev-tools: bad-owner-for-doc-file usr/share/doc/ppa-dev-tools/ root/0 != root/root (or 0/0)
> E: ppa-dev-tools: bad-owner-for-doc-file usr/share/doc/ppa-dev-tools/changelog.gz root/0 != root/root (or 0/0)
> E: ppa-dev-tools: bad-owner-for-doc-file usr/share/doc/ppa-dev-tools/copyright root/0 != root/root (or 0/0)
> E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/ 0/1001
> E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/bin/ 0/1001
> E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/bin/ppa 0/1001
> E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/ 0/1001
> E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/ 0/1001
> E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/dist-packages/ 0/1001
> E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/dist-packages/ppa/ 0/1001
> E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/dist-packages/ppa/__init__.py 0/1001
> E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/dist-packages/ppa/_version.py 0/1001
> ...

Wild guess here, but maybe you're doing the build inside a container
where your $USER doesn't exist, but where you've mounted your $HOME (or
some of its subdirectories) in order to have access to your project.
Since this directory is externally owned by your $USER, and since $USER
doesn't exist in the container, you end up with files owned by the 1001
UID.

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

Revision history for this message
Bryce Harrington (bryce) wrote :

> On Tuesday, September 27 2022, Bryce Harrington wrote:
>
> > In particular one issue I'm scratching my head over is when running
> `debuild` I see lintian errors like these::
> >
> > dpkg-buildpackage: info: full upload; Debian-native package (full source is
> included)
> > Now running lintian ppa-dev-tools_0.2.0~focal3_amd64.changes ...
> > E: ppa-dev-tools: bad-owner-for-doc-file usr/share/doc/ppa-dev-tools/ root/0
> != root/root (or 0/0)
> > E: ppa-dev-tools: bad-owner-for-doc-file usr/share/doc/ppa-dev-
> tools/changelog.gz root/0 != root/root (or 0/0)
> > E: ppa-dev-tools: bad-owner-for-doc-file usr/share/doc/ppa-dev-
> tools/copyright root/0 != root/root (or 0/0)
> > E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/ 0/1001
> > E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/bin/ 0/1001
> > E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/bin/ppa 0/1001
> > E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/ 0/1001
> > E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/ 0/1001
> > E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/dist-packages/
> 0/1001
> > E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/dist-
> packages/ppa/ 0/1001
> > E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/dist-
> packages/ppa/__init__.py 0/1001
> > E: ppa-dev-tools: wrong-file-owner-uid-or-gid usr/lib/python3/dist-
> packages/ppa/_version.py 0/1001
> > ...
>
> Wild guess here, but maybe you're doing the build inside a container
> where your $USER doesn't exist, but where you've mounted your $HOME (or
> some of its subdirectories) in order to have access to your project.
> Since this directory is externally owned by your $USER, and since $USER
> doesn't exist in the container, you end up with files owned by the 1001
> UID.

Interesting guess, but weirdly it seems the situation is the opposite. I'm doing the devel and packaging in my regular focal desktop ($USER set properly and all) but getting these E's. However, if I do exactly the same but in a jammy or focal LXC container it works fine, no lint E's.

Since I plan to do the official packaging in LXC containers anyway, I guess that's my solution.

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for the feedback, I did some additional debugging and testing and added a few more fixes, and just now landed it:

To git+ssh://git.launchpad.net/ppa-dev-tools
   0ac612e..01fe475 main -> main

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: