8.5. Web browsable repositories with repoview
repoview makes the YUM repository browsable with a number of static HTML pages. It uses the kid templating engine to create the pages so it's customizable. To install it:
# yum install repoview
repoview requires the repository to have the metadata in sqlite file, if it has not, you will get an error like the following.
# repoview /var/www/html/x86_64
Examining repository...Sorry, sqlite files not found in the repository.
Please rerun createrepo with a -d flag and try again.
Correct and rebuild the YUM repository using --database
to generate the sqlite files.
# createrepo --verbose --database -g comps.xml /var/www/html/x86_64
1/14 - dhcp_probe-1.3.0-2.fc13.x86_64.rpm
2/14 - dhcp_probe-debuginfo-1.3.0-2.fc13.x86_64.rpm
3/14 - rubygem-pg-0.9.0-1.fc13.x86_64.rpm
4/14 - dhcp_probe-1.3.0-4.fc13.x86_64.rpm
5/14 - iptables-debuginfo-1.4.5-1.fc12.x86_64.rpm
6/14 - passenger-debuginfo-2.2.15-1.fc13.x86_64.rpm
7/14 - iptables-ipv6-1.4.5-1.fc12.x86_64.rpm
8/14 - dhcp_probe-debuginfo-1.3.0-4.fc13.x86_64.rpm
9/14 - iptables-devel-1.4.5-1.fc12.x86_64.rpm
10/14 - dhcp_probe-debuginfo-1.3.0-3.fc13.x86_64.rpm
11/14 - dhcp_probe-1.3.0-3.fc13.x86_64.rpm
12/14 - dhcp_probe-debuginfo-1.3.0-1.fc13.x86_64.rpm
13/14 - passenger-2.2.15-1.fc13.x86_64.rpm
14/14 - iptables-1.4.5-1.fc12.x86_64.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Starting other db creation: Sun Aug 15 07:52:45 2010
Ending other db creation: Sun Aug 15 07:52:46 2010
Starting filelists db creation: Sun Aug 15 07:52:46 2010
Ending filelists db creation: Sun Aug 15 07:52:46 2010
Starting primary db creation: Sun Aug 15 07:52:46 2010
Ending primary db creation: Sun Aug 15 07:52:48 2010
Sqlite DBs complete
Now it is possible to run repoview
successfully, below is a simple example.
# repoview --title "rubyera repo for F13 x86_64" /var/www/html/x86_64
Examining repository...done
Opening primary database...done
Opening changelogs database...done
Parsing comps.xml...done
Examining state db...done
Collecting letters...done
Writing package dhcp_probe.html
Writing package passenger.html
Writing group rubyera.group.html
Writing package dhcp_probe-debuginfo.html
Writing package passenger-debuginfo.html
Writing group rubyera-debuginfo.group.html
Writing group letter_d.group.html
Writing package iptables.html
Writing package iptables-debuginfo.html
Writing package iptables-devel.html
Writing package iptables-ipv6.html
Writing group letter_i.group.html
Writing group letter_p.group.html
Writing package rubygem-pg.html
Writing group letter_r.group.html
Collecting latest packages...done
Writing index.html...done
# ls
comps.xml
dhcp_probe-1.3.0-2.fc13.x86_64.rpm
...
passenger-2.2.15-1.fc13.x86_64.rpm
repodata
repoview << new directory
rubygem-pg-0.9.0-1.fc13.x86_64.rpm
Pointing a web browser to the /var/www/httml/x86_64/repoview/index.html
file you will get a visual result like the following.