2006-12-19 00:17:28 +01:00
|
|
|
#
|
2011-02-11 01:28:32 +01:00
|
|
|
# spec file for package permissions
|
2006-12-19 00:17:28 +01:00
|
|
|
#
|
2024-01-30 13:51:55 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2006-12-19 00:17:28 +01:00
|
|
|
#
|
2008-09-13 06:56:01 +02:00
|
|
|
# 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.
|
|
|
|
|
2019-07-12 11:02:35 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-19 00:17:28 +01:00
|
|
|
#
|
|
|
|
|
2012-07-06 16:11:34 +02:00
|
|
|
|
2006-12-19 00:17:28 +01:00
|
|
|
Name: permissions
|
2024-05-13 12:50:52 +02:00
|
|
|
Version: 1699_20240513
|
2012-07-06 16:11:34 +02:00
|
|
|
Release: 0
|
2006-12-19 00:17:28 +01:00
|
|
|
Summary: SUSE Linux Default Permissions
|
2017-11-30 11:35:19 +01:00
|
|
|
# Maintained in github by the security team.
|
2018-07-24 13:46:06 +02:00
|
|
|
License: GPL-2.0-or-later
|
2012-07-06 16:11:34 +02:00
|
|
|
Group: Productivity/Security
|
2019-11-18 10:54:19 +01:00
|
|
|
URL: http://github.com/openSUSE/permissions
|
2024-02-27 13:47:01 +01:00
|
|
|
Source: permissions-%{version}.tar.xz
|
2022-12-20 14:08:47 +01:00
|
|
|
Source2: permissions.rpmlintrc
|
2020-03-02 14:50:40 +01:00
|
|
|
BuildRequires: gcc-c++
|
2024-05-13 12:50:52 +02:00
|
|
|
BuildRequires: libacl-devel
|
2019-06-05 14:35:17 +02:00
|
|
|
BuildRequires: libcap-devel
|
2020-03-02 14:50:40 +01:00
|
|
|
BuildRequires: libcap-progs
|
2024-03-11 14:01:23 +01:00
|
|
|
BuildRequires: meson
|
2023-11-30 11:49:23 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2020-05-18 13:33:57 +02:00
|
|
|
BuildRequires: tclap
|
2020-06-16 18:20:27 +02:00
|
|
|
# test suite
|
|
|
|
BuildRequires: python3-base
|
2024-05-13 13:37:11 +02:00
|
|
|
Requires: permctl
|
2019-04-12 15:08:09 +02:00
|
|
|
Requires: permissions-config
|
2020-03-02 14:50:40 +01:00
|
|
|
Provides: aaa_base:%{_datadir}/permissions
|
2006-12-19 00:17:28 +01:00
|
|
|
|
2007-04-18 18:37:08 +02:00
|
|
|
%prep
|
2024-02-27 13:47:01 +01:00
|
|
|
%autosetup
|
2006-12-19 00:17:28 +01:00
|
|
|
|
|
|
|
%build
|
2024-03-11 14:01:23 +01:00
|
|
|
%meson
|
|
|
|
%meson_build
|
2006-12-19 00:17:28 +01:00
|
|
|
|
|
|
|
%install
|
2024-03-11 14:01:23 +01:00
|
|
|
%meson_install
|
2023-11-30 11:49:23 +01:00
|
|
|
# Fix shebang in scripts: Remove dependency on /usr/bin/python3,
|
|
|
|
# making scripts to depends on the real python3 binary, not the link.
|
|
|
|
# (bsc#1212476)
|
|
|
|
for f in %{buildroot}/usr/lib/zypp/plugins/commit/*
|
|
|
|
do
|
|
|
|
[ -f $f ] && sed -i "1s@#\!.*python.*@#\!$(realpath %__python3)@" $f
|
|
|
|
done
|
2006-12-19 00:17:28 +01:00
|
|
|
|
2024-05-13 13:34:14 +02:00
|
|
|
%check
|
|
|
|
# will fail on qemu with unshare: unshare failed: Invalid argument
|
|
|
|
%if !0%{?qemu_user_space_build}
|
|
|
|
tests/regtest.py --skip-build %_vpath_builddir >/dev/null
|
|
|
|
%endif
|
2020-03-02 14:50:40 +01:00
|
|
|
|
2019-04-12 15:08:09 +02:00
|
|
|
%description
|
2022-12-20 11:43:28 +01:00
|
|
|
File and directory permission settings depending on the local security
|
|
|
|
settings. The local security setting ("easy", "secure", or "paranoid") can be
|
|
|
|
configured in /etc/sysconfig/security.
|
2019-04-12 15:08:09 +02:00
|
|
|
|
2019-04-15 20:37:33 +02:00
|
|
|
This package does not contain files, it just requires the necessary packages.
|
2006-12-19 00:17:28 +01:00
|
|
|
|
|
|
|
%files
|
2019-04-12 15:08:09 +02:00
|
|
|
|
|
|
|
%package config
|
|
|
|
Summary: SUSE Linux Default Permissions config files
|
|
|
|
Group: Productivity/Security
|
2019-06-05 13:28:29 +02:00
|
|
|
Requires(post): %fillup_prereq
|
2024-05-13 13:37:11 +02:00
|
|
|
Requires(post): permctl
|
2019-06-05 13:28:29 +02:00
|
|
|
#!BuildIgnore: group(trusted)
|
|
|
|
Requires(pre): group(trusted)
|
2024-02-27 13:47:01 +01:00
|
|
|
Obsoletes: permissions-doc <= %{version}
|
2022-12-20 11:43:28 +01:00
|
|
|
BuildArch: noarch
|
2019-04-12 15:08:09 +02:00
|
|
|
|
|
|
|
%description config
|
2020-03-02 14:50:40 +01:00
|
|
|
The actual permissions configuration files, /usr/share/permissions/permission.*.
|
2019-04-12 15:08:09 +02:00
|
|
|
|
|
|
|
%files config
|
2020-03-02 14:50:40 +01:00
|
|
|
%defattr(644, root, root, 755)
|
|
|
|
%dir %{_datadir}/permissions
|
2024-01-30 13:51:55 +01:00
|
|
|
%dir %{_datadir}/permissions/permissions.d
|
2020-03-02 14:50:40 +01:00
|
|
|
%{_datadir}/permissions/permissions
|
|
|
|
%{_datadir}/permissions/permissions.easy
|
|
|
|
%{_datadir}/permissions/permissions.secure
|
|
|
|
%{_datadir}/permissions/permissions.paranoid
|
2020-11-11 11:46:39 +01:00
|
|
|
%{_datadir}/permissions/variables.conf
|
2017-11-30 11:35:19 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/permissions.local
|
2019-04-12 15:08:09 +02:00
|
|
|
%{_fillupdir}/sysconfig.security
|
2020-12-07 14:52:52 +01:00
|
|
|
%{_mandir}/man5/permissions.5%{ext_man}
|
2019-04-12 15:08:09 +02:00
|
|
|
|
|
|
|
%post config
|
|
|
|
%{fillup_only -n security}
|
|
|
|
# apply all potentially changed permissions
|
2024-05-13 12:50:52 +02:00
|
|
|
%{_bindir}/permctl --system || :
|
2019-04-12 15:08:09 +02:00
|
|
|
|
2024-05-13 13:37:11 +02:00
|
|
|
%package -n permctl
|
2019-04-12 15:08:09 +02:00
|
|
|
Summary: SUSE Linux Default Permissions tool
|
|
|
|
Group: Productivity/Security
|
2024-05-13 13:37:11 +02:00
|
|
|
Provides: chkstat = %version-%release
|
|
|
|
Obsoletes: chkstat < %version-%release
|
2019-04-12 15:08:09 +02:00
|
|
|
|
2024-05-13 13:37:11 +02:00
|
|
|
%description -n permctl
|
2019-04-15 20:37:33 +02:00
|
|
|
Tool to check and set file permissions.
|
2019-04-12 15:08:09 +02:00
|
|
|
|
2024-05-13 13:37:11 +02:00
|
|
|
%files -n permctl
|
2007-06-03 22:01:01 +02:00
|
|
|
%{_bindir}/chkstat
|
2024-05-13 12:50:52 +02:00
|
|
|
%{_bindir}/permctl
|
|
|
|
%{_mandir}/man8/permctl.8%{ext_man}
|
2007-12-03 23:29:54 +01:00
|
|
|
|
2018-11-16 17:39:18 +01:00
|
|
|
%package -n permissions-zypp-plugin
|
|
|
|
BuildArch: noarch
|
2022-08-08 09:50:18 +02:00
|
|
|
Requires: permissions = %{version}
|
2018-11-16 17:39:18 +01:00
|
|
|
Requires: python3-zypp-plugin
|
|
|
|
Requires: libzypp(plugin:commit) = 1
|
2024-05-13 12:50:52 +02:00
|
|
|
Summary: A zypper commit plugin for calling permctl
|
2018-11-16 17:39:18 +01:00
|
|
|
Group: Productivity/Security
|
|
|
|
|
|
|
|
%description -n permissions-zypp-plugin
|
2024-05-13 12:50:52 +02:00
|
|
|
This package contains a plugin for zypper that calls `permctl --system` after
|
2018-11-16 17:39:18 +01:00
|
|
|
new packages have been installed. This is helpful for maintaining custom
|
|
|
|
entries in /etc/permissions.local.
|
|
|
|
|
|
|
|
%files -n permissions-zypp-plugin
|
|
|
|
%dir /usr/lib/zypp
|
|
|
|
%dir /usr/lib/zypp/plugins
|
|
|
|
%dir /usr/lib/zypp/plugins/commit
|
|
|
|
/usr/lib/zypp/plugins/commit/permissions.py
|
|
|
|
|
2007-02-25 23:35:05 +01:00
|
|
|
%changelog
|