From feld@feld.me  Thu May 23 23:04:35 2013
Return-Path: <feld@feld.me>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id C5871B24
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 23 May 2013 23:04:35 +0000 (UTC)
	(envelope-from feld@feld.me)
Received: from smtp.supranet.net (smtp.supranet.net [IPv6:2607:f4e0:100:111::10])
	by mx1.freebsd.org (Postfix) with ESMTP id 7D0DC7CF
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 23 May 2013 23:04:34 +0000 (UTC)
Received: from mwi1.coffeenet.org (feld.me [66.170.3.2])
	by smtp.supranet.net (Postfix) with ESMTP id BF4BC10EF97
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 23 May 2013 18:04:33 -0500 (CDT)
Received: from localhost (1000@localhost [local]);
	by mwi1.coffeenet.org (OpenSMTPD) with ESMTP id a3eb03ee;
	for <FreeBSD-gnats-submit@freebsd.org>;
	Thu, 23 May 2013 18:04:32 -0500 (CDT)
Message-Id: <2614873925.enqueue@mwi1.coffeenet.org>
Date: Thu, 23 May 2013 18:04:32 -0500 (CDT)
From: Mark Felder <feld@feld.me>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] news/sabnzbdplus: update to 0.7.12
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         178886
>Category:       ports
>Synopsis:       [PATCH] news/sabnzbdplus: update to 0.7.12
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    swills
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 23 23:10:00 UTC 2013
>Closed-Date:    Mon May 27 01:29:25 UTC 2013
>Last-Modified:  Mon May 27 01:30:00 UTC 2013
>Originator:     feld
>Release:        FreeBSD 9.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD mwi1.coffeenet.org 9.1-RELEASE FreeBSD 9.1-RELEASE #6 r243808: Mon Dec  3 07:51:34
>Description:
- Update to 0.7.12
- rc script passes rclint now

Generated with FreeBSD Port Tools 0.99_7 (mode: update, diff: ports)
>How-To-Repeat:
>Fix:

--- sabnzbdplus-0.7.12.patch begins here ---
diff -ruN /usr/ports/news/sabnzbdplus/Makefile ./Makefile
--- /usr/ports/news/sabnzbdplus/Makefile	2013-04-24 13:10:30.000000000 -0500
+++ ./Makefile	2013-05-23 17:43:32.609021488 -0500
@@ -1,7 +1,7 @@
 # $FreeBSD: news/sabnzbdplus/Makefile 316464 2013-04-24 18:10:30Z ak $
 
 PORTNAME=	sabnzbdplus
-PORTVERSION=	0.7.11
+PORTVERSION=	0.7.12
 CATEGORIES=	news
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}
 DISTNAME=	SABnzbd-${PORTVERSION}-src
diff -ruN /usr/ports/news/sabnzbdplus/distinfo ./distinfo
--- /usr/ports/news/sabnzbdplus/distinfo	2013-02-17 14:38:38.000000000 -0600
+++ ./distinfo	2013-05-23 17:56:22.479579984 -0500
@@ -1,2 +1,2 @@
-SHA256 (SABnzbd-0.7.11-src.tar.gz) = de9c22377e89b081b7c264993c159588acb86206d1b82a465554e2f9df39b311
-SIZE (SABnzbd-0.7.11-src.tar.gz) = 2273355
+SHA256 (SABnzbd-0.7.12-src.tar.gz) = 9763414af2b3b9eccf933d01dfe5404845aa4b2a5ce6b63c643fc5cb45d2fb9b
+SIZE (SABnzbd-0.7.12-src.tar.gz) = 2275110
diff -ruN /usr/ports/news/sabnzbdplus/files/sabnzbd.in ./files/sabnzbd.in
--- /usr/ports/news/sabnzbdplus/files/sabnzbd.in	2012-07-14 09:29:18.000000000 -0500
+++ ./files/sabnzbd.in	2013-05-23 17:55:43.289932609 -0500
@@ -1,5 +1,7 @@
 #!/bin/sh
 #
+# $FreeBSD$
+#
 # PROVIDE: sabnzbd
 # KEYWORD: shutdown
 #
@@ -22,70 +24,63 @@
 
 . /etc/rc.subr
 
