Skip to content

Commit

Permalink
Add RPM macros; moved from rpm-config-SUSE
Browse files Browse the repository at this point in the history
  • Loading branch information
DimStar77 authored and mgerstner committed Oct 29, 2024
1 parent 2dc4598 commit fc19402
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ install_data(sources: 'zypper-plugin/permissions.py', install_dir: 'lib/zypp/plu
install_data(sources: ['etc/variables.conf', 'etc/permissions', 'profiles/permissions.easy', 'profiles/permissions.secure', 'profiles/permissions.paranoid'], install_dir: 'share/permissions')
install_data(sources: 'etc/permissions.local', install_dir: '/etc')
install_subdir('permissions.d', install_dir: 'share/permissions')
install_data(sources: 'rpm_macros/macros.permissions', install_dir: 'lib/rpm/macros.d')
17 changes: 17 additions & 0 deletions rpm_macros/macros.permissions
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

%set_permissions(f:) \
if [ -x /usr/bin/permctl ]; then \
/usr/bin/permctl -n --set --system %{**} || : \
elif [ -x /usr/bin/chkstat ]; then \
/usr/bin/chkstat -n --set --system %{**} || : \
fi \
%nil

%verify_permissions(e:f:) \
if [ -x /usr/bin/permctl ]; then \
/usr/bin/permctl -n --warn --system %{**} 1>&2 \
else \
/usr/bin/chkstat -n --warn --system %{**} 1>&2 \
fi \
%nil

0 comments on commit fc19402

Please sign in to comment.