FS#30637 - [gpm] systemd service file doesn't work

Attached to Project: Arch Linux
Opened by Karol Babioch (johnpatcher) - Wednesday, 11 July 2012, 13:32 GMT
Last edited by Eric Belanger (Snowman) - Thursday, 12 July 2012, 01:34 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The service file provided with systemd (/usr/lib/systemd/system/gpm.service) doesn't work for me. When trying to start the service (systemctl start gpm.service) nothing happens. There are no error messages. "systemctl status gpm.service" reports that the start has failed. When trying to enable the service (systemctl enable gpm.service) an error message gets echoed:

[root@vpcs ~]# systemctl enable gpm.service
Warning: unit files do not carry install information. No operation executed.

Additional info:
* package version(s): gpm 1.20.6-8, systemd 185-4
* config and/or log files etc.:

[root@vpcs ~]# systemctl status gpm.service
gpm.service - GPM daemon
Loaded: loaded (/usr/lib/systemd/system/gpm.service; static)
Active: failed (Result: exit-code) since Wed, 11 Jul 2012 15:29:39 +0200; 3min 12s ago
Main PID: 9485 (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/gpm.service


Steps to reproduce:
Try to start and/or enable gpm.service.
This task depends upon

Closed by  Eric Belanger (Snowman)
Thursday, 12 July 2012, 01:34 GMT
Reason for closing:  Fixed
Comment by Eric Belanger (Snowman) - Wednesday, 11 July 2012, 18:13 GMT
try gpm-1.20.6-9 in testing. Install info was added to service file.
Comment by Karol Babioch (johnpatcher) - Wednesday, 11 July 2012, 19:47 GMT
At least it can be installed, however it still doesn't work :(. When rebooting systemctl status tells me the following:

[johnpatcher@vpcs ~]$ systemctl status gpm.service
gpm.service - Virtual console mouse server
Loaded: loaded (/usr/lib/systemd/system/gpm.service; enabled)
Active: inactive (dead) since Wed, 11 Jul 2012 21:37:47 +0200; 54s ago
Process: 449 ExecStart=/usr/sbin/gpm (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/gpm.service

When trying to start it directly with "systemctl start gpm.service" the behavior is just like before. No error messages get reported, but systemctl status tells me:

[root@vpcs ~]# systemctl status gpm.service
gpm.service - Virtual console mouse server
Loaded: loaded (/usr/lib/systemd/system/gpm.service; enabled)
Active: failed (Result: exit-code) since Wed, 11 Jul 2012 21:40:46 +0200; 9s ago
Process: 1132 ExecStart=/usr/sbin/gpm (code=exited, status=0/SUCCESS)
Main PID: 1133 (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/gpm.service

Maybe I should add that I'm using systemd-sysvcompat. When comparing the initscript with the unit file I see that there are no arguments in case of the unit file, whereas in case of the initscript "${GPM_ARGS}" gets attached. When attaching this string "-m /dev/input/mice -t imps2" directly to the unit file, it works.

However I'm not sure what would be the right way to do this properly with systemd. Probably anyone who has to change it, would need an own unit file withing /etc, whereas the unit file provided with the package would indeed contain "ExecStart=/usr/sbin/gpm -m /dev/input/mice -t imps2".

What do you think about that?
Comment by Eric Belanger (Snowman) - Wednesday, 11 July 2012, 21:34 GMT
You need to copy the unit file into /etc/systemd/system and reenable the unit so it links against the new unit.
Comment by Karol Babioch (johnpatcher) - Wednesday, 11 July 2012, 22:40 GMT
I'm not sure whether I've made my point: For the time being I've edited the unit file within /usr/lib/systemd. I've attached the string "-m /dev/input/mice -t imps2", which is also attached when using the classic initscript. However it is not attached in the unit file provided with the package. I'm not sure whether something like a configuration file withing /etc/conf.d/ is possible/advisable with systemd, so my point was that anyone who has to change the parameter(s) will probably have to put his own unit file within /etc.

Nevertheless the unit file provided with gpm should be changed, so that /usr/sbin/gpm will be called with the appropriate arguments instead without any arguments at all.
Comment by Eric Belanger (Snowman) - Wednesday, 11 July 2012, 23:20 GMT
You need to put a copy of the unit file with the parameters that you want to pass to gpm in /etc/systemd/system/. This is how you configure your system when you use systemd. We don't use config file like the ones in /etc/conf.d with systemd.
Comment by Karol Babioch (johnpatcher) - Wednesday, 11 July 2012, 23:22 GMT
But shouldn't the parameter "-m /dev/input/mice -t imps2" be included in the unit file provided with this package? At least in the case of the classic rc.d initscript this is the default and at least in my case (synaptic touchpad) without it gpm doesn't work at all.
Comment by Eric Belanger (Snowman) - Thursday, 12 July 2012, 01:34 GMT
I've added the "-m /dev/input/mice -t imps2" options in systemd unit file in gpm-1.20.6-10

Loading...