From woods@tap.zeus.leitch.com  Wed Apr 15 15:03:53 1998
Received: from gateman.zeus.leitch.com (gateman.zeus.leitch.com [204.187.61.193])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA14868
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Apr 1998 15:03:49 GMT
          (envelope-from woods@tap.zeus.leitch.com)
Received: from zeus.leitch.com (tap.zeus.leitch.com [204.187.61.10]) by gateman.zeus.leitch.com (8.8.5/8.7.3/1.0) with ESMTP id LAA22013 for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Apr 1998 11:03:51 -0400 (EDT)
Received: from brain.zeus.leitch.com (brain.zeus.leitch.com [204.187.61.32]) by zeus.leitch.com (8.7.5/8.7.3/1.0) with ESMTP id LAA10218 for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Apr 1998 11:03:36 -0400 (EDT)
Received: (from woods@localhost)
	by brain.zeus.leitch.com (8.8.8/8.8.8) id LAA28218;
	Wed, 15 Apr 1998 11:03:36 -0400 (EDT)
	(envelope-from woods@tap.zeus.leitch.com)
Message-Id: <199804151503.LAA28218@brain.zeus.leitch.com>
Date: Wed, 15 Apr 1998 11:03:36 -0400 (EDT)
From: "Greg A. Woods" <woods@zeus.leitch.com>
Reply-To: woods@zeus.leitch.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: fixes to release/Makefile to better support other CVS repositories
X-Send-Pr-Version: 3.2

>Number:         6309
>Category:       misc
>Synopsis:       fixes to release/Makefile to better support other CVS repositories
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    msmith
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 15 08:10:01 PDT 1998
>Closed-Date:    Wed Apr 15 11:32:32 PDT 1998
>Last-Modified:  Mon Jul 27 12:20:01 PDT 1998
>Originator:     Greg A. Woods
>Release:        FreeBSD 2.2.6-STABLE i386
>Organization:
Planix, Inc.; Toronto, Ontario; Canada; on contract to Leitch Technology
>Environment:

FreeBSD 2.2.x (i.e. RELENG_2_2)

>Description:

It is impossible to use 'make release' in an environment where the CVS
repository doesn't have exactly the same structure and module names as
the official FreeBSD.ORG repository.  However this can be fixed with a
couple of very minor changes to the release/Makefile which will allow a
fully flexible module naming scheme.

>How-To-Repeat:

Try to "cd release; make release ... " on a system where the CVS
repository does not have a 'src' module that points at the FreeBSD
source tree.

>Fix:
	
Note that in the last hunk of this patch I've also disabled "make
rerelease RELEASETAG=tag" since it seems illogical to do this (though if
RELEASETAG were a branch and *not* a "release" tag this may have some
meaning in terms of doing snapshots of that branch).

*** src-2.2.x/release/Makefile	Mon Mar 30 13:59:04 1998
--- src/release/Makefile	Wed Apr  8 16:47:26 1998
***************
*** 19,24 ****
--- 19,28 ----
  # If this is a RELEASE, then set
  #RELEASETAG=RELENG_2_2
  
+ # The name of the CVS module identifying the root of your FreeBSD tree
+ CVSMODULENAME=src
+ #CVSMODULENAME=Leitch-BSD
+ 
  # Uncomment this to disable the doc.1 target.  It is also an ERROR
  # to set NOPORTS and not set NODOC since docs depend on ports.
  #NODOC=  YES
***************
*** 123,132 ****
  	done
  .if !defined(RELEASETAG)
  	cd ${CHROOTDIR}/usr && rm -rf src && \
! 		cvs -d ${CVSROOT} co -P src
  .else
  	cd ${CHROOTDIR}/usr && rm -rf src && \
! 		cvs -d ${CVSROOT} co -P -r ${RELEASETAG} src
  .endif
  .if defined(LOCAL_PATCHES) && exists(${LOCAL_PATCHES})
  	cd ${CHROOTDIR}/usr/src && patch --silent < ${LOCAL_PATCHES}
--- 127,136 ----
  	done
  .if !defined(RELEASETAG)
  	cd ${CHROOTDIR}/usr && rm -rf src && \
! 		cvs -d ${CVSROOT} co -P -d src ${CVSMODULENAME}
  .else
  	cd ${CHROOTDIR}/usr && rm -rf src && \
! 		cvs -d ${CVSROOT} export -kv -r ${RELEASETAG} -d src ${CVSMODULENAME}
  .endif
  .if defined(LOCAL_PATCHES) && exists(${LOCAL_PATCHES})
  	cd ${CHROOTDIR}/usr/src && patch --silent < ${LOCAL_PATCHES}
***************
*** 147,153 ****
  .if !defined(RELEASETAG)
  	cd ${CHROOTDIR}/usr/src && cvs -q update -P -d
  .else
! 	cd ${CHROOTDIR}/usr/src && cvs -q update -P -d -r ${RELEASETAG}
  .endif
  .if !defined(NOPORTS)
  	cd ${CHROOTDIR}/usr/ports && cvs -q update -P -d
--- 151,157 ----
  .if !defined(RELEASETAG)
  	cd ${CHROOTDIR}/usr/src && cvs -q update -P -d
  .else
