Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Sep 2012 08:42:56 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r39569 - in head: en_US.ISO8859-1/htdocs/security en_US.ISO8859-1/htdocs/security/advisories en_US.ISO8859-1/htdocs/security/patches share/mk
Message-ID:  <201209170842.q8H8guh2079816@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz (src committer)
Date: Mon Sep 17 08:42:56 2012
New Revision: 39569
URL: http://svn.freebsd.org/changeset/doc/39569

Log:
  Hook-up advistories and patches to be installed to
    www.freebsd.org/security/{advisories,patches}/...
  from the en_US.ISO8859-1 directory as we do for logos, etc.
  
  The magic is a bit special to avoid having to add each advisory
  or errata notice, and their patches and signatures individually.
  
  Factor out the slightly different to bsd.links.mk SYMLINKS
  support as well as the "bulk data install" that cannot be
  handled by just DATA as (i) the input dir differs, (ii) input
  uses a 1 or more level of sub-directories.
  
  This is the second of three steps.  The last one will be to link
  to these files locally rather than to security.freebsd.org.
  
  Approved by:	gabor

Added:
  head/en_US.ISO8859-1/htdocs/security/Makefile.inc   (contents, props changed)
  head/en_US.ISO8859-1/htdocs/security/advisories/
  head/en_US.ISO8859-1/htdocs/security/advisories/Makefile   (contents, props changed)
  head/en_US.ISO8859-1/htdocs/security/patches/
  head/en_US.ISO8859-1/htdocs/security/patches/Makefile   (contents, props changed)
Modified:
  head/en_US.ISO8859-1/htdocs/security/Makefile
  head/share/mk/web.site.mk

Modified: head/en_US.ISO8859-1/htdocs/security/Makefile
==============================================================================
--- head/en_US.ISO8859-1/htdocs/security/Makefile	Sun Sep 16 18:26:39 2012	(r39568)
+++ head/en_US.ISO8859-1/htdocs/security/Makefile	Mon Sep 17 08:42:56 2012	(r39569)
@@ -7,6 +7,9 @@
 .include "../Makefile.inc"
 .endif
 
+SUBDIR=		advisories
+SUBDIR+=	patches
+
 DATA=	so_public_key.asc
 DOCS=	charter.sgml
 DOCS+=	security.sgml

Added: head/en_US.ISO8859-1/htdocs/security/Makefile.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/en_US.ISO8859-1/htdocs/security/Makefile.inc	Mon Sep 17 08:42:56 2012	(r39569)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+WEBBASE?=	/data/security
+DOC_PREFIX?=	${.CURDIR}/../../../..

Added: head/en_US.ISO8859-1/htdocs/security/advisories/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/en_US.ISO8859-1/htdocs/security/advisories/Makefile	Mon Sep 17 08:42:56 2012	(r39569)
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+.if exists(../Makefile.conf)
+.include "../Makefile.conf"
+.endif
+.if exists(../Makefile.inc)
+.include "../Makefile.inc"
+.endif
+
+BULKDATADIRS=	${DOC_PREFIX}/share/security/advisories
+
+# Things that went wrong in the past and had to be fixed.
+# SYMLINKS+=	Source Target
+SYMLINKS=	FreeBSD-SA-09:06.ktimer.asc FreeBSD-SA-06:09.ktimer.asc
+
+.include "${DOC_PREFIX}/share/mk/web.site.mk"

