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

Update debian packaging #1887

Merged
merged 20 commits into from
Aug 17, 2022
Merged

Update debian packaging #1887

merged 20 commits into from
Aug 17, 2022

Conversation

SebKuzminsky
Copy link
Collaborator

This fixes packaging on Debian Unstable:

  • Split the package build & install for architecture-specific vs architecture-independent packages, as required by Debian's build infrastructure. This includes some support in src/Makefile, but the common build targets used by humans (i.e. make and make docs) are unchanged.
  • Move the G-code quick ref html files (and their .desktop files) from the linuxcnc-uspace package to the linuxcnc-doc-* packages. This is required now that the quick ref translations are generated as part of the architecture-independent build (docs), not the architecture-specific (binary) build.
  • Likewise, move the LinuxCNC Developer's Guide from linuxcnc-uspace-dev to linuxcnc-doc-en, for the same reason.
  • Switch debian/rules to rely more on the debhelper tools, and do less "by hand".
  • Fix a bug in debian/rules that made it accidentally rebuild stuff it had just built...
  • Minor simplifications to debian/configure (just because I happened to be in the neighborhood)

This PR (or something like it) is needed for the next dsc upload to debian.org. I'd appreciate feedback from folks who know debian packaging (@smoe, @petterreinholdtsen, @jepler, and anyone else with input).

Copy link
Contributor

@jepler jepler left a comment

Choose a reason for hiding this comment

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

With my hat of someone who uses "run in place" I don't have any concerns about this.

I didn't look quite so carefully at e.g., the debian/rules changes but the build system should exercise that pretty well.

@petterreinholdtsen
Copy link
Collaborator

petterreinholdtsen commented Jul 30, 2022 via email

debian/.gitignore Outdated Show resolved Hide resolved
debian/configure Show resolved Hide resolved
debian/extras/etc /
debian/extras/lib /

debian/extras/usr/share/icons usr/share
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to specify linuxcncicon.svg (and linux-logo.svg , not sure if this is used anywhere). Then you could include the other icons in their respective documentation packages. That would solve #1655

Comment on lines 121 to 122
MAIN_PACKAGE_NAME=linuxcnc-uspace
OTHER_MAIN_PACKAGE_NAME=linuxcnc
Copy link
Contributor

Choose a reason for hiding this comment

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

If your already in and removing things, MAIN_PACKAGE_NAME, and OTHER_MAIN_PACKAGE_NAME is duplicated.

@petterreinholdtsen
Copy link
Collaborator

petterreinholdtsen commented Jul 30, 2022 via email

@smoe
Copy link
Contributor

smoe commented Aug 1, 2022

The build failure is

../docs/src/Submakefile:761: *** Cannot build documents, missing AsciiDoc or some other required program, or explicitly disabled in configure.  Stop.

which looks like a missing build dependency?

Copy link
Contributor

@smoe smoe left a comment

Choose a reason for hiding this comment

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

A comment on the explicit debian/*install files: Cannot we somehow use wildcards, still? Or just specify the directory only? If we cannot make it simpler than what d/rules implemented before then we are doing something wrong somewhere.

@petterreinholdtsen
Copy link
Collaborator

The reason all the bin/ files are listed explicitly, if I am not mistaken, is that one of them should go in one package (halcompile), and the rest in another. Any idea how to do this with wildcards?

@smoe
Copy link
Contributor

smoe commented Aug 3, 2022

If dh_install would work like the IP routing then it would notice the more detailed instruction for halcompile :) Is the order important in install file? Not aware of those semantics, I would move halcompile in d/rules as an exception, I think.

@SebKuzminsky
Copy link
Collaborator Author

The reason all the bin/ files are listed explicitly, if I am not mistaken, is that one of them should go in one package (halcompile), and the rest in another. Any idea how to do this with wildcards?

Yeah, that's right: usr/bin/halcompile belongs in linuxcnc-uspace-dev, everything else in usr/bin/* belongs in linuxcnc-uspace (and likewise with the manpages).

This is one way in which the now-deprecated dh_movefiles was easier to use - you could explicitly move halcompile to linuxcnc-uspace-dev, then move * (i.e. everything else) to linuxcnc-uspace.

@SebKuzminsky
Copy link
Collaborator Author

looks like a missing build dependency?

Looks like that, but it was actually me breaking the relationship between the default and docs make targets, resulting in a confusing error message. Fixed now.

@silopolis
Copy link
Contributor

silopolis commented Aug 7, 2022 via email

@smoe
Copy link
Contributor

smoe commented Aug 7, 2022

I'd suggest a backport.

@silopolis
Copy link
Contributor

silopolis commented Aug 7, 2022 via email

Copy link
Contributor

@smoe smoe left a comment

Choose a reason for hiding this comment

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

I am happy with what you have done. My only request would be that you integrate the additional uploads listed in https://sources.debian.org/src/linuxcnc/2.9.0~pre0%2Bgit20220402.2500863908-4/debian/changelog/ in debian/changelog. This eliminates an older PR of mine somewhere.

@smoe
Copy link
Contributor

smoe commented Aug 8, 2022

@sebastian, we are just collectively agreeing while still on Jitsie that you please merge this!

Install docs with dh_installdocs, other files (like .desktop entries)
with dh_install.

Install all docs in /usr/share/doc/linuxcnc, not
/usr/share/doc/linuxcnc-uspace, because that's where the .desktop files
look for the docs.

Handle each lang explicitly because we'll need to different special
things for -en vs all the others.
The new translation infrastructure means we need to build the translated
docs to generate the g-code quick refs.

Since we have separate "-arch" and "-indep" targets in debian/rules now,
we don't build the docs when building linuxcnc-uspace, so the g-code
refs need to move to the doc debs.
We need to list everything we want in linuxcnc-uspace explicitly now,
since we changed DESTDIR to install into debian/tmp.
The sample configs need to live in /usr/share/doc/linuxcnc (not
/usr/share/doc/linuxcnc-uspace), because that's where the linuxcnc
launcher script looks for them.

Handle example nc_files/ symlink with dh_link rather than "by hand".
…d vice versa

Some documentation files (gcode*.html) moved from linuxcnc-uspace to
linuxcnc-doc-{en,es,fr} (but none moved to -zh-cn).

Thus the new linuxcnc-doc-{en,es,fr} debs Break old linuxcnc-uspace,
and Replace old linuxcnc-uspace, and the new linuxcnc-uspace Breaks
old linuxcnc-doc-{en,es,fr}.
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.

6 participants