From tom@eborcom.com  Mon Feb 15 00:43:47 1999
Received: from mail10.svr.pol.co.uk (mail10.svr.pol.co.uk [195.92.193.214])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA27904
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Feb 1999 00:43:46 -0800 (PST)
          (envelope-from tom@eborcom.com)
Received: from modem-78.carafate.dialup.pol.co.uk ([62.136.56.206])
	by mail10.svr.pol.co.uk with esmtp (Exim 2.10 #1)
	id 10CJd0-0002Ny-00
	for FreeBSD-gnats-submit@freebsd.org; Mon, 15 Feb 1999 08:43:43 +0000
Received: (qmail 3015 invoked by uid 5000); 14 Feb 1999 18:12:51 -0000
Message-Id: <19990214181251.3014.qmail@eborcom.com>
Date: 14 Feb 1999 18:12:51 -0000
From: Tom Hukins <tom@eborcom.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Building the Web site without a local CVS repository
X-Send-Pr-Version: 3.2

>Number:         10099
>Category:       docs
>Synopsis:       Enables building FreeBSD Web site without local CVS repository
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 15 00:50:01 PST 1999
>Closed-Date:    Thu Apr 8 14:44:54 PDT 1999
>Last-Modified:  Thu Apr  8 14:51:18 PDT 1999
>Originator:     Tom Hukins
>Release:        FreeBSD 2.2.8-STABLE i386
>Organization:
eBORcOM
>Environment:

No local CVS repository on the machine, but a recent copy of the
ports tree, retrieved by CVSup. Also, the www tree used to build the
FreeBSD Web site.

>Description:

The build process for the FreeBSD Web site relies on a copy of the
CVS repository. However, the data extracted will also be present on
machines which use CVSup to collect the ports tree.

I have added a NOCVS variable, which tries to build the Web site
from other data if the CVS tree is not present. The patch below
allows the English version of the Web site to be built without a CVS
repository. Similar patches could be applied to other langauges'
build processes.

I cannot think of any negative side-effects introduced with this
change. It will allow people to build a copy of the Web site with
stale information from /usr/ports, but this is already possible if a
stale CVS repository is used.

>How-To-Repeat:

	

>Fix:
	
--- en/copyright/Makefile.orig	Sat Oct 17 11:18:42 1998
+++ en/copyright/Makefile	Sun Feb 14 18:00:47 1999
@@ -16,7 +16,12 @@
 # FreeBSD Ports redistribution restrictions
 LEGAL= LEGAL
 CLEANFILES+= ${LEGAL}
+.if defined(NOCVS)
+${LEGAL}: $${PORTSBASE}/ports/LEGAL
+	cp ${PORTSBASE}/ports/LEGAL LEGAL
+.else
 ${LEGAL}: $${CVSROOT}/ports/LEGAL,v
 	co -q -p ${.ALLSRC} > ${.TARGET}
+.endif
 
 .include "../web.mk"
--- en/ports/Makefile.orig	Wed Sep  2 20:07:44 1998
+++ en/ports/Makefile	Sun Feb 14 18:01:10 1999
@@ -18,14 +18,23 @@
 cvsindex= $${CVSROOT}/${PINDEX},v
 _ALLINSTALL= packages.exists ${INDEX}
 
+.if defined(NOCVS)
+${INDEX}: $${PORTSBASE}/${PINDEX}
+	cp ${PORTSBASE}/${PINDEX} ${INDEX}
+.else
 ${INDEX}: ${cvsindex}
 	cvs -QR co -p ${PINDEX} > ${INDEX}
+.endif
 
 # build the list of available packages only on the 
 # main FreeBSD machines
 hostname!= hostname
 
+.if defined(NOCVS)
+packages.exists:
+.else
 packages.exists: ${cvsindex}
+.endif
 .if ${hostname} == "hub.freebsd.org" || ${hostname} == "freefall.freebsd.org"
 	sh ${.CURDIR}/packages > ${.TARGET}
 .else
--- en/web.mk.orig	Sun Oct  4 14:25:30 1998
+++ en/web.mk	Sun Feb 14 17:55:21 1999
@@ -43,6 +43,11 @@
 
 COPY=	-C
 
+#
+# Where the ports live, if CVS isn't used (ie. NOCVS is defined)
+#
+PORTSBASE?=	/usr
+
 ##################################################################
 # Transformation rules
 
>Release-Note:
>Audit-Trail:

From: Wolfram Schneider <wosch@panke.de.freebsd.org>
To: Tom Hukins <tom@eborcom.com>, FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  
Subject: Re: docs/10099: Building the Web site without a local CVS repository
Date: Tue, 2 Mar 1999 23:00:58 +0100

 On 1999-02-14 18:12:51 -0000, Tom Hukins wrote:
 > Enables building FreeBSD Web site without local CVS repository
 
 Good idea! The patch looks good, but I did not had the time 
 for a real test.
 
 Wolfram
 
 -- 
 Wolfram Schneider <wosch@freebsd.org> http://wolfram.schneider.org
 

From: Tom Hukins <tom@eborcom.com>
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  
Subject: Re: docs/10099: Building the Web site without a local CVS repository
Date: Tue, 6 Apr 1999 17:41:29 +0100

 On Sun, Feb 14, 1999 at 06:12:51PM -0000, I wrote:
 > 
 > The build process for the FreeBSD Web site relies on a copy of the
 > CVS repository. However, the data extracted will also be present on
 > machines which use CVSup to collect the ports tree.
 
 There have been some changes to the Web site recently. I have
 updated my patch accordingly.
 
 I have been using this patch successfully for almost 2 months now.
 Is there any chance it might being committed soon?
 
 Regards,
 Tom
 
 
 --- en/copyright/Makefile.orig	Sat Oct 17 11:18:42 1998
 +++ en/copyright/Makefile	Sun Feb 14 18:00:47 1999
 @@ -16,7 +16,12 @@
  # FreeBSD Ports redistribution restrictions
  LEGAL= LEGAL
  CLEANFILES+= ${LEGAL}
 +.if defined(NOCVS)
 +${LEGAL}: $${PORTSBASE}/ports/LEGAL
 +	cp ${PORTSBASE}/ports/LEGAL LEGAL
 +.else
  ${LEGAL}: $${CVSROOT}/ports/LEGAL,v
  	co -q -p ${.ALLSRC} > ${.TARGET}
 +.endif
  
  .include "../web.mk"
 --- en/web.mk.orig	Sun Oct  4 14:25:30 1998
 +++ en/web.mk	Sun Feb 14 17:55:21 1999
 @@ -43,6 +43,11 @@
  
  COPY=	-C
  
 +#
 +# Where the ports live, if CVS isn't used (ie. NOCVS is defined)
 +#
 +PORTSBASE?=	/usr
 +
  ##################################################################
  # Transformation rules
  
 --- en/ports/Makefile.orig	Sun Mar 14 14:41:31 1999
 +++ en/ports/Makefile	Tue Apr  6 16:14:36 1999
 @@ -24,6 +24,16 @@
  cvswww= $${CVSROOT}/${PWWW},v
  _ALLINSTALL= packages.exists ${INDEX} ${Y2K} ${WWW}
  
 +.if defined(NOCVS)
 +${INDEX}: $${PORTSBASE}/${PINDEX}
 +	cp ${PORTSBASE}/${PINDEX} ${INDEX}
 +
 +${Y2K}: $${PORTSBASE}/${PY2K}
 +	cp ${PORTSBASE}/${PY2K} ${Y2K}
 +
 +${WWW}: $${PORTSBASE}/${PWWW}
 +	cp ${PORTSBASE}/${PWWW} ${WWW}
 +.else
  ${INDEX}: ${cvsindex}
  	cvs -QR co -p ${PINDEX} > ${INDEX}
  
 @@ -32,12 +42,17 @@
  
  ${WWW}: ${cvswww}
  	cvs -QR co -p ${PWWW} > ${WWW}
 +.endif
  
  # build the list of available packages only on the 
  # main FreeBSD machines
  hostname!= hostname
  
 +.if defined(NOCVS)
 +packages.exists:
 +.else
  packages.exists: ${cvsindex} ${cvsy2k} ${cvswww}
 +.endif
  .if ${hostname} == "hub.freebsd.org" || ${hostname} == "freefall.freebsd.org"
  	sh ${.CURDIR}/packages > ${.TARGET}
  .else
 
State-Changed-From-To: open->closed 
State-Changed-By: nik 
State-Changed-When: Thu Apr 8 14:44:54 PDT 1999 
State-Changed-Why:  
Committed, with minor change (NOCVS -> NOPORTSCVS).  Thanks, and sorry for the 
delay in committing. 
>Unformatted:
