- http://wiki.rpath.com/wiki/Conary:Repository
- http://wiki.rpath.com/wiki/FAQ:Mirror_Standalone_Conary_Repositories
- http://wiki.rpath.com/wiki/FAQ:How_to_Mirror_an_rBuilder_Online_Repository
- install
libelf-lgpl(http://www.mr511.de/software/libelf-0.8.13.tar.gz) - install
conary(ftp://download.rpath.com/pub/rpath/conary/conary-2.3.6.tar.bz2) - install
httpd,mod_python
-
write
/etc/httpd/conf.d/python-conary.conf(named python-conary.conf so that it's started after mod_python's python.conf) (suppose we want to put the mirror under/srv/conary)# cat /etc/httpd/conf.d/python-conary.conf Alias /conary/ "/srv/conary/config/repository.cnr/" <Directory /srv/conary/config/> AddHandler python-program .cnr PythonHandler conary.server.apachehooks </Directory> # You may also find it useful to redirect /conary to /conary/, but if you # do, make sure you have trailing slashes in your repository Map entries. RedirectMatch /conary$ /conary/
-
mkdir -p /srv/conary/{config,contents,db,tmp} -
write
/srv/conary/config/repository.cnr# cat /srv/conary/config/repository.cnr repositoryDB sqlite /srv/conary/db/sqldb contentsDir /srv/conary/contents tmpDir /srv/conary/tmp readOnlyRepository true # this is the hostname part of the label, not the hostname of the machine # so on both conary.rpath.com and on conary-mirror.rpath.com, this # is "serverName conary.rpath.com". This can also be a list if your repository # serves more than one label. serverName jesse.rpath.org -
create users
/usr/lib64/python2.7/site-packages/conary/server/server.py --add-user admin --admin --config-file /srv/conary/config/repository.cnr /usr/lib64/python2.7/site-packages/conary/server/server.py --add-user anonymous --config-file /srv/conary/config/repository.cnr -
ensure the db and the dirs are writable by apache
chown :apache /srv/conary/db/sqldb /srv/conary/tmp/ /srv/conary/contents/ /srv/conary chmod g+w /srv/conary/db/sqldb /srv/conary/tmp/ /srv/conary/contents/ /srv/conary/ -
install
conary-web-common(ftp://download.rpath.com/pub/rpath/conary/conary-web-common-1.0.tar.bz2) -
touch /usr/share/conary/web-common/css/custom.css# to get rid of a 404 warning
After the repository is set up, you could mirror another repository into this one.
Suppose the hostname of the your server is repo.test.org, and you want to mirror jesse.rpath.org. Your repository should have been configured to serve jesse.rpath.org (serverName in the above repository.cnr).
-
write a
mirror.conf# cat do-mirror/mirror.conf host jesse.rpath.org [source] user jesse.rpath.org jesse XXXXX [target] user jesse.rpath.org admin XXXXX repositoryMap jesse.rpath.org http://repo.test.org/conary/ -
populate it
/usr/share/conary/mirror -v --config-file mirror.conf
-
Make sure the database file and the directory are writable (and the directory is executable/searchable) by apache. Or else there might be:
DatabaseError: unable to open database file