From owner-freebsd-ports-bugs@FreeBSD.ORG Wed May 10 02:16:41 2006 Return-Path: X-Original-To: freebsd-ports-bugs@FreeBSD.org Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D533016A400; Wed, 10 May 2006 02:16:41 +0000 (UTC) (envelope-from huntting@glarp.com) Received: from pernicious.glarp.com (71-211-240-150.hlrn.qwest.net [71.211.240.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0903443D45; Wed, 10 May 2006 02:16:40 +0000 (GMT) (envelope-from huntting@glarp.com) Received: from hunkular.glarp.com (hunkular.glarp.com [10.0.0.251]) by pernicious.glarp.com (8.13.6/8.13.4) with ESMTP id k4A2GWJn003231 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NOT); Tue, 9 May 2006 20:16:32 -0600 (MDT) (envelope-from huntting@hunkular.glarp.com) Received: from hunkular.glarp.com (localhost [127.0.0.1]) by hunkular.glarp.com (8.13.4/8.13.4) with ESMTP id k4A2GVuK059667; Tue, 9 May 2006 20:16:31 -0600 (MDT) (envelope-from huntting@hunkular.glarp.com) Message-Id: <200605100216.k4A2GVuK059667@hunkular.glarp.com> To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org From: Brad Huntting In-Reply-To: Your message of "Wed, 10 May 2006 00:10:21 GMT." <200605100010.k4A0ALgU084585@freefall.freebsd.org> Date: Tue, 09 May 2006 20:16:31 -0600 Sender: huntting@glarp.com X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (pernicious.glarp.com [10.0.0.254]); Tue, 09 May 2006 20:16:32 -0600 (MDT) Cc: huntting@glarp.com Subject: Re: ports/97066: sysutils/fcron X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2006 02:16:41 -0000 Oops... I seem to have incorrectly specified the pkg-plist and left a --with-debug in the Makefile. Please disregard the previous patch. Here is the correct patch: thanx, brad ------------- cut here ----------- diff -Nru /usr/ports/sysutils/fcron/Makefile fcron/Makefile --- /usr/ports/sysutils/fcron/Makefile Fri Feb 10 02:51:04 2006 +++ fcron/Makefile Tue May 9 20:01:42 2006 @@ -8,6 +8,7 @@ PORTNAME= fcron PORTVERSION= 3.0.1 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SUNSITE} \ http://fcron.free.fr/archives/ \ @@ -20,6 +21,7 @@ GNU_CONFIGURE= yes USE_GMAKE= yes +USE_AUTOTOOLS= autoconf:259 USE_PERL5_BUILD=yes CONFIGURE_ARGS= --with-etcdir=${PREFIX}/etc --with-cflags="${CFLAGS}" \ --with-rootname=root --with-rootgroup=wheel \ @@ -34,6 +36,9 @@ MAN5= fcron.conf.5 fcrontab.5 MAN8= fcron.8 +PAMDIR?= /etc/pam.d +PLIST_SUB+= PAMDIR=${PAMDIR} + PORTDOCS= * .if defined(MANLANG) && exists(${WRKSRC}/doc/${MANLANG}) @@ -55,6 +60,8 @@ .endfor ${MKDIR} ${EXAMPLESDIR} ${INSTALL_DATA} ${FILESDIR}/fcrontab-* ${WRKSRC}/files/*.pam ${EXAMPLESDIR} + [ -f ${PAMDIR}/fcron ] || ${INSTALL_DATA} ${WRKSRC}/files/fcron.pam ${PAMDIR}/fcron + [ -f ${PAMDIR}/fcrontab ] || ${INSTALL_DATA} ${WRKSRC}/files/fcrontab.pam ${PAMDIR}/fcrontab .for n in 1 5 8 ${INSTALL_MAN} ${MAN${n}:S|^|${DOCSRC}/man/|} ${PREFIX}/man/man${n} .endfor diff -Nru /usr/ports/sysutils/fcron/files/patch-config.h.in fcron/files/patch-config.h.in --- /usr/ports/sysutils/fcron/files/patch-config.h.in Wed Dec 31 17:00:00 1969 +++ fcron/files/patch-config.h.in Tue May 9 17:15:42 2006 @@ -0,0 +1,8 @@ +--- config.h.in.orig Mon Feb 6 14:44:52 2006 ++++ config.h.in Tue May 9 17:15:19 2006 +@@ -424,3 +424,5 @@ + #define O_SYNC O_FSYNC + #endif + ++/* Define if (struct sockaddr) has an sa_len field. */ ++#undef HAVE_SA_LEN diff -Nru /usr/ports/sysutils/fcron/files/patch-configure.in fcron/files/patch-configure.in --- /usr/ports/sysutils/fcron/files/patch-configure.in Wed Dec 31 17:00:00 1969 +++ fcron/files/patch-configure.in Tue May 9 17:04:47 2006 @@ -0,0 +1,20 @@ +--- configure.in.orig Mon Jan 9 17:21:24 2006 ++++ configure.in Tue May 9 17:04:30 2006 +@@ -57,6 +57,17 @@ + AC_STRUCT_TM + AC_TYPE_UID_T + ++dnl Check for post-Reno style struct sockaddr ++AC_CACHE_CHECK([for sa_len], ++ ac_cv_sa_len, ++[AC_TRY_COMPILE([#include ++#include ], [int main(void) { ++ struct sockaddr t;t.sa_len = 0;}], ++ ac_cv_sa_len=yes,ac_cv_sa_len=no)]) ++if test $ac_cv_sa_len = yes; then ++ AC_DEFINE(HAVE_SA_LEN) ++fi ++ + dnl Checks for library functions. + AC_PROG_GCC_TRADITIONAL + AC_FUNC_MEMCMP diff -Nru /usr/ports/sysutils/fcron/files/patch-fcrondyn.c fcron/files/patch-fcrondyn.c --- /usr/ports/sysutils/fcron/files/patch-fcrondyn.c Wed Dec 31 17:00:00 1969 +++ fcron/files/patch-fcrondyn.c Tue May 9 15:26:26 2006 @@ -0,0 +1,29 @@ +--- fcrondyn.c.orig Mon Feb 6 14:44:52 2006 ++++ fcrondyn.c Tue May 9 15:24:22 2006 +@@ -399,17 +399,21 @@ + int fd = -1; + struct sockaddr_un addr; + int len = 0; ++ int sa_len; + + if ( (fd = socket(PF_UNIX, SOCK_STREAM, 0)) == -1 ) + die_e("could not create socket"); + + addr.sun_family = AF_UNIX; +- if ( (len = strlen(fifofile)) > sizeof(addr.sun_path) ) +- die("Error : fifo file path too long (max is %d)", sizeof(addr.sun_path)); +- strncpy(addr.sun_path, fifofile, sizeof(addr.sun_path) - 1); +- addr.sun_path[sizeof(addr.sun_path)-1] = '\0'; ++ if ( (len = strlen(fifofile)) > sizeof(addr.sun_path) - 1 ) ++ die("Error : fifo file path too long (max is %d)", sizeof(addr.sun_path) - 1); ++ strncpy(addr.sun_path, fifofile, sizeof(addr.sun_path)); ++ sa_len = (addr.sun_path - (char *)&addr) + len; ++#if HAVE_SA_LEN ++ addr.sun_len = sa_len; ++#endif + +- if ( connect(fd, (struct sockaddr *) &addr, sizeof(addr.sun_family) + len) < 0 ) ++ if ( connect(fd, (struct sockaddr *) &addr, sa_len) < 0 ) + die_e("Cannot connect() to fcron (check if fcron is running)"); + + if ( authenticate_user(fd) == ERR ) { diff -Nru /usr/ports/sysutils/fcron/files/patch-socket.c fcron/files/patch-socket.c --- /usr/ports/sysutils/fcron/files/patch-socket.c Wed Dec 31 17:00:00 1969 +++ fcron/files/patch-socket.c Tue May 9 16:33:41 2006 @@ -0,0 +1,34 @@ +--- socket.c.orig Mon Feb 6 14:44:52 2006 ++++ socket.c Tue May 9 16:33:19 2006 +@@ -134,6 +134,7 @@ + { + struct sockaddr_un addr; + int len = 0; ++ int sa_len; + + /* used in fcron.c:main_loop():select() */ + FD_ZERO(&read_set); +@@ -145,15 +146,19 @@ + } + + addr.sun_family = AF_UNIX; +- if ( (len = strlen(fifofile)) > sizeof(addr.sun_path) ) { +- error("Error : fifo file path too long (max is %d)", sizeof(addr.sun_path)); ++ if ( (len = strlen(fifofile)) > sizeof(addr.sun_path) - 1) { ++ error("Error : fifo file path too long (max is %d)", sizeof(addr.sun_path) - 1); + goto err; + } +- strncpy(addr.sun_path, fifofile, sizeof(addr.sun_path) - 1); ++ strncpy(addr.sun_path, fifofile, sizeof(addr.sun_path)); + addr.sun_path[sizeof(addr.sun_path) -1 ] = '\0'; ++ sa_len = (addr.sun_path - (char *)&addr) + len; ++#if HAVE_SA_LEN ++ addr.sun_len = sa_len; ++#endif + + unlink(fifofile); +- if (bind(listen_fd, (struct sockaddr*) &addr, sizeof(addr.sun_family)+len+1) != 0){ ++ if (bind(listen_fd, (struct sockaddr*) &addr, sa_len) != 0){ + error_e("Cannot bind socket to '%s'", fifofile); + goto err; + } diff -Nru /usr/ports/sysutils/fcron/files/pkg-message.in fcron/files/pkg-message.in --- /usr/ports/sysutils/fcron/files/pkg-message.in Fri Feb 10 02:51:04 2006 +++ fcron/files/pkg-message.in Mon May 8 09:24:35 2006 @@ -5,12 +5,6 @@ fcron_enable="YES" cron_enable="NO" -install the pam config files - - mkdir -p %%PREFIX%%/etc/pam.d - cp %%EXAMPLESDIR%%/fcron.pam %%PREFIX%%/etc/pam.d/fcron - cp %%EXAMPLESDIR%%/fcrontab.pam %%PREFIX%%/etc/pam.d/fcrontab - and move any jobs in /etc/crontab to the root fcrontab(5) file. See: %%EXAMPLESDIR%% diff -Nru /usr/ports/sysutils/fcron/pkg-plist fcron/pkg-plist --- /usr/ports/sysutils/fcron/pkg-plist Fri Feb 10 02:51:04 2006 +++ fcron/pkg-plist Tue May 9 20:07:04 2006 @@ -5,8 +5,11 @@ etc/fcron.conf.dist etc/fcron.deny.dist sbin/fcron -%%EXAMPLESDIR%%/fcron.pam %%EXAMPLESDIR%%/fcrontab-operator %%EXAMPLESDIR%%/fcrontab-root +%%EXAMPLESDIR%%/fcron.pam %%EXAMPLESDIR%%/fcrontab.pam @dirrm %%EXAMPLESDIR%% +@cwd / +%%PAMDIR%%/fcron +%%PAMDIR%%/fcrontab