From nobody@FreeBSD.org  Wed Jun  6 06:05:31 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 584CE106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Jun 2012 06:05:31 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 426898FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Jun 2012 06:05:31 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q5665UAe054248
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 6 Jun 2012 06:05:30 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q5665Ufw054239;
	Wed, 6 Jun 2012 06:05:30 GMT
	(envelope-from nobody)
Message-Id: <201206060605.q5665Ufw054239@red.freebsd.org>
Date: Wed, 6 Jun 2012 06:05:30 GMT
From: Olivier Cochard-Labbe <olivier@cochard.me>
To: freebsd-gnats-submit@FreeBSD.org
Subject: www/shellinabox update to 2.14 and options-ng compliant
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         168736
>Category:       ports
>Synopsis:       www/shellinabox update to 2.14 and options-ng compliant
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sylvio
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 06 06:10:11 UTC 2012
>Closed-Date:    Sun Jun 10 00:37:34 UTC 2012
>Last-Modified:  Sun Jun 10 00:40:07 UTC 2012
>Originator:     Olivier Cochard-Labbe
>Release:        9.0
>Organization:
BSD Router Project
>Environment:
FreeBSD bigdev.bsdrp.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sat Jan  7 19:32:30 CET 2012     root@bigdev.bsdrp.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Hi,
here is an upgrade to release 2.14 for shellinabox.
This port is compliant to the new options frameworks too.

Regards,

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN shellinabox.orig/Makefile shellinabox/Makefile
--- shellinabox.orig/Makefile	2012-06-05 23:14:53.000000000 +0200
+++ shellinabox/Makefile	2012-06-06 07:44:45.000000000 +0200
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	shellinabox
-PORTVERSION=	2.10
-PORTREVISION=	3
+PORTVERSION=	2.14
 CATEGORIES=	www
 MASTER_SITES=	GOOGLE_CODE
 
@@ -17,7 +16,9 @@
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-OPTIONS=	ENABLE_CORES	"Patch shellinaboxd to enable core dumps." off
+OPTIONS_DEFINE= CORES MANPAGES DOCS
+OPTIONS_DEFAULT=    MANPAGES DOCS
+CORES_DESC=	Patch shellinaboxd to enable core dumps
 
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	\
@@ -29,7 +30,7 @@
 USERS?=		shellinabox
 GROUPS?=	shellinabox
 
-MAN1=		shellinaboxd.1
+MAN1=   shellinaboxd.1
 
 PORTDOCS=	AUTHORS ChangeLog INSTALL README COPYING GPL-2 NEWS TODO
 
@@ -47,7 +48,7 @@
 .endif
 
 post-patch:
-.if defined(WITH_ENABLE_CORES)
+.if ${PORT_OPTIONS:MCORES}
 	@${REINPLACE_CMD} \
 		-e 's|prctl(PR_SET_DUMPABLE,|// &|' \
 		-e 's|setrlimit(RLIMIT_CORE,|// &|' \
@@ -56,7 +57,7 @@
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/shellinaboxd ${PREFIX}/bin/
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	${MKDIR} ${DOCSDIR}/
 	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
 .endif
