From 6ab333d94175d14ddc453f72f2021791212ab15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ey=C3=9Fer?= Date: Wed, 2 Jun 2021 21:47:23 +0200 Subject: [PATCH] bfs: update to 2.2.1. --- ...pabilities-when-run-as-root-on-Linux.patch | 90 ------------------- ...ing-forever-when-failing-to-drop-cap.patch | 41 --------- ...emove-capabilities-after-dropping-th.patch | 47 ---------- srcpkgs/bfs/template | 4 +- 4 files changed, 2 insertions(+), 180 deletions(-) delete mode 100644 srcpkgs/bfs/patches/0001-tests-Drop-capabilities-when-run-as-root-on-Linux.patch delete mode 100644 srcpkgs/bfs/patches/0002-tests-Avoid-looping-forever-when-failing-to-drop-cap.patch delete mode 100644 srcpkgs/bfs/patches/0003-tests-Actually-remove-capabilities-after-dropping-th.patch diff --git a/srcpkgs/bfs/patches/0001-tests-Drop-capabilities-when-run-as-root-on-Linux.patch b/srcpkgs/bfs/patches/0001-tests-Drop-capabilities-when-run-as-root-on-Linux.patch deleted file mode 100644 index a2e54c397f8b..000000000000 --- a/srcpkgs/bfs/patches/0001-tests-Drop-capabilities-when-run-as-root-on-Linux.patch +++ /dev/null @@ -1,90 +0,0 @@ -From f2e6186ed0ce9b68362ad25d897f1e3c697728ec Mon Sep 17 00:00:00 2001 -From: Tavian Barnes -Date: Sun, 21 Mar 2021 13:18:43 -0400 -Subject: [PATCH] tests: Drop capabilities when run as root on Linux - -bfs's tests rely on file permissions being enforced, which leads them to -work incorrectly when run as root. This is probably the most common -packaging issue for bfs, most recently seen with Void Linux's update to -bfs 2.2. - -Make it easier on packagers by using capsh, if it's available, to drop -the DAC privileges for the tests. - -Link: https://github.com/void-linux/void-packages/pull/29437#issuecomment-798670288 -Link: https://salsa.debian.org/lamby/pkg-bfs/-/commit/b173efb35da126adb39b0984219d6a2fd9ff428f ---- - tests.sh | 35 +++++++++++++++++++++++++++++------ - 1 file changed, 29 insertions(+), 6 deletions(-) - -diff --git tests.sh tests.sh -index b039eea..0bdd1d4 100755 ---- tests.sh -+++ tests.sh -@@ -34,10 +34,25 @@ if [ -t 1 ]; then - RST="$(printf '\033[0m')" - fi - --if [ "$EUID" -eq 0 ]; then -+if command -v capsh &>/dev/null; then -+ if capsh --has-p=CAP_DAC_OVERRIDE &>/dev/null || capsh --has-p=CAP_DAC_READ_SEARCH &>/dev/null; then -+ cat >&2 <&2 < -Date: Mon, 22 Mar 2021 17:19:31 -0400 -Subject: [PATCH] tests: Avoid looping forever when failing to drop - capabilities - -Link: https://github.com/void-linux/void-packages/pull/29437/checks?check_run_id=2169825021 ---- - tests.sh | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git tests.sh tests.sh -index 0bdd1d4..ad71894 100755 ---- tests.sh -+++ tests.sh -@@ -36,13 +36,21 @@ fi - - if command -v capsh &>/dev/null; then - if capsh --has-p=CAP_DAC_OVERRIDE &>/dev/null || capsh --has-p=CAP_DAC_READ_SEARCH &>/dev/null; then -+ if [ -n "$BFS_TRIED_DROP" ]; then -+ cat >&2 <&2 < -Date: Tue, 23 Mar 2021 11:46:26 -0400 -Subject: [PATCH] tests: Actually remove capabilities after dropping them - ---- - tests.sh | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git tests.sh tests.sh -index ad71894..8eb4dc0 100755 ---- tests.sh -+++ tests.sh -@@ -35,22 +35,25 @@ if [ -t 1 ]; then - fi - - if command -v capsh &>/dev/null; then -- if capsh --has-p=CAP_DAC_OVERRIDE &>/dev/null || capsh --has-p=CAP_DAC_READ_SEARCH &>/dev/null; then -+ if capsh --has-p=cap_dac_override &>/dev/null || capsh --has-p=cap_dac_read_search &>/dev/null; then - if [ -n "$BFS_TRIED_DROP" ]; then - cat >&2 <&2 <