Date: Thu, 20 Mar 2014 03:26:47 +0900 From: KATO Tsuguru <tkato432@yahoo.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/187751: security/openscep: Fix build on -current Message-ID: <20140320032647.40d08eeb2e1327eaf9ad4254@yahoo.com> Resent-Message-ID: <201403191840.s2JIe5jl002520@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 187751 >Category: ports >Synopsis: security/openscep: Fix build on -current >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Mar 19 18:40:04 UTC 2014 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: FreeBSD 8.4-RELEASE-p7 i386 >Organization: >Environment: >Description: - Fix build on -current New file: files/patch-include__scep.h files/patch-scepd__scepconf.c Remove file: files/patch-scepd_Makefile.in >How-To-Repeat: >Fix: diff -urN /usr/ports/security/openscep/Makefile security/openscep/Makefile --- /usr/ports/security/openscep/Makefile 2013-11-06 22:03:25.000000000 +0900 +++ security/openscep/Makefile 2014-03-20 00:00:00.000000000 +0900 @@ -10,65 +10,67 @@ MAINTAINER= ports@FreeBSD.org COMMENT= Open source scep server +LICENSE= GPLv2 -USE_AUTOTOOLS= libtool -USE_OPENSSL= yes -USE_OPENLDAP= yes +USES= gmake USE_APACHE= 22+ -GNU_CONFIGURE= yes -USE_GMAKE= yes -USE_LDCONFIG= yes - -NO_STAGE= yes -.include <bsd.port.pre.mk> - -PLIST_DIRSTRY= www/cgi-bin - -CPPFLAGS+= -I${LOCALBASE}/include -CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib" -CONFIGURE_ARGS= --with-html-install-dir="${PREFIX}/www/openscep" \ +USE_OPENLDAP= yes +USE_OPENSSL= yes +USE_AUTOTOOLS= libtool +CONFIGURE_ARGS= --with-html-install-dir="${WWWDIR}" \ --with-cgi-install-dir="${PREFIX}/www/cgi-bin/openscep" \ - --with-openscep-dir="${PREFIX}/etc/openscep" \ + --with-openscep-dir="${ETCDIR}" \ --with-pkiclientexe="${PREFIX}/www/cgi-bin/pkiclient.exe" +USE_LDCONFIG= yes -CONF_DIR= ${PREFIX}/etc/${PORTNAME} -LOCAL_CONF_FILES= openscep.cnf openscep.ldif openscep.schema slapd.conf +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib SUB_FILES= pkg-deinstall pkg-install pkg-message -SUB_LIST= CONF_DIR="${CONF_DIR}" CONF_FILES="${LOCAL_CONF_FILES}" +SUB_LIST= CONF_FILES="${LOCAL_CONF_FILES}" -MAN1= derdump.1 \ - scep.1 \ - scepclient.1 \ - scepconf.1 \ - sceplist.1 \ - scepxid.1 -MAN5= openscep.cnf.5 -MAN8= cafingerprint.8 \ - createcrl.8 \ - crl2ldap.8 \ - dn2xid.8 \ - scepd.8 \ - scepgrant.8 \ - scepreject.8 \ - updatecrl.8 +LOCAL_CONF_FILES= openscep.cnf openscep.ldif openscep.schema slapd.conf post-patch: - @${REINPLACE_CMD} -e '/^subdirs=/ s|libltdl||' ${WRKSRC}/configure - @${REINPLACE_CMD} -e '/^SUBDIRS =/ s|libltdl||' ${WRKSRC}/Makefile.in - @${REINPLACE_CMD} -e 's|^\(install-data-am:\) install-data-local$$|\1|' \ - ${WRKSRC}/ldap/Makefile.in ${WRKSRC}/openssl/Makefile.in + @${REINPLACE_CMD} -e \ + '/^subdirs=/s|libltdl||' ${WRKSRC}/configure + @${REINPLACE_CMD} -e \ + '/^SUBDIRS =/s|libltdl|| ; \ + s|\([[:blank:]]\)\($$(HTMLINSTALLDIR)\)|\1$$(DESTDIR)\2|' \ + ${WRKSRC}/Makefile.in + + @${REINPLACE_CMD} -e \ + 's|\([[:blank:]]\)\($$(CGIINSTALLDIR)\)|\1$$(DESTDIR)\2| ; \ + s|\([[:blank:]]\)\($$(PKICLIENTEXE)\)|\1$$(DESTDIR)\2|' \ + ${WRKSRC}/cgi-bin/Makefile.in + @${REINPLACE_CMD} -e \ + 's|\([[:blank:]]\)\($$(HTMLINSTALLDIR)\)|\1$$(DESTDIR)\2|' \ + ${WRKSRC}/doc/Makefile.in + @${REINPLACE_CMD} -e \ + 's|\([[:blank:]]\)\($$(HTMLINSTALLDIR)\)|\1$$(DESTDIR)\2|' \ + ${WRKSRC}/html/Makefile.in + @${REINPLACE_CMD} -e \ + '/^install-data-am:/s|install-data-local$$||' \ + ${WRKSRC}/ldap/Makefile.in + @${REINPLACE_CMD} -e \ + '/^install-data-am:/s|install-data-local$$|| ; \ + s|\([[:blank:]]\)\($$(sbindir)\)|\1$$(DESTDIR)\2|' \ + ${WRKSRC}/openssl/Makefile.in + @${REINPLACE_CMD} -e \ + 's|\([[:blank:]]\)\($${bindir}\)|\1$$(DESTDIR)\2|' \ + ${WRKSRC}/scep/Makefile.in + @${REINPLACE_CMD} -e \ + 's|^\(CPPFLAGS\) =|\1 +=| ; \ + s|\([[:blank:]]\)\($${sbindir}\)|\1$$(DESTDIR)\2|' \ + ${WRKSRC}/scepd/Makefile.in post-install: - ${MKDIR} ${CONF_DIR} - ${INSTALL_DATA} ${WRKSRC}/openssl/openscep.cnf ${CONF_DIR}/openscep.cnf.default + ${MKDIR} ${STAGEDIR}${ETCDIR} + (cd ${WRKSRC}/openssl && ${INSTALL_DATA} openscep.cnf \ + ${STAGEDIR}${ETCDIR}/openscep.cnf.default) .for f in openscep.ldif openscep.schema slapd.conf - ${INSTALL_DATA} ${WRKSRC}/ldap/${f} ${CONF_DIR}/${f}.default + (cd ${WRKSRC}/ldap && ${INSTALL_DATA} ${f} \ + ${STAGEDIR}${ETCDIR}/${f}.default) .endfor - ${CHOWN} www:www ${PREFIX}/www/cgi-bin/openscep/* - ${CHOWN} www:www ${PREFIX}/www/cgi-bin/pkiclient.exe - ${CHOWN} www:www ${PREFIX}/etc/openscep/* - @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - @${CAT} ${PKGMESSAGE} -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff -urN /usr/ports/security/openscep/files/patch-include__scep.h security/openscep/files/patch-include__scep.h --- /usr/ports/security/openscep/files/patch-include__scep.h 1970-01-01 09:00:00.000000000 +0900 +++ security/openscep/files/patch-include__scep.h 2014-03-20 00:00:00.000000000 +0900 @@ -0,0 +1,14 @@ +--- include/scep.h.orig ++++ include/scep.h +@@ -80,7 +80,11 @@ + int recipientNonceLength; + + /* OpenSSL configuration file contents */ ++#ifdef LHASH_OF ++ LHASH_OF(CONF_VALUE) *conf; ++#else + LHASH *conf; ++#endif + + /* signer/client information different from requestor for v2 */ + X509 *selfsignedcert; diff -urN /usr/ports/security/openscep/files/patch-scepd_Makefile.in security/openscep/files/patch-scepd_Makefile.in --- /usr/ports/security/openscep/files/patch-scepd_Makefile.in 2014-01-23 05:41:15.000000000 +0900 +++ security/openscep/files/patch-scepd_Makefile.in 1970-01-01 09:00:00.000000000 +0900 @@ -1,11 +0,0 @@ ---- scepd/Makefile.in.orig Thu May 19 16:41:14 2005 -+++ scepd/Makefile.in Thu May 19 16:41:26 2005 -@@ -132,7 +132,7 @@ - LDADD = ../lib/libscep.la - LDFLAGS = -R$(libdir) - --CPPFLAGS = -DOPENSCEPDIR=\"$(OPENSCEPDIR)\" -+CPPFLAGS += -DOPENSCEPDIR=\"$(OPENSCEPDIR)\" - - INCLUDES = $(INCLTDL) -I$(top_srcdir)/include -I$(OPENSSLDIR)/include - mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff -urN /usr/ports/security/openscep/files/patch-scepd__scepconf.c security/openscep/files/patch-scepd__scepconf.c --- /usr/ports/security/openscep/files/patch-scepd__scepconf.c 1970-01-01 09:00:00.000000000 +0900 +++ security/openscep/files/patch-scepd__scepconf.c 2014-03-20 00:00:00.000000000 +0900 @@ -0,0 +1,14 @@ +--- scepd/scepconf.c.orig ++++ scepd/scepconf.c +@@ -20,7 +20,11 @@ + int debug = 0; + + int main(int argc, char *argv[]) { ++#ifdef LHASH_OF ++ LHASH_OF(CONF_VALUE) *conf; ++#else + LHASH *conf; ++#endif + long eline; + char *section = NULL, *variable = NULL, *value; + int c, n; diff -urN /usr/ports/security/openscep/files/pkg-deinstall.in security/openscep/files/pkg-deinstall.in --- /usr/ports/security/openscep/files/pkg-deinstall.in 2014-01-23 05:41:15.000000000 +0900 +++ security/openscep/files/pkg-deinstall.in 2014-03-20 00:00:00.000000000 +0900 @@ -3,7 +3,7 @@ [ "$2" != "DEINSTALL" ] && exit 0 for f in %%CONF_FILES%%; do - if cmp -s "%%CONF_DIR%%/$f" "%%CONF_DIR%%/$f.default"; then - rm -f "%%CONF_DIR%%/$f" + if cmp -s "%%ETCDIR%%/$f" "%%ETCDIR%%/$f.default"; then + rm -f "%%ETCDIR%%/$f" fi done diff -urN /usr/ports/security/openscep/files/pkg-install.in security/openscep/files/pkg-install.in --- /usr/ports/security/openscep/files/pkg-install.in 2014-01-23 05:41:15.000000000 +0900 +++ security/openscep/files/pkg-install.in 2014-03-20 00:00:00.000000000 +0900 @@ -3,5 +3,5 @@ [ "$2" != "POST-INSTALL" ] && exit 0 for f in %%CONF_FILES%%; do - [ -f "%%CONF_DIR%%/$f" ] || cp -p "%%CONF_DIR%%/$f.default" "%%CONF_DIR%%/$f" + [ -f "%%ETCDIR%%/$f" ] || cp -p "%%ETCDIR%%/$f.default" "%%ETCDIR%%/$f" done diff -urN /usr/ports/security/openscep/files/pkg-message.in security/openscep/files/pkg-message.in --- /usr/ports/security/openscep/files/pkg-message.in 2014-01-23 05:41:15.000000000 +0900 +++ security/openscep/files/pkg-message.in 2014-03-20 00:00:00.000000000 +0900 @@ -1,14 +1,14 @@ ====================================================================== You now need to add an alias to apache's httpd.conf pointing to -%%PREFIX%%/www/openscep in order to access openscep from +%%WWWDIR%% in order to access openscep from your web browser, or create a VirtualHost with DocumentRoot set to that directory. -You should also include %%PREFIX%%/etc/openscep/openscep.schema +You should also include %%ETCDIR%%/openscep.schema into your slapd config (sample of this is at -%%PREFIX%%/etc/openscep/slapd.conf). +%%ETCDIR%%/slapd.conf). Furthermore, you should add your ldap directory information from -%%PREFIX%%/etc/openscep/openscep.ldif and edit DN specific information +%%ETCDIR%%/openscep.ldif and edit DN specific information there before doing ldapadd. ====================================================================== diff -urN /usr/ports/security/openscep/pkg-plist security/openscep/pkg-plist --- /usr/ports/security/openscep/pkg-plist 2014-01-23 05:41:15.000000000 +0900 +++ security/openscep/pkg-plist 2014-03-20 00:00:00.000000000 +0900 @@ -5,14 +5,33 @@ bin/scepkey bin/sceplist bin/scepxid -etc/openscep/openscep.cnf.default -etc/openscep/openscep.ldif.default -etc/openscep/openscep.schema.default -etc/openscep/slapd.conf.default +@group www +@owner www +%%ETCDIR%%/openscep.cnf.default +%%ETCDIR%%/openscep.ldif.default +%%ETCDIR%%/openscep.schema.default +%%ETCDIR%%/slapd.conf.default +@owner +@group lib/libscep.a lib/libscep.la lib/libscep.so lib/libscep.so.4 +man/man1/derdump.1.gz +man/man1/scep.1.gz +man/man1/scepclient.1.gz +man/man1/scepconf.1.gz +man/man1/sceplist.1.gz +man/man1/scepxid.1.gz +man/man5/openscep.cnf.5.gz +man/man8/cafingerprint.8.gz +man/man8/createcrl.8.gz +man/man8/crl2ldap.8.gz +man/man8/dn2xid.8.gz +man/man8/scepd.8.gz +man/man8/scepgrant.8.gz +man/man8/scepreject.8.gz +man/man8/updatecrl.8.gz sbin/cafingerprint sbin/createcrl sbin/crl2ldap @@ -22,6 +41,8 @@ sbin/scepgrant sbin/scepreject sbin/updatecrl +@group www +@owner www www/cgi-bin/openscep/add.pl www/cgi-bin/openscep/crl.pl www/cgi-bin/openscep/granted.pl @@ -30,45 +51,48 @@ www/cgi-bin/openscep/rejected.pl www/cgi-bin/openscep/revoked.pl www/cgi-bin/pkiclient.exe -www/openscep/COPYING -www/openscep/ChangeLog -www/openscep/INSTALL -www/openscep/NEWS -www/openscep/README -www/openscep/SETUP -www/openscep/TODO -www/openscep/add.gif -www/openscep/cafingerprint.8.html -www/openscep/contents.html -www/openscep/createcrl.8.html -www/openscep/crl.gif -www/openscep/crl2ldap.8.html -www/openscep/derdump.1.html -www/openscep/dn2xid.8.html -www/openscep/draft-nourse-scep-05.txt -www/openscep/granted.gif -www/openscep/help.gif -www/openscep/help.html -www/openscep/index.html -www/openscep/log.gif -www/openscep/openscep.cnf.5.html -www/openscep/openscep.gif -www/openscep/openscep.png -www/openscep/rejected.gif -www/openscep/requests.gif -www/openscep/revocation.html -www/openscep/revoked.gif -www/openscep/scep.1.html -www/openscep/scepclient.1.html -www/openscep/scepconf.1.html -www/openscep/scepd.8.html -www/openscep/scepgrant.8.html -www/openscep/sceplist.1.html -www/openscep/scepreject.8.html -www/openscep/scepxid.1.html -www/openscep/title.html -www/openscep/updatecrl.8.html -www/openscep/welcome.html +@owner +@group +%%WWWDIR%%/COPYING +%%WWWDIR%%/ChangeLog +%%WWWDIR%%/INSTALL +%%WWWDIR%%/NEWS +%%WWWDIR%%/README +%%WWWDIR%%/SETUP +%%WWWDIR%%/TODO +%%WWWDIR%%/add.gif +%%WWWDIR%%/cafingerprint.8.html +%%WWWDIR%%/contents.html +%%WWWDIR%%/createcrl.8.html +%%WWWDIR%%/crl.gif +%%WWWDIR%%/crl2ldap.8.html +%%WWWDIR%%/derdump.1.html +%%WWWDIR%%/dn2xid.8.html +%%WWWDIR%%/draft-nourse-scep-05.txt +%%WWWDIR%%/granted.gif +%%WWWDIR%%/help.gif +%%WWWDIR%%/help.html +%%WWWDIR%%/index.html +%%WWWDIR%%/log.gif +%%WWWDIR%%/openscep.cnf.5.html +%%WWWDIR%%/openscep.gif +%%WWWDIR%%/openscep.png +%%WWWDIR%%/rejected.gif +%%WWWDIR%%/requests.gif +%%WWWDIR%%/revocation.html +%%WWWDIR%%/revoked.gif +%%WWWDIR%%/scep.1.html +%%WWWDIR%%/scepclient.1.html +%%WWWDIR%%/scepconf.1.html +%%WWWDIR%%/scepd.8.html +%%WWWDIR%%/scepgrant.8.html +%%WWWDIR%%/sceplist.1.html +%%WWWDIR%%/scepreject.8.html +%%WWWDIR%%/scepxid.1.html +%%WWWDIR%%/title.html +%%WWWDIR%%/updatecrl.8.html +%%WWWDIR%%/welcome.html +@dirrm %%WWWDIR%% @dirrm www/cgi-bin/openscep -@dirrm www/openscep -@dirrmtry etc/openscep +@dirrmtry www/cgi-bin +@dirrmtry %%ETCDIR%% >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140320032647.40d08eeb2e1327eaf9ad4254>