! 	echo 'no can do a re-release with a RELEASETAG' && exit 1
  .endif
  .if !defined(NOPORTS)
  	cd ${CHROOTDIR}/usr/ports && cvs -q update -P -d

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->msmith 
Responsible-Changed-By: phk 
Responsible-Changed-When: Wed Apr 15 09:03:08 PDT 1998 
Responsible-Changed-Why:  
Mike, it's all yours... 
State-Changed-From-To: open->closed 
State-Changed-By: msmith 
State-Changed-When: Wed Apr 15 11:32:32 PDT 1998 
State-Changed-Why:  
A modified version of the proposed change was committed, extended to allow 
overriding of the modules from which the ports and doc components are  
obtained. 

From: woods@zeus.leitch.com (Greg A. Woods)
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc: msmith@FreeBSD.ORG
Subject: Re: misc/6309
Date: Mon, 27 Jul 1998 15:13:58 -0400 (EDT)

 Clearly the "modified" version of the patches that were checked in were
 never tested in real life (the missing '-d dir' causes complete and
 utter breakage if RELEASEdirMODULE is changed), nor was the original
 intent of the patches retained in its entirety ('cvs export -kv' is
 critical too! -- if you don't think so then make it a variable).
 
 The attached patch restores things to working order for 2.2.7.
 
 -- 
 							Greg A. Woods
 
 +1 416 443-1734      VE3TCP      <gwoods@acm.org>      <robohack!woods>
 Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>
 
 
 === cd /usr/src/release/
 === /usr/bin/cvs diff -r1.1.1 -c Makefile
 
 Index: Makefile
 ===================================================================
 RCS file: /cvs/Leitch/FreeBSD-2.2/release/Makefile,v
 retrieving revision 1.1.1.5
 diff -c -r1.1.1.5 Makefile
 *** Makefile	1998/07/21 21:50:44	1.1.1.5
 --- Makefile	1998/07/27 18:58:44
 ***************
 *** 144,162 ****
   	done
   .if !defined(RELEASETAG)
   	cd ${CHROOTDIR}/usr && rm -rf src && \
 ! 		cvs -d ${CVSROOT} co -P ${RELEASESRCMODULE}
   .else
   	cd ${CHROOTDIR}/usr && rm -rf src && \
 ! 		cvs -d ${CVSROOT} co -P -r ${RELEASETAG} ${RELEASESRCMODULE}
   .endif
   .if defined(LOCAL_PATCHES) && exists(${LOCAL_PATCHES})
   	cd ${CHROOTDIR}/usr/src && patch --silent < ${LOCAL_PATCHES}
   .endif
   .if !defined(NOPORTS)
 ! 	cd ${CHROOTDIR}/usr && rm -rf ports && cvs -d ${CVSROOT} co -P ${RELEASEPORTSMODULE} && cd ports && make readmes PORTSDIR=${CHROOTDIR}/usr/ports
   .endif
   .if !defined(NODOC)
 ! 	cd ${CHROOTDIR}/usr && rm -rf doc && cvs -d ${CVSROOT} co -P ${RELEASEDOCMODULE}
   	cd ${CHROOTDIR}/usr/ports && for i in ${DOCPORTS}; do \
   	  (cd $$i; make fetch MASTER_SITE_OVERRIDE=file:/usr/ports/distfiles/ \
   	    DISTDIR=${CHROOTDIR}/usr/ports/distfiles ); \
 --- 144,176 ----
   	done
   .if !defined(RELEASETAG)
   	cd ${CHROOTDIR}/usr && rm -rf src && \
 ! 		cvs -d ${CVSROOT} co -P -d src ${RELEASESRCMODULE}
   .else
   	cd ${CHROOTDIR}/usr && rm -rf src && \
 ! 		cvs -d ${CVSROOT} export -kv -r ${RELEASETAG} -d src ${RELEASESRCMODULE}
   .endif
   .if defined(LOCAL_PATCHES) && exists(${LOCAL_PATCHES})
   	cd ${CHROOTDIR}/usr/src && patch --silent < ${LOCAL_PATCHES}
   .endif
   .if !defined(NOPORTS)
 ! .if !defined(RELEASETAG)
 ! 	cd ${CHROOTDIR}/usr && rm -rf ports && \
 ! 		cvs -d ${CVSROOT} co -P -d ports ${RELEASEPORTSMODULE} && \
 ! 		cd ports && make readmes PORTSDIR=${CHROOTDIR}/usr/ports
 ! .else
 ! 	cd ${CHROOTDIR}/usr && rm -rf ports && \
 ! 		cvs -d ${CVSROOT} export -kv -r ${RELEASETAG} -d ports ${RELEASEPORTSMODULE} && \
 ! 		cd ports && make readmes PORTSDIR=${CHROOTDIR}/usr/ports
 ! .endif
   .endif
   .if !defined(NODOC)
 ! .if !defined(RELEASETAG)
 ! 	cd ${CHROOTDIR}/usr && rm -rf doc && \
 ! 		cvs -d ${CVSROOT} co -P -d doc ${RELEASEDOCMODULE}
 ! .else
 ! 	cd ${CHROOTDIR}/usr && rm -rf doc && \
 ! 		cvs -d ${CVSROOT} export -kv -r ${RELEASETAG} -d doc ${RELEASEDOCMODULE}
 ! .endif
   	cd ${CHROOTDIR}/usr/ports && for i in ${DOCPORTS}; do \
   	  (cd $$i; make fetch MASTER_SITE_OVERRIDE=file:/usr/ports/distfiles/ \
   	    DISTDIR=${CHROOTDIR}/usr/ports/distfiles ); \
 === Exit status: 1
>Unformatted:
