summaryrefslogtreecommitdiff
path: root/sys-kernel/genkernel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-25 15:06:16 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-25 15:06:16 +0100
commitc8ac16ee4e3813ee30a3224cd92efc19477070b0 (patch)
tree31e1fd7120b966a9707a5d0e9ef94a2f09ccdf65 /sys-kernel/genkernel
parent070db046876f2e8d5f83cb7b380ae857d06e493a (diff)
gentoo auto-resync : 25:05:2023 - 15:06:16
Diffstat (limited to 'sys-kernel/genkernel')
-rw-r--r--sys-kernel/genkernel/Manifest2
-rw-r--r--sys-kernel/genkernel/files/genkernel-4.3.2-no-color-on-qlist.patch38
-rw-r--r--sys-kernel/genkernel/genkernel-4.3.2-r1.ebuild323
3 files changed, 363 insertions, 0 deletions
diff --git a/sys-kernel/genkernel/Manifest b/sys-kernel/genkernel/Manifest
index 3679c8b43552..4a2ba9d6cb47 100644
--- a/sys-kernel/genkernel/Manifest
+++ b/sys-kernel/genkernel/Manifest
@@ -4,6 +4,7 @@ AUX genkernel-4.2.6-fix-btrfs-progs-deps.patch 1167 BLAKE2B e2f77467921adeb2d6e0
AUX genkernel-4.2.6-fuse-glibc-2.34.patch 2344 BLAKE2B a3406c0dedfc4742134abec909c29e517637ad89097ed5d3ff10b439186bbd41afc77571b8f74baf8357b18e96fc02ac00e2b53589de7cd3a8b537a172e7413f SHA512 bcd927a12a9f035e3eaa8496bcdc29a003dea3f7aa687b1fa9cc48fd68baca77426651f325a1db5788e25c583c13e4649e5cb293302f286908fa54ec212c4528
AUX genkernel-4.2.6-gcc-12-boost-1.79.patch 1185 BLAKE2B 8290c7e7ca3222f459318d3fbd65d673ee5fb9207d0d9438227da698c56193bfdca7acde59aa348e3db5c7468d3f7db6161daaf9de65e068cb3ef2cc843e6c1b SHA512 7f783d1ebed3eec371ef73c2a2c6ca409ea1ef2ffae34d162e0a39665a522e0586e3d4ee51edd45455b2e3b79241d639350b42cd3e31c6d2c40698e07a1adad8
AUX genkernel-4.2.6-slibtool.patch 3511 BLAKE2B 69e022509b923b8bc540103310ce7b8c09f4df6e1402d0584a9bea34e1a89e4c2725c1890bd930d93e605f83494bf751626a3d013cf24b089319cef8daf178f3 SHA512 7a7cc339e52abecd86ec9f105eaadda5b17b5c03d3f9ead0e564c38030f606f5c0279002a0502fa90736446c2cfa9f15b75874e7c599466b657232b6f2a88e82
+AUX genkernel-4.3.2-no-color-on-qlist.patch 1119 BLAKE2B 3f8e65bd19d0e4e5c92b7bb8ace0408facfbc7b64849343c7c58e23c2c8a4f5a5fab9f4d34dcd6e643085c8b8989bebf2e2f17c237e96cf00f114f49ab241e66 SHA512 39173c4d87d54b54dc3cf50ab4b4b9247c26e513e6a669b1275975b0ee0238827d3ef55ffbe7ce69a0853a131b4eacae38f745fa5dc55c0b0eba07a8a0f08a0f
AUX genkernel-4.bash 2479 BLAKE2B e5504698ab49bb62623fcdfdd4a54b19ee6d88f96a682f08dc282e46ec26bd22d9c54bcdc9b2bdcc6a96295de1ab96351d35b304eb176f5d177c221cd8d82180 SHA512 6a5709a410c5c07b7a343ecc141aa72de73d3b4acd0a69c05c61c801835a59dd17d9a528f6b68f12ac00ff4b6e5954b03237472501383aa390eb1365dd69c281
AUX initramfs.mounts 816 BLAKE2B 4f36e51fef78435369d43647db853c7bfde217cc93002fc010900692f67171512366e6599f08c5f2093490713aa7715e903b7e06528e3f2c6d8468f506938ed5 SHA512 97e5f92d135cff3911a68c7f1afd0f781ec1c1b794cdc824d74f8c119104ecb40bd7180be8414dc72f3a5a811143d6b4bf443ac1d3ff7a71b1e88cbf7c179665
DIST LVM2.2.02.187.tgz 2405544 BLAKE2B be804be3c64927a8848e8ea8de228fb563b6f8c22628b785aabb33fc993629e5370788216bd814246aeb3a5546fd5446383ce24342e716579887556edf2bbed2 SHA512 3ce56f0c0d2e7dbcdae5be263199f73ee5c4c052599d53cde9b16500a326d0340893344f4671839be06b5b4225d592175d01c9974db14f2dc220d6e9a1d47e91
@@ -65,6 +66,7 @@ EBUILD genkernel-4.0.10.ebuild 9583 BLAKE2B eb8f46374b3dd8a2f51db002e666ce64b32a
EBUILD genkernel-4.2.6-r6.ebuild 11948 BLAKE2B 65e99f559f08350a2f74b2f0890052ab5005cdf84ba25a2a0492ef113bd04a0d12433f180497e00b658c76d6561421f8e439022508449697e023e27e72db8007 SHA512 05fa7b5b3ea8102d20bc822f05f5496e40758813c77ff42e017c0620aba1a91b78570fe468399c81a1e1ca05be51e7c561e1b608409235637255169a0a938613
EBUILD genkernel-4.2.6-r8.ebuild 12019 BLAKE2B 34f1b6d4c0d547c05d6df6a3e3089d215063608baf0524cfb54c039a5937d2076d5765640f8e16c2a44b0cf9e12926cad970a04a919819802518d266607d0c75 SHA512 d54baafbeb0e9ed4c34e4ef59561e3c4d1334c080bd0c1307b5023286b91ee73476120cb05598a742e0e3ca274d9ba5c624d719826070cbb3379afeb1bdb1953
EBUILD genkernel-4.3.1-r1.ebuild 11750 BLAKE2B d0fbff671a6ce40e6b69f828a2f026f57810690fd78110fb85e550ff51f3be16c5d7fb3107d4bc941bc238b6e824ccd3cd42ca3ba05000e1fa987c7b0496a457 SHA512 391d45c5232bbbbd30a4bc12548f20133fb187ed6fd678cb16d5983af54a2f418b8748fb10751bcf2a303e7ead9dda918e049eabdf0564441fccf45c5bf71c39
+EBUILD genkernel-4.3.2-r1.ebuild 11786 BLAKE2B e6761e225eec5473f3bca9a4f95406c96a471ad65e8af67743b4ed9e1e9e71df3c51d5fda2595dde0b621c8c02075c352269463e6d38ae5ad472f343424b3961 SHA512 706ee067a77272fcbf29da71d89a1b0c91b85d8042dca48e18f80f8e25b09e73e976db8436ba9289bc55e66a821bd6074ca650df2780930150a271dad6a7bd99
EBUILD genkernel-4.3.2.ebuild 11742 BLAKE2B a63bd76322e33874fe086641eafb1aebb7ad8771c4c5f457b992b131ad046cbba99b7c9d8e568d8b6f06b7be36aeafd3b4f13b8816f0d930557056c13bef3048 SHA512 917ebe654c484f56e2a8f4d83e1ab09825a19cebd4e305f6051a783401aa0fcf8a3f86175e808eefad222b27a9dfd293d54bbbaf8f72663dd9bf23b4d6cf2b1d
EBUILD genkernel-9999.ebuild 11750 BLAKE2B 8665a2f9246d01725d942815470e4d334ef6d1e9c541a31501779b445019ae4c9be5682120f36f0ab2cbab8a34ba38dd381ec7df07af635e0a95bfd03e6a22bb SHA512 b8428e1d8956c2827e1aebd1db07599df97a1ecd4609916688bace8213fe0fcb83a8bde58fbfb9d2aaffba2c4ea18050f84be0434eadb13c7a0536d1ffe2f144
MISC metadata.xml 480 BLAKE2B 8b1b1655cb13d866985a92755b0696bef00841a7626cb6cd10f39d7a7ad196c1ec2f5895f86e23fc3ee1345c48d7c659346d2bc7bb2a2bdaa9c997511f002fd8 SHA512 5030d4505b077faec4e2eb9cb2dcc47195a1864057bcb5f110314bab97b90b1bdcd3f293f76116a23dd0e694c7c8ee66ed46d39c9b7b0c506b22fe23e86febc4
diff --git a/sys-kernel/genkernel/files/genkernel-4.3.2-no-color-on-qlist.patch b/sys-kernel/genkernel/files/genkernel-4.3.2-no-color-on-qlist.patch
new file mode 100644
index 000000000000..d87574a87c08
--- /dev/null
+++ b/sys-kernel/genkernel/files/genkernel-4.3.2-no-color-on-qlist.patch
@@ -0,0 +1,38 @@
+From 75d666895ff428ca18863674bcf7e5ebf176505b Mon Sep 17 00:00:00 2001
+From: Ben Kohler <bkohler@gentoo.org>
+Date: Wed, 24 May 2023 11:24:32 -0500
+Subject: [PATCH] gen_initramfs.sh: force no-color on qlist calls
+
+In some cases, qlist's pipe detection may not work, and this is fatal to
+our build. Let's just force -C on all qlist calls.
+
+Signed-off-by: Ben Kohler <bkohler@gentoo.org>
+---
+ gen_initramfs.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gen_initramfs.sh b/gen_initramfs.sh
+index 227badd..986b3b4 100755
+--- a/gen_initramfs.sh
++++ b/gen_initramfs.sh
+@@ -801,7 +801,7 @@ append_multipath() {
+
+ local udevdir=$(get_udevdir)
+ local udevdir_initramfs="/usr/lib/udev"
+- local udev_files=( $(qlist -e sys-fs/multipath-tools:0 \
++ local udev_files=( $(qlist -eC sys-fs/multipath-tools:0 \
+ | grep -E -- "^${udevdir}")
+ )
+
+@@ -1131,7 +1131,7 @@ append_zfs() {
+
+ local udevdir=$(get_udevdir)
+ local udevdir_initramfs="/usr/lib/udev"
+- local udev_files=( $(qlist -e sys-fs/zfs:0 \
++ local udev_files=( $(qlist -eC sys-fs/zfs:0 \
+ | grep -E -- "^${udevdir}")
+ )
+
+--
+2.40.1
+
diff --git a/sys-kernel/genkernel/genkernel-4.3.2-r1.ebuild b/sys-kernel/genkernel/genkernel-4.3.2-r1.ebuild
new file mode 100644
index 000000000000..fe9735ec1ab7
--- /dev/null
+++ b/sys-kernel/genkernel/genkernel-4.3.2-r1.ebuild
@@ -0,0 +1,323 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# genkernel-9999 -> latest Git branch "master"
+# genkernel-VERSION -> normal genkernel release
+
+EAPI="7"
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit bash-completion-r1 python-single-r1
+
+# Whenever you bump a GKPKG, check if you have to move
+# or add new patches!
+VERSION_BCACHE_TOOLS="1.0.8_p20141204"
+VERSION_BOOST="1.79.0"
+VERSION_BTRFS_PROGS="5.15"
+VERSION_BUSYBOX="1.34.1"
+VERSION_COREUTILS="8.32"
+VERSION_CRYPTSETUP="2.4.1"
+VERSION_DMRAID="1.0.0.rc16-3"
+VERSION_DROPBEAR="2020.81"
+VERSION_EUDEV="3.2.10"
+VERSION_EXPAT="2.4.1"
+VERSION_E2FSPROGS="1.46.4"
+VERSION_FUSE="2.9.9"
+VERSION_GPG="1.4.23"
+VERSION_HWIDS="20210613"
+VERSION_ISCSI="2.0.878"
+VERSION_JSON_C="0.13.1"
+VERSION_KMOD="29"
+VERSION_LIBAIO="0.3.112"
+VERSION_LIBGCRYPT="1.9.4"
+VERSION_LIBGPGERROR="1.43"
+VERSION_LIBXCRYPT="4.4.26"
+VERSION_LVM="2.02.188"
+VERSION_LZO="2.10"
+VERSION_MDADM="4.1"
+VERSION_POPT="1.18"
+VERSION_STRACE="5.14"
+VERSION_THIN_PROVISIONING_TOOLS="0.9.0"
+VERSION_UNIONFS_FUSE="2.0"
+VERSION_UTIL_LINUX="2.37.2"
+VERSION_XFSPROGS="5.13.0"
+VERSION_XZ="5.2.5"
+VERSION_ZLIB="1.2.11"
+VERSION_ZSTD="1.5.0"
+VERSION_KEYUTILS="1.6.3"
+
+COMMON_URI="
+ https://github.com/g2p/bcache-tools/archive/399021549984ad27bf4a13ae85e458833fe003d7.tar.gz -> bcache-tools-${VERSION_BCACHE_TOOLS}.tar.gz
+ https://boostorg.jfrog.io/artifactory/main/release/${VERSION_BOOST}/source/boost_${VERSION_BOOST//./_}.tar.bz2
+ https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${VERSION_BTRFS_PROGS}.tar.xz
+ https://www.busybox.net/downloads/busybox-${VERSION_BUSYBOX}.tar.bz2
+ mirror://gnu/coreutils/coreutils-${VERSION_COREUTILS}.tar.xz
+ https://www.kernel.org/pub/linux/utils/cryptsetup/v$(ver_cut 1-2 ${VERSION_CRYPTSETUP})/cryptsetup-${VERSION_CRYPTSETUP}.tar.xz
+ https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-${VERSION_DMRAID}.tar.bz2
+ https://matt.ucc.asn.au/dropbear/releases/dropbear-${VERSION_DROPBEAR}.tar.bz2
+ https://dev.gentoo.org/~blueness/eudev/eudev-${VERSION_EUDEV}.tar.gz
+ https://github.com/libexpat/libexpat/releases/download/R_${VERSION_EXPAT//\./_}/expat-${VERSION_EXPAT}.tar.xz
+ https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v${VERSION_E2FSPROGS}/e2fsprogs-${VERSION_E2FSPROGS}.tar.xz
+ https://github.com/libfuse/libfuse/releases/download/fuse-${VERSION_FUSE}/fuse-${VERSION_FUSE}.tar.gz
+ mirror://gnupg/gnupg/gnupg-${VERSION_GPG}.tar.bz2
+ https://github.com/gentoo/hwids/archive/hwids-${VERSION_HWIDS}.tar.gz
+ https://github.com/open-iscsi/open-iscsi/archive/${VERSION_ISCSI}.tar.gz -> open-iscsi-${VERSION_ISCSI}.tar.gz
+ https://s3.amazonaws.com/json-c_releases/releases/json-c-${VERSION_JSON_C}.tar.gz
+ https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-${VERSION_KMOD}.tar.xz
+ https://releases.pagure.org/libaio/libaio-${VERSION_LIBAIO}.tar.gz
+ mirror://gnupg/libgcrypt/libgcrypt-${VERSION_LIBGCRYPT}.tar.bz2
+ mirror://gnupg/libgpg-error/libgpg-error-${VERSION_LIBGPGERROR}.tar.bz2
+ https://github.com/besser82/libxcrypt/archive/v${VERSION_LIBXCRYPT}.tar.gz -> libxcrypt-${VERSION_LIBXCRYPT}.tar.gz
+ https://mirrors.kernel.org/sourceware/lvm2/LVM2.${VERSION_LVM}.tgz
+ https://www.oberhumer.com/opensource/lzo/download/lzo-${VERSION_LZO}.tar.gz
+ https://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-${VERSION_MDADM}.tar.xz
+ http://ftp.rpm.org/popt/releases/popt-1.x/popt-${VERSION_POPT}.tar.gz
+ https://github.com/strace/strace/releases/download/v${VERSION_STRACE}/strace-${VERSION_STRACE}.tar.xz
+ https://github.com/jthornber/thin-provisioning-tools/archive/v${VERSION_THIN_PROVISIONING_TOOLS}.tar.gz -> thin-provisioning-tools-${VERSION_THIN_PROVISIONING_TOOLS}.tar.gz
+ https://github.com/rpodgorny/unionfs-fuse/archive/v${VERSION_UNIONFS_FUSE}.tar.gz -> unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.gz
+ https://www.kernel.org/pub/linux/utils/util-linux/v${VERSION_UTIL_LINUX:0:4}/util-linux-${VERSION_UTIL_LINUX}.tar.xz
+ https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-${VERSION_XFSPROGS}.tar.xz
+ https://tukaani.org/xz/xz-${VERSION_XZ}.tar.gz
+ https://zlib.net/zlib-${VERSION_ZLIB}.tar.gz
+ https://github.com/facebook/zstd/archive/v${VERSION_ZSTD}.tar.gz -> zstd-${VERSION_ZSTD}.tar.gz
+ https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/snapshot/keyutils-${VERSION_KEYUTILS}.tar.gz
+"
+
+if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+ S="${WORKDIR}/${P}"
+ SRC_URI="${COMMON_URI}"
+else
+ SRC_URI="https://dev.gentoo.org/~mattst88/distfiles/${P}.tar.xz
+ ${COMMON_URI}"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+fi
+
+DESCRIPTION="Gentoo automatic kernel building scripts"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Genkernel https://gitweb.gentoo.org/proj/genkernel.git/"
+
+LICENSE="GPL-2"
+SLOT="0"
+RESTRICT=""
+IUSE="ibm +firmware"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# Note:
+# We need sys-devel/* deps like autoconf or automake at _runtime_
+# because genkernel will usually build things like LVM2, cryptsetup,
+# mdadm... during initramfs generation which will require these
+# things.
+DEPEND=""
+RDEPEND="${PYTHON_DEPS}
+ app-arch/cpio
+ >=app-misc/pax-utils-1.2.2
+ app-portage/elt-patches
+ app-portage/portage-utils
+ dev-util/gperf
+ sys-apps/sandbox
+ sys-devel/autoconf
+ sys-devel/autoconf-archive
+ sys-devel/automake
+ sys-devel/bc
+ sys-devel/bison
+ sys-devel/flex
+ sys-devel/libtool
+ virtual/pkgconfig
+ elibc_glibc? ( sys-libs/glibc[static-libs(+)] )
+ firmware? ( sys-kernel/linux-firmware )"
+
+if [[ ${PV} == 9999* ]]; then
+ DEPEND="${DEPEND} app-text/asciidoc"
+fi
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-color-on-qlist.patch
+)
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]]; then
+ git-r3_src_unpack
+ else
+ local gk_src_file
+ for gk_src_file in ${A} ; do
+ if [[ ${gk_src_file} == genkernel-* ]] ; then
+ unpack "${gk_src_file}"
+ fi
+ done
+ fi
+}
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == 9999* ]] ; then
+ einfo "Updating version tag"
+ GK_V="$(git describe --tags | sed 's:^v::')-git"
+ sed "/^GK_V/s,=.*,='${GK_V}',g" -i "${S}"/genkernel
+ einfo "Producing ChangeLog from Git history..."
+ pushd "${S}/.git" >/dev/null || die
+ git log > "${S}"/ChangeLog || die
+ popd >/dev/null || die
+ fi
+
+ # Update software.sh
+ sed -i \
+ -e "s:VERSION_BCACHE_TOOLS:${VERSION_BCACHE_TOOLS}:"\
+ -e "s:VERSION_BOOST:${VERSION_BOOST}:"\
+ -e "s:VERSION_BTRFS_PROGS:${VERSION_BTRFS_PROGS}:"\
+ -e "s:VERSION_BUSYBOX:${VERSION_BUSYBOX}:"\
+ -e "s:VERSION_COREUTILS:${VERSION_COREUTILS}:"\
+ -e "s:VERSION_CRYPTSETUP:${VERSION_CRYPTSETUP}:"\
+ -e "s:VERSION_DMRAID:${VERSION_DMRAID}:"\
+ -e "s:VERSION_DROPBEAR:${VERSION_DROPBEAR}:"\
+ -e "s:VERSION_EUDEV:${VERSION_EUDEV}:"\
+ -e "s:VERSION_EXPAT:${VERSION_EXPAT}:"\
+ -e "s:VERSION_E2FSPROGS:${VERSION_E2FSPROGS}:"\
+ -e "s:VERSION_FUSE:${VERSION_FUSE}:"\
+ -e "s:VERSION_GPG:${VERSION_GPG}:"\
+ -e "s:VERSION_HWIDS:${VERSION_HWIDS}:"\
+ -e "s:VERSION_ISCSI:${VERSION_ISCSI}:"\
+ -e "s:VERSION_JSON_C:${VERSION_JSON_C}:"\
+ -e "s:VERSION_KMOD:${VERSION_KMOD}:"\
+ -e "s:VERSION_LIBAIO:${VERSION_LIBAIO}:"\
+ -e "s:VERSION_LIBGCRYPT:${VERSION_LIBGCRYPT}:"\
+ -e "s:VERSION_LIBGPGERROR:${VERSION_LIBGPGERROR}:"\
+ -e "s:VERSION_LIBXCRYPT:${VERSION_LIBXCRYPT}:"\
+ -e "s:VERSION_LVM:${VERSION_LVM}:"\
+ -e "s:VERSION_LZO:${VERSION_LZO}:"\
+ -e "s:VERSION_MDADM:${VERSION_MDADM}:"\
+ -e "s:VERSION_MULTIPATH_TOOLS:${VERSION_MULTIPATH_TOOLS}:"\
+ -e "s:VERSION_POPT:${VERSION_POPT}:"\
+ -e "s:VERSION_STRACE:${VERSION_STRACE}:"\
+ -e "s:VERSION_THIN_PROVISIONING_TOOLS:${VERSION_THIN_PROVISIONING_TOOLS}:"\
+ -e "s:VERSION_UNIONFS_FUSE:${VERSION_UNIONFS_FUSE}:"\
+ -e "s:VERSION_USERSPACE_RCU:${VERSION_USERSPACE_RCU}:"\
+ -e "s:VERSION_UTIL_LINUX:${VERSION_UTIL_LINUX}:"\
+ -e "s:VERSION_XFSPROGS:${VERSION_XFSPROGS}:"\
+ -e "s:VERSION_XZ:${VERSION_XZ}:"\
+ -e "s:VERSION_ZLIB:${VERSION_ZLIB}:"\
+ -e "s:VERSION_ZSTD:${VERSION_ZSTD}:"\
+ "${S}"/defaults/software.sh \
+ || die "Could not adjust versions"
+}
+
+src_compile() {
+ if [[ ${PV} == 9999* ]] ; then
+ emake
+ fi
+}
+
+src_install() {
+ insinto /etc
+ doins "${S}"/genkernel.conf
+
+ doman genkernel.8
+ dodoc AUTHORS ChangeLog README TODO
+ dobin genkernel
+ rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
+
+ if use ibm ; then
+ cp "${S}"/arch/ppc64/kernel-2.6{-pSeries,} || die
+ else
+ cp "${S}"/arch/ppc64/kernel-2.6{.g5,} || die
+ fi
+
+ insinto /usr/share/genkernel
+ doins -r "${S}"/*
+
+ fperms +x /usr/share/genkernel/gen_worker.sh
+ fperms +x /usr/share/genkernel/path_expander.py
+
+ python_fix_shebang "${ED}"/usr/share/genkernel/path_expander.py
+
+ newbashcomp "${FILESDIR}"/genkernel-4.bash "${PN}"
+ insinto /etc
+ doins "${FILESDIR}"/initramfs.mounts
+
+ pushd "${DISTDIR}" &>/dev/null || die
+ insinto /usr/share/genkernel/distfiles
+ doins ${A/${P}.tar.xz/}
+ popd &>/dev/null || die
+}
+
+pkg_postinst() {
+ # Wiki is out of date
+ #echo
+ #elog 'Documentation is available in the genkernel manual page'
+ #elog 'as well as the following URL:'
+ #echo
+ #elog 'https://wiki.gentoo.org/wiki/Genkernel'
+ #echo
+
+ local replacing_version
+ for replacing_version in ${REPLACING_VERSIONS} ; do
+ if ver_test "${replacing_version}" -lt 4 ; then
+ # This is an upgrade which requires user review
+
+ ewarn ""
+ ewarn "Genkernel v4.x is a new major release which touches"
+ ewarn "nearly everything. Be careful, read updated manpage"
+ ewarn "and pay special attention to program output regarding"
+ ewarn "changed kernel command-line parameters!"
+
+ # Show this elog only once
+ break
+ fi
+ done
+
+ if [[ $(find /boot -name 'kernel-genkernel-*' 2>/dev/null | wc -l) -gt 0 ]] ; then
+ ewarn ''
+ ewarn 'Default kernel filename was changed from "kernel-genkernel-<ARCH>-<KV>"'
+ ewarn 'to "vmlinuz-<KV>". Please be aware that due to lexical ordering the'
+ ewarn '*default* boot entry in your boot manager could still point to last kernel'
+ ewarn 'built with genkernel before that name change, resulting in booting old'
+ ewarn 'kernel when not paying attention on boot.'
+ fi
+
+ # Show special warning for users depending on remote unlock capabilities
+ local gk_config="${EROOT}/etc/genkernel.conf"
+ if [[ -f "${gk_config}" ]] ; then
+ if grep -q -E "^SSH=[\"\']?yes" "${gk_config}" 2>/dev/null ; then
+ if ! grep -q dosshd /proc/cmdline 2>/dev/null ; then
+ ewarn ""
+ ewarn "IMPORTANT: SSH is currently enabled in your genkernel config"
+ ewarn "file (${gk_config}). However, 'dosshd' is missing from current"
+ ewarn "kernel command-line. You MUST add 'dosshd' to keep sshd enabled"
+ ewarn "in genkernel v4+ initramfs!"
+ fi
+ fi
+
+ if grep -q -E "^CMD_CALLBACK=.*emerge.*@module-rebuild" "${gk_config}" 2>/dev/null ; then
+ elog ""
+ elog "Please remove 'emerge @module-rebuild' from genkernel config"
+ elog "file (${gk_config}) and make use of new MODULEREBUILD option"
+ elog "instead."
+ fi
+ fi
+
+ local n_root_args=$(grep -o -- '\<root=' /proc/cmdline 2>/dev/null | wc -l)
+ if [[ ${n_root_args} -gt 1 ]] ; then
+ ewarn "WARNING: Multiple root arguments (root=) on kernel command-line detected!"
+ ewarn "If you are appending non-persistent device names to kernel command-line,"
+ ewarn "next reboot could fail in case running system and initramfs do not agree"
+ ewarn "on detected root device name!"
+ fi
+
+ if [[ -d /run ]] ; then
+ local permission_run_expected="drwxr-xr-x"
+ local permission_run=$(stat -c "%A" /run)
+ if [[ "${permission_run}" != "${permission_run_expected}" ]] ; then
+ ewarn "Found the following problematic permissions:"
+ ewarn ""
+ ewarn " ${permission_run} /run"
+ ewarn ""
+ ewarn "Expected:"
+ ewarn ""
+ ewarn " ${permission_run_expected} /run"
+ ewarn ""
+ ewarn "This is known to be causing problems for any UDEV-enabled service."
+ fi
+ fi
+}