From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BB80F158015 for ; Thu, 21 Dec 2023 09:29:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 02B6F2BC013; Thu, 21 Dec 2023 09:29:45 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D0F412BC013 for ; Thu, 21 Dec 2023 09:29:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B98DD340813 for ; Thu, 21 Dec 2023 09:29:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4A1C9123C for ; Thu, 21 Dec 2023 09:29:42 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1703150974.63a4f7b64a3686b77d6544ce9c56dfe2f58a9be2.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/installkernel-systemd/, sys-kernel/installkernel-systemd/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-kernel/installkernel-systemd/files/installkernel-systemd-3-10-copy-prebuilt.install sys-kernel/installkernel-systemd/installkernel-systemd-3.ebuild X-VCS-Directories: sys-kernel/installkernel-systemd/ sys-kernel/installkernel-systemd/files/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: 63a4f7b64a3686b77d6544ce9c56dfe2f58a9be2 X-VCS-Branch: master Date: Thu, 21 Dec 2023 09:29:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7390ce52-145a-458f-836c-ebf4f9243eb8 X-Archives-Hash: 088c9944bee3db5a1ed0439aec6759f6 commit: 63a4f7b64a3686b77d6544ce9c56dfe2f58a9be2 Author: Andrew Ammerlaan gentoo org> AuthorDate: Thu Dec 21 09:24:01 2023 +0000 Commit: Andrew Ammerlaan gentoo org> CommitDate: Thu Dec 21 09:29:34 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63a4f7b6 sys-kernel/installkernel-systemd: add 3 adds 10-copy-prebuilt.install. This does exactly the same as what 50-dracut.install does when it finds an existing image at the same place as the kernel. However, with the upcoming USE=generic-uki on gentoo-kernel* we want this behaviour also when dracut is not installed. Signed-off-by: Andrew Ammerlaan gentoo.org> ...nstallkernel-systemd-3-10-copy-prebuilt.install | 24 +++++++++++++++ .../installkernel-systemd-3.ebuild | 36 ++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/sys-kernel/installkernel-systemd/files/installkernel-systemd-3-10-copy-prebuilt.install b/sys-kernel/installkernel-systemd/files/installkernel-systemd-3-10-copy-prebuilt.install new file mode 100644 index 000000000000..56f4641d9664 --- /dev/null +++ b/sys-kernel/installkernel-systemd/files/installkernel-systemd-3-10-copy-prebuilt.install @@ -0,0 +1,24 @@ +#!/usr/bin/env sh + +# this file is installed by sys-kernel/installkernel-systemd + +COMMAND="${1}" +KERNEL_IMAGE="${4}" + +if [ "${COMMAND}" != "add" ]; then + exit 0 +fi + +IMAGE_DIR="$(dirname ${KERNEL_IMAGE})" +INITRD=${IMAGE_DIR}/initrd +UKI=${IMAGE_DIR}/uki.efi + +if [ -f "${INITRD}" ]; then + echo "Copying prebuilt initramfs to staging area" + cp "${INITRD}" "${KERNEL_INSTALL_STAGING_AREA}/initrd" || exit 1 +fi + +if [ -f "${UKI}" ]; then + echo "Copying prebuilt UKI to staging area" + cp "${UKI}" "${KERNEL_INSTALL_STAGING_AREA}/uki.efi" || exit 1 +fi diff --git a/sys-kernel/installkernel-systemd/installkernel-systemd-3.ebuild b/sys-kernel/installkernel-systemd/installkernel-systemd-3.ebuild new file mode 100644 index 000000000000..f5c22ec7a318 --- /dev/null +++ b/sys-kernel/installkernel-systemd/installkernel-systemd-3.ebuild @@ -0,0 +1,36 @@ +# Copyright 2019-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Wrap kernel-install from systemd as installkernel" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" +S="${WORKDIR}" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +RDEPEND=" + !sys-kernel/installkernel-gentoo + || ( + sys-apps/systemd[kernel-install(-)] + sys-apps/systemd-utils[kernel-install(-)] + ) +" + +src_install() { + # we could technically use a symlink here but it would require + # us to know the correct path, and that implies /usr merge problems + into / + newsbin - installkernel <<-EOF + #!/usr/bin/env sh + exec kernel-install add "\${1}" "\${2}" --verbose + EOF + + exeinto /usr/lib/kernel/install.d/ + newexe "${FILESDIR}/${PN}-2-r2-00-00machineid-directory.install" \ + 00-00machineid-directory.install + newexe "${FILESDIR}/${PN}-3-10-copy-prebuilt.install" \ + 10-copy-prebuilt.install +}