This Project was intended to produce a web front-end to set of scripts that allowed users to search local RPM repositories based on a set of specified criteria.

Work Done

Investigated various perl modules for yum (such as YUM-RepoQuery) to see if these would be of any use, and also looked at "repoquery" - but eventually decided that it was easier to query the primary.sqlite databases directly via SQL commands, than to use the yum libraries via repoquery.

Set up VM as test server, and wrote perl scripts to do the work of getting search parameters, looking through repositories and generating web page responses.

Created configuration file to allow specification of supported OSes and default OS, which abstracts OS-dependencies from main scripts.

Wrote cron scripts to update local, searchable, copies of repositories (as required by configuration file) and to generate list of currently-supported software groups (extracted from local repositories). Local repository namespace is normalised to make searching easier.

Packaged files:

  • /disk/home/pkgsearchd/pkgsearch-os.cfg (main configuration file)
  • /etc/cron.d/ (cron job to update software groups list)
  • /etc/cron.d/ (cron job to create local repository structure)
  • /var/www/cgi-bin/pkginfo (CGI script to display package details)
  • /var/www/cgi-bin/pkgsearch (CGI script to search repositories and display matches)
  • /var/www/html/pkgsearch-index.html (redirect page)
  • /var/www/html/pkgsearch.shtml (start page)

Created files and directories:

  • /disk/home/buckets (repository list)
  • /disk/home/repos (local repository structure)


If made available outside Informatics, access controls should be put in place to prevent harvesting of package information that might present a security risk.


Time-consuming, but including lots of CPD excursions. About 25 days in total.


An interesting foray into perl and DB queries, producing a useful application with positive user feedback.


No additional documentation other than the user guidelines on the web pages and comments in the code.

-- RogerBurroughes - 21 May 2013

Topic revision: r3 - 21 May 2013 - 11:05:00 - RogerBurroughes
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies