summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-10-01 00:26:15 +0200
committerThomas Deutschmann <whissi@gentoo.org>2021-10-01 00:27:20 +0200
commite31cc3aa827f1d83fd9e7d23a4bc32149d8e6ae2 (patch)
tree2548b2716b12563771746267bd0c1cc6ad714fec /sys-kernel/genkernel
parentsys-fs/mtpfs: fix deprecated init of lock (diff)
downloadgentoo-e31cc3aa827f1d83fd9e7d23a4bc32149d8e6ae2.tar.gz
gentoo-e31cc3aa827f1d83fd9e7d23a4bc32149d8e6ae2.tar.bz2
gentoo-e31cc3aa827f1d83fd9e7d23a4bc32149d8e6ae2.zip
sys-kernel/genkernel: adopt changes from >=sys-apps/baselayout-2.8
Package-Manager: Portage-3.0.26, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'sys-kernel/genkernel')
-rw-r--r--sys-kernel/genkernel/files/genkernel-4.2.4-modprobe-d-fix.patch46
-rw-r--r--sys-kernel/genkernel/genkernel-4.2.4-r2.ebuild (renamed from sys-kernel/genkernel/genkernel-4.2.4-r1.ebuild)5
2 files changed, 50 insertions, 1 deletions
diff --git a/sys-kernel/genkernel/files/genkernel-4.2.4-modprobe-d-fix.patch b/sys-kernel/genkernel/files/genkernel-4.2.4-modprobe-d-fix.patch
new file mode 100644
index 000000000000..09ac6422e16d
--- /dev/null
+++ b/sys-kernel/genkernel/files/genkernel-4.2.4-modprobe-d-fix.patch
@@ -0,0 +1,46 @@
+From c869ac450ae286908cfed582b0c51fe327555833 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Thu, 30 Sep 2021 23:12:52 +0200
+Subject: gen_initramfs.sh: append_modprobed(): Adopt changes from
+ sys-apps/baselayout-2.8
+
+In >=sys-apps/baselayout-2.8, /etc/modprobe.d was moved to /lib/modprobe.d.
+
+This commit will try to copy /etc/modprobe.d and /lib/modprobe.d but will
+no longer fail if one directory is missing.
+
+Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
+---
+ gen_initramfs.sh | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/gen_initramfs.sh b/gen_initramfs.sh
+index 8f11127..56d6a03 100755
+--- a/gen_initramfs.sh
++++ b/gen_initramfs.sh
+@@ -1832,10 +1832,19 @@ append_modprobed() {
+ mkdir "${TDIR}" || gen_die "Failed to create '${TDIR}'!"
+ cd "${TDIR}" || gen_die "Failed to chdir to '${TDIR}'!"
+
+- mkdir -p "${TDIR}"/etc || gen_die "Failed to create '${TDIR}/etc'!"
++ local modprobe_dir
++ for modprobe_dir in /etc/modprobe.d /lib/modprobe.d
++ do
++ if [[ ! -e "${modprobe_dir}" ]]; then
++ print_info 5 "'${modprobe_dir}' does not exist; Skipping ..."
++ continue
++ fi
++
++ mkdir -p "${TDIR}${modprobe_dir}" || gen_die "Failed to create '${TDIR}${modprobe_dir}'!"
+
+- cp -rL "/etc/modprobe.d" "${TDIR}"/etc/ 2>/dev/null \
+- || gen_die "Failed to copy '/etc/modprobe.d'!"
++ cp -aL "${modprobe_dir}"/. "${TDIR}${modprobe_dir}" 2>/dev/null \
++ || gen_die "Failed to copy '${modprobe_dir}'!"
++ done
+
+ cd "${TDIR}" || gen_die "Failed to chdir to '${TDIR}'!"
+ log_future_cpio_content
+--
+cgit v1.2.3-18-g5258
+
diff --git a/sys-kernel/genkernel/genkernel-4.2.4-r1.ebuild b/sys-kernel/genkernel/genkernel-4.2.4-r2.ebuild
index f8f6847a650f..dfef98dec331 100644
--- a/sys-kernel/genkernel/genkernel-4.2.4-r1.ebuild
+++ b/sys-kernel/genkernel/genkernel-4.2.4-r2.ebuild
@@ -125,7 +125,10 @@ if [[ ${PV} == 9999* ]]; then
DEPEND="${DEPEND} app-text/asciidoc"
fi
-PATCHES=( "${FILESDIR}"/${P}-fix-dropbear-depend.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-dropbear-depend.patch
+ "${FILESDIR}"/${P}-modprobe-d-fix.patch
+)
src_unpack() {
if [[ ${PV} == 9999* ]]; then