Re: Local mirror of pear channels

From: Date: Mon, 15 Sep 2008 21:57:49 +0000
Subject: Re: Local mirror of pear channels
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29266@lists.php.net to get a copy of this message
On Mon, Sep 15, 2008 at 12:19 PM, Ruben Bloemgarten <ruben@abubble.nl> wrote: > Brett Bieber wrote: >> >> Hi >> >> On Fri, Sep 12, 2008 at 6:18 AM, Ruben Bloemgarten <ruben@abubble.nl> >> wrote: >> >>> >>> Hi all, >>> >>> I was wondering if there is a preferred way of setting up a local copy of >>> the pear channels. The reason I want to do this is because I want greater >>> control on the installed packages on the systems in my network, similar >>> to >>> using a local repository for application packages. >>> >> >> I don't believe we have an official method for setting up a local mirror >> yet. >> >> The quickest way to get something working in the short term is to just >> download the individual packages you need and have local copies of the >> .tgz files then install with pear install ThisPackage-0.1.0.tgz >> >> There is a command called download-all, which will download all the >> latest releases of packages on the server.. which I've used in some >> instances with other channels. Downloading all the packages from >> pear.php.net will give you hundreds of packages and take quite a while >> - so this may not be advisable. >> >> You best bet would be to just download the individual packages >> necessary, and then use pear install Package1.tgz Package2.tgz >> Package3.tgz and so on to just install from the local filesystem. >> >> > > Hmm, so I guess i could use download-all to grab the packages, set up local > channels somewhere on the network and use dns/hosts to point the channels I > downloaded to that location. Or I could nfs export the package repository > and use the pear install NAME.tgz method. Thanks for the think-along. The > main problem I see with the nfs method would be dealing with dependencies, > or is dependency information contained in the packages themselves ? > Dependency information is contained within the packages themselves. There is a file in the .tgz called package.xml and it contains all the dependency information the installer will use to determine what to do. If you know which packages you'll need, you can just download the necessary packages and install them on the machine. I assume you have one machine you want to replicate the registry from? To find out which packages you need, you can use pear list. Some combination like this will get you a .tgz for the latest version of all the installed packages. pear list | awk '{print $1}' | grep -v "INSTALLED" | grep -v "PACKAGE" | grep -v "==" | xargs -n 1 pear download Then install them all with: pear install *.tgz or some more forceful methods: pear install --nodeps *.tgz pear install -f *.tgz :-D -- Brett Bieber http://saltybeagle.com/

« previous php.pear.general (#29266) next »