git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t/lib-gpg: adjust permissions for gnupg 2.1

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Dec 2, 2014, 13:40 UTC
Message-ID
<9c28f16c677bbc774e5b8dfc79b6ffe2c55d1720.1417527514.git.git@drmicha.warpmail.net>
In-Reply-To
<547DB6C3.5010704@drmicha.warpmail.net>

Before gnupg 2.1 (aka "modern branch"), gpghome would contain only files which allowed t/lib-gpg.sh to set permissions explicitely, and we did that since 28a1b07 (t/lib-gpg: adjust permissions for gnupg 2.1, 2014-12-02) in order to adjust wrong permissions from a checkout on ro file systems.

gnupg 2.1 creates a new directory in gpghome which would get its x bit removed.

Adjust and use +X so that any directory would get its x bit set. This also keeps the x bit on files which had it set for whatever wrong reason, but we care only about having at least the necessary permissions for the tests to run.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
Something like this?
Untested for lack of gpg2.1
 t/lib-gpg.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index cd2baef..25ca12d 100755
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -17,8 +17,7 @@ else
 		# Name and email: C O Mitter <committer@example.com>
 		# No password given, to enable non-interactive operation.
 		cp -R "$TEST_DIRECTORY"/lib-gpg ./gpghome
-		chmod 0700 gpghome
-		chmod 0600 gpghome/*
+		chmod -R u+rwX gpghome
 		GNUPGHOME="$(pwd)/gpghome"
 		export GNUPGHOME
 		test_set_prereq GPG
-- 
2.2.0.rc3.286.g888a711
Previous: Michael J GruberNext: Jeff King
Message 7 of 15 in “[ANNOUNCE] Git v2.2.0”
  1. Junio C HamanoNov 26, 2014
  2. Steven NoonanNov 27, 2014
  3. Jeff KingNov 28, 2014
  4. Michael J GruberNov 28, 2014
  5. tests do not work with gpg 2.1Jeff King, Nov 28, 2014
  6. Michael J GruberDec 2, 2014
  7. t/lib-gpg: adjust permissions for gnupg 2.1Michael J Gruber, Dec 2, 2014
  8. Jeff KingDec 2, 2014
  9. Junio C HamanoDec 2, 2014
  10. Jeff KingDec 3, 2014
  11. Junio C HamanoDec 3, 2014
  12. Michael J GruberDec 3, 2014
  13. Junio C HamanoDec 3, 2014
  14. Jeff KingDec 2, 2014
  15. Jeff KingDec 2, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.