Bug 176625

Summary: New Port: ports-mgmt/prhistory-sync-perl Sync GNATS PR db (ports) and create SQLite3 Summary for prhistory program
Product: Ports & Packages Reporter: Waitman Gobble <uzimac>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed Overcome By Events    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.shar none

Description Waitman Gobble 2013-03-03 21:50:00 UTC
This software contains two PERL5 scripts.

sync-gnats-ports.pl <DESTDIR>

This program uses rsync to mirror the FreeBSD GNATS PR database (ports only) to
<DESTDIR>. It sets a 'lock' file in /tmp so that it will not run multiple
simultaneous instances. You should probably add 'rm -f /tmp/pr-up-running'
to your /etc/rc.local to solve problems that may happen on power loss, or
reboot.

parse-gnats-ports.pl <DESTDIR>

This program parses summary information from the PR files and builds an
SQLite3 database for the ports-mgmt/prhistory port. The database file is
stored in /var/db/ports/ports-pr.db. Also it creates a file 
/var/db/ports/lastrun.txt
to remember the last update, so it will only operate on new information.
If you delete /var/db/ports/lastrun.txt it will cause the script to reparse all
PR files and rebuild the /var/db/ports/ports-pr.db file.

<DESTDIR>

This should be an existing path to store the PR files. (presently requires
approximately 1.5GB of storage space).

example:

> mkdir /b
> sync-gnats-ports.pl /b

Fix: thanks

Patch attached with submission follows:
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2014-06-06 05:10:46 UTC
I'm sorry we never got to this submission in time.  I suspect is now OBE.