]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/pkgbase/README.md
Optionally bind ktls threads to NUMA domains
[FreeBSD/FreeBSD.git] / tools / pkgbase / README.md
1 `metalog.lua` is a script that reads METALOG file created by pkgbase
2 (make packages) and generates reports about the installed system
3 and issues
4
5 the script accepts an mtree file in a format that's returned by
6 `mtree -c | mtree -C`
7
8 synopsis:
9 ```
10 metalog_reader.lua [-h] [-a | -c | -p [-count] [-size] [-f...]] [-W...] [-v] metalog-path
11 ```
12
13 options:
14
15 * `-a` prints all scan results. this is the default option if no option is
16   provided.
17 * `-c` lints the file and gives warnings/errors, including duplication and
18   conflicting metadata
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
22   `tags=package=...`
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
28 * `-v` verbose mode
29 * `-h` help page
30
31 some examples:
32
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
39   tags
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
44   size
45 * `metalog_reader.lua -p -size -fsetid METALOG`
46   prints packages that has either setuid/setgid files, followed by the total
47   size
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
53   size
54
55 (1) if we have two entries
56 ```
57 ./bin type=dir uname=root gname=wheel mode=0755
58 ./bin type=dir uname=root gname=wheel mode=0755 tags=...
59 ```
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.