ports/74709: Make ports index fetchable from mirrors

Valentin Nechayev netch at netch.kiev.ua
Sun Dec 5 08:00:49 UTC 2004


>Number:         74709
>Category:       ports
>Synopsis:       Make ports index fetchable from mirrors
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 05 08:00:47 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Valentin Nechayev
>Release:        FreeBSD *any*
>Organization:
private
>Environment:

>Description:

It isn't reasonable to nail index source only to one central server. Along
with distfiles, distributions, etc., it is good candidate for mirroring.
I'll be very first to mirror it when changed.
Even a once-per-day mirroring is useful for it; one per hour (as at ftp2.ua)
is more so.

>How-To-Repeat:

>Fix:

--- ports/Makefile.0	Sat Dec  4 21:18:22 2004
+++ ports/Makefile	Sat Dec  4 21:19:43 2004
@@ -70,8 +70,9 @@
 	@cd ${.CURDIR} && make ${.CURDIR}/${INDEXFILE}
 
 fetchindex:
-	@cd ${.CURDIR} && ${FETCHINDEX} http://www.FreeBSD.org/ports/${INDEXFILE}.bz2 && bunzip2 -f ${INDEXFILE}.bz2 && chmod a+r ${INDEXFILE}
+	@cd ${.CURDIR} && ${FETCHINDEX} ${MASTER_SITE_INDEX}/${INDEXFILE}.bz2 && bunzip2 -f ${INDEXFILE}.bz2 && chmod a+r ${INDEXFILE}
 
+MASTER_SITE_INDEX?=	http://www.FreeBSD.org/ports/
 FETCHINDEX?=	fetch -am
 INDEX_JOBS?=	2
 
Patch for ports.7 to document this variable and some others (based on
5.3-release):

--- src/share/man/man7/ports.7.0	Sun Dec  5 09:40:31 2004
+++ src/share/man/man7/ports.7	Sun Dec  5 09:51:48 2004
@@ -380,6 +380,20 @@
 site for all files.
 .It Va MASTER_SITE_OVERRIDE
 Try going to these sites for all files and patches, first.
+.It Va MASTER_SITE_BACKUP
+Try going to these sites for all files and patches, last.
+.It Va MASTER_SITE_INDEX
+Where to get
+.Pa INDEX
+source built on FreeBSD cluster (for
+.Cm fetchindex
+target). Defaults to
+.Pa http://www.freebsd.org/ports/
+.It Va FETCHINDEX
+Command to get INDEX (for
+.Cm fetchindex
+target). Defaults to
+.Pa fetch -am .
 .It Va NOCLEANDEPENDS
 If defined, do not let
 .Cm clean
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list