Re: Readonly Repo - createrepo a folder up.

"Fajar A. Nugraha" <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
Gerd Bitzer wrote:
> My repo is under '/etc/yum.repos.d/rhel4'
> Meanwhile I have created a symlink from '/etc/yum.repos.d/rhel4/RPMS' pointing to '/mnt/rhel4/RedHat/repodata/RPMS/', and have created new metadata with 
> 'createrepo -p -v -o ./rhel4/ ./rhel4/RPMS/'
> being in '/etc/yum.repos.d'
> Without the '-o /rhel4/' createrepo complained 
> 'Directory /etc/yum.repos.d/rhel4/RPMS must be writable.' Thats ok, because the symlink points to a directory on the DVD. 
>
> This is the metadata:
>
> # ll rhel4/repodata/
> total 8088
> -rw-r--r--  1 root root 1955688 Feb 13 08:03 filelists.xml.gz
> -rw-r--r--  1 root root 5730347 Feb 13 08:03 other.xml.gz
> -rw-r--r--  1 root root  561309 Feb 13 08:03 primary.xml.gz
> -rw-r--r--  1 root root     951 Feb 13 08:03 repomd.xml
> lrwxrwxrwx  1 root root      23 Feb 13 08:21 RPMS -> /mnt/rhel4/RedHat/RPMS/
> # pwd
> /etc/yum.repos.d
>
>   

It's hard.
What I did was I created another direcotory containing symlinks to RPMs 
on the CD/DVD.
something like :

mkdir -p /repo/rhel4
cd /repo/rhel4
for f in `find /mnt/rhel4/RedHat/RPMS/ -name "*.rpm"`;do ln -s $f .;done
createrepo -v .

then create a .repo file under /etc/yum.repos.d with
baseurl=file:///repo/rhel4/

RHEL5 was easier because the Server directory already contains repodata.
BTW, I think /etc/yum.repos.d is intended to store repository config 
files, not to store the actual repositories.

Regards,

Fajar

_______________________________________________
Yum mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum
smime.p7s (application/x-pkcs7-signature, 3.2 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.