LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   How to build a local repository with apt (RH 9) ? (https://www.linuxquestions.org/questions/red-hat-31/how-to-build-a-local-repository-with-apt-rh-9-a-108753/)

hadding 10-26-2003 01:55 PM

How to build a local repository with apt (RH 9) ?
 
Hi all,

I grabbed all the rpms from the apt cache & have them stored in a local dir "Updates". I would like to be able to use that directory in sources.list with file:/...... .
I read the various man pages & played around a bit but now am stuck. I used genbasedir wich, if I understand correctly, is supposed the generate my pkglist stuff but apt-get still complains. What is the dir structure I need to set up ? What commands do I have to execute to create all the metadata stuff ? How do I know wich package goes with wich component eg os release update etc ? And ,finally, how do I get sources.list to point at my local repository ?


Thanks in advance

BTW Great forums. This is the first time I've ever had to ask a question

:p

hadding 10-26-2003 09:44 PM

Well looks like I get to answer my own question :D

I thought I'd post this in case anyone else wants to do the same thing.

# mkdir /root/rh9 // Use any name ya want I just use rh9

# cd /root/rh9

# mkdir base // Important. This is where all your pkglist stuff will go later

# mkdir RPMS.updates //Important. Directory for your rpms. Name has to be in the form
// RPMS.(x) common ones are update, os, freshrpms, etc

# genbasedir --topdir=/ root/rh9 updates // This command scans RPMS.updates
// builds all the pkglist stuff & puts it in base

Components: updates
Processing pkglists... updates [done]
Processing srclists... [done]
Creating component releases... [done]
Updating global release file... [done]
Appending MD5Sum... updates [done]
All your base are belong to us!!!
[root@localhost root]#

open /etc/apt/sources.list in your favorite editor & add the line -

"rpm file:/root/ rh9 updates" // Change root, rh9, and updates for the dir structure you
// created above

# apt-get update

Reading Package Lists... Done
Building Dependency Tree... Done
[root@localhost root]#

That's it. Hope it was at least a little informative.

hadding 10-26-2003 09:59 PM

While I'm thinking of it here's a couple links that helped me out

http://bazar.conectiva.com.br/~godoy...wto/index.html

http://freshrpms.net/apt/

hadding 10-27-2003 12:36 AM

Boy here I go again. Just love talkin to myself :D Oh, what the hell it's late I can't sleep & I really hate having little nagging problems hanging around.

Found a quicker way to do the above (guess --topdir is depreceated)

[root@localhost root]# genbasedir --bloat --progress /root/rh9 updates
Components: updates
Processing pkglists... updates0277/0277 [done]
Processing srclists... [done]
Creating component releases... [done]
Updating global release file... [done]
Appending MD5Sum... updates [done]
All your base are belong to us!!!
[root@localhost root]#

The --bloat directive is needed for most non-Conectiva distros (especially RH). Something about "file dependencies with a non-predictable heuristic".

Once you've done the above all you have to do to maintain your repository is to copy your new stuff to your component dir's & run -

[root@localhost root]# genpkglist --bloat --progress /root/rh9 updates

All of this is for binary RPM. I think that there is a slightly different syntax when dealing with source. (at least for deb's)


All times are GMT -5. The time now is 06:16 PM.