-name="sabnzbd"
+name=sabnzbd
 rcvar=sabnzbd_enable
-
-# Required, for some reason, to find all our binaries when starting via service.
-PATH="%%PREFIX%%/bin:$PATH"
-
 load_rc_config ${name}
 
-: ${sabnzbd_enable:="NO"}
-: ${sabnzbd_user:="_sabnzbd"}
-: ${sabnzbd_group:="_sabnzbd"}
-: ${sabnzbd_conf_dir:="%%PREFIX%%/sabnzbd"}
+: ${sabnzbd_enable:=NO}
+: ${sabnzbd_user:=_sabnzbd}
+: ${sabnzbd_group:=_sabnzbd}
+: ${sabnzbd_conf_dir="%%PREFIX%%/sabnzbd"}
 
 required_dirs=${sabnzbd_conf_dir}
 
 start_cmd="${name}_start"
-#start_postcmd="${name}_poststart"
 status_cmd="${name}_status"
 stop_cmd="${name}_stop"
 start_precmd=sabnzbd_check_dir
 
-
-
 sabnzbd_start()
 {
-if [ ! -f "${sabnzbd_pid}" ]; then
-    su -m ${sabnzbd_user} -c "%%PREFIX%%/bin/SABnzbd.py --daemon -f ${sabnzbd_conf_dir}/sabnzbd.ini"
-    echo "Starting ${name}."
-else
-    GETPROCESSPID=`/bin/ps -auxw | /usr/bin/awk '/SABnzbd.py/ && !/awk/ && !/sh/ {print $2}'`
-    PIDFROMFILE=`cat ${sabnzbd_pid}`
-    if [ "$GETPROCESSPID" = "$PIDFROMFILE" ]; then
-        echo "${name} already running with PID: ${PIDFROMFILE} ?"
-        echo "Remove ${sabnzbd_pid} manually if needed."
-    else
-        rm -f ${sabnzbd_pid}
-        su -m ${sabnzbd_user} -c "%%PREFIX%%/bin/SABnzbd.py --daemon -f ${sabnzbd_conf_dir}/sabnzbd.ini"
-        echo "Starting ${name}."
-    fi
-fi
+	if [ ! -f "${sabnzbd_pid}" ]; then
+		su -m ${sabnzbd_user} -c "%%PREFIX%%/bin/SABnzbd.py --daemon -f ${sabnzbd_conf_dir}/sabnzbd.ini"
+		echo "Starting ${name}."
+	else
+		GETPROCESSPID=`/bin/ps -auxw | /usr/bin/awk '/SABnzbd.py/ && !/awk/ && !/sh/ {print $2}'`
+		PIDFROMFILE=`cat ${sabnzbd_pid}`
+		if [ "$GETPROCESSPID" = "$PIDFROMFILE" ]; then
+			echo "${name} already running with PID: ${PIDFROMFILE} ?"
+			echo "Remove ${sabnzbd_pid} manually if needed."
+		else
+			rm -f ${sabnzbd_pid}
+			su -m ${sabnzbd_user} -c "%%PREFIX%%/bin/SABnzbd.py --daemon -f ${sabnzbd_conf_dir}/sabnzbd.ini"
+			echo "Starting ${name}."
+		fi
+	fi
 }
 
-#sabnzbd_poststart() {
-#  echo `/bin/ps -auxw | /usr/bin/awk '/SABnzbd.py/ && !/awk/ {print $2}'` > $sabnzbd_pid
-#}
-
 # SABnzbd can only be cleanly stopped by calling the http api
