Date: Mon, 13 Sep 2004 12:47:48 -0500 From: "Jacques A. Vidrine" <nectar@FreeBSD.org> To: Dan Langille <dan@langille.org> Cc: freebsd-vuxml@freebsd.org Subject: Re: Matching a name to a port Message-ID: <20040913174748.GC71191@madman.celabo.org> In-Reply-To: <20040913123610.G22240@xeon.unixathome.org> References: <20040913123610.G22240@xeon.unixathome.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 13, 2004 at 01:33:22PM -0400, Dan Langille wrote: > I'm trying to match vuln.xml information against actual ports. To do > this, I need to know how the entries in the <name> field are derived. > > I first thought it might be PORTNAME. But that's not the case. I now > think it might be ${PKGNAMEPREFIX}${PORTNAME}$. ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} See the definition of PKGNAME in bsd.port.mk. It is PKGNAME minus the version information. > If am i correct, then I have some questions about the following entries. > > What ports do the following refer to? > > iaskmpd security/isakmpd > ImageMagick-nox11 graphics/ImageMagick > ja-netscape7 japanese/netscape7 > libtool depends, could be devel/libtool13 or devel/libtool15, or even the no-longer-existent devel/libtool or devel/libtool14 > mod_php4-twig www/mod_php4-twig > mpg123-esound > mplayer-esound > mplayer-gtk > mplayer-gtk-esound multimedia/mplayer > mysql-client > mysql-scripts > mysql-server depends, could be any of the database/mysql*-(client|scripts|server) ports. > The answers may be obvious to the trained eye, but how does one write code > against this? Ports are re-named, moved, removed. I'm not sure that it can be done exactly other than by what I suggested previously: a database of the "history" of package names. IIRC, portupgrade uses ad hoc heuristics to guess the port origin from the package name, when the ORIGIN comment is not usable for some reason. The dichotomy of package name and port origin has always been a troublesome aspect of the FreeBSD Ports collection :-( Cheers, -- Jacques Vidrine / nectar@celabo.org / jvidrine@verio.net / nectar@freebsd.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040913174748.GC71191>