1 `metalog.lua` is a script that reads METALOG file created by pkgbase
2 (make packages) and generates reports about the installed system
5 the script accepts an mtree file in a format that's returned by
10 metalog_reader.lua [-h] [-a | -c | -p [-count] [-size] [-f...]] [-W...] [-v] metalog-path
15 * `-a` prints all scan results. this is the default option if no option is
17 * `-c` lints the file and gives warnings/errors, including duplication and
19 * `-Wcheck-notagdir` entries with dir type and no tags will be also included
20 the first time they appear (1)
21 * `-p` list all package names found in the file as exactly specified by
23 * `-count` display the number of files of the package
24 * `-size` display the size of the package
25 * `-fsetgid` only include packages with setgid files
26 * `-fsetuid` only include packages with setuid files
27 * `-fsetid` only include packages with setgid or setuid files
33 * `metalog_reader.lua -a METALOG`
34 prints all scan results described below. this is the default option
35 * `metalog_reader.lua -c METALOG`
36 only prints errors and warnings found in the file
37 * `metalog_reader.lua -c -Wcheck-notagdir METALOG`
38 prints errors and warnings found in the file, including directories with no
40 * `metalog_reader.lua -p METALOG`
41 only prints all the package names found in the file
42 * `metalog_reader.lua -p -count -size METALOG`
43 prints all the package names, followed by number of files, followed by total
45 * `metalog_reader.lua -p -size -fsetid METALOG`
46 prints packages that has either setuid/setgid files, followed by the total
48 * `metalog_reader.lua -p -fsetuid -fsetgid METALOG`
49 prints packages that has both setuid and setgid files (if more than one
50 filters are specified, they are composed using logic and)
51 * `metalog_reader.lua -p -count -size -fsetuid METALOG`
52 prints packages that has setuid files, followed by number of files and total
55 (1) if we have two entries
57 ./bin type=dir uname=root gname=wheel mode=0755
58 ./bin type=dir uname=root gname=wheel mode=0755 tags=...
60 by default, this is not warned. if the option is enabled, this will be warned
61 as the second line sufficiently covers the first line.