aboutsummaryrefslogtreecommitdiff
path: root/net/quagga
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2007-10-03 15:41:10 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2007-10-03 15:41:10 +0000
commite9203a565a17b78cb0b5c5b11d81dada1d5e18ba (patch)
tree688cf1102058b1b169ea94d4740312c80d437c27 /net/quagga
parenta0298d77014d460f534f2fcf634b304ec8481442 (diff)
downloadports-e9203a565a17b78cb0b5c5b11d81dada1d5e18ba.tar.gz
ports-e9203a565a17b78cb0b5c5b11d81dada1d5e18ba.zip
Notes
Diffstat (limited to 'net/quagga')
-rw-r--r--net/quagga/Makefile4
-rw-r--r--net/quagga/files/patch-cvs-6-pidfile_mask107
-rw-r--r--net/quagga/files/patch-cvs-7-inet6debug74
3 files changed, 183 insertions, 2 deletions
diff --git a/net/quagga/Makefile b/net/quagga/Makefile
index cdc1ef4174fc..acce60f1c4ba 100644
--- a/net/quagga/Makefile
+++ b/net/quagga/Makefile
@@ -7,7 +7,7 @@
PORTNAME= quagga
PORTVERSION= 0.99.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net ipv6
MASTER_SITES= http://quagga.net/download/ \
http://www.ru.quagga.net/download/ \
@@ -45,7 +45,7 @@ OPTIONS= ISISD "Enable experimental ISIS daemon" off \
.include <bsd.port.pre.mk>
-CONFIGURE_ARGS+=--includedir=${PREFIX}/include --enable-exampledir=${PREFIX}/share/examples/quagga
+CONFIGURE_ARGS+=--includedir=${PREFIX}/include --enable-exampledir=${PREFIX}/share/examples/quagga --enable-pidfile-mask=0644
CONFIGURE_ENV+= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
LIBTOOL=${LIBTOOL} LIBTOOLIZE=${LIBTOOLIZE} \
diff --git a/net/quagga/files/patch-cvs-6-pidfile_mask b/net/quagga/files/patch-cvs-6-pidfile_mask
new file mode 100644
index 000000000000..6e9844edec12
--- /dev/null
+++ b/net/quagga/files/patch-cvs-6-pidfile_mask
@@ -0,0 +1,107 @@
+--- configure.ac 7 Sep 2007 16:54:01 -0000 1.139
++++ configure.ac 2 Oct 2007 13:01:49 -0000
+@@ -233,6 +233,8 @@
+ [ --enable-configfile-mask=ARG set mask for config files])
+ AC_ARG_ENABLE(logfile_mask,
+ [ --enable-logfile-mask=ARG set mask for log files])
++AC_ARG_ENABLE(pidfile_mask,
++[ --enable-pidfile-mask=ARG set mask for PID files])
+
+ AC_ARG_ENABLE(rtadv,
+ [ --disable-rtadv disable IPV6 router advertisement feature])
+@@ -344,6 +346,9 @@
+ enable_logfile_mask=${enable_logfile_mask:-0600}
+ AC_DEFINE_UNQUOTED(LOGFILE_MASK, ${enable_logfile_mask}, Mask for log files)
+
++enable_pidfile_mask=${enable_pidfile_mask:-0600}
++AC_DEFINE_UNQUOTED(PIDFILE_MASK, ${enable_pidfile_mask}, Mask for PID files)
++
+ MULTIPATH_NUM=1
+
+ case "${enable_multipath}" in
+@@ -1461,6 +1466,7 @@
+ group for vty sockets : ${enable_vty_group}
+ config file mask : ${enable_configfile_mask}
+ log file mask : ${enable_logfile_mask}
++PID file mask : ${enable_pidfile_mask}
+
+ The above user and group must have read/write access to the state file
+ directory and to the config files in the config file directory."
+--- lib/pid_output.c 17 Dec 2004 20:50:00 -0000 1.9
++++ lib/pid_output.c 2 Oct 2007 13:01:49 -0000
+@@ -36,7 +36,7 @@
+
+ pid = getpid();
+
+- oldumask = umask(0777 & ~LOGFILE_MASK);
++ oldumask = umask(0777 & ~PIDFILE_MASK);
+ fp = fopen (path, "w");
+ if (fp != NULL)
+ {
+@@ -67,8 +67,8 @@
+
+ pid = getpid ();
+
+- oldumask = umask(0777 & ~LOGFILE_MASK);
+- fd = open (path, O_RDWR | O_CREAT, LOGFILE_MASK);
++ oldumask = umask(0777 & ~PIDFILE_MASK);
++ fd = open (path, O_RDWR | O_CREAT, PIDFILE_MASK);
+ if (fd < 0)
+ {
+ zlog_err("Can't create pid lock file %s (%s), exiting",
+--- config.h.in Fri Sep 7 20:56:20 2007
++++ config.h.in Wed Oct 3 11:02:58 2007
+@@ -602,6 +602,9 @@
+ /* zebra PID */
+ #undef PATH_ZEBRA_PID
+
++/* Mask for PID files */
++#undef PIDFILE_MASK
++
+ /* Quagga Group */
+ #undef QUAGGA_GROUP
+
+--- configure Fri Sep 7 20:54:55 2007
++++ configure Wed Oct 3 11:02:51 2007
+@@ -1557,6 +1557,7 @@
+ --enable-vty-group=ARG set vty sockets to have specified group as owner
+ --enable-configfile-mask=ARG set mask for config files
+ --enable-logfile-mask=ARG set mask for log files
++ --enable-pidfile-mask=ARG set mask for PID files
+ --disable-rtadv disable IPV6 router advertisement feature
+ --enable-irdp enable IRDP server support in zebra
+ --enable-isis-topology enable IS-IS topology generator
+@@ -19976,6 +19891,11 @@
+ enableval=$enable_logfile_mask;
+ fi
+
++# Check whether --enable-pidfile_mask was given.
++if test "${enable_pidfile_mask+set}" = set; then
++ enableval=$enable_pidfile_mask;
++fi
++
+
+ # Check whether --enable-rtadv was given.
+ if test "${enable_rtadv+set}" = set; then
+@@ -20177,6 +20097,13 @@
+ _ACEOF
+
+
++enable_pidfile_mask=${enable_pidfile_mask:-0600}
++
++cat >>confdefs.h <<_ACEOF
++#define PIDFILE_MASK ${enable_pidfile_mask}
++_ACEOF
++
++
+ MULTIPATH_NUM=1
+
+ case "${enable_multipath}" in
+@@ -35773,6 +35700,7 @@
+ group for vty sockets : ${enable_vty_group}
+ config file mask : ${enable_configfile_mask}
+ log file mask : ${enable_logfile_mask}
++PID file mask : ${enable_pidfile_mask}
+
+ The above user and group must have read/write access to the state file
+ directory and to the config files in the config file directory."
diff --git a/net/quagga/files/patch-cvs-7-inet6debug b/net/quagga/files/patch-cvs-7-inet6debug
new file mode 100644
index 000000000000..f432d399ea7f
--- /dev/null
+++ b/net/quagga/files/patch-cvs-7-inet6debug
@@ -0,0 +1,74 @@
+diff -Nur zebra/zebra_rib.c zebra/zebra_rib.c
+--- zebra/zebra_rib.c 2007-08-22 20:22:57 +0400
++++ zebra/zebra_rib.c 2007-10-03 16:12:12 +0400
+@@ -992,12 +992,12 @@
+ struct route_node *rn = data;
+ int installed = 0;
+ struct nexthop *nexthop = NULL;
+- char buf[INET_ADDRSTRLEN];
++ char buf[INET6_ADDRSTRLEN];
+
+ assert (rn);
+
+ if (IS_ZEBRA_DEBUG_RIB || IS_ZEBRA_DEBUG_RIB_Q)
+- inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN);
++ inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
+
+ for (rib = rn->info; rib; rib = next)
+ {
+@@ -1300,7 +1300,7 @@
+ rib_link (struct route_node *rn, struct rib *rib)
+ {
+ struct rib *head;
+- char buf[INET_ADDRSTRLEN];
++ char buf[INET6_ADDRSTRLEN];
+
+ assert (rib && rn);
+
+@@ -1308,7 +1308,7 @@
+
+ if (IS_ZEBRA_DEBUG_RIB)
+ {
+- inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN);
++ inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
+ zlog_debug ("%s: %s/%d: rn %p, rib %p", __func__,
+ buf, rn->p.prefixlen, rn, rib);
+ }
+@@ -1338,8 +1338,8 @@
+ {
+ if (IS_ZEBRA_DEBUG_RIB)
+ {
+- char buf[INET_ADDRSTRLEN];
+- inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN);
++ char buf[INET6_ADDRSTRLEN];
++ inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
+ zlog_debug ("%s: %s/%d: rn %p, un-removed rib %p",
+ __func__, buf, rn->p.prefixlen, rn, rib);
+ }
+@@ -1353,13 +1353,13 @@
+ rib_unlink (struct route_node *rn, struct rib *rib)
+ {
+ struct nexthop *nexthop, *next;
+- char buf[INET_ADDRSTRLEN];
++ char buf[INET6_ADDRSTRLEN];
+
+ assert (rn && rib);
+
+ if (IS_ZEBRA_DEBUG_RIB)
+ {
+- inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN);
++ inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
+ zlog_debug ("%s: %s/%d: rn %p, rib %p",
+ __func__, buf, rn->p.prefixlen, rn, rib);
+ }
+@@ -1398,8 +1398,8 @@
+ {
+ if (IS_ZEBRA_DEBUG_RIB)
+ {
+- char buf[INET_ADDRSTRLEN];
+- inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN);
++ char buf[INET6_ADDRSTRLEN];
++ inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
+ zlog_debug ("%s: %s/%d: rn %p, rib %p, removing", __func__,
+ buf, rn->p.prefixlen, rn, rib);
+ }