mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
|
|
||
|---|---|---|
| .. | ||
| metalog_reader.lua | ||
| README.md | ||
metalog_reader.lua is a script that reads METALOG file created by pkgbase
(make packages) and generates reports about the installed system
and issues
the script accepts an mtree file in a format that's returned by
mtree -c | mtree -C
synopsis:
metalog_reader.lua [-h] [-a | -c | -p [-count] [-size] [-f...]] [-W...] [-v] metalog-path
options:
-aprints all scan results. this is the default option if no option is provided.-clints the file and gives warnings/errors, including duplication and conflicting metadata-Wcheck-notagdirentries with dir type and no tags will be also included the first time they appear (1)
-plist all package names found in the file as exactly specified bytags=package=...-countdisplay the number of files of the package-sizedisplay the size of the package-fsetgidonly include packages with setgid files-fsetuidonly include packages with setuid files-fsetidonly include packages with setgid or setuid files
-vverbose mode-hhelp page
some examples:
metalog_reader.lua -a METALOGprints all scan results described below. this is the default optionmetalog_reader.lua -c METALOGonly prints errors and warnings found in the filemetalog_reader.lua -c -Wcheck-notagdir METALOGprints errors and warnings found in the file, including directories with no tagsmetalog_reader.lua -p METALOGonly prints all the package names found in the filemetalog_reader.lua -p -count -size METALOGprints all the package names, followed by number of files, followed by total sizemetalog_reader.lua -p -size -fsetid METALOGprints packages that has either setuid/setgid files, followed by the total sizemetalog_reader.lua -p -fsetuid -fsetgid METALOGprints packages that has both setuid and setgid files (if more than one filters are specified, they are composed using logic and)metalog_reader.lua -p -count -size -fsetuid METALOGprints packages that has setuid files, followed by number of files and total size
(1) if we have two entries
./bin type=dir uname=root gname=wheel mode=0755
./bin type=dir uname=root gname=wheel mode=0755 tags=...
by default, this is not warned. if the option is enabled, this will be warned as the second line sufficiently covers the first line.