Subject: Re: Volunteers wanted for NetBSD-FreshPorts interface
To: Hubert Feyrer <hubert@feyrer.de>
From: Dan Langille <dan@langille.org>
List: tech-pkg
Date: 12/28/2000 15:55:18
On 28 Dec 2000, at 3:50, Hubert Feyrer wrote:

> On Thu, 28 Dec 2000, Dan Langille wrote:
> > http://freshports.org/docs/cvs_commits.dtd
> > http://freshports.org/docs/commits.xml
> 
> Just making a few uneducated comments - I'm not very familiar with XML and
> esp. DTD language:

Neither am I, so I've forwarded your comments to the person doing the XML work.  
He'll see it when he gets back to the office.

> Hum, sounds like some fiddling, but as long as I'm not the one who has to
> do it... ;-)

Well, it was done first with awk (that's what FreshPorts uses now) and 
now with perl (that's what it will use when the XML goes live).

> > FreshPorts needs to know if any of the following have changed: 
> > Makefile, pkg-descr, pkg-comment.  They contain information which 
> > FreshPorts provides via the website.  If those files change, they need to 
> > bed extracted from the online repository and used to update the 
> > FreshPorts database.
> 
> OK. Please note that NetBSD still uses the "old" FreeBSD layout
> (pkg/DESCR, patches/patch-*, ...). 

Thanks.  That should be easily catered for.  These files are only 
referenced during the import of the XML.  And each XML dataset 
identifies the operating system from which it came.

> > BTW: once a commit is done, are the files immediately avaiable via 
> > CVSweb?
> 
> No. I don't know how often cvsweb is updated, sorry. 

Hmmm, that may be a sticking point.  FreshPorts assumes it can grab 
the updated failes as soon as the commit message arrives.

> Anoncvs is update every 6 hours or so. And I think for what you wand
> (push-based updating), anoncvs would be best. At least the "cvs
> rdiff" commands in the NetBSD commit mails can be used 1:1 to retrieve
> patches. ;-)

Why would anoncvs be best?  At present, when a commmit message is 
received, the code does a fetch http://www.freebsd.org/...etc and grabs 
the latest file as needed.  This doesn't happen for every commit (only 
those which involve the three files mentioned above).

> There's an archive of NetBSD commit messages at
> http://mail-index.netbsd.org/source-changes, the pkgsrc commits all have a
> subject of "CVS commit: pkgsrc". If you or whoever works on the mail2xml
> script wants to take a stab at parsing that, that would be cool. I figure
> it's probably rather easy to adopt an existing script, esp. when you're
> familiar with it.  Ascii versions of these mails can be fetched from the
> (outdated :/) archive at
> ftp://ftp.netbsd.org/pub/NetBSD/mailing-lists/source-changes/.

Thanks.  I'm sure that the code for the FreeBSD => XML interface can 
be released as a starting point.

> One difference between the message formats just came to me - NetBSD does
> not have a lines changed "-lines +lines" entry anywhere in that mail. 

That's not necessary for FreshPorts.  We have included more in the 
DTD than is actually necessary.

> Let me know if I can be of any help... 

You have been helpful already.  thanks.

--
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/
       FreshPorts - http://freshports.org/
     NZ Broadband - http://unixathome.org/broadband/