Bug 2093594 - kickstart install halts on failure of posttrans script in selinux-policy-targeted
Summary: kickstart install halts on failure of posttrans script in selinux-policy-targ...
Keywords:
Status: CLOSED DUPLICATE of bug 2082547
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 36
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-04 15:21 UTC by scott.robinson55
Modified: 2022-12-30 12:48 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-12-30 12:48:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Kickstart which triggers failure (1.01 KB, text/plain)
2022-06-07 12:29 UTC, scott.robinson55
no flags Details
anaconda.log (123.08 KB, text/plain)
2022-06-07 12:30 UTC, scott.robinson55
no flags Details
packaging.log (13.18 KB, text/plain)
2022-06-07 12:31 UTC, scott.robinson55
no flags Details

Description scott.robinson55 2022-06-04 15:21:15 UTC
Using a kickstart which excludes NetworkManager, the installation halts at the posttrans scriplet for selinux-policy-targeted. The script fails because /etc/NetworkManager/distacher.d is not present. This fails even though the restorecon -i flag is used.

Comment 1 Zdenek Pytela 2022-06-06 22:17:25 UTC
Hi,

Can you provide me some details?
Are there any related log/journal entries?
How the kickstart file look like?
What is the selinux-policy package version?

This is the specfile part:

%posttrans targeted
%checkConfigConsistency targeted
%{_sbindir}/restorecon -Ri /usr/lib/sysimage/rpm /var/lib/rpm /etc/NetworkManager/dispatcher.d

The restorecon(8) manpage reads:
       -i     ignore files that do not exist.

which so far has been sufficient.

Comment 2 scott.robinson55 2022-06-07 12:29:37 UTC
Created attachment 1887526 [details]
Kickstart which triggers failure

Package selinux-policy-targeted-36.10-1.fc36

Comment 3 scott.robinson55 2022-06-07 12:30:39 UTC
Created attachment 1887527 [details]
anaconda.log

Comment 4 scott.robinson55 2022-06-07 12:31:15 UTC
Created attachment 1887528 [details]
packaging.log

Comment 5 scott.robinson55 2022-07-10 15:45:43 UTC
I rebuilt package using the following change to the spec file:

%posttrans targeted
%checkConfigConsistency targeted
%{_sbindir}/restorecon -R /usr/lib/sysimage/rpm /var/lib/rpm
if [ -d /etc/NetworkManager/dispatcher.d ]; then
%{_sbindir}/restorecon -R /etc/NetworkManager/dispatcher.d
fi

The above scriptlet passes. I don't understand why the -i flag fails during an install.

Comment 6 Villy Kruse 2022-12-24 14:43:58 UTC
(In reply to scott.robinson55 from comment #5)


> 
> The above scriptlet passes. I don't understand why the -i flag fails during
> an install.

It will not fail if /etc/NetworkManager exists but is empty.

Comment 7 scott.robinson55 2022-12-30 12:48:28 UTC

*** This bug has been marked as a duplicate of bug 2082547 ***


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