From owner-svn-src-all@freebsd.org Mon Apr 27 21:39:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 844F72C6D8C; Mon, 27 Apr 2020 21:39:02 +0000 (UTC) (envelope-from kevans@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 499ypG30SMz3D7s; Mon, 27 Apr 2020 21:39:02 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 623011944E; Mon, 27 Apr 2020 21:39:02 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03RLd2LR094358; Mon, 27 Apr 2020 21:39:02 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03RLd2hQ094357; Mon, 27 Apr 2020 21:39:02 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004272139.03RLd2hQ094357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 27 Apr 2020 21:39:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360394 - in stable: 11/usr.sbin/freebsd-update 12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/usr.sbin/freebsd-update 12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 360394 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2020 21:39:02 -0000 Author: kevans Date: Mon Apr 27 21:39:01 2020 New Revision: 360394 URL: https://svnweb.freebsd.org/changeset/base/360394 Log: MFC r360287: freebsd-update: rehash certs With the inclusion of caroot bits, we'll need to also rehash on update as we do in mergemaster/etcupdate. If certctl's installed on the system, just unconditionally rehash. This isn't an expensive operation, and we can refine it to compare INDEX-{OLD,NEW} later if we really want to. Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Mon Apr 27 21:19:46 2020 (r360393) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Mon Apr 27 21:39:01 2020 (r360394) @@ -2876,7 +2876,7 @@ install_delete () { rm newfiles killfiles } -# Install new files, delete old files, and update linker.hints +# Install new files, delete old files, and update generated files install_files () { # If we haven't already dealt with the kernel, deal with it. if ! [ -f $1/kerneldone ]; then @@ -2943,6 +2943,11 @@ Kernel updates have been installed. Please reboot and grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 + + # Rehash certs if we actually have certctl installed. + if which certctl>/dev/null; then + env DESTDIR=${BASEDIR} certctl rehash + fi # Rebuild generated pwd files. if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] ||