From owner-svn-ports-all@freebsd.org Wed Jun 10 04:22:33 2020 Return-Path: Delivered-To: svn-ports-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 409913479E5; Wed, 10 Jun 2020 04:22:33 +0000 (UTC) (envelope-from lwhsu@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49hYk11111z4cvY; Wed, 10 Jun 2020 04:22:33 +0000 (UTC) (envelope-from lwhsu@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 04F402112E; Wed, 10 Jun 2020 04:22:33 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05A4MWnn044379; Wed, 10 Jun 2020 04:22:32 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05A4MWIS044377; Wed, 10 Jun 2020 04:22:32 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202006100422.05A4MWIS044377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 10 Jun 2020 04:22:32 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r538369 - in head/sysutils/firstboot-pkgs: . files X-SVN-Group: ports-head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: in head/sysutils/firstboot-pkgs: . files X-SVN-Commit-Revision: 538369 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2020 04:22:33 -0000 Author: lwhsu Date: Wed Jun 10 04:22:32 2020 New Revision: 538369 URL: https://svnweb.freebsd.org/changeset/ports/538369 Log: sysutils/firstboot-pkgs: Bootstrap and update pkg unconditionally The background of this patch is available at: https://lists.freebsd.org/pipermail/freebsd-cloud/2020-April/000234.html Even a `pkg -N` success, the following `pkg install` may still fail because of the repository version doesn't match between client and server. Therefore, unconditionally bootstrap and update pkg at firstboot to ensure pkg and local metadata are update-to-date. Approved by: cperciva (maintainer) MFH: 2020Q2 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24517 Modified: head/sysutils/firstboot-pkgs/Makefile head/sysutils/firstboot-pkgs/files/firstboot_pkgs.in Modified: head/sysutils/firstboot-pkgs/Makefile ============================================================================== --- head/sysutils/firstboot-pkgs/Makefile Wed Jun 10 04:07:19 2020 (r538368) +++ head/sysutils/firstboot-pkgs/Makefile Wed Jun 10 04:22:32 2020 (r538369) @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= firstboot-pkgs -PORTVERSION= 1.5 +PORTVERSION= 1.6 CATEGORIES= sysutils MASTER_SITES= # none DISTFILES= # none Modified: head/sysutils/firstboot-pkgs/files/firstboot_pkgs.in ============================================================================== --- head/sysutils/firstboot-pkgs/files/firstboot_pkgs.in Wed Jun 10 04:07:19 2020 (r538368) +++ head/sysutils/firstboot-pkgs/files/firstboot_pkgs.in Wed Jun 10 04:22:32 2020 (r538369) @@ -30,11 +30,9 @@ firstboot_pkgs_run() # Count rc.d scripts nscriptso=`ls /usr/local/etc/rc.d | wc -l` - # Bootstrap if necessary - if ! pkg -N 2>/dev/null; then - env ASSUME_ALWAYS_YES=YES pkg bootstrap | - cat - fi + # Bootstrap and update pkg to ensure synchronization with the repository + env ASSUME_ALWAYS_YES=YES pkg bootstrap -f | cat + env ASSUME_ALWAYS_YES=YES pkg update -f | cat # Install requested packages, if any for package in ${firstboot_pkgs_list}; do