Bug 1045849

Summary: do not create /run/lock when used with mock
Product: [Fedora] Fedora Reporter: Michael S. <misc>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: jcapik, johannbg, lnykryn, msekleta, plautrba, systemd-maint, vpavlin, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-208-14.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1059345 (view as bug list) Environment:
Last Closed: 2014-02-24 12:33:59 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1046959    

Description Michael S. 2013-12-22 14:57:11 UTC
Description of problem:
try to build a package using opencryptoki-devel, I see weird failure in mock and koji :

DEBUG util.py:266:  Error unpacking rpm package opencryptoki-3.0-6.fc20.x86_64
DEBUG util.py:266:  error: unpacking of archive failed on file /var/lock/opencryptoki: cpio: mkdir
DEBUG util.py:266:  error: opencryptoki-3.0-6.fc20.x86_64: install failed


after looking for it, the problem is the following :
# ls -l  /var/lock 
lrwxrwxrwx. 1 root mockbuild 11 22 déc.  15:04 /var/lock -> ../run/lock

opencryptoki do expect /var/lock to exist, from what I see, and this work fine on a regular system. 

Following the policy 
https://fedoraproject.org/wiki/Packaging:Tmpfiles.d

I see that systemd rpm should create the directory on installation but do not do it, despites being the one that create it on boot :

/usr/lib/tmpfiles.d $ grep '/run/lock ' legacy.conf
d /run/lock 0755 root root -

$ rpm -qf legacy.conf 
systemd-208-9.fc20.x86_64

Comment 1 Zbigniew Jędrzejewski-Szmek 2013-12-24 20:53:26 UTC
I pushed a change to git which allows tmpfiles to be executed after boot. Now the rpm will have to be modified to execute tmpfiles on rpm installation or reinstallation. /run/lock will be created, and this should fix your problem.

Comment 2 Jaromír Cápík 2014-01-14 15:58:05 UTC
Bug 1052932 is related ...

Comment 3 Fedora Update System 2014-01-15 01:26:17 UTC
systemd-208-11.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/systemd-208-11.fc20

Comment 4 Fedora Update System 2014-01-16 07:02:26 UTC
Package systemd-208-11.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-208-11.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0902/systemd-208-11.fc20
then log in and leave karma (feedback).

Comment 5 Lukáš Nykrýn 2014-01-31 12:56:04 UTC
Zbigniew can you please point me to the patch, commit or change which fixed this?

Comment 7 Jóhann B. Guðmundsson 2014-01-31 13:08:36 UTC
Oh this is about /var/(In reply to Jóhann B. Guðmundsson from comment #6)
> https://git.fedorahosted.org/cgit/mock.git/commit/
> ?id=2fe5776b7c6e455fd32c8f6694aad75b468a253d

Ups this patch is about /var/lock/rpm not /var/lock my bad

Comment 8 Zbigniew Jędrzejewski-Szmek 2014-01-31 13:19:18 UTC
tmpfiles --boot addition is supposed to fix that. It is possible that some further adjustment is needed: I'm not sure if tmpfiles are called in the postinst script. They should be, and then the directory will be created.

Comment 9 Fedora Update System 2014-02-17 07:38:35 UTC
systemd-208-13.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/systemd-208-13.fc20

Comment 10 Fedora Update System 2014-02-17 15:07:03 UTC
systemd-208-14.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/systemd-208-14.fc20

Comment 11 Fedora Update System 2014-02-18 13:38:24 UTC
Package systemd-208-14.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-208-14.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-2690/systemd-208-14.fc20
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2014-02-24 12:33:59 UTC
systemd-208-14.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.