Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2008 03:20:08 GMT
From:      "German M. Bravo" <german.mb@deipi.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/119992: Update port: net/hoststated - hoststated 20070308
Message-ID:  <200801260320.m0Q3K8fg096287@www.freebsd.org>
Resent-Message-ID: <200801260330.m0Q3U09E027129@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         119992
>Category:       ports
>Synopsis:       Update port: net/hoststated - hoststated 20070308
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 26 03:30:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     German M. Bravo
>Release:        FreeBSD 6.3-RELEASE
>Organization:
deipi.com LLC
>Environment:
FreeBSD deipi.com 6.3-RELEASE FreeBSD 6.3-RELEASE #10: Fri Jan 18 14:06:49 PST 2008     root@deipi.com:/usr/obj/usr/src/sys/CUSTOM  amd64
>Description:
hoststated is the host status daemon for server load balancing. Its
main purpose is to keep pf(4) tables up to date as well as any related
pf rdr rules. To communicate with pf, hoststated uses the anchor
facility. To enable hoststated to install rulesets through the anchor,
the following line is required in the NAT section of pf.conf(5).

>How-To-Repeat:

>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	hoststated
#	hoststated/files
#	hoststated/files/patch-hoststatectl_hoststatectl.c
#	hoststated/files/patch-hoststated_log.c
#	hoststated/files/patch-hoststated.c
#	hoststated/files/patch-hoststated_pfe__filter.c
#	hoststated/files/hoststated.sh.in
#	hoststated/files/patch-hoststatectl_parser.c
#	hoststated/files/patch-hoststated_parse.y
#	hoststated/files/patch-hoststated_check__tcp.c
#	hoststated/files/patch-hoststated_relay.c
#	hoststated/files/patch-hoststated_carp.c
#	hoststated/files/patch-hoststated_hoststated.h
#	hoststated/distinfo
#	hoststated/pkg-install
#	hoststated/pkg-plist
#	hoststated/pkg-descr
#	hoststated/Makefile
#
echo c - hoststated
mkdir -p hoststated > /dev/null 2>&1
echo c - hoststated/files
mkdir -p hoststated/files > /dev/null 2>&1
echo x - hoststated/files/patch-hoststatectl_hoststatectl.c
sed 's/^X//' >hoststated/files/patch-hoststatectl_hoststatectl.c << 'END-of-hoststated/files/patch-hoststatectl_hoststatectl.c'
X--- hoststatectl/hoststatectl.c.orig	2007-02-21 21:59:13.000000000 -0800
X+++ hoststatectl/hoststatectl.c	2008-01-20 14:18:13.000000000 -0800
X@@ -20,6 +20,7 @@
X  */
X 
X #include <sys/types.h>
X+#include <sys/param.h>
X #include <sys/socket.h>
X #include <sys/queue.h>
X #include <sys/un.h>
X@@ -286,7 +287,7 @@
X 	imn = monitor_lookup(imsg->hdr.type);
X 	printf("%s: imsg type %u len %u peerid %u pid %d\n", imn->name,
X 	    imsg->hdr.type, imsg->hdr.len, imsg->hdr.peerid, imsg->hdr.pid);
X-	printf("\ttimestamp: %u, %s", now, ctime(&now));
X+	printf("\ttimestamp: %u, %s", (unsigned int)now, ctime(&now));
X 	if (imn->type == -1)
X 		done = 1;
X 	if (imn->func != NULL)
END-of-hoststated/files/patch-hoststatectl_hoststatectl.c
echo x - hoststated/files/patch-hoststated_log.c
sed 's/^X//' >hoststated/files/patch-hoststated_log.c << 'END-of-hoststated/files/patch-hoststated_log.c'
X--- hoststated/log.c.orig  2007-02-21 19:32:39.000000000 -0800
X+++ hoststated/log.c       2008-01-20 13:15:51.000000000 -0800
X@@ -34,6 +34,7 @@
X #include <string.h>
X #include <syslog.h>
X #include <event.h>
X+#include <time.h>
X
X #include <openssl/ssl.h>
END-of-hoststated/files/patch-hoststated_log.c
echo x - hoststated/files/patch-hoststated.c
sed 's/^X//' >hoststated/files/patch-hoststated.c << 'END-of-hoststated/files/patch-hoststated.c'
X--- hoststated/hoststated.c.orig	29 Jan 2007 14:23:31 -0000	1.13
X+++ hoststated/hoststated.c	31 Jan 2007 16:47:43 -0000
X@@ -37,7 +37,7 @@
X 
X #include "hoststated.h"
X 
X-__dead void	 usage(void);
X+void	 usage(void);
X 
X void		 main_sig_handler(int, short, void *);
X void		 main_shutdown(void);
X@@ -85,7 +85,7 @@
X }
X 
X /* __dead is for lint */
X-__dead void
X+void
X usage(void)
X {
X 	extern char	*__progname;
END-of-hoststated/files/patch-hoststated.c
echo x - hoststated/files/patch-hoststated_pfe__filter.c
sed 's/^X//' >hoststated/files/patch-hoststated_pfe__filter.c << 'END-of-hoststated/files/patch-hoststated_pfe__filter.c'
X--- hoststated/pfe_filter.c.orig	2007-02-21 21:58:06.000000000 -0800
X+++ hoststated/pfe_filter.c	2008-01-20 18:26:39.000000000 -0800
X@@ -79,12 +79,6 @@
X 	i = 0;
X 
X 	TAILQ_FOREACH(service, &env->services, entry) {
X-		if (strlcpy(tables[i].pfrt_anchor, HOSTSTATED_ANCHOR "/",
X-		    sizeof(tables[i].pfrt_anchor)) >= PF_ANCHOR_NAME_SIZE)
X-			goto toolong;
X-		if (strlcat(tables[i].pfrt_anchor, service->name,
X-		    sizeof(tables[i].pfrt_anchor)) >= PF_ANCHOR_NAME_SIZE)
X-			goto toolong;
X 		if (strlcpy(tables[i].pfrt_name, service->name,
X 		    sizeof(tables[i].pfrt_name)) >=
X 		    sizeof(tables[i].pfrt_name))
X@@ -122,22 +116,38 @@
X }
X 
X void
X-kill_tables(struct hoststated *env) {
X-	struct pfioc_table	 io;
X+kill_tables(struct hoststated *env)
X+{
X+	int			 i;
X 	struct service		*service;
X+	struct pfr_table	*tables;
X+	struct pfioc_table	 io;
X+
X+	if ((tables = calloc(env->servicecount, sizeof(*tables))) == NULL)
X+		fatal("calloc");
X+	i = 0;
X 
X-	memset(&io, 0, sizeof(io));
X 	TAILQ_FOREACH(service, &env->services, entry) {
X-		if (strlcpy(io.pfrio_table.pfrt_anchor, HOSTSTATED_ANCHOR "/",
X-		    sizeof(io.pfrio_table.pfrt_anchor)) >= PF_ANCHOR_NAME_SIZE)
X-			goto toolong;
X-		if (strlcat(io.pfrio_table.pfrt_anchor, service->name,
X-		    sizeof(io.pfrio_table.pfrt_anchor)) >= PF_ANCHOR_NAME_SIZE)
X+		if (strlcpy(tables[i].pfrt_name, service->name,
X+		    sizeof(tables[i].pfrt_name)) >=
X+		    sizeof(tables[i].pfrt_name))
X 			goto toolong;
X-		if (ioctl(env->pf->dev, DIOCRCLRTABLES, &io) == -1)
X-			fatal("kill_tables: ioctl faile: ioctl failed");
X+		i++;
X 	}
X-	log_debug("kill_tables: deleted %d tables", io.pfrio_ndel);
X+	if (i != env->servicecount)
X+		fatalx("kill_tables: table count modified");
X+
X+	memset(&io, 0, sizeof(io));
X+	io.pfrio_size = env->servicecount;
X+	io.pfrio_esize = sizeof(*tables);
X+	io.pfrio_buffer = tables;
X+
X+	if (ioctl(env->pf->dev, DIOCRDELTABLES, &io) == -1)
X+		fatal("kill_tables: ioctl failed");
X+	log_debug("kill_tables: deleted %d tables of %d", io.pfrio_ndel, i);
X+
X+	free(tables);
X+
X 	return;
X 
X  toolong:
X@@ -170,12 +180,6 @@
X 	io.pfrio_size = table->up;
X 	io.pfrio_size2 = 0;
X 	io.pfrio_buffer = addlist;
X-	if (strlcpy(io.pfrio_table.pfrt_anchor, HOSTSTATED_ANCHOR "/",
X-	    sizeof(io.pfrio_table.pfrt_anchor)) >= PF_ANCHOR_NAME_SIZE)
X-		goto toolong;
X-	if (strlcat(io.pfrio_table.pfrt_anchor, service->name,
X-	    sizeof(io.pfrio_table.pfrt_anchor)) >= PF_ANCHOR_NAME_SIZE)
X-		goto toolong;
X 	if (strlcpy(io.pfrio_table.pfrt_name, service->name,
X 	    sizeof(io.pfrio_table.pfrt_name)) >=
X 	    sizeof(io.pfrio_table.pfrt_name))
X@@ -230,12 +234,6 @@
X 	struct pfioc_table	io;
X 
X 	memset(&io, 0, sizeof(io));
X-	if (strlcpy(io.pfrio_table.pfrt_anchor, HOSTSTATED_ANCHOR "/",
X-	    sizeof(io.pfrio_table.pfrt_anchor)) >= PF_ANCHOR_NAME_SIZE)
X-		goto toolong;
X-	if (strlcat(io.pfrio_table.pfrt_anchor, service->name,
X-	    sizeof(io.pfrio_table.pfrt_anchor)) >= PF_ANCHOR_NAME_SIZE)
X-		goto toolong;
X 	if (strlcpy(io.pfrio_table.pfrt_name, service->name,
X 	    sizeof(io.pfrio_table.pfrt_name)) >=
X 	    sizeof(io.pfrio_table.pfrt_name))
X@@ -320,7 +318,7 @@
X 		rio.rule.dst.addr.type = PF_ADDR_ADDRMASK;
X 		rio.rule.dst.port_op = PF_OP_EQ;
X 		rio.rule.dst.port[0] = address->port;
X-		rio.rule.rtableid = -1; /* stay in the main routing table */
X+		//rio.rule.rtableid = -1; /* stay in the main routing table */
X 		rio.rule.action = PF_RDR;
X 		if (strlen(service->tag))
X 			(void)strlcpy(rio.rule.tagname, service->tag,
END-of-hoststated/files/patch-hoststated_pfe__filter.c
echo x - hoststated/files/hoststated.sh.in
sed 's/^X//' >hoststated/files/hoststated.sh.in << 'END-of-hoststated/files/hoststated.sh.in'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X
X# PROVIDE: hoststated
X# REQUIRE: LOGIN abi
X# BEFORE:  securelevel
X# KEYWORD: shutdown
X
X# Add the following line to /etc/rc.conf to enable `hoststated':
X#
X# hoststated_enable="YES"
X#
X# See hoststated(8) for hoststated_flags
X#
X
X. "%%RC_SUBR%%"
X
Xname="hoststated"
Xrcvar=`set_rcvar`
X
Xextra_commands="reload"
Xcommand="%%PREFIX%%/sbin/hoststated"
Xrequired_files="%%PREFIX%%/etc/hoststated.conf"
X
Xload_rc_config "$name"
X: ${hoststated_enable="NO"}
X: ${hoststated_flags=""}
X
Xrun_rc_command "$1"
END-of-hoststated/files/hoststated.sh.in
echo x - hoststated/files/patch-hoststatectl_parser.c
sed 's/^X//' >hoststated/files/patch-hoststatectl_parser.c << 'END-of-hoststated/files/patch-hoststatectl_parser.c'
X--- hoststatectl/parser.c.orig	2007-02-21 19:32:40.000000000 -0800
X+++ hoststatectl/parser.c	2008-01-20 14:29:23.000000000 -0800
X@@ -19,6 +19,7 @@
X  */
X 
X #include <sys/types.h>
X+#include <sys/param.h>
X #include <sys/socket.h>
X #include <sys/queue.h>
X #include <netinet/in.h>
X@@ -65,7 +66,7 @@
X 
X static const struct token t_main[] = {
X 	{KEYWORD,	"monitor",	MONITOR,	NULL},
X-	{KEYWORD,	"show",		NULL,		t_show},
X+	{KEYWORD,	"show",		0,		t_show},
X 	{KEYWORD,	"stop",		SHUTDOWN,	NULL},
X 	{KEYWORD,	"service",	NONE,		t_service},
X 	{KEYWORD,	"table",	NONE,		t_table},
END-of-hoststated/files/patch-hoststatectl_parser.c
echo x - hoststated/files/patch-hoststated_parse.y
sed 's/^X//' >hoststated/files/patch-hoststated_parse.y << 'END-of-hoststated/files/patch-hoststated_parse.y'
X--- hoststated/parse.y.orig	30 Jan 2007 10:12:06 -0000	1.20
X+++ hoststated/parse.y	31 Jan 2007 16:47:43 -0000
X@@ -983,7 +983,7 @@
X 	hints.ai_family = PF_UNSPEC;
X 	hints.ai_socktype = SOCK_DGRAM; /* DUMMY */
X 	error = getaddrinfo(s, NULL, &hints, &res0);
X-	if (error == EAI_AGAIN || error == EAI_NODATA || error == EAI_NONAME)
X+	if (error == EAI_AGAIN || error == EAI_NONAME)
X 		return (0);
X 	if (error) {
X 		log_warnx("host_dns: could not parse \"%s\": %s", s,
END-of-hoststated/files/patch-hoststated_parse.y
echo x - hoststated/files/patch-hoststated_check__tcp.c
sed 's/^X//' >hoststated/files/patch-hoststated_check__tcp.c << 'END-of-hoststated/files/patch-hoststated_check__tcp.c'
X--- hoststated/check_tcp.c.orig	2008-01-20 13:38:07.000000000 -0800
X+++ hoststated/check_tcp.c	2008-01-20 13:43:08.000000000 -0800
X@@ -32,12 +32,13 @@
X #include <stdlib.h>
X #include <errno.h>
X #include <fnmatch.h>
X-#include <sha1.h>
X+//#include <sha1.h>
X 
X #include <openssl/ssl.h>
X 
X #include "hoststated.h"
X 
X+char*	SHA1_Data(const void *, unsigned int, char *);
X void	tcp_write(int, short, void *);
X void	tcp_host_up(int, struct ctl_tcp_event *);
X void	tcp_send_req(int, short, void *);
X@@ -349,7 +350,7 @@
X {
X 	char		*head;
X 	u_char		*b;
X-	char		 digest[(SHA1_DIGEST_LENGTH*2)+1];
X+	char		 digest[(SHA_DIGEST_LENGTH*2)+1];
X 	struct host	*host;
X 
X 	/*
X@@ -369,7 +370,7 @@
X 		return (1);
X 	}
X 	head += strlen("\r\n\r\n");
X-	SHA1Data(head, strlen(head), digest);
X+	SHA1_Data(head, strlen(head), digest);
X 
X 	if (strcmp(cte->table->digest, digest)) {
X 		log_warnx("check_http_digest: %s failed "
END-of-hoststated/files/patch-hoststated_check__tcp.c
echo x - hoststated/files/patch-hoststated_relay.c
sed 's/^X//' >hoststated/files/patch-hoststated_relay.c << 'END-of-hoststated/files/patch-hoststated_relay.c'
X--- hoststated/relay.c.orig	2008-01-20 13:57:53.000000000 -0800
X+++ hoststated/relay.c	2008-01-20 13:58:52.000000000 -0800
X@@ -48,6 +48,8 @@
X 
X #include "hoststated.h"
X 
X+#define TCP_SACK_ENABLE 0x10
X+
X void		 relay_sig_handler(int sig, short, void *);
X void		 relay_statistics(int, short, void *);
X void		 relay_dispatch_pfe(int, short, void *);
END-of-hoststated/files/patch-hoststated_relay.c
echo x - hoststated/files/patch-hoststated_carp.c
sed 's/^X//' >hoststated/files/patch-hoststated_carp.c << 'END-of-hoststated/files/patch-hoststated_carp.c'
X--- hoststated/carp.c.orig	2008-01-20 14:10:07.000000000 -0800
X+++ hoststated/carp.c	2008-01-20 14:12:47.000000000 -0800
X@@ -105,32 +105,7 @@
X int
X carp_demote_get(char *group)
X {
X-	int			s;
X-	struct ifgroupreq	ifgr;
X-
X-	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
X-		log_warn("carp_demote_get: socket");
X-		return (-1);
X-	}
X-
X-	bzero(&ifgr, sizeof(ifgr));
X-	if (strlcpy(ifgr.ifgr_name, group, sizeof(ifgr.ifgr_name)) >=
X-	    sizeof(ifgr.ifgr_name)) {
X-		log_warn("carp_demote_get: invalid group");
X-		return (-1);
X-	}
X-
X-	if (ioctl(s, SIOCGIFGATTR, (caddr_t)&ifgr) == -1) {
X-		if (errno == ENOENT)
X-			log_warnx("group \"%s\" does not exist", group);
X-		else
X-			log_warn("carp_demote_get: ioctl");
X-		close(s);
X-		return (-1);
X-	}
X-
X-	close(s);
X-	return ((int)ifgr.ifgr_attrib.ifg_carp_demoted);
X+	return (-1);
X }
X 
X int
X@@ -188,30 +163,5 @@
X int
X carp_demote_ioctl(char *group, int demote)
X {
X-	int			s, res;
X-	struct ifgroupreq	ifgr;
X-
X-	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
X-		log_warn("carp_demote_get: socket");
X-		return (-1);
X-	}
X-
X-	bzero(&ifgr, sizeof(ifgr));
X-	if (strlcpy(ifgr.ifgr_name, group, sizeof(ifgr.ifgr_name)) >=
X-	    sizeof(ifgr.ifgr_name)) {
X-		log_warn("carp_demote_ioctl: invalid group");
X-		return (-1);
X-	}
X-	ifgr.ifgr_attrib.ifg_carp_demoted = demote;
X-
X-	if ((res = ioctl(s, SIOCSIFGATTR, (caddr_t)&ifgr)) == -1)
X-		log_warn("unable to %s the demote state "
X-		    "of group '%s'", (demote > 0) ? "increment" : "decrement",
X-		    group);
X-	else
X-		log_info("%s the demote state of group '%s'",
X-		    (demote > 0) ? "incremented" : "decremented", group);
X-
X-	close(s);
X-	return (res);
X+	return (-1);
X }
END-of-hoststated/files/patch-hoststated_carp.c
echo x - hoststated/files/patch-hoststated_hoststated.h
sed 's/^X//' >hoststated/files/patch-hoststated_hoststated.h << 'END-of-hoststated/files/patch-hoststated_hoststated.h'
X--- hoststated/hoststated.h.orig	2008-01-20 14:08:54.000000000 -0800
X+++ hoststated/hoststated.h	2008-01-20 14:06:02.000000000 -0800
X@@ -19,6 +19,7 @@
X  */
X 
X #include <sys/tree.h>
X+#include <sys/queue.h>
X 
X #define CONF_FILE		"/usr/local/etc/hoststated.conf"
X #define HOSTSTATED_SOCKET	"/var/run/hoststated.sock"
END-of-hoststated/files/patch-hoststated_hoststated.h
echo x - hoststated/distinfo
sed 's/^X//' >hoststated/distinfo << 'END-of-hoststated/distinfo'
XMD5 (hoststated-20070308.tgz) = d4ffbae082aa22ad5b72dbe64c142247
XSHA256 (hoststated-20070308.tgz) = 7f7efec7f43f976b297e37d20d7921806c2291116a49549b7cf6a1f58069dae2
XSIZE (hoststated-20070131.tgz) = 61458
END-of-hoststated/distinfo
echo x - hoststated/pkg-install
sed 's/^X//' >hoststated/pkg-install << 'END-of-hoststated/pkg-install'
X#!/bin/sh
X
Xcase $2 in
XPOST-INSTALL)
X	USER=_hoststated
X	GROUP=${USER}
X	UID=132
X	GID=${UID}
X	PW=/usr/sbin/pw
X
X	if ${PW} group show "${GROUP}" 2>/dev/null; then
X		echo "You already have a group \"${GROUP}\", so I will use it."
X	else
X		if ${PW} groupadd ${GROUP} -g ${GID}; then
X			echo "Added group \"${GROUP}\"."
X		else
X			echo "Adding group \"${GROUP}\" failed..."
X			exit 1
X		fi
X	fi
X
X	if ${PW} user show "${USER}" 2>/dev/null; then
X		echo "You already have a user \"${USER}\", so I will use it."
X	else
X		if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \
X			-d "/var/empty" -s /sbin/nologin -c "HostState Daemon"
X		then
X			echo "Added user \"${USER}\"."
X		else
X			echo "Adding user \"${USER}\" failed..."
X			exit 1
X		fi
X	fi
X	exit 0
X	;;
Xesac
END-of-hoststated/pkg-install
echo x - hoststated/pkg-plist
sed 's/^X//' >hoststated/pkg-plist << 'END-of-hoststated/pkg-plist'
X@unexec if cmp -s %D/etc/hoststated.conf %D/etc/hoststated.conf.sample; then rm -f %D/etc/hoststated.conf; fi
Xetc/hoststated.conf.sample
X@exec [ -f %B/hoststated.conf ] || cp %B/%f %B/hoststated.conf
Xsbin/hoststated
Xsbin/hoststatectl
END-of-hoststated/pkg-plist
echo x - hoststated/pkg-descr
sed 's/^X//' >hoststated/pkg-descr << 'END-of-hoststated/pkg-descr'
Xhoststated is the host status daemon for server load balancing. Its
Xmain purpose is to keep pf(4) tables up to date as well as any related
Xpf rdr rules. To communicate with pf, hoststated uses the anchor
Xfacility. To enable hoststated to install rulesets through the anchor,
Xthe following line is required in the NAT section of pf.conf(5).
X
XWWW: http://www.openbsd.org/
X
X- Florent Thoumie
Xflz@FreeBSD.org
END-of-hoststated/pkg-descr
echo x - hoststated/Makefile
sed 's/^X//' >hoststated/Makefile << 'END-of-hoststated/Makefile'
X# New ports collection makefile for:	hoststated
X# Date created:         2008-01-19
X# Whom:                 German M. Bravo (Kronuz) <kronuz@users.sf.net>
X#                       Florent Thoumie <flz@FreeBSD.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	hoststated
XPORTVERSION=	4.0.${SNAPSHOT}
XCATEGORIES=	net
XMASTER_SITES=	${MASTER_SITE_LOCAL}
XMASTER_SITE_SUBDIR=	flz/hoststated/
XDISTFILES=	${PORTNAME}-${SNAPSHOT}.tgz
XEXTRACT_ONLY=	${PORTNAME}-${SNAPSHOT}.tgz
XSNAPSHOT=	20070308
X
XMAINTAINER=	flz@FreeBSD.org
XCOMMENT=	Host state daemon for server load-balancing
X
XLIB_DEPENDS=	event-1.3e:${PORTSDIR}/devel/libevent
X
XWRKSRC=		${WRKDIR}
XMANCOMPRESSED=	yes
XUSE_RC_SUBR=	hoststated.sh
XBUILD_ENV=	BINDIR="${PREFIX}/sbin"	\
X		MANDIR="${PREFIX}/man/man"
X
XMAN5=		hoststated.conf.5
XMAN8=		hoststatectl.8	\
X		hoststated.8
X
XSUBDIRS=	hoststated	\
X		hoststatectl
X
X.include <bsd.port.pre.mk>
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|-Wbounded|-I/usr/local/include|'	\
X			${WRKSRC}/hoststated/Makefile			\
X			${WRKSRC}/hoststatectl/Makefile
X	@${REINPLACE_CMD} -e 's|-levent|-L/usr/local/lib -levent -lmd|'	\
X			${WRKSRC}/hoststated/Makefile
X	@${REINPLACE_CMD} -e 's|__dead||' ${WRKSRC}/hoststatectl/hoststatectl.c
X	@${REINPLACE_CMD} -e 's|/etc/host|${PREFIX}/etc/host|'		\
X			${WRKSRC}/hoststated/hoststated.conf.5		\
X			${WRKSRC}/hoststated/hoststated.8		\
X			${WRKSRC}/hoststated/hoststated.h
X
Xdo-build:
X.for i in ${SUBDIRS}
X	cd ${WRKSRC}/$i; ${SETENV} ${BUILD_ENV} make all
X.endfor
X
Xdo-install:
X.for i in ${SUBDIRS}
X	cd ${WRKSRC}/$i; ${SETENV} ${BUILD_ENV} make install
X.endfor
X	${INSTALL_DATA} ${WRKSRC}/hoststated/hoststated.conf ${PREFIX}/etc/hoststated.conf.sample
X
Xpost-install:
X	@if [ ! -f ${PREFIX}/etc/hoststated.conf ]; then \
X		${CP} ${PREFIX}/etc/hoststated.conf.sample ${PREFIX}/etc/hoststated.conf; \
X	fi
X	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
X
X.include <bsd.port.post.mk>
END-of-hoststated/Makefile
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801260320.m0Q3K8fg096287>