Bug 9528 - Upgrade of lirc silently replaces user-defined values in /usr/lib/systemd/system/lircd.service with defaults
Summary: Upgrade of lirc silently replaces user-defined values in /usr/lib/systemd/sys...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Anssi Hannula
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
Depends on:
Blocks:
 
Reported: 2013-03-24 22:35 CET by Martin Spiegel
Modified: 2014-02-09 16:27 CET (History)
3 users (show)

See Also:
Source RPM: lirc
CVE:
Status comment:


Attachments

Description Martin Spiegel 2013-03-24 22:35:06 CET
Description of problem:
After todays upgrade of lirc the remote control of my usb tv-stick (terratec cinergy htc usb xs) stopped working. While the configuration file for the remote control itself at /etc/lirc/lircd.conf still contained all the modifications required for the remote control, the modifications in the configuration file for the daemon at /usr/lib/systemd/system lircd.service were replaced by standard values (--driver=default, --device=/dev/lirc0). Obviously, during the upgrade the file was simply replaced by the standard configuration file. Additionally the syntax of the configuration file does not seem to be correct. When I rpelaced the standard values by the ones required for my remote control it was still not working. Instead of:
ExecStart=/usr/sbin/lircd --driver=devinput -device=/dev/input/event9
I had to use
ExecStart=/usr/sbin/lircd -H=devinput -d=/dev/input/event9

Version-Release number of selected component (if applicable):
lirc-0.9.0-9.mga3 and related packages



Reproducible: 

Steps to Reproduce:
Martin Spiegel 2013-03-25 00:07:35 CET

Hardware: i586 => x86_64

Manuel Hiebel 2013-05-07 02:02:40 CEST

Keywords: (none) => Triaged
Assignee: bugsquad => anssi.hannula
Source RPM: (none) => lirc

Comment 1 Thomas Backlund 2013-05-07 09:56:47 CEST
Not a bug.

/usr/lib/systemd/system/ is not a intended for user configs / adaptions.

If you want to modify a .service file, you can copy it from /usr/lib/systemd/system/ to /etc/systemd/system/ and modify it there.

if systemd detects a module with the same name /etc, it will use that

That will make your customizations stay during updates

Status: NEW => RESOLVED
CC: (none) => tmb
Resolution: (none) => INVALID

Comment 2 Anssi Hannula 2013-05-07 10:04:38 CEST
Note that I intend to restore /etc/sysconfig/lircd for user configuration without having to alter unit files, unless someone objects.
Comment 3 Martin Spiegel 2013-05-07 14:39:14 CEST
(In reply to Thomas Backlund from comment #1)

> Not a bug. 
I depends from your point of view :-) To be a little bit more specific: I had a working lirc configuration i.e. a working remote control for my USB-TV stick before upgrading to lirc-0.9.0-9.mga3. After the lirc package upgrade /etc/sysconfig/lircd was gone (it was backed up as lircd.rpmsave) and the remote control stopped working. Recreation of /etc/sysconfig/lircd did not help and after a while I realized that it might have something to do with the migration to systemd.

> /usr/lib/systemd/system/ is not a intended for user configs / adaptions.
I wasn't aware of that. I was simply looking for the file which might have replaced /etc/sysconfig/lircd. Since it contained device specific configuration values I assumed I would have found that file...  

 
(In reply to Anssi Hannula from comment #2)
> Note that I intend to restore /etc/sysconfig/lircd for user configuration
> without having to alter unit files, unless someone objects.
That would be great. At least for me setting-up lirc for my remote control was a non-trivial task ;-). And all the tutorials I could find mentioned the modification of /etc/sysconfig/lircd to get your device working.
Comment 4 Martin Spiegel 2013-05-09 00:43:34 CEST
(In reply to Thomas Backlund from comment #1)
> Not a bug.
> 
> /usr/lib/systemd/system/ is not a intended for user configs / adaptions.
> 
> If you want to modify a .service file, you can copy it from
> /usr/lib/systemd/system/ to /etc/systemd/system/ and modify it there.
> 
On my system *everything* in /etc/systemd/system is just a symbolic link to files in /usr/lib/systemd/system.

Status: RESOLVED => REOPENED
Resolution: INVALID => (none)

Comment 5 Vincent D 2013-07-16 18:54:35 CEST
Hi,


Can I suggest to the mainteners to have a look at the way a archlinux user did to solve the problem: https://bugs.archlinux.org/task/31890


It simply consists of adding a line in /lib/systemd/system/lircd.service, allowing to keep the old config file for the options of lircd in /etc/sysconfig/lircd:

EnvironmentFile=/etc/sysconfig/lircd
ExecStart=/usr/sbin/lircd --device=${DEVICE} --driver=${DRIVER}


Please keep us informed in case a new package including such a change is built.


Regards,
Vincent.

CC: (none) => vincent.dema+mageia

Mikko Kuivaniemi 2013-11-18 23:53:08 CET

CC: (none) => plafe

Comment 6 Anssi Hannula 2014-02-09 16:27:24 CET
I'm sorry for the delay.

This has now been fixed in Cauldron, but by using the Fedora sysconfig file as base instead. I've added some code to migrate old lirc device/driver from lircd.service and /etc/sysconfig/lircd.

There is an update/testing request for mga4, bug #12685.

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.