From 2b9ddd45c0b3eab986d8f1cf5a3aee8d6cef4bef Mon Sep 17 00:00:00 2001 From: Sven Vermeulen Date: Tue, 13 Aug 2013 17:24:36 +0000 Subject: Document setfiles in rlpkg, improve selocal resilience Package-Manager: portage-2.1.12.2/cvs/Linux x86_64 Manifest-Sign-Key: 0xCDBA2FDB --- sys-apps/policycoreutils/ChangeLog | 8 +- sys-apps/policycoreutils/Manifest | 10 +- .../policycoreutils-2.1.14-r4.ebuild | 156 +++++++++++++++++++++ 3 files changed, 169 insertions(+), 5 deletions(-) create mode 100644 sys-apps/policycoreutils/policycoreutils-2.1.14-r4.ebuild (limited to 'sys-apps/policycoreutils') diff --git a/sys-apps/policycoreutils/ChangeLog b/sys-apps/policycoreutils/ChangeLog index 73f485be843b..b3f6afbb0869 100644 --- a/sys-apps/policycoreutils/ChangeLog +++ b/sys-apps/policycoreutils/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/policycoreutils # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.123 2013/07/07 18:02:54 swift Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.124 2013/08/13 17:24:28 swift Exp $ + +*policycoreutils-2.1.14-r4 (13 Aug 2013) + + 13 Aug 2013; Sven Vermeulen + +policycoreutils-2.1.14-r4.ebuild: + Document setfiles in rlpkg, improve selocal resilience 07 Jul 2013; Sven Vermeulen -policycoreutils-2.1.10-r5.ebuild: diff --git a/sys-apps/policycoreutils/Manifest b/sys-apps/policycoreutils/Manifest index 172bade755a4..b6dde75c661a 100644 --- a/sys-apps/policycoreutils/Manifest +++ b/sys-apps/policycoreutils/Manifest @@ -18,6 +18,7 @@ DIST policycoreutils-extra-1.26.tar.bz2 13245 SHA256 9ba087e43447adbc896ebfe2f9d DIST policycoreutils-extra-1.27.tar.bz2 13250 SHA256 eee73e497e159a49e2eaecd17d7653f4f25425f2add2c0dec61f8b9caf9e59f3 SHA512 57b4012ab2a141293f52e2fb636b7072b05e7d48f823d5664cb13d60a5ae9c9112e27501f81e017219335ca8a77fceb1aed60ea3f1adc76d88facd85c6a31897 WHIRLPOOL 53f375e72a4291d99b0961a857ac6b8ca90ec23034f90385489998bdd3cd474831bbcf374d073616a1097f8907de81b4d79f0c236d31bf4fd1ed69dfe6809a9d DIST policycoreutils-extra-1.28.tar.bz2 15294 SHA256 cf577aa932e564de7df20dcd1a3e4353d7ecea03dfb987bb0134e09c4f76bc66 SHA512 e660f2a21b417b3f0ca7d68fd9708fda81565bb3c83f627a9b8950b208e1462fac63bc1aa458968e1c16583657e426ce699c89065fec65507685898388c30768 WHIRLPOOL da9d9a95afaf44b0f0fb717a4273c7f9faa1095f3827b39e5b60e49e493e65bc0a15f4b4505fe0c448fd7b03945f439a437e22ba0fa0165f6883d41f18dfdb19 DIST policycoreutils-extra-1.29.tar.bz2 15427 SHA256 fc3d9e303835d5c650a3c712827b78325119dbf987e203960592f1137d58e912 SHA512 1925851f080307232e16f81e24839773de51b6668a2efd068abd325dc0433ea25b8f5fde76247d78c69876d85a6b37e55fd57336ea817deeda05b31dcc623c90 WHIRLPOOL e9194bd856a13856800cedb4bbdf529cb6406c1d7f8e8778b7abf29d8e9f7554a8b8ef320a2ebe5ef1521484d00fc63ebf1719ad74f7b59a78134b1e59644f23 +DIST policycoreutils-extra-1.30.tar.bz2 16025 SHA256 ae91e6c502f485af561488b872a52fb840b7e7a3e8ffc48cd4b854e042f2d8bd SHA512 909d9f32155e568dee14bb5ae58ab93757658ec023d9546024c66c0eb48b141499911d9e8fc622ef0db04c09c501607ec98da42a307a43ee67def6b766994629 WHIRLPOOL f45b3216f1c75e49c6f6bd8b389977e7e3c6a7ad96e9a976059d7a1f76ce30814b6afc8da9f4b8f392d3a4335b4513e752bba2e72563c3cc64246734414fcb05 EBUILD policycoreutils-2.1.13-r10.ebuild 4252 SHA256 d146a7a6acf9c46d1f57625de9cec02fd7d42dd22ea8d1ad3645b43a837f42e5 SHA512 c52aa31cc1e02a6eaee54b0760b40badb941af33c3e0bcf1267299f9c6594d4654fd1d71c49c50fd32ce995f81eb08a161175960373a97a4bfe2a345c47237b4 WHIRLPOOL d82f12d4cb708db4fbcf72b14563e414fe602782b92d4561f312b3ebb62107a74557e249e121f7565756de6db7bc5ef187ca738d312564dd4f0af8d4bbc27451 EBUILD policycoreutils-2.1.13-r11.ebuild 4252 SHA256 dc6b4fca9ed31ffdc83f590ec9f2454975e94633caf9e4ad978febc5f85e3501 SHA512 c764e3b7c13712f963800e185a2d2f1ebc52e2a5f4b6e8bfe9dd80378b370006cff5d62a82883cb1cac9c37cd24355709857c411e2ee020a23d64a3612b44fe3 WHIRLPOOL d884e5008f390fee115331eef31eb31957e9a1a2c3537508854d5e4ac7af22472b3104c6938781130dbd91632f26ed94605d658482d57a4f1485e889c64f20fa EBUILD policycoreutils-2.1.13-r3.ebuild 4244 SHA256 c5d6b0fd58a7648b980ee39ad590deafcefc18f102a52232e8f685dd1447da70 SHA512 fa76d2002c503d0286bed86992f827b56db1bfb410c667580b5fe4d3385c3500334c86058e4e25de7538c270b8b3cccc51768a8d0e4aa341d58e9f39e4d564f6 WHIRLPOOL 61800aa8b33638417c6b4fdd4f9782d157dbaa15e02f95e7edbd27ca172961cd1ad7cf5d4aabddcf0a926ac7af5036685ccdfccc2f1990aac65ecda772c8cfea @@ -30,12 +31,13 @@ EBUILD policycoreutils-2.1.13-r9.ebuild 4249 SHA256 c421a149fd21e4d85042c336bf74 EBUILD policycoreutils-2.1.14-r1.ebuild 4255 SHA256 077b2ed1463c504972b66a42375ceb954c778be3462ce614be90d3faff42826b SHA512 b709c1f22b29510905eecd193ea11a2f82d1ca3d99abe32c94eda85e8291780f1e49cb2e557e3dc08be0ffb466748d46298c9fd8e7f6cfdc2a12f01308c81693 WHIRLPOOL e6f02dad2cdd5b3762a6f1d5cd4ef98fef08e186003e46449ec3caf85ee98f24e4b2d87a8b2b03be2a861c6508b99ced38e884adb0da0b00f1b560b065dcff2a EBUILD policycoreutils-2.1.14-r2.ebuild 4253 SHA256 b2174045a24bd76ed609c4236072eb1ad0ca69af8b93f621bc263cceafa54b75 SHA512 1c9f2a1e24b16f6fa00fe54abe31251d687c543274a355697c76694bc2529436d57ec1d2ec5dc9cd2ec991a7265b7ba785a9e34f9dbc3f29d9423ffb0ea1e723 WHIRLPOOL dc715c03979b9542740176c82cd279d179228ae5d1beeb31b9dc7d36cba3a972593d2ce58fc2a8429be33c88ac059ad355721c49677fa2b8b01b11593920823a EBUILD policycoreutils-2.1.14-r3.ebuild 4657 SHA256 30566e524e646b9074e008f0137fb9fcf6000e3a28d368a27dfb55b3552a3056 SHA512 7f35041dd98220c53b0f1c4339872ef9369f2b05c4fe616af04030bca3cb551668b2b77a6b1da6f29c0dfbbbe8408ab48f42ea0a8ab7e28cae3f54583fdfaa0c WHIRLPOOL 86ac4d67c6ad054cd565394126254b86455aca879eccde53a13ae335f42439cf365f3d27395795e6b0748f380b64193444cfc4ff6e309ba07cd6d8a683ef6a7a -MISC ChangeLog 20071 SHA256 aab7fea85f6f93e8556035251380b734a8016115ad9513a2a67ba4b9f362d630 SHA512 eedf0539bd4414c25b4879e816a5c614081c15ecbbebf33e0700230385c3d8468d9e833b1abb6ef930df74bf96773ed5e8b2eaa72d5568b08356207a40399a30 WHIRLPOOL 2a1f43d19b2b10ec9ec7d464304d6e2a66a5c133b8c7f3709fe8327bbf806829ab5694858889918a0aa9532eaacbc3d51f29c2236c8c3bad48c8c7b5909811b9 +EBUILD policycoreutils-2.1.14-r4.ebuild 4657 SHA256 3b3df5a28103c19796cdf348b0d883df00f250e5fa72e74e341a1fddabd5a4db SHA512 afe394b883f647bb5bc3fa51038e64acfe45fff8866ce705a6e92751a650a4c80cabf2b5221b12d7d977839496666ee3a94b6fbbc2652edd6bfdc4cb147536e0 WHIRLPOOL 34d6384156e27ab6c37d3ed3fefd87745b49c8be7001a86b22fd42bbbdc650598ec1e048bab584bbc66a2794dbd2e5d3cfc07e136033147aba7001eb8d6d721f +MISC ChangeLog 20257 SHA256 7e8879fc35eff180a700971d7de708aee49defe7b721200f7459714d9b610cce SHA512 8968ad30a8c0399c6ad7bc0e3157b41901bf02f84d724736ec97836dbcc65a4ddecb883286c9eaa6616b2ca95b46f785e65290cbb5c852aa57a958e376cf790c WHIRLPOOL 403ad10304111615981ff3ebbf9971c94eee6b6c97dec1b96e5e75a71dae2b89d9494d7d5743d43df3fcd36f7c45784eec8266ee2f587272ff2e0ba76677ebd5 MISC metadata.xml 1051 SHA256 d45f380d20c067422d5a8d945b7d180c85c31a55efcf9c0896e5d8fb395a45d5 SHA512 84f477edcc0879f3e3da06455d3b64bc2444a6af5a0848b8852670d697801f83f8eb61e4d4c9749d0068cf3aed3606e736570dd4b30969d7c8b4d0361768ffcf WHIRLPOOL f351d85f656b2f0512d616bdf3e901c7272dfb269ed7bf072959aa8c219ed0e534f3a8404842b726246d28d2f2decab77be7e5ed1960653b5fbb7592c01d462e -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) -iEYEAREIAAYFAlHZrUwACgkQXfqz7M26L9u0VQCdE8wHaTvY7tvoMh1RI2ZmzlWm -5bwAnjNSU7u1NQTFoIUr5qU28WbF/c54 -=79WK +iEYEAREIAAYFAlIKa44ACgkQXfqz7M26L9vLFQCfTHSyBCEyNQYCvb/kKUxF6bsn +87cAoJfhwmMnCpa2uTTQloUtBoaCuxiA +=Kql6 -----END PGP SIGNATURE----- diff --git a/sys-apps/policycoreutils/policycoreutils-2.1.14-r4.ebuild b/sys-apps/policycoreutils/policycoreutils-2.1.14-r4.ebuild new file mode 100644 index 000000000000..db1d5bb1ae2e --- /dev/null +++ b/sys-apps/policycoreutils/policycoreutils-2.1.14-r4.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.1.14-r4.ebuild,v 1.1 2013/08/13 17:24:28 swift Exp $ + +EAPI="5" +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="xml" + +inherit multilib python-r1 toolchain-funcs eutils + +EXTRAS_VER="1.30" +SEMNG_VER="2.1.10" +SELNX_VER="2.1.13" +SEPOL_VER="2.1.9" + +IUSE="audit pam dbus sesandbox" + +DESCRIPTION="SELinux core utilities" +HOMEPAGE="http://userspace.selinuxproject.org" +SRC_URI="http://userspace.selinuxproject.org/releases/20130423/${P}.tar.gz +http://dev.gentoo.org/~swift/patches/policycoreutils/patchbundle-${P}-gentoo-r3.tar.gz + mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +COMMON_DEPS=">=sys-libs/libselinux-${SELNX_VER}[python] + >=sys-libs/glibc-2.4 + >=sys-libs/libcap-1.10-r10 + >=sys-libs/libsemanage-${SEMNG_VER}[python] + sys-libs/libcap-ng + >=sys-libs/libsepol-${SEPOL_VER} + sys-devel/gettext + dev-python/ipy + sesandbox? ( dev-libs/libcgroup ) + dbus? ( + sys-apps/dbus + dev-libs/dbus-glib + ) + audit? ( >=sys-process/audit-1.5.1 ) + pam? ( sys-libs/pam ) + ${PYTHON_DEPS}" + +### libcgroup -> seunshare +### dbus -> restorecond + +# pax-utils for scanelf used by rlpkg +RDEPEND="${COMMON_DEPS} + dev-python/sepolgen + app-misc/pax-utils" + +DEPEND="${COMMON_DEPS}" + +S1="${WORKDIR}/${P}" +S2="${WORKDIR}/policycoreutils-extra" + +src_prepare() { + # rlpkg is more useful than fixfiles + sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \ + || die "fixfiles sed 1 failed" + sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \ + || die "fixfiles sed 2 failed" + + EPATCH_MULTI_MSG="Applying policycoreutils patches ... " \ + EPATCH_SUFFIX="patch" \ + EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \ + EPATCH_FORCE="yes" \ + epatch + + # Overwrite gl.po, id.po and et.po with valid PO file + #cp "${S}/po/sq.po" "${S}/po/gl.po" || die "failed to copy ${S}/po/sq.po to gl.po" + #cp "${S}/po/sq.po" "${S}/po/id.po" || die "failed to copy ${S}/po/sq.po to id.po" + #cp "${S}/po/sq.po" "${S}/po/et.po" || die "failed to copy ${S}/po/sq.po to et.po" + + epatch_user + + python_copy_sources + # Our extra code is outside the regular directory, so set it to the extra + # directory. We really should optimize this as it is ugly, but the extra + # code is needed for Gentoo at the same time that policycoreutils is present + # (so we cannot use an additional package for now). + S="${S2}" + python_copy_sources +} + +src_compile() { + local use_audit="n"; + local use_pam="n"; + local use_dbus="n"; + local use_sesandbox="n"; + + use audit && use_audit="y"; + use pam && use_pam="y"; + use dbus && use_dbus="y"; + use sesandbox && use_sesandbox="y"; + + building() { + emake -C "${BUILD_DIR}" AUDIT_LOG_PRIVS="y" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" CC="$(tc-getCC)" PYLIBVER="${EPYTHON}" || die + } + S="${S1}" # Regular policycoreutils + python_foreach_impl building + S="${S2}" # Extra set + python_foreach_impl building +} + +src_install() { + local use_audit="n"; + local use_pam="n"; + local use_dbus="n"; + local use_sesandbox="n"; + + use audit && use_audit="y"; + use pam && use_pam="y"; + use dbus && use_dbus="y"; + use sesandbox && use_sesandbox="y"; + + # Python scripts are present in many places. There are no extension modules. + installation-policycoreutils() { + einfo "Installing policycoreutils" + emake -C "${BUILD_DIR}" DESTDIR="${D}" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" AUDIT_LOG_PRIV="y" PYLIBVER="${EPYTHON}" install || return 1 + } + + installation-extras() { + einfo "Installing policycoreutils-extra" + emake -C "${S2}" DESTDIR="${D}" SHLIBDIR="${D}$(get_libdir)/rc" install || return 1 + } + + S="${S1}" # policycoreutils + python_foreach_impl installation-policycoreutils + S="${S2}" # extras + python_foreach_impl installation-extras + S="${S1}" # back for later + + # remove redhat-style init script + rm -fR "${D}/etc/rc.d" + + # compatibility symlinks + dosym /sbin/setfiles /usr/sbin/setfiles + dosym /$(get_libdir)/rc/runscript_selinux.so /$(get_libdir)/rcscripts/runscript_selinux.so + + # location for permissive definitions + dodir /var/lib/selinux + keepdir /var/lib/selinux + + # Set version-specific scripts + for pyscript in audit2allow sepolgen-ifgen sepolicy chcat; do + python_replicate_script "${ED}/usr/bin/${pyscript}" + done + for pyscript in semanage rlpkg; do + python_replicate_script "${ED}/usr/sbin/${pyscript}" + done + + dodir /usr/share/doc/${PF}/mcstrans/examples + cp -dR "${S1}"/mcstrans/share/examples/* "${D}/usr/share/doc/${PF}/mcstrans/examples" +} -- cgit v1.2.3-65-gdbad