Bug 1895614 - SELinux restorecon in %post fails
Summary: SELinux restorecon in %post fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: radicale
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Bieringer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-07 18:34 UTC by Christian Stadelmann
Modified: 2020-11-24 02:09 UTC (History)
3 users (show)

Fixed In Version: radicale-3.0.6-13.fc32 radicale-3.0.6-13.fc33 radicale-3.0.6-13.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-17 01:13:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Christian Stadelmann 2020-11-07 18:34:47 UTC
Description of problem:
DNF shows an error message while installing radicale.

Version-Release number of selected component (if applicable):
radicale3-3.0.6-11.fc33.noarch
libselinux-3.1-2.fc33.x86_64
dnf-4.4.0-3.fc33.noarch

How reproducible:
unclear, tried only once

Steps to Reproduce:
1. My system has been updated from F32 to F33 recently
2. I just tried installing radicale using `dnf install radicale3`

Actual results:
2020-11-07T19:27:35+0100 INFO --- logging initialized ---
2020-11-07T19:27:46+0100 SUBDEBUG Installed: python3-vobject-0.9.6.1-9.fc33.noarch
2020-11-07T19:27:46+0100 SUBDEBUG Installed: python3-defusedxml-0.7.0~rc1-3.fc33.noarch
2020-11-07T19:27:46+0100 SUBDEBUG Installed: python3-bcrypt-3.1.7-6.fc33.x86_64
2020-11-07T19:27:46+0100 SUBDEBUG Installed: python3-radicale3-3.0.6-11.fc33.noarch
2020-11-07T19:27:47+0100 SUBDEBUG Installed: radicale3-3.0.6-11.fc33.noarch
2020-11-07T19:28:15+0100 INFO SELinux semodule store for radicale3 (targeted)
SELinux semodule store for radicale3 (minimum)
SELinux semodule store for radicale3 (mls) SKIPPED - policy not installed
SELinux adjustments for radicale3 port tcp/5232
SELinux fixfiles for: radicale3
SELinux restorecon for: /var/log/radicale
/usr/sbin/restorecon: lstat(/var/log/radicale) failed: No such file or directory
warning: %post(radicale3-3.0.6-11.fc33.noarch) scriptlet failed, exit status 255

2020-11-07T19:28:15+0100 ERROR Error in POSTIN scriptlet in rpm package radicale3

Expected results:
No error.

Additional info:
/var/log does not contain any file or folder named "radicale". It looks like the package should `mkdir /var/log/radicale` or something similar.

Comment 1 Christian Stadelmann 2020-11-07 18:46:14 UTC
After I manually `mkdir /var/log/radicale`, the %post step does not fail any more:


2020-11-07T19:39:01+0100 INFO SELinux semodule store for radicale3 (targeted)
SELinux semodule store for radicale3 (minimum)
SELinux semodule store for radicale3 (mls) SKIPPED - policy not installed
SELinux adjustments for radicale3 port tcp/5232 already done
SELinux fixfiles for: radicale3
SELinux restorecon for: /var/log/radicale

2020-11-07T19:39:01+0100 SUBDEBUG Reinstalled: radicale3-3.0.6-11.fc33.noarch


Should /var/log/radicale be a folder or a file? Which access permission is expected? Which user/group should be the owner?
Or should this %post script be executed only if the folder is present?

Comment 2 Peter Bieringer 2020-11-07 21:34:53 UTC
/var/log/radicale is obsolete in major version 3:

- No longer package /var/log/radicale and the logrotate config for major version 3 (logs only to stdout/stderr now)

but I forgot to remove that from the SELinux file context definition

Please try fixed intermediate build for f33

https://koji.fedoraproject.org/koji/taskinfo?taskID=55132192

Comment 3 Fedora Update System 2020-11-08 09:03:00 UTC
FEDORA-2020-5ad3abc09a has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5ad3abc09a

Comment 4 Peter Bieringer 2020-11-08 09:15:10 UTC
had overseen relabel in post, also fixed now, see https://koji.fedoraproject.org/koji/buildinfo?buildID=1639503

Comment 5 Fedora Update System 2020-11-08 09:34:28 UTC
FEDORA-2020-b5c3310553 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b5c3310553

Comment 6 Fedora Update System 2020-11-08 10:25:48 UTC
FEDORA-EPEL-2020-a01b544713 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-a01b544713

Comment 7 Fedora Update System 2020-11-09 01:45:49 UTC
FEDORA-2020-b5c3310553 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b5c3310553`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b5c3310553

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2020-11-09 01:58:35 UTC
FEDORA-EPEL-2020-a01b544713 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-a01b544713

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2020-11-09 02:24:10 UTC
FEDORA-2020-5ad3abc09a has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-5ad3abc09a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5ad3abc09a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2020-11-17 01:13:08 UTC
FEDORA-2020-b5c3310553 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2020-11-17 01:35:17 UTC
FEDORA-2020-5ad3abc09a has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2020-11-24 02:09:09 UTC
FEDORA-EPEL-2020-a01b544713 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, 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.