From owner-freebsd-questions@FreeBSD.ORG Tue Jul 5 05:52:29 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 956B016A41C for ; Tue, 5 Jul 2005 05:52:29 +0000 (GMT) (envelope-from ws@au.dyndns.ws) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E55743D55 for ; Tue, 5 Jul 2005 05:52:28 +0000 (GMT) (envelope-from ws@au.dyndns.ws) Received: from lillith-iv.ovirt.dyndns.ws (ppp103-111.static.internode.on.net [150.101.103.111]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id j655q6R4059576; Tue, 5 Jul 2005 15:22:08 +0930 (CST) X-Envelope-From: ws@au.dyndns.ws X-Envelope-To: freebsd-questions@freebsd.org Received: from [192.168.1.194] ([192.168.1.194]) by lillith-iv.ovirt.dyndns.ws (8.13.3/8.13.3) with ESMTP id j655pjnY057446; Tue, 5 Jul 2005 15:21:45 +0930 (CST) (envelope-from ws@au.dyndns.ws) From: Wayne Sierke To: Nikolas Britton In-Reply-To: References: <42C03E86.6090509@calarts.edu> Content-Type: text/plain Date: Tue, 05 Jul 2005 15:21:45 +0930 Message-Id: <1120542705.57575.20.camel@au.dyndns.ws> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.51 on 192.168.1.142 X-Scanned-By: SpamAssassin 3.000003(2005-04-27) X-Scanned-By: F-Prot X-Scanned-By: ClamAV X-Spam-Score: -2.82 () ALL_TRUSTED X-Mailman-Approved-At: Tue, 05 Jul 2005 13:29:35 +0000 Cc: Sean Murphy , freebsd-questions@freebsd.org Subject: Re: Questions about packages and ports X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2005 05:52:29 -0000 On Mon, 2005-06-27 at 13:25 -0500, Nikolas Britton wrote: > On a similar note can someone remind me how to set the remote package > site for pkg_add and portupgrade -P? I remember it had something to do > with setenv but don't remember the variable it uses and I've never > used the portupgrade -P option before. It requires a bit of rtfm it seems... $ man -P /bin/cat pkg_add | grep --context=2 -- "-r" what you are doing! -r Use the remote fetching feature. This will determine the appro- priate objformat and release and then fetch and install the pack- age. -- The environment variable PACKAGEROOT specifies an alternate location for pkg_add to fetch from. The fetch URL is built using this environment variable and the automatic directory logic that pkg_add uses when the -r option is invoked. An example setting would be "ftp://ftp3.FreeBSD.org". The environment variable PACKAGESITE specifies an alternate location for pkg_add to fetch from. This variable subverts the automatic directory logic that pkg_add uses when the -r option is invoked. Thus it should be a complete URL to the remote package file(s). $ ( - By the way, if anyone knows a simpler way of achieving that man/grep combination, please tell!) I couldn't find any documented reference as to where to put the env setting, so I presume I must have either stumbled upon it while browsing pkgtools.conf or seen it in an answer here or on a web page somewhere... $ grep --context=2 PACKAGEROOT /usr/local/etc/pkgtools.conf # Equivalent to: # sprintf('%s/pub/FreeBSD/ports/%s/packages-%s/', # root || ENV['PACKAGEROOT'] || 'ftp://ftp.FreeBSD.org', # OS_PLATFORM, OS_PKGBRANCH) # -- # ENV['PKG_FETCH'] = "curl '%s' -o '%s'" # ENV['PKG_FETCH'] = 'false' # never fetch packages from a remote site # ENV['PACKAGEROOT'] = 'ftp://ftpN.XX.FreeBSD.org' ENV['PORTSDIR'] ||= '/usr/ports' ENV['PACKAGES'] ||= ENV['PORTSDIR'] + '/packages' ENV['PKG_PATH'] ||= ENV['PACKAGES'] + '/All' # 20040210 ws - added PACKAGEROOT ENV['PACKAGEROOT'] = 'ftp://ftp.au.FreeBSD.org' # SANITY_CHECK: boolean (default: true) $ You probably worked it out already but I thought this one was worthwhile to toss in to the archives, and perhaps prompt someone to contemplate a revision for the handbook. hth Wayne