############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = policycoreutils version = 2.1.11 release = 1 groups = System/Base url = http://www.selinuxproject.org license = GPLv2 summary = SELinux policy core utilities. description policycoreutils contains utilities that are required for basic operation of a SELinux system. These utilities include load_policy to load policies, setfiles to label filesystems and newrole to switch roles. end sepolgen_ver = 1.1.6 sources = \ %{thisapp}.tgz \ sepolgen-%{sepolgen_ver}.tgz # We have to apply policycoreutils-sepolgen.patch at a later time. patches = \ policycoreutils-rhat.patch2 build requires audit-devel dbus-devel dbus-glib-devel glib2-devel gettext libcap-devel libcap-ng-devel libcgroup-devel libselinux-devel>=2.1.7-3 libsemanage-devel libsepol-devel libsepol-static pam-devel python-devel end # Manually add policycoreutils-sepolgen.patch because it has to be applied to the sepolgen source. prepare_cmds cd %{DIR_SRC}/sepolgen-%{sepolgen_ver} && patch -Np2 -i %{DIR_PATCHES}/policycoreutils-sepolgen.patch2 end make_build_targets += \ LSPP_PRIV=y \ BINDIR=%{bindir} \ SBINDIR=%{sbindir} \ LIBDIR=%{libdir} \ CFLAGS="%{CFLAGS}" \ all make_install_targets +=\ LSPP_PRIV=y \ BINDIR=%{BUILDROOT}%{bindir} \ SBINDIR=%{BUILDROOT}%{sbindir} \ LIBDIR=%{BUILDROOT}%{libdir} # Build sepolgen. build_cmds make -C %{DIR_SRC}/sepolgen-%{sepolgen_ver} %{make_build_targets} end install_cmds # Install sepolgen make -C %{DIR_SRC}/sepolgen-%{sepolgen_ver} DESTDIR=%{BUILDROOT} %{make_install_targets} # Install bash_completion for semanage. mkdir -pv %{BUILDROOT}/etc/bash_completion.d install -m 755 %{DIR_SOURCE}/semanage-bash-completion.sh %{BUILDROOT}/etc/bash_completion.d/ # Remove unneeded stuff. rm -vrf %{BUILDROOT}/etc/{rc.d,xdg,sysconfig} # Remove unneeded sandbox stuff - they are to create graphical sandboxes. rm -vrf %{BUILDROOT}/usr/sbin/seunshare rm -vrf %{BUILDROOT}/usr/share/sandbox rm -vrf %{BUILDROOT}/usr/share/man/man5/seunshare.5 rm -vrf %{BUILDROOT}/usr/share/man/man8/sandbox.8 end end packages package %{name} provides /bin/sepolgen /sbin/fixfiles /sbin/load_policy /sbin/restorecon /sbin/semodule /sbin/sestatus /sbin/setfiles end end package python-%{name} summary = SELinux policy core python utilities. description = %{summary} provides /bin/audit2allow /bin/sandbox /sbin/semanage end requires policycoreutils>=%{thisver} python-audit python-libsemanage python-selinux>=2.1.7-3 python-setools end files %{bindir}/audit2allow %{bindir}/audit2why %{bindir}/chcat %{bindir}/sandbox %{bindir}/sepolgen-ifgen %{bindir}/sepolgen-ifgen-attr-helper %{libdir}/python* %{sbindir}/semanage /usr/share/man/man1/audit2allow.1 /usr/share/man/man1/audit2why.1 /usr/share/man/man8/chcat.8 /usr/share/man/man8/sandbox.8 /usr/share/man/man8/semanage.8 /var/lib/sepolgen end end end