Date: Tue, 05 Jul 2005 15:21:45 +0930 From: Wayne Sierke <ws@au.dyndns.ws> To: Nikolas Britton <nikolas.britton@gmail.com> Cc: Sean Murphy <smurphy@calarts.edu>, freebsd-questions@freebsd.org Subject: Re: Questions about packages and ports Message-ID: <1120542705.57575.20.camel@au.dyndns.ws> In-Reply-To: <ef10de9a05062711257a88c0b3@mail.gmail.com> References: <42C03E86.6090509@calarts.edu> <ef10de9a05062711257a88c0b3@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1120542705.57575.20.camel>