Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] bfs: update to 2.2.1.
@ 2021-06-02 19:51 daniel-eys
  2021-06-03 21:12 ` [PR PATCH] [Merged]: " ericonr
  0 siblings, 1 reply; 2+ messages in thread
From: daniel-eys @ 2021-06-02 19:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]

There is a new pull request by daniel-eys against master on the void-packages repository

https://github.com/daniel-eys/void-packages bfs
https://github.com/void-linux/void-packages/pull/31264

bfs: update to 2.2.1.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31264.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bfs-31264.patch --]
[-- Type: text/x-diff, Size: 8129 bytes --]

From 6ab333d94175d14ddc453f72f2021791212ab15f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Ey=C3=9Fer?= <daniel.eysser@gmail.com>
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 <tavianator@tavianator.com>
-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 <<EOF
-+${YLW}warning:${RST} Running as ${BLD}$(id -un)${RST} is not recommended.  Dropping ${BLD}CAP_DAC_OVERRIDE${RST} and
-+${BLD}CAP_DAC_READ_SEARCH${RST}.
-+
-+EOF
-+
-+        exec capsh --drop=CAP_DAC_OVERRIDE,CAP_DAC_READ_SEARCH -- "$0" "$@"
-+    fi
-+elif [ "$EUID" -eq 0 ]; then
-+    UNLESS=
-+    if [ "$(uname)" = "Linux" ]; then
-+	UNLESS=" unless ${GRN}capsh${RST} is installed"
-+    fi
-+
-     cat >&2 <<EOF
- ${RED}error:${RST} These tests expect filesystem permissions to be enforced, and therefore
--will not work when run as ${BLD}$(id -un)${RST}.
-+will not work when run as ${BLD}$(id -un)${RST}${UNLESS}.
- EOF
-     exit 1
- fi
-@@ -1209,11 +1224,15 @@ function test_gid() {
- }
- 
- function test_gid_plus() {
--    bfs_diff basic -gid +0
-+    if [ "$(id -g)" -ne 0 ]; then
-+	bfs_diff basic -gid +0
-+    fi
- }
- 
- function test_gid_plus_plus() {
--    bfs_diff basic -gid +0
-+    if [ "$(id -g)" -ne 0 ]; then
-+	bfs_diff basic -gid ++0
-+    fi
- }
- 
- function test_gid_minus() {
-@@ -1229,11 +1248,15 @@ function test_uid() {
- }
- 
- function test_uid_plus() {
--    bfs_diff basic -uid +0
-+    if [ "$(id -u)" -ne 0 ]; then
-+	bfs_diff basic -uid +0
-+    fi
- }
- 
- function test_uid_plus_plus() {
--    bfs_diff basic -uid ++0
-+    if [ "$(id -u)" -ne 0 ]; then
-+	bfs_diff basic -uid ++0
-+    fi
- }
- 
- function test_uid_minus() {
--- 
-2.31.0
-
diff --git a/srcpkgs/bfs/patches/0002-tests-Avoid-looping-forever-when-failing-to-drop-cap.patch b/srcpkgs/bfs/patches/0002-tests-Avoid-looping-forever-when-failing-to-drop-cap.patch
deleted file mode 100644
index 5e951faea29c..000000000000
--- a/srcpkgs/bfs/patches/0002-tests-Avoid-looping-forever-when-failing-to-drop-cap.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From dbc77fd3b6e48a17eb79f9ff3a5f810b7554bf6f Mon Sep 17 00:00:00 2001
-From: Tavian Barnes <tavianator@tavianator.com>
-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 <<EOF
-+${RED}error: ${RST} Failed to drop capabilities.
-+EOF
-+
-+	    exit 1
-+	fi
-+
-         cat >&2 <<EOF
- ${YLW}warning:${RST} Running as ${BLD}$(id -un)${RST} is not recommended.  Dropping ${BLD}CAP_DAC_OVERRIDE${RST} and
- ${BLD}CAP_DAC_READ_SEARCH${RST}.
- 
- EOF
- 
--        exec capsh --drop=CAP_DAC_OVERRIDE,CAP_DAC_READ_SEARCH -- "$0" "$@"
-+        BFS_TRIED_DROP=y exec capsh --drop=CAP_DAC_OVERRIDE,CAP_DAC_READ_SEARCH -- "$0" "$@"
-     fi
- elif [ "$EUID" -eq 0 ]; then
-     UNLESS=
--- 
-2.31.0
-
diff --git a/srcpkgs/bfs/patches/0003-tests-Actually-remove-capabilities-after-dropping-th.patch b/srcpkgs/bfs/patches/0003-tests-Actually-remove-capabilities-after-dropping-th.patch
deleted file mode 100644
index acf3d32f9113..000000000000
--- a/srcpkgs/bfs/patches/0003-tests-Actually-remove-capabilities-after-dropping-th.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From d36ece2ca7498b7ba5485d5010439b57f006c9c8 Mon Sep 17 00:00:00 2001
-From: Tavian Barnes <tavianator@tavianator.com>
-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 <<EOF
--${RED}error: ${RST} Failed to drop capabilities.
-+${RED}error:${RST} Failed to drop capabilities.
- EOF
- 
- 	    exit 1
- 	fi
- 
-         cat >&2 <<EOF
--${YLW}warning:${RST} Running as ${BLD}$(id -un)${RST} is not recommended.  Dropping ${BLD}CAP_DAC_OVERRIDE${RST} and
--${BLD}CAP_DAC_READ_SEARCH${RST}.
-+${YLW}warning:${RST} Running as ${BLD}$(id -un)${RST} is not recommended.  Dropping ${BLD}cap_dac_override${RST} and
-+${BLD}cap_dac_read_search${RST}.
- 
- EOF
- 
--        BFS_TRIED_DROP=y exec capsh --drop=CAP_DAC_OVERRIDE,CAP_DAC_READ_SEARCH -- "$0" "$@"
-+        BFS_TRIED_DROP=y exec capsh \
-+            --drop=cap_dac_override,cap_dac_read_search \
-+            --caps=cap_dac_override,cap_dac_read_search-eip \
-+            -- "$0" "$@"
-     fi
- elif [ "$EUID" -eq 0 ]; then
-     UNLESS=
--- 
-2.31.1
-
diff --git a/srcpkgs/bfs/template b/srcpkgs/bfs/template
index ebc526cec78f..c0a36ae67f52 100644
--- a/srcpkgs/bfs/template
+++ b/srcpkgs/bfs/template
@@ -1,6 +1,6 @@
 # Template file for 'bfs'
 pkgname=bfs
-version=2.2
+version=2.2.1
 revision=1
 build_style=gnu-makefile
 makedepends="acl-devel libcap-devel"
@@ -11,7 +11,7 @@ license="0BSD"
 homepage="https://github.com/tavianator/bfs"
 changelog="https://raw.githubusercontent.com/tavianator/bfs/main/RELEASES.md"
 distfiles="https://github.com/tavianator/bfs/archive/${version}.tar.gz"
-checksum=09cff2033544cbaa31af2ad7d59347056a53c04ff7c469bb5904e575d3641053
+checksum=94a9c9a03d82c2d8e81ff373021d8188925a1a5e525937ddda2523483629e390
 
 post_install() {
 	vlicense LICENSE

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: bfs: update to 2.2.1.
  2021-06-02 19:51 [PR PATCH] bfs: update to 2.2.1 daniel-eys
@ 2021-06-03 21:12 ` ericonr
  0 siblings, 0 replies; 2+ messages in thread
From: ericonr @ 2021-06-03 21:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]

There's a merged pull request on the void-packages repository

bfs: update to 2.2.1.
https://github.com/void-linux/void-packages/pull/31264

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-03 21:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 19:51 [PR PATCH] bfs: update to 2.2.1 daniel-eys
2021-06-03 21:12 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).