2006-12-18 23:17:28 +00:00
|
|
|
#
|
2011-02-11 00:28:32 +00:00
|
|
|
# spec file for package permissions
|
2006-12-18 23:17:28 +00:00
|
|
|
#
|
2023-02-17 11:13:40 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2006-12-18 23:17:28 +00:00
|
|
|
#
|
2008-09-13 04:56:01 +00: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 09:02:35 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-18 23:17:28 +00:00
|
|
|
#
|
|
|
|
|
2012-07-06 14:11:34 +00:00
|
|
|
|
2023-05-16 11:06:11 +00:00
|
|
|
%define VERSION_DATE 20230516
|
2019-04-12 13:08:09 +00:00
|
|
|
|
2006-12-18 23:17:28 +00:00
|
|
|
Name: permissions
|
2022-08-02 08:12:13 +00:00
|
|
|
Version: %{suse_version}_%{VERSION_DATE}
|
2012-07-06 14:11:34 +00:00
|
|
|
Release: 0
|
2006-12-18 23:17:28 +00:00
|
|
|
Summary: SUSE Linux Default Permissions
|
2017-11-30 10:35:19 +00:00
|
|
|
# Maintained in github by the security team.
|
2018-07-24 11:46:06 +00:00
|
|
|
License: GPL-2.0-or-later
|
2012-07-06 14:11:34 +00:00
|
|
|
Group: Productivity/Security
|
2019-11-18 09:54:19 +00:00
|
|
|
URL: http://github.com/openSUSE/permissions
|
2020-03-02 13:50:40 +00:00
|
|
|
Source: permissions-%{VERSION_DATE}.tar.xz
|
2019-05-02 13:38:50 +00:00
|
|
|
Source1: fix_version.sh
|
2022-12-20 13:08:47 +00:00
|
|
|
Source2: permissions.rpmlintrc
|
2020-03-02 13:50:40 +00:00
|
|
|
BuildRequires: gcc-c++
|
2019-06-05 12:35:17 +00:00
|
|
|
BuildRequires: libcap-devel
|
2020-03-02 13:50:40 +00:00
|
|
|
BuildRequires: libcap-progs
|
2020-05-18 11:33:57 +00:00
|
|
|
BuildRequires: tclap
|
2020-06-16 16:20:27 +00:00
|
|
|
# test suite
|
|
|
|
BuildRequires: python3-base
|
2019-04-12 13:08:09 +00:00
|
|
|
Requires: chkstat
|
|
|
|
Requires: permissions-config
|
2020-03-02 13:50:40 +00:00
|
|
|
Provides: aaa_base:%{_datadir}/permissions
|
2006-12-18 23:17:28 +00:00
|
|
|
|
2007-04-18 16:37:08 +00:00
|
|
|
%prep
|
2020-07-08 07:50:44 +00:00
|
|
|
%autosetup -n permissions-%{VERSION_DATE}
|
2006-12-18 23:17:28 +00:00
|
|
|
|
|
|
|
%build
|
2020-11-11 10:46:39 +00:00
|
|
|
make %{?_smp_mflags} CXXFLAGS="%{optflags}"
|
2006-12-18 23:17:28 +00:00
|
|
|
|
|
|
|
%install
|
2017-11-30 10:35:19 +00:00
|
|
|
%make_install fillupdir=%{_fillupdir}
|
2006-12-18 23:17:28 +00:00
|
|
|
|
2020-06-16 16:20:27 +00:00
|
|
|
%check
|
2022-09-22 08:44:48 +00:00
|
|
|
# will fail on qemu with unshare: unshare failed: Invalid argument
|
|
|
|
%if !0%{?qemu_user_space_build}
|
2020-06-16 16:20:27 +00:00
|
|
|
tests/regtest.py --skip-make > /dev/null
|
2022-09-22 08:44:48 +00:00
|
|
|
%endif
|
2020-03-02 13:50:40 +00:00
|
|
|
|
2019-04-12 13:08:09 +00:00
|
|
|
%description
|
2022-12-20 10:43:28 +00: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 13:08:09 +00:00
|
|
|
|
2019-04-15 18:37:33 +00:00
|
|
|
This package does not contain files, it just requires the necessary packages.
|
2006-12-18 23:17:28 +00:00
|
|
|
|
|
|
|
%files
|
2019-04-12 13:08:09 +00:00
|
|
|
|
|
|
|
%package config
|
|
|
|
Summary: SUSE Linux Default Permissions config files
|
|
|
|
Group: Productivity/Security
|
2019-06-05 11:28:29 +00:00
|
|
|
Requires(post): %fillup_prereq
|
2019-05-02 13:24:27 +00:00
|
|
|
Requires(post): chkstat
|
2019-06-05 11:28:29 +00:00
|
|
|
#!BuildIgnore: group(trusted)
|
|
|
|
Requires(pre): group(trusted)
|
2020-12-07 13:52:52 +00:00
|
|
|
Obsoletes: permissions-doc <= %{suse_version}_%{VERSION_DATE}
|
2022-12-20 10:43:28 +00:00
|
|
|
BuildArch: noarch
|
2019-04-12 13:08:09 +00:00
|
|
|
|
|
|
|
%description config
|
2020-03-02 13:50:40 +00:00
|
|
|
The actual permissions configuration files, /usr/share/permissions/permission.*.
|
2019-04-12 13:08:09 +00:00
|
|
|
|
|
|
|
%files config
|
2020-03-02 13:50:40 +00:00
|
|
|
%defattr(644, root, root, 755)
|
|
|
|
%dir %{_datadir}/permissions
|
|
|
|
%{_datadir}/permissions/permissions
|
|
|
|
%{_datadir}/permissions/permissions.easy
|
|
|
|
%{_datadir}/permissions/permissions.secure
|
|
|
|
%{_datadir}/permissions/permissions.paranoid
|
2020-11-11 10:46:39 +00:00
|
|
|
%{_datadir}/permissions/variables.conf
|
2017-11-30 10:35:19 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/permissions.local
|
2019-04-12 13:08:09 +00:00
|
|
|
%{_fillupdir}/sysconfig.security
|
2020-12-07 13:52:52 +00:00
|
|
|
%{_mandir}/man5/permissions.5%{ext_man}
|
2019-04-12 13:08:09 +00:00
|
|
|
|
|
|
|
%post config
|
|
|
|
%{fillup_only -n security}
|
|
|
|
# apply all potentially changed permissions
|
2019-11-12 12:51:22 +00:00
|
|
|
%{_bindir}/chkstat --system || :
|
2019-04-12 13:08:09 +00:00
|
|
|
|
|
|
|
%package -n chkstat
|
|
|
|
Summary: SUSE Linux Default Permissions tool
|
|
|
|
Group: Productivity/Security
|
|
|
|
|
|
|
|
%description -n chkstat
|
2019-04-15 18:37:33 +00:00
|
|
|
Tool to check and set file permissions.
|
2019-04-12 13:08:09 +00:00
|
|
|
|
|
|
|
%files -n chkstat
|
2007-06-03 20:01:01 +00:00
|
|
|
%{_bindir}/chkstat
|
2017-11-30 10:35:19 +00:00
|
|
|
%{_mandir}/man8/chkstat.8%{ext_man}
|
2007-12-03 22:29:54 +00:00
|
|
|
|
2018-11-16 16:39:18 +00:00
|
|
|
%package -n permissions-zypp-plugin
|
|
|
|
BuildArch: noarch
|
2022-08-08 07:50:18 +00:00
|
|
|
Requires: permissions = %{version}
|
2018-11-16 16:39:18 +00:00
|
|
|
Requires: python3-zypp-plugin
|
|
|
|
Requires: libzypp(plugin:commit) = 1
|
|
|
|
Summary: A zypper commit plugin for calling chkstat
|
|
|
|
Group: Productivity/Security
|
|
|
|
|
|
|
|
%description -n permissions-zypp-plugin
|
|
|
|
This package contains a plugin for zypper that calls `chkstat --system` after
|
|
|
|
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 22:35:05 +00:00
|
|
|
%changelog
|