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
|
tmpmount mountpoint command [argument] ...
Mounts a tmpfs at `mountpoint` and execs into
`command [argument] ...`. The tmpfs is private
to the process and it's children.
repodiff directory-1 file-list-1 directory-2 file-list-2
Checks for differences betweens the files listed in
file-list-1, which are relative to directory-1, and
files listed in file-list-2, which are relative to
directory-2. Will only check for things supported
by git: file listing, file names, file content,
symlink target, and executable by owner. (Files
that are not regular files, symbolic links or
directories will cause failure.)
file-list-1 and file-list-2 use <nul> termination
rather then <newline> termination, meaning that
if the file listed is created with file(1),
`-print0` should have been used, or if with
git-ls-files(1), `-z` should have been used.
If a difference is found 1 is returned, 0 otherwise.
Exit value 2 is used to signal runtime error.
validate-tarball tarball git-dir work-dir
Validates the contents a tarball againts a known
good directory (git-dir). An empty directory
(work-dir) shall be provided as a space for
temporary files.
order-checksums
Sorts standard input, removed duplicates checksums
and output the checksums lines primarily ordered
by the hash algorithms in a particular order and
secondarily by the checksums alphabetically sorted.
get-checksums tarball
Calculates the checksums of a tarball.
A special argument can be provided for printing
the order the hash algorithms are output in
get-and-check tarball-url reference-dir work-dir
Downloads tarball-url and uses ./validate-tarball
to validate its contents against a known good
directory (reference-dir). An empty directory
(work-dir) shall be provided as a space for
temporary files. If the content of the tarball
matches git-tracked files in reference-dir,
./get-checksums is used to output the tarball's
checksums.
check-mirror tarball-url ref-tarball work-dir
This is the same as get-and-check except it expects a
known good tarball as the second argument instead of a
known good git repository
gen-checksums tarball git-dir < tarball-url-list > checksum-listing
This brings all of the above together. The tarball,
which is assumed to be the tarball for the static release
is validates against a known good directory (git-dir),
for which the tarball is supposted to be generated from,
but this check validates that git itself is not manipulating
the tarballs. Then it reads each line from, treating each
line as an URL. These URLs are used to download release
tarballs from all mirrors; they are also validates against
the known good directory. The checksums for all tarballs,
both the one provided in the command line and those
downloaded, are output to stdout.
|