ports/165380: utmpx fix and make it work
Denis Generalov
gd at ramble.ru
Tue Feb 21 23:00:25 UTC 2012
>Number: 165380
>Category: ports
>Synopsis: utmpx fix and make it work
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Tue Feb 21 23:00:25 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Denis Generalov
>Release: FreeBSD 9.0-STABLE
>Organization:
Rambler
>Environment:
FreeBSD tyl2.park.rambler.ru 9.0-STABLE FreeBSD 9.0-STABLE #1: Tue Feb 14 22:57:58 MSK 2012 root at tyl2.park.rambler.ru:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Fix utmpx and make it work for FreeBSD 9.0 and FreeBSD 8.2.
>How-To-Repeat:
try to make and run msend or mesgd
>Fix:
Patch attached
Patch attached with submission follows:
===> Generating patch
===> Viewing diff with more
diff -ruN --exclude=CVS /usr/ports/net/msend/Makefile /home/gd/work/cvs_ports/net/msend/Makefile
--- /usr/ports/net/msend/Makefile 2010-03-20 19:02:53.000000000 +0300
+++ /home/gd/work/cvs_ports/net/msend/Makefile 2012-02-22 02:38:37.000000000 +0400
@@ -7,6 +7,7 @@
PORTNAME= msend
PORTVERSION= 3.0
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= markp
@@ -14,16 +15,19 @@
MAINTAINER= ports at FreeBSD.org
COMMENT= A client and server for the RFC1312 message protocol
+USE_RC_SUBR= mesgd
+USE_AUTOTOOLS= aclocal autoheader autoconf automake
+AUTOMAKE_ARGS+= --add-missing
GNU_CONFIGURE= yes
-CFLAGS+= -DUSE_READLINE
+CFLAGS+= -DUSE_READLINE -DNO_GETDTABLESIZE -DNEW_HEADERS
MAN1= msend.1
MAN8= mesgd.8
.include <bsd.port.pre.mk>
-.if ${OSVERSION} > 900007
-BROKEN= fails to build with new utmpx
+.if ${OSVERSION} >= 900007
+CFLAGS+= -DUSE_UTMPX
.endif
.include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/net/msend/files/mesgd.in /home/gd/work/cvs_ports/net/msend/files/mesgd.in
--- /usr/ports/net/msend/files/mesgd.in 1970-01-01 03:00:00.000000000 +0300
+++ /home/gd/work/cvs_ports/net/msend/files/mesgd.in 2012-02-22 02:40:47.000000000 +0400
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: mesgd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf to enable mesgd:
+#
+# mesgd_enable=(bool): Set it to "YES" to enable mesgd
+#
+# and add appropriate mesgd_flags.
+#
+
+. /etc/rc.subr
+
+name="mesgd"
+rcvar=mesgd_enable
+
+load_rc_config $name
+
+: ${mesgd_enable="NO"}
+
+command=%%PREFIX%%/sbin/${name}
+
+run_rc_command "$1"
diff -ruN --exclude=CVS /usr/ports/net/msend/files/patch-common-h /home/gd/work/cvs_ports/net/msend/files/patch-common-h
--- /usr/ports/net/msend/files/patch-common-h 1970-01-01 03:00:00.000000000 +0300
+++ /home/gd/work/cvs_ports/net/msend/files/patch-common-h 2012-02-22 02:21:10.000000000 +0400
@@ -0,0 +1,10 @@
+--- common.h.orig 1999-05-02 17:00:39.000000000 +0400
++++ common.h 2012-02-22 02:20:34.000000000 +0400
+@@ -45,6 +45,7 @@
+
+ #ifdef USE_UTMPX
+ #include <utmpx.h>
++#define ut_name ut_user
+ #else
+ #include <utmp.h>
+ #endif
===> Done
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list