commit: 23ae20ab93de1c54cc296dea69026a4e3bd05d73 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Sep 19 18:34:21 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Sep 19 18:37:40 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23ae20ab
app-backup/rdup: avoid which Closes: https://bugs.gentoo.org/963094 Signed-off-by: Sam James <sam <AT> gentoo.org> app-backup/rdup/files/rdup-1.1.15-no-which.patch | 63 ++++++++++++++++++++++++ app-backup/rdup/rdup-1.1.15-r2.ebuild | 50 +++++++++++++++++++ 2 files changed, 113 insertions(+) diff --git a/app-backup/rdup/files/rdup-1.1.15-no-which.patch b/app-backup/rdup/files/rdup-1.1.15-no-which.patch new file mode 100644 index 000000000000..c26dea0134ef --- /dev/null +++ b/app-backup/rdup/files/rdup-1.1.15-no-which.patch @@ -0,0 +1,63 @@ +https://bugs.gentoo.org/963094 +--- a/rdup-simple ++++ b/rdup-simple +@@ -179,7 +179,7 @@ fi + [ $# -lt 2 ] && usage && exit + + if $mcrypt; then +- if ! which mcrypt 2>/dev/null 1>&2; then ++ if ! command -v bash > /dev/null; then + echo2 "Mcrypt not found, can not continue" + exit 1 + fi +--- a/testsuite/rdup/rdup.rdup-up.data ++++ b/testsuite/rdup/rdup.rdup-up.data +@@ -1204,7 +1204,7 @@ function clone() { + + # try to find the specific cmd + function find_cmd { +- which "${i}" >/dev/null ++ command -v "${i}" >/dev/null + if [ $? -ne 0 ]; then + err "[fatal] CmdDepend \"$i\" could not be satisfied: not found. Abort." + cleanup; exit 1 +@@ -1330,7 +1330,7 @@ if [ $goal = "create" ]; then + # get all files with the same basename except those that ends in .tpkg + + # check for shar +- which tar >/dev/null ++ command -v tar >/dev/null + if [ $? -ne 0 ]; then + err "[fatal] Tar command not found. Abort." + cd $TPKG_CURRENT; exit 1 +@@ -1524,7 +1524,7 @@ if [ ! -f $dsc_file ]; then + cleanup; exit 1 + fi + +-SHELL=`which bash` ++SHELL=`command -v bash` + if [ -z ${SHELL} ]; then + SHELL=/usr/local/bin/bash + if [ ! -x $SHELL ]; then +--- a/testsuite/rdup/rdup.simple.helper ++++ b/testsuite/rdup/rdup.simple.helper +@@ -5,7 +5,7 @@ + # these + PATH=$PWD:$PATH + +-if ! which gpg 2>/dev/null 1>&2; then ++if ! command -v gpg 2>/dev/null 1>&2; then + exit 0 + fi + +--- a/testsuite/rdup/rdup.simple3.helper ++++ b/testsuite/rdup/rdup.simple3.helper +@@ -2,7 +2,7 @@ + + PATH=$PWD:$PATH + +-if ! which gpg 2>/dev/null 1>&2; then ++if ! command -v gpg 2>/dev/null 1>&2; then + exit 0 + fi + diff --git a/app-backup/rdup/rdup-1.1.15-r2.ebuild b/app-backup/rdup/rdup-1.1.15-r2.ebuild new file mode 100644 index 000000000000..243ccb0a792f --- /dev/null +++ b/app-backup/rdup/rdup-1.1.15-r2.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools optfeature + +DESCRIPTION="Generate a file list suitable for full or incremental backups" +HOMEPAGE="https://github.com/miekg/rdup" +SRC_URI="https://github.com/miekg/rdup/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug test" +# It's known to fail with USE=debug +REQUIRED_USE="test? ( !debug )" +RESTRICT="!test? ( test )" + +RDEPEND=" + app-arch/libarchive + dev-libs/glib:2 + dev-libs/libpcre + dev-libs/nettle +" +DEPEND="${RDEPEND}" +BDEPEND=" + test? ( + app-crypt/mcrypt + dev-util/dejagnu + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.1.15-no-which.patch +) + +src_prepare() { + default + sed -i -e 's/ -Werror//' GNUmakefile.in || die "Failed to fix Makefile" + eautoreconf +} + +src_configure() { + econf $(use_enable debug) +} + +pkg_postinst() { + optfeature "encryption with a keyfile (-k ...)" app-crypt/mcrypt +}
