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

debian systemd service packaging #1530

Closed
totaam opened this issue May 24, 2017 · 19 comments
Closed

debian systemd service packaging #1530

totaam opened this issue May 24, 2017 · 19 comments

Comments

@totaam
Copy link
Collaborator

totaam commented May 24, 2017

Issue migrated from trac ticket # 1530

component: packaging | priority: major | resolution: fixed | keywords: deb packaging

2017-05-24 12:26:19: antoine created the issue


Related to #1335 and #1105, #1521.

It's a horrible mess which is why it gets its own ticket.

Some poorly documented debian packaging information: r15949: we need dh --with systemd? (whatever that does), r15947 reverted: debian wants the service file in /lib/systemd/system and not /usr/lib/systemd/system but doesn't allow us to use this "/lib/" path in the "xpra.install" file (wth? why not?):

  • with the file installed in /lib/systemd/system (where it really needs to go on a Debian system), the build fails with this fatal error:
dh_install: xpra missing files: /usr/lib/systemd/system/xpra.service

(the xpra.service is NOT listed in the xpra.install file - so it must have decided to look for it itself, somehow - some automagic thing)

  • installing it into /usr/lib/systemd/system where it wants it, we get this lintian error instead (non fatal this time):
E: xpra: systemd-service-file-outside-lib usr/lib/systemd/system/xpra.service
E: xpra: file-in-root-and-usr lib/systemd/system/xpra.service usr/lib/systemd/system/xpra.service

Clearly it's messing with "lib" vs "/usr/lib" somewhere, and falling over itself. wow.

How on earth is this awful build system supposed to work? Enough time wasted on this horror, I'm done.

Some links:

@totaam
Copy link
Collaborator Author

totaam commented May 24, 2017

2017-05-24 12:26:34: antoine changed owner from antoine to smo

@totaam
Copy link
Collaborator Author

totaam commented May 24, 2017

2017-05-24 12:26:34: antoine commented


@smo: any ideas?

@totaam
Copy link
Collaborator Author

totaam commented Jun 5, 2017

2017-06-05 21:22:43: psycho_zs commented


Just put xpra.service and xpra.socket in debian/ dir, dh will do the rest.

@totaam
Copy link
Collaborator Author

totaam commented Jun 5, 2017

2017-06-05 22:00:07: antoine commented


Just put xpra.service and xpra.socket in debian/ dir, dh will do the rest.

Hah! Thanks psycho_zs!
How did you figure this one out? Did I miss something from the documentation?

Applied in r16026, will spin some packages and see how they fare. (the warnings are gone - we'll see if the unit files are installed correctly)
We'll need to somehow remove the extra copy we install as part of the "./setup.py install step" to avoid this warning:

E: xpra: systemd-service-file-outside-lib usr/lib/systemd/system/xpra.service

@totaam
Copy link
Collaborator Author

totaam commented Jun 5, 2017

2017-06-05 22:18:34: psycho_zs commented


Just stumbled on this page while googling in general direction of dh-systemd.

@totaam
Copy link
Collaborator Author

totaam commented Jun 6, 2017

2017-06-06 21:23:49: antoine commented


Well, that didn't work as intended - the latest packages give me:

$ sudo systemctl status xpra.socket
Unit xpra.socket could not be found.
$ sudo systemctl status xpra.service
● xpra.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)

@totaam
Copy link
Collaborator Author

totaam commented Jun 6, 2017

2017-06-06 21:26:30: psycho_zs commented


Is the actual /lib/systemd/system/xpra.service in the package a link to /dev/null?

@totaam
Copy link
Collaborator Author

totaam commented Jun 6, 2017

2017-06-06 21:32:33: antoine commented


@psycho_zs: there is no file in the package (no xpra.socket, no xpra.service), or at least none gets installed:

$ ls -l /lib/systemd/system/xpra*
ls: cannot access '/lib/systemd/system/xpra*': No such file or directory

(the extra / wrong one is still there in /usr/lib/systemd/system/xpra.service)

You can find the latest packages here: [http://xpra.org/beta].

@totaam
Copy link
Collaborator Author

totaam commented Jun 6, 2017

2017-06-06 22:15:07: psycho_zs commented


If a unit is masked, it means that somewhere exists a link to /dev/null.
Try systemctl unmask xpra.service

Try systemctl daemon-reload in case any link was there but no longer is.

The package I've built from r16024 + units in debian dir has both units in place.

Although it lacks /etc/sysconfig/xpra (which would better fit into /etc/default/xpra for debian systems) and service is started with empty values for some parameters

@totaam
Copy link
Collaborator Author

totaam commented Jun 6, 2017

2017-06-06 22:27:04: psycho_zs commented


In latest svn I see symlinks in debian/ pointing to ../src/service/xpra.* which isn't present. Changed them to ../service/xpra.* and it built with units.

Units are masked if package is removed (but not purged), see postrm.

It may had happened if package with units was removed and package without units then installed

@totaam
Copy link
Collaborator Author

totaam commented Jun 12, 2017

2017-06-12 18:22:09: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Jun 12, 2017

2017-06-12 18:22:09: antoine changed owner from smo to antoine

@totaam
Copy link
Collaborator Author

totaam commented Jun 12, 2017

2017-06-12 18:22:09: antoine commented


updates:

  • r16049: revert missing python modules
  • r16050: remove quilt (not needed)
  • r16051: debhelper fix (magic - thanks to rudi_s)
  • r16052: auto start the socket activation, not the service
  • r16053: revert r16032 - no longer needed
  • r16054: simplify rules build file

Works fine in a VM, buildbot may need tweaking.

@totaam
Copy link
Collaborator Author

totaam commented Jun 12, 2017

2017-06-12 21:45:08: antoine changed status from assigned to new

@totaam
Copy link
Collaborator Author

totaam commented Jun 12, 2017

2017-06-12 21:45:08: antoine changed owner from antoine to smo

@totaam
Copy link
Collaborator Author

totaam commented Jun 12, 2017

2017-06-12 21:45:08: antoine commented


More minor debian packaging updates (not systemd related):

@smo: works-for-me(tm), FYI - feel free to just close.

@totaam
Copy link
Collaborator Author

totaam commented Jul 20, 2017

2017-07-20 08:17:39: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Jul 20, 2017

2017-07-20 08:17:39: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Jul 20, 2017

2017-07-20 08:17:39: antoine commented


crickets - works for me

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

No branches or pull requests

1 participant