aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakuya Wakazono <pastalian46@gmail.com>2024-10-02 22:50:06 +0900
committerTakuya Wakazono <pastalian46@gmail.com>2024-10-02 22:50:06 +0900
commit3a84d5bec8acffcc3aecc90c110c8c6746db0574 (patch)
treebac098a9c4d3714753fc99cac036d35cc07b88a8 /dev-util
parentprofiles: mask x11-misc/ksnip for removal (diff)
downloadguru-3a84d5bec8acffcc3aecc90c110c8c6746db0574.tar.gz
guru-3a84d5bec8acffcc3aecc90c110c8c6746db0574.tar.bz2
guru-3a84d5bec8acffcc3aecc90c110c8c6746db0574.zip
dev-util/mock: add 5.9
Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/mock/Manifest1
-rw-r--r--dev-util/mock/mock-5.9.ebuild105
2 files changed, 106 insertions, 0 deletions
diff --git a/dev-util/mock/Manifest b/dev-util/mock/Manifest
index ec4208f09..b5c7c52bd 100644
--- a/dev-util/mock/Manifest
+++ b/dev-util/mock/Manifest
@@ -1 +1,2 @@
DIST mock-5.7.tar.gz 193087 BLAKE2B dade170ecef393f5c0a8a8c783d3600828356ea398bd1ab78dfb7db75fdcf313122c72cd8fe472677f431d18e2c93e4349b30d76bd439ddb9ddd3eac4004400e SHA512 1edf699d62ccc92e1d2459cb04bf34a34942125907cb3335f0f3dcdaeb73cb70ad80c939e5dfe205c56eeb217144a651adac6cd1caa7e6a7ecbc4fa3518d5d4c
+DIST mock-5.9.tar.gz 193204 BLAKE2B d4c33f19288079c6741b3806016ad1de5f09ce9d6895ed7675b36bb724551f9d45d1c147693c7024f75da8e03a5833bfd3208dcd41fe2f2fe65f612d730e0826 SHA512 5f7444e0fcbd02203b6d569ee3b5e73c565d8adce50d68a2a0d672924747fa8cc60b3397c77345868f8f6a2a692e3f96d26661503a450b6f1b60df855b1316c1
diff --git a/dev-util/mock/mock-5.9.ebuild b/dev-util/mock/mock-5.9.ebuild
new file mode 100644
index 000000000..04f8153f2
--- /dev/null
+++ b/dev-util/mock/mock-5.9.ebuild
@@ -0,0 +1,105 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..12} )
+
+inherit bash-completion-r1 optfeature python-single-r1
+
+DESCRIPTION="Simple chroot build environment manager for building RPMs"
+HOMEPAGE="
+ https://rpm-software-management.github.io/mock/
+ https://github.com/rpm-software-management/mock/
+"
+SRC_URI="https://github.com/rpm-software-management/mock/releases/download/${P}-1/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ app-arch/rpm[python,${PYTHON_SINGLE_USEDEP}]
+ dev-python/backoff[${PYTHON_USEDEP}]
+ dev-python/distro[${PYTHON_USEDEP}]
+ dev-python/pyroute2[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/rpmautospec-core[${PYTHON_USEDEP}]
+ dev-python/templated-dictionary[${PYTHON_USEDEP}]
+ ')
+ acct-group/mock
+ app-containers/podman
+ dev-util/distribution-gpg-keys
+ dev-util/mock-core-configs
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep 'dev-python/argparse-manpage[${PYTHON_USEDEP}]')
+ test? ( $(python_gen_cond_dep '
+ dev-python/jsonschema[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ ') )
+"
+
+src_prepare() {
+ default
+
+ sed -i -e "s|^VERSION\s*=.*|VERSION=\"${PV}\"|" \
+ -e "s|^SYSCONFDIR\s*=.*|SYSCONFDIR=\"${EPREFIX}/etc\"|" \
+ -e "s|^PYTHONDIR\s*=.*|PYTHONDIR=\"$(python_get_sitedir)\"|" \
+ -e "s|^PKGPYTHONDIR\s*=.*|PKGPYTHONDIR=\"$(python_get_sitedir)/mockbuild\"|" \
+ py/mockbuild/constants.py py/mock-parse-buildlog.py || die
+
+ sed -i -e "s|^_MOCK_NVR = None$|_MOCK_NVR = \"${P}-1\"|" py/mock.py || die
+ sed -i -e "s|@VERSION@|${PV}|" docs/mock.1 docs/mock-parse-buildlog.1 || die
+
+ sed -i -e 's|"/bin/free"|"/usr/bin/free"|' py/mockbuild/plugins/hw_info.py || die
+
+ # bug #928266: remove unnecessary completion target for us
+ sed -i -e "s/ mock.py//" -e "s/ mock-parse-buildlog.py//" etc/bash_completion.d/mock || die
+}
+
+src_compile() {
+ argparse-manpage --pyfile py/mock-hermetic-repo.py --function _argparser > mock-hermetic-repo.1 || die
+}
+
+src_install() {
+ python_domodule py/mockbuild
+ python_newscript py/mock.py mock
+ python_newscript py/mock-hermetic-repo.py mock-hermetic-repo
+ python_newscript py/mock-parse-buildlog.py mock-parse-buildlog
+ dobin mockchain
+
+ exeinto /usr/libexec/mock
+ doexe create_default_route_in_container.sh
+
+ dobashcomp etc/bash_completion.d/mock
+ bashcomp_alias mock mock-parse-buildlog
+ dodoc docs/site-defaults.cfg
+ doman docs/mock.1 docs/mock-parse-buildlog.1 mock-hermetic-repo.1
+
+ insinto /etc/mock
+ doins etc/mock/*
+ insinto /etc/pki/mock
+ doins etc/pki/*
+
+ diropts -m0775 -o root -g mock
+ keepdir /var/lib/mock
+}
+
+src_test() {
+ PYTHONPATH=py epytest tests
+}
+
+pkg_postinst() {
+ optfeature "chain mode support" app-arch/createrepo_c
+ optfeature "pigz in root_cache plugin" app-arch/pigz
+ optfeature "nspawn instead of chroot" sys-apps/systemd
+ optfeature "lvm_root plugin support" sys-fs/lvm2
+ optfeature "procenv plugin support" sys-process/procenv
+}