git: a7abf88b4783 - stable/14 - Don't package /var/db/locate.database

From: Matthew Seaman <matthew_at_FreeBSD.org>
Date: Tue, 04 Jun 2024 05:00:57 UTC
The branch stable/14 has been updated by matthew:

URL: https://cgit.FreeBSD.org/src/commit/?id=a7abf88b478302fe1e30a1e70cf0f5c01bc58288

commit a7abf88b478302fe1e30a1e70cf0f5c01bc58288
Author:     Matthew Seaman <matthew@FreeBSD.org>
AuthorDate: 2024-05-27 08:14:15 +0000
Commit:     Matthew Seaman <matthew@FreeBSD.org>
CommitDate: 2024-06-04 05:00:44 +0000

    Don't package /var/db/locate.database
    
    ... or install an empty file.
    
    The locate database is a mutable working file, and unsuitable to be
    managed by pkg(8).  locate(1) copes gracefully with the absence of
    this file.  Running /etc/periodic/weekly/310.locate will create the
    locate database with the correct ownership and permissions.
    
    Having the locate.database file as part of the FreeBSD-runtime package
    means it gets zeroed if ever that package gets updated, which is
    excessive, given that updating packages will typically only change a
    relatively small number of the _filenames_ on the system -- unlike the
    file contents.  Plus it always causes it to flag as modified when
    verifying checksums, but /var/db/locate.database is expected to be
    modified by the user.
    
    MFC after:      1 week
    Reviewed by:    manu
    Differential Revision:  https://reviews.freebsd.org/D45384
    
    (cherry picked from commit 4354163e5fe8e180f62b892cdc3e51e3d7e4706f)
---
 etc/Makefile | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/etc/Makefile b/etc/Makefile
index ddef82f64510..bd6d692e5316 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -88,10 +88,6 @@ distribution:
 .if ${MK_SENDMAIL} != "no"
 	cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
 		-T "package=sendmail" ${ETCMAIL_SENDMAIL} ${DESTDIR}/etc/mail
-.endif
-.if ${MK_LOCATE} != "no"
-	${INSTALL} -o nobody -g ${BINGRP} -m 644 -T "package=runtime"\
-	    /dev/null ${DESTDIR}/var/db/locate.database
 .endif
 	cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		-T "package=runtime" ${FREEBSD} ${DESTDIR}/