代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/policycoreutils 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%global _python_bytecompile_extra 0
%bcond_with sandbox
Name: policycoreutils
Version: 2.8
Release: 14
Summary: Policy core utilities of selinux
License: GPLv2
URL: https://github.com/SELinuxProject
Source0: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/policycoreutils-2.8.tar.gz
Source1: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/selinux-python-2.8.tar.gz
Source3: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/selinux-sandbox-2.8.tar.gz
Source4: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/selinux-dbus-2.8.tar.gz
Source5: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/semodule-utils-2.8.tar.gz
Source6: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/restorecond-2.8.tar.gz
Source7: selinux-autorelabel
Source8: selinux-autorelabel.service
Source9: selinux-autorelabel-mark.service
Source10: selinux-autorelabel.target
Source11: selinux-autorelabel-generator.sh
Patch0: python-sepolgen-fix-typo-in-PathChoooser-name.patch
Patch1: policycoreutils-secon-free-scon_trans-before-returni.patch
Patch2: python-sepolicy-fix-procotol-misspelling.patch
Patch3: restorecond-Do-not-ignore-the-f-option.patch
Patch4: python-sepolicy-Fix-info-to-search-aliases-as-well.patch
Patch5: python-sepolicy-Stop-rejecting-aliases-in-sepolicy-c.patch
Patch6: python-semanage-Stop-rejecting-aliases-in-semanage-c.patch
Patch7: python-chcat-use-check_call-instead-of-getstatusoutp.patch
Patch8: python-chcat-fix-removing-categories-on-users-with-F.patch
Patch9: python-sepolicy-search-also-for-dontaudit-rules.patch
Patch10: python-semanage-move-valid_types-initialisations-to-.patch
Patch11: python-sepolicy-Add-sepolicy.load_store_policy-store.patch
Patch12: python-semanage-Load-a-store-policy-and-set-the-stor.patch
Patch13: python-sepolgen-close-etc-selinux-sepolgen.conf-afte.patch
Patch14: python-audit2allow-allow-using-audit2why-as-non-root.patch
Patch15: python-sepolgen-refpolicy-installs-its-Makefile-in-i.patch
Patch16: setsebool-support-use-of-P-on-SELinux-disabled-hosts.patch
Patch17: python-use-or-when-comparing-a-variable-with-a-strin.patch
Patch18: python-sepolicy-fix-variable-name.patch
Patch19: python-semanage-seobject-Fix-listing-boolean-values.patch
Patch20: python-semanage-module-Fix-handling-of-a-e-d-r-optio.patch
Patch21: fix-fixfiles-N-date-function.patch
Patch22: fix-fixfiles-N-date-function-two.patch
BuildRequires: pam-devel libsepol-static libsemanage-static libselinux-devel libcap-devel audit-libs-devel gettext
BuildRequires: desktop-file-utils dbus-devel dbus-glib-devel python2-devel python3-devel libcap-ng-devel
BuildRequires: systemd systemd-units
Requires: libsepol libselinux-utils util-linux grep gawk diffutils rpm sed coreutils
Provides: %{name}-restorecond
Obsoletes: %{name}-restorecond
Provides: %{name}-newrole
Obsoletes: %{name}-newrole
Provides: /sbin/fixfiles
Provides: /sbin/restorecon
%description
It contains the selinux policy core utilities
%package -n python2-policycoreutils
Summary: python2 utilities for seLinux policy core
%{?python_provide:%python_provide python2-policycoreutils}
Requires: policycoreutils = %{version}-%{release}
Requires: python2-libselinux python2-libsemanage
Requires: audit-libs-python2
Requires: python2-IPy
Requires: checkpolicy
Requires: python2-setools >= 4.1.1
BuildArch: noarch
Provides: %{name}-python = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Obsoletes: policycoreutils < 2.0.61-2
%description -n python2-policycoreutils
It contains the python2 policy core utilities for selinux
%package -n python3-policycoreutils
Summary: python3 utilities for seLinux policy core
%{?python_provide:%python_provide python3-policycoreutils}
Requires: policycoreutils = %{version}-%{release}
Requires: python3-libselinux python3-libsemanage
Requires: audit-libs-python3
Requires: python3-IPy
Requires: checkpolicy
Requires: python3-setools >= 4.1.1
BuildArch: noarch
Provides: %{name}-python3 = %{version}-%{release}
Obsoletes: %{name}-python3 < %{version}-%{release}
%description -n python3-policycoreutils
It contains the python3 policy core utilities for selinux
%package python-utils
Summary: Policy core python utilities for selinux
Requires: python3-policycoreutils = %{version}-%{release}
Obsoletes: policycoreutils-python <= 2.4-4
BuildArch: noarch
%description python-utils
It contains the python utilities for selinux
%package dbus
Summary: Policy core DBUS for selinux
Requires: python3-policycoreutils = %{version}-%{release} python3-slip-dbus
BuildArch: noarch
%description dbus
It contains policy core DBUS for selinux
%package devel
Summary: Policy core devel utilities for selinux
Requires: policycoreutils-python-utils = %{version}-%{release}
Requires: /usr/bin/make
Requires: selinux-policy-devel
%description devel
It contains policy core devel utilities for selinux
%if %{with sandbox}
%package sandbox
Summary: Sandbox utilities for selinux
Requires: python3-policycoreutils = %{version}-%{release}
Requires: xorg-x11-server-Xephyr >= 1.14.1-2 /usr/bin/rsync /usr/bin/xmodmap
Requires: openbox
%description sandbox
It contains sandbox utilities for selinux
%endif
%package help
Summary: Including man files for selinux
Requires: man
%description help
This contains man files for the using of selinux.
%prep
%setup -q -c -n selinux
%setup -q -T -D -a 1 -n selinux
%setup -q -T -D -a 3 -n selinux
%setup -q -T -D -a 4 -n selinux
%setup -q -T -D -a 5 -n selinux
%setup -q -T -D -a 6 -n selinux
%autopatch -p1
%build
export PYTHON=%{__python3}
make -C policycoreutils-2.8 LSPP_PRIV=y SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" SEMODULE_PATH="%{_sbindir}" LIBSEPOLA="%{_libdir}/libsepol.a" all
make -C selinux-python-2.8 SBINDIR="%{_sbindir}" LSPP_PRIV=y LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" all
make -C semodule-utils-2.8 SBINDIR="%{_sbindir}" LSPP_PRIV=y LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" all
make -C restorecond-2.8 SBINDIR="%{_sbindir}" LSPP_PRIV=y LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" all
%if %{with sandbox}
make -C selinux-sandbox-2.8 SBINDIR="%{_sbindir}" LSPP_PRIV=y LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" all
%endif
make -C selinux-dbus-2.8 SBINDIR="%{_sbindir}" LSPP_PRIV=y LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" all
%install
mkdir -p %{buildroot}/%{_defaultdocdir}/%{name}/
make -C policycoreutils-2.8 LSPP_PRIV=y DESTDIR="%{buildroot}" SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" SEMODULE_PATH="/usr/sbin" LIBSEPOLA="%{_libdir}/libsepol.a" install
make -C selinux-python-2.8 PYTHON=%{__python2} DESTDIR="%{buildroot}" SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" install
make -C selinux-python-2.8 PYTHON=%{__python3} DESTDIR="%{buildroot}" SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" install
make -C semodule-utils-2.8 PYTHON=%{__python3} DESTDIR="%{buildroot}" SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" install
make -C restorecond-2.8 PYTHON=%{__python3} DESTDIR="%{buildroot}" SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" install
%if %{with sandbox}
make -C selinux-sandbox-2.8 PYTHON=%{__python3} DESTDIR="%{buildroot}" SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" install
%endif
make -C selinux-dbus-2.8 PYTHON=%{__python3} DESTDIR="%{buildroot}" SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" install
rm -rf %{buildroot}/%{_sysconfdir}/rc.d/init.d/restorecond
rm -f %{buildroot}/%{_sbindir}/open_init_pty
rm -f %{buildroot}/%{_sbindir}/run_init
rm -f %{buildroot}/%{_mandir}/man8/open_init_pty.8
rm -f %{buildroot}/%{_mandir}/ru/man8/run_init.8*
rm -f %{buildroot}/%{_mandir}/man8/run_init.8*
rm -f %{buildroot}/etc/pam.d/run_init*
rm -f %{buildroot}%{python2_sitelib}/sepolicy/gui.*
rm -f %{buildroot}%{python2_sitelib}/sepolicy/sepolicy.glade
rm -rf %{buildroot}%{python2_sitelib}/sepolicy/help
rm -f %{buildroot}%{python3_sitelib}/sepolicy/gui.*
rm -f %{buildroot}%{python3_sitelib}/sepolicy/sepolicy.glade
install -m 644 -p %{SOURCE8} %{buildroot}/%{_unitdir}/
install -m 644 -p %{SOURCE9} %{buildroot}/%{_unitdir}/
install -m 644 -p %{SOURCE10} %{buildroot}/%{_unitdir}/
install -D -m 755 -p %{SOURCE11} %{buildroot}/%{_systemdgeneratordir}/%{basename:%{SOURCE11}}
install -m 755 -p %{SOURCE7} %{buildroot}/%{_libexecdir}/selinux/
pathfix.py -i "%{__python2} -Es" -p %{buildroot}%{python2_sitelib}
pathfix.py -i "%{__python3} -Es" -p %{buildroot}%{python3_sitelib}
pathfix.py -i "%{__python3} -Es" -p %{buildroot}%{_sbindir}/semanage \
%if %{with sandbox}
%{buildroot}%{_bindir}/sandbox \
%{buildroot}%{_datadir}/sandbox/start \
%endif
%{buildroot}%{_bindir}/chcat %{buildroot}%{_bindir}/audit2allow \
%{buildroot}%{_bindir}/sepolicy %{buildroot}%{_bindir}/sepolgen-ifgen \
%{buildroot}%{_datadir}/system-config-selinux/selinux_server.py
find %{buildroot}%{python2_sitelib} %{buildroot}%{python3_sitelib} %{buildroot}%{python2_sitearch} %{buildroot}%{python3_sitearch} \
%{buildroot}%{_sbindir} %{buildroot}%{_bindir} %{buildroot}%{_datadir} -type f -name '*~' | xargs rm -f
%py_byte_compile %{__python3} %{buildroot}%{_datadir}/system-config-selinux
%find_lang policycoreutils
%post
%systemd_post restorecond.service
%preun
%systemd_preun restorecond.service
%postun
%systemd_postun_with_restart restorecond.service
%files -f %{name}.lang
%license policycoreutils-2.8/COPYING
%doc %{_usr}/share/doc/%{name}
%config(noreplace) %{_sysconfdir}/sestatus.conf
%config(noreplace) %{_sysconfdir}/pam.d/newrole
%config(noreplace) %{_sysconfdir}/selinux/restorecond.conf
%config(noreplace) %{_sysconfdir}/selinux/restorecond_user.conf
%{_sbindir}/*
%exclude %{_sbindir}/{seunshare,semanage}
%{_bindir}/secon
%{_bindir}/semodule_expand
%{_bindir}/semodule_link
%{_bindir}/semodule_package
%{_bindir}/semodule_unpackage
%{_libexecdir}/selinux/hll
%dir %{_datadir}/bash-completion
%{_datadir}/bash-completion/completions/setsebool
%{_unitdir}/restorecond.service
%{_sysconfdir}/xdg/autostart/restorecond.desktop
%{_datadir}/dbus-1/services/org.selinux.Restorecond.service
%attr(0755,root,root) %caps(cap_dac_read_search,cap_setpcap,cap_audit_write,cap_sys_admin,cap_fowner,cap_chown,cap_dac_override=pe) %{_bindir}/newrole
%{_libexecdir}/selinux/selinux-autorelabel
%{_unitdir}/selinux-autorelabel-mark.service
%{_unitdir}/selinux-autorelabel.service
%{_unitdir}/selinux-autorelabel.target
%{_systemdgeneratordir}/selinux-autorelabel-generator.sh
%files python-utils
%{_bindir}/audit2allow
%{_bindir}/audit2why
%{_sbindir}/semanage
%{_bindir}/chcat
%if %{with sandbox}
%{_bindir}/sandbox
%endif
%{_sysconfdir}/dbus-1/system.d/org.selinux.conf
%{_datadir}/bash-completion/completions/semanage
%files dbus
%{_datadir}/system-config-selinux/selinux_server.py
%{_datadir}/polkit-1/actions/org.selinux.policy
%{_sysconfdir}/dbus-1/system.d/org.selinux.conf
%{_datadir}/dbus-1/system-services/org.selinux.service
%dir %{_datadir}/system-config-selinux/__pycache__
%{_datadir}/system-config-selinux/__pycache__/selinux_server.*
%files -n python2-policycoreutils
%{python2_sitelib}/seobject.py*
%{python2_sitelib}/sepolgen
%dir %{python2_sitelib}/sepolicy
%{python2_sitelib}/sepolicy/__init__.py*
%{python2_sitelib}/sepolicy/booleans.py*
%{python2_sitelib}/sepolicy/communicate.py*
%{python2_sitelib}/sepolicy/network.py*
%{python2_sitelib}/sepolicy/transition.py*
%{python2_sitelib}/sepolicy/sedbus.py*
%{python2_sitelib}/sepolicy*.egg-info
%{python2_sitelib}/sepolicy/generate.py*
%{python2_sitelib}/sepolicy/interface.py*
%{python2_sitelib}/sepolicy/manpage.py*
%{python2_sitelib}/sepolicy/templates
%files -n python3-policycoreutils
%{python3_sitelib}/__pycache__
%{python3_sitelib}/sepolgen
%dir %{python3_sitelib}/sepolicy
%{python3_sitelib}/sepolicy/templates
%dir %{python3_sitelib}/sepolicy/help
%{python3_sitelib}/sepolicy/help/*
%{python3_sitelib}/sepolicy/__init__.py*
%{python3_sitelib}/sepolicy/__pycache__
%{python3_sitelib}/sepolicy/manpage.py*
%{python3_sitelib}/sepolicy/network.py*
%{python3_sitelib}/sepolicy/transition.py*
%{python3_sitelib}/sepolicy/sedbus.py*
%{python3_sitelib}/sepolicy*.egg-info
%{python3_sitelib}/sepolicy/booleans.py*
%{python3_sitelib}/sepolicy/communicate.py*
%{python3_sitelib}/sepolicy/generate.py*
%{python3_sitelib}/sepolicy/interface.py*
%{python3_sitelib}/seobject.py*
%files devel
%{_bindir}/sepolicy
%{_bindir}/sepolgen
%{_bindir}/sepolgen-*
%{_usr}/share/bash-completion/completions/sepolicy
%dir /var/lib/sepolgen
/var/lib/sepolgen/perm_map
%if %{with sandbox}
%files sandbox
%config(noreplace) %{_sysconfdir}/sysconfig/sandbox
%{_datadir}/sandbox/{start,sandboxX.sh}
%caps(cap_setpcap,cap_setuid,cap_fowner,cap_dac_override,cap_sys_admin,cap_sys_nice=pe) %{_sbindir}/seunshare
%endif
%files help
%{_mandir}/*
%changelog
* Thu Mar 5 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.8-14
- Build without sandbox
* Mon Feb 17 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.8-13
- Add unpackaged files
* Fri Feb 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.8-12
- Add selinux-autorelabel
* Fri Dec 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.8-11
- Simplify functions
* Fri Dec 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.8-10
- Delete unused patch
* Wed Sep 11 2019 zhanghaibo <ted.zhang@huawei.com> - 2.8-9
- Package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。