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
|
|
|
|
2023-06-02 12:37:53 +02:00
|
|
|
%define VERSION_DATE 20230602
|
2019-04-12 15:08:09 +02:00
|
|
|
|
2006-12-19 00:17:28 +01:00
|
|
|
Name: permissions
|
2022-08-02 10:12:13 +02:00
|
|
|
Version: %{suse_version}_%{VERSION_DATE}
|
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
|
2020-03-02 14:50:40 +01:00
|
|
|
Source: permissions-%{VERSION_DATE}.tar.xz
|
2019-05-02 15:38:50 +02:00
|
|
|
Source1: fix_version.sh
|
2022-12-20 14:08:47 +01:00
|
|
|
Source2: permissions.rpmlintrc
|
2020-03-02 14:50:40 +01:00
|
|
|
BuildRequires: gcc-c++
|
2019-06-05 14:35:17 +02:00
|
|
|
BuildRequires: libcap-devel
|
2020-03-02 14:50:40 +01:00
|
|
|
BuildRequires: libcap-progs
|
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
|
2019-04-12 15:08:09 +02:00
|
|
|
Requires: chkstat
|
|
|
|
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
|
2020-07-08 09:50:44 +02:00
|
|
|
%autosetup -n permissions-%{VERSION_DATE}
|
2006-12-19 00:17:28 +01:00
|
|
|
|
|
|
|
%build
|
2020-11-11 11:46:39 +01:00
|
|
|
make %{?_smp_mflags} CXXFLAGS="%{optflags}"
|
2006-12-19 00:17:28 +01:00
|
|
|
|
|
|
|
%install
|
2017-11-30 11:35:19 +01:00
|
|
|
%make_install fillupdir=%{_fillupdir}
|
2024-01-30 13:51:55 +01:00
|
|
|
# create directory for packages to place their drop-ins
|
|
|
|
mkdir %{buildroot}%{_datadir}/permissions/permissions.d
|
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
|
|
|
|
2020-06-16 18:20:27 +02:00
|
|
|
%check
|
2022-09-22 10:44:48 +02:00
|
|
|
# will fail on qemu with unshare: unshare failed: Invalid argument
|
|
|
|
%if !0%{?qemu_user_space_build}
|
2020-06-16 18:20:27 +02:00
|
|
|
tests/regtest.py --skip-make > /dev/null
|
2022-09-22 10:44:48 +02:00
|
|
|
%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
|
2019-05-02 15:24:27 +02:00
|
|
|
Requires(post): chkstat
|
2019-06-05 13:28:29 +02:00
|
|
|
#!BuildIgnore: group(trusted)
|
|
|
|
Requires(pre): group(trusted)
|
2020-12-07 14:52:52 +01:00
|
|
|
Obsoletes: permissions-doc <= %{suse_version}_%{VERSION_DATE}
|
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
|
2019-11-12 13:51:22 +01:00
|
|
|
%{_bindir}/chkstat --system || :
|
2019-04-12 15:08:09 +02:00
|
|
|
|
|
|
|
%package -n chkstat
|
|
|
|
Summary: SUSE Linux Default Permissions tool
|
|
|
|
Group: Productivity/Security
|
|
|
|
|
|
|
|
%description -n chkstat
|
2019-04-15 20:37:33 +02:00
|
|
|
Tool to check and set file permissions.
|
2019-04-12 15:08:09 +02:00
|
|
|
|
|
|
|
%files -n chkstat
|
2007-06-03 22:01:01 +02:00
|
|
|
%{_bindir}/chkstat
|
2017-11-30 11:35:19 +01:00
|
|
|
%{_mandir}/man8/chkstat.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
|
|
|
|
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 23:35:05 +01:00
|
|
|
%changelog
|