Bug 1370939 - Scriptlet errors during installation
Summary: Scriptlet errors during installation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: knot
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Včelák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-28 16:33 UTC by Ruben Kerkhof
Modified: 2016-09-09 16:55 UTC (History)
2 users (show)

Fixed In Version: knot-2.3.0-3.fc25 knot-2.3.0-3.fc23 knot-2.3.0-3.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-02 23:27:09 UTC
Type: Bug


Attachments (Terms of Use)

Description Ruben Kerkhof 2016-08-28 16:33:02 UTC
$ sudo dnf install knot
Last metadata expiration check: 2:39:11 ago on Sun Aug 28 15:47:29 2016.
Dependencies resolved.
========================================================================================================================
 Package                     Arch                     Version                           Repository                 Size
========================================================================================================================
Installing:
 knot                        x86_64                   2.3.0-2.fc26                      rawhide                   330 k
 knot-libs                   x86_64                   2.3.0-2.fc26                      rawhide                   233 k
 lmdb-libs                   x86_64                   0.9.18-1.fc24                     rawhide                    56 k

Transaction Summary
========================================================================================================================
Install  3 Packages

Total download size: 618 k
Installed size: 2.1 M
Is this ok [y/N]: y
Downloading Packages:
[MIRROR] knot-2.3.0-2.fc26.x86_64.rpm: Status code: 404 for http://ftp.nluug.nl/pub/os/Linux/distr/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/k/knot-2.3.0-2.fc26.x86_64.rpm
[MIRROR] knot-libs-2.3.0-2.fc26.x86_64.rpm: Status code: 404 for http://ftp.nluug.nl/pub/os/Linux/distr/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/k/knot-libs-2.3.0-2.fc26.x86_64.rpm
(1/3): lmdb-libs-0.9.18-1.fc24.x86_64.rpm                                               360 kB/s |  56 kB     00:00    
(2/3): knot-2.3.0-2.fc26.x86_64.rpm                                                     805 kB/s | 330 kB     00:00    
(3/3): knot-libs-2.3.0-2.fc26.x86_64.rpm                                                526 kB/s | 233 kB     00:00    
------------------------------------------------------------------------------------------------------------------------
Total                                                                                   387 kB/s | 618 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Installing  : lmdb-libs-0.9.18-1.fc24.x86_64                                                                      1/3 
  Installing  : knot-libs-2.3.0-2.fc26.x86_64                                                                       2/3 
  Installing  : knot-2.3.0-2.fc26.x86_64                                                                            3/3 
Unknown command.
warning: %post(knot-2.3.0-2.fc26.x86_64) scriptlet failed, exit status 1
Non-fatal POSTIN scriptlet failure in rpm package knot
Non-fatal POSTIN scriptlet failure in rpm package knot
  Verifying   : knot-2.3.0-2.fc26.x86_64                                                                            1/3 
  Verifying   : knot-libs-2.3.0-2.fc26.x86_64                                                                       2/3 
  Verifying   : lmdb-libs-0.9.18-1.fc24.x86_64                                                                      3/3 

Installed:
  knot.x86_64 2.3.0-2.fc26            knot-libs.x86_64 2.3.0-2.fc26            lmdb-libs.x86_64 0.9.18-1.fc24           

Complete!


Looking at the scriptlets:


$ rpm -q --scripts knot
preinstall scriptlet (using /bin/sh):
getent group knot >/dev/null || groupadd -r knot
getent passwd knot >/dev/null || useradd -r -g knot -d /etc/knot -s /sbin/nologin -c "Knot DNS server" knot
exit 0
postinstall scriptlet (using /bin/sh):

if [ $1 -eq 1 ] ; then 
        # Initial installation 
        systemctl --no-reload preset knot.service >/dev/null 2>&1 || : 
fi 

# initialize/upgrade KASP database
/usr/sbin/runuser -u knot -- /usr/sbin/keymgr --dir /var/lib/knot/keys init
preuninstall scriptlet (using /bin/sh):

if [ $1 -eq 0 ] ; then 
        # Package removal, not upgrade 
        systemctl --no-reload disable --now knot.service > /dev/null 2>&1 || : 
fi
postuninstall scriptlet (using /bin/sh):

if [ $1 -ge 1 ] ; then 
        # Package upgrade, not uninstall 
        systemctl try-restart knot.service >/dev/null 2>&1 || : 
fi


My guess it is this command:
/usr/sbin/runuser -u knot -- /usr/sbin/keymgr --dir /var/lib/knot/keys init

And indeed, if I execute it by hand, I get:

$ sudo /usr/sbin/runuser -u knot -- /usr/sbin/keymgr --dir /var/lib/knot/keys init
Unknown command.

Comment 1 Fedora Update System 2016-08-29 10:43:45 UTC
knot-2.3.0-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-175bde50e7

Comment 2 Fedora Update System 2016-08-29 10:43:52 UTC
knot-2.3.0-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ff67874e25

Comment 3 Fedora Update System 2016-08-29 10:43:56 UTC
knot-2.3.0-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8bb054561b

Comment 4 Fedora Update System 2016-08-29 22:52:25 UTC
knot-2.3.0-3.fc23 has been pushed to the Fedora 23 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-2016-ff67874e25

Comment 5 Fedora Update System 2016-08-29 22:52:36 UTC
knot-2.3.0-3.fc24 has been pushed to the Fedora 24 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-2016-8bb054561b

Comment 6 Fedora Update System 2016-08-29 22:55:56 UTC
knot-2.3.0-3.fc25 has been pushed to the Fedora 25 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-2016-175bde50e7

Comment 7 Fedora Update System 2016-09-02 23:27:07 UTC
knot-2.3.0-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2016-09-09 16:54:02 UTC
knot-2.3.0-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2016-09-09 16:55:35 UTC
knot-2.3.0-3.fc24 has been pushed to the Fedora 24 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.