From owner-svn-src-user@freebsd.org Sat May 25 15:56:56 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FE7F15AF936 for ; Sat, 25 May 2019 15:56:56 +0000 (UTC) (envelope-from gordon@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 B5DE274EDF; Sat, 25 May 2019 15:56:55 +0000 (UTC) (envelope-from gordon@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 8FE0567C8; Sat, 25 May 2019 15:56:55 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4PFutCJ024347; Sat, 25 May 2019 15:56:55 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4PFut5F024346; Sat, 25 May 2019 15:56:55 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201905251556.x4PFut5F024346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Sat, 25 May 2019 15:56:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348272 - user/cperciva/freebsd-update-build/scripts X-SVN-Group: user X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: user/cperciva/freebsd-update-build/scripts X-SVN-Commit-Revision: 348272 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B5DE274EDF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 15:56:56 -0000 Author: gordon Date: Sat May 25 15:56:55 2019 New Revision: 348272 URL: https://svnweb.freebsd.org/changeset/base/348272 Log: Switch logic in indexfiles to always remove the uarch flag. On UFS filesystems, this is unneeded. On ZFS filesystems, the uarch flag is automatically set on file creation (and maybe update?). This is causing a lot of churn in the freebsd-update cycle where discrepancies in the uarch flag makes the system think a lot of metadata need to be corrected. Modified: user/cperciva/freebsd-update-build/scripts/build.subr Modified: user/cperciva/freebsd-update-build/scripts/build.subr ============================================================================== --- user/cperciva/freebsd-update-build/scripts/build.subr Sat May 25 11:27:56 2019 (r348271) +++ user/cperciva/freebsd-update-build/scripts/build.subr Sat May 25 15:56:55 2019 (r348272) @@ -580,17 +580,25 @@ indexfiles () { ( cd ${WORKDIR}/$1/R && find trees -mindepth 2 | grep -vE '/obj$' | while read F; do + eval $(stat -s ${F}) + # Remove the uarch flag as that is problematic + st_flags=$(($st_flags & ~04000)) + st_mode_mid=$(( ($st_mode & 07000) >> 9)) + st_mode_low=$(($st_mode & 0777)) if [ -L ${F} ]; then echo -n "${F}|L|" - stat -n -f '%i|%u|%g|%Mp%Lp|%Of|' ${F}; + printf "%u|%u|%u|%o%o|%o|" $st_ino $st_uid \ + $st_gid $st_mode_mid $st_mode_low $st_flags readlink ${F}; elif [ -f ${F} ]; then echo -n "${F}|f|" - stat -n -f '%i|%u|%g|%Mp%Lp|%Of|' ${F}; + printf "%u|%u|%u|%o%o|%o|" $st_ino $st_uid \ + $st_gid $st_mode_mid $st_mode_low $st_flags sha256 -q ${F}; elif [ -d ${F} ]; then echo -n "${F}|d|" - stat -f '%i|%u|%g|%Mp%Lp|%Of|' ${F}; + printf "%u|%u|%u|%o%o|%o|\n" $st_ino $st_uid \ + $st_gid $st_mode_mid $st_mode_low $st_flags else echo "Unknown file type: ${F}" \ >/dev/stderr