summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZen <z@pyl.onl>2024-10-31 18:27:51 -0500
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-11-01 09:53:13 +0100
commitd457e2c924fb09658a717bd21eeaf50c9e51c063 (patch)
tree317e3bc7a8aab5b23ae6dfb776058f21be76f3a0 /sys-kernel
parentsys-kernel/ugrd: Add btrfs, xfs, and cryptsetup utils for testing (diff)
downloadgentoo-d457e2c924fb09658a717bd21eeaf50c9e51c063.tar.gz
gentoo-d457e2c924fb09658a717bd21eeaf50c9e51c063.tar.bz2
gentoo-d457e2c924fb09658a717bd21eeaf50c9e51c063.zip
sys-kernel/ugrd: add 1.27.1 with more testing and overlayfs support
Signed-off-by: Zen <z@pyl.onl> Closes: https://github.com/gentoo/gentoo/pull/39175 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/ugrd/Manifest1
-rw-r--r--sys-kernel/ugrd/ugrd-1.27.1.ebuild79
2 files changed, 80 insertions, 0 deletions
diff --git a/sys-kernel/ugrd/Manifest b/sys-kernel/ugrd/Manifest
index 89392158b293..349827af56d1 100644
--- a/sys-kernel/ugrd/Manifest
+++ b/sys-kernel/ugrd/Manifest
@@ -5,3 +5,4 @@ DIST ugrd-1.22.0.tar.gz 65955 BLAKE2B 0573364964ce8d874ff126e87e003aeb90d3f6460e
DIST ugrd-1.24.2.tar.gz 68762 BLAKE2B 2def2144381f66ac79d5c2246f49cacdde3aafd3ee7909cc9bfbfbb31dc554d501b240854452f51e4fd8e66d2af20c7380ee2552eb546f6728d56d59f9a2e9a1 SHA512 d5c756950212509d5a94c8f82b27da2cefdf6b7328f2871a9a56231e8e15d0fde1aea1850066935bdc5c143172fb3b2b09fb9fb131c3f52813d5b609541136d5
DIST ugrd-1.25.0.tar.gz 70221 BLAKE2B 7f3403dd4c5b6131c61c92679d447df6ef49e6dc6d7f17cef67b90d5d2c06087417fc0700a42be41e73749b127e11df807a93c14e91a50827e6043214ca6990c SHA512 6e4b74ee6d4cf38f76063cb5a15a2b853422a6a9ee25887830dbc158e61b1ea2a25dd36522d3e8642eb05ba875baa03ce18db1d66407f0ea55a4261cdd6df5da
DIST ugrd-1.26.0.tar.gz 73284 BLAKE2B b96785a408b6a631d6708bf2bd6d570c95b0ba4a7d7bea297f36674d4625f16472256b8470578ff2b973ed162e9c0465a24937d38aead4da19d9085e220c8d1f SHA512 4b2309c53d5d28741974cdfe2f5a58b939afb523f8ba8f30e10b70bd1d0ed44aa925d64a3fcd60ff46d46df6c79250ca21cd1a712ef9e9f77af4512f9ff3874d
+DIST ugrd-1.27.1.tar.gz 76097 BLAKE2B ee43a5f97c2a32ce218871c11bbc1aec1c5d9edf669cc54fc8a677e177354231575f513e5bb0bb75afb9642b206d0601174b919fa9084a5305410573cf5e0205 SHA512 f6aa122a0a9778ac813197cdba1c433c6b1cbdd767eec45ccc56f264b6559f2beb56f4603592efed40f503526ef482f488dc6421be58e76d68f386f54dc5841e
diff --git a/sys-kernel/ugrd/ugrd-1.27.1.ebuild b/sys-kernel/ugrd/ugrd-1.27.1.ebuild
new file mode 100644
index 000000000000..0f0c38d3e139
--- /dev/null
+++ b/sys-kernel/ugrd/ugrd-1.27.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{11..13} )
+inherit distutils-r1 optfeature shell-completion
+
+DESCRIPTION="Python based initramfs generator with TOML defintions"
+HOMEPAGE="https://github.com/desultory/ugrd"
+SRC_URI="https://github.com/desultory/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+
+RDEPEND="
+ app-misc/pax-utils
+ >=dev-python/zenlib-2.3.2[${PYTHON_USEDEP}]
+ >=dev-python/pycpio-1.4.0[${PYTHON_USEDEP}]
+ sys-apps/pciutils
+"
+
+BDEPEND="
+ test? (
+ sys-fs/btrfs-progs
+ sys-fs/xfsprogs
+ sys-fs/cryptsetup
+ amd64? ( app-emulation/qemu[qemu_softmmu_targets_x86_64] )
+ arm64? ( app-emulation/qemu[qemu_softmmu_targets_aarch64] )
+ )
+"
+
+python_install_all() {
+ # Call the distutils-r1_python_install_all function
+ distutils-r1_python_install_all
+ # Install the example config into /etc/ugrd/config.toml
+ # Do not overwrite an existing config
+ insinto /etc/ugrd
+ newins examples/example.toml config.toml
+
+ # Install the kernel preinst.d hook
+ exeinto /usr/lib/kernel/preinst.d
+ doexe hooks/installkernel/52-ugrd.install
+ exeinto /usr/lib/kernel/install.d
+ doexe hooks/kernel-install/52-ugrd.install
+
+ dobashcomp completion/ugrd # Install bash autocomplete script
+ dozshcomp completion/_ugrd # Install zsh autocomplete script
+}
+
+pkg_postinst() {
+ optfeature "ugrd.crypto.cryptsetup support" sys-fs/cryptsetup
+ optfeature "ugrd.fs.btrfs support" sys-fs/btrfs-progs
+ optfeature "ugrd.crypto.gpg support" app-crypt/gnupg
+ optfeature "ugrd.fs.lvm support" sys-fs/lvm2[lvm]
+ optfeature "ugrd.fs.mdraid support" sys-fs/mdadm
+ optfeature "ugrd.base.plymouth support" sys-boot/plymouth
+}
+
+distutils_enable_tests unittest
+
+src_test() {
+ if [[ ! -w '/dev/kvm' ]]; then
+ ewarn "Skipping tests: Cannot write to /dev/kvm."
+ return 1
+ fi
+ if [[ ! -r "$(command -v mount)" ]]; then
+ ewarn "Cannot read the mount binary, tests may fail until"
+ ewarn "util-linux is re-emerged without the sfperms feature."
+ fi
+
+ distutils-r1_src_test
+}
+
+python_test() {
+ eunittest tests/
+}