Commit Graph

35 Commits

Author SHA1 Message Date
Michal Schorm
9c12585523 Bump release for rebuild 2023-09-26 11:37:35 +02:00
Michal Schorm
46a1298455 Fix the file path for the compiled SELinux policy 2023-09-25 15:59:23 +02:00
Michal Schorm
dc050809ee Add explanation about not packing the SELinux interface file 2023-09-18 13:29:35 +02:00
Michal Schorm
47539afff6 Remove unused macro 2023-09-18 13:26:30 +02:00
Michal Schorm
59c8bd66ed Add useful notes for maintainers 2023-09-15 17:15:54 +02:00
Michal Schorm
dced3fa222 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.
2023-09-15 17:15:29 +02:00
Michal Schorm
3294b48acf 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.
2023-09-15 17:12:38 +02:00
Vit Mojzis
4eb06a14fa selinux: Add missing dependencies
This policy module only works with "targeted" policy.

Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
2023-09-15 01:10:23 +00:00
Packit
6427b57347 [packit] 1.0.7 upstream release
Upstream tag: 1.0.7
Upstream commit: d718485d
2023-09-14 09:12:41 +00:00
Fedora Release Engineering
0f1497ce39 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 16:09:50 +00:00
Adam Dobes
5a6e459aaa Rebase to 1.0.6 2023-07-12 09:50:00 +02:00
Lukas Javorsky
46421d1421 migrated to SPDX license 2023-03-30 20:59:46 +00:00
Fedora Release Engineering
ed475679a9 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 21:04:54 +00:00
Fedora Release Engineering
5b43fd2701 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 00:04:40 +00:00
Michal Schorm
f1c1fc7ee0 Changelog fixup 2022-06-09 13:15:18 +02:00
Michal Schorm
f2713718dc Rebase to 1.0.5 2022-06-09 12:02:46 +02:00
Fedora Release Engineering
823bc60d9c - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 20:44:42 +00:00
Michal Schorm
082bdac247 Code reorganisation
- whitespace changes
 - remove empty %check phase
 - move all scriptlets to one place
2021-09-13 13:23:20 +02:00
Michal Schorm
298890f801 Fix RPMLint warning: "invalid-url Source0"
Fixed by: https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_troublesome_urls
2021-09-13 13:15:19 +02:00
Fedora Release Engineering
86ead9d5f0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 15:41:48 +00:00
Lukas Javorsky
3912ff929c Fix rpm verification 2021-04-21 12:36:17 +02:00
Lukas Javorsky
0ade28e922 Rebase to 1.0.4
Unintentional removal of semicolon
2021-03-19 14:29:40 +01:00
Lukas Javorsky
86e2325373 Rebase to 1.0.3
Remove setuid/setgid capabilities from mysqld_t type
2021-03-19 13:40:14 +01:00
Fedora Release Engineering
7e7c60d649 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 21:06:30 +00:00
Tom Stellard
62476d80f9 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-13 01:30:38 +00:00
Michal Schorm
eb1050533e Rebase to 1.0.2 release
Added context for "*mariadb*" named executables

---

Since MariaDB 10.4, the upstream added "*mariadb*" named symlinks for "*mysql*" named executables.
https://jira.mariadb.org/browse/MDEV-17591

Since MariaDB 10.5, the upstream switched them, so the executables are now "*mariadb*" named and the symlinks are "*mysql*" named.
https://jira.mariadb.org/browse/MDEV-21303

Without these SELinux rules, the new "*mariadb*" files haven't got a correct context.
2020-12-02 17:44:50 +01:00
Michal Schorm
ce61608e90 Rebase to 1.0.1 release
This release is just a sync-up with upstream selinux-policy

URL changed to a new upstream repository
2020-12-01 20:27:03 +01:00
Fedora Release Engineering
fd39bdb0bb - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 08:43:58 +00:00
Fedora Release Engineering
4f3d66e6a7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 14:25:49 +00:00
Fedora Release Engineering
b899b4860c - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 11:49:31 +00:00
Kevin Fenzi
3b6bf9fe8a Also make sure posttrans does not fail. 2019-01-11 09:19:40 -08:00
Kevin Fenzi
4f4cd0648d Add Requires(post) on policycoreutils for semodule and make sure post/postun cannot fail 2019-01-10 12:23:05 -08:00
Jakub Janco
45339f4452 Sync with upstream 2018-12-06 10:44:21 +01:00
Jakub Janco
2480c0f9a9 add missing spec file changes 2018-08-29 17:04:53 +02:00
Jakub Janco
a23ed9375c initial version 1.0.0-3 2018-08-20 16:00:36 +02:00