From owner-freebsd-stable Wed Mar 19 22:56:21 2003 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23CFA37B404; Wed, 19 Mar 2003 22:56:18 -0800 (PST) Received: from oneplusone.ch (oneplusone.ch [212.55.208.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4FB043F93; Wed, 19 Mar 2003 22:56:13 -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 h2K6u4Zt005256; Thu, 20 Mar 2003 07:56:05 +0100 (MET) (envelope-from ast@marabu.ch) Received: (from uucp@localhost) by oneplusone.ch (8.12.6/8.12.3/Submit) with UUCP id h2K6u4NE005255; Thu, 20 Mar 2003 07:56:04 +0100 (MET) Received: from marabu.marabu.ch (marabu.marabu.ch [192.168.21.3]) by marabu.ch (8.11.6/8.11.6) with ESMTP id h2K6nEF86856; Thu, 20 Mar 2003 07:49:14 +0100 (MET) (envelope-from ast@marabu.ch) Received: by marabu.marabu.ch (8.7.5/20001028-ast-8.3) id HAA17579; Thu, 20 Mar 2003 07:49:13 +0100 (CET) Message-Id: <200303200649.HAA17579@marabu.marabu.ch> MIME-Version: 1.0 (NeXT Mail 3.3 v124.8483.6) Content-Type: text/plain X-Nextstep-Mailer: Mail 3.3 (Enhance 2.0b6) Received: by NeXT.Mailer (1.124.8483.6) From: Adrian Steinmann Date: Thu, 20 Mar 2003 07:49:11 +0100 To: Scott Sewall Subject: Re: make release failure Cc: stable@freebsd.org, bmah@freebsd.org X-Organization: Webgroup Consulting AG, Apollostrasse 21, 8032 Zurich X-Phone-Numbers: Switzerland, Tel +41 1 380 30 83 Fax +41 1 380 30 85 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG asked this followup question after I posted a possible solution to the USE_LIBTOOL problem in ports/textproc/jade build: Do I apply the patch to the bsd.port.mk within the chroot'd environment used by 'make release', or to /usr/share/mk/bsd.port.mk? not /usr/share/mk/bsd.port.mk, but usr/ports/Mk/bsd.port.mk - within the chroot'd environment! There are hooks in usr/src/release/Makefile for applying LOCAL_PATCHES and runing a LOCAL_SCRIPT however they come before usr/ports is checked out. I have submitted a second PR http://www.freebsd.org/cgi/query-pr.cgi?pr=50106 which is a change request to "move down" the running of the local script to after the ports are also checked out. If you don't set NODOC=yes, you will need to apply that patch as well, and put the usr/ports/Mk/bsd.port.mk patch from PR 50103 into your LOCAL_PATCHES file. As it stood in its first version, PR 50106 was kind of suboptimal for two reasons: 1) it expected LOCAL_PATCHES to be relative to CHROOTDIR and not CHROOTDIR/usr/src, which is the traditional root for src patches. 2) if say, NOPORTS=yes was specified, make release failed because when the patch was applied it returns non-zero when it tried to patch a nonexisting file (in spite of PATCH_FLAGS=--batch). I work around this by not using the LOCAL_PATCHES hook at all but doing the local patching in the moved-down LOCAL_SCRIPT like this: patch ${PATCH_FLAGS} < ${MY_LOCAL_PATCHES} || true making sure that MY_LOCAL_PATCHES is exported into in the 'make release' environment, and hence the LOCAL_SCRIPT. I have followed-up PR 50106 with these comments, with a slightly modified patch which just "moves down" running of the LOCAL_SCRIPT and leaves the traditional LOCAL_PATCHES where it has always been, respecting the POLA. Another approach would be to have a third hook LOCAL_PORT_PATCHES which are relative to CHROOTDIR/usr/ports, those would be protected by the existing .if ! defined (NOPORTS) ... .endif clauses within release/Makefile. Nevertheless, I advocate having LOCAL_SCRIPT after all checkouts are done, i.e. please commit the revised patch PR 50106! Adrian > wrote: > I'm trying to run make release of RELENG_4 on i386, and am getting the following error: > > checking for BSD-compatible nm... /usr/bin/nm -B > /ltconfig: Can't open /ltconfig: No such file or directory > configure: error: libtool configure failed > ===> Script "configure" failed unexpectedly. > ... > > Stop in /usr/ports/textproc/jade. > ... > >jade has USE_LIBTOOL in it's Makefile, but it configures itself >*before* it goes and builds libtool, so when 'make jade' finally >comes back (after it installs the prerequisites expat, iconv, >gettext, and gmake) the patch-libtool target has already run (a >no-op in this case) because it's in the _CONFIGURE_SEQ (see >usr/ports/Mk/bsd.port.mk) and the ltconfig path is of course not >patched, hence /ltconfig. > >You can observe this by doing a chroot into the CHROOTDIR hierarchy, >cd /usr/ports/textproc/jade, rm work/.config*; make configure which >lo' and behold will *not* fail. If you then 'pkg_delete -x libtool', >then 'make configure' will fail again. > >I've fixed this locally by forcing USE_LIBTOOL to create a *PATCH* >dependancy instead of a BUILD dependancy (it is actually a CONFIGURE >dependancy, but we have no such hooks) in bsd.port.mk: > >Index: bsd.port.mk >=================================================================== >RCS file: /usr/cvs/ports/Mk/bsd.port.mk,v >retrieving revision 1.442 >diff -u -r1.442 bsd.port.mk >--- bsd.port.mk 12 Mar 2003 00:28:17 -0000 1.442 >+++ bsd.port.mk 18 Mar 2003 17:37:20 -0000 >@@ -1226,7 +1226,7 @@ > > .if defined(USE_LIBTOOL) > GNU_CONFIGURE= yes >-BUILD_DEPENDS+= libtool:${PORTSDIR}/devel/libtool >+PATCH_DEPENDS+= libtool:${PORTSDIR}/devel/libtool > .if defined(USE_AUTOCONF) > LIBTOOLFILES?= aclocal.m4 > .else > >See also http://www.freebsd.org/cgi/query-pr.cgi?pr=50103 > >Adrian > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message