summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1998-09-01 13:15:29 +0000
committeragc <agc@pkgsrc.org>1998-09-01 13:15:29 +0000
commit3f482566b32d82ee29e98e5ee0d6b7f1979f5f63 (patch)
treefe7293a6e3569e9487e525e6dfab2d94b0c82a33 /mk
parent9f03f9f205987c0b964a76f2cbd9ae8d8b6b9f93 (diff)
downloadpkgsrc-3f482566b32d82ee29e98e5ee0d6b7f1979f5f63.tar.gz
Amend the fetch: target, so that the distfile's integrity is checked
with the additional checksum only if FAILOVER_FETCH is set (this does not affect the checksum: target at all). Document FAILOVER_FETCH.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk132
-rw-r--r--mk/mk.conf.example18
2 files changed, 77 insertions, 73 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 8faf145e320..a62ce195eb9 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.153 1998/08/28 14:03:48 garbled Exp $
+# $NetBSD: bsd.pkg.mk,v 1.154 1998/09/01 13:15:29 agc Exp $
#
# This file is in the public domain.
#
@@ -762,70 +762,70 @@ describe:
.if !target(do-fetch)
do-fetch:
@${MKDIR} ${_DISTDIR}
- @(cd ${_DISTDIR}; \
- for file in ${_DISTFILES}; do \
- bfile=`${BASENAME} $$file`; \
- if [ ! -f $$file -a ! -f $$bfile ]; then \
- if [ -h $$file -o -h $$bfile ]; then \
+ @(cd ${_DISTDIR}; \
+ for file in ${_DISTFILES}; do \
+ bfile=`${BASENAME} $$file`; \
+ if [ ! -f $$file -a ! -f $$bfile ]; then \
+ if [ -h $$file -o -h $$bfile ]; then \
${ECHO_MSG} ">> ${_DISTDIR}/$$bfile is a broken symlink."; \
${ECHO_MSG} ">> Perhaps a filesystem (most likely a CD) isn't mounted?"; \
${ECHO_MSG} ">> Please correct this problem and try again."; \
- exit 1; \
- fi ; \
+ exit 1; \
+ fi ; \
${ECHO_MSG} ">> $$bfile doesn't seem to exist on this system."; \
- for site in ${MASTER_SITES}; do \
+ for site in ${MASTER_SITES}; do \
${ECHO_MSG} ">> Attempting to fetch $$bfile from $${site}."; \
if ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${bfile} ${FETCH_AFTER_ARGS}; then \
- if [ -f ${MD5_FILE} ]; then \
+ if [ "X${FAILOVER_FETCH}" != X"" -a -f ${MD5_FILE} ]; then \
CKSUM=`${MD5} < ${_DISTDIR}/$$bfile`; \
CKSUM2=`${AWK} '$$1 == "MD5" && $$2 == "\('$$file'\)"{print $$4;}' ${MD5_FILE}`; \
if [ "$$CKSUM" = "$$CKSUM2" -o "$$CKSUM2" = "IGNORE" ]; then \
- continue 2; \
- else \
+ continue 2; \
+ else \
${ECHO_MSG} ">> Checksum failure - trying next site."; \
- fi; \
- else \
- continue 2; \
- fi; \
- fi \
- done; \
+ fi; \
+ else \
+ continue 2; \
+ fi; \
+ fi \
+ done; \
${ECHO_MSG} ">> Couldn't fetch it - please try to retrieve this";\
- ${ECHO_MSG} ">> port manually into ${_DISTDIR} and try again."; \
- exit 1; \
- fi \
+ ${ECHO_MSG} ">> file manually into ${_DISTDIR} and try again."; \
+ exit 1; \
+ fi \
done)
.if defined(PATCHFILES)
- @(cd ${_DISTDIR}; \
- for file in ${_PATCHFILES}; do \
- bfile=`${BASENAME} $$file`; \
- if [ ! -f $$file -a ! -f $$bfile ]; then \
- if [ -h $$file -o -h $$bfile ]; then \
+ @(cd ${_DISTDIR}; \
+ for file in ${_PATCHFILES}; do \
+ bfile=`${BASENAME} $$file`; \
+ if [ ! -f $$file -a ! -f $$bfile ]; then \
+ if [ -h $$file -o -h $$bfile ]; then \
${ECHO_MSG} ">> ${_DISTDIR}/$$bfile is a broken symlink."; \
${ECHO_MSG} ">> Perhaps a filesystem (most likely a CD) isn't mounted?"; \
${ECHO_MSG} ">> Please correct this problem and try again."; \
- exit 1; \
- fi ; \
+ exit 1; \
+ fi ; \
${ECHO_MSG} ">> $$bfile doesn't seem to exist on this system."; \
- for site in ${PATCH_SITES}; do \
+ for site in ${PATCH_SITES}; do \
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
if ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${bfile} ${FETCH_AFTER_ARGS}; then \
- if [ -f ${MD5_FILE} ]; then \
+ if [ "X${FAILOVER_FETCH}" != X"" -a -f ${MD5_FILE} ]; then \
CKSUM=`${MD5} < ${_DISTDIR}/$$bfile`; \
CKSUM2=`${AWK} '$$1 == "MD5" && $$2 == "\('$$file'\)"{print $$4;}' ${MD5_FILE}`; \
if [ "$$CKSUM" = "$$CKSUM2" -o "$$CKSUM2" = "IGNORE" ]; then \
- continue 2; \
- else \
+ continue 2; \
+ else \
${ECHO_MSG} ">> Checksum failure - trying next site."; \
- fi; \
- else \
- continue 2; \
- fi; \
- fi \
- done; \
+ fi; \
+ else \
+ continue 2; \
+ fi; \
+ fi \
+ done; \
${ECHO_MSG} ">> Couldn't fetch it - please try to retrieve this";\
- ${ECHO_MSG} ">> port manually into ${_DISTDIR} and try again."; \
- exit 1; \
- fi \
+ ${ECHO_MSG} ">> file manually into ${_DISTDIR} and try again."; \
+ exit 1; \
+ fi \
done)
.endif
.endif
@@ -1662,34 +1662,28 @@ depends-list:
# i.e. contain OS version and arch name as subdirs
.if !target(binpkg-list)
binpkg-list:
- @cd ${PACKAGES}/../.. ; \
- for i in */* ; \
- do \
- f=$$i/${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ; \
- if [ -f $$f ]; then \
- echo $$i; \
- fi ; \
- done | awk ' \
- BEGIN \
- { \
- FS="/"; \
- } \
- { \
- rel=$$1 ; \
- arch=$$2 ; \
- if (arch != "m68k"){ \
- if (arch in f) \
- f[arch] = "%%BIN_PREREL%%" rel "/" arch "%%BIN_MEDREL%%" rel "%%BIN_POSTREL%%, " f[arch]; \
- else \
- f[arch] = "%%BIN_PREREL%%" rel "/" arch "%%BIN_MEDREL%%" rel "%%BIN_POSTREL%%"; \
- } \
- } \
- END \
- { \
- for (rel in f) { \
- print "%%BIN_PREARCH%%" rel "%%BIN_POSTARCH%% (NetBSD " f[rel] ")"; \
- } \
- } \
+ @cd ${PACKAGES}/../..; \
+ for i in */*; do \
+ if [ -f $$i/${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ]; then \
+ echo $$i; \
+ fi ; \
+ done | awk -F/ ' \
+ { \
+ rel=$$1; \
+ arch=$$2; \
+ if (arch != "m68k"){ \
+ if (arch in f) \
+ f[arch] = "%%BIN_PREREL%%" rel "/" arch "%%BIN_MEDREL%%" rel "%%BIN_POSTREL%%, " f[arch]; \
+ else \
+ f[arch] = "%%BIN_PREREL%%" rel "/" arch "%%BIN_MEDREL%%" rel "%%BIN_POSTREL%%"; \
+ } \
+ } \
+ END \
+ { \
+ for (rel in f) { \
+ print "%%BIN_PREARCH%%" rel "%%BIN_POSTARCH%% (NetBSD " f[rel] ")"; \
+ } \
+ } \
'
.endif
diff --git a/mk/mk.conf.example b/mk/mk.conf.example
index 57c7878cddd..6adf4109082 100644
--- a/mk/mk.conf.example
+++ b/mk/mk.conf.example
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf.example,v 1.24 1998/08/30 11:01:58 frueauf Exp $
+# $NetBSD: mk.conf.example,v 1.25 1998/09/01 13:15:29 agc Exp $
#
# Sample /etc/mk.conf file, which can be used to set specific values
# for building either NetBSD or some of the NetBSD packages collection.
@@ -38,7 +38,7 @@ MANZ= 1 # gzip manual pages at installation time
#PACKAGES= ${PKGSRCDIR}/packages/${MACHINE_ARCH}
# Store generated packages on a per-
# architecture base
- # Possible: any path you like :)
+ # Possible: any path you like
# Default: /usr/pkgsrc/packages
#OBJMACHINE= 1 # use machine-specific object directories,
@@ -56,18 +56,28 @@ MANZ= 1 # gzip manual pages at installation time
#PASSIVE_FETCH= 1 # Use ftp(1) in passive mode, for use behind
# filtering firewalls.
+ # (Set by default in ftp(1) in NetBSD-current)
# Possible: defined, not defined
# Default: not defined
-#ACCEPTABLE_LICENSES= shareware non-commercial-use
+#ACCEPTABLE_LICENSES= shareware no-commercial-use
# Whitespace-delimited list of the types of
# license which are acceptable for installation.
# (apart from standard "free" licenses such as
# Berkeley/CMU and GPL).
- # Possible: shareware, non-commercial-use
+ # Possible: shareware, no-commercial-use
#
# Default: none
+#FAILOVER_FETCH= yes # Perform a checksum at "make fetch" time.
+ # If the checksum doesn't match the stored
+ # value, try to retrieve the file from the
+ # next site in the list
+ # Possible: set, not set
+ # Default: not set
+
+
+
#
# Definitions used only in the packages collection