Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Try to guess the proper directory on ftp or...
details: https://anonhg.NetBSD.org/src/rev/5564c32efafa
branches: trunk
changeset: 835721:5564c32efafa
user: martin <martin%NetBSD.org@localhost>
date: Wed Sep 05 12:01:52 2018 +0000
description:
Try to guess the proper directory on ftp or nyftp where the binary
sets for the current build will end up.
diffstat:
usr.sbin/sysinst/Makefile.inc | 21 ++++++++++++++++++++-
usr.sbin/sysinst/defs.h | 10 ++++++++--
2 files changed, 28 insertions(+), 3 deletions(-)
diffs (69 lines):
diff -r 5935b86ebecd -r 5564c32efafa usr.sbin/sysinst/Makefile.inc
--- a/usr.sbin/sysinst/Makefile.inc Wed Sep 05 10:38:29 2018 +0000
+++ b/usr.sbin/sysinst/Makefile.inc Wed Sep 05 12:01:52 2018 +0000
@@ -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 @@
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
diff -r 5935b86ebecd -r 5564c32efafa usr.sbin/sysinst/defs.h
--- a/usr.sbin/sysinst/defs.h Wed Sep 05 10:38:29 2018 +0000
+++ b/usr.sbin/sysinst/defs.h Wed Sep 05 12:01:52 2018 +0000
@@ -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 @@
#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)
Home |
Main Index |
Thread Index |
Old Index