aboutsummaryrefslogtreecommitdiffstats
path: root/util/README
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-05-28 18:46:27 +0200
committerMattias Andrée <m@maandree.se>2026-05-28 18:46:27 +0200
commit55e9f58fa7c551aebfd6084b778cd942fa8b20ce (patch)
tree7177e49a9c3a3c2e9cd4f88e8507cb19c9f6c1b0 /util/README
parentm fix (diff)
downloadrelease-scripts-55e9f58fa7c551aebfd6084b778cd942fa8b20ce.tar.gz
release-scripts-55e9f58fa7c551aebfd6084b778cd942fa8b20ce.tar.bz2
release-scripts-55e9f58fa7c551aebfd6084b778cd942fa8b20ce.tar.xz
Update (fixes support for a few edge cases, and leaves nothing laying around)
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'util/README')
-rw-r--r--util/README80
1 files changed, 80 insertions, 0 deletions
diff --git a/util/README b/util/README
new file mode 100644
index 0000000..b4ce9b4
--- /dev/null
+++ b/util/README
@@ -0,0 +1,80 @@
+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.
+
+
+gen-checksums tarball git-dir < version-info-file > 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 stdin for URLs in lines that
+ begin with "Tarball: " (however, the URL for the static
+ release is discarded as it is assumed to not exist yet
+ but be the same file as input as the argument). 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.