Bug 1590724

Summary: systemd integration not working out-of-the-box
Product: [Fedora] Fedora Reporter: Stefan Becker <chemobejk>
Component: lircAssignee: Alec Leamas <leamas.alec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: hobbes1069, jarodwilson, leamas.alec
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: lirc-0.10.0-8.fc28 lirc-0.10.0-7.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-18 16:18:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stefan Becker 2018-06-13 09:30:29 UTC
On the system where I have been using lirc for a long time, upgrading from Fedora release to release up to Fedora 27, I have now been forced to perform a new, clean install of Fedora 28. I was surprised to find that the systemd integration of lirc doesn't work out of the box on a clean install.

Environment:
  - x86_64
  - SELinux enforced
  - lirc devinput driver
  - USB, MS compatible, IR dongle /dev/input/by-id/usb-Formosa21_USB_IR_Receiver-event-ir

Enabling lirc & irexec:

  # systemctl enable lircd.socket irexec
  # ls -lht /etc/systemd/system/*.wants/*ir*
  lrwxrwxrwx. 1 root root 38 Jun 13 11:52 /etc/systemd/system/multi-user.target.wants/irexec.service -> /usr/lib/systemd/system/irexec.service
  lrwxrwxrwx. 1 root root 33 Jun 13 11:52 /etc/systemd/system/multi-user.target.wants/lircd.service -> /etc/systemd/system/lircd.service
  lrwxrwxrwx. 1 root root 36 Jun 13 11:52 /etc/systemd/system/sockets.target.wants/lircd.socket -> /usr/lib/systemd/system/lircd.socket

BTW: lircd.service refuses to work out-of-the-box without enabling lircd.socket too.

The above only works if I copy lird.service to /etc and make the following modifications:

  $ diff -u /lib/systemd/system/lircd.service /etc/systemd/system/lircd.service 
  --- /lib/systemd/system/lircd.service   2018-01-22 19:51:27.000000000 +0200
  +++ /etc/systemd/system/lircd.service   2018-06-13 11:40:18.746055998 +0300
  @@ -8,8 +8,8 @@
   [Service]
   Type=simple
   ExecStart=/usr/sbin/lircd --nodaemon
  -; User=lirc
  -; Group=lirc
  +User=lirc
  +Group=lirc
   
   ; Hardening opts, see systemd.exec(5). Doesn't add much unless
   ; not running as root.

Without the above change lircd refuses to start, because it is not able to create the PID file (probably prevented by SELinux):

  # ls -lht /var/run/lirc
  total 4.0K
  -rw-r--r--. 1 lirc lirc 4 Jun 13 11:53 lircd.pid
  srw-rw-rw-. 1 root root 0 Jun 13 11:53 lircd

I also noted some typos in irexec.service:

  [Service]
  ; user=lirc
  ; group=lirc

That would need to be 'User' and 'Group' otherwise systemd will barf when those lines get uncommented.

RPM packages:

1528629243 lirc-libs-0.10.0-6.fc28.x86_64
1528629244 lirc-core-0.10.0-6.fc28.x86_64
1528629251 lirc-tools-gui-0.10.0-6.fc28.x86_64
1528629259 lirc-drv-ftdi-0.10.0-6.fc28.x86_64
1528629259 lirc-drv-portaudio-0.10.0-6.fc28.x86_64
1528629260 lirc-compat-0.10.0-6.fc28.x86_64
1528629260 lirc-config-0.10.0-6.fc28.noarch
1528629260 lirc-doc-0.10.0-6.fc28.noarch

Comment 1 Alec Leamas 2018-06-13 09:56:30 UTC
This is a plain packaging bug. The User= and Group= stanzas should and used to be uncommented in the fedora package. Will look into it.

Thanks for reporting!

Comment 2 Fedora Update System 2018-06-13 10:40:22 UTC
lirc-0.10.0-7.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ec49a38a38

Comment 3 Fedora Update System 2018-06-13 11:01:25 UTC
lirc-0.10.0-8.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-24e99f5cf5

Comment 4 Fedora Update System 2018-06-13 23:00:29 UTC
lirc-0.10.0-8.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-24e99f5cf5

Comment 5 Fedora Update System 2018-06-14 13:48:18 UTC
lirc-0.10.0-7.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-ec49a38a38

Comment 6 Fedora Update System 2018-06-18 16:18:31 UTC
lirc-0.10.0-8.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2018-06-24 20:09:49 UTC
lirc-0.10.0-7.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.