Add %apparmor_profilesdir
OBS-URL: https://build.opensuse.org/package/show/security:apparmor/apparmor-rpm-macros?expand=0&rev=17
This commit is contained in:
commit
5ad890b9f8
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
50
apparmor-rpm-macros.changes
Normal file
50
apparmor-rpm-macros.changes
Normal file
@ -0,0 +1,50 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 3 09:28:40 UTC 2024 - Georg Pfuetzenreuter <mail+rpm@georg-pfuetzenreuter.net>
|
||||
|
||||
- Add %apparmor_profilesdir
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 20 12:15:28 UTC 2024 - Frederic Crozat <fcrozat@suse.com>
|
||||
|
||||
- Update macro to detect when installing in chroot
|
||||
(transactional-update) and avoid calling apparmor_parser.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 3 14:30:51 UTC 2023 - Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
|
||||
|
||||
- No longer suppress stderr
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 19 11:08:48 CEST 2019 - kukuk@suse.de
|
||||
|
||||
- Don't assume systemctl is already installed or available at all.
|
||||
- Files in /usr/lib/rpm/macros.d are no config files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 8 16:53:08 UTC 2019 - Christian Boltz <suse-beta@cboltz.de>
|
||||
|
||||
- move macros.apparmor from /etc/rpm/ to /usr/lib/rpm/macros.d/
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 28 06:37:37 UTC 2018 - tbechtold@suse.com
|
||||
|
||||
- Check if apparmor is active before reloading a profile (bsc#1083226)
|
||||
Otherwise a package using the %apparmor_reload macro in %post
|
||||
automatically enables the profile even if apparmor itself is
|
||||
not active.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 26 19:08:14 UTC 2017 - suse-beta@cboltz.de
|
||||
|
||||
- %apparmor_reload: skip and regenerate cache to make sure the latest
|
||||
profile gets always used (even if the existing cache is newer)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 11 11:01:29 UTC 2017 - jengelh@inai.de
|
||||
|
||||
- RPM group fix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 13 22:38:35 UTC 2016 - ushamim@linux.com
|
||||
|
||||
- Initial creation of macro, only contains %apparmor_reload
|
48
apparmor-rpm-macros.spec
Normal file
48
apparmor-rpm-macros.spec
Normal file
@ -0,0 +1,48 @@
|
||||
#
|
||||
# spec file for package apparmor-rpm-macros
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: apparmor-rpm-macros
|
||||
Version: 1.0
|
||||
Release: 0
|
||||
Summary: RPM macros used to setup apparmor profiles
|
||||
License: LGPL-2.1-or-later
|
||||
Group: Development/Tools/Other
|
||||
URL: https://bugs.launchpad.net/apparmor
|
||||
Source: macros.apparmor
|
||||
Requires: coreutils
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%define macrodir /usr/lib/rpm/macros.d
|
||||
|
||||
%description
|
||||
Package that provides RPM macros used to setup apparmor profiles for packaging.
|
||||
|
||||
%prep
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{macrodir}
|
||||
install -m644 %{S:0} %{buildroot}%{macrodir}/
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{macrodir}/macros.apparmor
|
||||
|
||||
%changelog
|
13
macros.apparmor
Normal file
13
macros.apparmor
Normal file
@ -0,0 +1,13 @@
|
||||
%apparmor_profilesdir %{_sysconfdir}/apparmor.d
|
||||
|
||||
%apparmor_reload()\
|
||||
if [ "$YAST_IS_RUNNING" != "instsys" -a -x /usr/bin/systemd-detect-virt -a -x /usr/bin/systemctl ]; then\
|
||||
systemd-detect-virt --chroot --quiet \
|
||||
NOT_IN_CHROOT=$? \
|
||||
if [ $NOT_IN_CHROOT -gt 0 ]; then \
|
||||
if /usr/bin/systemctl is-active --quiet apparmor.service; then\
|
||||
/sbin/apparmor_parser -r -T -W %{?*} > /dev/null || :\
|
||||
fi\
|
||||
fi \
|
||||
fi\
|
||||
%{nil}
|
Loading…
x
Reference in New Issue
Block a user