LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-26-2003, 05:33 PM   #1
hadding
Member
 
Registered: Oct 2003
Distribution: Redhat 9
Posts: 40

Rep: Reputation: 15
Question How do I build a local repository using 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
 
Old 10-26-2003, 10:48 PM   #2
hadding
Member
 
Registered: Oct 2003
Distribution: Redhat 9
Posts: 40

Original Poster
Rep: Reputation: 15
Well looks like I get to answer my own question

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.
 
Old 10-26-2003, 11:02 PM   #3
hadding
Member
 
Registered: Oct 2003
Distribution: Redhat 9
Posts: 40

Original Poster
Rep: Reputation: 15
While I'm thinking of it here's a couple links that helped me out

http://bazar.conectiva.com.br/~godo...owto/index.html

http://freshrpms.net/apt/
 
Old 10-27-2003, 01:38 AM   #4
hadding
Member
 
Registered: Oct 2003
Distribution: Redhat 9
Posts: 40

Original Poster
Rep: Reputation: 15
Boy here I go again. Just love talkin to myself 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)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
want to set up local yum repository linmix Linux - Software 4 04-23-2013 04:42 AM
how do I add a local folder as a repository? akudewan Ubuntu 2 09-05-2005 02:35 AM
Problems with apt-get and local repository.... Eux Debian 3 12-12-2004 05:04 PM
how to create a local apt repository bakwas_internet Fedora 3 01-19-2004 03:14 AM
How to build a local repository with apt (RH 9) ? hadding Red Hat 3 10-27-2003 01:36 AM


All times are GMT -5. The time now is 08:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration