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

[PATCH] test-lib: on FreeBSD, look for unzip(1) in /usr/local/bin/

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 21, 2016, 16:02 UTC
Message-ID
<31dce0b28ae094c976890c1604c4ebbcaef0e7ef.1469116960.git.johannes.schindelin@gmx.de>
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>

Eric Wong reported that while FreeBSD has a /usr/bin/unzip, it uses different semantics from those that are needed by Git's tests: When passing the -a option to Info-Zip, it heeds the text attribute of the .zip file's central directory, while FreeBSD's unzip ignores that attribute.

The common work-around is to install Info-Zip on FreeBSD, into /usr/local/bin/.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
Published-As: https://github.com/dscho/git/releases/tag/freebsd-unzip-v1
 t/test-lib.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 11201e9..dd2f70c 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -929,7 +929,8 @@ yes () {
 }
 
 # Fix some commands on Windows
-case $(uname -s) in
+uname_s=$(uname -s)
+case $uname_s in
 *MINGW*)
 	# Windows has its own (incompatible) sort and find
 	sort () {
@@ -1100,6 +1101,7 @@ test_lazy_prereq SANITY '
 	return $status
 '
 
+test FreeBSD != $uname_s || GIT_UNZIP=${GIT_UNZIP:-/usr/local/bin/unzip}
 GIT_UNZIP=${GIT_UNZIP:-unzip}
 test_lazy_prereq UNZIP '
 	"$GIT_UNZIP" -v
-- 
2.9.0.281.g286a8d9

base-commit: 29493589e97a2de0c4c1c314f61ccafaee3b5caf
Next: Eric Wong
Message 1 of 5 in “test-lib: on FreeBSD, look for unzip(1) in /usr/local/bin/”
  1. test-lib: on FreeBSD, look for unzip(1) in /usr/local/bin/Johannes Schindelin, Jul 21, 2016
  2. Eric WongJul 21, 2016
  3. Johannes SchindelinJan 27, 2017
  4. Junio C HamanoJan 27, 2017
  5. Junio C HamanoJan 27, 2017

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.