Commit graph

10 commits

Author SHA1 Message Date
Warner Losh 6ef644f588 Remove $FreeBSD$: one-line lua tag
Remove /^--\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:34 -06:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Ed Maste 0e04dd3b66 pkgbase: report error if files are installed multiple times
Files installed by `make installworld` should be installed only once.

PR:		244596
Sponsored by:	The FreeBSD Foundation
2023-05-09 21:10:03 -04:00
Ed Maste 2a3bd08708 pkgbase: hide duplicate METALOG directory warnings under verbose
Creating directories multiple times is an inherent side effect of the
way installation is done.  Hide warnings from duplicate directory
entries (with identical metadata) under metalog_reader's verbose mode.

Duplicate file entries are always reported.  They currently generate
warnings but will be switched to errors once the few instances currently
in the tree are fixed.

PR:		244596, 271178
Reviewed by:	kevans
Sponsored By:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39898
2023-05-01 15:22:36 -04:00
Ed Maste f93d92f43d pkgbase: report errors via metalog reader exit status
Reviewed by:	kevans
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37482
2022-11-25 09:13:31 -05:00
Ed Maste 1f3b4f38a6 Update pkgbase metalog tool README to match installed filename
The pkgbase metalog tool is named metalog_reader.lua.  (One may argue
that a better name could be chosen, but the README should match in any
case.)

Sponsored by:	The FreeBSD Foundation
2022-11-18 15:11:52 -05:00
Ed Maste b751fc75bb pkgbase: report type for duplicated METALOG entries
Duplicate METALOG file entries are more of a concern than duplicate
directories.  The metalog check tool previously did not include the
entry type in the warnings, making it hard to find the ones of concern.

Sponsored by:	The FreeBSD Foundation
2022-11-17 10:28:06 -05:00
Ed Maste bca4d27052 pkgbase: examine METALOG files relative to stage root directory
Previously we stripped the '.' from the beginning of each METALOG entry
to determine the path to stat.  This meant that we examined files on the
build host, not the staged files.

Instead, strip off the last part of the specified METALOG pathname to
find the stage root directory, and stat files relative to that.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37412
2022-11-17 08:52:12 -05:00
Gordon Bergling eec4f5c034 pkgbase: Fix a typo in a source code comment
- s/begining/beginning/

MFC after:	3 days
2022-03-28 19:33:25 +02:00
Ed Maste 060a805b2f Add pkgbase METALOG parse/check tool
`metalog.lua` is a script that reads METALOG file created by pkgbase
(make packages) and generates reports about the installed system
and issues.

This was developed as part of Yang's W2020 University of Waterloo co-
operative education term with the FreeBSD Foundation.  kevans provided
some initial review; we will iterate on it in the tree.

Submitted by:	Yang Wang <2333@outlook.jp>
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24563
2020-05-10 16:11:19 +00:00