diff -ruN shellinabox.orig/distinfo shellinabox/distinfo
--- shellinabox.orig/distinfo	2012-06-05 23:14:53.000000000 +0200
+++ shellinabox/distinfo	2012-06-05 23:50:23.000000000 +0200
@@ -1,2 +1,2 @@
-SHA256 (shellinabox-2.10.tar.gz) = 9a2dfa14fcb050de6f450b3b53522f2106cdef4a5591e3e41bd00de1e11d43cb
-SIZE (shellinabox-2.10.tar.gz) = 513430
+SHA256 (shellinabox-2.14.tar.gz) = 4126eb7070869787c161102cc2781d24d1d50c8aef4e5a3e1b5446e65d691071
+SIZE (shellinabox-2.14.tar.gz) = 544919
diff -ruN shellinabox.orig/files/patch-Makefile.in shellinabox/files/patch-Makefile.in
--- shellinabox.orig/files/patch-Makefile.in	2012-06-05 23:14:53.000000000 +0200
+++ shellinabox/files/patch-Makefile.in	1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
---- ./Makefile.in.orig	2009-11-21 23:47:39.000000000 +0100
-+++ ./Makefile.in	2010-08-12 15:05:47.001428510 +0200
-@@ -372,6 +372,7 @@
-                          i[0-9]86) echo '-O elf32-i386 -B i386';;             \
-                          x86_64)   echo '-O elf64-x86-64 -B i386:x86-64';;    \
-                          arm*)     echo '-O elf32-littlearm -B arm';;         \
-+                          sparc64)  echo '-O elf64-sparc -B sparc';;         \
-                        esac
- 
- renamesymbols = \
diff -ruN shellinabox.orig/files/patch-config.h.in shellinabox/files/patch-config.h.in
--- shellinabox.orig/files/patch-config.h.in	2012-06-05 23:14:53.000000000 +0200
+++ shellinabox/files/patch-config.h.in	1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
---- ./config.h.in.orig	2009-11-21 23:47:44.000000000 +0100
-+++ ./config.h.in	2010-08-12 14:11:16.292619989 +0200
-@@ -105,6 +105,12 @@
- /* Define to 1 if you have the <utmp.h> header file. */
- #undef HAVE_UTMP_H
- 
-+/* Define to 1 if you have support for updwtmp */
-+#undef HAVE_UPDWTMP
-+
-+/* Define to 1 if you have support for updwtmpx */
-+#undef HAVE_UPDWTMPX
-+
- /* Define to 1 if zlib development files are installed */
- #undef HAVE_ZLIB
- 
diff -ruN shellinabox.orig/files/patch-shellinabox__launcher.c shellinabox/files/patch-shellinabox__launcher.c
--- shellinabox.orig/files/patch-shellinabox__launcher.c	2012-06-05 23:14:53.000000000 +0200
+++ shellinabox/files/patch-shellinabox__launcher.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,74 +0,0 @@
---- ./shellinabox/launcher.c.orig	2009-11-21 23:20:39.000000000 +0100
-+++ ./shellinabox/launcher.c	2010-08-12 14:11:16.296619939 +0200
-@@ -495,6 +495,33 @@
-   return utmp;
- }
- 
-+#if defined(HAVE_UPDWTMP) && !defined(HAVE_UPDWTMPX)
-+#define min(a,b) ({ typeof(a) _a=(a); typeof(b) _b=(b); _a < _b ? _a : _b; })
-+#define updwtmpx x_updwtmpx
-+static void updwtmpx(const char *wtmpx_file, const struct utmpx *utx) {
-+	struct utmp ut   = { 0 };
-+	ut.ut_type       = utx->ut_type;
-+	ut.ut_pid        = utx->ut_pid;
-+	ut.ut_session    = utx->ut_session;
-+	ut.ut_tv.tv_sec  = utx->ut_tv.tv_sec;
-+	ut.ut_tv.tv_usec = utx->ut_tv.tv_usec;
-+	memcpy(&ut.ut_line, &utx->ut_line,
-+			min(sizeof(ut.ut_line), sizeof(utx->ut_line)));
-+	memcpy(&ut.ut_id, &utx->ut_id,
-+			min(sizeof(ut.ut_id), sizeof(utx->ut_id)));
-+	memcpy(&ut.ut_user, &utx->ut_user,
-+			min(sizeof(ut.ut_user), sizeof(utx->ut_user)));
-+	memcpy(&ut.ut_host, &utx->ut_host,
-+			min(sizeof(ut.ut_host), sizeof(utx->ut_host)));
-+	memcpy(&ut.ut_exit, &utx->ut_exit,
-+			min(sizeof(ut.ut_exit), sizeof(utx->ut_exit)));
-+	memcpy(&ut.ut_addr_v6, &utx->ut_addr_v6,
-+			min(sizeof(ut.ut_addr_v6), sizeof(utx->ut_addr_v6)));
-+	updwtmp(wtmpx_file, &ut);
-+}
-+#endif
-+
-+
- void destroyUtmp(struct Utmp *utmp) {
-   if (utmp) {
-     if (utmp->pty >= 0) {
-@@ -518,9 +545,12 @@
-       setutxent();
-       pututxline(&utmp->utmpx);
-       endutxent();
-+
-+#if defined(HAVE_UPDWTMP) || defined(HAVE_UPDWTMPX)
-       if (!utmp->useLogin) {
-         updwtmpx("/var/log/wtmp", &utmp->utmpx);
-       }
-+#endif
-       
-       // Switch back to the lower privileges
-       check(!setresgid(r_gid, e_gid, s_gid));
-@@ -1027,7 +1057,9 @@
-     setutxent();
-     pututxline(&utmp->utmpx);
-     endutxent();
-+#if defined(HAVE_UPDWTMP) || defined(HAVE_UPDWTMPX)
-     updwtmpx("/var/log/wtmp", &utmp->utmpx);
-+#endif
-   }
- #endif
- 
-@@ -1308,12 +1340,14 @@
-   }
-   pututxline(&utmpx);
-   endutxent();
-+#if defined(HAVE_UPDWTMP) || defined(HAVE_UPDWTMPX)
-   if (!utmp->useLogin) {
-     memset(&utmpx.ut_user, 0, sizeof(utmpx.ut_user));
-     strncat(&utmpx.ut_user[0], "LOGIN", sizeof(utmpx.ut_user));
-     updwtmpx("/var/log/wtmp", &utmpx);
-   }
- #endif
-+#endif
- 
-   // Create session. We might have to fork another process as PAM wants us
-   // to close the session when the child terminates. And we must retain
diff -ruN shellinabox.orig/files/patch-ssl.in shellinabox/files/patch-ssl.in
--- shellinabox.orig/files/patch-ssl.in	2012-06-05 23:14:53.000000000 +0200
+++ shellinabox/files/patch-ssl.in	1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
---- libhttp/ssl.c.orig	2010-07-01 12:15:40.000000000 +0200
-+++ libhttp/ssl.c	2010-07-01 12:16:56.000000000 +0200
-@@ -626,6 +626,9 @@
-     return -1;
-   }
-   struct hostent *he = gethostbyname(name);
-+  if (!he) {
-+    return -1;
-+  }
-   *ret               = *he;
-   if (result) {
-     *result          = ret;


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sylvio 
Responsible-Changed-By: sylvio 
Responsible-Changed-When: Wed Jun 6 17:07:52 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168736 
State-Changed-From-To: open->feedback 
State-Changed-By: sylvio 
State-Changed-When: Fri Jun 8 21:39:10 UTC 2012 
State-Changed-Why:  
Ask for maintainer fix. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168736 

From: Sylvio Cesar Teixeira <sylvio@FreeBSD.org>
To: bug-followup@FreeBSD.org, olivier@cochard.me
Cc:  
Subject: Re: ports/168736: www/shellinabox update to 2.14 and options-ng compliant
Date: Fri, 8 Jun 2012 18:37:36 -0300

 Please, fix problem with plist
 
 
 http://people.freebsd.org/~sylvio/shellinabox-2.14.log
State-Changed-From-To: feedback->closed 
State-Changed-By: sylvio 
State-Changed-When: Sun Jun 10 00:37:33 UTC 2012 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168736 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/168736: commit references a PR
Date: Sun, 10 Jun 2012 00:37:20 +0000 (UTC)

 sylvio      2012-06-10 00:37:04 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www/shellinabox      Makefile distinfo 
   Removed files:
     www/shellinabox/files patch-Makefile.in patch-config.h.in 
                           patch-shellinabox__launcher.c 
                           patch-ssl.in 
   Log:
   - Update to 2.14
   - Convert to new optionsNG
   
   PR:             ports/168736
   Submitted by:   Olivier Cochard-Labbe <olivier@cochard.me> (maintainer)
   
   Revision  Changes    Path
   1.8       +9 -8      ports/www/shellinabox/Makefile
   1.3       +2 -2      ports/www/shellinabox/distinfo
   1.2       +0 -10     ports/www/shellinabox/files/patch-Makefile.in (dead)
   1.2       +0 -15     ports/www/shellinabox/files/patch-config.h.in (dead)
   1.2       +0 -74     ports/www/shellinabox/files/patch-shellinabox__launcher.c (dead)
   1.2       +0 -12     ports/www/shellinabox/files/patch-ssl.in (dead)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
