Bug 14299 - p11-kit has a dependency on /bin/sh which prevents creation of docker containers with rpmbootstrap
Summary: p11-kit has a dependency on /bin/sh which prevents creation of docker contain...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: advisory has_procedure MGA4-64-OK MGA...
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2014-10-16 11:33 CEST by Bruno Cornec
Modified: 2015-01-07 17:32 CET (History)
6 users (show)

See Also:
Source RPM: p11-kit-0.20.1-3.3.mga4.src.rpm
CVE:
Status comment:


Attachments

Description Bruno Cornec 2014-10-16 11:33:09 CEST
Description of problem:
p11-kit has a dependency on /bin/sh which prevents creation of docker containers with rpmbootstrap

Version-Release number of selected component (if applicable):
0.20.1

How reproducible:
Everytime

Steps to Reproduce:
1. use rpmbootstrap to create a mageia 4 chroot
2. when using urpmi a dep on /bin/sh is required which doesn't exist and is now incorrect (/usr/bin/sh would be better)
3.


Reproducible: 

Steps to Reproduce:
Comment 1 Bruno Cornec 2014-10-16 12:36:14 CEST
Linked to 
Requires(pretrans): /bin/sh

at build time.
Comment 2 Bruno Cornec 2014-10-16 12:45:47 CEST
Seems to be  linked to http://comments.gmane.org/gmane.linux.mageia.devel/39074

THe fact the pretrans creates a dependency on /bin/sh should be changed to /usr/bin/sh now that we have a non separate /usr where all bins are.

CC: (none) => bruno

Comment 3 Bruno Cornec 2014-10-16 12:47:21 CEST
In mga 5 it has been changed to lua script:
%pretrans -p <lua>

file = io.open("/etc/pkcs11/pkcs11.conf","r")

if (file) then
  size = file:seek("end")
  file:close()
  if (size == 0) then
    os.remove("/etc/pkcs11/pkcs11.conf")
  end
end


Is it something we could backport to mga4 as well to solve the issue ?
Comment 4 David Walser 2014-10-17 00:56:18 CEST
/usr/bin/sh would just be incorrect.  bash has an explicit provides of /bin/sh, so the problem isn't that the dependency can't be met, it's just that having that dependency on something needed by the core set of packages can cause dependency loops, which can cause non-deterministic dependency failures when installing a chroot.  Using lua for the pretrans script causes no additional dependencies, so that fixed the issue in Cauldron.  Pascal confirmed on the dev ml that the same fix would work in Mageia 4.
Comment 5 Bruno Cornec 2014-10-18 02:59:21 CEST
Update pushed into updates_testing
Comment 6 David Walser 2014-10-19 16:06:31 CEST
Thanks.  Please write an advisory and assign this bug to the QA team.  There's instructions on the wiki for doing this if you need it.
Comment 7 Bruno Cornec 2014-10-24 01:45:00 CEST
Done.

Assignee: bugsquad => qa-bugs
Status: NEW => ASSIGNED

Comment 8 Rémi Verschelde 2014-10-24 09:56:25 CEST
Here is the advisory Bruno uploaded:

type: bugfix
subject: Updated p11-kit package fixes pretrans issue
src:
  4:
   core:
     - p11-kit-0.20.1-3.3.mga4
description: |
  backport the %pretrans lua script to mga4 in order to fix dependency 
  issues when trying to build a mga4 chroot 
  (in particular with rpmbootstrap)
references:
 - https://bugs.mageia.org/show_bug.cgi?id=14299

Whiteboard: (none) => advisory
CC: (none) => remi

Comment 9 David Walser 2014-10-29 21:34:27 CET
Manuel just noticed that the release tag on this update candidate is the same as the one already in core/updates.  You'll need to increase the subrel and rebuild this, and fix the release tag in the advisory in SVN.
Rémi Verschelde 2014-10-31 15:47:53 CET

Whiteboard: advisory => advisory feedback

