Page MenuHomeFreeBSD

D53194.id164538.diff
No OneTemporary

D53194.id164538.diff

diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -213,16 +213,6 @@
install -y -r ${PKG_REPO_NAME} $pkg
done
metalog_add_data ./var/db/pkg/local.sqlite
-
- # Add some database files which are created by pkg triggers;
- # at some point in the future the tools which create these
- # files should probably learn how to record them in METALOG
- # (which would simplify no-root installworld as well).
- metalog_add_data ./etc/login.conf.db
- metalog_add_data ./etc/passwd
- metalog_add_data ./etc/pwd.db
- metalog_add_data ./etc/spwd.db 600
- metalog_add_data ./var/db/services.db
else
if [ -n "${WITHOUT_QEMU}" ]; then
return 0
@@ -290,28 +280,42 @@
cat ${DESTDIR}/METALOG.pkg >> ${DESTDIR}/METALOG
fi
- # Check for any directories in the staging tree which weren't
- # recorded in METALOG, and record them now. This is a quick hack
- # to avoid creating unusable VM images and should go away once
- # the bugs which produce such unlogged directories are gone.
- grep type=dir ${DESTDIR}/METALOG |
- cut -f 1 -d ' ' |
- sort -u > ${DESTDIR}/METALOG.dirs
- ( cd ${DESTDIR} && find . -type d ) |
- sort |
- comm -23 - ${DESTDIR}/METALOG.dirs > ${DESTDIR}/METALOG.missingdirs
- if [ -s ${DESTDIR}/METALOG.missingdirs ]; then
- echo "WARNING: Directories exist but were not in METALOG"
- cat ${DESTDIR}/METALOG.missingdirs
+ if [ -n "${NO_ROOT}" ]; then
+ # Check for any directories in the staging tree which weren't
+ # recorded in METALOG, and record them now. This is a quick hack
+ # to avoid creating unusable VM images and should go away once
+ # the bugs which produce such unlogged directories are gone.
+ grep type=dir ${DESTDIR}/METALOG |
+ cut -f 1 -d ' ' |
+ sort -u > ${DESTDIR}/METALOG.dirs
+ ( cd ${DESTDIR} && find . -type d ) |
+ sort |
+ comm -23 - ${DESTDIR}/METALOG.dirs > ${DESTDIR}/METALOG.missingdirs
+ if [ -s ${DESTDIR}/METALOG.missingdirs ]; then
+ echo "WARNING: Directories exist but were not in METALOG"
+ cat ${DESTDIR}/METALOG.missingdirs
+ fi
+ while read DIR; do
+ metalog_add_data ${DIR}
+ done < ${DESTDIR}/METALOG.missingdirs
+
+ if [ -z "${NOPKGBASE}" ]; then
+ # Add some database files which are created by pkg triggers;
+ # at some point in the future the tools which create these
+ # files should probably learn how to record them in METALOG
+ # (which would simplify no-root installworld as well).
+ metalog_add_data ./etc/login.conf.db
+ metalog_add_data ./etc/passwd
+ metalog_add_data ./etc/pwd.db
+ metalog_add_data ./etc/spwd.db 600
+ metalog_add_data ./var/db/services.db
+ fi
+
+ # Sort METALOG file; makefs produces directories with 000 permissions
+ # if their contents are seen before the directories themselves.
+ env -i LC_COLLATE=C sort -u ${DESTDIR}/METALOG > ${DESTDIR}/METALOG.sorted
+ mv ${DESTDIR}/METALOG.sorted ${DESTDIR}/METALOG
fi
- while read DIR; do
- metalog_add_data ${DIR}
- done < ${DESTDIR}/METALOG.missingdirs
-
- # Sort METALOG file; makefs produces directories with 000 permissions
- # if their contents are seen before the directories themselves.
- env -i LC_COLLATE=C sort -u ${DESTDIR}/METALOG > ${DESTDIR}/METALOG.sorted
- mv ${DESTDIR}/METALOG.sorted ${DESTDIR}/METALOG
case "${VMFS}" in
ufs)

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 12, 3:39 AM (7 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29562857
Default Alt Text
D53194.id164538.diff (3 KB)

Event Timeline