File: fix-manpages.patch

package info (click to toggle)
sigsum-go 0.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,028 kB
  • sloc: sh: 803; makefile: 81
file content (32 lines) | stat: -rw-r--r-- 1,201 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Simon Josefsson <simon@josefsson.org>
Date: Tue, 11 Mar 2025 20:12:06 +0100
Subject: [PATCH] Fix manpages
Forwarded: not-needed

Invoking 'go run' fails if $HOME is not writeable:

failed to initialize build cache at /home/jas/.cache/go-build: mkdir /home/jas: permission denied

Let's invoke our installed commands directly instead of going via 'go run'.

diff --git a/doc/help2man/wrapper b/doc/help2man/wrapper
index f1c5379..5a0473c 100755
--- a/doc/help2man/wrapper
+++ b/doc/help2man/wrapper
@@ -11,13 +11,13 @@ case "$opt" in
         case "$cmd" in
             sigsum-key|sigsum-token|sigsum-policy)
                 if [[ $sub == no ]]; then
-                    go run "../../cmd/$cmd/$cmd.go" --help
+                    "$cmd" --help
                 else
-                    go run "../../cmd/$cmd/$cmd.go" "$sub" --help | sed "/^Usage:/ a\\\nOptions:"
+                    "$cmd" "$sub" --help | sed "/^Usage:/ a\\\nOptions:"
                 fi
                 ;;
             *)
-                go run "../../cmd/$cmd/$cmd.go" --help | sed "/^Usage:/ a\\\nOptions:"
+                "$cmd" --help | sed "/^Usage:/ a\\\nOptions:"
                 ;;
         esac
         ;;