Comment 10 Bruno Cornec 2014-11-07 03:36:10 CET
I made the modification that you suggested. Hopefully this is now good to go.

Status: ASSIGNED => NEW

David Walser 2014-11-07 13:00:31 CET

Whiteboard: advisory feedback => advisory

Comment 11 Bruno Cornec 2014-11-17 13:02:56 CET
Should I do somethig else to have the package upmloaded ?
Comment 12 Rémi Verschelde 2014-11-17 13:44:31 CET
For testing the removed dependency, it's quite straightforward with urpmq, but if you could give some instructions to test that p11-kit still works as expected, it would help :-)
Comment 13 claire robinson 2014-11-17 17:59:52 CET
Sorry for the delay Bruno, we have been a bit busy with Beta 1.

See https://bugs.mageia.org/show_bug.cgi?id=6502#c2 for previous testing. Also p11-kit was previously found to cause problems for programs such as kwrite, kdenlive, digikam, xbmc, claws-mail on nvidia systems so ensure these can still start/run.

Bruno may be able to give directions for more thorough testing but IINM 
p11-kit -l shows it basically works.

Whiteboard: advisory => advisory has_procedure

Comment 14 Luc Menut 2014-11-19 00:23:58 CET
(In reply to Bruno Cornec from comment #10)
> I made the modification that you suggested. Hopefully this is now good to go.

in rev 795993, you increased the rel instead of the subrel
http://svnweb.mageia.org/packages?view=revision&revision=795993
http://svnweb.mageia.org/packages/updates/4/p11-kit/current/SPECS/p11-kit.spec?r1=795993&r2=795992&pathrev=795993
Comment 15 Bruno Cornec 2014-11-19 00:42:27 CET
Grumph :-( My mistake, sorry for that.
I reverted release to 3 and subrel to 4 but now I can't submit it anymore :-(

Submission errors, aborting:
- p11-kit-0.20.1-3.4.mga4:
 - Current or newer revision(s) already exists in core/updates_testing for 4: 0.20.1-4.3.mga4

Can someone with the right level of power repair my mistake and push the new version ?

TIA
Bruno.
Comment 16 claire robinson 2014-11-19 09:28:27 CET
Adding sysadmin to CC, please see Bruno's comment 15

Thanks

CC: (none) => sysadmin-bugs

claire robinson 2014-11-19 09:28:46 CET

Whiteboard: advisory has_procedure => advisory has_procedure feedback

Comment 17 Rémi Verschelde 2014-12-02 10:04:52 CET
Sysadmins, could you please nuke p11-kit-0.20.1-4.3.mga4 from core/updates_testing ? Thanks in advance.
Comment 18 David Walser 2014-12-04 21:28:17 CET
p11-kit has finally been removed from updates_testing.  Feel free to re-push when it's ready.

CC: sysadmin-bugs => (none)

Comment 19 claire robinson 2014-12-05 17:41:44 CET
Assigning back to Bruno until this is ready for testing.
(just to clear it off our list)

CC: (none) => qa-bugs
Assignee: qa-bugs => bruno

Comment 20 Bruno Cornec 2014-12-06 16:21:44 CET
New package submitted into core/updates_testing
Assigned back to QA.

Assignee: bruno => qa-bugs

David Walser 2014-12-06 17:00:25 CET

Whiteboard: advisory has_procedure feedback => advisory has_procedure

Comment 21 Rémi Verschelde 2014-12-06 17:01:42 CET
Please also remember to give the complete package list for testers.
I'll do it for this one:

p11-kit-0.20.1-3.4.mga4
p11-kit-trust-0.20.1-3.4.mga4
lib(64)p11-kit0-0.20.1-3.4.mga4
lib(64)p11-kit-devel-0.20.1-3.4.mga4

From SRPM: 
p11-kit-0.20.1-3.4.mga4

Whiteboard: advisory has_procedure => advisory has_procedure feedback

Rémi Verschelde 2014-12-06 17:01:49 CET

Whiteboard: advisory has_procedure feedback => advisory has_procedure

Comment 22 Len Lawrence 2014-12-09 17:43:01 CET
Testing on mga4 x86_64 real hardware

Installed
p11-kit-0.20.1-3.4.mga4
p11-kit-trust-0.20.1-3.4.mga4
lib64p11-kit0-0.20.1-3.4.mga4
lib64p11-kit-devel-0.20.1-3.4.mga4

As user
$ p11-kit -l
p11-kit-trust: p11-kit-trust.so
    library-description: PKCS#11 Kit Trust Module
    library-manufacturer: PKCS#11 Kit
    library-version: 0.20
    token: System Trust
        manufacturer: PKCS#11 Kit
        model: p11-kit-trust
        serial-number: 1
        hardware-version: 0.20
        flags:
               write-protected
               token-initialized
gnome-keyring: gnome-keyring-pkcs11.so
    library-description: GNOME Keyring Daemon Core
    library-manufacturer: GNOME Keyring
    library-version: 1.1
    token: SSH Keys
        manufacturer: Gnome Keyring
        model: 1.0
        serial-number: 1:SSH:HOME
        flags:
               write-protected
               user-pin-initialized
               protected-authentication-path
               token-initialized
    token: Secret Store
        manufacturer: Gnome Keyring
        model: 1.0
        serial-number: 1:SECRET:MAIN
        flags:
               login-required
               user-pin-initialized
               protected-authentication-path
               token-initialized
    token: Gnome2 Key Storage
        manufacturer: Gnome Keyring
        model: 1.0
        serial-number: 1:USER:DEFAULT
        flags:
               login-required
               protected-authentication-path
               token-initialized
    token: User Key Storage
        manufacturer: Gnome Keyring
        model: 1.0
        serial-number: 1:XDG:DEFAULT
        flags:
               protected-authentication-path
               token-initialized

CC: (none) => tarazed25

Comment 23 Len Lawrence 2014-12-09 18:04:01 CET
System has nvidia graphics.
Logged in to KDE and launched some of the programs from list in comment 13.

kwrite with simple text file
kdenlive launched OK
digikam ditto
xbmc took over the screen.  Went as far as looking for Videos.  Failed to find any of the mp4 files located in my TV directory and abandoned it.  It looks like it works if you know what you are doing.

Tentatively marking the update as OK.
Len Lawrence 2014-12-09 18:04:42 CET

Whiteboard: advisory has_procedure => advisory has_procedure MGA4-64-OK

Comment 24 David Walser 2014-12-12 00:39:18 CET
I was able to use urpmi --root to create a chroot with basesystem-minimal (including p11-kit) just fine with no deps issues with the existing packages.

Can you give instructions on using rpmbootstrap to do this to demonstrate the issue (and test the fix)?  Preferrably if possible allowing for the use of a local mirror and maybe a local path for the testing packages for testing with the update.
Comment 25 Herman Viaene 2015-01-05 11:23:02 CET
MGA4-32 on Acer D620 Xfce.
No installation issues.
Confirm  output of "p11-kit -l" as per Comment 22.
xbmc runs and I could open the dialogue to look for files. Stopped there. Trying to close xbmc apparently froze the screen. Maybe I did not wait long enough, but I resorted to Alt-Ctl-Backspace to get back on track. OK for me.

Whiteboard: advisory has_procedure MGA4-64-OK => advisory has_procedure MGA4-64-OK MGA4-32-OK
CC: (none) => herman.viaene

Comment 26 claire robinson 2015-01-07 16:29:16 CET
Validating. Advisory already uploaded and current with comment 21.

Please push to 4 updates

Thanks

CC: (none) => sysadmin-bugs
Keywords: (none) => validated_update

Comment 27 Mageia Robot 2015-01-07 17:32:43 CET
An update for this issue has been pushed to Mageia Updates repository.

http://advisories.mageia.org/MGAA-2015-0002.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED


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