From owner-freebsd-questions@FreeBSD.ORG Sun Jun 1 12:21:38 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92DE937B401 for ; Sun, 1 Jun 2003 12:21:38 -0700 (PDT) Received: from hermes.pressenter.com (hermes.pressenter.com [209.224.20.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACAB543F85 for ; Sun, 1 Jun 2003 12:21:37 -0700 (PDT) (envelope-from nospam@hiltonbsd.com) Received: from [209.224.36.144] (helo=daggar.sbgnet.net) by hermes.pressenter.com with smtp (Exim 3.16 #1) id 19MYOd-0002v8-00; Sun, 01 Jun 2003 14:21:36 -0500 Date: Sun, 1 Jun 2003 14:21:02 -0500 From: Stephen Hilton To: epbox@yandex.ru Message-Id: <20030601142102.6ebb409c.nospam@hiltonbsd.com> In-Reply-To: <200305270901.17203.epbox@yandex.ru> References: <200305270901.17203.epbox@yandex.ru> X-Mailer: Sylpheed version 0.9.0 (GTK+ 1.2.10; i386-portbld-freebsd4.8) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: "pkg_add -r ..." from a url other than the default (using PACKAGESITE, PACKAGEROOT or smth. else) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2003 19:21:38 -0000 On Tue, 27 May 2003 09:01:16 +0400 Vladik Kozin wrote: > What if I'd like the "pkg_add -r" to work exactly the same way as it does by > default but using an alternative url? Now, let say, there is a url: > "ftp://fbsd.local/" with the following directory structure > "pub/unix/FreeBSD/ports/i386/packages-4.8-release/". I'd like to tell > "pkg_add -r foopackage" and have it installed with all its dependencies from > the url mentioned above. As far as I understand the PACKAGESITE var specifies > the exact path to the package, thus if the "/sysutils/foopackage.tgz" depends > on "/lang/foodep.tgz" then the latter won't be retrieved and the pkg_adding > process will fail. Probably I need to use the PACKAGEROOT var? But in this > case the site I intend to use is supposed to have some specific "default > FreeBSD" structure, isn't it? In my case > "/FreeBSD/ports/i386/packages-4.8-release/" is a commonly used structure, but > it is prefixed by "/pub/unix/". > Any ideas about how to solve the problem? If the packages are on a box you control and you are using the portupgrade tool, then here is what I did for a FreeBSD 4-STABLE setup: Set up anonymous ftp on the "package building" box with a directory structure like this: /var/ftproot/pub/FreeBSD/ports/i386/packages-4-stable Set the home for the anonymous ftp user with vipw: ftp:*:14:14:ftp:0:0:Mr. Anonymous FTP:/var/ftproot:/nonexistent Create a sym link so when the packages are built they are available in /var/ftproot/pub/FreeBSD/ports/i386/packages-4-stable. ln -s /var/ftproot/pub/FreeBSD/ports/i386/packages-4-stable /usr/ports/packages Build the packages for the rest of the local machines. On the machine seeking the packages I add this to the /usr/local/etc/pkgtools.conf file: ENV['PKG_PATH'] = '/All' ENV['PACKAGEROOT'] = 'ftp://mypackagemachine.mynet.net' So now on my local machine that I want to install "foo-package" I can: portupgrade -NviPPr www/foo-package And it will install a package from "mypackagemachine.mynet.net" If the package is not there it errors out with a descriptive message. Regards, Stephen Hilton nospam@hiltonbsd.com