mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 15:41:04 +02:00
sys-process/tini: Move to portage-stable and sync with Gentoo
It's from Gentoo commit 3d3624f4ebb26b9fc9c9ecbff7ff0c67b3f9aa4f. We used to have it as a fork to replace cmake-based build system with an autotools-based one. The reason was that we didn't provide cmake in SDK, which is not true any more.
This commit is contained in:
parent
dc7412c405
commit
744788efe4
@ -1,5 +0,0 @@
|
||||
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)).
|
@ -1 +0,0 @@
|
||||
SUBDIRS = src
|
@ -1,12 +0,0 @@
|
||||
AC_INIT([tini], [0.1])
|
||||
AC_PROG_CC
|
||||
|
||||
AM_INIT_AUTOMAKE([])
|
||||
|
||||
AC_SUBST(tini_VERSION_MAJOR)
|
||||
AC_SUBST(tini_VERSION_MINOR)
|
||||
AC_SUBST(tini_VERSION_PATCH)
|
||||
AC_SUBST(tini_VERSION_GIT)
|
||||
|
||||
AC_CONFIG_FILES([Makefile src/Makefile src/tiniConfig.h tpl/VERSION])
|
||||
AC_OUTPUT
|
@ -1,4 +0,0 @@
|
||||
bin_PROGRAMS = tini
|
||||
tini_SOURCES = tini.c
|
||||
|
||||
tini_CFLAGS = -static
|
@ -1,42 +0,0 @@
|
||||
# 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
|
||||
|
||||
# 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=de40ad007797e0dcd8b7126f27bb87401d224240
|
||||
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"
|
||||
# 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() {
|
||||
# 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
|
||||
|
||||
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
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<?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>
|
||||
<upstream>
|
||||
<remote-id type="github">krallin/tini</remote-id>
|
66
sdk_container/src/third_party/portage-stable/sys-process/tini/tini-0.19.0-r1.ebuild
vendored
Normal file
66
sdk_container/src/third_party/portage-stable/sys-process/tini/tini-0.19.0-r1.ebuild
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake flag-o-matic
|
||||
|
||||
# guard against forgetfulness, https://bugs.gentoo.org/795936
|
||||
GIT_COMMIT_0190="de40ad007797e0dcd8b7126f27bb87401d224240"
|
||||
GIT_COMMIT="GIT_COMMIT_${PV//./}"
|
||||
GIT_COMMIT="${!GIT_COMMIT}"
|
||||
|
||||
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 hppa ppc64 ~riscv ~x86"
|
||||
IUSE="+args +static"
|
||||
|
||||
src_prepare() {
|
||||
|
||||
[[ -z ${GIT_COMMIT} ]] && die "forgetful maintainer! please define GIT_COMMIT_${PV//./} on bump"
|
||||
|
||||
cmake_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_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
append-cflags -DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37
|
||||
cmake_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
if use static; then
|
||||
mv "${ED}"/usr/bin/{${PN}-static,${PN}} || die
|
||||
else
|
||||
rm "${ED}"/usr/bin/${PN}-static || die
|
||||
fi
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user