# xorg-minimal-fonts-verify.awk -- the payload and fonts.dir checks in ONE gawk # pass. # # WHY ONE PASS. On this arm a process's memory is not returned when it exits and # /bin/sh is a 16 MB wasm module, so a suite's cost is dominated by how many # programs it starts. The shell side of this suite runs one find, one # `sha256sum -c' down a pipe and this gawk; every payload and index result line # below is produced here rather than by a shell loop over 45 files. # # INPUTS, each named by a -v so FILENAME can discriminate them: # REF the reference manifest " " # SUMS `sha256sum -c' over the manifest, one verdict per file: # ": OK" / ": FAILED" / ": FAILED open or read". # It is -c rather than a plain digest run because the check list arrives # down a PIPE and so costs nothing on the argv: naming these 45 files by # absolute path builds a ~2.1 kB argv, which fits, but the pipeline is # the idiom the packager README settled on after a 10 kB one wedged a # guest outright (brintos/hardwarejs#15) and it cannot drift from the # manifest. # INV find -printf '%p %y %s %m %l\n' over the font directory, its parent # and /usr/lib/X11 -- so the symlink, the co-tenant question and the # absence of fonts.alias are all answered from the same pass # FDIR the on-target /usr/share/fonts/X11/misc/fonts.dir, read as data # FACES the expected face table "||