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 [EMAIL PROTECTED]
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"