commit: 3791b3d12c3cbccbe41c767131d0c3b4f6d54f20 Author: Zen <z <AT> pyl <DOT> onl> AuthorDate: Mon Jan 20 22:37:08 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Jan 20 23:48:25 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3791b3d1
sys-kernel/ugrd: add 1.31.0 POSIX compatibility! Signed-off-by: Zen <z <AT> pyl.onl> Closes: https://github.com/gentoo/gentoo/pull/40235 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-kernel/ugrd/Manifest | 1 + sys-kernel/ugrd/ugrd-1.31.0.ebuild | 73 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/sys-kernel/ugrd/Manifest b/sys-kernel/ugrd/Manifest index ce679d05f6ab..df611727d5fc 100644 --- a/sys-kernel/ugrd/Manifest +++ b/sys-kernel/ugrd/Manifest @@ -5,3 +5,4 @@ DIST ugrd-1.27.2.tar.gz 76119 BLAKE2B 7a97f0189f1b39f0a1264c4ac9fbc8dc15f6bf9363 DIST ugrd-1.28.2.tar.gz 79970 BLAKE2B 545d9a21e3fa5dbee3a29adad5f3df4f4c60c363866277520d0783c0e578d762301c94b0791b5a21b47ef8172cf9658ae47c43a5b696d311a76fea6649f80d17 SHA512 7598cf15869f3e8aca681fd1d8f239da66b84252978152559fa154d43ae06a1edab2cbee0b7fbaf8a48abc40e9b96c769534c95fed4e040e2f9ae7ab90694a6d DIST ugrd-1.29.0.tar.gz 81078 BLAKE2B 6f0e25d325878a0bfba442fafd4dcd4ed0f51312339c3cfc8ef4a43b90020b143c34d7f9fddaa7e4af90260e25c5a9776842a61f6ad7483b7dd9e3c3c02049b2 SHA512 68ecfb9694e789df5de12068b4fac97d578d1ce1bc046e67f5859c5742e6cc3c33d3d87703c80d50603a4b1d504fed57a27d8e2a609f243f236f9040ddbf85bf DIST ugrd-1.30.1.tar.gz 86277 BLAKE2B ce45778d9e14894b7b77e52eb86b982200f8acb9c06efcf33d07813a0e8611c9a2062fe1ba893d86a96580c8e557ecee3fb93b633554564f32b0508c781ecd74 SHA512 a9c7ae0f2ed2daf77eb36366c31ca1728f54b1a9c1b047809fe30311b152f825276b3314410dcb782c3f4fda603c643521f7e318eab2fb09a567c15659a56f78 +DIST ugrd-1.31.0.tar.gz 87298 BLAKE2B 6020188d072e332e55f71be20664db56921ddee5c1caa8646c29899276946bd058e70ec0fb204d637bb6c89e2b541fa7dec25431814c7948d0e63374521f8de3 SHA512 4fc146feeab87e5aff3fde20c2f9cc57c1a7327d58b6951e1914b0910a74218ac8edbbc284c4f4a0d8fc3b5e578356bc68a62a6d2b3a8c6d68e8d9425ab25d2a diff --git a/sys-kernel/ugrd/ugrd-1.31.0.ebuild b/sys-kernel/ugrd/ugrd-1.31.0.ebuild new file mode 100644 index 000000000000..b254e6aa4df1 --- /dev/null +++ b/sys-kernel/ugrd/ugrd-1.31.0.ebuild @@ -0,0 +1,73 @@ +# Copyright 2023-2025 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 POSIX 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" +RESTRICT="test" +PROPERTIES="test_privileged" + +RDEPEND=" + app-misc/pax-utils + >=dev-python/zenlib-3.0.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() { + addwrite /dev/kvm + distutils-r1_src_test +} + +python_test() { + eunittest tests/ +}