Date: Tue, 2 Sep 2014 18:01:38 +0000 (UTC) From: Hajimu UMEMOTO <ume@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r367069 - in head: . net net/irrd net/irrd/files Message-ID: <201409021801.s82I1ceT071754@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ume Date: Tue Sep 2 18:01:38 2014 New Revision: 367069 URL: http://svnweb.freebsd.org/changeset/ports/367069 QAT: https://qat.redports.org/buildarchive/r367069/ Log: - Resurrect net/irrd with stagify. - Take maintainership. - Strip installed binary. - Use shebangfix for perl scripts. Added: head/net/irrd/ head/net/irrd/Makefile (contents, props changed) head/net/irrd/distinfo (contents, props changed) head/net/irrd/files/ head/net/irrd/files/irrd.in (contents, props changed) head/net/irrd/files/patch-config_file.c (contents, props changed) head/net/irrd/files/patch-configure (contents, props changed) head/net/irrd/files/patch-database.c (contents, props changed) head/net/irrd/files/patch-lib_mrt_prefix.c (contents, props changed) head/net/irrd/files/patch-uii_commands.c (contents, props changed) head/net/irrd/pkg-descr (contents, props changed) Modified: head/MOVED head/net/Makefile Modified: head/MOVED ============================================================================== --- head/MOVED Tue Sep 2 17:57:13 2014 (r367068) +++ head/MOVED Tue Sep 2 18:01:38 2014 (r367069) @@ -6800,7 +6800,6 @@ net/hawknl-devel||2014-09-01|Not staged net/hawknl||2014-09-01|Not staged net/heybuddy||2014-09-01|Not staged net/ipa_ipfw||2014-09-01|Not staged -net/irrd||2014-09-01|Not staged net/iscsi-target||2014-09-01|Not staged net/kojoney||2014-09-01|Not staged net/libtcp4u||2014-09-01|Not staged Modified: head/net/Makefile ============================================================================== --- head/net/Makefile Tue Sep 2 17:57:13 2014 (r367068) +++ head/net/Makefile Tue Sep 2 18:01:38 2014 (r367069) @@ -228,6 +228,7 @@ SUBDIR += ipsorc SUBDIR += ipsumdump SUBDIR += ipsvd + SUBDIR += irrd SUBDIR += isc-dhcp41-client SUBDIR += isc-dhcp41-relay SUBDIR += isc-dhcp41-server Added: head/net/irrd/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/irrd/Makefile Tue Sep 2 18:01:38 2014 (r367069) @@ -0,0 +1,75 @@ +# Created by: TAKANO Yuji <takano@net-chef.net> +# $FreeBSD$ + +PORTNAME= irrd +PORTVERSION= 2.3.10 +PORTREVISION= 2 +CATEGORIES= net ipv6 +MASTER_SITES= http://www.irrd.net/ +DISTNAME= ${PORTNAME}${PORTVERSION} +EXTRACT_SUFX= .tgz + +MAINTAINER= ume@FreeBSD.org +COMMENT= Internet Routing Registry database server + +RUN_DEPENDS= wget:${PORTSDIR}/ftp/wget + +WRKSRC= ${WRKDIR}/${PORTNAME}${PORTVERSION}/src + +IRRD_CONFDIR= ${PREFIX}/etc + +USES= shebangfix +USE_RC_SUBR= irrd +GNU_CONFIGURE= yes +CONFIGURE_ENV= YACC="${YACC}" +MAKE_JOBS_UNSAFE= yes +#CONFIGURE_ARGS+= --disable-thread +DESTDIRNAME= STAGEDIR + +.if defined(WITHOUT_IPV6) +CONFIGURE_ARGS+= --disable-ipv6 +.else +CONFIGURE_ARGS+= --enable-ipv6 +.endif + +SHEBANG_FILES= programs/irrdcacher/irrdcacher \ + programs/irrdcacher/ripe2rpsl + +PLIST_FILES= etc/irrd.conf.sample \ + man/man8/irrd.8.gz \ + sbin/irr_notify \ + sbin/irr_rpsl_check \ + sbin/irr_rpsl_submit \ + sbin/irrd \ + sbin/irrdcacher \ + sbin/ripe2rpsl + +post-patch: + ${REINPLACE_CMD} -e 's|/etc/irrd.conf|${IRRD_CONFDIR}/irrd.conf|g' \ + ${WRKSRC}/programs/IRRd/irrd.8 \ + ${WRKSRC}/programs/IRRd/main.c \ + ${WRKSRC}/programs/hdr_comm/read_conf.c \ + ${WRKSRC}/programs/irr_notify/main.c \ + ${WRKSRC}/programs/irr_rpsl_check/main.c \ + ${WRKSRC}/programs/irr_rpsl_submit/main.c \ + ${WRKSRC}/programs/irrdcacher/irrdcacher \ + ${WRKSRC}/programs/rps_dist/rpsdist.c + ${REINPLACE_CMD} -e 's|\($$(DESTDIR)\)|$$(STAGEDIR)\1|g' \ + -e 's|\( -m 755 \)| -s\1|g' \ + -e 's| -o root -g bin||g' \ + ${WRKSRC}/programs/IRRd/Makefile \ + ${WRKSRC}/programs/irr_notify/Makefile \ + ${WRKSRC}/programs/irr_rpsl_check/Makefile \ + ${WRKSRC}/programs/irr_rpsl_submit/Makefile + +post-install: + @${INSTALL_SCRIPT} ${WRKSRC}/programs/irrdcacher/irrdcacher \ + ${STAGEDIR}${PREFIX}/sbin + @${INSTALL_SCRIPT} ${WRKSRC}/programs/irrdcacher/ripe2rpsl \ + ${STAGEDIR}${PREFIX}/sbin + @${INSTALL_DATA} ${WRKSRC}/../samples/irrd.conf.sample \ + ${STAGEDIR}${IRRD_CONFDIR} + @${INSTALL_DATA} ${WRKSRC}/programs/IRRd/irrd.8 \ + ${STAGEDIR}${PREFIX}/man/man8 + +.include <bsd.port.mk> Added: head/net/irrd/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/irrd/distinfo Tue Sep 2 18:01:38 2014 (r367069) @@ -0,0 +1,2 @@ +SHA256 (irrd2.3.10.tgz) = b3ebedc1a1a24a7a87519bdf6776fbda335deb454333b6d09f7bb9fabca35746 +SIZE (irrd2.3.10.tgz) = 772658 Added: head/net/irrd/files/irrd.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/irrd/files/irrd.in Tue Sep 2 18:01:38 2014 (r367069) @@ -0,0 +1,28 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: irrd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Define these irrd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/irrd +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +irrd_enable="${irrd_enable:-NO}" # Enable irrd +#irrd_program="%%PREFIX%%/sbin/irrd" # Location of irrd +irrd_flags="${irrd_flags:--u}" # Flags to irrd program + +. /etc/rc.subr + +name="irrd" +rcvar=irrd_enable +command="%%PREFIX%%/sbin/irrd" +required_files="%%PREFIX%%/etc/irrd.conf" + +load_rc_config $name +run_rc_command "$1" Added: head/net/irrd/files/patch-config_file.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/irrd/files/patch-config_file.c Tue Sep 2 18:01:38 2014 (r367069) @@ -0,0 +1,11 @@ +--- lib/config/config_file.c.orig 2009-03-25 00:38:11.000000000 +0300 ++++ lib/config/config_file.c 2011-06-24 17:09:08.000000000 +0400 +@@ -772,7 +772,7 @@ + Deref_Prefix (prefix); + return (1); + } +- if (prefix_compare2 (UII->prefix, prefix) != 0) { ++ if ( UII->prefix == NULL || prefix_compare2 (UII->prefix, prefix) != 0) { + set_uii (UII, UII_ADDR, prefix, 0); + listen_uii2 (NULL); + } Added: head/net/irrd/files/patch-configure ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/irrd/files/patch-configure Tue Sep 2 18:01:38 2014 (r367069) @@ -0,0 +1,11 @@ +--- configure.orig 2006-09-12 21:40:55.000000000 +0400 ++++ configure 2008-02-15 16:23:17.000000000 +0300 +@@ -6011,7 +6011,7 @@ + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-#include <netinet/in.h> ++#include <netinet6/in6.h> + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | Added: head/net/irrd/files/patch-database.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/irrd/files/patch-database.c Tue Sep 2 18:01:38 2014 (r367069) @@ -0,0 +1,16 @@ +--- programs/IRRd/database.c~ 2009-03-25 00:21:26.000000000 +0300 ++++ programs/IRRd/database.c 2012-03-15 10:53:03.000000000 +0400 +@@ -59,9 +59,11 @@ + + db->radix_v4 = New_Radix (32); + db->radix_v6 = New_Radix (128); +- fclose (db->db_fp); + +- db->db_fp = NULL; ++ if (db->db_fp) { ++ fclose (db->db_fp); ++ db->db_fp = NULL; ++ } + } + + Added: head/net/irrd/files/patch-lib_mrt_prefix.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/irrd/files/patch-lib_mrt_prefix.c Tue Sep 2 18:01:38 2014 (r367069) @@ -0,0 +1,22 @@ +Index: lib/mrt/prefix.c +diff -u -p lib/mrt/prefix.c.orig lib/mrt/prefix.c +--- lib/mrt/prefix.c.orig Fri Aug 31 03:10:31 2001 ++++ lib/mrt/prefix.c Mon May 1 12:05:11 2006 +@@ -15,7 +15,7 @@ + #include <ws2tcpip.h> + #endif /* NT */ + +-#ifndef __GLIBC__ ++#if !defined(__GLIBC__) && !defined(__FreeBSD__) + #ifdef __osf__ + + /* apparently, OSF's gethostby{name,addr}_r's are different, broken, and +@@ -50,7 +50,7 @@ struct hostent *gethostbyaddr_r + For the time being, this part tries to convert Linux glibc 2.X + gethostXX_r into Solaris's that we use to code MRT. -- masaki + */ +-#if __GLIBC__ >= 2 ++#if __GLIBC__ >= 2 || (defined(__FreeBSD__) && defined(HAVE_GETHOSTBYNAME_R)) + /* Glibc 2.X + + int gethostbyname_r (const char *name, struct hostent *result_buf, Added: head/net/irrd/files/patch-uii_commands.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/irrd/files/patch-uii_commands.c Tue Sep 2 18:01:38 2014 (r367069) @@ -0,0 +1,55 @@ +--- programs/IRRd/uii_commands.c.orig Tue Feb 5 05:53:57 2002 ++++ programs/IRRd/uii_commands.c Thu Apr 22 18:13:29 2004 +@@ -14,6 +14,8 @@ + #include <ctype.h> + #include "irrd.h" + ++#include <errno.h> ++ + #include <fcntl.h> + #ifndef SETPGRP_VOID + #endif +@@ -720,6 +722,10 @@ + + void run_cmd (char *cmd, FILE **in, FILE **out) { + int pin[2], pout[2]; ++ int pid; ++ int omask, pstat; ++ pid_t ppid; ++ extern int errno; + + if (in != NULL) + *in = NULL; +@@ -733,7 +739,9 @@ + if (out != NULL) + pipe (pout); + +- if (fork() == 0) { /* We're the child */ ++/* if (fork() == 0) { */ ++ pid = fork(); ++ if (pid == 0) { /* We're the child */ + if (in != NULL) { + close (pin[1]); + dup2 (pin[0], 0); +@@ -747,7 +755,7 @@ + close (pout[1]); + } + +- execl("/bin/sh", "sh", "-c", cmd, NULL); ++ execlp("/bin/sh", "sh", "-c", cmd, NULL); + _exit(127); + } + +@@ -761,6 +769,12 @@ + close (pin[0]); + *in = fdopen (pin[1], "w"); + } ++ ++ omask = sigblock(sigmask(SIGINT)|sigmask(SIGQUIT)|sigmask(SIGHUP)); ++ do { ++ ppid = waitpid(pid, (int *) &pstat, 0); ++ } while (pid == -1 && errno == EINTR); ++ (void)sigsetmask(omask); + } + + int kill_irrd (uii_connection_t *uii) { Added: head/net/irrd/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/irrd/pkg-descr Tue Sep 2 18:01:38 2014 (r367069) @@ -0,0 +1,3 @@ +Internet Routing Registry Daemon (IRRd). + +WWW: http://www.irrd.net/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409021801.s82I1ceT071754>