Add rss feed support for the FreeBSD security advisories.
Reviewed by: simon
This commit is contained in:
parent
3fde65f11e
commit
513b27c144
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=20998
3 changed files with 85 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
# $FreeBSD: www/en/security/Makefile,v 1.11 2004/01/17 18:58:07 hrs Exp $
|
# $FreeBSD: www/en/security/Makefile,v 1.12 2004/04/13 17:27:43 trhodes Exp $
|
||||||
|
|
||||||
.if exists(../Makefile.conf)
|
.if exists(../Makefile.conf)
|
||||||
.include "../Makefile.conf"
|
.include "../Makefile.conf"
|
||||||
|
@ -10,15 +10,19 @@
|
||||||
DOCS= charter.sgml
|
DOCS= charter.sgml
|
||||||
DOCS+= security.sgml
|
DOCS+= security.sgml
|
||||||
|
|
||||||
INDEXLINK= security.html
|
INDEXLINK= security.html
|
||||||
|
DATA+= advisories.rdf
|
||||||
|
CLEANFILES+= advisories.html.inc advisories.rdf
|
||||||
|
|
||||||
.include "${WEB_PREFIX}/share/mk/web.site.mk"
|
.include "${WEB_PREFIX}/share/mk/web.site.mk"
|
||||||
|
|
||||||
CLEANFILES+= advisories.html.inc
|
security.html: advisories.html.inc advisories.rdf
|
||||||
|
|
||||||
security.html: advisories.html.inc
|
|
||||||
|
|
||||||
advisories.html.inc: mkindex.xsl ${XML_ADVISORIES} ${XML_INCLUDES}
|
advisories.html.inc: mkindex.xsl ${XML_ADVISORIES} ${XML_INCLUDES}
|
||||||
${XSLTPROC} ${XSLTPROCOPTS} -o ${.TARGET} \
|
${XSLTPROC} ${XSLTPROCOPTS} -o ${.TARGET} \
|
||||||
--param "advisories.xml" "'${XML_ADVISORIES}'" \
|
--param "advisories.xml" "'${XML_ADVISORIES}'" \
|
||||||
${.CURDIR}/mkindex.xsl ${XML_ADVISORIES}
|
${.CURDIR}/mkindex.xsl ${XML_ADVISORIES}
|
||||||
|
advisories.rdf: security-rdf.xsl ${XML_ADVISORIES} ${XML_INCLUDES}
|
||||||
|
${XSLTPROC} ${XSLTPROCOPTS} -o ${.TARGET} \
|
||||||
|
--param "advisories.xml" "'${XML_ADVISORIES}'" \
|
||||||
|
${.CURDIR}/security-rdf.xsl ${XML_ADVISORIES}
|
||||||
|
|
20
en/security/security-rdf.xsl
Normal file
20
en/security/security-rdf.xsl
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||||
|
|
||||||
|
<!-- $FreeBSD$ -->
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||||
|
|
||||||
|
<xsl:import href="../includes.xsl"/>
|
||||||
|
|
||||||
|
<xsl:output method="xml" indent="yes"/>
|
||||||
|
|
||||||
|
<xsl:variable name="base" select="'..'"/>
|
||||||
|
<xsl:variable name="date" select="'$FreeBSD$'"/>
|
||||||
|
<xsl:variable name="title" select="'untitled'"/>
|
||||||
|
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:call-template name="rdf-security-advisories">
|
||||||
|
<xsl:with-param name="advisories.xml" select="$advisories.xml" />
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||||
|
|
||||||
<!-- $FreeBSD: www/share/sgml/includes.misc.xsl,v 1.8 2004/02/01 22:56:56 ale Exp $ -->
|
<!-- $FreeBSD: www/share/sgml/includes.misc.xsl,v 1.9 2004/02/03 22:25:23 ale Exp $ -->
|
||||||
|
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||||
|
|
||||||
|
@ -24,6 +24,10 @@
|
||||||
html-list-advisories security/mkindex.xsl
|
html-list-advisories security/mkindex.xsl
|
||||||
html-list-advisories-putitems security/mkindex.xsl
|
html-list-advisories-putitems security/mkindex.xsl
|
||||||
html-list-advisories-release-label security/mkindex.xsl (for l10n)
|
html-list-advisories-release-label security/mkindex.xsl (for l10n)
|
||||||
|
rdf-security-advisories security/security-rdf.xsl
|
||||||
|
rdf-security-advisories-title security/security-rdf.xsl (for l10n)
|
||||||
|
rdf-security-advisories-items security/security-rdf.xsl
|
||||||
|
|
||||||
html-index-advisories-items index.xsl
|
html-index-advisories-items index.xsl
|
||||||
html-index-advisories-items-lastmodified index.xsl (for i10n)
|
html-index-advisories-items-lastmodified index.xsl (for i10n)
|
||||||
html-index-news-project-items index.xsl
|
html-index-news-project-items index.xsl
|
||||||
|
@ -141,6 +145,57 @@
|
||||||
<xsl:value-of select="document($advisories.xml)/descendant::year[position() = 1]/name"/>
|
<xsl:value-of select="document($advisories.xml)/descendant::year[position() = 1]/name"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- template: "rdf-security-advisories"
|
||||||
|
generate a rdf of 10 most recent security advisories -->
|
||||||
|
|
||||||
|
<xsl:template name="rdf-security-advisories">
|
||||||
|
<xsl:param name="advisories.xml" select="''" />
|
||||||
|
|
||||||
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns="http://my.netscape.com/rdf/simple/0.9/">
|
||||||
|
|
||||||
|
<xsl:call-template name="rdf-security-advisories-title" />
|
||||||
|
|
||||||
|
<xsl:call-template name="rdf-security-advisories-items">
|
||||||
|
<xsl:with-param name="advisories.xml" select="$advisories.xml" />
|
||||||
|
</xsl:call-template>
|
||||||
|
</rdf:RDF>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- template: "rdf-security-advisories-title"
|
||||||
|
generate title for the security advisories rdf -->
|
||||||
|
|
||||||
|
<xsl:template name="rdf-security-advisories-title"
|
||||||
|
xmlns="http://my.netscape.com/rdf/simple/0.9/">
|
||||||
|
<channel>
|
||||||
|
<title>FreeBSD Security Advisories</title>
|
||||||
|
<link>http://www.FreeBSD.org/security/</link>
|
||||||
|
<description>Security advisories published from the FreeBSD Project</description>
|
||||||
|
</channel>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- template: "rdf-security-advisories-items"
|
||||||
|
pulls in the 10 most recent security advisories -->
|
||||||
|
|
||||||
|
<xsl:template name="rdf-security-advisories-items"
|
||||||
|
xmlns="http://my.netscape.com/rdf/simple/0.9/">
|
||||||
|
<xsl:param name="advisories.xml" select="''" />
|
||||||
|
|
||||||
|
<xsl:for-each select="document($advisories.xml)/descendant::advisory[position() <= 10]">
|
||||||
|
<item>
|
||||||
|
<title><xsl:value-of select="name"/></title>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@omithref = 'yes'">
|
||||||
|
<xsl:value-of select="name"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<link><xsl:value-of select="concat($ftpbase, name, '.asc')" /></link>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</item>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<!-- template: "html-index-news-project-items"
|
<!-- template: "html-index-news-project-items"
|
||||||
pulls in the 10 most recent project items -->
|
pulls in the 10 most recent project items -->
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue