From owner-freebsd-ports@FreeBSD.ORG Wed May 2 00:28:14 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3611F16A401 for ; Wed, 2 May 2007 00:28:14 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id C8A7113C480 for ; Wed, 2 May 2007 00:28:13 +0000 (UTC) (envelope-from killing@multiplay.co.uk) X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on core6.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-24.7 required=6.0 tests=BAYES_00, USER_IN_WHITELIST, USER_IN_WHITELIST_TO autolearn=ham version=3.1.5 Received: from r2d2 ([212.135.219.182]) by multiplay.co.uk (multiplay.co.uk [85.236.96.23]) (MDaemon PRO v9.5.4) with ESMTP id md50003785034.msg for ; Wed, 02 May 2007 01:13:28 +0100 Message-ID: <0c2101c78c4e$a1db9ad0$b6db87d4@multiplay.co.uk> From: "Steven Hartland" To: Date: Wed, 2 May 2007 01:12:54 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-MDRemoteIP: 212.135.219.182 X-Return-Path: killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-ports@freebsd.org X-Spam-Processed: multiplay.co.uk, Wed, 02 May 2007 01:13:29 +0100 X-MDAV-Processed: multiplay.co.uk, Wed, 02 May 2007 01:13:29 +0100 Subject: Packages not respecting DESTDIR ( perl5.8 ) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2007 00:28:14 -0000 I'm trying to install ports into a jail but even some key ports like don't seen to support this option even to the extent they appear to break the host OS deleting files. I'm assuming this shouldn't be the case? Repro steps: cd /usr/ports/lang/perl5.8 make install ls -l /usr/local/bin/perl* -rwxr-xr-x 2 root wheel 9424 May 1 23:30 /usr/local/bin/perl -r-xr-xr-x 1 root wheel 15101 May 1 23:30 /usr/local/bin/perl-after-upgrade lrwxr-xr-x 1 root wheel 24 May 1 23:30 /usr/local/bin/perl5 -> /usr/local/bin/perl5.8.8 -rwxr-xr-x 2 root wheel 9424 May 1 23:30 /usr/local/bin/perl5.8.8 -rwxr-xr-x 1 root wheel 37307 May 1 23:30 /usr/local/bin/perlbug -rwxr-xr-x 1 root wheel 17965 May 1 23:30 /usr/local/bin/perlcc -rwxr-xr-x 1 root wheel 236 May 1 23:30 /usr/local/bin/perldoc -rwxr-xr-x 1 root wheel 11949 May 1 23:30 /usr/local/bin/perlivp All good so far. make DESTDIR=/usr/local/jails/jail1 install Does nothing, a quirk of the port system for a while now where it seems to attempt to remember the state but gets it wrong in this type of case. make DESTDIR=/usr/local/jails/jail1 reinstall which goes well until: /usr/bin/strip: '/usr/local/bin/perl5.8.8': No such file /usr/bin/strip: '/usr/local/bin/perl': No such file /usr/local/bin/pod2man: not found *** Error code 127 Make is not my strong point but looking at the makefile it seems the post and pre install steps are broken and not using DESTDIR. ls -l /usr/local/bin/perl* -r-xr-xr-x 1 root wheel 15101 May 1 23:30 /usr/local/bin/perl-after-upgrade lrwxr-xr-x 1 root wheel 24 May 1 23:30 /usr/local/bin/perl5 -> /usr/local/bin/perl5.8.8 -rwxr-xr-x 1 root wheel 37307 May 1 23:30 /usr/local/bin/perlbug -rwxr-xr-x 1 root wheel 17965 May 1 23:30 /usr/local/bin/perlcc -rwxr-xr-x 1 root wheel 236 May 1 23:30 /usr/local/bin/perldoc -rwxr-xr-x 1 root wheel 11949 May 1 23:30 /usr/local/bin/perlivp This has now trashed the base perl which was installed first and it shouldnt have gone any where near it. The following diff fixes most of the issues but use.perl, pkg-install and pkg-deinstall and or their invocation still need fixing up. [patch] --- Makefile.orig Tue May 1 23:46:35 2007 +++ Makefile Wed May 2 00:40:38 2007 @@ -178,19 +178,19 @@ post-install: - @${STRIP_CMD} ${PREFIX}/bin/perl${PERL_VER} - @${STRIP_CMD} ${PREFIX}/bin/perl - @${PREFIX}/bin/pod2man ${WRKDIR}/perl-after-upgrade >${WRKDIR}/perl-after-upgrade.1 - @${INSTALL_SCRIPT} ${WRKDIR}/perl-after-upgrade ${PREFIX}/bin/perl-after-upgrade + @${STRIP_CMD} ${DESTDIR}${PREFIX}/bin/perl${PERL_VER} + @${STRIP_CMD} ${DESTDIR}${PREFIX}/bin/perl + @${DESTDIR}/${PREFIX}/bin/perl ${DESTDIR}${PREFIX}/bin/pod2man ${WRKDIR}/perl-after-upgrade >${WRKDIR}/perl-after-upgrade.1 + @${INSTALL_SCRIPT} ${WRKDIR}/perl-after-upgrade ${DESTDIR}${PREFIX}/bin/perl-after-upgrade @${INSTALL_MAN} ${WRKDIR}/perl-after-upgrade.1 ${MAN1PREFIX}/man/man1/perl-after-upgrade.1 - @${LN} -sf ${PREFIX}/bin/perl${PERL_VER} ${PREFIX}/bin/perl5 + @${CHROOT} ${DESTDIR} ${LN} -sf ${PREFIX}/bin/perl${PERL_VER} ${PREFIX}/bin/perl5 .for files in ${BSDPAN_FILES} - ${MKDIR} ${BSDPAN_DEST}/${files:H} + ${MKDIR} ${DESTDIR}${BSDPAN_DEST}/${files:H} ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ - ${BSDPAN_WRKSRC}/${files} ${BSDPAN_DEST}/${files} + ${BSDPAN_WRKSRC}/${files} ${DESTDIR}${BSDPAN_DEST}/${files} .endfor .ifndef WITHOUT_USE_PERL PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .if ${OSVERSION} < 500036 - ${INSTALL_SCRIPT} ${WRKDIR}/use.perl ${PREFIX}/bin/use.perl + ${INSTALL_SCRIPT} ${WRKDIR}/use.perl ${DESTDIR}${PREFIX}/bin/use.perl @fmt ${PKGMESSAGE} .endif [/patch] ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.