svn commit: r348272 - user/cperciva/freebsd-update-build/scripts
Gordon Tetlow
gordon at FreeBSD.org
Sat May 25 15:56:56 UTC 2019
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
More information about the svn-src-user
mailing list