From owner-freebsd-bugs Thu Oct 11 5: 0:18 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 832C137B405 for ; Thu, 11 Oct 2001 05:00:08 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9BC08l99096; Thu, 11 Oct 2001 05:00:08 -0700 (PDT) (envelope-from gnats) Received: from mx1.zsea.zp.ua (ZSEA.zp.ua [212.8.40.5]) by hub.freebsd.org (Postfix) with ESMTP id 9311B37B407 for ; Thu, 11 Oct 2001 04:50:53 -0700 (PDT) Received: (from laa@localhost) by mx1.zsea.zp.ua with id f9BBoRT79283; Thu, 11 Oct 2001 14:50:27 +0300 (EEST) (envelope-from laa) Message-Id: <200110111150.f9BBoRT79283@mx1.zsea.zp.ua> Date: Thu, 11 Oct 2001 14:50:27 +0300 (EEST) From: Alexandr Listopad Reply-To: Alexandr Listopad To: FreeBSD-gnats-submit@freebsd.org Cc: laa@laa.zp.ua X-Send-Pr-Version: 3.113 Subject: misc/31218: How to build release from selected date Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31218 >Category: misc >Synopsis: How to build release from selected date >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Oct 11 05:00:03 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Alexandr Listopad >Release: FreeBSD 4.4-SABLE i386 >Organization: CIT ZSEA >Environment: System: FreeBSD Eagle.zgia.zp.ua 4.4-STABLE FreeBSD 4.4-STABLE #5: Wed Oct 3 09:36:26 EEST 2001 root@Eagle.zgia.zp.ua:/usr/obj/usr/src/sys/Eagle i386 >Description: I write a patch for use cvs ``-D '' feature in src/release/Makefile. This feature helps build releases with/from sources prior to selected date. Now I can run cvsup with ``date='', rebuild system, reboot, and make release if all fine. This is my example: [18:23:39] root@ns # make CHROOTDIR=/home/ftp/pub/FreeBSD/releases/ BUILDNAME=4.4-20011003053200-STABLE \ CVSROOT=/home/ncvs \ RELEASETAG=RELENG_4 \ NOPORTS=YES NODOC=YES \ CVSDATE='10/03/2001 03:05:00 UTC' \ CVSCMDARGS="-D $CVSDATE" \ release > RELEASE.log 2>&1 & So, this way I have a release from 03 Oct 2001 03:05:00 UTC. >How-To-Repeat: >Fix: This is a patch for src/release/Makefile: --- Makefile.orig Wed Sep 26 16:53:38 2001 +++ Makefile Mon Oct 8 18:28:08 2001 @@ -22,6 +22,12 @@ BASE = 4.4 BUILDNAME?=${BASE}-${DATE}-STABLE # +# If you want to make release from sources prior to specified date +# put CVSDATE and CVSCMDARGS to command line arguments. +#CVSDATE="10/03/2001 03:05:00 UTC" +#CVSCMDARGS="-D ${CVSDATE}" +# +# #CHROOTDIR=/junk/release # If this is a -stable snapshot, then set #RELEASETAG=RELENG_4 @@ -259,10 +265,11 @@ done .if !defined(RELEASETAG) cd ${CHROOTDIR}/usr && rm -rf src && \ - cvs -R -d ${CVSROOT} co -P ${RELEASESRCMODULE} + cvs -R -d ${CVSROOT} co "${CVSCMDARGS}" -P ${RELEASESRCMODULE} .else cd ${CHROOTDIR}/usr && rm -rf src && \ - cvs -R -d ${CVSROOT} co -P -r ${RELEASETAG} ${RELEASESRCMODULE} + cvs -R -d ${CVSROOT} co "${CVSCMDARGS}" -P -r ${RELEASETAG} \ + ${RELEASESRCMODULE} .endif .if defined(LOCAL_PATCHES) && exists(${LOCAL_PATCHES}) cd ${CHROOTDIR}/usr/src && patch ${PATCH_FLAGS} < ${LOCAL_PATCHES} @@ -272,22 +279,30 @@ .endif .if !defined(NOPORTS) .if defined(PORTSRELEASETAG) - cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} co -P -r ${PORTSRELEASETAG} ${RELEASEPORTSMODULE} && cd ports && ${MAKEREADMES} + cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} \ + co "${CVSCMDARGS}" -P -r ${PORTSRELEASETAG} \ + ${RELEASEPORTSMODULE} && cd ports && ${MAKEREADMES} .else - cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} co -P ${RELEASEPORTSMODULE} && cd ports && ${MAKEREADMES} + cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} \ + co "${CVSCMDARGS}" -P ${RELEASEPORTSMODULE} && cd ports \ + && ${MAKEREADMES} .endif .elif defined(DOMINIMALDOCPORTS) && ${DOMINIMALDOCPORTS} == "YES" .if defined(PORTSRELEASETAG) - cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} co -P -r ${PORTSRELEASETAG} ${MINIMALDOCPORTS} + cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} \ + "${CVSCMDARGS}" co -P -r ${PORTSRELEASETAG} ${MINIMALDOCPORTS} .else - cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} co -P ${MINIMALDOCPORTS} + cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} \ + "${CVSCMDARGS}" co -P ${MINIMALDOCPORTS} .endif .endif .if !defined(NODOC) .if defined(DOCRELEASETAG) - cd ${CHROOTDIR}/usr && rm -rf doc && cvs -R -d ${CVSROOT} co -P -r ${DOCRELEASETAG} ${RELEASEDOCMODULE} + cd ${CHROOTDIR}/usr && rm -rf doc && cvs -R -d ${CVSROOT} \ + "${CVSCMDARGS}" co -P -r ${DOCRELEASETAG} ${RELEASEDOCMODULE} .else - cd ${CHROOTDIR}/usr && rm -rf doc && cvs -R -d ${CVSROOT} co -P ${RELEASEDOCMODULE} + cd ${CHROOTDIR}/usr && rm -rf doc && cvs -R -d ${CVSROOT} \ + "${CVSCMDARGS}" co -P ${RELEASEDOCMODULE} .endif if [ -d ${DOCDISTFILES}/ ]; then \ cp -rp ${DOCDISTFILES} ${CHROOTDIR}/usr/ports/distfiles; \ @@ -297,20 +312,22 @@ .if make(rerelease) .if !defined(RELEASENOUPDATE) .if !defined(RELEASETAG) - cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d + cd ${CHROOTDIR}/usr/src && cvs -R -q up "${CVSCMDARGS}" -P -d .else - cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d -r ${RELEASETAG} + cd ${CHROOTDIR}/usr/src && cvs -R -q up "${CVSCMDARGS}" -P -d \ + -r ${RELEASETAG} .endif .if !defined(NOPORTS) cd ${CHROOTDIR}/usr/ports && cvs -R -q update -P -d .endif .if defined(DOMINIMALDOCPORTS) && ${DOMINIMALDOCPORTS} == "YES" for i in ${MINIMALDOCPORTS}; do \ - ( cd ${CHROOTDIR}/usr/$$i && cvs -R -q update -P -d ) ; \ + ( cd ${CHROOTDIR}/usr/$$i && cvs -R -q up "${CVSCMDARGS}" \ + -P -d ) ; \ done .endif .if !defined(NODOC) - cd ${CHROOTDIR}/usr/doc && cvs -R -q update -P -d + cd ${CHROOTDIR}/usr/doc && cvs -R -q up "${CVSCMDARGS}" -P -d .endif .endif .endif -- Laa >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message