-sabnzbd_stop() {
-    echo "Stopping $name"
-    if [ -f "${sabnzbd_conf_dir}/sabnzbd.ini" ]; then
-        apikey=`grep ^api_key ${sabnzbd_conf_dir}/sabnzbd.ini | tr -d " _"`
-        host=`grep -m1 -E '^host\ =\ [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' ${sabnzbd_conf_dir}/sabnzbd.ini | tr -dc '[0-9].'`
-        if [ ${host} = "0.0.0.0" ] ; then host="localhost" ; fi
-        port=`grep -m1 ^port ${sabnzbd_conf_dir}/sabnzbd.ini | tr -dc '[0-9]'`
-        fetch -o /dev/null "http://${host}:${port}/api?mode=shutdown&${apikey}" > /dev/null 2>&1
-    else
-        sabnzbd_pid=`ps -U ${sabnzbd_user} | grep "python.*SABnzbd.py.*--daemon" | grep -v 'grep' | awk '{print $1}'`
-        if [ -n "${sabnzbd_pid}" ]; then
-            kill ${sabnzbd_pid}
-        fi
-    fi
+sabnzbd_stop()
+{
+	echo "Stopping $name"
+	if [ -f "${sabnzbd_conf_dir}/sabnzbd.ini" ]; then
+		apikey=`grep ^api_key ${sabnzbd_conf_dir}/sabnzbd.ini | tr -d " _"`
+		host=`grep -m1 -E '^host\ =\ [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' ${sabnzbd_conf_dir}/sabnzbd.ini | tr -dc '[0-9].'`
+		if [ ${host} = "0.0.0.0" ] ; then 
+			host="localhost" ;
+		fi
+		port=`grep -m1 ^port ${sabnzbd_conf_dir}/sabnzbd.ini | tr -dc '[0-9]'`
+		fetch -o /dev/null "http://${host}:${port}/api?mode=shutdown&${apikey}" > /dev/null 2>&1
+	else
+		sabnzbd_pid=`ps -U ${sabnzbd_user} | grep "python.*SABnzbd.py.*--daemon" | grep -v 'grep' | awk '{print $1}'`
+	        if [ -n "${sabnzbd_pid}" ]; then
+			kill ${sabnzbd_pid}
+		fi
+	fi
 }
 
-sabnzbd_status() {
+sabnzbd_status()
+{
     sabnzbd_pid=`ps -U ${sabnzbd_user} | grep "python.*SABnzbd.py.*--daemon" | grep -v 'grep' | awk '{print $1}'`
     if [ -n "${sabnzbd_pid}" ]; then
         echo "$name is running as ${sabnzbd_pid}"
@@ -94,10 +89,10 @@
     fi
 }
 
-sabnzbd_check_dir() {
+sabnzbd_check_dir()
+{
     if [ ! -f "${required_dirs}" -a ! -d "${required_dirs}" -a ! -L "${required_dirs}" ]; then
-        mkdir -p ${required_dirs}
-        chown ${sabnzbd_user}:${sabnzbd_group} ${required_dirs}
+        install -d -o ${sabnzbd_user} -g ${sabnzbd_group} ${required_dirs}
     fi
 }
 
--- sabnzbdplus-0.7.12.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->swills 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu May 23 23:10:10 UTC 2013 
Responsible-Changed-Why:  
swills@ wants this submitter's PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178886 
State-Changed-From-To: open->closed 
State-Changed-By: swills 
State-Changed-When: Mon May 27 01:29:24 UTC 2013 
State-Changed-Why:  
Committed, Thanks! Nice work on the shell script! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/178886: commit references a PR
Date: Mon, 27 May 2013 01:28:38 +0000 (UTC)

 Author: swills
 Date: Mon May 27 01:28:29 2013
 New Revision: 319146
 URL: http://svnweb.freebsd.org/changeset/ports/319146
 
 Log:
   - Update to 0.7.12
   - rc script passes rclint now
   
   PR:		ports/178886
   Submitted by:	Mark Felder <feld@feld.me>
 
 Modified:
   head/news/sabnzbdplus/Makefile
   head/news/sabnzbdplus/distinfo
   head/news/sabnzbdplus/files/sabnzbd.in   (contents, props changed)
 
 Modified: head/news/sabnzbdplus/Makefile
 ==============================================================================
 --- head/news/sabnzbdplus/Makefile	Mon May 27 00:54:16 2013	(r319145)
 +++ head/news/sabnzbdplus/Makefile	Mon May 27 01:28:29 2013	(r319146)
 @@ -1,7 +1,7 @@
  # $FreeBSD$
  
  PORTNAME=	sabnzbdplus
 -PORTVERSION=	0.7.11
 +PORTVERSION=	0.7.12
  CATEGORIES=	news
  MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}
  DISTNAME=	SABnzbd-${PORTVERSION}-src
 
 Modified: head/news/sabnzbdplus/distinfo
 ==============================================================================
 --- head/news/sabnzbdplus/distinfo	Mon May 27 00:54:16 2013	(r319145)
 +++ head/news/sabnzbdplus/distinfo	Mon May 27 01:28:29 2013	(r319146)
 @@ -1,2 +1,2 @@
 -SHA256 (SABnzbd-0.7.11-src.tar.gz) = de9c22377e89b081b7c264993c159588acb86206d1b82a465554e2f9df39b311
 -SIZE (SABnzbd-0.7.11-src.tar.gz) = 2273355
 +SHA256 (SABnzbd-0.7.12-src.tar.gz) = 9763414af2b3b9eccf933d01dfe5404845aa4b2a5ce6b63c643fc5cb45d2fb9b
 +SIZE (SABnzbd-0.7.12-src.tar.gz) = 2275110
 
 Modified: head/news/sabnzbdplus/files/sabnzbd.in
 ==============================================================================
 --- head/news/sabnzbdplus/files/sabnzbd.in	Mon May 27 00:54:16 2013	(r319145)
 +++ head/news/sabnzbdplus/files/sabnzbd.in	Mon May 27 01:28:29 2013	(r319146)
 @@ -1,5 +1,7 @@
  #!/bin/sh
  #
 +# $FreeBSD$
 +#
  # PROVIDE: sabnzbd
  # KEYWORD: shutdown
  #
 @@ -22,70 +24,63 @@
  
  . /etc/rc.subr
  
 -name="sabnzbd"
 +name=sabnzbd
  rcvar=sabnzbd_enable
 -
 -# Required, for some reason, to find all our binaries when starting via service.
 -PATH="%%PREFIX%%/bin:$PATH"
 -
  load_rc_config ${name}
  
 -: ${sabnzbd_enable:="NO"}
 -: ${sabnzbd_user:="_sabnzbd"}
 -: ${sabnzbd_group:="_sabnzbd"}
 -: ${sabnzbd_conf_dir:="%%PREFIX%%/sabnzbd"}
 +: ${sabnzbd_enable:=NO}
 +: ${sabnzbd_user:=_sabnzbd}
 +: ${sabnzbd_group:=_sabnzbd}
 +: ${sabnzbd_conf_dir="%%PREFIX%%/sabnzbd"}
  
  required_dirs=${sabnzbd_conf_dir}
  
  start_cmd="${name}_start"
 -#start_postcmd="${name}_poststart"
  status_cmd="${name}_status"
  stop_cmd="${name}_stop"
  start_precmd=sabnzbd_check_dir
  
 -
 -
  sabnzbd_start()
  {
 -if [ ! -f "${sabnzbd_pid}" ]; then
 -    su -m ${sabnzbd_user} -c "%%PREFIX%%/bin/SABnzbd.py --daemon -f ${sabnzbd_conf_dir}/sabnzbd.ini"
 -    echo "Starting ${name}."
 -else
 -    GETPROCESSPID=`/bin/ps -auxw | /usr/bin/awk '/SABnzbd.py/ && !/awk/ && !/sh/ {print $2}'`
 -    PIDFROMFILE=`cat ${sabnzbd_pid}`
 -    if [ "$GETPROCESSPID" = "$PIDFROMFILE" ]; then
 -        echo "${name} already running with PID: ${PIDFROMFILE} ?"
 -        echo "Remove ${sabnzbd_pid} manually if needed."
 -    else
 -        rm -f ${sabnzbd_pid}
 -        su -m ${sabnzbd_user} -c "%%PREFIX%%/bin/SABnzbd.py --daemon -f ${sabnzbd_conf_dir}/sabnzbd.ini"
 -        echo "Starting ${name}."
 -    fi
 -fi
 +	if [ ! -f "${sabnzbd_pid}" ]; then
 +		su -m ${sabnzbd_user} -c "%%PREFIX%%/bin/SABnzbd.py --daemon -f ${sabnzbd_conf_dir}/sabnzbd.ini"
 +		echo "Starting ${name}."
 +	else
 +		GETPROCESSPID=`/bin/ps -auxw | /usr/bin/awk '/SABnzbd.py/ && !/awk/ && !/sh/ {print $2}'`
 +		PIDFROMFILE=`cat ${sabnzbd_pid}`
 +		if [ "$GETPROCESSPID" = "$PIDFROMFILE" ]; then
 +			echo "${name} already running with PID: ${PIDFROMFILE} ?"
 +			echo "Remove ${sabnzbd_pid} manually if needed."
 +		else
 +			rm -f ${sabnzbd_pid}
 +			su -m ${sabnzbd_user} -c "%%PREFIX%%/bin/SABnzbd.py --daemon -f ${sabnzbd_conf_dir}/sabnzbd.ini"
 +			echo "Starting ${name}."
 +		fi
 +	fi
  }
  
 -#sabnzbd_poststart() {
 -#  echo `/bin/ps -auxw | /usr/bin/awk '/SABnzbd.py/ && !/awk/ {print $2}'` > $sabnzbd_pid
 -#}
 -
  # SABnzbd can only be cleanly stopped by calling the http api
 -sabnzbd_stop() {
 -    echo "Stopping $name"
 -    if [ -f "${sabnzbd_conf_dir}/sabnzbd.ini" ]; then
 -        apikey=`grep ^api_key ${sabnzbd_conf_dir}/sabnzbd.ini | tr -d " _"`
 -        host=`grep -m1 -E '^host\ =\ [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' ${sabnzbd_conf_dir}/sabnzbd.ini | tr -dc '[0-9].'`
 -        if [ ${host} = "0.0.0.0" ] ; then host="localhost" ; fi
 -        port=`grep -m1 ^port ${sabnzbd_conf_dir}/sabnzbd.ini | tr -dc '[0-9]'`
 -        fetch -o /dev/null "http://${host}:${port}/api?mode=shutdown&${apikey}" > /dev/null 2>&1
 -    else
 -        sabnzbd_pid=`ps -U ${sabnzbd_user} | grep "python.*SABnzbd.py.*--daemon" | grep -v 'grep' | awk '{print $1}'`
 -        if [ -n "${sabnzbd_pid}" ]; then
 -            kill ${sabnzbd_pid}
 -        fi
 -    fi
 +sabnzbd_stop()
 +{
 +	echo "Stopping $name"
 +	if [ -f "${sabnzbd_conf_dir}/sabnzbd.ini" ]; then
 +		apikey=`grep ^api_key ${sabnzbd_conf_dir}/sabnzbd.ini | tr -d " _"`
 +		host=`grep -m1 -E '^host\ =\ [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' ${sabnzbd_conf_dir}/sabnzbd.ini | tr -dc '[0-9].'`
 +		if [ ${host} = "0.0.0.0" ] ; then 
 +			host="localhost" ;
 +		fi
 +		port=`grep -m1 ^port ${sabnzbd_conf_dir}/sabnzbd.ini | tr -dc '[0-9]'`
 +		fetch -o /dev/null "http://${host}:${port}/api?mode=shutdown&${apikey}" > /dev/null 2>&1
 +	else
 +		sabnzbd_pid=`ps -U ${sabnzbd_user} | grep "python.*SABnzbd.py.*--daemon" | grep -v 'grep' | awk '{print $1}'`
 +	        if [ -n "${sabnzbd_pid}" ]; then
 +			kill ${sabnzbd_pid}
 +		fi
 +	fi
  }
  
 -sabnzbd_status() {
 +sabnzbd_status()
 +{
      sabnzbd_pid=`ps -U ${sabnzbd_user} | grep "python.*SABnzbd.py.*--daemon" | grep -v 'grep' | awk '{print $1}'`
      if [ -n "${sabnzbd_pid}" ]; then
          echo "$name is running as ${sabnzbd_pid}"
 @@ -94,10 +89,10 @@ sabnzbd_status() {
      fi
  }
  
 -sabnzbd_check_dir() {
 +sabnzbd_check_dir()
 +{
      if [ ! -f "${required_dirs}" -a ! -d "${required_dirs}" -a ! -L "${required_dirs}" ]; then
 -        mkdir -p ${required_dirs}
 -        chown ${sabnzbd_user}:${sabnzbd_group} ${required_dirs}
 +        install -d -o ${sabnzbd_user} -g ${sabnzbd_group} ${required_dirs}
      fi
  }
  
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
