From owner-freebsd-bugs Tue Jan 7 8:20:14 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 EA07C37B401 for ; Tue, 7 Jan 2003 08:20:02 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 905FB43ED4 for ; Tue, 7 Jan 2003 08:20:01 -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 h07GK1NS032316 for ; Tue, 7 Jan 2003 08:20:01 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h07GK1lP032315; Tue, 7 Jan 2003 08:20:01 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A43AC37B401 for ; Tue, 7 Jan 2003 08:18:33 -0800 (PST) Received: from moo.cus.org.uk (host213-106-240-81.no-dns-yet.ntli.net [213.106.240.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5429D43EB2 for ; Tue, 7 Jan 2003 08:18:27 -0800 (PST) (envelope-from dom@moo.cus.org.uk) Received: from moo.cus.org.uk (localhost.cus.org.uk [127.0.0.1]) by moo.cus.org.uk (8.12.5/8.11.3) with ESMTP id h07GMCa9013490 for ; Tue, 7 Jan 2003 16:22:12 GMT (envelope-from dom@moo.cus.org.uk) Received: (from dom@localhost) by moo.cus.org.uk (8.12.5/8.12.5/Submit) id h07GMBiE013489; Tue, 7 Jan 2003 16:22:11 GMT Message-Id: <200301071622.h07GMBiE013489@moo.cus.org.uk> Date: Tue, 7 Jan 2003 16:22:11 GMT From: Dominic Marks Reply-To: Dominic Marks To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/46830: Make pkg_add respect prefix for dependancies 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: 46830 >Category: bin >Synopsis: Make pkg_add respect prefix for dependancies >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jan 07 08:20:00 PST 2003 >Closed-Date: >Last-Modified: >Originator: Dominic Marks >Release: FreeBSD 4.6-STABLE i386 >Organization: UMIST >Environment: System: FreeBSD moo.cus.org.uk 4.6-STABLE FreeBSD 4.6-STABLE #0: Sat Jul 20 15:11:50 BST 2002 root@moo.cus.org.uk:/usr/obj/usr/src/sys/MOO i386 >Description: I maintain my ports on a FreeBSD machine which I do not own and do not have root priveledges on. Sometimes I install dependancies for my ports as packages (much like the build cluster does), I have to install these under my home directory for reasons Ive already explained. Recently I tried to do the following: > pkg_add -p /home/cus/dom/tmp/prefix -rv popt This in turn pulls in a series of dependancies, ending at gettext. However the sub-processes don't respect the prefix I have specified and so pkg_add attempts to extract into /usr/local, fails, and the whole installation procedure falls on its face. Here is a log of the procedure if you'd like to look for yourself. Script started on Tue Jan 7 16:14:27 2003 > pkg_add -p /home/cus/dom/tmp/prefix/ -rv popt looking up ftp.freebsd.org connecting to ftp.freebsd.org:21 setting passive mode opening data connection initiating transfer Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4-stable/Latest/popt.tgz...+CONTENTS +COMMENT +DESC +MTREE_DIRS man/man3/popt.3.gz include/popt.h lib/libpopt.a lib/libpopt.so lib/libpopt.so.0 share/locale/cs/LC_MESSAGES/popt.mo share/locale/da/LC_MESSAGES/popt.mo share/locale/de/LC_MESSAGES/popt.mo share/locale/es/LC_MESSAGES/popt.mo share/locale/eu_ES/LC_MESSAGES/popt.mo share/locale/fi/LC_MESSAGES/popt.mo share/locale/fr/LC_MESSAGES/popt.mo share/locale/gl/LC_MESSAGES/popt.mo share/locale/hu/LC_MESSAGES/popt.mo share/locale/id/LC_MESSAGES/popt.mo share/locale/is/LC_MESSAGES/popt.mo share/locale/it/LC_MESSAGES/popt.mo share/locale/ja/LC_MESSAGES/popt.mo share/locale/ko/LC_MESSAGES/popt.mo share/locale/no/LC_MESSAGES/popt.mo share/locale/pl/LC_MESSAGES/popt.mo share/locale/pt/LC_MESSAGES/popt.mo share/locale/pt_BR/LC_MESSAGES/popt.mo share/locale/ro/LC_MESSAGES/popt.mo share/locale/ru/LC_MESSAGES/popt.mo share/locale/sk/LC_MESSAGES/popt.mo share/locale/sl/LC_MESSAGES/popt.mo share/locale/sr/LC_MESSAGES/popt.mo share/locale/sv/LC_MESSAGES/popt.mo share/locale/tr/LC_MESSAGES/popt.mo share/locale/uk/LC_MESSAGES/popt.mo share/locale/wa/LC_MESSAGES/popt.mo share/locale/zh/LC_MESSAGES/popt.mo share/locale/zh_CN.GB2312/LC_MESSAGES/popt.mo tar command returns 0 status Done. Package `popt-1.6.4' depends on `libiconv-1.8_2'. setting passive mode opening data connection initiating transfer Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4-stable/All/libiconv-1.8_2.tgz...+CONTENTS +COMMENT +DESC +MTREE_DIRS man/man1/iconv.1.gz man/man3/iconv.3.gz man/man3/iconv_open.3.gz man/man3/iconv_close.3.gz bin/iconv include/iconv.h include/libcharset.h lib/libcharset.a lib/libcharset.so lib/libcharset.so.1 lib/libiconv.a lib/libiconv.so lib/libiconv.so.3 libdata/charset.alias share/doc/libiconv/iconv.1.html share/doc/libiconv/iconv.3.html share/doc/libiconv/iconv_close.3.html share/doc/libiconv/iconv_open.3.html tar command returns 0 status Done. Finished loading libiconv-1.8_2 over FTP. extract: Package name is libiconv-1.8_2 extract: CWD to /usr/local extract: /usr/local/man/man1/iconv.1.gz extract: /usr/local/man/man3/iconv.3.gz extract: /usr/local/man/man3/iconv_open.3.gz extract: /usr/local/man/man3/iconv_close.3.gz extract: /usr/local/bin/iconv extract: /usr/local/include/iconv.h extract: /usr/local/include/libcharset.h extract: /usr/local/lib/libcharset.a extract: /usr/local/lib/libcharset.so extract: /usr/local/lib/libcharset.so.1 extract: /usr/local/lib/libiconv.a extract: /usr/local/lib/libiconv.so extract: /usr/local/lib/libiconv.so.3 extract: /usr/local/libdata/charset.alias extract: /usr/local/share/doc/libiconv/iconv.1.html extract: /usr/local/share/doc/libiconv/iconv.3.html extract: /usr/local/share/doc/libiconv/iconv_close.3.html extract: /usr/local/share/doc/libiconv/iconv_open.3.html tar: man/man1/iconv.1.gz: Cannot unlink: Permission denied tar: man/man3/iconv.3.gz: Cannot unlink: Permission denied tar: man/man3/iconv_open.3.gz: Cannot unlink: Permission denied tar: man/man3/iconv_close.3.gz: Cannot unlink: Permission denied tar: bin/iconv: Cannot unlink: Permission denied tar: include/iconv.h: Cannot unlink: Permission denied tar: include/libcharset.h: Cannot unlink: Permission denied tar: lib/libcharset.a: Cannot unlink: Permission denied tar: lib/libcharset.so: Cannot unlink: Permission denied tar: lib/libcharset.so.1: Cannot unlink: Permission denied tar: lib/libiconv.a: Cannot unlink: Permission denied tar: lib/libiconv.so: Cannot unlink: Permission denied tar: lib/libiconv.so.3: Cannot open: Permission denied tar: libdata/charset.alias: Cannot unlink: Permission denied tar: share/doc/libiconv/iconv.1.html: Cannot open: No such file or directory tar: share/doc/libiconv/iconv.3.html: Cannot open: No such file or directory tar: share/doc/libiconv/iconv_close.3.html: Cannot open: No such file or directory tar: share/doc/libiconv/iconv_open.3.html: Cannot open: No such file or directory tar: Error exit delayed from previous errors pkg_add: extract_plist: can not invoke 481 byte tar pipeline: tar cf - 'man/man1/iconv.1.gz' 'man/man3/iconv.3.gz' 'man/man3/iconv_open.3.gz' 'man/man3/iconv_close.3.gz' 'bin/iconv' 'include/iconv.h' 'include/libcharset.h' 'lib/libcharset.a' 'lib/libcharset.so' 'lib/libcharset.so.1' 'lib/libiconv.a' 'lib/libiconv.so' 'lib/libiconv.so.3' 'libdata/charset.alias' 'share/doc/libiconv/iconv.1.html' 'share/doc/libiconv/iconv.3.html' 'share/doc/libiconv/iconv_close.3.html' 'share/doc/libiconv/iconv_open.3.html'|tar --unlink -xf - -C /usr/local pkg_add: pkg_add of dependency `libiconv-1.8_2' failed! Package `popt-1.6.4' depends on `expat-1.95.5'. setting passive mode opening data connection initiating transfer Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4-stable/All/expat-1.95.5.tgz...+CONTENTS +COMMENT +DESC +MTREE_DIRS man/man1/xmlwf.1.gz bin/xmlwf include/expat.h lib/libexpat.a lib/libexpat.so lib/libexpat.so.4 tar command returns 0 status Done. Finished loading expat-1.95.5 over FTP. extract: Package name is expat-1.95.5 extract: CWD to /usr/local extract: /usr/local/man/man1/xmlwf.1.gz extract: /usr/local/bin/xmlwf extract: /usr/local/include/expat.h extract: /usr/local/lib/libexpat.a extract: /usr/local/lib/libexpat.so extract: /usr/local/lib/libexpat.so.4 tar: man/man1/xmlwf.1.gz: Cannot open: Permission denied tar: bin/xmlwf: Cannot open: Permission denied tar: include/expat.h: Cannot open: Permission denied tar: lib/libexpat.a: Cannot open: Permission denied tar: lib/libexpat.so: Cannot create symlink to `libexpat.so.4': Permission denied tar: lib/libexpat.so.4: Cannot open: Permission denied tar: Error exit delayed from previous errors pkg_add: extract_plist: can not invoke 149 byte tar pipeline: tar cf - 'man/man1/xmlwf.1.gz' 'bin/xmlwf' 'include/expat.h' 'lib/libexpat.a' 'lib/libexpat.so' 'lib/libexpat.so.4'|tar --unlink -xf - -C /usr/local pkg_add: pkg_add of dependency `expat-1.95.5' failed! Package `popt-1.6.4' depends on `gettext-0.11.5_1'. setting passive mode opening data connection initiating transfer Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4-stable/All/gettext-0.11.5_1.tgz...+CONTENTS +COMMENT +DESC +MTREE_DIRS man/man1/autopoint.1.gz man/man1/gettext.1.gz man/man1/gettextize.1.gz man/man1/msgattrib.1.gz man/man1/msgcat.1.gz man/man1/msgcmp.1.gz man/man1/msgcomm.1.gz man/man1/msgconv.1.gz man/man1/msgen.1.gz man/man1/msgexec.1.gz man/man1/msgfilter.1.gz man/man1/msgfmt.1.gz man/man1/msggrep.1.gz man/man1/msginit.1.gz man/man1/msgmerge.1.gz man/man1/msgunfmt.1.gz man/man1/msguniq.1.gz man/man1/ngettext.1.gz man/man1/xgettext.1.gz man/man3/bind_textdomain_codeset.3.gz man/man3/bindtextdomain.3.gz man/man3/dcgettext.3.gz man/man3/dcngettext.3.gz man/man3/dgettext.3.gz man/man3/dngettext.3.gz man/man3/gettext.3.gz man/man3/ngettext.3.gz man/man3/textdomain.3.gz bin/autopoint bin/gettext bin/gettextize bin/msgattrib bin/msgcat bin/msgcmp bin/msgcomm bin/msgconv bin/msgen bin/msgexec bin/msgfilter bin/msgfmt bin/msggrep bin/msginit bin/msgmerge bin/msgunfmt bin/msguniq bin/ngettext bin/xgettext include/libintl.h info/gettext.info lib/libgettextlib-0.11.5.so lib/libgettextlib.so lib/libgettextsrc-0.11.5.so lib/libgettextsrc.so lib/libintl.a lib/libintl.so lib/libintl.so.4 libdata/gettext/hostname libdata/gettext/project-id libdata/gettext/urlget libdata/gettext/user-email share/aclocal/codeset.m4 share/aclocal/gettext.m4 share/aclocal/glibc21.m4 share/aclocal/iconv.m4 share/aclocal/intdiv0.m4 share/aclocal/inttypes-pri.m4 share/aclocal/inttypes.m4 share/aclocal/inttypes_h.m4 share/aclocal/isc-posix.m4 share/aclocal/lcmessage.m4 share/aclocal/lib-ld.m4 share/aclocal/lib-link.m4 share/aclocal/lib-prefix.m4 share/aclocal/progtest.m4 share/aclocal/stdint_h.m4 share/aclocal/uintmax_t.m4 share/aclocal/ulonglong.m4 share/doc/gettext/autopoint.1.html share/doc/gettext/bind_textdomain_codeset.3.html share/doc/gettext/bindtextdomain.3.html share/doc/gettext/gettext.1.html share/doc/gettext/gettext.3.html share/doc/gettext/gettext_1.html share/doc/gettext/gettext_10.html share/doc/gettext/gettext_11.html share/doc/gettext/gettext_12.html share/doc/gettext/gettext_13.html share/doc/gettext/gettext_14.html share/doc/gettext/gettext_15.html share/doc/gettext/gettext_16.html share/doc/gettext/gettext_17.html share/doc/gettext/gettext_18.html share/doc/gettext/gettext_19.html share/doc/gettext/gettext_2.html share/doc/gettext/gettext_20.html share/doc/gettext/gettext_21.html share/doc/gettext/gettext_22.html share/doc/gettext/gettext_3.html share/doc/gettext/gettext_4.html share/doc/gettext/gettext_5.html share/doc/gettext/gettext_6.html share/doc/gettext/gettext_7.html share/doc/gettext/gettext_8.html share/doc/gettext/gettext_9.html share/doc/gettext/gettext_foot.html share/doc/gettext/gettext_toc.html share/doc/gettext/gettextize.1.html share/doc/gettext/msgattrib.1.html share/doc/gettext/msgcat.1.html share/doc/gettext/msgcmp.1.html share/doc/gettext/msgcomm.1.html share/doc/gettext/msgconv.1.html share/doc/gettext/msgen.1.html share/doc/gettext/msgexec.1.html share/doc/gettext/msgfilter.1.html share/doc/gettext/msgfmt.1.html share/doc/gettext/msggrep.1.html share/doc/gettext/msginit.1.html share/doc/gettext/msgmerge.1.html share/doc/gettext/msgunfmt.1.html share/doc/gettext/msguniq.1.html share/doc/gettext/ngettext.1.html share/doc/gettext/ngettext.3.html share/doc/gettext/textdomain.3.html share/doc/gettext/xgettext.1.html share/emacs/site-lisp/po-compat.el share/emacs/site-lisp/po-mode.el share/gettext/ABOUT-NLS share/gettext/archive.tar.gz share/gettext/config.rpath share/gettext/gettext.h share/gettext/intl/COPYING.LIB-2.0 share/gettext/intl/COPYING.LIB-2.1 share/gettext/intl/ChangeLog share/gettext/intl/Makefile.in share/gettext/intl/VERSION share/gettext/intl/bindtextdom.c share/gettext/intl/config.charset share/gettext/intl/dcgettext.c share/gettext/intl/dcigettext.c share/gettext/intl/dcngettext.c share/gettext/intl/dgettext.c share/gettext/intl/dngettext.c share/gettext/intl/eval-plural.h share/gettext/intl/explodename.c share/gettext/intl/finddomain.c share/gettext/intl/gettext.c share/gettext/intl/gettextP.h share/gettext/intl/gmo.h share/gettext/intl/hash-string.h share/gettext/intl/intl-compat.c share/gettext/intl/l10nflist.c share/gettext/intl/libgnuintl.h share/gettext/intl/loadinfo.h share/gettext/intl/loadmsgcat.c share/gettext/intl/localcharset.c share/gettext/intl/locale.alias share/gettext/intl/localealias.c share/gettext/intl/localename.c share/gettext/intl/ngettext.c share/gettext/intl/os2compat.c share/gettext/intl/os2compat.h share/gettext/intl/osdep.c share/gettext/intl/plural-exp.c share/gettext/intl/plural-exp.h share/gettext/intl/plural.c share/gettext/intl/plural.y share/gettext/intl/ref-add.sin share/gettext/intl/ref-del.sin share/gettext/intl/textdomain.c share/gettext/mkinstalldirs share/gettext/msgunfmt.tcl share/gettext/po/Makefile.in.in share/gettext/po/Makevars share/gettext/po/Rules-quot share/gettext/po/boldquot.sed share/gettext/po/en@boldquot.header share/gettext/po/en@quot.header share/gettext/po/insert-header.sin share/gettext/po/quot.sed share/gettext/po/remove-potcdate.sin share/gettext/projects/GNOME/team-address share/gettext/projects/GNOME/teams.html share/gettext/projects/GNOME/teams.url share/gettext/projects/GNOME/trigger share/gettext/projects/KDE/team-address share/gettext/projects/KDE/teams.html share/gettext/projects/KDE/teams.url share/gettext/projects/KDE/trigger share/gettext/projects/TP/team-address share/gettext/projects/TP/teams.html share/gettext/projects/TP/teams.url share/gettext/projects/TP/trigger share/gettext/projects/index share/gettext/projects/team-address share/locale/be/LC_MESSAGES/gettext.mo share/locale/ca/LC_MESSAGES/gettext.mo share/locale/cs/LC_MESSAGES/gettext.mo share/locale/da/LC_MESSAGES/gettext.mo share/locale/de/LC_MESSAGES/gettext.mo share/locale/el/LC_MESSAGES/gettext.mo share/locale/en@boldquot/LC_MESSAGES/gettext.mo share/locale/en@quot/LC_MESSAGES/gettext.mo share/locale/es/LC_MESSAGES/gettext.mo share/locale/et/LC_MESSAGES/gettext.mo share/locale/fi/LC_MESSAGES/gettext.mo share/locale/fr/LC_MESSAGES/gettext.mo share/locale/gl/LC_MESSAGES/gettext.mo share/locale/id/LC_MESSAGES/gettext.mo share/locale/it/LC_MESSAGES/gettext.mo share/locale/ja/LC_MESSAGES/gettext.mo share/locale/ko/LC_MESSAGES/gettext.mo share/locale/locale.alias share/locale/nl/LC_MESSAGES/gettext.mo share/locale/nn/LC_MESSAGES/gettext.mo share/locale/no/LC_MESSAGES/gettext.mo share/locale/pl/LC_MESSAGES/gettext.mo share/locale/pt/LC_MESSAGES/gettext.mo share/locale/pt_BR/LC_MESSAGES/gettext.mo share/locale/ru/LC_MESSAGES/gettext.mo share/locale/sk/LC_MESSAGES/gettext.mo share/locale/sl/LC_MESSAGES/gettext.mo share/locale/sv/LC_MESSAGES/gettext.mo share/locale/tr/LC_MESSAGES/gettext.mo share/locale/zh_TW/LC_MESSAGES/gettext.mo tar command returns 0 status Done. Finished loading gettext-0.11.5_1 over FTP. Package `gettext-0.11.5_1' depends on `libiconv-1.8_2'. pkg_add: could not find package libiconv-1.8_2 ! Package `gettext-0.11.5_1' depends on `expat-1.95.5'. pkg_add: could not find package expat-1.95.5 ! pkg_add: 1 package addition(s) failed pkg_add: pkg_add of dependency `gettext-0.11.5_1' failed! pkg_add: 1 package addition(s) failed > exit exit Script done on Tue Jan 7 16:15:03 2003 >How-To-Repeat: As a non-root user, try and install into a prefix using pkg_add's -p parameter. >Fix: Index: perform.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/pkg_install/add/perform.c,v retrieving revision 1.73 diff -u -3 -p -r1.73 perform.c --- perform.c 2002/09/03 06:59:33 1.73 +++ perform.c 2003/01/07 16:17:05 @@ -280,7 +280,8 @@ pkg_do(char *pkg) if (cp) { if (Verbose) printf("Loading it from %s.\n", cp); - if (vsystem("pkg_add %s'%s'", Verbose ? "-v " : "", cp)) { + if (vsystem("pkg_add -p %s %s'%s'", + Prefix ? Prefix : "/usr/local/", Verbose ? "-v " : "", cp)) { warnx("autoload of dependency '%s' failed%s", cp, Force ? " (proceeding anyway)" : "!"); if (!Force) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message