From owner-svn-ports-head@freebsd.org Wed Apr 8 10:45:11 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8FB72AF6B3; Wed, 8 Apr 2020 10:45:11 +0000 (UTC) (envelope-from bofh@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48y1Bb4k9Mz42NF; Wed, 8 Apr 2020 10:45:11 +0000 (UTC) (envelope-from bofh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D45521EAC; Wed, 8 Apr 2020 10:45:11 +0000 (UTC) (envelope-from bofh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 038AjBmp016188; Wed, 8 Apr 2020 10:45:11 GMT (envelope-from bofh@FreeBSD.org) Received: (from bofh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 038AjAMH016182; Wed, 8 Apr 2020 10:45:10 GMT (envelope-from bofh@FreeBSD.org) Message-Id: <202004081045.038AjAMH016182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bofh set sender to bofh@FreeBSD.org using -f From: Muhammad Moinur Rahman Date: Wed, 8 Apr 2020 10:45:10 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r531105 - in head/net: . irrd-legacy irrd-legacy/files X-SVN-Group: ports-head X-SVN-Commit-Author: bofh X-SVN-Commit-Paths: in head/net: . irrd-legacy irrd-legacy/files X-SVN-Commit-Revision: 531105 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2020 10:45:11 -0000 Author: bofh Date: Wed Apr 8 10:45:10 2020 New Revision: 531105 URL: https://svnweb.freebsd.org/changeset/ports/531105 Log: [NEW] net/irrd-legacy: Legacy V 2.X of net/irrd - Pet portlint - Make patches makepatch compatible - Take MAINTAINERSHIP Approved by: ume (private mail) Added: head/net/irrd-legacy/ - copied from r530944, head/net/irrd/ head/net/irrd-legacy/files/patch-lib_config_config__file.c (contents, props changed) head/net/irrd-legacy/files/patch-programs_IRRd_database.c (contents, props changed) head/net/irrd-legacy/files/patch-programs_IRRd_uii__commands.c (contents, props changed) Deleted: head/net/irrd-legacy/files/patch-config_file.c head/net/irrd-legacy/files/patch-database.c head/net/irrd-legacy/files/patch-uii_commands.c Modified: head/net/Makefile head/net/irrd-legacy/Makefile head/net/irrd-legacy/files/patch-lib_mrt_prefix.c Modified: head/net/Makefile ============================================================================== --- head/net/Makefile Wed Apr 8 10:17:12 2020 (r531104) +++ head/net/Makefile Wed Apr 8 10:45:10 2020 (r531105) @@ -282,6 +282,7 @@ SUBDIR += ipsvd SUBDIR += ipxe SUBDIR += irrd + SUBDIR += irrd-legacy SUBDIR += isboot-kmod SUBDIR += isc-dhcp44-client SUBDIR += isc-dhcp44-relay Modified: head/net/irrd-legacy/Makefile ============================================================================== --- head/net/irrd/Makefile Tue Apr 7 02:34:29 2020 (r530944) +++ head/net/irrd-legacy/Makefile Wed Apr 8 10:45:10 2020 (r531105) @@ -4,26 +4,27 @@ PORTNAME= irrd PORTVERSION= 2.3.10 DISTVERSIONPREFIX= v -PORTREVISION= 3 CATEGORIES= net +PKGNAMESUFFIX= -legacy -MAINTAINER= ume@FreeBSD.org +MAINTAINER= bofh@FreeBSD.org COMMENT= Internet Routing Registry database server LICENSE= BSD4CLAUSE -LICENSE_FILE= ${WRKDIR}/${PORTNAME}-legacy-${PORTVERSION}/COPYRIGHT +LICENSE_FILE= ${WRKDIR}/${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}/COPYRIGHT RUN_DEPENDS= wget:ftp/wget -WRKSRC_SUBDIR= src - -IRRD_CONFDIR= ${PREFIX}/etc - USES= shebangfix -USE_RC_SUBR= irrd USE_GITHUB= yes +USE_RC_SUBR= irrd + GH_ACCOUNT= irrdnet -GH_PROJECT= irrd-legacy +GH_PROJECT= ${PORTNAME}${PKGNAMESUFFIX} + +WRKSRC_SUBDIR= src + +IRRD_CONFDIR= ${PREFIX}/etc GNU_CONFIGURE= yes CONFIGURE_ENV= YACC="${YACC}" Added: head/net/irrd-legacy/files/patch-lib_config_config__file.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/irrd-legacy/files/patch-lib_config_config__file.c Wed Apr 8 10:45:10 2020 (r531105) @@ -0,0 +1,11 @@ +--- lib/config/config_file.c.orig 2015-04-03 11:26:26 UTC ++++ lib/config/config_file.c +@@ -772,7 +772,7 @@ config_line_address (uii_connection_t * uii, prefix_t + 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); + } Modified: head/net/irrd-legacy/files/patch-lib_mrt_prefix.c ============================================================================== --- head/net/irrd/files/patch-lib_mrt_prefix.c Tue Apr 7 02:34:29 2020 (r530944) +++ head/net/irrd-legacy/files/patch-lib_mrt_prefix.c Wed Apr 8 10:45:10 2020 (r531105) @@ -1,17 +1,16 @@ 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 - #endif /* NT */ +--- lib/mrt/prefix.c.orig 2015-04-03 11:26:26 UTC ++++ lib/mrt/prefix.c +@@ -5,7 +5,7 @@ + #include + #include -#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 +@@ -29,7 +29,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 */ Added: head/net/irrd-legacy/files/patch-programs_IRRd_database.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/irrd-legacy/files/patch-programs_IRRd_database.c Wed Apr 8 10:45:10 2020 (r531105) @@ -0,0 +1,16 @@ +--- programs/IRRd/database.c.orig 2015-04-03 11:26:26 UTC ++++ programs/IRRd/database.c +@@ -59,9 +59,11 @@ void database_clear (irr_database_t *db) { + + 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-legacy/files/patch-programs_IRRd_uii__commands.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/irrd-legacy/files/patch-programs_IRRd_uii__commands.c Wed Apr 8 10:45:10 2020 (r531105) @@ -0,0 +1,55 @@ +--- programs/IRRd/uii_commands.c.orig 2015-04-03 11:26:26 UTC ++++ programs/IRRd/uii_commands.c +@@ -14,6 +14,8 @@ + #include + #include "irrd.h" + ++#include ++ + #include + #ifndef SETPGRP_VOID + #endif +@@ -700,6 +702,10 @@ int uii_read_update_file (uii_connection_t *uii, char + + 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; +@@ -713,7 +719,9 @@ void run_cmd (char *cmd, FILE **in, FILE **out) { + 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); +@@ -727,7 +735,7 @@ void run_cmd (char *cmd, FILE **in, FILE **out) { + close (pout[1]); + } + +- execl("/bin/sh", "sh", "-c", cmd, NULL); ++ execlp("/bin/sh", "sh", "-c", cmd, NULL); + _exit(127); + } + +@@ -741,6 +749,12 @@ void run_cmd (char *cmd, FILE **in, FILE **out) { + 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) {