about summary refs log tree commit diff
path: root/sys-kernel
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>1970-01-01 03:00:00 +0300
committerAzat Bahawi <azat@bahawi.net>2022-09-20 11:52:14 +0300
commit12e5779dd038b593f0ff947a54c3b54bf0e8c183 (patch)
tree6fcd154745b1956e4a0aa1f9e976d0ddebde1c86 /sys-kernel
chore: init HEAD master
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/buildkernel/Manifest1
-rw-r--r--sys-kernel/buildkernel/buildkernel-2.0.0.ebuild41
-rw-r--r--sys-kernel/buildkernel/metadata.xml8
-rw-r--r--sys-kernel/genkernel-next/Manifest2
-rw-r--r--sys-kernel/genkernel-next/files/genkernel-next-70_old_busybox.patch15
-rw-r--r--sys-kernel/genkernel-next/genkernel-next-70.ebuild62
-rw-r--r--sys-kernel/genkernel-next/metadata.xml19
7 files changed, 148 insertions, 0 deletions
diff --git a/sys-kernel/buildkernel/Manifest b/sys-kernel/buildkernel/Manifest
new file mode 100644
index 0000000..d2d1092
--- /dev/null
+++ b/sys-kernel/buildkernel/Manifest
@@ -0,0 +1 @@
+DIST buildkernel-2.0.0.tar.gz 37222 BLAKE2B a263a9fcbaf4a8a3037ebecbce5b35dc883f750600e18ccca51cc2e3d9be1057554d5c6befb25211648565979087647175ebfb35c8ed2f60aa54c6e5a19fc324 SHA512 fa022e9f3539e5456b87003d8d85c052b5c76a1a30b1e3ee9a97c0cff391205c442ff4a9c70442eba9b95c3f98f2a686f7d7be759dc5257e3ce3c4fe81922e7b
diff --git a/sys-kernel/buildkernel/buildkernel-2.0.0.ebuild b/sys-kernel/buildkernel/buildkernel-2.0.0.ebuild
new file mode 100644
index 0000000..be42959
--- /dev/null
+++ b/sys-kernel/buildkernel/buildkernel-2.0.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Build secure boot EFI kernel with LUKS and LVM"
+HOMEPAGE="https://github.com/azahi/buildkernel"
+SRC_URI="https://github.com/azahi/buildkernel/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="
+	>=sys-apps/gptfdisk-0.8.8
+	>=sys-fs/cryptsetup-1.6.2
+	>=app-shells/bash-4.2:*
+"
+RDEPEND="${DEPEND}
+	>=sys-libs/ncurses-5.9-r2
+	>=app-crypt/sbsigntools-0.6-r1
+	>=sys-kernel/genkernel-next-58[cryptsetup]
+	>=sys-boot/efibootmgr-0.5.4-r1
+	>=sys-apps/debianutils-4.9.1[installkernel(+)]
+"
+BDEPEND="
+	>=virtual/linux-sources-3
+"
+
+src_install() {
+	dosbin "${PN}"
+	insinto "/etc"
+	doins "${PN}.conf"
+}
+
+pkg_preinst() {
+	if [ -e "${ROOT}/etc/${PN}.conf" ]; then
+		elog "/etc/${PN}.conf already exists, not overwriting."
+		cp "${ROOT}/etc/${PN}.conf" "${D}/etc/${PN}.conf"
+	fi
+}
diff --git a/sys-kernel/buildkernel/metadata.xml b/sys-kernel/buildkernel/metadata.xml
new file mode 100644
index 0000000..4d6b6f8
--- /dev/null
+++ b/sys-kernel/buildkernel/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>azat@bahawi.net</email>
+		<name>Azat Bahawi</name>
+	</maintainer>
+</pkgmetadata>
diff --git a/sys-kernel/genkernel-next/Manifest b/sys-kernel/genkernel-next/Manifest
new file mode 100644
index 0000000..6e4007d
--- /dev/null
+++ b/sys-kernel/genkernel-next/Manifest
@@ -0,0 +1,2 @@
+DIST busybox-1.32.0.tar.bz2 2439463 BLAKE2B 75937ae6e1401d7ab947d80f4b206112023ff2b7d04257ffa2c254cadabb92282ba04d5d608659b6c98fade1ccd0b0f6b204c8758263d59dea6508a3157a7c69 SHA512 1b1227af69a97e820e28f5f1c62413e4e179202ab525725ea0b1afe9b9f9a5f00e5e32f4603e804ba1596b0fedd60d60457a6d2b8fcedfab45b6e049caeb319b
+DIST genkernel-next-70.tar.gz 2403738 BLAKE2B 22b1718a6757263d1cd4401892340e4687d47125ce703a7909b31009aaf95c38e24125f9578d6300151b923b587925c27d1c130944b198760a4713ac07ce192a SHA512 d7fc6bed9f5bad1190dffc40f7ade7c9d86e993769c90a1e46ccd4010ce84c1ad3f74ed4d3bce0c1f3c4e28924702365b95e3c9c5ea271c84e2c95d6e8c1bb05
diff --git a/sys-kernel/genkernel-next/files/genkernel-next-70_old_busybox.patch b/sys-kernel/genkernel-next/files/genkernel-next-70_old_busybox.patch
new file mode 100644
index 0000000..f718408
--- /dev/null
+++ b/sys-kernel/genkernel-next/files/genkernel-next-70_old_busybox.patch
@@ -0,0 +1,15 @@
+diff -ruN genkernel-next-70.orig/genkernel.conf genkernel-next-70/genkernel.conf
+--- genkernel-next-70.orig/genkernel.conf	2018-12-22 10:41:23.000000000 +0100
++++ genkernel-next-70/genkernel.conf	2020-07-14 00:43:24.924488277 +0200
+@@ -304,3 +304,11 @@
+ #
+ # Specify a default for real_root=
+ #REAL_ROOT="/dev/one/two/gentoo"
++
++################################################
++## genkernel-next-70 uses old busybox
++## See https://bugs.gentoo.org/719968#c9
++BUSYBOX_VER="1.32.0"
++BUSYBOX_SRCTAR="/usr/portage/distfiles/busybox-1.32.0.tar.bz2"
++#################################################
++
diff --git a/sys-kernel/genkernel-next/genkernel-next-70.ebuild b/sys-kernel/genkernel-next/genkernel-next-70.ebuild
new file mode 100644
index 0000000..81d309c
--- /dev/null
+++ b/sys-kernel/genkernel-next/genkernel-next-70.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1
+
+DESCRIPTION="An improved and modern remake of Gentoo genkernel"
+HOMEPAGE="https://github.com/Sabayon/genkernel-next"
+SRC_URI="
+	https://github.com/Sabayon/genkernel-next/archive/v${PV}.tar.gz -> ${P}.tar.gz
+	https://www.busybox.net/downloads/busybox-1.32.0.tar.bz2
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cryptsetup dmraid gpg iscsi mdadm plymouth selinux"
+
+DEPEND="
+	!sys-fs/eudev[-kmod,modutils]
+	app-text/asciidoc
+	selinux? ( sys-libs/libselinux )
+	sys-fs/e2fsprogs
+"
+RDEPEND="${DEPEND}
+	!<sys-apps/openrc-0.9.9
+	!sys-kernel/genkernel
+	>=app-misc/pax-utils-0.6
+	app-arch/cpio
+	app-portage/portage-utils
+	cryptsetup? ( sys-fs/cryptsetup )
+	dmraid? ( >=sys-fs/dmraid-1.0.0_rc16 )
+	gpg? ( app-crypt/gnupg )
+	iscsi? ( sys-block/open-iscsi )
+	mdadm? ( sys-fs/mdadm )
+	plymouth? ( sys-boot/plymouth )
+	sys-apps/util-linux
+	sys-block/thin-provisioning-tools
+	sys-fs/lvm2
+"
+BDEPEND=""
+
+PATCHES=(
+	"${FILESDIR}/genkernel-next-70_old_busybox.patch"
+)
+
+src_prepare() {
+	default
+	sed -i "/^GK_V=/ s:GK_V=.*:GK_V=${PV}:g" "${S}/genkernel" || die
+
+	portage_distdir=$(dirname $(readlink "${DISTDIR}"/${P}.tar.gz))
+	sed -i 's:'"/usr/portage/distfiles"':'"${portage_distdir}"':g' "${S}/genkernel.conf" || die
+}
+
+src_install() {
+	default
+
+	doman "${S}"/genkernel.8
+
+	newbashcomp "${S}"/genkernel.bash genkernel
+}
diff --git a/sys-kernel/genkernel-next/metadata.xml b/sys-kernel/genkernel-next/metadata.xml
new file mode 100644
index 0000000..3383228
--- /dev/null
+++ b/sys-kernel/genkernel-next/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>azat@bahawi.net</email>
+		<name>Azat Bahawi</name>
+	</maintainer>
+	<use>
+		<flag name="cryptsetup">Enable support for Luks disk enrcyption using <pkg>sys-fs/cryptsetup</pkg></flag>
+		<flag name="dmraid">Enable support for DMRAID (include dmraid dependency)</flag>
+		<flag name="gpg">Enable support for GPG (include gnupg dependency)</flag>
+		<flag name="iscsi">Enable support for open-iscsi (include open-iscsi dependency)</flag>
+		<flag name="mdadm">Enable support for mdadm (include mdadm dependency)</flag>
+		<flag name="plymouth">Enable support for Plymouth (include Plymouth dependency)</flag>
+	</use>
+	<upstream>
+		<remote-id type="github">Sabayon/genkernel-next</remote-id>
+	</upstream>
+</pkgmetadata>

Consider giving Nix/NixOS a try! <3