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:   wiz
Date:           Mon May 13 08:08:16 UTC 2024

Modified Files:
        pkgsrc/mk/checksum: checksum.mk distinfo.awk

Log Message:
mk: pass list of files to checksum to checksum generator via file

Fixes 'make mdi' for www/grafana, which hit the shell command line
length limit.

Ok rillig@


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 pkgsrc/mk/checksum/checksum.mk
cvs rdiff -u -r1.5 -r1.6 pkgsrc/mk/checksum/distinfo.awk

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.26 pkgsrc/mk/checksum/checksum.mk:1.27
--- pkgsrc/mk/checksum/checksum.mk:1.26 Sun May  8 12:25:18 2022
+++ pkgsrc/mk/checksum/checksum.mk      Mon May 13 08:08:15 2024
@@ -1,4 +1,4 @@
-# $NetBSD: checksum.mk,v 1.26 2022/05/08 12:25:18 jperkin Exp $
+# $NetBSD: checksum.mk,v 1.27 2024/05/13 08:08:15 wiz Exp $
 #
 # See bsd.checksum.mk for helpful comments.
 #
@@ -68,9 +68,6 @@ _DISTINFO_ARGS_COMMON+=       ${_DIGEST_ALGORI
 _DISTINFO_ARGS_COMMON+=        ${_PATCH_DIGEST_ALGORITHMS:S/^/-p /}
 .endif
 
-.if defined(_CKSUMFILES) && !empty(_CKSUMFILES)
-_DISTINFO_ARGS_DISTSUM+=       ${_CKSUMFILES:S/^/-c /}
-.endif
 .if defined(_IGNOREFILES) && !empty(_IGNOREFILES)
 _DISTINFO_ARGS_DISTSUM+=       ${_IGNOREFILES:S/^/-i /}
 .endif
@@ -78,12 +75,16 @@ _DISTINFO_ARGS_DISTSUM+=    ${_IGNOREFILES:
 _DISTINFO_ARGS_PATCHSUM+=      ${PATCHDIR}/patch-*
 _DISTINFO_ARGS_PATCHSUM+=      ${PATCHDIR}/emul-*-patch-*
 
+_DISTINFO_INPUTFILE=           ${DISTINFO_FILE}.filelist
+
 distinfo:
+.for file in ${_CKSUMFILES}
+       @${ECHO} ${file} >> ${_DISTINFO_INPUTFILE}
+.endfor
        ${RUN}set -e;                                                   \
        newfile=${DISTINFO_FILE}.$$$$;                                  \
        if ${_DISTINFO_CMD} ${_DISTINFO_ARGS_COMMON}                    \
-               ${_DISTINFO_ARGS_DISTSUM}                               \
-               ${_DISTINFO_ARGS_PATCHSUM} > $$newfile;                 \
+               -I ${_DISTINFO_INPUTFILE} ${_DISTINFO_ARGS_PATCHSUM} > $$newfile;                               \
        then                                                            \
                ${RM} -f $$newfile;                                     \
                ${ECHO_MSG} "=> distinfo: unchanged.";                  \
@@ -91,6 +92,7 @@ distinfo:
                ${RM} -f ${DISTINFO_FILE};                              \
                ${MV} -f $$newfile ${DISTINFO_FILE};                    \
        fi
+       @rm ${_DISTINFO_INPUTFILE}
 
 makesum:
        ${RUN}set -e;                                                   \

Index: pkgsrc/mk/checksum/distinfo.awk
diff -u pkgsrc/mk/checksum/distinfo.awk:1.5 pkgsrc/mk/checksum/distinfo.awk:1.6
--- pkgsrc/mk/checksum/distinfo.awk:1.5 Wed Aug 22 20:48:36 2018
+++ pkgsrc/mk/checksum/distinfo.awk     Mon May 13 08:08:15 2024
@@ -1,6 +1,6 @@
 #!/usr/bin/awk -f
 #
-# $NetBSD: distinfo.awk,v 1.5 2018/08/22 20:48:36 maya Exp $
+# $NetBSD: distinfo.awk,v 1.6 2024/05/13 08:08:15 wiz Exp $
 #
 # Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -50,7 +50,7 @@
 #
 #      For example:
 #
-#      $NetBSD: distinfo.awk,v 1.5 2018/08/22 20:48:36 maya Exp $
+#      $NetBSD: distinfo.awk,v 1.6 2024/05/13 08:08:15 wiz Exp $
 #
 #      SHA1 (make-3.81.tar.gz) = cd4fa5a3184176492bf0799593a8f250a728210c
 #      RMD160 (make-3.81.tar.gz) = a713a72875cb9a29568677c98022465c6f55cbbf
@@ -89,6 +89,9 @@
 #                      contents of the existing distinfo file, or
 #                      non-zero otherwise.
 #
+#      -I input        Read the list of distfiles from 'input' instead
+#                      of the command line.
+#
 #      -i ignorefile   Generate distinfo information to ignore checksum
 #                      verification for ignorefile.  If this option is
 #                      given more than once, then generate information
@@ -218,6 +221,12 @@ function parse_options(            option) {
                } else if (option == "-f") {
                        distinfo = ARGV[ARGSTART + 1]
                        ARGSTART += 2
+               } else if (option == "-I") {
+                   while (getline < ARGV[ARGSTART + 1]) {
+                       distfiles[D++] = $0
+                       cksumfiles[$0] = 1
+                   }
+                   ARGSTART += 2
                } else if (option == "-i") {
                        distfiles[D++] = ARGV[ARGSTART + 1]
                        ignorefiles[ARGV[ARGSTART + 1]] = 1
@@ -231,7 +240,7 @@ function parse_options(             option) {
                } else if (match(option, /^-.*/) != 0) {
                        option = substr(option, RSTART + 1, RLENGTH)
                        print self ": unknown option -- " option > "/dev/stderr"
-                       print "usage: " self " -- [-a alg] [-c file] [-d distdir] [-f distinfo] [-i ignore] [-p alg] [patch ...]" > "/dev/stderr"
+                       print "usage: " self " -- [-a alg] [-c file] [-d distdir] [-f distinfo] [-I inputfile] [-i ignore] [-p alg] [patch ...]" > "/dev/stderr"
                        exit 1
                } else {
                        break



Home | Main Index | Thread Index | Old Index