Subject: Apache2 from pkgsrc on HP-UX
To: None <tech-pkg@NetBSD.org>
From: Andrey Zakharchenko <avz@jscc.ru>
List: tech-pkg
Date: 01/18/2005 23:05:23
--Boundary-00=_DwW7BDtilynWl8g
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Today I've successfully built and installed Apache2 from pkgsrc on HP-UX. I
had to change devel/apr/Makefile because HP-UX doesn't have kernel entropy
source such as /dev/*random, and programs must use external collectors, e.g.
prngd.
Attached is a patch for devel/apr/Makefile making it work on HP-UX. But I
think Apache is not only package using /dev/urandom, and it may be "not
found" not only on HP-UX. Isn't it possible to create a Makefile variable (or
even buildlink script) to determine either kernel interface or external
entropy collector usage from OS name, OS version, or user specified flags?
--
Andrey Zakharchenko
--Boundary-00=_DwW7BDtilynWl8g
Content-Type: text/x-diff;
charset="koi8-r";
name="apr_Makefile.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="apr_Makefile.diff"
--- Makefile.orig Tue Jan 18 22:41:36 2005
+++ Makefile Tue Jan 18 22:41:35 2005
@@ -27,7 +27,6 @@
APR_CONFIGURE_ARGS= \
--prefix=${PREFIX} \
- --with-devrandom=/dev/urandom \
--with-installbuilddir=${PREFIX}/libexec/apr
APU_CONFIGURE_ARGS= \
@@ -39,6 +38,16 @@
.include "../../mk/bsd.prefs.mk"
.include "../../textproc/expat/buildlink3.mk"
.include "options.mk"
+
+# HP-UX has no /dev/*random and must use external entropy collector
+.if ${OPSYS} == "HP-UX"
+DEPENDS+= prngd-[0-9]*:../../security/prngd
+APR_CONFIGURE_ARGS+= \
+ --with-egd=/var/run/egd-pool
+.else
+APR_CONFIGURE_ARGS+= \
+ --with-devrandom=/dev/urandom
+.endif
SUBST_CLASSES+= conf
SUBST_STAGE.conf= pre-configure
--Boundary-00=_DwW7BDtilynWl8g--