diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-04-28 20:21:43 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-04-28 20:21:43 +0100 |
commit | 40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch) | |
tree | 758c221bad35c9288d0bd6df9c7dfc226728e52c /sys-libs/libsemanage | |
parent | 8d5dbd847cbc704a6a06405856e94b461011afe3 (diff) |
gentoo resync : 28.04.2021
Diffstat (limited to 'sys-libs/libsemanage')
-rw-r--r-- | sys-libs/libsemanage/Manifest | 6 | ||||
-rw-r--r-- | sys-libs/libsemanage/libsemanage-3.1-r1.ebuild | 2 | ||||
-rw-r--r-- | sys-libs/libsemanage/libsemanage-3.2.ebuild | 127 | ||||
-rw-r--r-- | sys-libs/libsemanage/libsemanage-9999.ebuild | 21 |
4 files changed, 142 insertions, 14 deletions
diff --git a/sys-libs/libsemanage/Manifest b/sys-libs/libsemanage/Manifest index 9b73e571e9c5..c671f4662ef6 100644 --- a/sys-libs/libsemanage/Manifest +++ b/sys-libs/libsemanage/Manifest @@ -1,4 +1,6 @@ DIST libsemanage-3.1.tar.gz 179601 BLAKE2B 69450a4eda1f3728d339f65db1eec9940995fcea5208d17dca531ebc998aefbfec48fe91beffa3490e1502953aa550405fb696635d01b0eb8050c8f00f11106a SHA512 8609ca7d13b5c603677740f2b14558fea3922624af182d20d618237ba11fcf2559fab82fc68d1efa6ff118f064d426f005138521652c761de92cd66150102197 -EBUILD libsemanage-3.1-r1.ebuild 4283 BLAKE2B b214507e91136ee6f954efdd8ab6c6122934297fdf3fcb9500ac2be8fad85c4abf7da137b6f58b213431986ca0dfa3f5a84319161b631e17fb51916818db5f02 SHA512 f386ed5eeb8c4e358cf6e9501a2fcfc2d2c77da404f09fc41c6d67d19e87b08a8c1381a933b0cedbfe49b33183e4a349d26deb34e8bd276e3c98624ea72ff1ed -EBUILD libsemanage-9999.ebuild 4285 BLAKE2B 529929a3950623472a21a25a29592c9a3933ecb021f556092d3380d6b0c8a713f22ba338fa55913f7783f6aeb3188af6a5bae8ef687fcf6993d3c63f2bc07533 SHA512 a7b6de81aabc34061369b19aefa2a36991b67ab48539ae8d4c82637339c044c831b33d0ffac77dccc7468dbbbaca939181792da717d3f2f87baa66f6b2dae106 +DIST libsemanage-3.2.tar.gz 178839 BLAKE2B c0925812d784923a7a239ba919fc0a0e1d84cb528cbf4a357fb7938d3c06ebd2f0b60cd3eba40b76bf7c2922a081b99b16b32dc16638aa1bfce32553e241fb9f SHA512 6ad670bb298b1bab506217b12a3fda5d2209f4387a11410f0c1b65f765ffb579b0d70795dee19048909e0b72ef904fc318be60d5a01f80ab12742ce07647a084 +EBUILD libsemanage-3.1-r1.ebuild 4274 BLAKE2B eb0866da968e01b89d6ba51cdcdd89f8796b0beeac515a3dbb47a823d7d5b24b64e01a05948373e6a2159b80866394d98edef9d3048436e527b38f0e8a5cb40c SHA512 21cc2d83b6efd83a691010699104d7a5344c84665cc505d4cae13a1a5891c836c728760766ae9492bb1ab0ee03e4d9e764acf6d39aa52824a6e0175db72cfebf +EBUILD libsemanage-3.2.ebuild 4275 BLAKE2B f1cb24ab333c9f3d565d7a3d5a4fb80b6339b84b17cc4c7fc445ab1748f443d8ae15c51ff52500e8404f2e635082d24f220afa023f0516214dc2802290518efc SHA512 d2c375e0bd73b51cc663550ecad5401e2a21951105cec6fe0d12ee18e70334a0284afd3ab9eb7454dfe7a172a974804bacc86bd3071c67c03681536e8dc2eeeb +EBUILD libsemanage-9999.ebuild 4275 BLAKE2B f1cb24ab333c9f3d565d7a3d5a4fb80b6339b84b17cc4c7fc445ab1748f443d8ae15c51ff52500e8404f2e635082d24f220afa023f0516214dc2802290518efc SHA512 d2c375e0bd73b51cc663550ecad5401e2a21951105cec6fe0d12ee18e70334a0284afd3ab9eb7454dfe7a172a974804bacc86bd3071c67c03681536e8dc2eeeb MISC metadata.xml 334 BLAKE2B a76cd05e8b752345f7624b375455c1f25ca0417c60a16cc0f2a37d2a876ce237faa80b4c997d34de967e61f05c299a4b1fbe848799d93a5f16dcfebcfed5ebdf SHA512 3bee1c898adaf223c205ba41afe4adfc620ccdff69ea77abfd02b3e33d21a307b889945f2d674b1c88fb4f853c6ace7cca67143f7339315abc3d167f752a1cd5 diff --git a/sys-libs/libsemanage/libsemanage-3.1-r1.ebuild b/sys-libs/libsemanage/libsemanage-3.1-r1.ebuild index cd108ff5894e..3fa67d4bf2af 100644 --- a/sys-libs/libsemanage/libsemanage-3.1-r1.ebuild +++ b/sys-libs/libsemanage/libsemanage-3.1-r1.ebuild @@ -4,7 +4,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{7..9} ) -inherit multilib python-r1 toolchain-funcs multilib-minimal +inherit python-r1 toolchain-funcs multilib-minimal MY_P="${P//_/-}" MY_RELEASEDATE="20200710" diff --git a/sys-libs/libsemanage/libsemanage-3.2.ebuild b/sys-libs/libsemanage/libsemanage-3.2.ebuild new file mode 100644 index 000000000000..e48ea5a71f78 --- /dev/null +++ b/sys-libs/libsemanage/libsemanage-3.2.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{7..9} ) + +inherit python-r1 toolchain-funcs multilib-minimal + +MY_PV="${PV//_/-}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="SELinux kernel and policy management library" +HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git" + S="${WORKDIR}/${P}/${PN}" +else + SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86" + S="${WORKDIR}/${MY_P}" +fi + +LICENSE="GPL-2" +SLOT="0/2" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=">=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}] + >=sys-libs/libselinux-${PV}:=[${MULTILIB_USEDEP}] + >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}] + ${PYTHON_DEPS}" +DEPEND="${RDEPEND}" +BDEPEND=">=dev-lang/swig-2.0.4-r1 + sys-devel/bison + sys-devel/flex + virtual/pkgconfig" + +# tests are not meant to be run outside of the +# full SELinux userland repo +RESTRICT="test" + +src_prepare() { + eapply_user + + echo >> "${S}/src/semanage.conf" + echo "# Set this to true to save the linked policy." >> "${S}/src/semanage.conf" + echo "# This is normally only useful for analysis" >> "${S}/src/semanage.conf" + echo "# or debugging of policy." >> "${S}/src/semanage.conf" + echo "save-linked=false" >> "${S}/src/semanage.conf" + echo >> "${S}/src/semanage.conf" + echo "# Set this to 0 to disable assertion checking." >> "${S}/src/semanage.conf" + echo "# This should speed up building the kernel policy" >> "${S}/src/semanage.conf" + echo "# from policy modules, but may leave you open to" >> "${S}/src/semanage.conf" + echo "# dangerous rules which assertion checking" >> "${S}/src/semanage.conf" + echo "# would catch." >> "${S}/src/semanage.conf" + echo "expand-check=1" >> "${S}/src/semanage.conf" + echo >> "${S}/src/semanage.conf" + echo "# Modules in the module store can be compressed" >> "${S}/src/semanage.conf" + echo "# with bzip2. Set this to the bzip2 blocksize" >> "${S}/src/semanage.conf" + echo "# 1-9 when compressing. The higher the number," >> "${S}/src/semanage.conf" + echo "# the more memory is traded off for disk space." >> "${S}/src/semanage.conf" + echo "# Set to 0 to disable bzip2 compression." >> "${S}/src/semanage.conf" + echo "bzip-blocksize=0" >> "${S}/src/semanage.conf" + echo >> "${S}/src/semanage.conf" + echo "# Reduce memory usage for bzip2 compression and" >> "${S}/src/semanage.conf" + echo "# decompression of modules in the module store." >> "${S}/src/semanage.conf" + echo "bzip-small=true" >> "${S}/src/semanage.conf" + + multilib_copy_sources +} + +multilib_src_compile() { + local -x CFLAGS="${CFLAGS} -fno-semantic-interposition" + + emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + all + + if multilib_is_native_abi; then + building_py() { + emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + "$@" + } + python_foreach_impl building_py swigify + python_foreach_impl building_py pywrap + fi +} + +multilib_src_install() { + emake \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + DESTDIR="${ED}" install + + if multilib_is_native_abi; then + installation_py() { + emake DESTDIR="${ED}" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + install-pywrap + python_optimize # bug 531638 + } + python_foreach_impl installation_py + fi +} + +multiib_src_install_all() { + python_setup + python_fix_shebang "${ED}"/usr/libexec/selinux/semanage_migrate_store +} + +pkg_postinst() { + # Migrate the SELinux semanage configuration store if not done already + local selinuxtype=$(awk -F'=' '/SELINUXTYPE=/ {print $2}' "${EROOT}"/etc/selinux/config 2>/dev/null) + if [ -n "${selinuxtype}" ] && [ ! -d "${EROOT}"/var/lib/selinux/${selinuxtype}/active ] ; then + ewarn "Since the 2.4 SELinux userspace, the policy module store is moved" + ewarn "from /etc/selinux to /var/lib/selinux. The migration will be run now." + ewarn "If there are any issues, it can be done manually by running:" + ewarn "/usr/libexec/selinux/semanage_migrate_store" + ewarn "For more information, please see" + ewarn "- https://github.com/SELinuxProject/selinux/wiki/Policy-Store-Migration" + fi +} diff --git a/sys-libs/libsemanage/libsemanage-9999.ebuild b/sys-libs/libsemanage/libsemanage-9999.ebuild index 4ae63c472409..e48ea5a71f78 100644 --- a/sys-libs/libsemanage/libsemanage-9999.ebuild +++ b/sys-libs/libsemanage/libsemanage-9999.ebuild @@ -4,13 +4,10 @@ EAPI=7 PYTHON_COMPAT=( python3_{7..9} ) -inherit multilib python-r1 toolchain-funcs multilib-minimal +inherit python-r1 toolchain-funcs multilib-minimal -MY_P="${P//_/-}" -MY_RELEASEDATE="20200710" - -SEPOL_VER="${PV}" -SELNX_VER="${PV}" +MY_PV="${PV//_/-}" +MY_P="${PN}-${MY_PV}" DESCRIPTION="SELinux kernel and policy management library" HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki" @@ -18,19 +15,19 @@ HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki" if [[ ${PV} == 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git" - S="${WORKDIR}/${MY_P}/${PN}" + S="${WORKDIR}/${P}/${PN}" else - SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_RELEASEDATE}/${MY_P}.tar.gz" + SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz" KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86" S="${WORKDIR}/${MY_P}" fi LICENSE="GPL-2" -SLOT="0" +SLOT="0/2" REQUIRED_USE="${PYTHON_REQUIRED_USE}" -RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}[${MULTILIB_USEDEP}] - >=sys-libs/libselinux-${SELNX_VER}[${MULTILIB_USEDEP}] +RDEPEND=">=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP}] + >=sys-libs/libselinux-${PV}:=[${MULTILIB_USEDEP}] >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}] ${PYTHON_DEPS}" DEPEND="${RDEPEND}" @@ -74,6 +71,8 @@ src_prepare() { } multilib_src_compile() { + local -x CFLAGS="${CFLAGS} -fno-semantic-interposition" + emake \ AR="$(tc-getAR)" \ CC="$(tc-getCC)" \ |