From nobody Mon Jun 17 18:38:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2zCY6CQ8z5PP1W; Mon, 17 Jun 2024 18:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2zCY5j3Bz4G2H; Mon, 17 Jun 2024 18:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718649481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=APV12tUMci5LVeRtrXibVczcYgrjClc0l+z/SgAHtS8=; b=MUZmJGRFBSH/0Xo+JX5XbQXlvGHURBRE+Z0++RZ/LO3mIOsxVYomW3nX56b8iy1et1L1Hh Mw8QPlLIFqy+nqcYqsv4IjVYSy0aNqKzQZnPZjV1XWRD0MVITO09FLhTxUNHCX/+Ml6oke 4gp48dwRWfB4TPO3UJ6ZNKpor4it+OwFuoahXobVNVMg5ER+wo/E5BzSqhh0+wReQL+lOx Ioib0Pz8291Sg/n91nTdc2qhR0RvtBhual9qP7Oe/+sQ9HeTx42SjT8dT4AlVUjGm8nYqq VemdyQMvbr0iiz2Yy6vQ6xWDZZRt4yErL4Q/bpFQJnygzaA3F6NenISmdLObpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718649481; a=rsa-sha256; cv=none; b=ebe17/8k0VrH9bGUbTT/pDj2rNDAK1Tibc0zJ52zPFn8QbcPq9u2LZtrqCUVGPX77nbirx CsraZJS4e36akOsho9en0fD7bGi0KZKPLGYqozaoofG4/hCOiHdvAFL6lN7E3ocIh79unx mrB2E8iNbFoAxReKBGtRUksGAY5JtRSAsQq/FZIItqmrmBcuw8pf0ZxdbiB2UHgMRVoTMK 5YyyfH6V6NfrNjSDDfyjxr9SD/g65IAZ0mlVv7DY5sdjhVspzGkzoL3Brg9BjnTq6R8nwg CRDlTzqfJyK36NmBVMqiDfvF3+pMCfk8lx//mR5YgtytHXGcLL1XxI8AfDVP+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718649481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=APV12tUMci5LVeRtrXibVczcYgrjClc0l+z/SgAHtS8=; b=MzhbhGhTMw1b89adYhRN1c0Y658Nw9aUbRT94j+P1mQkz28ee8MDv5bT47k7Hb7N8JPfq5 0h5OSIniieoRFwgWFcD77MG78hi01lSlzTg8ohuzXBrN3A3Yh61umkY/pIl6yG7KtbeoMe cUOAmzr8cvowvaxT2yFo93iWaX2wvQiJBDO/Dj2gpM3BeFM4TWj3aNXgg25sbQhZnVrpsh Hjxm5Rwedqw9xEfOVcAdfm5SfgUGFvSaxBkvTZF80gFWkJbjqWRf8SjC7KTJjSPc9d1QZX hLkd2L3y0vWrYWD9OUvyjH2q9WMH/JFvUCuWf7AyJxShFO/kwlk5dlulDKpe4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2zCY50gZzQny; Mon, 17 Jun 2024 18:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45HIc1pK009950; Mon, 17 Jun 2024 18:38:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45HIc1ZL009947; Mon, 17 Jun 2024 18:38:01 GMT (envelope-from git) Date: Mon, 17 Jun 2024 18:38:01 GMT Message-Id: <202406171838.45HIc1ZL009947@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 2d6094615a13 - main - release: Remove mergemaster mm-mtree.sh script List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d6094615a137d9d4fc0ea0b29132d4a7e358eb5 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2d6094615a137d9d4fc0ea0b29132d4a7e358eb5 commit 2d6094615a137d9d4fc0ea0b29132d4a7e358eb5 Author: Ed Maste AuthorDate: 2023-09-09 16:14:58 +0000 Commit: Ed Maste CommitDate: 2024-06-17 18:37:46 +0000 release: Remove mergemaster mm-mtree.sh script It is unused after 8ee478dfd46d ("release: stop generating mergemaster databases"). Sponsored by: The FreeBSD Foundation --- release/scripts/mm-mtree.sh | 152 -------------------------------------------- 1 file changed, 152 deletions(-) diff --git a/release/scripts/mm-mtree.sh b/release/scripts/mm-mtree.sh deleted file mode 100755 index 7ba7d0c9694a..000000000000 --- a/release/scripts/mm-mtree.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/bin/sh - -# mergemaster mtree database generator - -# This script is intended to be used as part of the release building -# process to generate the /var/db/mergemaster.mtree file relevant to -# the source tree used to create the release so that users can make -# use of mergemaster's -U option to update their files after updating -# to -stable. - -# Copyright 2009 Douglas Barton -# dougb@FreeBSD.org - -PATH=/bin:/usr/bin:/usr/sbin - -display_usage () { - VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4` - echo "${0##*/} version ${VERSION_NUMBER}" - echo "Usage: ${0##*/} [-m /path] [-t /path] [-A arch] [-F ] [-D /path]" - echo "Options:" - echo " -m /path/directory Specify location of source to do the make in" - echo " -t /path/directory Specify temp root directory" - echo " -A architecture Alternative architecture name to pass to make" - echo " -F Specify what to put on the make command line" - echo ' -D /path/directory Specify the destination directory to install files to' - echo '' -} - -# Set the default path for the temporary root environment -# -TEMPROOT=`TMPDIR=/var/tmp mktemp -d -t temproot` - -# Assign the location of the mtree database -# -MTREEDB=${MTREEDB:-/var/db} -MTREEFILE="${MTREEDB}/mergemaster.mtree" - -# Check the command line options -# -while getopts "m:t:A:F:D:h" COMMAND_LINE_ARGUMENT ; do - case "${COMMAND_LINE_ARGUMENT}" in - m) - SOURCEDIR=${OPTARG} - ;; - t) - TEMPROOT=${OPTARG} - ;; - A) - ARCHSTRING='TARGET_ARCH='${OPTARG} - ;; - F) - MM_MAKE_ARGS="${OPTARG}" - ;; - D) - DESTDIR=${OPTARG} - ;; - h) - display_usage - exit 0 - ;; - *) - echo '' - display_usage - exit 1 - ;; - esac -done - -# Assign the source directory -# -SOURCEDIR=${SOURCEDIR:-/usr/src} -if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a \ - -f ${SOURCEDIR}/../Makefile.inc1 ]; then - echo " *** The source directory you specified (${SOURCEDIR})" - echo " will be reset to ${SOURCEDIR}/.." - echo '' - sleep 3 - SOURCEDIR=${SOURCEDIR}/.. -fi - -# Setup make to use system files from SOURCEDIR -MM_MAKE="make ${ARCHSTRING} ${MM_MAKE_ARGS} -m ${SOURCEDIR}/share/mk -DDB_FROM_SRC" - -delete_temproot () { - rm -rf "${TEMPROOT}" 2>/dev/null - chflags -R 0 "${TEMPROOT}" 2>/dev/null - rm -rf "${TEMPROOT}" || exit 1 -} - -[ -d "${TEMPROOT}" ] && delete_temproot - -echo "*** Creating the temporary root environment in ${TEMPROOT}" - -if mkdir -p "${TEMPROOT}"; then - echo " *** ${TEMPROOT} ready for use" -fi - -if [ ! -d "${TEMPROOT}" ]; then - echo '' - echo " *** FATAL ERROR: Cannot create ${TEMPROOT}" - echo '' - exit 1 -fi - -echo " *** Creating and populating directory structure in ${TEMPROOT}" -echo '' - -{ cd ${SOURCEDIR} || { echo "*** Cannot cd to ${SOURCEDIR}" ; exit 1;} - case "${DESTDIR}" in - '') ;; - *) - ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs - ;; - esac - ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs && - ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc && - ${MM_MAKE} everything SUBDIR_OVERRIDE=etc && - ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || - { echo ''; - echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; - echo " the temproot environment"; - echo ''; - exit 1;} - -# We really don't want to have to deal with files like login.conf.db, pwd.db, -# or spwd.db. Instead, we want to compare the text versions, and run *_mkdb. -# Prompt the user to do so below, as needed. -# -rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd - -# We only need to compare things like freebsd.cf once -find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null - -# Delete stuff we do not need to keep the mtree database small, -# and to make the actual comparison faster. -find ${TEMPROOT}/usr -type l -delete 2>/dev/null -find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null -find -d ${TEMPROOT} -type d -empty -delete 2>/dev/null - -# Build the mtree database in a temporary location. -MTREENEW=`mktemp -t mergemaster.mtree` -mtree -nci -p ${TEMPROOT} -k size,md5digest > ${MTREENEW} 2>/dev/null - -if [ -s "${MTREENEW}" ]; then - echo "*** Saving mtree database for future upgrades" - test -e "${DESTDIR}${MTREEFILE}" && unlink ${DESTDIR}${MTREEFILE} - mv ${MTREENEW} ${DESTDIR}${MTREEFILE} -fi - -delete_temproot - -exit 0