Bug 983772 - Error in lockdev install during live image creation
Summary: Error in lockdev install during live image creation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lockdev
Version: rawhide
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
Assignee: Jiri Popelka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-11 23:38 UTC by Adam Williamson
Modified: 2013-09-03 22:25 UTC (History)
4 users (show)

Fixed In Version: lockdev-1.0.4-0.11.20111007git.fc19
Clone Of:
Environment:
Last Closed: 2013-09-03 22:25:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson 2013-07-11 23:38:34 UTC
While creating a Rawhide live image, the installation of the 'lockdev' package fails with this error:

  Installing: lockdev                      ################### [ 657/1214] 
error: unpacking of archive failed on file /var/lock/lockdev: cpio: mkdir
error: lockdev-1.0.4-0.7.20111007git.fc20.x86_64: install failed

This usually indicates some kind of problem in the package's scriptlets, I haven't yet looked at the spec to see if I can see what it is.

Comment 1 Ondrej Vasik 2013-07-12 10:36:21 UTC
This is connected to the tmpfs on /run/lock feature ... Previously, it was handled more gently in filesystem package - however packages should not have the files in temporary location in the payload - the file ownership should be done via ghosted file..
Systemd will automatically create them, if the package has correct systemd unit file - and for the time until the first reboot, it may be covered by the %post scriptlet in the package.

Comment 3 Massimiliano 2013-07-31 19:46:18 UTC
I have encountered this bug during a recent build of a F19 live remix:

  Installazi: lockdev                      ################### [ 655/1222] 
errore: estrazione archivio fallita sul file /var/lock/lockdev: cpio: mkdir
errore: lockdev-1.0.4-0.7.20111007git.fc19.x86_64: installa fallito

Updates repo was enabled. Need to file a new bug?

Comment 4 upgradeservices 2013-07-31 21:16:31 UTC
error: unpacking of archive failed on file /var/lock/lockdev: cpio: mkdir
error: lockdev-1.0.4-0.7.20111007git.fc19.i686: install failed

Comment 5 Fedora Update System 2013-08-01 06:45:57 UTC
lockdev-1.0.4-0.8.20111007git.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/lockdev-1.0.4-0.8.20111007git.fc19

Comment 6 Massimiliano 2013-08-05 20:09:28 UTC
Now there is a different problem:

  Installazi: lockdev                      ################### [ 647/1215]mkdir: impossibile creare la directory "/var/lock": File già esistente
chown: impossibile accedere a "/var/lock/lockdev": File o directory non esistente
avvertimento: scriptlet %post(lockdev-1.0.4-0.8.20111007git.fc19.x86_64) fallita, uscita con stato 1

  Installazi: libgphoto2                   ################### [ 648/1215] 
  Installazi: iputils                      ################### [ 649/1215] 
  Installazi: usbmuxd                      ################### [ 650/1215] 
  Installazi: libimobiledevice             ################### [ 651/1215] 
  Installazi: ppp                          ################### [ 652/1215]mkdir: impossibile creare la directory "/var/lock": File già esistente

It seems closely related to ppp problem, see #980100.

Comment 7 Jiri Popelka 2013-08-13 11:21:13 UTC
(In reply to Massimiliano from comment #6)
> mkdir: impossibile creare la directory "/var/lock": File già esistente

That's strange, we use 'mkdir -p /var/lock/lockdev/' which should not error if the directory exists and it should try to create /var/lock/ if it does not exist.
But I've no idea why it tried creating /var/lock/ which had already existed (if Google Translator is right).

> It seems closely related to ppp problem, see #980100.

I can do the same change as in
http://pkgs.fedoraproject.org/cgit/ppp.git/commit/?id=0d4a41fcacdcb8f324a7a541c150877b6374efcb
but it'd just silence the error I don't understand.

Comment 8 Fedora Update System 2013-08-15 02:59:18 UTC
lockdev-1.0.4-0.8.20111007git.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Massimiliano 2013-08-25 10:50:50 UTC
The error is still present in today's build:

Installazi: lockdev                      ################### [ 615/1211]mkdir: impossibile creare la directory "/var/lock": File già esistente
chown: impossibile accedere a "/var/lock/lockdev": File o directory non esistente
avvertimento: scriptlet %post(lockdev-1.0.4-0.8.20111007git.fc19.x86_64) fallita, uscita con stato 1

I suspect the script is trying to use mkdir against a broken symlink. In fact /var/lock is not a "real" directory, but only a symlink to ../run/lock . If I run this (assuming that nodir doesn't exists in the home dir):

$ cd
$ ln -s nodir brokenlink
$ mkdir -p ~/brokenlink/newdir 
mkdir: impossibile creare la directory "/home/massi/brokenlink": File già esistente

then I obtain the same error of the build. Maybe the following link can help:
https://fedoraproject.org/wiki/Packaging:Tmpfiles.d

Comment 10 Jiri Popelka 2013-08-26 11:05:29 UTC
(In reply to Massimiliano from comment #9)
> $ ln -s nodir brokenlink
> $ mkdir -p ~/brokenlink/newdir 

That does the trick, thanks !
Then, there's probably nothing more we can do except silencing the error as has ppp already done.

Comment 11 Fedora Update System 2013-08-26 11:07:30 UTC
lockdev-1.0.4-0.10.20111007git.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/lockdev-1.0.4-0.10.20111007git.fc19

Comment 12 Massimiliano 2013-08-26 12:59:08 UTC
This seems a side effect of running the script in the chroot environment of livecd-creator. The tmpfiles.d mechanism can handle properly the creation of directories during system startup, so can the script be removed safely?

Comment 13 Jiri Popelka 2013-08-26 13:28:50 UTC
It was supposed to cover the time until first reboot per comment #1, but given that it fails in this case anyway it seems to be useless and can be removed indeed.

Comment 14 Fedora Update System 2013-08-26 22:26:20 UTC
Package lockdev-1.0.4-0.11.20111007git.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lockdev-1.0.4-0.11.20111007git.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-15309/lockdev-1.0.4-0.11.20111007git.fc19
then log in and leave karma (feedback).

Comment 15 Massimiliano 2013-08-28 21:54:26 UTC
The build process doesn't show errors anymore. In my live remix:

# rpm -q lockdev
lockdev-1.0.4-0.11.20111007git.fc19.x86_64
# ls -l /var/lock/
totale 0
drwx------. 2 root root 60 28 ago 23.27 iscsi
drwxrwxr-x. 2 root lock 40 28 ago 23.27 lockdev
drwx------. 2 root root 40 28 ago 23.27 lvm
drwxr-xr-x. 2 root root 40 28 ago 23.27 ppp

However I'm not able to test lockdev functionality.

Comment 16 Fedora Update System 2013-09-03 22:25:54 UTC
lockdev-1.0.4-0.11.20111007git.fc19 has been pushed to the Fedora 19 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.