pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk/checksum
Module Name: pkgsrc
Committed By: jperkin
Date: Fri Oct 11 11:20:23 UTC 2024
Modified Files:
pkgsrc/mk/checksum: checksum.mk
Log Message:
mk: Add mktool support to checksum.
mktool is an optional external tool, available from pkgtools/mktool or
"cargo install mktool", that provides significant performance improvements
compared to checksum.awk, while being 100% compatible.
After installing, set TOOLS_PLATFORM.mktool=/path/to/mktool to enable it.
Comparing the time taken to run "bmake checksum" on a SmartOS host inside
www/grafana, checksum.awk takes:
real 0m9.808s
user 0m9.377s
sys 0m1.061s
while mktool (with 12 threads) takes:
real 0m2.414s
user 0m6.812s
sys 0m3.012s
Given that I'd already improved checksum performance by 200x a few years ago
the mktool improvement is less impressive here, but still significant, and
will continue to grow over time as the number of distfiles increases.
To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 pkgsrc/mk/checksum/checksum.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mk/checksum/checksum.mk
diff -u pkgsrc/mk/checksum/checksum.mk:1.30 pkgsrc/mk/checksum/checksum.mk:1.31
--- pkgsrc/mk/checksum/checksum.mk:1.30 Wed May 15 08:31:35 2024
+++ pkgsrc/mk/checksum/checksum.mk Fri Oct 11 11:20:23 2024
@@ -1,4 +1,4 @@
-# $NetBSD: checksum.mk,v 1.30 2024/05/15 08:31:35 wiz Exp $
+# $NetBSD: checksum.mk,v 1.31 2024/10/11 11:20:23 jperkin Exp $
#
# See bsd.checksum.mk for helpful comments.
#
@@ -25,11 +25,14 @@ _PATCH_DIGEST_ALGORITHMS?= SHA1
#
_COOKIE.checksum= ${_COOKIE.extract}
+.if !empty(TOOLS_PLATFORM.mktool)
+_CHECKSUM_CMD= ${TOOLS_PLATFORM.mktool} checksum
+.else
_CHECKSUM_CMD= \
${PKGSRC_SETENV} \
DIGEST=${TOOLS_DIGEST:Q} SED=${TOOLS_CMDLINE_SED:Q} \
${AWK} -f ${PKGSRCDIR}/mk/checksum/checksum.awk --
-
+.endif
.if defined(NO_CHECKSUM) || empty(_CKSUMFILES)
checksum checksum-phase:
Home |
Main Index |
Thread Index |
Old Index