diff --git a/app-portage/gentoolkit/Manifest b/app-portage/gentoolkit/Manifest new file mode 100644 index 00000000..3b2e5a26 --- /dev/null +++ b/app-portage/gentoolkit/Manifest @@ -0,0 +1 @@ +DIST gentoolkit-0.6.1.tar.gz 3195781 BLAKE2B 27e370de77586b375dc70caa1abba4c2bc4207e8f08e0a7ea2953097135506949db71ff9102a0ead198e4dea425440c57b94ac7a811ca2d5e0016fc7e234bb0d SHA512 1ffc466b69a9c53f1bbd40f6f4d1eb33d5f0f4287bb65ba1a7b1b2675ad61ecffa55ed9fda7c1ae8148744f0a77e224315eb1903dfd61a2a3dab1600fc672d2d diff --git a/app-portage/gentoolkit/files/gentoolkit-0.6.1-data_files.patch b/app-portage/gentoolkit/files/gentoolkit-0.6.1-data_files.patch new file mode 100644 index 00000000..8039864d --- /dev/null +++ b/app-portage/gentoolkit/files/gentoolkit-0.6.1-data_files.patch @@ -0,0 +1,47 @@ +From 5b52ee6c6efab68111d128d45f386ac21eaf84f6 Mon Sep 17 00:00:00 2001 +From: Brian Dolbec +Date: Sun, 10 Jul 2022 13:41:36 -0700 +Subject: [PATCH] Revert "setup.py: migrate to setuptools" + +This reverts commit bbbde97b5e625a49a1a66e307931548cb33f260b. +setuptools only installs data files to the python pkg directory +--- + setup.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/setup.py b/setup.py +index 36995de..23e9b36 100755 +--- a/setup.py ++++ b/setup.py +@@ -3,8 +3,8 @@ + import re + import sys + import subprocess +- +-from setuptools import setup, Command ++from distutils import core ++from distutils.cmd import Command + from glob import glob + + import os +@@ -67,7 +67,7 @@ manpages = [ + ] + + +-class set_version(Command): ++class set_version(core.Command): + """Set python __version__ and bash VERSION to our __version__.""" + + description = "hardcode scripts' version using VERSION from environment" +@@ -130,7 +130,7 @@ test_data = { + ] + } + +-setup( ++core.setup( + name="gentoolkit", + version=__version__, + description="Set of tools that work with and enhance portage.", +-- +libgit2 1.4.3 + diff --git a/app-portage/gentoolkit/files/gentoolkit-0.6.1-pkgindex.patch b/app-portage/gentoolkit/files/gentoolkit-0.6.1-pkgindex.patch new file mode 100644 index 00000000..193eacc2 --- /dev/null +++ b/app-portage/gentoolkit/files/gentoolkit-0.6.1-pkgindex.patch @@ -0,0 +1,45 @@ +From bf3eb16e451fd1bdee8ef03a0d22e0040e033f19 Mon Sep 17 00:00:00 2001 +From: Brian Dolbec +Date: Sun, 10 Jul 2022 23:41:33 -0700 +Subject: [PATCH] eclean/pkgindex.py: Fix typo in function call + + File "/usr/lib/python3.10/site-packages/gentoolkit/eclean/pkgindex.py", line +60, in clean_pkgs_index + if self.get_emaint_binhost(): +AttributeError: 'PkgIndex' object has no attribute 'get_emaint_binhost'. Did +you mean: '_get_emaint_binhost'? + +Also fix too many parameters in line 68 for the self.controller() call + +Bug: https://bugs.gentoo.org/857555 + +Signed-off-by: Brian Dolbec +--- + pym/gentoolkit/eclean/pkgindex.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pym/gentoolkit/eclean/pkgindex.py b/pym/gentoolkit/eclean/pkgindex.py +index d0878a1..7d6fade 100644 +--- a/pym/gentoolkit/eclean/pkgindex.py ++++ b/pym/gentoolkit/eclean/pkgindex.py +@@ -57,15 +57,15 @@ class PkgIndex: + statinfo = os.stat(file_) + size1 = statinfo.st_size + show_progress = not quiet +- if self.get_emaint_binhost(): ++ if self._get_emaint_binhost(): + self.taskmaster = TaskHandler(show_progress_bar=show_progress) + tasks = [self.binhost] + self.taskmaster.run_tasks(tasks) + else: + self.call_emaint() + statinfo = os.stat(file_) + clean_size = size1 - statinfo.st_size +- self.controller("\n", clean_size, "Packages Index", file_, "Index") ++ self.controller(clean_size, "Packages Index", file_, "Index") + return clean_size + + def call_emaint(self): +-- +libgit2 1.4.3 + diff --git a/app-portage/gentoolkit/gentoolkit-0.6.1-r3.ebuild b/app-portage/gentoolkit/gentoolkit-0.6.1-r3.ebuild new file mode 100644 index 00000000..7cd0e330 --- /dev/null +++ b/app-portage/gentoolkit/gentoolkit-0.6.1-r3.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_SETUPTOOLS=no +PYTHON_COMPAT=( python3_{9..11} pypy3 ) +PYTHON_REQ_USE="xml(+),threads(+)" + +inherit distutils-r1 tmpfiles + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoolkit.git" + inherit git-r3 +else + SRC_URI="https://gitweb.gentoo.org/proj/gentoolkit.git/snapshot/${P}.tar.gz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +DESCRIPTION="Collection of administration scripts for Gentoo" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools" + +LICENSE="GPL-2" +SLOT="0" + +# Need newer Portage for XML fix, bug #857537 +DEPEND=" + >=sys-apps/portage-3.0.32[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND} + app-alternatives/awk + sys-apps/gentoo-functions" + +PATCHES=( + "${FILESDIR}/gentoolkit-0.6.1-data_files.patch" + "${FILESDIR}/gentoolkit-0.6.1-pkgindex.patch" +) + +distutils_enable_tests setup.py + +python_prepare_all() { + python_setup + echo VERSION="${PVR}" "${PYTHON}" setup.py set_version + VERSION="${PVR}" "${PYTHON}" setup.py set_version + distutils-r1_python_prepare_all + + if use prefix-guest ; then + # use correct repo name, bug #632223 + sed -i \ + -e "/load_profile_data/s/repo='gentoo'/repo='gentoo_prefix'/" \ + pym/gentoolkit/profile.py || die + fi +} + +pkg_postinst() { + tmpfiles_process revdep-rebuild.conf + + # Only show the elog information on a new install + if [[ ! ${REPLACING_VERSIONS} ]]; then + elog + elog "For further information on gentoolkit, please read the gentoolkit" + elog "guide: https://wiki.gentoo.org/wiki/Gentoolkit" + elog + elog "Another alternative to equery is app-portage/portage-utils" + elog + elog "Additional tools that may be of interest:" + elog + elog " app-admin/eclean-kernel" + elog " app-portage/diffmask" + elog " app-portage/flaggie" + elog " app-portage/portpeek" + elog " app-portage/smart-live-rebuild" + fi +} diff --git a/app-portage/gentoolkit/metadata.xml b/app-portage/gentoolkit/metadata.xml new file mode 100644 index 00000000..030cf9c1 --- /dev/null +++ b/app-portage/gentoolkit/metadata.xml @@ -0,0 +1,19 @@ + + + + + tools-portage@gentoo.org + Gentoo Portage tools team + + + + Gentoolkit is a collection of useful adminstration scripts particular to + the Gentoo Linux distribution. It contains rough drafts and + implementations of features that may in time make it into Portage, or + into full-fledged tools in their own right. + + + proj/gentoolkit + gentoo/gentoolkit + +