Bug 1483330 - lirc is unable to create serial device lock
Summary: lirc is unable to create serial device lock
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lirc
Version: 26
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Alec Leamas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-20 14:50 UTC by Jan ONDREJ
Modified: 2017-12-28 02:47 UTC (History)
3 users (show)

Fixed In Version: lirc-0.10.0-3.fc26 lirc-0.10.0-4.fc27
Clone Of:
Environment:
Last Closed: 2017-12-28 02:47:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan ONDREJ 2017-08-20 14:50:04 UTC
Description of problem:
There is no access into /var/lock directory for users, even if I give them lock permission. Looks like all apps should lock devices in /var/lock/lockdev.
Please, try to add this configure option:
  --with-lockdir=/var/lock/lockdev
Also you can try to include lockdev in requires, which should make autodetection working.

Here is autodetection from koji build log:
Summary of selected options:
----------------------------------------
prefix:                         /usr
lockdir:                        /var/lock

Version-Release number of selected component (if applicable):
lirc-core-0.10.0-2.fc26.x86_64
Same problem with older version too.

How reproducible:
always

Steps to Reproduce:
1. configure irman
2. start lircd

Actual results:
aug 20 16:42:07 home.salstar.sk lircd[5468]: lircd-0.10.0[5468]: could not create lock file "/var/lock/LCK..ttyS0": Permission denied
aug 20 16:42:07 home.salstar.sk lircd[5468]: lircd-0.10.0[5468]: Error: could not create lock files

Comment 1 Jan ONDREJ 2017-08-20 15:25:02 UTC
Looks like:
  BuildRequires:  lockdev
has no effekt, but using:
  --with-lockdir=%{_var}/lock/lockdev
works.
Also there is an selinux problem with locking.

#============= lircd_t ==============
allow lircd_t lockdev_lock_t:dir { add_name write };
allow lircd_t lockdev_lock_t:file { create write };

Comment 2 Alec Leamas 2017-08-20 15:41:36 UTC
Hm... thanks for reporting!

Actually, the configure script looks for /var/lock/lockdev and uses it by default if it exists. Seems that the builders (no longer?) has this directory available. This is a continuing effort, more and more of the auto-probing fails on the utterly stripped down build hosts. Sigh.

Will issue a fix. Also need to file a bug against the selinux policy. Stay tuned.

Comment 3 Fedora Update System 2017-08-20 16:29:14 UTC
lirc-0.10.0-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2002828cea

Comment 4 Alec Leamas 2017-08-20 16:55:19 UTC
Filed selinux bug #1483336.

Comment 5 Fedora Update System 2017-08-22 18:08:08 UTC
lirc-0.10.0-3.fc26 has been pushed to the Fedora 26 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-2017-2002828cea

Comment 6 Fedora Update System 2017-08-24 15:51:27 UTC
lirc-0.10.0-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Jan ONDREJ 2017-11-25 10:03:06 UTC
Looks like this was applied to F26 and master branches, but not applied to f27. Please merge. Thank you.

Comment 8 Fedora Update System 2017-12-10 19:48:45 UTC
lirc-0.10.0-4.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-cdd0694ae2

Comment 9 Fedora Update System 2017-12-11 19:57:18 UTC
lirc-0.10.0-4.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-2017-cdd0694ae2

Comment 10 Fedora Update System 2017-12-28 02:47:59 UTC
lirc-0.10.0-4.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


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