Added: head/en_US.ISO8859-1/htdocs/security/patches/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/en_US.ISO8859-1/htdocs/security/patches/Makefile	Mon Sep 17 08:42:56 2012	(r39569)
@@ -0,0 +1,29 @@
+# $FreeBSD$
+
+.if exists(../Makefile.conf)
+.include "../Makefile.conf"
+.endif
+.if exists(../Makefile.inc)
+.include "../Makefile.inc"
+.endif
+
+BULKDATADIRS=	${DOC_PREFIX}/share/security/patches
+
+# Things that went wrong in the past and had to be fixed.
+# Source Target
+SYMLINKS=
+SYMLINKS+=	SA-04:04/tcp47.patch tcp47.patch
+SYMLINKS+=	SA-04:04/tcp47.patch.asc tcp47.patch.asc
+SYMLINKS+=	SA-04:04/tcp52.patch tcp52.patch
+SYMLINKS+=	SA-04:04/tcp52.patch.asc tcp52.patch.asc
+SYMLINKS+=	SA-10:05 SA-10-05
+SYMLINKS+=	kadmin.patch SA-04:09/kadmind.patch
+SYMLINKS+=	kadmin.patch.asc SA-04:09/kadmind.patch.asc
+SYMLINKS+=	kadmind.patch SA-02:40/kadmin.patch
+SYMLINKS+=	kadmind.patch.asc SA-02:40/kadmin.patch.asc
+SYMLINKS+=	ip-options.diff SA-00:23/ip_options.diff
+SYMLINKS+=	ip-options.diff.asc SA-00:23/ip_options.diff.asc
+# Lost?
+#SYMLINKS+=	../../tools/libfind.sh patches/SA-00:17/libfind.sh
+
+.include "${DOC_PREFIX}/share/mk/web.site.mk"

Modified: head/share/mk/web.site.mk
==============================================================================
--- head/share/mk/web.site.mk	Sun Sep 16 18:26:39 2012	(r39568)
+++ head/share/mk/web.site.mk	Mon Sep 17 08:42:56 2012	(r39569)
@@ -322,8 +322,12 @@ INSTALL_CGI?=	\
 _ALLINSTALL+=	${GENDOCS} ${DATA}
 
 realinstall: ${COOKIE} ${_ALLINSTALL} ${CGI} _PROGSUBDIR
-.if !empty(_ALLINSTALL)
+.if !empty(_ALLINSTALL) || !empty(BULKDATADIRS)
 	@${MKDIR} -p ${DOCINSTALLDIR}
+.for entry in ${BULKDATADIRS}
+	@(cd ${entry} && \
+	${FIND} * -type d -exec ${MKDIR} -p ${DOCINSTALLDIR}/{} \; )
+.endfor
 .for entry in ${_ALLINSTALL}
 .if exists(${.CURDIR}/${entry})
 	${INSTALL_WEB} ${.CURDIR}/${entry} ${DOCINSTALLDIR}
@@ -331,6 +335,10 @@ realinstall: ${COOKIE} ${_ALLINSTALL} ${
 	${INSTALL_WEB} ${entry} ${DOCINSTALLDIR}
 .endif
 .endfor
+.for entry in ${BULKDATADIRS}
+	@(cd ${entry} && \
+	${FIND} * -type f -exec ${INSTALL_WEB} ${entry}/{} ${DOCINSTALLDIR}/{} \; )
+.endfor
 .if defined(INDEXLINK) && !empty(INDEXLINK)
 	cd ${DOCINSTALLDIR}; ${LN} -fs ${INDEXLINK} index.html
 .endif
@@ -342,9 +350,25 @@ realinstall: ${COOKIE} ${_ALLINSTALL} ${
 .endfor
 .endif
 
+_installlinks:
+.if defined(SYMLINKS) && !empty(SYMLINKS)
+	@(${ECHO_CMD} "====> Creating symlinks in ${DOCINSTALLDIR}" && \
+	cd ${DOCINSTALLDIR} && \
+	set ${SYMLINKS}; \
+	while test $$# -ge 2; do \
+		l=$$1; \
+		shift; \
+		t=$$1; \
+		shift; \
+		${ECHO_CMD} $$t -\> $$l; \
+		${LN} -fs $$l $$t; \
+	done )
+.endif
+
 # Set up install dependencies so they happen in the correct order.
 install: afterinstall
-afterinstall: realinstall2
+afterinstall: _installlinks
+_installlinks: realinstall2
 realinstall: beforeinstall
 realinstall2: realinstall
 .endif 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209170842.q8H8guh2079816>