Bug 1074096 - brltty %post failure for brltty.service
brltty %post failure for brltty.service
Status: NEW
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Current
Other openSUSE 42.2
: P5 - None : Normal (vote)
: ---
Assigned To: Michael Gorse
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-26 13:30 UTC by Christian Boltz
Modified: 2018-05-15 10:54 UTC (History)
1 user (show)

See Also:
Found By: Beta-Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Boltz 2017-12-26 13:30:32 UTC
Noticed during zypper dup to the latest tumbleweed:

(105/220) Installing: brltty-5.5-2.2.x86_64..............................[done]
Additional rpm output:
Failed to preset unit: Unit file brltty.service does not exist.
Failed to try-restart brltty.service: Unit brltty.service not found.

rpm -ql brltty | grep systemd explains it - the package includes

    /usr/lib/systemd/system/brltty.target
    /usr/lib/systemd/system/brltty@.service
    /usr/lib/systemd/system/brltty@.target

so there really is no brltty.service.
Comment 1 Ruediger Oertel 2018-05-14 15:16:53 UTC
but then using brltty@.service in %pre/%post/%preun/%postun is just as wrong.

foo@.service is the parametrized version of the unit file, you can never
restart that one directly as this would always require a parameter.

see also https://discourse.nordisch.org/t/hooking-up-instantiated-services-with-rpm/476
Comment 2 Ruediger Oertel 2018-05-15 09:55:50 UTC
actually it should be brltty.target for the %service_add/del macros:

from Documents/Changelog:
   Systemd changes:
      The default instance is now brltty.target (not brltty.service).
      Multiple instances can be managed (via brltty@.target instances).

so it should be %service_add_pre %{name}.target and so on.
Comment 3 Ruediger Oertel 2018-05-15 10:03:40 UTC
not sure this works correctly, will have to look again...
Comment 4 Ruediger Oertel 2018-05-15 10:54:10 UTC
argh .. okay:
 brltty.target for brltty-5.5
 brltty.path for brltty-5.6
they have changed the pattern again.