Bug 1294744

Summary: /usr/lib/systemd/system/lircd.service is overwritten on upgrade.
Product: [Fedora] Fedora Reporter: grant petersen <grant.petersen.gb>
Component: lircAssignee: Alec Leamas <leamas.alec>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 23CC: bnocera, fedora, jarodwilson, leamas.alec
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-30 10:10:20 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:

Description grant petersen 2015-12-30 05:10:44 UTC
Description of problem:
/usr/lib/systemd/system/lircd.service is overwritten on lircd-core upgrade. This causes lircd to stop working if a default lircd.service file is not appropriate for the particular system it's running on.

Version-Release number of selected component (if applicable):
lircd 0.9.3a (but the last umpty ump have all done this too)

How reproducible:
Every time lircd-core is upgraded with dnf.

Steps to Reproduce:
1. Edit /usr/lib/systemd/system/lircd.service to make lircd work.
2. Upgrade lirc-core
3. Reboot.

Actual results:
irexec fails to run. (as it can't talk to lircd)


Expected results:
irexec should run and process appropriate scripts.


Additional info:
My lircd.service file's contents:

[Unit]
Description=LIRC Infrared Signal Decoder
After=network.target

[Service]
Type=simple
ExecStart=/usr/sbin/lircd --nodaemon -H devinput -d /dev/input/by-path/pci-0000:03:00.0-event-ir

[Install]
WantedBy=multi-user.target

Comment 1 Alec Leamas 2015-12-30 10:10:20 UTC
This is the intended behaviour. Users who need a custom lircd.service should not edit /lib/systemd/system/lircd.service - instead a new file /etc/systemd/system/lircd.service file should be created which overrides the /lib/systemd one. Please refer to the systemd docs e. g. http://www.freedesktop.org/software/systemd/man/systemd.unit.html

Comment 2 Alec Leamas 2015-12-30 10:42:36 UTC
BTW, there is no need for you to modify lircd.service. If you use the shipped variant, you can specify things like driver and device in the /etc/lirc/lirc_options.conf file. This is the intended configuration mechanism.