[Request for Review] Where to put SA texts and patches?
Gabor Kovesdan
gabor at FreeBSD.org
Sun Aug 19 12:03:01 UTC 2012
Em 19-08-2012 13:35, Bjoern A. Zeeb escreveu:
>
> This patch starts to install the the texts and patches to
> data/security/{advisories,patches}/ and is custom Makefile
> logic in two places.
>
> http://people.freebsd.org/~bz/20120818-01-dsvn-security.diff
> +_FILES!= cd ${DATADIR} && ${FIND} . -type f
> [...]
> +.for f in ${_FILES}
> + ${INSTALL_WEB} ${DATADIR}/${f} ${DOCINSTALLDIR}/${f:H}/
> +.endfor
What if you do DATA!= cd ${DATADIR} && ${FIND} . -type f? I think it
should work without extra code.
> +# Things that went wrong in the past and had to be fixed.
> +# Source Target
> +FIXUPLINKS=
> +FIXUPLINKS+= SA-04:04/tcp47.patch tcp47.patch
> +FIXUPLINKS+= SA-04:04/tcp47.patch.asc tcp47.patch.asc
> +FIXUPLINKS+= SA-04:04/tcp52.patch tcp52.patch
> +FIXUPLINKS+= SA-04:04/tcp52.patch.asc tcp52.patch.asc
> +FIXUPLINKS+= SA-10:05 SA-10-05
> +FIXUPLINKS+= SA-04:09/kadmin.patch SA-04:09/kadmind.patch
Would you mind generalizing this and moving the code to share/mk? I
think having support for general symlinks is a useful feature. And
personally, I would call it simply SYMLINKS since using them is not
necessarily bad.
> +afterinstall:
> +.if defined(DATADIR) && !empty(DATADIR)
> + @${ECHO_CMD} "===> ${DATADIR} -> ${DOCINSTALLDIR}"
> + @${INSTALL} -o ${WEBOWN} -g ${WEBGRP} -m ${WEBDIRMODE} -d ${DOCINSTALLDIR}
> +.for d in ${_DIRS}
> + @${INSTALL} -o ${WEBOWN} -g ${WEBGRP} -m ${WEBDIRMODE} -d ${DOCINSTALLDIR}/${d}
> +.endfor
> +.for f in ${_FILES}
> + ${INSTALL_WEB} ${DATADIR}/${f} ${DOCINSTALLDIR}/${f:H}/
> +.endfor
I think installing regular files should better be done in install, and
afterinstall should be used for symlinks and such additional steps.
Anyway, I think your solution is quite clean and simple.
Gabor
More information about the freebsd-www
mailing list