Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 856295

Summary: libselinux-3.4 gives "Regex version mismatch" warning/error when running setfiles orrestorecon
Product: Gentoo Linux Reporter: rjgleits
Component: SELinuxAssignee: SE Linux Bugs <selinux>
Severity: normal CC: sam
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Attachments: emerge --info output

Description rjgleits 2022-07-03 18:51:32 UTC
Created attachment 789992 [details]
emerge --info output


The problem mentioned in the summary appeared to be solved recently in libselinux-3.2, but with the phaseout of python3.9, upgrading to libselinux-3.4 is required. The full message is:
restorecon: Regex version mismatch, expected: 10.40 2022-04-14 actual: 10.39 2021-10-29
I conclude that the problem is there because in the rebuild to python 3.10 usage, the problem first returned after libselinux-3.4 was installed. From looking at the log files, it looks like pcre2 was an option in 3.3, and was set by default to "n". This use option was eliminated in 3.4 and by default 
"use pcre" is "y". Yes, the problem is likely in libpcre2, but I have only pcre2 10.40 installed. , and rebuilding has no effect. There must be some remnant of the previous version somewhere, but I haven't been able to find it. So I thought I should ask the experts about it.
I read the bug report 844982 and tried rebuilding libselinux. It did NOT solve the problem.  

Best Wishes,

Bob Gleitsmann
Comment 1 rjgleits 2022-07-04 15:43:39 UTC
This problem was apparently somewhere in the selinux policy. I am using the git gentoo policy built as targeted. After making sure that the local copy of the git repo was up-to-date. I rebuilt the complete policy. The problem went away as soon as the targeted policy was rebuilt and installed. I can't say what made the difference, I wasn't expecting it to affect this issue. 
I'll accept this as a win and the bug can be considered closed.