[gentoo-commits] repo/gentoo:master commit in: sys-kernel/installkernel-systemd-boot/files/, ...

2023-06-22 Thread Andrew Ammerlaan
commit: 0a05585bfc3f37c69d8b694205339499860a0b42
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Tue Jun 20 19:08:06 2023 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Thu Jun 22 06:28:02 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a05585b

sys-kernel/installkernel-systemd-boot: no mkdir machineid if using uki

Uki's are installed to ESP/Linux, we don't need this empty directory

Plus an EAPI bump while we are touching the package

Signed-off-by: Andrew Ammerlaan  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/31559
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 ...temd-boot-2-r2-00-00machineid-directory.install | 32 
 .../installkernel-systemd-boot-2-r2.ebuild | 34 ++
 2 files changed, 66 insertions(+)

diff --git 
a/sys-kernel/installkernel-systemd-boot/files/installkernel-systemd-boot-2-r2-00-00machineid-directory.install
 
b/sys-kernel/installkernel-systemd-boot/files/installkernel-systemd-boot-2-r2-00-00machineid-directory.install
new file mode 100644
index ..5fa3bbeffc04
--- /dev/null
+++ 
b/sys-kernel/installkernel-systemd-boot/files/installkernel-systemd-boot-2-r2-00-00machineid-directory.install
@@ -0,0 +1,32 @@
+#!/usr/bin/env sh
+
+# this file is installed by sys-kernel/installkernel-systemd-boot
+
+COMMAND="${1}"
+ENTRY_DIR_ABS="${3}"
+
+# this is exported by kernel-install
+if [ -z "${KERNEL_INSTALL_MACHINE_ID}" ]; then
+   exit 0
+fi
+
+if [ "${KERNEL_INSTALL_LAYOUT}" = "uki" ]; then
+   exit 0
+fi
+
+if [ "${COMMAND}" != "add" ]; then
+   exit 0
+fi
+
+# If the machine-id dir does not exist (e.g. $ESP/)
+# create it. It receives values directly from kernel-install.
+# This is the only function of this plugin.
+MACHINE_ID_DIR="${ENTRY_DIR_ABS%/*}"
+if ! [ -d "${MACHINE_ID_DIR}" ]; then
+   if [ "${KERNEL_INSTALL_VERBOSE}" = "1" ]; then
+   echo "+mkdir -v -p ${MACHINE_ID_DIR}"
+   mkdir -v -p "${MACHINE_ID_DIR}"
+   else
+   mkdir -p "${MACHINE_ID_DIR}"
+   fi
+fi

diff --git 
a/sys-kernel/installkernel-systemd-boot/installkernel-systemd-boot-2-r2.ebuild 
b/sys-kernel/installkernel-systemd-boot/installkernel-systemd-boot-2-r2.ebuild
new file mode 100644
index ..ddf32065d8d1
--- /dev/null
+++ 
b/sys-kernel/installkernel-systemd-boot/installkernel-systemd-boot-2-r2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 2019-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Wrap kernel-install from systemd-boot as installkernel"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage;
+S="${WORKDIR}"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+
+RDEPEND="
+   !sys-kernel/installkernel-gentoo
+   || (
+   sys-apps/systemd
+   sys-apps/systemd-utils[boot]
+   )
+"
+
+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}"
+   EOF
+
+   exeinto /usr/lib/kernel/install.d/
+   newexe "${FILESDIR}/${PF}-00-00machineid-directory.install" \
+   00-00machineid-directory.install
+}



[gentoo-commits] repo/gentoo:master commit in: sys-kernel/installkernel-systemd-boot/files/

2021-06-26 Thread Georgy Yakovlev
commit: ee0a3af749ed32d85b585a426f4829388f9f84e5
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Sat Jun 26 23:00:50 2021 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Sat Jun 26 23:00:50 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee0a3af7

sys-kernel/installkernel-systemd-boot: strip exec bit from file

Signed-off-by: Georgy Yakovlev  gentoo.org>

 .../installkernel-systemd-boot/files/00-00machineid-directory.install | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git 
a/sys-kernel/installkernel-systemd-boot/files/00-00machineid-directory.install 
b/sys-kernel/installkernel-systemd-boot/files/00-00machineid-directory.install
old mode 100755
new mode 100644