From 9f2aad23d2d742a4820a021111332243f447f995 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Wed, 25 Feb 2026 12:23:42 -0500 Subject: [PATCH] proxmark3: use upstream patch instead of sed --- .../files/proxmark3-4.21128-skipuv.patch | 34 +++++++++++++++++++ .../proxmark3/proxmark3-4.21128.ebuild | 11 +++--- net-wireless/proxmark3/proxmark3-9999.ebuild | 9 +++-- 3 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 net-wireless/proxmark3/files/proxmark3-4.21128-skipuv.patch diff --git a/net-wireless/proxmark3/files/proxmark3-4.21128-skipuv.patch b/net-wireless/proxmark3/files/proxmark3-4.21128-skipuv.patch new file mode 100644 index 000000000..8a1db8eab --- /dev/null +++ b/net-wireless/proxmark3/files/proxmark3-4.21128-skipuv.patch @@ -0,0 +1,34 @@ +From acb2dc0e1064db16968c33aba1e9552799611d48 Mon Sep 17 00:00:00 2001 +From: Philippe Teuwen +Date: Wed, 25 Feb 2026 17:55:40 +0100 +Subject: [PATCH] Add SKIPUV for package maintainers + +--- + tools/pm3_tests.sh | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/tools/pm3_tests.sh b/tools/pm3_tests.sh +index 9d23f4f7a5..b22e48ed8b 100755 +--- a/tools/pm3_tests.sh ++++ b/tools/pm3_tests.sh +@@ -1,5 +1,9 @@ + #!/usr/bin/env bash + ++# For Python tests, uv will be used if present. ++# You can forcibly ignore it with ++# SKIPUV=1 ./pm3_tests.sh ++ + # This is used to make sure that the language for the functions is english instead of the system default language. + LANG=C + +@@ -7,8 +11,8 @@ PM3PATH="$(dirname "$0")/.." + cd "$PM3PATH" || exit 1 + + PYTHON=python3 +-if command -v uv >/dev/null 2>&1; then +- PYTHON="uv run --script" ++if [ "${SKIPUV:-0}" != "1" ] && command -v uv >/dev/null 2>&1; then ++ PYTHON="uv run --script" + fi + + DICPATH="./client/dictionaries" diff --git a/net-wireless/proxmark3/proxmark3-4.21128.ebuild b/net-wireless/proxmark3/proxmark3-4.21128.ebuild index 33363c331..c2d2a8dba 100644 --- a/net-wireless/proxmark3/proxmark3-4.21128.ebuild +++ b/net-wireless/proxmark3/proxmark3-4.21128.ebuild @@ -164,11 +164,12 @@ QA_FLAGS_IGNORED="usr/share/proxmark3/firmware/bootrom.elf " QA_PRESTRIPPED="${QA_FLAGS_IGNORED}" +PATCHES=( "${FILESDIR}"/${P}-skipuv.patch ) + src_prepare(){ default build_time=$(date '+%Y-%m-%d %H:%M:%S') sed -i "s#\"\$ctime\",#\"${build_time}\",#" tools/mkversion.sh || die - sed -i 's#PYTHON="uv run --script"#PYTHON="python3"#' tools/pm3_tests.sh || die } src_compile(){ @@ -221,15 +222,15 @@ src_test() { # This isn't installed and was removed by "make clean" after firmware build sed -i '/if ! CheckFileExist "fpgacompress exists"/d' tools/pm3_tests.sh || die if use firmware; then - ./tools/pm3_tests.sh --long || die + SKIPUV=1 ./tools/pm3_tests.sh --long || die else - ./tools/pm3_tests.sh --long client || die + SKIPUV=1 ./tools/pm3_tests.sh --long client || die fi # Opencl stuff doesn't work as the portage user #if use opencl; then - # ./tools/pm3_tests.sh --long --opencl hitag2crack || die + # SKIPUV=1 ./tools/pm3_tests.sh --long --opencl hitag2crack || die #else - ./tools/pm3_tests.sh --long hitag2crack || die + SKIPUV=1 ./tools/pm3_tests.sh --long hitag2crack || die #fi } diff --git a/net-wireless/proxmark3/proxmark3-9999.ebuild b/net-wireless/proxmark3/proxmark3-9999.ebuild index 33363c331..8b2adb05f 100644 --- a/net-wireless/proxmark3/proxmark3-9999.ebuild +++ b/net-wireless/proxmark3/proxmark3-9999.ebuild @@ -168,7 +168,6 @@ src_prepare(){ default build_time=$(date '+%Y-%m-%d %H:%M:%S') sed -i "s#\"\$ctime\",#\"${build_time}\",#" tools/mkversion.sh || die - sed -i 's#PYTHON="uv run --script"#PYTHON="python3"#' tools/pm3_tests.sh || die } src_compile(){ @@ -221,15 +220,15 @@ src_test() { # This isn't installed and was removed by "make clean" after firmware build sed -i '/if ! CheckFileExist "fpgacompress exists"/d' tools/pm3_tests.sh || die if use firmware; then - ./tools/pm3_tests.sh --long || die + SKIPUV=1 ./tools/pm3_tests.sh --long || die else - ./tools/pm3_tests.sh --long client || die + SKIPUV=1 ./tools/pm3_tests.sh --long client || die fi # Opencl stuff doesn't work as the portage user #if use opencl; then - # ./tools/pm3_tests.sh --long --opencl hitag2crack || die + # SKIPUV=1 ./tools/pm3_tests.sh --long --opencl hitag2crack || die #else - ./tools/pm3_tests.sh --long hitag2crack || die + SKIPUV=1 ./tools/pm3_tests.sh --long hitag2crack || die #fi }