Xpra: Ticket #1530: debian systemd service packaging

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?):

(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)

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:



Wed, 24 May 2017 11:26:34 GMT - Antoine Martin: owner changed

@smo: any ideas?


Mon, 05 Jun 2017 20:22:43 GMT - psycho_zs:

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


Mon, 05 Jun 2017 21:00:07 GMT - Antoine Martin:

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

Mon, 05 Jun 2017 21:18:34 GMT - psycho_zs:

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


Tue, 06 Jun 2017 20:23:49 GMT - Antoine Martin:

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)

Tue, 06 Jun 2017 20:26:30 GMT - psycho_zs:

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


Tue, 06 Jun 2017 20:32:32 GMT - Antoine Martin:

@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.


Tue, 06 Jun 2017 21:15:07 GMT - psycho_zs:

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


Tue, 06 Jun 2017 21:27:04 GMT - psycho_zs:

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


Mon, 12 Jun 2017 17:22:08 GMT - Antoine Martin: owner, status changed

updates:

Works fine in a VM, buildbot may need tweaking.


Mon, 12 Jun 2017 20:45:08 GMT - Antoine Martin: owner, status changed

More minor debian packaging updates (not systemd related):

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


Thu, 20 Jul 2017 07:17:39 GMT - Antoine Martin: status changed; resolution set

crickets - works for me


Sat, 23 Jan 2021 05:26:50 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1530