Fix fixfiles to use exclude_dirs on fixfiles restore

This commit is contained in:
Dan Walsh 2013-02-28 15:31:20 -05:00
commit 5324d20ca0

View File

@ -1,8 +1,8 @@
%define libauditver 2.1.3-4 %global libauditver 2.1.3-4
%define libsepolver 2.1.9-1 %global libsepolver 2.1.9-1
%define libsemanagever 2.1.10-1 %global libsemanagever 2.1.10-1
%define libselinuxver 2.1.13-1 %global libselinuxver 2.1.13-1
%define sepolgenver 1.1.9 %global sepolgenver 1.1.9
Summary: SELinux policy core utilities Summary: SELinux policy core utilities
Name: policycoreutils Name: policycoreutils
@ -12,7 +12,7 @@ License: GPLv2
Group: System Environment/Base Group: System Environment/Base
# Based on git repository with tag 20101221 # Based on git repository with tag 20101221
Source: git://oss.tresys.com/git/selinux/policycoreutils-%{version}.tgz Source: git://oss.tresys.com/git/selinux/policycoreutils-%{version}.tgz
Source1: git://oss.tresys.com/git/selinux/sepolgen-%{sepolgenver}.tgz Source1:git://oss.tresys.com/git/selinux/sepolgen-%{sepolgenver}.tgz
URL: http://www.selinuxproject.org URL: http://www.selinuxproject.org
Source2: policycoreutils_man_ru2.tar.bz2 Source2: policycoreutils_man_ru2.tar.bz2
Source3: system-config-selinux.png Source3: system-config-selinux.png
@ -23,10 +23,6 @@ Conflicts: filesystem < 3
Provides: /sbin/fixfiles Provides: /sbin/fixfiles
Provides: /sbin/restorecon Provides: /sbin/restorecon
%global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
%global pkgpythondir %{python_sitelib}/%{name}
BuildRequires: pam-devel libcgroup-devel libsepol-static >= %{libsepolver} libsemanage-static >= %{libsemanagever} libselinux-devel >= %{libselinuxver} libcap-devel audit-libs-devel >= %{libauditver} gettext BuildRequires: pam-devel libcgroup-devel libsepol-static >= %{libsepolver} libsemanage-static >= %{libsemanagever} libselinux-devel >= %{libselinuxver} libcap-devel audit-libs-devel >= %{libauditver} gettext
BuildRequires: desktop-file-utils dbus-devel dbus-glib-devel BuildRequires: desktop-file-utils dbus-devel dbus-glib-devel
BuildRequires: python-devel setools-devel >= 3.3.7-14 BuildRequires: python-devel setools-devel >= 3.3.7-14
@ -36,7 +32,6 @@ Requires: libsepol >= %{libsepolver} coreutils libselinux-utils >= %{libselinux
Requires(post): systemd-units systemd-sysv Requires(post): systemd-units systemd-sysv
Requires(preun): systemd-units Requires(preun): systemd-units
Requires(postun): systemd-units Requires(postun): systemd-units
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description %description
Security-enhanced Linux is a feature of the Linux® kernel and a number Security-enhanced Linux is a feature of the Linux® kernel and a number
@ -65,7 +60,6 @@ make LSPP_PRIV=y SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" CFLAGS="%{optflags} -
make -C sepolgen-%{sepolgenver} SBINDIR="%{_sbindir}" LSPP_PRIV=y LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,relro" all make -C sepolgen-%{sepolgenver} SBINDIR="%{_sbindir}" LSPP_PRIV=y LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,relro" all
%install %install
rm -rf %{buildroot}
mkdir -p %{buildroot}/var/lib/selinux mkdir -p %{buildroot}/var/lib/selinux
mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_sbindir}
@ -90,14 +84,13 @@ rm -f %{buildroot}/usr/sbin/open_init_pty
ln -sf /usr/share/system-config-selinux/polgengui.py %{buildroot}%{_bindir}/selinux-polgengui ln -sf /usr/share/system-config-selinux/polgengui.py %{buildroot}%{_bindir}/selinux-polgengui
desktop-file-install --vendor fedora \ desktop-file-install --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
--add-category Settings \ --add-category Settings \
%{buildroot}%{_datadir}/system-config-selinux/system-config-selinux.desktop %{buildroot}%{_datadir}/system-config-selinux/system-config-selinux.desktop
desktop-file-install --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
%{buildroot}%{_datadir}/system-config-selinux/selinux-polgengui.desktop
desktop-file-install --vendor fedora \
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
%{buildroot}%{_datadir}/system-config-selinux/selinux-polgengui.desktop
rm -f %{buildroot}%{_datadir}/system-config-selinux/selinux-polgengui.desktop rm -f %{buildroot}%{_datadir}/system-config-selinux/selinux-polgengui.desktop
rm -f %{buildroot}%{_datadir}/system-config-selinux/system-config-selinux.desktop rm -f %{buildroot}%{_datadir}/system-config-selinux/system-config-selinux.desktop
@ -106,28 +99,28 @@ rm -f %{buildroot}%{_datadir}/system-config-selinux/system-config-selinux.deskto
%package python %package python
Summary: SELinux policy core python utilities Summary: SELinux policy core python utilities
Group: System Environment/Base Group: System Environment/Base
Requires: policycoreutils = %{version}-%{release} Requires:policycoreutils = %{version}-%{release}
Requires: libsemanage-python >= %{libsemanagever} libselinux-python libcgroup Requires:libsemanage-python >= %{libsemanagever} libselinux-python libcgroup
Requires: audit-libs-python >= %{libauditver} Requires:audit-libs-python >= %{libauditver}
Requires(pre): python >= 2.6 Requires(pre): python >= 2.6
Obsoletes: policycoreutils < 2.0.61-2 Obsoletes: policycoreutils < 2.0.61-2
Requires: python-IPy yum Requires: python-IPy yum
%description python %description python
The policycoreutils-python package contains the management tools use to manage an SELinux environment. The policycoreutils-python package contains the management tools use to manage
an SELinux environment.
%files python %files python
%defattr(-,root,root,-)
%{_sbindir}/semanage %{_sbindir}/semanage
%{_bindir}/chcat %{_bindir}/chcat
%{_bindir}/sandbox %{_bindir}/sandbox
%{_bindir}/sepolicy %{_bindir}/sepolicy
%{python_sitelib}/seobject.py* %{python_sitearch}/seobject.py*
%{python_sitelib}/sepolgen %{python_sitearch}/sepolgen
%{python_sitelib}/sepolicy %{python_sitearch}/sepolicy
%{python_sitelib}/%{name}*.egg-info %{python_sitearch}/%{name}*.egg-info
%{python_sitelib}/sepolicy*.egg-info %{python_sitearch}/sepolicy*.egg-info
%{pkgpythondir} %{python_sitearch}/%{name}
%dir /var/lib/selinux %dir /var/lib/selinux
%{_mandir}/man8/chcat.8* %{_mandir}/man8/chcat.8*
%{_mandir}/ru/man8/chcat.8* %{_mandir}/ru/man8/chcat.8*
@ -153,7 +146,6 @@ Requires: selinux-policy-devel selinux-policy-doc
The policycoreutils-devel package contains the management tools use to develop policy in an SELinux environment. The policycoreutils-devel package contains the management tools use to develop policy in an SELinux environment.
%files devel %files devel
%defattr(-,root,root,-)
%{_bindir}/audit2allow %{_bindir}/audit2allow
%{_bindir}/audit2why %{_bindir}/audit2why
%{_bindir}/sepolgen %{_bindir}/sepolgen
@ -182,10 +174,10 @@ Requires: openbox
BuildRequires: libcap-ng-devel BuildRequires: libcap-ng-devel
%description sandbox %description sandbox
The policycoreutils-sandbox package contains the scripts to create graphical sandboxes The policycoreutils-sandbox package contains the scripts to create graphical
sandboxes
%files sandbox %files sandbox
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/sysconfig/sandbox %config(noreplace) %{_sysconfdir}/sysconfig/sandbox
%{_datadir}/sandbox/sandboxX.sh %{_datadir}/sandbox/sandboxX.sh
%{_datadir}/sandbox/start %{_datadir}/sandbox/start
@ -203,7 +195,6 @@ RBAC/MLS policy machines require newrole as a way of changing the role
or level of a logged in user. or level of a logged in user.
%files newrole %files newrole
%defattr(-,root,root)
%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 %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
%{_mandir}/man1/newrole.1.gz %{_mandir}/man1/newrole.1.gz
@ -222,11 +213,10 @@ BuildRequires: desktop-file-utils
system-config-selinux is a utility for managing the SELinux environment system-config-selinux is a utility for managing the SELinux environment
%files gui %files gui
%defattr(-,root,root)
%{_bindir}/system-config-selinux %{_bindir}/system-config-selinux
%{_bindir}/selinux-polgengui %{_bindir}/selinux-polgengui
%{_datadir}/applications/fedora-system-config-selinux.desktop %{_datadir}/applications/system-config-selinux.desktop
%{_datadir}/applications/fedora-selinux-polgengui.desktop %{_datadir}/applications/selinux-polgengui.desktop
%{_datadir}/icons/hicolor/24x24/apps/system-config-selinux.png %{_datadir}/icons/hicolor/24x24/apps/system-config-selinux.png
%{_datadir}/pixmaps/system-config-selinux.png %{_datadir}/pixmaps/system-config-selinux.png
%{_datadir}/polkit-1/actions/org.fedoraproject.config.selinux.policy %{_datadir}/polkit-1/actions/org.fedoraproject.config.selinux.policy
@ -235,11 +225,8 @@ system-config-selinux is a utility for managing the SELinux environment
%{_datadir}/system-config-selinux/*.py* %{_datadir}/system-config-selinux/*.py*
%{_datadir}/system-config-selinux/*.glade %{_datadir}/system-config-selinux/*.glade
%clean
rm -rf %{buildroot}
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root)
%{_sbindir}/restorecon %{_sbindir}/restorecon
%{_sbindir}/fixfiles %{_sbindir}/fixfiles
%{_sbindir}/setfiles %{_sbindir}/setfiles
@ -298,7 +285,6 @@ Group: System Environment/Base
The policycoreutils-restorecond package contains the restorecond service. The policycoreutils-restorecond package contains the restorecond service.
%files restorecond %files restorecond
%defattr(-,root,root,-)
%{_sbindir}/restorecond %{_sbindir}/restorecond
%{_unitdir}/restorecond.service %{_unitdir}/restorecond.service
%config(noreplace) %{_sysconfdir}/selinux/restorecond.conf %config(noreplace) %{_sysconfdir}/selinux/restorecond.conf
@ -335,6 +321,10 @@ The policycoreutils-restorecond package contains the restorecond service.
- Update trans - Update trans
- Fix sepolicy reorganization of helper functions. - Fix sepolicy reorganization of helper functions.
* Sun Feb 24 2013 Rahul Sundaram <sundaram@fedoraproject.org> - 2.1.14-13
- remove vendor tag from desktop file. https://fedorahosted.org/fpc/ticket/247
- clean up spec to follow current guidelines
* Fri Feb 22 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.14-12 * Fri Feb 22 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.14-12
- Do not load interface file by default when sepolicy is called, mov get_all_methods to the sepolicy package - Do not load interface file by default when sepolicy is called, mov get_all_methods to the sepolicy package
@ -1367,7 +1357,7 @@ the bounding set will be dropped.
* Fri Oct 29 2010 Dan Walsh <dwalsh@redhat.com> 2.0.83-33 * Fri Oct 29 2010 Dan Walsh <dwalsh@redhat.com> 2.0.83-33
- Move /etc/pam.d/newrole in to polcicycoreutils-newrole - Move /etc/pam.d/newrole in to polcicycoreutils-newrole
- Additiona capability checking in sepolgen - Additional capability checking in sepolgen
* Mon Oct 25 2010 Dan Walsh <dwalsh@redhat.com> 2.0.83-32 * Mon Oct 25 2010 Dan Walsh <dwalsh@redhat.com> 2.0.83-32
- Remove setuid flag and replace with file capabilities - Remove setuid flag and replace with file capabilities
@ -3537,7 +3527,7 @@ Resolves: #208838
* Thu Oct 20 2005 Dan Walsh <dwalsh@redhat.com> 1.27.18-1 * Thu Oct 20 2005 Dan Walsh <dwalsh@redhat.com> 1.27.18-1
- Update to match NSA - Update to match NSA
* Cleaned up usage and error messages and releasing of memory by * Cleaned up usage and error messages and releasing of memory by
semodule_* utilities. semodule utilities.
* Corrected error reporting by semodule. * Corrected error reporting by semodule.
* Updated semodule_expand for change to sepol interface. * Updated semodule_expand for change to sepol interface.
* Merged fixes for make DESTDIR= builds from Joshua Brindle. * Merged fixes for make DESTDIR= builds from Joshua Brindle.