summaryrefslogtreecommitdiff
path: root/sys-kernel/genkernel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-25 02:55:08 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-25 02:55:08 +0100
commitaeb34c47a1042b074096bacb85205617c8a14d3a (patch)
tree905475b28fd25bd6ffbf92d7c1a0100c0474a780 /sys-kernel/genkernel
parentfc879856a16ea66528a11a00cf6ee19891f3d186 (diff)
gentoo auto-resync : 25:07:2022 - 02:55:08
Diffstat (limited to 'sys-kernel/genkernel')
-rw-r--r--sys-kernel/genkernel/Manifest3
-rw-r--r--sys-kernel/genkernel/files/genkernel-4.2.6-chroot-path.patch49
-rw-r--r--sys-kernel/genkernel/genkernel-4.2.6-r5.ebuild323
3 files changed, 375 insertions, 0 deletions
diff --git a/sys-kernel/genkernel/Manifest b/sys-kernel/genkernel/Manifest
index 4c4c1b0e4872..1f60dbf7577d 100644
--- a/sys-kernel/genkernel/Manifest
+++ b/sys-kernel/genkernel/Manifest
@@ -1,3 +1,4 @@
+AUX genkernel-4.2.6-chroot-path.patch 1871 BLAKE2B 4fa7de8ac904e60ac6cad2f530f2382b62a6928295ad50aa54c1ffc185558b7a247973aa9ee4869c822c42d48b2c6d2b118196a8c983c3c7601fb6e820e7b235 SHA512 5e9291974ccac66b2a59ea38dcf4c483faf9db71d39371d43e46722fe79bdf8dffff092207f42f97cf70f98978ca2ac5539dfaa161ddf9fb1ddadea14c6f53bb
AUX genkernel-4.2.6-devicemanager.patch 1714 BLAKE2B 2241709b08d95fc63c7f0143636beb39e2e9008b8d03436aee61fa463a6b6c5df5d8e786b20cf1e649090fdf64a0ac9c2e1691baf928db1dc0436a3a135601eb SHA512 36de12f880c0b426f95a252f3f3dcfdf1b2ceacd4c779339ae05b31a1218635186a01fd7adffa7547ce93d0c918a28849cbad083fbaca09e4bf979c9628f035c
AUX genkernel-4.2.6-fix-btrfs-progs-deps.patch 1167 BLAKE2B e2f77467921adeb2d6e00a1f3415a7ed351b2f300164572bab5f649d917e671f51ea1d43df9d692d15d520940341b2f71261a3c4f9cee841a2408a39d8b109c3 SHA512 85ba228df6970c0f0aded2b33fdde22f15568d2258be4089ff46077b78541ba9469d509ae1779c3726685a2d9eba953d46f4e07808d4e4fdf98f22949648b400
AUX genkernel-4.2.6-fuse-glibc-2.34.patch 2344 BLAKE2B a3406c0dedfc4742134abec909c29e517637ad89097ed5d3ff10b439186bbd41afc77571b8f74baf8357b18e96fc02ac00e2b53589de7cd3a8b537a172e7413f SHA512 bcd927a12a9f035e3eaa8496bcdc29a003dea3f7aa687b1fa9cc48fd68baca77426651f325a1db5788e25c583c13e4649e5cb293302f286908fa54ec212c4528
@@ -32,6 +33,7 @@ DIST expat-2.4.1.tar.xz 445024 BLAKE2B 2ae66d284a03176ef7290093f59bb7ad98011dfbf
DIST fuse-2.9.9.tar.gz 1813177 BLAKE2B 9e9141380bda46eb0bcce325c6fd293fe3844fe884a4952bb38d4b89dc48b728ffcc891038b3a7a861f05acfacce9dd7bb0e11d600609f3ad0ab278ccbe98847 SHA512 3d82fafd04f2924299bb09d2bb144935fa004a43fb9a6568e2e1cc5a60fded2efa1711029a0d7f12b3e6e4501f7217f2ee3545646d89da8dece083cb390f23e2
DIST genkernel-4.0.10.tar.xz 460816 BLAKE2B d5922eede1192bb95ca235106a70118826c2c4c078f741e25954485f142d858bf612f35b94553fc409e4f6641b256a2940f83131c5b4bc7d6dbae85019bee7ff SHA512 29dc29b346b132cc6e7ea5298e49c93d01ba28531928cb7a6125864c7d03b74f70bc74043b220dfbbb6651ad67fcbc3d8ed8a2d0f40d271b83e9a8ab0325a2dd
DIST genkernel-4.2.5.tar.xz 488188 BLAKE2B e960a46eb6053476bcf46ed0156d3b0c2712d69e339b644033272eb4d1d1f7325e03d4a1921e79282e29aa08134ee17060439983069718f0411a57e98c14ef2e SHA512 3d417507dc06a91e4d356d1a5476faab8d9ad3c18f72bc6d6244a14f46673cf4e349d9eaca377e79c72f713ff7818d8676b0b59553c748abf3cd8454a532f271
+DIST genkernel-4.2.6-s390x.patch 39633 BLAKE2B a48aae069b41e2520fce9ac60a79f567225bcb798bfa02ccc5c279427381d3f0e59bb0d8231b7e9760c22a1bccf17ae826d0f01973e32f9a4f0ab60165c8fbdd SHA512 d1db9f2c36cf9c0d7f042ec682c2b61817eda0d21c35515dc313ad8901c7c4239a28937c4b411f796ab38278caaa1fa3a7c7e7d6dd9c8ba3f4f37fbba5988105
DIST genkernel-4.2.6.tar.xz 488892 BLAKE2B 4dc54c878e25165799ac40e45f28843c057348006a9e1a8dc2dec499e0ef78705104ae6893e15f76fc88cc054137d781cae1c4ec395fba669f6c93ec6fa8d6d9 SHA512 5981be08aac31c1cac22efd66e9cb39e6362cc7cac90dc26dd2089f95f287908dcbfb58a7da0bde6205bf42c57c606b96ed2e190b6d0fed1cfade9bae76b11fb
DIST gnupg-1.4.23.tar.bz2 3749353 BLAKE2B ec5e6bef0c7bb2a65813d7852cebeaa24c4855f9d9d9e802070da50b89fff56b747682933aa766dd130f849efcfe28f7aa74f3153405429bcf3845ef29c6dd6e SHA512 78dc52a2010202a4afc8814b29fda657a6c9fe230d5e7db11ae040edd2b0ca819e1baa4dbd6c0d04d36cd353df484e83f52d17759d2891c2cf7025c0b5d36612
DIST hwids-20210613.tar.gz 3867741 BLAKE2B 64c4b0a83058a2052f7b132241008a3cc75452e93a9a57a9159c357c23fd09ee256abc2b94e700b5d8e8bd4e231ae12932d2c2f32fb03853207739cb3387047d SHA512 4568f6b8c0ca80ec772bd2785d4dc169d1d13a721472a15399158d9a7f31abbe414c5c8cfdf1a3b81cce4e33742a4b6e005e97e3e907643d0afdc8e953624fea
@@ -73,5 +75,6 @@ EBUILD genkernel-4.2.5.ebuild 11468 BLAKE2B 44a9a5e824574e14f036b2964b325367f3ab
EBUILD genkernel-4.2.6-r2.ebuild 11619 BLAKE2B 4eaed74c7fc68d45137723f604ad97b2591a114bfe48064be4400ecf88224e15f2de97465275177e8df2ceedf37df6fcede6c6f6b77b997c101a48533200b413 SHA512 105524dd26614ffa33ed38cf5a45350d5fb3b22b9fcf84ba92840af0c7a85ef71b9bc8ffe29bdbb28e583a32de40f5d7768d8ac28155d51473afb56740b1042c
EBUILD genkernel-4.2.6-r3.ebuild 11667 BLAKE2B 8970c3817c942a224ba67b01fc34d99ff1b22f32939d58bb87d8f6451a4c7b4a33b9170996702fede6c5609fc862ef3ba6d39ba006d1261442eb30967d926c29 SHA512 cb2addc25a0bb808b0edabdb0f3d3b43f947e54b8d3843e7b90259e74311b3875b83e11a26f8372494f28acf1aa2dcd563f9b13cccdecec466bfbed161a8cbb8
EBUILD genkernel-4.2.6-r4.ebuild 11711 BLAKE2B c3a54d2354ce25e8787dd50dd46f973294c590686c79d691b62b9a47dcc09be6ca1ab9b643e0e0c5bb2b11e1c4e6124e38402b5869ae8eb11511816204401109 SHA512 593e8c5d5b5b69aefdce8a6db91c7b5cdb90828014985c8cf235936d5d5bfa9ac4e40460e3fabb6772183494b2059748d32f12af19fa9c8ecfcf3ec7e349448a
+EBUILD genkernel-4.2.6-r5.ebuild 11909 BLAKE2B 84a8fca3fe978b3031992d63587bc91d5b637bd26dde76e0eedb3b7770d3921a35337482a477b4472c6d5ceafa4438cd22b1f079088d1fad21efc23fc5dcb4b1 SHA512 e59892aa9dd2eb079c1dc6382d1d1aba6754fe90a64b17aad30f8f203763e5cdc18d8f4b788e9213c19efc1b45b37ce59f8b3a74f256303eebc13df57e644d3a
EBUILD genkernel-9999.ebuild 11679 BLAKE2B 7fa6e85abbf9872158f186c1d1d849f1eadb37697c3d27dc9c12d74e48e0781dd587f8a75e21b2f45b0f7a5c137274e34aea16b7bffc60284d8c4adf303c28d1 SHA512 68614f253f0b5c852f720bfc095235625445979719a4d71b5b638768a98ee5e6dee12f75115d045104045e05af7f56b495fba4e8acaaf30d39551755f7482a33
MISC metadata.xml 473 BLAKE2B 7d2bf14ca0bd4ba5bf05d0ac1529c0c8eae3655a4f52eba56ddb6865e8a44978366b3abad6f334c99b5ad30332113761ea0b7afd76a9eb274c536a7c23aa3983 SHA512 49c916ec4e0690ba17dbaf363acacf3cfaa69f180e0d48644eb742875c55cb409f51123f1e055ecfcffda0f18604208cc61fd2372c2b1aaa6d949dec9edc80a5
diff --git a/sys-kernel/genkernel/files/genkernel-4.2.6-chroot-path.patch b/sys-kernel/genkernel/files/genkernel-4.2.6-chroot-path.patch
new file mode 100644
index 000000000000..150506c454c8
--- /dev/null
+++ b/sys-kernel/genkernel/files/genkernel-4.2.6-chroot-path.patch
@@ -0,0 +1,49 @@
+https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=33394fef9f712ca0854eca248fe85863771ca04a
+
+From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
+Date: Mon, 16 May 2022 21:31:34 +0200
+Subject: linuxrc: do not rely on chroot evaluating PATH
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When trying to install a new kernel on catbus.sparc.dev.gentoo.org, the
+newly built initrd consistently claimed that it could not find init, and
+dropped to the rescue shell.
+
+However, init was there just fine in /newroot (as before).
+
+I dug out the command that is actually run inside linuxrc,
+
+ elif ! chroot "${CHROOT}" test -x /${init#/} 1>/dev/null 2>&1
+
+and tried to run that manually, which led to a rather strange error message
+
+rescueshell / # chroot /newroot test -x /lib/systemd/systemd
+chroot: can't execute 'test': File name too long
+
+Some more research led me to the busybox manpage (where here chroot comes
+from):
+https://busybox.net/downloads/BusyBox.html#chroot
+
+chroot
+ chroot NEWROOT [PROG [ARGS]]
+ Run PROG with root directory set to NEWROOT
+
+Note, the third argument is *not* a command (as with usual chroot, see the
+manpage from coreutils chroot) but a program!
+
+Bug: https://bugs.gentoo.org/842027
+Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
+--- a/defaults/linuxrc
++++ b/defaults/linuxrc
+@@ -1376,7 +1376,7 @@ do
+ if ! mountpoint "${CHROOT}" 1>/dev/null 2>&1
+ then
+ bad_msg "${CHROOT} is not a mountpoint; Was root device (${REAL_ROOT}) not mounted?"
+- elif ! chroot "${CHROOT}" test -x /${init#/} 1>/dev/null 2>&1
++ elif ! chroot "${CHROOT}" /usr/bin/test -x /${init#/} 1>/dev/null 2>&1
+ then
+ mounted_root_device=$(mountpoint -n /newroot 2>/dev/null | awk '{ print $1 }')
+ bad_msg "init (${init}) not found in mounted root device (${mounted_root_device})!"
+cgit v1.2.3-18-g5258
diff --git a/sys-kernel/genkernel/genkernel-4.2.6-r5.ebuild b/sys-kernel/genkernel/genkernel-4.2.6-r5.ebuild
new file mode 100644
index 000000000000..ba31e483b291
--- /dev/null
+++ b/sys-kernel/genkernel/genkernel-4.2.6-r5.ebuild
@@ -0,0 +1,323 @@
+# Copyright 1999-2022 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_{7..10} )
+
+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"
+
+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
+"
+
+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/~whissi/dist/genkernel/${P}.tar.xz
+ ${COMMON_URI}"
+ SRC_URI+=" https://gitweb.gentoo.org/proj/genkernel.git/patch/?id=8c9de489290dc470e30f8c7d0aaa3456eb124537 -> ${P}-s390x.patch"
+ 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
+ dev-util/gperf
+ sys-apps/sandbox
+ sys-devel/autoconf
+ sys-devel/autoconf-archive
+ sys-devel/automake
+ 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}-devicemanager.patch
+ "${FILESDIR}"/${P}-fix-btrfs-progs-deps.patch
+ "${FILESDIR}"/${P}-fuse-glibc-2.34.patch
+ "${FILESDIR}"/${P}-gcc-12-boost-1.79.patch
+ "${FILESDIR}"/${P}-chroot-path.patch
+ "${DISTDIR}"/${P}-s390x.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
+}