From owner-svn-ports-all@FreeBSD.ORG Fri May 1 00:03:29 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A3B013D; Fri, 1 May 2015 00:03:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 075EB1FF2; Fri, 1 May 2015 00:03:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4103SpY047076; Fri, 1 May 2015 00:03:28 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4103Rp4047064; Fri, 1 May 2015 00:03:27 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201505010003.t4103Rp4047064@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Fri, 1 May 2015 00:03:27 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r385077 - in head/irc/ircd-ratbox: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 00:03:29 -0000 Author: feld Date: Fri May 1 00:03:27 2015 New Revision: 385077 URL: https://svnweb.freebsd.org/changeset/ports/385077 Log: Support building with LibreSSL Fully strip binaries unless DEBUG enabled Create /var dirs in rc script start_precmd instead of in package Make rc script pass rclint Upstream has accepted the LibreSSL patches but their releases are far apart, so patching in ports tree for now. PR: 198506 Added: head/irc/ircd-ratbox/files/patch-configure (contents, props changed) head/irc/ircd-ratbox/files/patch-configure.ac (contents, props changed) head/irc/ircd-ratbox/files/patch-libratbox_src_openssl.c (contents, props changed) Modified: head/irc/ircd-ratbox/Makefile head/irc/ircd-ratbox/files/ircd-ratbox.in Modified: head/irc/ircd-ratbox/Makefile ============================================================================== --- head/irc/ircd-ratbox/Makefile Thu Apr 30 23:53:03 2015 (r385076) +++ head/irc/ircd-ratbox/Makefile Fri May 1 00:03:27 2015 (r385077) @@ -3,7 +3,7 @@ PORTNAME= ircd-ratbox PORTVERSION= 3.0.8 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= irc ipv6 MASTER_SITES= http://www.ratbox.org/download/ \ http://www.ratbox.org/download/old/ @@ -125,6 +125,11 @@ CONFIGURE_ARGS+= --with-nicklen=${NICKLE #----------------------------------------------------------------------- +post-patch: +.if !defined(WITH_DEBUG) + ${REINPLACE_CMD} 's|@INSTALL@|@INSTALL@ -s|' ${WRKSRC}/install-mod.sh.in +.endif + pre-configure: @${ECHO_MSG} "" @${ECHO_MSG} "This port has additional options:" @@ -220,9 +225,6 @@ pre-install: ${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/modules post-install: - ${MKDIR} ${STAGEDIR}${DBDIR} - ${MKDIR} ${STAGEDIR}${RUNDIR} - ${MKDIR} ${STAGEDIR}${LOGDIR} ${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} cd ${INSTALL_WRKSRC}/contrib && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ @@ -231,6 +233,10 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/doc/example.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.conf.sample ${INSTALL_DATA} ${WRKSRC}/doc/example.efnet.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd-efnet.conf.sample ${INSTALL_DATA} ${WRKSRC}/doc/genssl.sh ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/genssl.sh +.if !defined(WITH_DEBUG) + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ircd-ratbox/libcore.so + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ircd-ratbox/libratbox.so +.endif # ----- We need to install the shortcut.pl module ---- .if ${PORT_OPTIONS:MSHORTCUTS} Modified: head/irc/ircd-ratbox/files/ircd-ratbox.in ============================================================================== --- head/irc/ircd-ratbox/files/ircd-ratbox.in Thu Apr 30 23:53:03 2015 (r385076) +++ head/irc/ircd-ratbox/files/ircd-ratbox.in Fri May 1 00:03:27 2015 (r385077) @@ -5,10 +5,11 @@ # PROVIDE: ircd-ratbox # REQUIRE: DAEMON # BEFORE: LOGIN +# KEYWORD: shutdown . /etc/rc.subr -name="ircd_ratbox" +name=ircd_ratbox rcvar=ircd_ratbox_enable load_rc_config $name @@ -21,17 +22,13 @@ pidfile=%%RUNDIR%%/ircd.pid required_files="%%PREFIX%%/etc/ircd-ratbox/ircd.conf" start_precmd=prestart -stop_precmd=prestop +stop_precmd="rm -f ${pidfile}" prestart() { - touch $pidfile - chown $ircd_ratbox_user:$ircd_ratbox_group $pidfile -} - -prestop() -{ - rm -f $pidfile + for i in %%LOGDIR%% %%DBDIR%% %%RUNDIR%%; do + install -d -o ${ircd_ratbox_user} -g ${ircd_ratbox_group} ${i} + done } run_rc_command "$1" Added: head/irc/ircd-ratbox/files/patch-configure ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/irc/ircd-ratbox/files/patch-configure Fri May 1 00:03:27 2015 (r385077) @@ -0,0 +1,53 @@ +--- configure.orig 2012-03-11 00:34:21 UTC ++++ configure +@@ -13659,6 +13659,50 @@ else + + fi + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5 ++$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; } ++if ${ac_cv_lib_crypto_RAND_egd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lcrypto $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char RAND_egd (); ++int ++main () ++{ ++return RAND_egd (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_crypto_RAND_egd=yes ++else ++ ac_cv_lib_crypto_RAND_egd=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5 ++$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; } ++if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then : ++ ++$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h ++ ++ ++fi ++ ++ + + if test "$cf_enable_openssl" != no; then + Added: head/irc/ircd-ratbox/files/patch-configure.ac ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/irc/ircd-ratbox/files/patch-configure.ac Fri May 1 00:03:27 2015 (r385077) @@ -0,0 +1,13 @@ +--- configure.ac.orig 2012-03-11 01:34:21.000000000 +0100 ++++ configure.ac 2015-03-10 20:48:02.040440133 +0100 +@@ -244,6 +244,10 @@ + cf_enable_openssl="no" + fi + unset cf_openssl_basedir ++ ++ AC_CHECK_LIB(crypto, RAND_egd, AC_DEFINE(HAVE_RAND_EGD, 1, ++ [Define if the libcrypto has RAND_egd])) ++ + else + dnl If --disable-openssl was specified + AC_MSG_RESULT(disabled) Added: head/irc/ircd-ratbox/files/patch-libratbox_src_openssl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/irc/ircd-ratbox/files/patch-libratbox_src_openssl.c Fri May 1 00:03:27 2015 (r385077) @@ -0,0 +1,15 @@ +--- libratbox/src/openssl.c.orig 2012-03-16 07:29:42.000000000 +0100 ++++ libratbox/src/openssl.c 2015-03-10 21:01:33.572383130 +0100 +@@ -556,10 +556,12 @@ + + switch (seed_type) + { ++#ifdef HAVE_RAND_EGD + case RB_PRNG_EGD: + if(RAND_egd(path) == -1) + return -1; + break; ++#endif + case RB_PRNG_FILE: + if(RAND_load_file(path, -1) == -1) + return -1;