Skip to content

Conversation

@SebKuzminsky
Copy link
Collaborator

This PR fixes building the architecture-specific and architecture-independent debs separately (i.e. dpkg-buildpackage -A and dpkg-buildpackage -B), as apparently the debian.org build infrastructure does but which we do not yet test in any of our CI (PR for this coming soon). This fix just consists of moving some build dependencies from Build-Depends-Independent (used for architecture-independent package builds) to Build-Depends (used for both architecture-independent and architecture-dependent package builds).

At some point we should probably split out the architecture-specific stuff from Build-Depends to Build-Depends-Arch, that's not included here.

This PR also adds linuxcnc-doc-{de,nb}, since we're now building those translated docs and Sid (but not Buster) fails the deb build if those PDFs are installed by the "upstream" build but not included in any packages.

This PR takes care of the last thing I've found so far that needs to be fixed for the next dsc upload to debian.org.

@smoe & @petterreinholdtsen , your feedback on the packaging here is welcome.

@petterreinholdtsen
Copy link
Collaborator

petterreinholdtsen commented Aug 19, 2022 via email

@SebKuzminsky
Copy link
Collaborator Author

Note, adding new binary packages to the linuxcnc source package and uploading it to Debian will require a review by the FTP master group in Debian and send the package into the NEW queue, <URL: https://ftp-master.debian.org/new.html >. This might take a while, and should be taken into account when we plan when to introduce new binary packages.

Ah, I didn't realize that. I just added those debs because the DE and NB translated pdfs get built and installed now, and dh_missing complained that they weren't included in any package. I guess I'm ok with waiting in the NEW queue again (we're not really in a rush to refresh the debs), and I'd also be ok with not adding the new debs yet (and just removing those PDFs from the install directory, which I assume would make dh_missing not complain).

Does anyone have any strong feelings one way or another on this topic?

@petterreinholdtsen
Copy link
Collaborator

petterreinholdtsen commented Aug 20, 2022 via email

@petterreinholdtsen
Copy link
Collaborator

Look like Lintian found some errors:

E: linuxcnc-doc-de: doc-base-file-references-missing-file linuxcnc-doc-de:10 /usr/share/doc/linuxcnc/LinuxCNC_Developer_de.pdf
N: 
N:    One of the files referenced in an Index or Files field in this doc-base
N:    control file does not exist in the package. The doc-base control files
N:    should be installed by the package that provides the documents they are
N:    registering.
N:    
N:    Severity: error
N:    
N:    Check: menus
N: 
E: linuxcnc-doc-de: doc-base-file-references-missing-file linuxcnc-doc-de:10 /usr/share/doc/linuxcnc/LinuxCNC_Documentation_de.pdf
E: linuxcnc-doc-de: doc-base-file-references-missing-file linuxcnc-doc-de:10 /usr/share/doc/linuxcnc/LinuxCNC_Getting_Started_de.pdf
E: linuxcnc-doc-de: doc-base-file-references-missing-file linuxcnc-doc-de:10 /usr/share/doc/linuxcnc/LinuxCNC_Integrator_de.pdf
E: linuxcnc-doc-nb: doc-base-file-references-missing-file linuxcnc-doc-nb:10 /usr/share/doc/linuxcnc/LinuxCNC_Developer_nb.pdf
E: linuxcnc-doc-nb: doc-base-file-references-missing-file linuxcnc-doc-nb:10 /usr/share/doc/linuxcnc/LinuxCNC_Documentation_nb.pdf
E: linuxcnc-doc-nb: doc-base-file-references-missing-file linuxcnc-doc-nb:10 /usr/share/doc/linuxcnc/LinuxCNC_Getting_Started_nb.pdf
E: linuxcnc-doc-nb: doc-base-file-references-missing-file linuxcnc-doc-nb:10 /usr/share/doc/linuxcnc/LinuxCNC_Integrator_nb.pdf

This deb is available on Buster too, so I just added it unconditionally
to the build deps, no debian/configure trickery needed.
The manpages go in linuxcnc-uspace.deb (not in linuxcnc-doc-en), so they
are built with the architecture-dependent ("binary") debs.

Since some manpages are written in asciidoc rather than roff, these
build dependencies are needed in Build-Depends (which is satisfied for
both architecture-dependent and architecture-independent builds), not
just in Build-Depends-Indep.
@SebKuzminsky
Copy link
Collaborator Author

Ok, the current version of this branch (5610245) addresses all raised issues, does not add any new debs, and I believe it will pass all our CI. If it's all green in the morning I'll merge it.

@petterreinholdtsen
Copy link
Collaborator

Look good to me. All green too. :)

@petterreinholdtsen
Copy link
Collaborator

Perhaps we should adjust the github DI to build all and any packages separately, as I tested in commit 2b47bd1? It currently fail.

@petterreinholdtsen
Copy link
Collaborator

When manually upgrading the debs from before the deb rebuild, I get this:

Preparing to unpack .../linuxcnc-doc-en_2.9.0~pre0_all.deb ...
Unpacking linuxcnc-doc-en (1:2.9.0~pre0) over (1:2.9.0~pre0) ...
dpkg: error processing archive /scratch/pere/src/linuxcnc-doc-en_2.9.0~pre0_all.deb (--unpack):
 trying to overwrite '/usr/share/applications/linuxcnc-gcoderef.desktop', which is also in package linuxcnc-uspace 1:2.9.0~pre0
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

I suspect some file moved between packages, and the breaks/replaces/conflicts lines to handle it are missing.

@SebKuzminsky
Copy link
Collaborator Author

trying to overwrite '/usr/share/applications/linuxcnc-gcoderef.desktop', which is also in package linuxcnc-uspace 1:2.9.0~pre0

Hmm, yeah this is an issue when upgrading from debs built from master (on Buster or Bullseye, since master doesn't currently build on Unstable), to debs built from this PR. It's not an issue when upgrading from the current released debs (2.9.0~pre0+git20220402.2500863908-4).

Please note that this issue is not introduced by this current PR, it was introduced in the earlier merge of commit 1ffed0f.

The Replaces/Conflicts in that commit explicitly call out the previous released debs. The problem is that the master branch uses an epoch number (1: 2.9.0~pre0...), and the released debs in debian do not (2.9.0~pre0+git...), so all of "our" debs sort as newer than all of the released debs...

As far as I know there's no way to say "these new debs conflict with all previous debs from master, and with all previous released debs", because "all previous debs from master" will include all released debs ever, now and in the future. Unless we add the epoch number back in to the released debs, which I was told was a no-go from debian.org.

I agree it's unfortunate that debs built by the buildbot from the master branch have this one-time self-conflict, but i don't know how to fix it without messing with how the official debs are numbered. :-(

@SebKuzminsky
Copy link
Collaborator Author

Perhaps we should adjust the github DI to build all and any packages separately, as I tested in commit 2b47bd1? It currently fail.

I am very much in favor of this suggestion, and also would like to extend our Github CI to test on a matrix of distros and hardware architectures, like this:
https://github.com/LinuxCNC/mesaflash/blob/master/.github/workflows/ci.yml#L36-L70

@SebKuzminsky SebKuzminsky merged commit 9780f34 into master Aug 22, 2022
@SebKuzminsky SebKuzminsky deleted the fix-deb-build-again branch August 22, 2022 16:19
@petterreinholdtsen
Copy link
Collaborator

petterreinholdtsen commented Oct 11, 2022 via email

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.

3 participants