Commit Graph

21 Commits

Author SHA1 Message Date
Packit
49bc669c11 [packit] 1.0.10 upstream release
- Resolves rhbz#2250424

Upstream tag: 1.0.10
Upstream commit: a672fbbb

Resolves: RHEL-22815
2024-01-26 12:56:36 +01:00
Packit
628db8954c 1.0.9 upstream release
- Resolves rhbz#2250360

Upstream tag: 1.0.9
Upstream commit: 2d5769f5

Related: RHEL-22815
2024-01-26 12:56:31 +01:00
Michal Schorm
4d11b984a9 Bump release for rebuild
Related: RHEL-22815
2024-01-26 12:56:28 +01:00
Michal Schorm
fb42483875 Fix the file path for the compiled SELinux policy
Related: RHEL-22815
2024-01-26 12:56:24 +01:00
Michal Schorm
3d7d9ef85a Add explanation about not packing the SELinux interface file
Related: RHEL-22815
2024-01-26 12:56:20 +01:00
Michal Schorm
287c01f9ef Remove unused macro
Related: RHEL-22815
2024-01-26 12:56:16 +01:00
Michal Schorm
888006568e Add useful notes for maintainers
Related: RHEL-22815
2024-01-26 12:56:10 +01:00
Michal Schorm
299486dc8d Don't ignore errors in SELinux scriptlets
... well, at leats on the SPECfile side. They are still being ignored in the macros themselves

$ rpm -E %selinux_modules_install
|
| if [ -e /etc/selinux/config ]; then
|   . /etc/selinux/config
| fi
| _policytype=
| if [ -z "${_policytype}" ]; then
|   _policytype="targeted"
| fi
| if [ "${SELINUXTYPE}" = "${_policytype}" ]; then
|   /usr/sbin/semodule -n -s ${_policytype} -X 200 -i  || :
|   /usr/sbin/selinuxenabled && /usr/sbin/load_policy || :
| fi

$ rpm -E %selinux_modules_uninstall
|
| if [ -e /etc/selinux/config ]; then
|   . /etc/selinux/config
| fi
| _policytype=
| if [ -z "${_policytype}" ]; then
|   _policytype="targeted"
| fi
| if [ $1 -eq 0 ]; then
|   if [ "${SELINUXTYPE}" = "${_policytype}" ]; then
|     /usr/sbin/semodule -n -X 200 -s ${_policytype} -r  &> /dev/null || :
|     /usr/sbin/selinuxenabled && /usr/sbin/load_policy || :
|   fi
| fi

Defined here:
https://src.fedoraproject.org/rpms/selinux-policy/blob/rawhide/f/rpm.macros#_48

The reason is described here: https://bugzilla.redhat.com/show_bug.cgi?id=1665643
TL;DR: The return values of any scriptlet in Fedora MUST be zero.
No matter how the errors in the scriptlets are handled.
For now, the "handled" means "ignored" in the case of SELinux scriplet macros.

Related: RHEL-22815
2024-01-26 12:56:05 +01:00
Michal Schorm
10f5e1ccd8 Additional explanation for the previous commit:
In the previous commit, the line:
both the line
| Requires(post): policycoreutils
and
is removed, since it is already contained in the macro
| %{?selinux_requires}
on line after them.

$ rpm -E %{?selinux_requires}
|
| Requires: selinux-policy >= 37.22-1.fc37
| BuildRequires: pkgconfig(systemd)
| BuildRequires: selinux-policy
| BuildRequires: selinux-policy-devel
| Requires(post): selinux-policy-base >= 37.22-1.fc37
| Requires(post): libselinux-utils
| Requires(post): policycoreutils
| %if 037 || 0 > 7
| Requires(post): policycoreutils-python-utils
| %else
| Requires(post): policycoreutils-python
| %endif

Defined here:
https://src.fedoraproject.org/rpms/selinux-policy/blob/rawhide/f/rpm.macros#_32

However this can't be applied to the line:
| BuildRequires:  selinux-policy-devel
Since the it is a recursive problem - the BuildRequires has to be already evaluated
for a package containing the macro %{?selinux_requires} to be brought in.
So the additional BuildRequires that macro brings has no effect as the evaluation
of this kind of symbols has already finished.

That's why in the examples as:
https://fedoraproject.org/wiki/SELinux/IndependentPolicy#Example_spec_file_changes_to_incorporate_-selinux_subpackage
is the lines
| BuildRequires:       selinux-policy-devel
| %{?selinux_requires}
Next to each other.
Even though the first line would seem redundant, it in fact isn´t.

In this commit, I've changed ordering of the lines to group up same symbols together as they logically go one after another.
I believe that having all BuildRequires grouped together is easier to read and understand.

Related: RHEL-22815
2024-01-26 12:55:59 +01:00
Vit Mojzis
16200dea84 selinux: Add missing dependencies
This policy module only works with "targeted" policy.

Signed-off-by: Vit Mojzis <vmojzis@redhat.com>

Related: RHEL-22815
2024-01-26 12:55:55 +01:00
Packit
d819058731 1.0.7 upstream release
Upstream tag: 1.0.7
Upstream commit: d718485d

Related: RHEL-22815
2024-01-26 12:55:47 +01:00
Adam Dobes
fee69f420d Rebase to 1.0.6
--

Cherry-picked Fedora commit: 5a6e459aaa

--

Resolves: #2186519
2023-07-17 15:01:10 +02:00
Lukas Javorsky
2954f9585f migrated to SPDX license
--

Cherry-picked Fedora commit: 46421d1421

--

Related: #2186519
2023-07-17 14:55:12 +02:00
Honza Horak
87f6fc6069 Replace whole repo with latest content from branch rhel-8.8.0
Content corresponds with RHEL dist-git commit 50913d1
2023-06-22 15:12:47 +02:00
Troy Dawson
572455e5ed Bring gating.yaml over from Brew dist-git
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-03-10 11:06:43 -08:00
James Antill
ecfd01d3ff Import rpm: c8s 2023-02-27 14:30:41 -05:00
CentOS Sources
b64fd41c0b Auto sync2gitlab import of mysql-selinux-1.0.5-1.el8_6.src.rpm 2023-01-15 11:11:10 +00:00
James Antill
d1b7e1bf12 Auto sync2gitlab import of mysql-selinux-1.0.2-6.el8.src.rpm 2022-06-29 14:07:44 -04:00
CentOS Sources
1525b63782 Auto sync2gitlab import of mysql-selinux-1.0.5-1.el8_6.src.rpm 2022-06-16 05:25:50 +00:00
James Antill
e1477527bc Auto sync2gitlab import of mysql-selinux-1.0.2-6.el8.src.rpm 2022-05-26 11:52:43 -04:00
James Antill
f7de525713 Initial c8s branch. 2022-05-26 11:52:40 -04:00