diff options
author | mm <mm@FreeBSD.org> | 2011-06-07 02:19:50 +0800 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2011-06-07 02:19:50 +0800 |
commit | 17a123bce1c82fd72adb3846246f878740f590a5 (patch) | |
tree | f4153d0f816e6688e70906e3328480af408849fa /net | |
parent | 8d695bea2b0eeab41fdd75e45be34fa9e680b8b4 (diff) | |
download | freebsd-ports-gnome-17a123bce1c82fd72adb3846246f878740f590a5.tar.gz freebsd-ports-gnome-17a123bce1c82fd72adb3846246f878740f590a5.tar.zst freebsd-ports-gnome-17a123bce1c82fd72adb3846246f878740f590a5.zip |
- Add patches for OpenBSD bugs 6624 and 6627
- Switch to USERS and GROUPS framework
Diffstat (limited to 'net')
-rw-r--r-- | net/relayd/Makefile | 15 | ||||
-rw-r--r-- | net/relayd/files/patch-bug-6624 | 20 | ||||
-rw-r--r-- | net/relayd/files/patch-bug-6627 | 41 | ||||
-rw-r--r-- | net/relayd/files/pkg-install.in | 36 |
4 files changed, 64 insertions, 48 deletions
diff --git a/net/relayd/Makefile b/net/relayd/Makefile index 5e90d788d1cc..8f8e9618dc34 100644 --- a/net/relayd/Makefile +++ b/net/relayd/Makefile @@ -6,7 +6,7 @@ PORTNAME= relayd PORTVERSION= 4.9.20110526 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= mm @@ -29,13 +29,8 @@ CFLAGS+= -I${PREFIX}/include -Wall MAKE_ARGS+= BINDIR=${PREFIX}/sbin MANDIR=${PREFIX}/man/man -RUSER= _relayd -RGROUP= _relayd -PKGINSTALL= ${WRKDIR}/pkginstall -SUB_FILES+= pkg-install - -SUB_LIST+= RUSER=${RUSER} \ - RGROUP=${RGROUP} +USERS= _relayd +GROUPS= _relayd OPTIONS= LIBEVENT_STATIC "Build with static libevent" Off @@ -66,10 +61,6 @@ post-patch: ${WRKSRC}/relayd/relayd.conf.5 \ ${WRKSRC}/relayd/relayd.8 -pre-su-install: - @${SETENV} PKG_PREFIX=${PREFIX} \ - ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL - post-install: @${INSTALL_DATA} ${WRKSRC}/../etc/relayd.conf \ ${PREFIX}/etc/relayd.conf.sample diff --git a/net/relayd/files/patch-bug-6624 b/net/relayd/files/patch-bug-6624 new file mode 100644 index 000000000000..aa3b5e9f4f02 --- /dev/null +++ b/net/relayd/files/patch-bug-6624 @@ -0,0 +1,20 @@ +--- relayd/check_tcp.c.orig Sat Jun 4 08:59:06 2011 ++++ relayd/check_tcp.c Sat Jun 4 09:07:17 2011 +@@ -77,6 +77,8 @@ + goto bad; + } + ++ cte->s = s; ++ + bzero(&lng, sizeof(lng)); + if (setsockopt(s, SOL_SOCKET, SO_LINGER, &lng, sizeof(lng)) == -1) + goto bad; +@@ -100,7 +102,6 @@ + + cte->buf = NULL; + cte->host->up = HOST_UP; +- cte->s = s; + event_del(&cte->ev); + event_set(&cte->ev, s, EV_TIMEOUT|EV_WRITE, tcp_write, cte); + event_add(&cte->ev, &tv); + diff --git a/net/relayd/files/patch-bug-6627 b/net/relayd/files/patch-bug-6627 new file mode 100644 index 000000000000..045abdd30b31 --- /dev/null +++ b/net/relayd/files/patch-bug-6627 @@ -0,0 +1,41 @@ +--- relayd/hce.c.orig Mon Jun 6 18:02:45 2011 ++++ relayd/hce.c Mon Jun 6 18:09:07 2011 +@@ -207,10 +207,27 @@ + struct timeval tv_now, tv_dur; + u_long duration; + u_int logopt; +- struct host *h; ++ struct host *h, *hostupd; + int hostup; + const char *msg; + ++ if ((hostupd = host_find(env, host->conf.id)) == NULL) ++ fatalx("hce_notify_done: desynchronized"); ++ ++ if ((table = table_find(env, host->conf.tableid)) == NULL) ++ fatalx("hce_notify_done: invalid table id"); ++ ++ if (hostupd->flags & F_DISABLE) { ++ if (env->sc_opts & RELAYD_OPT_LOGUPDATE) { ++ log_info("host %s, check %s%s (ignoring result, " ++ "host disabled)", ++ host->conf.name, table_check(table->conf.check), ++ (table->conf.flags & F_SSL) ? " use ssl" : ""); ++ } ++ host->flags |= (F_CHECK_SENT|F_CHECK_DONE); ++ return; ++ } ++ + hostup = host->up; + host->he = he; + +@@ -250,9 +267,6 @@ + duration = (tv_dur.tv_sec * 1000) + (tv_dur.tv_usec / 1000.0); + else + duration = 0; +- +- if ((table = table_find(env, host->conf.tableid)) == NULL) +- fatalx("hce_notify_done: invalid table id"); + + if (env->sc_opts & logopt) { + log_info("host %s, check %s%s (%lums), state %s -> %s, " diff --git a/net/relayd/files/pkg-install.in b/net/relayd/files/pkg-install.in deleted file mode 100644 index f5ee2a7be0ca..000000000000 --- a/net/relayd/files/pkg-install.in +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ - -case $2 in -PRE-INSTALL) - USER=%%RUSER%% - GROUP=%%RGROUP%% - UID=913 - GID=913 - - if pw group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi - fi - - if pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d /var/empty -c "Relay Daemon" -s /usr/sbin/nologin - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - ;; -esac |