[Yum] Readonly Repo - createrepo a folder up.
Fajar A. Nugraha
fajar at fajar.net
Wed Feb 13 08:49:58 UTC 2008
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3242 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.baseurl.org/pipermail/yum/attachments/20080213/a080b35d/attachment-0001.bin
More information about the Yum
mailing list