Changing package repository

Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

Changing package repository

Postby rahulsinner » 20 Apr 2009, 08:52

Hi,

How do I change the package repository for pkg_add/portupgrade? I tried defining PACKAGEROOT:

Code: Select all
$export PACKAGEROOT="ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/All/"


But it still won't listen and spit out following crap:

Code: Select all
Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.0-release/Latest/kde4.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.0-release/Latest/kde4.tbz' by URL


The ftp resources being mentioned does not exist.

I tried changing /usr/local/etc/pkgtools.conf but continued to get same errors:

Code: Select all
ENV['PKG_PATH'] = '/All'
  ENV['PACKAGEROOT'] = 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages'


I read somewhere that pkg_add/portupgrade does some appending to the PACKAGEROOT according to pre-defined rules. The repository I have listed(well, looks like the official repo to me) doesn't follow the naming convention it is searching for.

How do I get it to work?

I am no big fan of ports because it takes enormous amounts of disk space. I alloted 1 GB for ports and compilation(/usr/ports is a symlink to a different file system) and it keeps up filling it. I try to compile a package and it has tens of dependencies. By the time all of them are downloaded and compiled, the package I wanted to install won't install because it runs out of disk space.
rahulsinner
Junior Member
 
Posts: 20
Joined: 19 Apr 2009, 14:30

Postby tangram » 20 Apr 2009, 09:39

Try the PACKAGESITE variable:
Code: Select all
# setenv  PACKAGESITE [url]ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.1-RELEASE/packages/All/[/url]
# pkg_add -r fubar


You can add the variable to your [file].cshrc[/file].
User avatar
tangram
Member
 
Posts: 524
Joined: 17 Nov 2008, 10:22
Location: Portugal

Postby SirDice » 20 Apr 2009, 12:05

rahulsinner wrote:I am no big fan of ports because it takes enormous amounts of disk space. I alloted 1 GB for ports and compilation(/usr/ports is a symlink to a different file system) and it keeps up filling it. I try to compile a package and it has tens of dependencies. By the time all of them are downloaded and compiled, the package I wanted to install won't install because it runs out of disk space.


My /usr/ports is about 4GB and is 97% in use, this includes distfiles but not packages. My build packages are stored separately and is usually somewhere between 600MB and 900MB, depending on what I've build. I've set WRKDIRPREFIX to /tmp/build to keep the clutter out and improve performance somewhat, /tmp is a stripped disk set and is about 6GB. I haven't ran out of disk space yet.

1GB will never cut it. To keep the distfiles in check I regularly run portsclean -D, the clutter is removed by a simple rm -rf /tmp/build/*. Packages are stored separately, I usually mount_nullfs the directory where I store them.
User avatar
SirDice
Old Fart
 
Posts: 16166
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby rahulsinner » 21 Apr 2009, 03:35

tangram wrote:Try the PACKAGESITE variable:
Code: Select all
# setenv  PACKAGESITE [url]ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.1-RELEASE/packages/All/[/url]
# pkg_add -r fubar


You can add the variable to your [file].cshrc[/file].


It worked. Is there a way pkg_add can search for packages on the PACKAGESITE. Like I say "pkg_add -r vlc" and it searches for and installs it. I was thinking something on the lines of other binary package management tools viz. apt-get, yum etc.
rahulsinner
Junior Member
 
Posts: 20
Joined: 19 Apr 2009, 14:30


Return to Installation and Maintenance of FreeBSD Ports or Packages

Who is online

Users browsing this forum: No registered users and 0 guests