From 1fc645bdd7ea485bd4ca198da712025a044108c7 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 17 Aug 2020 19:30:05 +0200 Subject: [PATCH] sys-process/tini: Add 0.18.0 from gentoo --- .../coreos-overlay/sys-process/tini/Manifest | 1 + .../sys-process/tini/tini-0.18.0.ebuild | 59 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-process/tini/tini-0.18.0.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/sys-process/tini/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-process/tini/Manifest index c8dcb65fad..3619abba3b 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-process/tini/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/sys-process/tini/Manifest @@ -1 +1,2 @@ DIST tini-0.13.2.tar.gz 27828 SHA256 85e18a4e4089612821321d1d67c16337797c3c78e81117dea56ad75ece20d05f SHA512 117822bf2e45b7cf732bfcd2aa5ea268a189c395f189c03d0e5dcd982872cff29d50adbb1a4d1b85859db4736e932900cfb64a1c487ba271a305146e9677a1d4 WHIRLPOOL f271b592e5524a2297b5a6b8fb88371a9068f01122e7ea95c4d797d2f5da91847b65675a7b5043398b8c9553746a00e4b5fe5ecfd8a1171d3bba87ee78de9a55 +DIST tini-0.18.0.tar.gz 32152 BLAKE2B d676f0f1b4d9f6dca98cdb626aa7c525ec55e090cfeb1cf0e9ab167f1ef4285123223873e92e81d5d62ceb631e26e9012f16b28b1d35813ac801f8e4594be70b SHA512 83279180b6a875aaff9b6b7446ee7e71fd05357279744afcb4db67c76572dc871acfba86c035857009b5dd88ca75d9f2e815d6a925563cdb3e6e771eb83be9b1 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-process/tini/tini-0.18.0.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-process/tini/tini-0.18.0.ebuild new file mode 100644 index 0000000000..fa232a3f35 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-process/tini/tini-0.18.0.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils flag-o-matic + +GIT_COMMIT=fec3683b971d9c3ef73f284f176672c44b448662 +DESCRIPTION="A tiny but valid init for containers" +HOMEPAGE="https://github.com/krallin/tini" +SRC_URI="https://github.com/krallin/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~x86" +IUSE="+args +static" + +src_prepare() { + cmake-utils_src_prepare + + local sed_args=( + # Do not strip binary + -e 's/-Wl,-s")$/")/' + + # Remove -Werror and -pedantic-errors in order to allow macro + # redefinition, so that CFLAGS="-U_FORTIFY_SOURCE" does not + # trigger an error due to add_definitions(-D_FORTIFY_SOURCE=2) + # in CMakeLists.txt (bug 626438). + -e "s/ -Werror / /" + -e "s/ -pedantic-errors / /" + ) + + sed -i "${sed_args[@]}" \ + -e "s/git.*status --porcelain.*/true/" \ + -e "s/git.*log -n 1.*/true/" \ + -e "s/git.\${tini_VERSION_GIT}/git.${GIT_COMMIT}/" \ + CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=() + use args || mycmakeargs+=(-DMINIMAL=ON) + + cmake-utils_src_configure +} + +src_compile() { + append-cflags -DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37 + cmake-utils_src_compile +} + +src_install() { + cmake-utils_src_install + if use static; then + mv "${ED}"/usr/bin/{${PN}-static,${PN}} || die + else + rm "${ED}"/usr/bin/${PN}-static || die + fi +}