* [gentoo-commits] repo/gentoo:master commit in: dev-util/bootconfig/
@ 2022-06-17 12:20 Yixun Lan
0 siblings, 0 replies; 3+ messages in thread
From: Yixun Lan @ 2022-06-17 12:20 UTC (permalink / raw
To: gentoo-commits
commit: 467d36e54c8bd5fe0c12334df6b7ddf972eab8d4
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 17 12:07:47 2022 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Jun 17 12:20:07 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=467d36e5
dev-util/bootconfig: new package, add 5.18
bootconfig tool support add key-value data to kernel command line
https://docs.kernel.org/admin-guide/bootconfig.html
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
dev-util/bootconfig/Manifest | 1 +
dev-util/bootconfig/bootconfig-5.18.ebuild | 104 +++++++++++++++++++++++++++++
dev-util/bootconfig/metadata.xml | 13 ++++
3 files changed, 118 insertions(+)
diff --git a/dev-util/bootconfig/Manifest b/dev-util/bootconfig/Manifest
new file mode 100644
index 000000000000..907336dcebdf
--- /dev/null
+++ b/dev-util/bootconfig/Manifest
@@ -0,0 +1 @@
+DIST linux-5.18.tar.xz 129790264 BLAKE2B e2745a69eb70169e90505a9318a3993046eab3020496eecde7d8352ecda0eb71a25b21becf7ce93fc593507dce7d1cd61b94ddcdf82b3094d79c0d3d48508eeb SHA512 dbbc9d1395898a498fa4947fceda1781344fa5d360240f753810daa4fa88e519833e2186c4e582a8f1836e6413e9e85f6563c7770523b704e8702d67622f98b5
diff --git a/dev-util/bootconfig/bootconfig-5.18.ebuild b/dev-util/bootconfig/bootconfig-5.18.ebuild
new file mode 100644
index 000000000000..728bae95e34c
--- /dev/null
+++ b/dev-util/bootconfig/bootconfig-5.18.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit estack
+
+DESCRIPTION="Bootconfig tools for kernel command line to support key-value"
+HOMEPAGE="https://kernel.org/"
+
+LINUX_V="${PV:0:1}.x"
+if [[ ${PV} == *_rc* ]] ; then
+ LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1))
+ PATCH_VERSION=$(ver_cut 1-3)
+ LINUX_PATCH=patch-${PV//_/-}.xz
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH}
+ https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
+elif [[ ${PV} == *.*.* ]] ; then
+ # stable-release series
+ LINUX_VER=$(ver_cut 1-2)
+ LINUX_PATCH=patch-${PV}.xz
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
+else
+ LINUX_VER=${PV}
+ SRC_URI=""
+fi
+
+LINUX_SOURCES="linux-${LINUX_VER}.tar.xz"
+SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv"
+IUSE="examples"
+
+BDEPEND="
+ ${LINUX_PATCH+dev-util/patchutils}
+"
+
+RDEPEND=""
+
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-5.10
+"
+
+S_K="${WORKDIR}/linux-${LINUX_VER}"
+S="${S_K}/tools/bootconfig"
+
+src_unpack() {
+ local paths=(
+ tools/arch tools/build tools/include tools/lib tools/bootconfig tools/scripts
+ scripts include lib "arch/*/lib"
+ )
+
+ # We expect the tar implementation to support the -j option (both
+ # GNU tar and libarchive's tar support that).
+ echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}"
+ tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \
+ "${paths[@]/#/linux-${LINUX_VER}/}" || die
+
+ if [[ -n ${LINUX_PATCH} ]] ; then
+ eshopts_push -o noglob
+ ebegin "Filtering partial source patch"
+ filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \
+ > ${P}.patch
+ eend $? || die "filterdiff failed"
+ eshopts_pop
+ fi
+
+ local a
+ for a in ${A}; do
+ [[ ${a} == ${LINUX_SOURCES} ]] && continue
+ [[ ${a} == ${LINUX_PATCH} ]] && continue
+ unpack ${a}
+ done
+}
+
+src_prepare() {
+ default
+ if [[ -n ${LINUX_PATCH} ]] ; then
+ pushd "${S_K}" >/dev/null || die
+ eapply "${WORKDIR}"/${P}.patch
+ popd || die
+ fi
+}
+
+src_compile() {
+ emake bootconfig
+}
+
+src_test() {
+ :
+}
+
+src_install() {
+ dobin bootconfig
+
+ if use examples; then
+ dodoc -r scripts
+
+ docinto examples
+ dodoc -r samples/*
+ fi
+}
diff --git a/dev-util/bootconfig/metadata.xml b/dev-util/bootconfig/metadata.xml
new file mode 100644
index 000000000000..f52468ed9ff1
--- /dev/null
+++ b/dev-util/bootconfig/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+ <longdescription>
+ The boot configuration expands the current kernel command line to support
+ additional key-value data when booting the kernel in an efficient way.
+ This allows administrators to pass a structured-Key config file.
+ </longdescription>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/bootconfig/
@ 2024-07-09 15:13 Yixun Lan
0 siblings, 0 replies; 3+ messages in thread
From: Yixun Lan @ 2024-07-09 15:13 UTC (permalink / raw
To: gentoo-commits
commit: 4daaec02015ecc530e81beebf86ecf36e8dbece8
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 9 15:08:23 2024 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Jul 9 15:13:22 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4daaec02
dev-util/bootconfig: add version 6.6, 6.9
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
dev-util/bootconfig/Manifest | 3 ++-
.../{bootconfig-5.18.ebuild => bootconfig-6.6.ebuild} | 12 ++++--------
.../{bootconfig-5.18.ebuild => bootconfig-6.9.ebuild} | 12 ++++--------
3 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/dev-util/bootconfig/Manifest b/dev-util/bootconfig/Manifest
index 907336dcebdf..ebf696914397 100644
--- a/dev-util/bootconfig/Manifest
+++ b/dev-util/bootconfig/Manifest
@@ -1 +1,2 @@
-DIST linux-5.18.tar.xz 129790264 BLAKE2B e2745a69eb70169e90505a9318a3993046eab3020496eecde7d8352ecda0eb71a25b21becf7ce93fc593507dce7d1cd61b94ddcdf82b3094d79c0d3d48508eeb SHA512 dbbc9d1395898a498fa4947fceda1781344fa5d360240f753810daa4fa88e519833e2186c4e582a8f1836e6413e9e85f6563c7770523b704e8702d67622f98b5
+DIST linux-6.6.tar.xz 140064536 BLAKE2B 5f02fd8696d42f7ec8c5fbadec8e7270bdcfcb1f9844a6c4db3e1fd461c93ce1ccda650ca72dceb4890ebcbbf768ba8fba0bce91efc49fbd2c307b04e95665f2 SHA512 458b2c34d46206f9b4ccbac54cc57aeca1eaecaf831bc441e59701bac6eadffc17f6ce24af6eadd0454964e843186539ac0d63295ad2cc32d112b60360c39a35
+DIST linux-6.9.tar.xz 144034416 BLAKE2B 4cf86c3cfe6e6534745d42dfaeca59b17ea1168c4e8b615c80e6d8aac735f11283cd85fa992b440b5d4452917e94b9f08397a64af0be5894e3df23c68892377e SHA512 fed3b4cd1fbfb4d94618587c1934273d2ecc8b6e42a3d586ff8a5f24980be930f2ef803aa2923ca3bfa5e4e619f967f3af315368f24fa76f610b10443624a579
diff --git a/dev-util/bootconfig/bootconfig-5.18.ebuild b/dev-util/bootconfig/bootconfig-6.6.ebuild
similarity index 95%
copy from dev-util/bootconfig/bootconfig-5.18.ebuild
copy to dev-util/bootconfig/bootconfig-6.6.ebuild
index 3db6300cf029..487db83fc96d 100644
--- a/dev-util/bootconfig/bootconfig-5.18.ebuild
+++ b/dev-util/bootconfig/bootconfig-6.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -22,11 +22,12 @@ elif [[ ${PV} == *.*.* ]] ; then
SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
else
LINUX_VER=${PV}
- SRC_URI=""
fi
LINUX_SOURCES="linux-${LINUX_VER}.tar.xz"
SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
+S_K="${WORKDIR}/linux-${LINUX_VER}"
+S="${S_K}/tools/bootconfig"
LICENSE="GPL-2"
SLOT="0"
@@ -37,18 +38,13 @@ BDEPEND="
${LINUX_PATCH+dev-util/patchutils}
"
-RDEPEND=""
-
DEPEND="${RDEPEND}
>=sys-kernel/linux-headers-5.10
"
-S_K="${WORKDIR}/linux-${LINUX_VER}"
-S="${S_K}/tools/bootconfig"
-
CONFIG_CHECK="~BOOT_CONFIG"
-PATCHES=( "${FILESDIR}"/${P}-cflags.patch )
+PATCHES=( "${FILESDIR}"/${PN}-5.18-cflags.patch )
src_unpack() {
local paths=(
diff --git a/dev-util/bootconfig/bootconfig-5.18.ebuild b/dev-util/bootconfig/bootconfig-6.9.ebuild
similarity index 95%
rename from dev-util/bootconfig/bootconfig-5.18.ebuild
rename to dev-util/bootconfig/bootconfig-6.9.ebuild
index 3db6300cf029..487db83fc96d 100644
--- a/dev-util/bootconfig/bootconfig-5.18.ebuild
+++ b/dev-util/bootconfig/bootconfig-6.9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -22,11 +22,12 @@ elif [[ ${PV} == *.*.* ]] ; then
SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
else
LINUX_VER=${PV}
- SRC_URI=""
fi
LINUX_SOURCES="linux-${LINUX_VER}.tar.xz"
SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
+S_K="${WORKDIR}/linux-${LINUX_VER}"
+S="${S_K}/tools/bootconfig"
LICENSE="GPL-2"
SLOT="0"
@@ -37,18 +38,13 @@ BDEPEND="
${LINUX_PATCH+dev-util/patchutils}
"
-RDEPEND=""
-
DEPEND="${RDEPEND}
>=sys-kernel/linux-headers-5.10
"
-S_K="${WORKDIR}/linux-${LINUX_VER}"
-S="${S_K}/tools/bootconfig"
-
CONFIG_CHECK="~BOOT_CONFIG"
-PATCHES=( "${FILESDIR}"/${P}-cflags.patch )
+PATCHES=( "${FILESDIR}"/${PN}-5.18-cflags.patch )
src_unpack() {
local paths=(
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/bootconfig/
@ 2024-08-23 14:48 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-08-23 14:48 UTC (permalink / raw
To: gentoo-commits
commit: e1bfef38a962560d37781ca63dce6338f9c06dba
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 23 14:47:09 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug 23 14:47:09 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1bfef38
dev-util/bootconfig: fix filterdiff use
See 691f5d53899938ee921c032ee027e90c1f4a28e6.
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-util/bootconfig/bootconfig-6.6.ebuild | 5 +++--
dev-util/bootconfig/bootconfig-6.9.ebuild | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dev-util/bootconfig/bootconfig-6.6.ebuild b/dev-util/bootconfig/bootconfig-6.6.ebuild
index 487db83fc96d..7ac49d14eeda 100644
--- a/dev-util/bootconfig/bootconfig-6.6.ebuild
+++ b/dev-util/bootconfig/bootconfig-6.6.ebuild
@@ -61,9 +61,10 @@ src_unpack() {
if [[ -n ${LINUX_PATCH} ]] ; then
eshopts_push -o noglob
ebegin "Filtering partial source patch"
- filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \
- > ${P}.patch
+ xzcat "${DISTDIR}"/${LINUX_PATCH} | filterdiff -p1 ${paths[@]/#/-i} > ${P}.patch
+ assert -n "Unpacking to ${P} from ${DISTDIR}/${LINUX_PATCH} failed"
eend $? || die "filterdiff failed"
+ test -s ${P}.patch || die "patch is empty?!"
eshopts_pop
fi
diff --git a/dev-util/bootconfig/bootconfig-6.9.ebuild b/dev-util/bootconfig/bootconfig-6.9.ebuild
index 487db83fc96d..7ac49d14eeda 100644
--- a/dev-util/bootconfig/bootconfig-6.9.ebuild
+++ b/dev-util/bootconfig/bootconfig-6.9.ebuild
@@ -61,9 +61,10 @@ src_unpack() {
if [[ -n ${LINUX_PATCH} ]] ; then
eshopts_push -o noglob
ebegin "Filtering partial source patch"
- filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \
- > ${P}.patch
+ xzcat "${DISTDIR}"/${LINUX_PATCH} | filterdiff -p1 ${paths[@]/#/-i} > ${P}.patch
+ assert -n "Unpacking to ${P} from ${DISTDIR}/${LINUX_PATCH} failed"
eend $? || die "filterdiff failed"
+ test -s ${P}.patch || die "patch is empty?!"
eshopts_pop
fi
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-23 14:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 14:48 [gentoo-commits] repo/gentoo:master commit in: dev-util/bootconfig/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-07-09 15:13 Yixun Lan
2022-06-17 12:20 Yixun Lan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox