-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
96 lines (67 loc) · 3.32 KB
/
INSTALL
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Building and Installing with Make
---------------------------------
To build section, type:
make
You can use section from the directory you built it, no installation
required.
To test the just built section program, type:
make check
If you want to install it to your system, type:
make install
To change the default install location of /usr/local to /usr, type:
make PREFIX=/usr install
You have to keep track of the installed files yourself, if you want to
remove them later on.
Installing section to your system may require administrative ("root")
access.
When using make to build section and the GCC Go compiler is available,
it is used. In case the GCC Go compiler is not available, but the Go
Tool is, the Go Tool is used to build section.
Prerequisites
-------------
- A Go compiler, e.g., GCC Go or the Go Tool.
- The code only uses Go's standard library, no external dependencies.
- A system sufficiently compatible to POSIX and GNU.
- POSIX (or compatible) utilities: grep, printf, sh, sed, test
- GNU (or compatible) utilities: date, gzip, install, make, tar
- To create an HTML version of the man page, you need a man utility that can
produce HTML output.
Additional Makefile Targets
---------------------------
- clean: remove generated files except archives
- distclean: remove all generated files
- tar: create a gzip compressed tar-ball of the sources for
distribution
- section.1.html: create HTML version of manual page
Building and Installing with the Go Tool
----------------------------------------
Before using the Go Tool, you should consider the privacy and security
implications of doing so:
- Starting with some version, the Go Tool communicates with the Google
module proxy and checksum database.
- In 2023, there were plans to add telemetry to the Go Tool with the
intent to collect usage data and transmit it to Google servers and
store it there. While this was initially planned to be opt-out,
the plan later changed to use opt-in.
- Starting with Go versions 1.19.11, 1.20.6, and 1.21rc1, invoking
the Go Tool might download and execute code from the Internet.
Setting some bespoke environment variables, at least one per problematic
behavior, to specific values before executing the Go Tool is supposed
to deactivate all this.
Of course, I do not know about all possible privacy and security
implications of using the Go Tool. It is also quite likely that new such
issues emerge without me noticing. You might even be reading an older
version of this file that does not yet reflect my future understanding.
The Go Tool for managing Go source code is intended as a Go specific
replacement for Make, and it provides quite a bit of additional
functionality. If you have set up your system correctly for the Go Tool,
and saved the section sources in an appropriate place for the Go Tool
to find them, you can use the Go Tool to build and/or install the
section binary. It does not install the man page.
To build the section binary using the Go Tool, type:
go build section
To install the section binary using the Go Tool, type:
go install section
The "go install" commands seems to build and then move the binary to its
future location, i.e., if you had already built section with "go build",
after "go install" this copy may have been removed.