Bug 490769 - warning: %post(util-linux-ng-2.14.2-4.fc11.x86_64) scriptlet failed, exit status 1
warning: %post(util-linux-ng-2.14.2-4.fc11.x86_64) scriptlet failed, exit sta...
Product: Fedora
Classification: Fedora
Component: util-linux-ng (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Karel Zak
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-03-17 18:02 EDT by Orion Poplawski
Modified: 2009-04-03 14:18 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-04-02 16:27:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2009-03-17 18:02:01 EDT
Description of problem:

During fresh install:

Installing util-linux-ng-2.14.2-4.fc11.x86_64
warning: %post(util-linux-ng-2.14.2-4.fc11.x86_64) scriptlet failed, exit status 1

I think the requries now needs to be:

Requires(post): libselinux-utils
Comment 1 Karel Zak 2009-03-18 05:29:57 EDT
That's pretty vague error message :-( It would be nice to have more details.

There is 


if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
        SECXT=$( /usr/sbin/matchpathcon -n /var/log/lastlog 2> /dev/null )
        if [ -n "$SECXT" ]; then
                # Selinux enabled, but without policy? It's true for buildroots
                # without selinux stuff on host machine with enabled selinux.
                # We don't want to use any RPM dependence on selinux policy for
                # matchpathcon(2). SELinux policy should be optional.
                /usr/bin/chcon "$SECXT"  /var/log/lastlog >/dev/null 2>&1

it means the script does not require selinux stuff. I guess we don't want to install selinux utils on all machines.
Comment 2 Orion Poplawski 2009-04-02 16:35:44 EDT
Looks like it's fixed, but just for the record:

+ '[' -x /usr/sbin/selinuxenabled ']'
+ /usr/sbin/selinuxenabled
++ /usr/sbin/matchpathcon -n /var/log/lastlog
+ SECXT='<<none>>'
+ '[' -n '<<none>>' ']'
+ /usr/bin/chcon '<<none>>' /var/log/lastlog
/usr/bin/chcon: invalid context: <<none>>
warning: %post(util-linux-ng-2.14.2-8.fc11.x86_64) scriptlet failed, exit status 1

Not sure why matchpathcon returns '<<none>>'.
Comment 3 Karel Zak 2009-04-02 17:02:43 EDT
> /usr/sbin/matchpathcon -n /var/log/lastlog
> Not sure why matchpathcon returns '<<none>>'

Yeah, good question. CC to Dan.
Comment 4 Orion Poplawski 2009-04-02 18:14:00 EDT
Presumably because anaconda doesn't run with a selinux policy?
Comment 5 Daniel Walsh 2009-04-03 14:18:44 EDT
Well matchpathcon is probably looking for a location for the file context that does not exist yet.

selinux policy is not installed, yet so file_context file is not there for matchpathcon to read.

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