You are not logged in.

#1 2004-04-21 19:07:08

Aletheuo
Member
Registered: 2004-03-26
Posts: 59

Is there a way to create a local package repository

Is there a way to create a local package repository without technically being a mirror.  For example, setting up multiple AL box's on my network and having them grab all the latest packages from one AL box?

Thanks,
Craig


Arch Linux (Duke)
JabberID:  cgill27@jabber.org
IRC: Aletheuo
Registered Linux User #354975

Offline

#2 2004-04-21 22:58:45

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Is there a way to create a local package repository

Yep, most of the developers do this, as we have multiple Arch boxes so it saves bandwidth in the long run.

You can rsync from rsync.archlinux.org, then point your pacman to the new repo.

# rsync -av --delete rsync.archlinux.org::current /home/ftp/current

The current target will pull all packages in Current.  You can also use the extra target to pull Extra packages, and the ftp target to pull everything a mirror would.

Offline

#3 2004-04-21 23:09:22

Aletheuo
Member
Registered: 2004-03-26
Posts: 59

Re: Is there a way to create a local package repository

That sounds like just what I need, Thanks!

Craig


Arch Linux (Duke)
JabberID:  cgill27@jabber.org
IRC: Aletheuo
Registered Linux User #354975

Offline

#4 2004-06-02 18:08:04

chane
Member
Registered: 2003-12-02
Posts: 93

Re: Is there a way to create a local package repository

I'm also trying to create a local pacman repo.  I've been able to get rsync to work just fine (thanks apeiro for the command).  However, I'm wondering if there is a way to create a local repo with only some of the packages (and their depends) from the Arch Repository. 

For example, I run server programs (apache, mysql) only and do not run any guis (KDE/GNOME).  So if possible, I would create my local repo and copy in the packages I need (and supplement with my own custom built packages that are not in the Arch repos).

We are also evaluating the possiblity of running Arch on the desktop.  If we do that, we want a local repo for a couple of reasons
- testing before rolling out new verison of package X
- limit options to end users so we can support it better (e.g., only 1 GUI)
- download bandwidth (initial users base will be smallish 20; but could grow)

We are trying to specify which packages can be installed for a given set of boxes/users and would like to do this with a repository we maintain local. 

Thoughts on how to grab the latest of package X and put it into our local repo would be appreciated.  This is probably a simple question; but I'm coming from a windows environment and learning Linux as we go.... 

Thanks in advance,
Chris....

Offline

#5 2004-06-02 20:16:22

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: Is there a way to create a local package repository

to setup a local repo that varies in some ways to the official arch repos you can look at the pacman manpage as there are some details there. i have never looked but there may also be pointers in the documantation wiki.


AKA uknowme

I am not your friend

Offline

#6 2004-06-03 17:50:05

Aletheuo
Member
Registered: 2004-03-26
Posts: 59

Re: Is there a way to create a local package repository

I use the rsync method mentioned above and it has worked great.

Thanks!
Craig


Arch Linux (Duke)
JabberID:  cgill27@jabber.org
IRC: Aletheuo
Registered Linux User #354975

Offline

#7 2004-06-04 08:39:09

Gyroplast
Member
From: Germany
Registered: 2002-09-03
Posts: 166
Website

Re: Is there a way to create a local package repository

What you most likely want is an ABS tree of your own, containing only the PKGBUILDs of those packages which you want to be included in your repository.

You should already have heard of the gensync program. In short, the parameters are the root of PKGBUILDs, sorted in subdirectories (ie. like the ABS tree), the intented name and location of the repository database file, and the directory containing the binary packages.

Let's assume you downloaded the current ABS tree to your hard drive, as well as all matching (same version as in the PKGBUILDs!) packages from a mirror, but you don't want the reiserfsprogs package in your repository. To achieve that, you must remove the /var/abs/base/reiserfsprogs directory, and may optionally remove the binary package, too. Since gensync analyzes the ABS tree you supplied as a parameter, removing the subdirectory of a specific package will cause this very package to not be included in the generated database. Assuming your packages lie in /home/arch/i686/current, your gensync call would look like this:

gensync /var/abs /home/arch/i686/current/current.db.tar.gz /home/arch/i686/current

If there are any discrepancies like
  - PKGBUILD, but no matching binary package found
  - PKGBUILD and binary package versions do not match
  - permission problems (writing the db file must be possible)

gensync will gladly complain.
Otherwise you should find the db file in the place you specified. Keep in mind that the name of the db.tar.gz file must be equal to the repository tag in the pacman.conf to use the repo.

To make sure the db contains the right packages; use

tar -tzf current.db.tar.gz | less

to list the contents. Every package has it's own subdirectory including the metadata, which is rather obvious considering the file's generated from such a structure in the first place.

The binary packages along with a correctly generated db file are all you need. Make the repository directory containing these files available through FTP if local availability doesn't cut it for you, edit your pacman.conf if needed, and use it!

Adding packages works similar; All you need to have is the PKGBUILD in an ABS-like tree (it doesn't have to be the official tree; gensync doesn't care where the files come from. Just stick to one subdirectory per PKGBUILD, and you'll be fine), and the matching packages somewhere else, run gensync with the appropriate directories, and cackle with glee.

HTH.


"That's the problem with good advice. Nobody wants to hear it."
-- Dogbert

Offline

#8 2004-06-04 14:56:25

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Is there a way to create a local package repository

Gyroplast --> somebody needs to wiki this. wink

Dusty

Offline

#9 2004-06-04 16:40:50

chane
Member
Registered: 2003-12-02
Posts: 93

Re: Is there a way to create a local package repository

Gyroplast

Thank you, that was a fantastic response.  I had already started to try and figure out how to do it with ABS and you gave me the plan!  I'm going to try it now.....

Thanks again,
Chris....

Offline

#10 2005-03-25 18:17:55

PAPPPmAc
Member
From: Kentucky
Registered: 2003-07-07
Posts: 21

Re: Is there a way to create a local package repository

cooper2k4, you've got it doing exactly what i need for the i586 project (going on in the CD/FTP Instalation section of the forum, becuase thats where it started). How did you define warning() in the script so that it would skip the current package?

Offline

Board footer

Powered by FluxBB