From 1fc645bdd7ea485bd4ca198da712025a044108c7 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 17 Aug 2020 19:30:05 +0200 Subject: [PATCH 1/5] 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 +} From b4f310ee794cf2353cd7439053671811ba7fa3a4 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 17 Aug 2020 19:32:43 +0200 Subject: [PATCH 2/5] sys-process/tini: Apply our modifications --- .../coreos-overlay/sys-process/tini/README.md | 5 ++ .../sys-process/tini/tini-0.18.0.ebuild | 67 +++++++------------ 2 files changed, 30 insertions(+), 42 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-process/tini/README.md diff --git a/sdk_container/src/third_party/coreos-overlay/sys-process/tini/README.md b/sdk_container/src/third_party/coreos-overlay/sys-process/tini/README.md new file mode 100644 index 0000000000..b7ea2dcbde --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-process/tini/README.md @@ -0,0 +1,5 @@ +This is a fork of gentoo's sys-process/tini package. The sole reason +that this package is in coreos-overlay and not in portage-stable is to +get rid of the build dependency on cmake, which we do not provide. The +build system is replaced with a small autotools setup (see +[files/automake](files/automake)). 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 index fa232a3f35..c9dec97937 100644 --- 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 @@ -1,9 +1,16 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Flatcar: Based on tini-0.18.0.ebuild from commit +# d6c89a5caedbe5cae98142ebb99974b41177aedd in gentoo repo (see +# https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-process/tini/tini-0.18.0.ebuild?id=d6c89a5caedbe5cae98142ebb99974b41177aedd). + EAPI=7 -inherit cmake-utils flag-o-matic +# Flatcar: We provide our autotools-based build system to avoid build +# dependency on cmake. So the settings are hardcoded in the build +# system - we want static binary and a non-minimal build. +inherit autotools GIT_COMMIT=fec3683b971d9c3ef73f284f176672c44b448662 DESCRIPTION="A tiny but valid init for containers" @@ -12,48 +19,24 @@ 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" +# Flatcar: We don't mark arm64 as "testing". +KEYWORDS="amd64 arm64" +# Flatcar: No IUSE on args or on static - it's hardcoded in the build +# system replacement. src_prepare() { - cmake-utils_src_prepare + # Flatcar: We don't use cmake, so all the code handling cmake + # stuff is dropped. Autotools provide the standard configure + # && make && make install build protocol, which Gentoo handles + # out of the box. + for file in configure.ac Makefile.am src/Makefile.am; do + cp "${FILESDIR}/automake/${file}" "${S}/${file}" + done + eapply_user - 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 + export tini_VERSION_MAJOR=$(ver_cut 1) + export tini_VERSION_MINOR=$(ver_cut 2) + export tini_VERSION_PATCH=$(ver_cut 3) + export tini_VERSION_GIT=${GIT_COMMIT} + eautoreconf } From c1fec894416b1b8266952f13d6c76f8ac93bef60 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 12 Aug 2020 19:50:26 +0200 Subject: [PATCH 3/5] app-torcx/docker: Bump tini dependency to 0.18.0 I haven't found any incompatible changes on the quick scan of tini's commits log from 0.13.2 to 0.18. So the bump should work just fine. --- .../coreos-overlay/app-torcx/docker/docker-17.03.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/app-torcx/docker/docker-17.03.ebuild b/sdk_container/src/third_party/coreos-overlay/app-torcx/docker/docker-17.03.ebuild index f9d827a619..21665a3345 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-torcx/docker/docker-17.03.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-torcx/docker/docker-17.03.ebuild @@ -15,7 +15,7 @@ RDEPEND=" ~app-emulation/containerd-0.2.6 ~app-emulation/docker-proxy-0.8.0_p20161019 ~app-emulation/docker-runc-1.0.0_rc2_p136 - =sys-process/tini-0.13.2 + =sys-process/tini-0.18.0 " src_install() { From dd3b7ec3518fb092b3c4e14a6265d2732df7efb4 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 17 Aug 2020 19:37:43 +0200 Subject: [PATCH 4/5] app-emulation/docker: Bump tini dependency to 0.18.0 --- .../app-emulation/docker/docker-17.03.2-r1.ebuild | 2 +- .../coreos-overlay/app-emulation/docker/docker-9999.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-17.03.2-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-17.03.2-r1.ebuild index bd83378c16..87e6aec084 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-17.03.2-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-17.03.2-r1.ebuild @@ -65,7 +65,7 @@ RDEPEND=" ~app-emulation/containerd-0.2.6[seccomp?] ~app-emulation/docker-runc-1.0.0_rc2_p136[apparmor?,seccomp?] ~app-emulation/docker-proxy-0.8.0_p20161019 - container-init? ( >=sys-process/tini-0.13.0 ) + container-init? ( >=sys-process/tini-0.18.0 ) " RESTRICT="installsources strip" diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild index cd66578eec..70f541dd9c 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild @@ -67,7 +67,7 @@ RDEPEND=" ~app-emulation/containerd-1.1.2 ~app-emulation/docker-runc-1.0.0_rc92[apparmor?,seccomp?] ~app-emulation/docker-proxy-0.8.0_p20180709 - container-init? ( >=sys-process/tini-0.13.1 ) + container-init? ( >=sys-process/tini-0.18.0 ) " RESTRICT="installsources strip" From efbb8218c7fd0203d7690c99382e30818bcaa483 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 17 Aug 2020 19:33:06 +0200 Subject: [PATCH 5/5] sys-process/tini: Drop old ebuild --- .../coreos-overlay/sys-process/tini/Manifest | 1 - .../sys-process/tini/tini-0.13.2.ebuild | 27 ------------------- 2 files changed, 28 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-process/tini/tini-0.13.2.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 3619abba3b..0b36112049 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,2 +1 @@ -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.13.2.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-process/tini/tini-0.13.2.ebuild deleted file mode 100644 index 185df270c4..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-process/tini/tini-0.13.2.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit autotools versionator - -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 arm64" - - -src_prepare() { - for file in configure.ac Makefile.am src/Makefile.am; do - cp "${FILESDIR}/automake/${file}" "${S}/${file}" - done - eapply_user - - export tini_VERSION_MAJOR=$(get_version_component_range 1) - export tini_VERSION_MINOR=$(get_version_component_range 2) - export tini_VERSION_PATCH=$(get_version_component_range 3) - eautoreconf -}