Date: Thu, 11 Oct 2001 14:50:27 +0300 (EEST) From: Alexandr Listopad <laa@laa.zp.ua> To: FreeBSD-gnats-submit@freebsd.org Cc: laa@laa.zp.ua Subject: misc/31218: How to build release from selected date Message-ID: <200110111150.f9BBoRT79283@mx1.zsea.zp.ua>
next in thread | raw e-mail | index | archive | help
>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 <date>'' 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110111150.f9BBoRT79283>
