diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-10-01 20:54:53 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-10-01 20:54:53 +0100 |
commit | 391b5b359a346aff490103da7dddc85047f83830 (patch) | |
tree | 29eea460a0bd7e1ff21d43b9d6df9af4d8a175e1 /sys-kernel/genkernel | |
parent | c719fdcee603a5a706a45d10cb598762d56a727d (diff) |
gentoo resync : 01.10.2021
Diffstat (limited to 'sys-kernel/genkernel')
4 files changed, 393 insertions, 0 deletions
diff --git a/sys-kernel/genkernel/Manifest b/sys-kernel/genkernel/Manifest index 6eaddb78bb94..a384b7191542 100644 --- a/sys-kernel/genkernel/Manifest +++ b/sys-kernel/genkernel/Manifest @@ -1,3 +1,5 @@ +AUX genkernel-4.2.4-fix-dropbear-depend.patch 1058 BLAKE2B 4f224d4b429d0f6f9d2d4dab7bcf0be79e1d5303ea69a17a0b28151881c50168577af5f622f5180f4c8d6cad70708d896655e10dc9771558ab1a5e5c000ddab1 SHA512 a88887e1011cefcc6cb4e788478de3b7e3f25083c46365c23feba530df7393005bc8762ec8a14630b840d1fd0a3f4c91ac7cd3e849aa9bfce3df587d4bb4ce84 +AUX genkernel-4.2.4-modprobe-d-fix.patch 1597 BLAKE2B cc0aced3e6a27f307de084017b2a8452fa6f46ce4292c994969e2b632b59caf47eb0d283023aa98035802a3c31f006a49f64080211a486b602f84dfd05cc9955 SHA512 43567055e1b05b21245f92418b30a1a307fb076d0da448c15c00ef9d6d2330ac4bdde7eb1c949eec3ad662d11f65fe35653273f554c737807ee9658be63632cf 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 @@ -23,6 +25,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.3.tar.xz 486688 BLAKE2B bd6546ef3c7205e14b8d7e563899fc13bd0c1f90e929c6a805f9e89758fb56fac5cc4ebf6f44d708cf199fc6e2a42704a9d4314bdcceb11e402afb9877608cc6 SHA512 a35b87931e080fe1b61032f8ea655b774c29d652086b7bf31f98aa829490edf8a9e9dbd41c5b8274b64db1946b162977d907f3665da1d99a62666f745f62b6f1 +DIST genkernel-4.2.4.tar.xz 472744 BLAKE2B 712edd219611ce2fa43ec5987ebeff0e21d96d2199fe9ab5d65bd957d20b15d8d9c8c61b8432e820afc70844888553b433c3acc59148fc1eb8aa2426027c5b65 SHA512 0c0638ad5b345cd9450fb28981939fdd9e31e55871c5fe73438ffb3067c50e6935b2bc0f8ce22af03153710e48063fd327ff64e9c34f59ee760917bde8c51578 DIST gnupg-1.4.23.tar.bz2 3749353 BLAKE2B ec5e6bef0c7bb2a65813d7852cebeaa24c4855f9d9d9e802070da50b89fff56b747682933aa766dd130f849efcfe28f7aa74f3153405429bcf3845ef29c6dd6e SHA512 78dc52a2010202a4afc8814b29fda657a6c9fe230d5e7db11ae040edd2b0ca819e1baa4dbd6c0d04d36cd353df484e83f52d17759d2891c2cf7025c0b5d36612 DIST hwids-20210613.tar.gz 3867741 BLAKE2B 64c4b0a83058a2052f7b132241008a3cc75452e93a9a57a9159c357c23fd09ee256abc2b94e700b5d8e8bd4e231ae12932d2c2f32fb03853207739cb3387047d SHA512 4568f6b8c0ca80ec772bd2785d4dc169d1d13a721472a15399158d9a7f31abbe414c5c8cfdf1a3b81cce4e33742a4b6e005e97e3e907643d0afdc8e953624fea DIST json-c-0.13.1.tar.gz 639425 BLAKE2B 1da310309f9ce03306a9fd4a161670e460cf0b2222348df7c006902390f74a4cf100aab1ce6ac8a361a278dd917c114a278de5b3445817f3a40ae287478add46 SHA512 e984db2a42b9c95b52c798b2e8dd1b79951a8dcba27370af30c43b9549fbb00008dbcf052a535c528209aaee38e6d1f760168b706905ae72f3e704ed20f8a1a1 @@ -53,5 +56,6 @@ DIST zstd-1.4.5.tar.gz 1987927 BLAKE2B 1497d4e87040e5c71466468ebf1a57f4073666f2b DIST zstd-1.5.0.tar.gz 1867111 BLAKE2B e503d17478b94128eb3ec578178f9d7023e941434dcc07790e12fd6c9933518f34fba5d7795ab7b145e4e499597644a6edd2830106649c5a749c962d5afe2f31 SHA512 25b657529a698eec891f92ff4a085d1fd95d2ff938ce52c8a4ff6163eb0b668ec642dd09e0db190652638cd92371006afa01d8e437437762c4097ad301675c33 EBUILD genkernel-4.0.10.ebuild 9572 BLAKE2B aaa3dda80524b29233e333e13e9076148d1c1fdbc36c9a700c1974c3f924a6d5f006265a44029ab75888966cb634d2a642ee984e1a91a4a6cc4fd61b7d3d7a7b SHA512 1cf0391bfc65f9445030fcb5aaa22c65bb8b72bdd376b37e915f9080bde240cf0118cd337feb18aee7fc0d4b0603540f5d55f2856e3f04cca4a120c5915db5b4 EBUILD genkernel-4.2.3.ebuild 11455 BLAKE2B dc4e3b2d08c0673844457bde4d72cef8189836f4723445e424629efcb2a1f223f193ed50eda633fd742c66b1efa805d4deff6286b11a545f726a9fb34cff87f0 SHA512 2187379b6171c175930cb361705862e57d975945b90eadf7468a1dfa4611d868dc868ae18857a5c77f142ed1ff88e0cbb3cc49bb6ddceaffdd0c220a63df8bd4 +EBUILD genkernel-4.2.4-r2.ebuild 11563 BLAKE2B a38acd157013f9000cfd4a6d59fd8ead504ec63b75b08c568ac8740f97dafd709554c7ffafdc1e280fad9a55057ee3c97d98a583e98c9446f0fb5a7987bbe802 SHA512 310fa28b66fc3ec62a1810a8b95efe09d3de7aa9ebe40032d80517fe7f37630aa29ef63d81d6e9ec144e1a0d18d62d7d0345ea33ade501c263af28d17dbf9b5d EBUILD genkernel-9999.ebuild 11463 BLAKE2B affad651c75155274cbdb43ae73267d9d20b7d6a62f4d4e52bfd8f14f33922d38a9e07ba8380ea04dd6029f0dfbfa46052d75a0e49434428ceb856ace3b57cc3 SHA512 cd678a9141f05971833d122217ee4442214b8f81544e1eade762b1ad0501c89fc9805c7333ee026abec11a48e7ef435a78861befb45791486fc5d360396ed833 MISC metadata.xml 530 BLAKE2B 9c3b648bd9ae40e3750631e8087a82f6f11e1d316084782db2aad40b73a8578b104b652c7041dab2599731c585f6b98b5ce2f3964079f4b9d50183a1764e2317 SHA512 b28f46ae3d38048a0254a08fd4dd05eec342118beff64b2906764d6bbd3f8c096a624294f576b0c4971d488bb4fbe9b6991db1c9c8d64bb33edaae2aeba862a3 diff --git a/sys-kernel/genkernel/files/genkernel-4.2.4-fix-dropbear-depend.patch b/sys-kernel/genkernel/files/genkernel-4.2.4-fix-dropbear-depend.patch new file mode 100644 index 000000000000..ab74620e0fa7 --- /dev/null +++ b/sys-kernel/genkernel/files/genkernel-4.2.4-fix-dropbear-depend.patch @@ -0,0 +1,26 @@ +From e43878aa62e563fcefa7c1da5c44017816ac65b4 Mon Sep 17 00:00:00 2001 +From: Thomas Deutschmann <whissi@gentoo.org> +Date: Wed, 29 Sep 2021 20:15:56 +0200 +Subject: defaults/software.sh: dropbear needs libxcrypt + +Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> +--- + defaults/software.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/defaults/software.sh b/defaults/software.sh +index 54836ad..9f64ab0 100644 +--- a/defaults/software.sh ++++ b/defaults/software.sh +@@ -67,7 +67,7 @@ GKPKG_DMRAID_BINPKG="${GKPKG_DMRAID_BINPKG:-%%CACHE%%/dmraid-${GKPKG_DMRAID_PV}- + + GKPKG_DROPBEAR_PN="dropbear" + GKPKG_DROPBEAR_PV="${GKPKG_DROPBEAR_PV:-VERSION_DROPBEAR}" +-GKPKG_DROPBEAR_DEPS="zlib" ++GKPKG_DROPBEAR_DEPS="zlib libxcrypt" + GKPKG_DROPBEAR_SRCTAR="${GKPKG_DROPBEAR_SRCTAR:-${DISTDIR}/dropbear-${GKPKG_DROPBEAR_PV}.tar.bz2}" + GKPKG_DROPBEAR_SRCDIR="${GKPKG_DROPBEAR_SRCDIR:-dropbear-${GKPKG_DROPBEAR_PV}}" + GKPKG_DROPBEAR_BINPKG="${GKPKG_DROPBEAR_BINPKG:-%%CACHE%%/dropbear-${GKPKG_DROPBEAR_PV}-%%ARCH%%.tar.xz}" +-- +cgit v1.2.3-18-g5258 + 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-r2.ebuild b/sys-kernel/genkernel/genkernel-4.2.4-r2.ebuild new file mode 100644 index 000000000000..dfef98dec331 --- /dev/null +++ b/sys-kernel/genkernel/genkernel-4.2.4-r2.ebuild @@ -0,0 +1,317 @@ +# Copyright 1999-2021 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.76.0" +VERSION_BTRFS_PROGS="5.12.1" +VERSION_BUSYBOX="1.33.1" +VERSION_COREUTILS="8.32" +VERSION_CRYPTSETUP="2.3.6" +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.2" +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.3" +VERSION_LIBGPGERROR="1.42" +VERSION_LIBXCRYPT="4.4.23" +VERSION_LVM="2.02.188" +VERSION_LZO="2.10" +VERSION_MDADM="4.1" +VERSION_POPT="1.18" +VERSION_STRACE="5.12" +VERSION_THIN_PROVISIONING_TOOLS="0.9.0" +VERSION_UNIONFS_FUSE="2.0" +VERSION_UTIL_LINUX="2.37" +VERSION_XFSPROGS="5.12.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://dl.bintray.com/boostorg/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}" + 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 + firmware? ( sys-kernel/linux-firmware )" + +if [[ ${PV} == 9999* ]]; then + DEPEND="${DEPEND} app-text/asciidoc" +fi + +PATCHES=( + "${FILESDIR}"/${P}-fix-dropbear-depend.patch + "${FILESDIR}"/${P}-modprobe-d-fix.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} > 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 +} |