sys-kernel/booster: update ebuild
This commit is contained in:
parent
47c9bd3ebc
commit
9b71c7e3b7
|
@ -1,7 +1,9 @@
|
|||
AUX booster.yaml 477 BLAKE2B 6107c1a393a1ac87223850a96de96edf82ef5db7a13efdda3a50f996500f71f9c8b72d68abeaf05e1ef8d68fb9723917a37089e7cef4eb935d179603c4ec9a21 SHA512 9a7882601238bbf5d8c7bb9f8917c0535c52a83b3fb775049331cb9d11a61f0ec84904db4af2e1fdb9ed3009cbfa1848b402fba0cc0b7e281e43858d5c00acdc
|
||||
AUX installkernel-52-booster.install 866 BLAKE2B 3c44490fffd26603000d7359c7c877090485fad6851da65f865a9879594470bdd7a50bc5aefe466989beb454537e1b47b4389ba81028319e6787a155aaa45332 SHA512 176d99e71f79f2524e86cf32e6e150056205cc442f964fbcb4849f7f0b29c03ba6fcdf77d42fa23d178deed3661f8c9c8e9f996060001a44dc7527d60cfa0c92
|
||||
AUX kernel-install-52-booster.install 574 BLAKE2B 076ae7ceb2cd859163b13690c64e16c8074bf8515c856ebdaa4de7a8cf8f1d9bd994552ed251f32851f51f3c4faf4f451c193bc93b50f39c6a758fcc3c89d9ba SHA512 65fb02d0f4a9f8cbbe382a2ccc32b847dbf16a31e188a45da53fb72a9cb2b479f638ff76dcd290dc4d23268046c9f6d0fb0d5f6ee8850ee2602529908f4490e9
|
||||
DIST booster-0.11-vendor.tar.xz 1919268 BLAKE2B 8f29b68d15595d8995fff13fe1f77bb7ea9bdb556c5ba7c096a12539b2fcfd05cbd7ed12a6dde6d1977096b5d7de7bd5569b27951a28b9be908d71d41eaae5e6 SHA512 cd1f50166b22bb7e1524e113e63dcc9fe25b8bbf36a6fda7f0e6f86b7706b4c6666bfa48aa9597fa3b94bd82851d41cfe1ec48338829855fe490d54a6df3b53c
|
||||
DIST booster-0.11.tar.gz 113332 BLAKE2B 55969cd75fea79df20b3778bbd295b9d69284a04d42a5cfa0ac8128772b37c26a76f68bf2fe587f7d98670a13741a95647ef736e0baf3cc3e09a75952c021ab4 SHA512 fbccb75b57d38696d4e81f0c587c6c456270290d4867b1e5028363beff9f0b08770719e0fcc991bd6c751fe48fdd8d2aee262355b8691caeb6ee702d6cccb7a0
|
||||
DIST booster-0.11_p20240709-vendor.tar.xz 1951976 BLAKE2B 9091ebb47a93d266b6542097074a72757f7e6f5520a799dbc2dc97327af54c27472dab6bab1b186fde8ec28373fb2ab350a20321b4657d104a0f51bb100cfb78 SHA512 b73ee71583287ce58019432d8cbcc5e3c5c834b8571982273cac07e21b4ec99b45f1195957850c9b039b314cee508cace9154f97942f7bc9d2ffabc8897b7931
|
||||
DIST booster-0.11_p20240709.tar.gz 116998 BLAKE2B 0c2a5eb06761a4d1ccaf73028179164936714b8bfb0c4f614b6fd58b7052d567b1a1a7215ce70da8dca9025d0984c4bd2b721e9406a7ef9799d4b222e3cf1cfd SHA512 381ab381e9a44eb3de7ea25aa65969264fdb8c42aa0dcdbf9edd247ca8a0d340288b08b906fd6a4be2d4978a68a0057bda88e726edc87d6d02d46d7c56c7f3ef
|
||||
EBUILD booster-0.11.ebuild 767 BLAKE2B 3558b03d5f0d3be67c8323bcc85fc1800a042134339b629708633db52e6e8255275263050ef3f9290295121a1a41d0616ca709c096531fadce4a70b80d4ac039 SHA512 f2eabf0d485785290369b8b2dd70e536444797009a0c06be8f901b09065d5d226233bdd1eaaecfcd81c19f29346ae156d9c2b517cd107085e86969fb6db30a16
|
||||
EBUILD booster-0.11_p20240709.ebuild 856 BLAKE2B c7e37205d6f6a5ec85f4753873e021a4cebb312c9865593fa5edf744be6e8adbc89c2127b3fa0f32cf1afdcfb2ec43f7ebb8ddda655650c35d8584c8caa6185a SHA512 481dd79fb2e8bfcb64675f62ada5ef07e8233b74b9ce5b21117e57c84a8bdd317ebbb09bfe6d67d5fe53cd6af7bb893da3ee67fdd7fc717be9f545e023a2452c
|
||||
EBUILD booster-0.11.ebuild 1302 BLAKE2B eb3f4c04a72282469e7dbcd1135514f9fd202cf84628a0171dca70536658cbd0f4804669849d3af0213d13779d6fa9107f1f10aa4d0092ba205f305e9ca437eb SHA512 72777beeb3a110678fefe45b450e7925367d02a99890c815ec107d895b5bd8762e1620f034deadff2efb1129472bbc377cf5a48d87c2ba48eb200066d0791268
|
||||
EBUILD booster-0.11_p20240709.ebuild 1391 BLAKE2B e4565e4f32687a33d82077aad00c0045d8f99ef232331fe57f7387d747c9566bcf9f1fd9b7f1f3297bfdba08ad3ccb44e85ba1968292d9ddf3ca686f6eadedab SHA512 9cb94291fa2a614f59d6f480e4253172919f9b8987667d2fe1f477f687dc4e0c52894f409ad4fcf4b2c8b515260a27b8f3da6f08e7782e5fe82a0f560be71726
|
||||
|
|
|
@ -14,7 +14,16 @@ LICENSE="MIT"
|
|||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND=""
|
||||
IUSE="kernel-install installkernel"
|
||||
|
||||
DEPEND="kernel-install? (
|
||||
|| (
|
||||
sys-apps/systemd-utils
|
||||
sys-apps/systemd
|
||||
)
|
||||
)
|
||||
installkernel? ( sys-kernel/installkernel )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND=""
|
||||
|
||||
|
@ -27,6 +36,16 @@ src_install() {
|
|||
insinto /etc
|
||||
newins "${FILESDIR}/${PN}.yaml" ${PN}.yaml
|
||||
|
||||
if use installkernel; then
|
||||
# Install the kernel preinst.d hook
|
||||
exeinto /usr/lib/kernel/preinst.d
|
||||
doexe "${FILESDIR}/installkernel-52-booster.install"
|
||||
fi
|
||||
if use kernel-install; then
|
||||
exeinto /usr/lib/kernel/install.d
|
||||
doexe "${FILESDIR}/kernel-install-52-booster.install"
|
||||
fi
|
||||
|
||||
exeinto /usr/lib/${PN}
|
||||
doexe init/init
|
||||
|
||||
|
|
|
@ -15,7 +15,16 @@ LICENSE="MIT"
|
|||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND=""
|
||||
IUSE="kernel-install installkernel"
|
||||
|
||||
DEPEND="kernel-install? (
|
||||
|| (
|
||||
sys-apps/systemd-utils
|
||||
sys-apps/systemd
|
||||
)
|
||||
)
|
||||
installkernel? ( sys-kernel/installkernel )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND=""
|
||||
|
||||
|
@ -30,6 +39,16 @@ src_install() {
|
|||
insinto /etc
|
||||
newins "${FILESDIR}/${PN}.yaml" ${PN}.yaml
|
||||
|
||||
if use installkernel; then
|
||||
# Install the kernel preinst.d hook
|
||||
exeinto /usr/lib/kernel/preinst.d
|
||||
doexe "${FILESDIR}/installkernel-52-booster.install"
|
||||
fi
|
||||
if use kernel-install; then
|
||||
exeinto /usr/lib/kernel/install.d
|
||||
doexe "${FILESDIR}/kernel-install-52-booster.install"
|
||||
fi
|
||||
|
||||
exeinto /usr/lib/${PN}
|
||||
doexe init/init
|
||||
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# this file is installed by sys-kernel/ugrd
|
||||
|
||||
ver=${1}
|
||||
img=${2}
|
||||
initrd=$(dirname "${img}")/initrd
|
||||
|
||||
# familiar helpers, we intentionally don't use Gentoo functions.sh
|
||||
die() {
|
||||
echo -e " ${NOCOLOR-\e[1;31m*\e[0m }${*}" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
einfo() {
|
||||
echo -e " ${NOCOLOR-\e[1;32m*\e[0m }${*}" >&2
|
||||
}
|
||||
|
||||
ewarn() {
|
||||
echo -e " ${NOCOLOR-\e[1;33m*\e[0m }${*}" >&2
|
||||
}
|
||||
|
||||
main() {
|
||||
# re-define for subst to work
|
||||
[[ -n ${NOCOLOR+yes} ]] && NOCOLOR=
|
||||
|
||||
# Exit if ugrd is not the INSTALLKERNEL_INITRD_GENERATOR
|
||||
[[ ${INSTALLKERNEL_INITRD_GENERATOR} == "booster" ]] || exit 0
|
||||
|
||||
# do nothing if somehow ugrd is not installed
|
||||
[[ -x $(command -v booster) ]] || { ewarn "booster is not installed" && exit 0 ; }
|
||||
|
||||
[[ ${EUID} -eq 0 ]] || die "Please run this script as root"
|
||||
|
||||
booster build --kernel-version="${ver}" "${initrd}" || die "Failed to generate initramfs"
|
||||
}
|
||||
|
||||
main
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
COMMAND="${1:?}"
|
||||
KERNEL_VERSION="${2:?}"
|
||||
|
||||
# Do not attempt to create initramfs if the supplied image is already a UKI
|
||||
[ "${KERNEL_INSTALL_IMAGE_TYPE}" = "uki" ] && exit 0
|
||||
|
||||
# Only run if the initrd generator is ugrd
|
||||
[ "${KERNEL_INSTALL_INITRD_GENERATOR}" = "booster" ] || exit 0
|
||||
|
||||
# only run when the COMMAND is add, and fewer than 5 arguments are passed
|
||||
[ "${COMMAND}" = "add" ] && [ "${#}" -lt 5 ] || exit 0
|
||||
|
||||
booster "$([ "${KERNEL_INSTALL_VERBOSE}" = 1 ] && echo --verbose)" --kernel-version="${KERNEL_VERSION}" "${KERNEL_INSTALL_STAGING_AREA}/initrd" || exit 1
|
Loading…
Reference in New Issue