From owner-freebsd-bugs Tue Mar 18 13:10:10 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 760E037B401 for ; Tue, 18 Mar 2003 13:10:07 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60AF243F93 for ; Tue, 18 Mar 2003 13:10:06 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h2ILA6NS021085 for ; Tue, 18 Mar 2003 13:10:06 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h2ILA6Ni021084; Tue, 18 Mar 2003 13:10:06 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23E0D37B401 for ; Tue, 18 Mar 2003 13:08:06 -0800 (PST) Received: from oneplusone.ch (oneplusone.ch [212.55.208.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF64343FBD for ; Tue, 18 Mar 2003 13:08:04 -0800 (PST) (envelope-from ast@marabu.ch) Received: from oneplusone.ch (localhost [127.0.0.1]) by oneplusone.ch (8.12.6/8.12.3) with ESMTP id h2IL82LP028232 for ; Tue, 18 Mar 2003 22:08:02 +0100 (MET) (envelope-from ast@marabu.ch) Received: (from uucp@localhost) by oneplusone.ch (8.12.6/8.12.3/Submit) with UUCP id h2IL82Ii028231 for FreeBSD-gnats-submit@freebsd.org; Tue, 18 Mar 2003 22:08:02 +0100 (MET) Received: (from ast@localhost) by marabu.ch (8.11.6/8.11.6) id h2IL1BI75070; Tue, 18 Mar 2003 22:01:11 +0100 (MET) (envelope-from ast) Message-Id: <200303182101.h2IL1BI75070@marabu.ch> Date: Tue, 18 Mar 2003 22:01:11 +0100 (MET) From: Adrian Steinmann Reply-To: Adrian Steinmann To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: misc/50106: Make 'make release' more flexible behind FWs and local patches 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: 50106 >Category: misc >Synopsis: Make 'make release' more flexible behind FWs and local patches >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: Tue Mar 18 13:10:05 PST 2003 >Closed-Date: >Last-Modified: >Originator: Adrian Steinmann >Release: FreeBSD 4.7-STYX i386 >Organization: Webgroup Consulting AG >Environment: System: FreeBSD sano.marabu.ch 4.7-STYX FreeBSD 4.7-STYX #0: Sat Mar 15 16:40:17 CET 2003 root@rumori.com:/usr/src/sys/compile/STYX i386 >Description: Sometimes it is necessary to patch more than just /usr/src files from LOCAL_PATCHES in the 'make release' phase, however currently that hook is provided for *before* usr/ports is checked out. Sometimes it is necessary to use a proxy from behind a firewall when fetching distfiles, HTTP_PROXY and FTP_PROXY help here. OSVERSION and OSREL are used profusely by ports/Mk/bsd.*.mk files and other Makefiles to decide on actions. This is good but gets in the way when building 4.x releases on 5.x machines when they are undefined and the 5.x 5x0000 values kick in (perl not in base, for example). By exporting those values into the make release environment, make release of 4.x can be achieved on 5.x systems. >How-To-Repeat: Investigate building 4.x releases on 5.x systems. >Fix: Index: usr/src/release/Makefile =================================================================== RCS file: /usr/cvs/src/release/Makefile,v retrieving revision 1.536.2.106 diff -u -r1.536.2.106 Makefile --- usr/src/release/Makefile 17 Mar 2003 05:50:32 -0000 1.536.2.106 +++ usr/src/release/Makefile 18 Mar 2003 08:23:45 -0000 @@ -285,12 +285,6 @@ cd ${CHROOTDIR}/usr && rm -rf src && \ 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} -.endif -.if defined(LOCAL_SCRIPT) && exists(${LOCAL_SCRIPT}) - cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT} -.endif .if !defined(NOPORTS) .if defined(PORTSRELEASETAG) cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} co ${CVSCMDARGS} -P -r ${PORTSRELEASETAG} ${RELEASEPORTSMODULE} @@ -325,6 +319,12 @@ .endif .endif .endif +.if defined(LOCAL_PATCHES) && exists(${LOCAL_PATCHES}) + cd ${CHROOTDIR} && patch ${PATCH_FLAGS} < ${LOCAL_PATCHES} +.endif +.if defined(LOCAL_SCRIPT) && exists(${LOCAL_SCRIPT}) + cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT} +.endif .if make(rerelease) .if !defined(RELEASENOUPDATE) .if !defined(RELEASETAG) @@ -356,6 +356,8 @@ echo "_RELTARGET=\$${1:-doRELEASE}" >> ${CHROOTDIR}/mk echo "export MODULES_WITH_WORLD=YES" >> ${CHROOTDIR}/mk .for var in \ + OSREL \ + OSVERSION \ AUTO_KEYBOARD_DETECT \ BOOT_CONFIG \ BUILDNAME \ @@ -826,6 +828,8 @@ @for i in ${DOCPORTS}; do \ cd /usr/ports/$$i && \ env -i FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \ + OSREL=$${OSREL} OSVERSION=$${OSVERSION} \ + HTTP_PROXY=$${HTTP_PROXY} FTP_PROXY=$${FTP_PROXY} \ make all install clean BATCH=yes WITHOUT_X11=yes JADETEX=no \ WITHOUT_PYTHON=yes FORCE_PKG_REGISTER=yes; \ done >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message