Date: Sat, 25 May 2019 19:45:42 +0200
From: mj-mailinglist@gmx.de
To: freebsd-pkgbase@freebsd.org
Subject: How is the ${WSTAGEDIR}/METALOG file generated?
Message-ID: <trinity-cc7a1aad-8f7e-48db-be8e-517979137dd9-1558806342225@3c-app-gmx-bs48>
next in thread | raw e-mail | index | archive | help
As far as i can see, the METALOG file plays an important role in pkgbase, it is used by the mtree-to-plist.awk script, to generate the per package plist file, e.g runtime.plist, runtime-debug.plist, runtime-manuals.plist, etc. For the assignment of a file to a package the tag package=... seems relevent. e.g "./etc/mtree/BSD.root.dist type=file uname=root gname=wheel mode=0444 size=1613 tags=package=runtime" I found some places where these tags are defined (https://reviews.freebsd.org/D20173), but how the entries end up in the METALOG file is hard to find. Can somebody point me to the relevant places? To the METALOG file itself, here are some stats from a just finished "make packages" run (first line #mtree 2.0 removed): METALOG ------- lines total: 35293 with package tag: 33243 without package tag: 2051 type=dir: 3370 type=file: 30484 type=link: 1440 there are a lot of duplicate entries in the file, e.g. 10x ./usr/share/snmp/mibs type=dir uname=root gname=wheel mode=0755 tags=package=runtime 13x ./usr/share/snmp/defs type=dir uname=root gname=wheel mode=0755 tags=package=runtime 15x ./boot type=dir uname=root gname=wheel mode=0755 tags=package=runtime 79x ./etc type=dir uname=root gname=wheel mode=0755 tags=package=runtime This seems not to be a problem, but pkg complains about files/dirs already added to the package. The stats for a sort -u METALOG look like this: METALOG.sortu ------------- lines total: 34640 with package tag: 32598 without package tag: 2042 type=dir: 2884 type=file: 30316 type=link: 1440 there are still some semi duplicate entries, they differ only on added tags: ./etc type=dir uname=root gname=wheel mode=0755 ./etc type=dir uname=root gname=wheel mode=0755 tags=package=runtime ... ./boot/lua type=dir uname=root gname=wheel mode=0755 ./boot/lua type=dir uname=root gname=wheel mode=0755 tags=package=runtime ... ./etc/devd type=dir uname=root gname=wheel mode=0755 ./etc/devd type=dir uname=root gname=wheel mode=0755 tags=package=runtime And one final stat: the sum of lines in all *.plist files: cat *.plist | wc -l: 33243 cat *.plist | sort -u | wc -l 32598 Is it neccessary to add package=... tags to the above 2051/2042 lines above? Are these files/dirs missing from packages? Directories could be created by pkg during installation, but i only found the relevant directive in the runtime.ucl file: ... directories { /dev = "y"; /tmp = "y"; ... -- Martin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?trinity-cc7a1aad-8f7e-48db-be8e-517979137dd9-1558806342225>
