Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package filesystem-media for
openSUSE:Factory checked in at 2026-09-17 15:18:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/filesystem-media (Old)
and /work/SRC/openSUSE:Factory/.filesystem-media.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "filesystem-media"
Thu Sep 17 15:18:03 2026 rev:2 rq:1378225 version:0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/filesystem-media/filesystem-media.changes
2025-04-08 17:53:16.759648045 +0200
+++
/work/SRC/openSUSE:Factory/.filesystem-media.new.383539/filesystem-media.changes
2026-09-17 15:18:50.647515065 +0200
@@ -1,0 +2,6 @@
+Mon Aug 31 10:48:13 UTC 2026 - Cathy Hu <[email protected]>
+
+- Add custom SELinux module (polymedia.te) for polyinstantiated /media
+ (bsc#1273214)
+
+-------------------------------------------------------------------
New:
----
polymedia.te
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ filesystem-media.spec ++++++
--- /var/tmp/diff_new_pack.U3XxVJ/_old 2026-09-17 15:18:52.184579584 +0200
+++ /var/tmp/diff_new_pack.U3XxVJ/_new 2026-09-17 15:18:52.188579752 +0200
@@ -1,7 +1,7 @@
#
# spec file for package filesystem-media
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,13 @@
#
+%if 0%{?suse_version} >= 1699
+%bcond_without selinux
+%endif
+%global modulename polymedia
+%global selinuxtype targeted
+%global selinuxbooleans polyinstantiation_enabled=1
+
%if ! %{defined _distconfdir}
%define support_distconfdir 0
%define _confdir %{_sysconfdir}
@@ -32,9 +39,14 @@
Source1: %{name}.README
Source2: %{name}.init
Source3: %{name}-rpmlintrc
+Source4: %{modulename}.te
BuildRequires: pam
BuildRequires: pam-devel
+BuildRequires: pkgconfig(systemd)
Requires: acl
+%if %{with selinux}
+Requires: (%{name}-selinux if selinux-policy-%{selinuxtype})
+%endif
Requires(post): pam
#Supplements: udisks2
BuildArch: noarch
@@ -43,6 +55,20 @@
The Filesystem Hierarchy Standard defines /media as a directory for removable
media. This package provides an udisks compatible /media directory.
+%if %{with selinux}
+# SELinux subpackage
+%package selinux
+Summary: SELinux policy for filesystem-media
+BuildArch: noarch
+Requires: selinux-policy-%{selinuxtype}
+Requires(post): selinux-policy-%{selinuxtype}
+BuildRequires: selinux-policy-devel
+%{?selinux_requires}
+
+%description selinux
+Custom SELinux policy module for filesystem-media
+%endif
+
%prep
%setup -q -c -T
cp %{SOURCE1} README
@@ -50,11 +76,23 @@
%build
+%if %{with selinux}
+mkdir selinux
+cp -p %{SOURCE4} selinux/
+
+make -f %{_datadir}/selinux/devel/Makefile %{modulename}.pp
+bzip2 -9 %{modulename}.pp
+%endif
+
%install
mkdir %{buildroot}/media
mkdir -p %{buildroot}%{_confdir}/security/namespace.d
install %{name}.init %{buildroot}%{_confdir}/security/namespace.d/
+%if %{with selinux}
+install -D -m 0644 %{modulename}.pp.bz2
%{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2
+%endif
+
%triggerin -- pam xdm gdm util-linux lxdm sddm
RC=0
# Activate pam_namespace in PAM configuration.
@@ -127,6 +165,29 @@
done
fi
+%if %{with selinux}
+# SELinux contexts are saved so that only affected files can be
+# relabeled after the policy module installation
+%pre selinux
+%selinux_relabel_pre -s %{selinuxtype}
+
+%post selinux
+%selinux_modules_install -s %{selinuxtype}
%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2
+if [ $1 -eq 1 ]; then
+ %selinux_set_booleans -s %{selinuxtype} %{selinuxbooleans}
+fi
+
+%postun selinux
+if [ $1 -eq 0 ]; then
+ %selinux_modules_uninstall -s %{selinuxtype} %{modulename}
+ %selinux_unset_booleans -s %{selinuxtype} %{selinuxbooleans}
+fi
+
+%posttrans selinux
+%selinux_relabel_post -s %{selinuxtype}
+# if with_selinux
+%endif
+
%files
%doc README
/media
@@ -136,3 +197,9 @@
%dir %{_confdir}/security/namespace.d
%endif
+%if %{with selinux}
+%files selinux
+%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.*
+%ghost %dir %attr(0700,root,root) %verify(not md5 size mode mtime)
%{_selinux_store_path}/%{selinuxtype}/active/modules/200/%{modulename}
+%endif
+
++++++ polymedia.te ++++++
module polymedia 1.0;
require {
type mnt_t;
}
files_poly(mnt_t)
files_poly_parent(mnt_t)