xpra icon
Bug tracker and wiki

Opened 6 months ago

Closed 4 months ago

#1530 closed task (fixed)

debian systemd service packaging

Reported by: Antoine Martin Owned by: Smo
Priority: major Milestone: 2.1
Component: packaging Version: trunk
Keywords: deb packaging Cc:

Description

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:

Change History (12)

comment:1 Changed 6 months ago by Antoine Martin

Owner: changed from Antoine Martin to Smo

@smo: any ideas?

comment:2 Changed 6 months ago by psycho_zs

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

comment:3 Changed 6 months ago by 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

comment:4 Changed 6 months ago by psycho_zs

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

comment:5 Changed 6 months ago by 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)

comment:6 Changed 6 months ago by psycho_zs

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

comment:7 Changed 6 months ago by 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.

comment:8 Changed 6 months ago by 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

comment:9 Changed 6 months ago by 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

comment:10 Changed 5 months ago by Antoine Martin

Owner: changed from Smo to Antoine Martin
Status: newassigned

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.

comment:11 Changed 5 months ago by Antoine Martin

Owner: changed from Antoine Martin to Smo
Status: assignednew

More minor debian packaging updates (not systemd related):

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

comment:12 Changed 4 months ago by Antoine Martin

Resolution: fixed
Status: newclosed

crickets - works for me

Note: See TracTickets for help on using tickets.