Closed johanneskastl closed 9 months ago
i can confirm this on MicroOS
transactional update # zypper remove rke2-selinux && zypper install rke2-selinux
Reading installed packages...
Resolving package dependencies...
The following package is going to be REMOVED:
rke2-selinux
1 package to remove.
After the operation, 110.6 KiB will be freed.
Continue? [y/n/v/...? shows all options] (y): y
(1/1) Removing rke2-selinux-0.15-1.sle.noarch ................................................................................................................................................................................................................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
rke2-selinux
1 new package to install.
Overall download size: 21.1 KiB. Already cached: 0 B. After the operation, additional 110.6 KiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: rke2-selinux-0.15-1.sle.noarch (Rancher RKE2 Common (stable)) (1/1), 21.1 KiB
Retrieving: rke2-selinux-0.15-1.sle.noarch.rpm ..................................................................................................................................................................................................[done (21.1 KiB/s)]
Checking for file conflicts: .................................................................................................................................................................................................................................[done]
/sbin/setfiles: /var/lib/selinux/final/targeted/contexts/files/file_contexts: line 1 has invalid regex +/var/lib/rancher/rke2/server/tls(/.*)?: REGEX back-end error: At offset 1: quantifier does not follow a repeatable item
/sbin/setfiles: /var/lib/selinux/final/targeted/contexts/files/file_contexts: line 1 has invalid regex +/var/lib/rancher/rke2/server/tls(/.*)?: REGEX back-end error: At offset 1: quantifier does not follow a repeatable item
/var/lib/selinux/final/targeted/contexts/files/file_contexts: Invalid argument
libsemanage.semanage_validate_and_compile_fcontexts: setfiles returned error code 1.
semodule: Failed!
(1/1) Installing: rke2-selinux-0.15-1.sle.noarch .............................................................................................................................................................................................................[done]
Executing %posttrans scripts .................................................................................................................................................................................................................................[done]
transactional update #
Seems like this line is the culprit: https://github.com/rancher/rke2-selinux/blob/f6d5407dbe2dc45a71e2fbcd7d50514ea3f4621d/policy/microos/rke2.fc#L24
+
at the beginning of line, other distros don't have it
I have switched my install to zypper install rke2-selinux
and it goes with 0.14
from base repos. Will keep as is, but perhaps the fix is really just to remove the +
Any updates on this?
Reopened for testing
@dennislapchenko @johanneskastl Thanks for openning the issue and resolving it, the issue is marked for testing now
Thanks, I just tested building the package and it built successfully
Thank you for validating! I am going to close this out and we can revisit if more errors occur.
Any chance this can be released?
I updated the openSUSE package for rke2-selinux to 0.15.stable.1, but it fails to build:
Other than using the new version (tarball, etc.) I have not changed anything in the package, and the packaging does not create this file manually. Hence my guess is that this file is autogenerated by
make -f /usr/share/selinux/devel/Makefile rke2.pp
.