mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
sys-apps/keyutils: sync with upstream
Commit-Ref: 7456de7c55
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
parent
b2f4560d8e
commit
7b720fb337
@ -1 +1 @@
|
||||
DIST keyutils-1.6.1.tar.gz 119065 BLAKE2B b0c65d8a1ee8cab1ac712820a8bf073777eacd558ddd007fa0fd50467d1de86cff238c1c0e6b33b5ff4da7dfd7e2fd673ce5706c39780e1a4fbee7d9653f3bc9 SHA512 a717d9bc6142edefc02da9e92242db352e0bc835483c303629c236e6d9cc51fb495b03fdf9e0e9f0864d7e755c92b7a67f018e806a5de1944673e60e317134a2
|
||||
DIST keyutils-1.6.3.tar.gz 137022 BLAKE2B b5620b1b6109415fec1268963c2c65d774f3ef7a69eb1ce8d5d8e78b4b807e4fdfda861662a1b5556975ef867add8f985362a31b6608ac2dc198c8d0395d516b SHA512 f65965b8566037078b8eeffa66c6fdbe121c8c2bea7fa5bce04cf7ba5ccc50d5b48e51f4a67ca91e4d5d9a12469e7e3eb3036c920ab25e3feba6e93b4c149cf9
|
||||
|
@ -1,3 +0,0 @@
|
||||
We keep this package in overlay, because we install the keyutils
|
||||
config file in /usr instead of /etc, and then establish some symlinks
|
||||
during installation and with systemd's tmpfiles.d utility.
|
@ -1,32 +0,0 @@
|
||||
From 0a99778774df85448aeda0a37b85c43bc8868a9e Mon Sep 17 00:00:00 2001
|
||||
From: Lars Wendler <polynomial-c@gentoo.org>
|
||||
Date: Fri, 16 Nov 2018 12:37:29 +0100
|
||||
Subject: [PATCH] fix regexp match against `file /proc/$$/exe` for -fPIE bash
|
||||
|
||||
Now that bash is built with PIE enabled, keyutils' check for endianness
|
||||
fails because file no longer returns "executable", but instead returns
|
||||
"shared object" for file << 5.33 and "pie executable" for file >= 5.33.
|
||||
---
|
||||
tests/toolbox.inc.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh
|
||||
index 0ce6db0..712c5bd 100644
|
||||
--- a/tests/toolbox.inc.sh
|
||||
+++ b/tests/toolbox.inc.sh
|
||||
@@ -13,10 +13,10 @@
|
||||
echo === $OUTPUTFILE ===
|
||||
|
||||
endian=`file -L /proc/$$/exe`
|
||||
-if expr "$endian" : '.* MSB \+\(executable\|shared object\).*' >&/dev/null
|
||||
+if expr "$endian" : '.* MSB \+\(executable\|shared object\|pie executable\).*' >&/dev/null
|
||||
then
|
||||
endian=BE
|
||||
-elif expr "$endian" : '.* LSB \+\(executable\|shared object\).*' >&/dev/null
|
||||
+elif expr "$endian" : '.* LSB \+\(executable\|shared object\|pie executable\).*' >&/dev/null
|
||||
then
|
||||
endian=LE
|
||||
else
|
||||
--
|
||||
2.19.1
|
||||
|
@ -1,20 +0,0 @@
|
||||
Hide
|
||||
|
||||
> grep: /etc/rpm: No such file or directory
|
||||
> grep: /usr/lib/rpm: No such file or directory
|
||||
|
||||
errors.
|
||||
|
||||
Bug: https://bugs.gentoo.org/656446
|
||||
|
||||
--- keyutils-1.6.1/Makefile
|
||||
+++ keyutils-1.6.1/Makefile
|
||||
@@ -267,7 +267,7 @@
|
||||
ZSRCBALL := rpmbuild/SOURCES/$(ZTARBALL)
|
||||
|
||||
BUILDID := .local
|
||||
-dist := $(word 2,$(shell grep -r "^%dist" /etc/rpm /usr/lib/rpm))
|
||||
+dist := $(word 2,$(shell grep -r "^%dist" /etc/rpm /usr/lib/rpm 2>/dev/null))
|
||||
release3:= $(word 2,$(shell grep ^Release: $(SPECFILE)))
|
||||
release2:= $(subst %{?dist},$(dist),$(release3))
|
||||
release1:= $(subst %{?buildid},$(BUILDID),$(release2))
|
@ -0,0 +1,38 @@
|
||||
https://bugs.gentoo.org/760633
|
||||
|
||||
From 41077f8901b642d36b63f94b0fc62377a07fc0b2 Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||
Date: Tue, 4 Jan 2022 03:51:10 +0200
|
||||
Subject: [PATCH] Makefile: only run rpmspec if it exists
|
||||
|
||||
keyutils is built on many distros which do not use rpm like
|
||||
Gentoo, ChromeOS or Arch. Older versions of bash silently
|
||||
ignored the fact that rpmspec was missing, but newer bash
|
||||
like v5.1 issue a new error:
|
||||
|
||||
/bin/sh: line 1: rpmspec: command not found
|
||||
|
||||
This happens every time the Makefile is parsed, including
|
||||
for a simple "make" invocation or "make install" even if
|
||||
a rpm package is not desired.
|
||||
|
||||
Arch Linux simply ignores this new error but Gentoo and
|
||||
ChromeOS fail because portage actively monitors the build
|
||||
log for errors like this. See bug report [1].
|
||||
|
||||
Fix this by calling rpmspec only if it exists.
|
||||
|
||||
[1] https://bugs.gentoo.org/760633
|
||||
|
||||
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -285,7 +285,7 @@ SRCBALL := rpmbuild/SOURCES/$(TARBALL)
|
||||
ZSRCBALL := rpmbuild/SOURCES/$(ZTARBALL)
|
||||
|
||||
BUILDID := .local
|
||||
-rpmver0 := $(shell rpmspec -q ./keyutils.spec --define "buildid $(BUILDID)")
|
||||
+rpmver0 := $(shell if which rpmspec >/dev/null 2>&1; then rpmspec -q ./keyutils.spec --define "buildid $(BUILDID)"; fi)
|
||||
rpmver1 := $(word 1,$(rpmver0))
|
||||
rpmver2 := $(subst ., ,$(rpmver1))
|
||||
rpmver3 := $(lastword $(rpmver2))
|
@ -1,3 +0,0 @@
|
||||
L /etc/request-key.conf - - - - ../usr/share/keyutils/request-key.conf
|
||||
d /etc/request-key.d - - - - -
|
||||
d /etc/keyutils - - - - -
|
115
sdk_container/src/third_party/coreos-overlay/sys-apps/keyutils/keyutils-1.6.3-r1.ebuild
vendored
Normal file
115
sdk_container/src/third_party/coreos-overlay/sys-apps/keyutils/keyutils-1.6.3-r1.ebuild
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit toolchain-funcs linux-info multilib-minimal
|
||||
|
||||
DESCRIPTION="Linux Key Management Utilities"
|
||||
HOMEPAGE="https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git"
|
||||
SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/snapshot/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
SLOT="0/1.9"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="static static-libs test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND="!prefix? ( >=sys-kernel/linux-headers-2.6.11 )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.6-makefile-fixup.patch
|
||||
"${FILESDIR}"/${PN}-1.5.10-disable-tests.patch #519062 #522050
|
||||
"${FILESDIR}"/${PN}-1.5.9-header-extern-c.patch
|
||||
"${FILESDIR}"/${PN}-1.6.3-fix-rpmspec-check.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
# To prevent a failure in test phase and false positive bug reports
|
||||
# we are enforcing the following options because testsuite expects
|
||||
# that these options are available. I.e. testsuite only decides based
|
||||
# on kernel version which tests will be called, no feature checking.
|
||||
if use test ; then
|
||||
CONFIG_CHECK="KEYS"
|
||||
ERROR_KEYS="You must have CONFIG_KEYS to run the package testsuite!"
|
||||
|
||||
if kernel_is -ge 2 6 10 && kernel_is -lt 4 0 0 ; then
|
||||
CONFIG_CHECK="${CONFIG_CHECK} KEYS_DEBUG_PROC_KEYS"
|
||||
ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
|
||||
fi
|
||||
|
||||
if kernel_is -ge 4 7 ; then
|
||||
CONFIG_CHECK="${CONFIG_CHECK} KEY_DH_OPERATIONS"
|
||||
ERROR_KEY_DH_OPERATIONS="You must have CONFIG_KEY_DH_OPERATIONS to run the package testsuite!"
|
||||
fi
|
||||
else
|
||||
CONFIG_CHECK="~KEYS"
|
||||
ERROR_KEYS="You will be unable to use this package on this system because CONFIG_KEYS is not set!"
|
||||
|
||||
if kernel_is -ge 4 7 ; then
|
||||
CONFIG_CHECK="${CONFIG_CHECK} ~KEY_DH_OPERATIONS"
|
||||
ERROR_KEY_DH_OPERATIONS="You will be unable to use Diffie-Hellman on this system because CONFIG_KEY_DH_OPERATIONS is not set!"
|
||||
fi
|
||||
fi
|
||||
|
||||
linux-info_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# The lsb check is useless, so avoid spurious command not found messages.
|
||||
sed -i -e 's,lsb_release,:,' tests/prepare.inc.sh || die
|
||||
# Some tests call the kernel which calls userspace, but that will
|
||||
# run the install keyutils rather than the locally compiled one,
|
||||
# so disable round trip tests.
|
||||
rm -rf tests/keyctl/requesting/{bad-args,piped,valid}
|
||||
|
||||
multilib_copy_sources
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
tc-export AR CC CXX
|
||||
sed -i \
|
||||
-e "1iRPATH = $(usex static -static '')" \
|
||||
-e '/^C.*FLAGS/s|:=|+=|' \
|
||||
-e 's:-Werror::' \
|
||||
-e '/^BUILDFOR/s:=.*:=:' \
|
||||
-e "/^LIBDIR/s:=.*:= /usr/$(get_libdir):" \
|
||||
-e '/^USRLIBDIR/s:=.*:=$(LIBDIR):' \
|
||||
-e "s: /: ${EPREFIX}/:g" \
|
||||
-e '/^NO_ARLIB/d' \
|
||||
Makefile || die
|
||||
|
||||
# We need the static lib in order to statically link programs.
|
||||
if use static ; then
|
||||
export NO_ARLIB=0
|
||||
# Hack the progs to depend on the static lib instead.
|
||||
sed -i \
|
||||
-e '/^.*:.*[$](DEVELLIB)$/s:$(DEVELLIB):$(ARLIB) $(SONAME):' \
|
||||
Makefile || die
|
||||
else
|
||||
export NO_ARLIB=$(usex static-libs 0 1)
|
||||
fi
|
||||
emake
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
# Execute the locally compiled code rather than the
|
||||
# older versions already installed in the system.
|
||||
LD_LIBRARY_PATH=${BUILD_DIR} \
|
||||
PATH="${BUILD_DIR}:${PATH}" \
|
||||
emake test
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
# Possibly undo the setting for USE=static (see src_compile).
|
||||
export NO_ARLIB=$(usex static-libs 0 1)
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
dodoc README
|
||||
}
|
@ -1,10 +1,9 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
TMPFILES_OPTIONAL=1
|
||||
inherit toolchain-funcs linux-info multilib-minimal usr-ldscript systemd tmpfiles
|
||||
inherit toolchain-funcs linux-info multilib-minimal usr-ldscript
|
||||
|
||||
DESCRIPTION="Linux Key Management Utilities"
|
||||
HOMEPAGE="https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git"
|
||||
@ -12,7 +11,7 @@ SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/s
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
SLOT="0/1.9"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="static static-libs test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
@ -20,15 +19,12 @@ RDEPEND=""
|
||||
DEPEND="!prefix? ( >=sys-kernel/linux-headers-2.6.11 )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.6-endian-check-1.patch
|
||||
"${FILESDIR}"/${PN}-1.6-makefile-fixup.patch
|
||||
"${FILESDIR}"/${PN}-1.6.1-silence-rpm-check.patch #656446
|
||||
"${FILESDIR}"/${PN}-1.5.10-disable-tests.patch #519062 #522050
|
||||
"${FILESDIR}"/${PN}-1.5.9-header-extern-c.patch
|
||||
"${FILESDIR}"/${PN}-1.6.3-fix-rpmspec-check.patch
|
||||
)
|
||||
|
||||
MAKEOPTS+=" ETCDIR=/usr/share/keyutils"
|
||||
|
||||
pkg_setup() {
|
||||
# To prevent a failure in test phase and false positive bug reports
|
||||
# we are enforcing the following options because testsuite expects
|
||||
@ -65,11 +61,6 @@ src_prepare() {
|
||||
|
||||
# The lsb check is useless, so avoid spurious command not found messages.
|
||||
sed -i -e 's,lsb_release,:,' tests/prepare.inc.sh || die
|
||||
# All the test files are bash, but try to execute via `sh`.
|
||||
sed -i -r \
|
||||
-e 's:([[:space:]])sh([[:space:]]):\1bash\2:' \
|
||||
tests/{Makefile*,*.sh} || die
|
||||
find tests/ -name '*.sh' -exec sed -i '1s:/sh$:/bash:' {} + || die
|
||||
# Some tests call the kernel which calls userspace, but that will
|
||||
# run the install keyutils rather than the locally compiled one,
|
||||
# so disable round trip tests.
|
||||
@ -79,7 +70,7 @@ src_prepare() {
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
tc-export AR CC
|
||||
tc-export AR CC CXX
|
||||
sed -i \
|
||||
-e "1iRPATH = $(usex static -static '')" \
|
||||
-e '/^C.*FLAGS/s|:=|+=|' \
|
||||
@ -113,15 +104,11 @@ multilib_src_test() {
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
dotmpfiles "${FILESDIR}/tmpfiles.d/keyutils.conf"
|
||||
# Possibly undo the setting for USE=static (see src_compile).
|
||||
export NO_ARLIB=$(usex static-libs 0 1)
|
||||
|
||||
default
|
||||
use static || gen_usr_ldscript -a keyutils
|
||||
dosym ../usr/share/keyutils/request-key.conf /etc/request-key.conf
|
||||
dodir /etc/request-key.d
|
||||
dodir /etc/keyutils
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
@ -8,6 +8,9 @@
|
||||
<email>base-system@gentoo.org</email>
|
||||
<name>Gentoo Base System</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:keyutils_project:keyutils</remote-id>
|
||||
</upstream>
|
||||
<slots>
|
||||
<subslots>Reflect ABI compatibility for libkeyutils.so.</subslots>
|
||||
</slots>
|
||||
|
Loading…
Reference in New Issue
Block a user