sys-apps/checkpolicy: sync with Gentoo

Commit-Ref: ea4cd1f216
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
Mathieu Tortuyaux 2023-06-14 10:44:18 +02:00
parent 90bd28e13f
commit cd2d678f43
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8
6 changed files with 19 additions and 74 deletions

View File

@ -1,2 +0,0 @@
DIST checkpolicy-3.1.tar.gz 69072 BLAKE2B 31cb5ef52533b0a62f954e770278fc5766a961d87fb86260b04abe562bcd90d0025b33931c6ad54096c64ab54150c7562c112eac80eb2f60dbcdda57f4cacfe2 SHA512 2276a5a0919286049d2ceba386ef5f6de523745b588bb81cb4fed5eced5fd0b8070249b7a3ae5a85e2abb9369a86318f727d4073aad14ab75c43750a46069168
DIST checkpolicy-3.2.tar.gz 69035 BLAKE2B 263c582c8ed3c38822513899f3591edfc5d0132977451503a8b45d2074b5a1c5ce03973353b3ceaad44da913b4e35546cfef1988b68bd517618efdb942f994ec SHA512 133639595c2acc66c02b5a637c5e0c60d80ce2bae04f4a709d9fafabd31f9497d1a6e3334904b985c2a1bd94a7a7e3df782c2af2ae41d1fd79b69156a835edeb

View File

@ -1,65 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
inherit toolchain-funcs
MY_P="${P//_/-}"
MY_RELEASEDATE="20200710"
SEPOL_VER="${PV}"
SEMNG_VER="${PV}"
DESCRIPTION="SELinux policy compiler"
HOMEPAGE="http://userspace.selinuxproject.org"
if [[ ${PV} == 9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
S="${WORKDIR}/${MY_P}/${PN}"
else
SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_RELEASEDATE}/${MY_P}.tar.gz"
KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
S="${WORKDIR}/${MY_P}"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="debug"
DEPEND=">=sys-libs/libsepol-${SEPOL_VER}"
BDEPEND="sys-devel/flex
sys-devel/bison"
RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}"
src_compile() {
# flatcar changes
emake \
CC="$(tc-getCC)" \
YACC="bison -y" \
PREFIX="/usr" \
LIBDIR="${ROOT:-/}\$(PREFIX)/$(get_libdir)" \
INCLUDEDIR="${ROOT}\$(PREFIX)/include"
}
src_install() {
# flatcar changes
# we remove the `default` behavior to override
# the LIBSEPOLA variable in order to fix cross compile
emake DESTDIR="${D}" \
LIBSEPOLA="${ROOT:-/}/usr/$(get_libdir)/libsepol.a" \
install
if use debug; then
dobin "${S}/test/dismod"
dobin "${S}/test/dispol"
fi
}
pkg_postinst() {
if ! tc-is-cross-compiler; then
einfo "This checkpolicy can compile version `checkpolicy -V | cut -f 1 -d ' '` policy."
fi
}

View File

@ -0,0 +1 @@
DIST checkpolicy-3.5.tar.gz 69904 BLAKE2B e02ccad07534568a1bbb612330018bbe486800ea40df20ed6f9dc38c88aff7f8858782a28ba7915a58c3bb384f180eb8da7a8fe97a92bcb9baa61eec18da6cbc SHA512 fcd490d865af3b4350c32c5dd9916f8406219841e1e255d8945c6dcc958535247aa27af5597a6988e19f11faea7beeabcb46e8ba2431112bb4aa5c7697bca529

View File

@ -1,10 +1,13 @@
# Copyright 1999-2021 Gentoo Authors # Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI="7" EAPI="7"
inherit toolchain-funcs inherit toolchain-funcs
MY_PV="${PV//_/-}"
MY_P="${PN}-${MY_PV}"
DESCRIPTION="SELinux policy compiler" DESCRIPTION="SELinux policy compiler"
HOMEPAGE="http://userspace.selinuxproject.org" HOMEPAGE="http://userspace.selinuxproject.org"
@ -13,8 +16,9 @@ if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git" EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
S="${WORKDIR}/${P}/${PN}" S="${WORKDIR}/${P}/${PN}"
else else
SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${PV}/${P}.tar.gz" SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86" KEYWORDS="amd64 arm arm64 ~mips ~riscv x86"
S="${WORKDIR}/${MY_P}"
fi fi
LICENSE="GPL-2" LICENSE="GPL-2"

View File

@ -1,10 +1,13 @@
# Copyright 1999-2021 Gentoo Authors # Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI="7" EAPI="7"
inherit toolchain-funcs inherit toolchain-funcs
MY_PV="${PV//_/-}"
MY_P="${PN}-${MY_PV}"
DESCRIPTION="SELinux policy compiler" DESCRIPTION="SELinux policy compiler"
HOMEPAGE="http://userspace.selinuxproject.org" HOMEPAGE="http://userspace.selinuxproject.org"
@ -13,8 +16,9 @@ if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git" EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
S="${WORKDIR}/${P}/${PN}" S="${WORKDIR}/${P}/${PN}"
else else
SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${PV}/${P}.tar.gz" SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86" KEYWORDS="~amd64 ~arm ~arm64 ~mips ~riscv ~x86"
S="${WORKDIR}/${MY_P}"
fi fi
LICENSE="GPL-2" LICENSE="GPL-2"

View File

@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata> <pkgmetadata>
<maintainer type="project"> <maintainer type="project">
<email>selinux@gentoo.org</email> <email>selinux@gentoo.org</email>
<name>SELinux Team</name> <name>SELinux Team</name>
</maintainer> </maintainer>
<upstream>
<remote-id type="github">SELinuxProject/selinux</remote-id>
</upstream>
</pkgmetadata> </pkgmetadata>