FS#31614 - [lockdev] change location of lockfiles to /run/lock/lockdev

Attached to Project: Community Packages
Opened by Thomas Weißschuh (t-8ch) - Thursday, 20 September 2012, 10:09 GMT
Last edited by Lukas Fleischer (lfleischer) - Sunday, 30 September 2012, 13:56 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Currently lockdev tries to store lockfiles directly in /run/lock.
(to be precise it's /var/lock, which is a symlink to /run/lock)
The permissions of /run/lock are root:root 755. Therefore locking for regular programs won't work.
For this reason /usr/lib/tmpfiles.d/legacy.conf creates the directory /run/lock/lockdev, owned by root:lock.
To change the directory which lockdev uses one can define the macro _PATH_LOCK (see lockdev.c) which is used instead of the default.
This way regular users in the group lock can lock devices via lockdev.

This is how it is done by Fedora.

Additional Information:
The source (debian patch) for the version currently shipped by arch is no longer available.
Bumping the Version to 1.0.3_1.5 works.
Some programs are statically linked with liblockdev (libcec comes to mind), those should obviously be rebuilt.

Talk on systemd mailing list:
http://lists.freedesktop.org/archives/systemd-devel/2011-March/001823.html

Fedora defines _PATH_LOCK:
http://pkgs.fedoraproject.org/cgit/lockdev.git/tree/lockdev.spec?id=424d0f27b9bc746135e71b0e687a3c00b3e13339#n61
This task depends upon

Closed by  Lukas Fleischer (lfleischer)
Sunday, 30 September 2012, 13:56 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 1.0.3_1.5.
Comment by Thomas Weißschuh (t-8ch) - Thursday, 20 September 2012, 10:13 GMT