Module Name: src
Committed By: martin
Date: Wed Sep 5 12:01:52 UTC 2018
Modified Files:
src/usr.sbin/sysinst: Makefile.inc defs.h
Log Message:
Try to guess the proper directory on ftp or nyftp where the binary
sets for the current build will end up.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sysinst/Makefile.inc
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/sysinst/defs.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/sysinst/Makefile.inc
diff -u src/usr.sbin/sysinst/Makefile.inc:1.9 src/usr.sbin/sysinst/Makefile.inc:1.10
--- src/usr.sbin/sysinst/Makefile.inc:1.9 Wed Jun 8 02:00:40 2016
+++ src/usr.sbin/sysinst/Makefile.inc Wed Sep 5 12:01:52 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.9 2016/06/08 02:00:40 christos Exp $
+# $NetBSD: Makefile.inc,v 1.10 2018/09/05 12:01:52 martin Exp $
#
# Makefile for sysinst
@@ -43,12 +43,31 @@ LDADD= -lcurses -ltermlib -lutil
UNIF_AWK= ${.CURDIR}/../../unif.awk
MSG_XLAT_SH= ${.CURDIR}/../../msg_xlat.sh
+
CATALOGDIR= /usr/share/sysinst/catalog
CPPFLAGS+= -I. -I${.CURDIR}/../.. -I${.CURDIR} \
-DREL=\"${DISTRIBVER}\" -DMACH=\"${MACHINE}\" \
-DMACH_${MACHINE} -DARCH_${MACHINE_ARCH} \
${NODISKLABEL:D-DNO_DISKLABEL}
+.if (defined(BUILDID))
+COPTS+= -DBUILDID=\"${BUILDID}\"
+.endif
+.if defined(NETBSD_OFFICIAL_RELEASE) && ${NETBSD_OFFICIAL_RELEASE} == "yes"
+CPPFLAGS+= -DSYSINST_FTP_HOST=\"ftp.NetBSD.org\" -DNETBSD_OFFICIAL_RELEASE
+CPPFLAGS+= -DSYSINST_HTTP_HOST=\"cdn.NetBSD.org\" -DNETBSD_OFFICIAL_RELEASE
+.else
+CPPFLAGS+= -DSYSINST_FTP_HOST=\"nyftp.NetBSD.org\"
+CPPFLAGS+= -DSYSINST_HTTP_HOST=\"nycdn.NetBSD.org\"
+.if (${DISTRIBVER:M*.99.*})
+CPPFLAGS+= -DREL_PATH=\"HEAD\"
+.elif (${DISTRIBVER:M*.[0-9].[0-9]*})
+CPPFLAGS+= -DREL_PATH=\"netbsd-${DISTRIBVER:C/\.[0-9][_A-Z]*$//:S/./-/}\"
+.elif (${DISTRIBVER:M*.[0-9]*})
+CPPFLAGS+= -DREL_PATH=\"netbsd-${DISTRIBVER:C/\.[0-9][_A-Z]*$//}\"
+.endif
+.endif
+
.if !defined(DEBUG)
CPPFLAGS+= -DCATALOG_DIR=\"${CATALOGDIR}\"
.endif
Index: src/usr.sbin/sysinst/defs.h
diff -u src/usr.sbin/sysinst/defs.h:1.11 src/usr.sbin/sysinst/defs.h:1.12
--- src/usr.sbin/sysinst/defs.h:1.11 Sun Jun 3 13:16:30 2018
+++ src/usr.sbin/sysinst/defs.h Wed Sep 5 12:01:52 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.11 2018/06/03 13:16:30 martin Exp $ */
+/* $NetBSD: defs.h,v 1.12 2018/09/05 12:01:52 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -341,11 +341,17 @@ int clean_xfer_dir;
#endif
#if !defined(SYSINST_FTP_DIR)
+#if defined(NETBSD_OFFICIAL_RELEASE)
#define SYSINST_FTP_DIR "pub/NetBSD/NetBSD-" REL
+#elif defined(BUILDID) && defined(REL_PATH)
+#define SYSINST_FTP_DIR "pub/NetBSD-daily/" REL_PATH "/" BUILDID "Z"
+#else
+#define SYSINST_FTP_DIR "pub/NetBSD-daily/NetBSD-" REL
+#endif
#endif
#if !defined(SYSINST_PKG_HOST)
-#define SYSINST_PKG_HOST SYSINST_FTP_HOST
+#define SYSINST_PKG_HOST "pub/NetBSD/NetBSD-" REL
#endif
#if !defined(SYSINST_PKG_DIR)