Bug 146257 - [patch][repocopy] sysutils/bsdstats: improper use of LOCALBASE
Summary: [patch][repocopy] sysutils/bsdstats: improper use of LOCALBASE
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-02 23:50 UTC by swell.k
Modified: 2010-08-19 04:10 UTC (History)
0 users

See Also:


Attachments
a.diff (3.68 KB, patch)
2010-05-02 23:50 UTC, swell.k
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description swell.k 2010-05-02 23:50:09 UTC
It fails to run here spouting:

  # /usr/pkg/etc/rc.d/bsdstats.sh onestart
  /usr/pkg/etc/rc.d/bsdstats.sh: WARNING: run_rc_command: cannot run /usr/local/etc/periodic/monthly/300.statistics

I don't have /usr/local directory. So, after a brief look at the port:

- make LOCALBASE that is not /usr/local actually work
- don't install outside of PREFIX, including LOCALBASE
- move 300.statistics bsdstats pkg-message to ${FILESDIR}, requires repocopy

  $ find files
  files
  files/bsdstats.in
  files/pkg-message.in
  files/300.statistics.in

- drop .sh suffix, nowadays rc.d scripts don't need it
- be consistent about creating etc/periodic/monthly
- silence cat(1) invocation
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-05-02 23:50:33 UTC
Responsible Changed
From-To: freebsd-ports-bugs->itetcu

itetcu@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 swell.k 2010-05-12 14:34:05 UTC
convert to USE_RC_SUBR

--- a.diff begins here ---
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile
index 5b4f280..8a0b867 100644
--- a/sysutils/bsdstats/Makefile
+++ b/sysutils/bsdstats/Makefile
@@ -14,12 +14,12 @@ MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Monthly script for reporting anonymous statistics about your machine
 
 NO_BUILD=	yes
-SUB_FILES=	300.statistics bsdstats pkg-message
+USE_RC_SUBR=	bsdstats
+SUB_FILES=	300.statistics pkg-message
 
 do-install:
 	${MKDIR} ${PREFIX}/etc/periodic/monthly
 	${INSTALL_SCRIPT} ${WRKDIR}/300.statistics ${PREFIX}/etc/periodic/monthly
-	${INSTALL_SCRIPT} ${WRKDIR}/bsdstats ${PREFIX}/etc/rc.d
 post-install:
 	@${CAT} ${PKGMESSAGE}
 .if defined(BATCH) || defined(PACKAGE_BUILDING)
diff --git a/sysutils/bsdstats/pkg-plist b/sysutils/bsdstats/pkg-plist
index a463adf..1049221 100644
--- a/sysutils/bsdstats/pkg-plist
+++ b/sysutils/bsdstats/pkg-plist
@@ -1,5 +1,4 @@
 @exec mkdir -p %D/etc/periodic/monthly/
 etc/periodic/monthly/300.statistics
-etc/rc.d/bsdstats
 @dirrmtry etc/periodic/monthly
 @dirrmtry etc/periodic
--- a.diff ends here ---
Comment 3 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2010-05-14 13:17:31 UTC
State Changed
From-To: open->repocopy

Please repocopy: 

ports/sysutils/bsdstats/pkg-message --> 
--> ports/sysutils/bsdstats/files/pkg-message.in 

ports/sysutils/bsdstats/files/300.statistics 
--> ports/sysutils/bsdstats/files/300.statistics.in 

ports/sysutils/bsdstats/files/bsdstats.sh 
-> ports/sysutils/bsdstats/files/bsdstats.in 



Comment 4 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2010-05-14 13:17:31 UTC
Responsible Changed
From-To: itetcu->portmgr

Please repocopy: 

ports/sysutils/bsdstats/pkg-message --> 
--> ports/sysutils/bsdstats/files/pkg-message.in 

ports/sysutils/bsdstats/files/300.statistics 
--> ports/sysutils/bsdstats/files/300.statistics.in 

ports/sysutils/bsdstats/files/bsdstats.sh 
-> ports/sysutils/bsdstats/files/bsdstats.in
Comment 5 swell.k 2010-05-15 05:58:50 UTC
That @exec line in plist is not needed. Tested without it when using
pkg_add(1) alone. Sorry for introducing it in the first patch.

--- a.diff begins here ---
diff --git a/sysutils/bsdstats/pkg-plist b/sysutils/bsdstats/pkg-plist
index 1049221..df38255 100644
--- a/sysutils/bsdstats/pkg-plist
+++ b/sysutils/bsdstats/pkg-plist
@@ -1,4 +1,3 @@
-@exec mkdir -p %D/etc/periodic/monthly/
 etc/periodic/monthly/300.statistics
 @dirrmtry etc/periodic/monthly
 @dirrmtry etc/periodic
--- a.diff ends here ---
Comment 6 Joe Marcus Clarke freebsd_committer freebsd_triage 2010-05-17 06:04:34 UTC
State Changed
From-To: repocopy->open

Repocopies complete. 


Comment 7 Joe Marcus Clarke freebsd_committer freebsd_triage 2010-05-17 06:04:34 UTC
Responsible Changed
From-To: portmgr->itetcu

Repocopies complete.
Comment 8 swell.k 2010-05-19 21:12:05 UTC
No changes except for pruning old files. The diff is cumulative.

--- a.diff begins here ---
 sysutils/bsdstats/Makefile                |   10 +-
 sysutils/bsdstats/files/300.statistics    |  446 ------ (deleted)
 sysutils/bsdstats/files/300.statistics.in |    2 +-
 sysutils/bsdstats/files/bsdstats.in       |    2 +-
 sysutils/bsdstats/files/bsdstats.sh       |   30 --- (deleted)
 sysutils/bsdstats/files/pkg-message.in    |    2 +-
 sysutils/bsdstats/pkg-message             |   30 --- (deleted)
 sysutils/bsdstats/pkg-plist               |    1 -
 8 files changed, 8 insertions(+), 515 deletions(-)
---
Index: sysutils/bsdstats/Makefile
===================================================================
RCS file: /a/.cvsup/ports/sysutils/bsdstats/Makefile,v
retrieving revision 1.59
diff -u -p -r1.59 Makefile
--- sysutils/bsdstats/Makefile	18 Sep 2009 21:19:34 -0000	1.59
+++ sysutils/bsdstats/Makefile	12 May 2010 13:26:20 -0000
@@ -14,14 +14,14 @@ MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Monthly script for reporting anonymous statistics about your machine
 
 NO_BUILD=	yes
+USE_RC_SUBR=	bsdstats
+SUB_FILES=	300.statistics pkg-message
 
 do-install:
-	${MKDIR} ${LOCALBASE}/etc/periodic/monthly
-	${CP} ${FILESDIR}/300.statistics ${LOCALBASE}/etc/periodic/monthly
-	${CP} ${FILESDIR}/bsdstats.sh ${LOCALBASE}/etc/rc.d
-	${CHMOD} 0755 ${LOCALBASE}/etc/rc.d/bsdstats.sh
+	${MKDIR} ${PREFIX}/etc/periodic/monthly
+	${INSTALL_SCRIPT} ${WRKDIR}/300.statistics ${PREFIX}/etc/periodic/monthly
 post-install:
-	${CAT} ${PKGMESSAGE}
+	@${CAT} ${PKGMESSAGE}
 .if defined(BATCH) || defined(PACKAGE_BUILDING)
 	@${ECHO_MSG} "	To activate monthly statistics reporting in /etc/periodic.conf,"
 	@${ECHO_MSG} "	execute the following as root user:"
Index: sysutils/bsdstats/pkg-message
===================================================================
RCS file: sysutils/bsdstats/pkg-message
diff -N sysutils/bsdstats/pkg-message
--- sysutils/bsdstats/pkg-message	30 Apr 2007 18:49:08 -0000	1.9
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-
-This script, meant to be run monthly, submits statistics anonymously
-to a central checkin server (http://bsdstats.org), in an attempt to
-generate reasonably accurate demographics of both *BSD usage, as well
-as devices in use.
-
-Steps have been taken to make eliminate security concerns brought up
-in earlier releases of this, including, but not limited to, not storing
-anything in the database that has been deemed as 'sensitive' (ie. IP of
-the reporting server, and hostname).
-
-********************
-To enable monthly reporting, edit or create /etc/periodic.conf and add this line:
-	monthly_statistics_enable="YES"
-
-To enable boottime reporting, edit or create /etc/rc.conf and add this line:
-	bsdstats_enable="YES"
-
-To enable device reporting, add this line:
-	monthly_statistics_report_devices="YES"
-
-To enable ports reporting, add this line:
-	monthly_statistics_report_ports="YES"
-
-To run it manually the first time, just run it as:
-	${LOCALBASE}/etc/periodic/monthly/300.statistics -nodelay
-
-To view current statistics, go to:
-        http://www.bsdstats.org
-********************
Index: sysutils/bsdstats/pkg-plist
===================================================================
RCS file: /a/.cvsup/ports/sysutils/bsdstats/pkg-plist,v
retrieving revision 1.1
diff -u -p -r1.1 pkg-plist
--- sysutils/bsdstats/pkg-plist	19 Aug 2008 10:25:05 -0000	1.1
+++ sysutils/bsdstats/pkg-plist	15 May 2010 04:43:21 -0000
@@ -1,4 +1,3 @@
 etc/periodic/monthly/300.statistics
-etc/rc.d/bsdstats.sh
 @dirrmtry etc/periodic/monthly
 @dirrmtry etc/periodic
Index: sysutils/bsdstats/files/300.statistics
===================================================================
RCS file: sysutils/bsdstats/files/300.statistics
diff -N sysutils/bsdstats/files/300.statistics
--- sysutils/bsdstats/files/300.statistics	18 Sep 2009 21:19:34 -0000	1.42
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,446 +0,0 @@
-#!/bin/sh -
-#
-# $FreeBSD: ports/sysutils/bsdstats/files/300.statistics,v 1.42 2009/09/18 21:19:34 pav Exp $
-#
-
-# If there is a global system configuration file, suck it in.
-#
-if [ -r /etc/defaults/periodic.conf ]
-then
-    . /etc/defaults/periodic.conf
-    source_periodic_confs
-    periodic_conf=/etc/periodic.conf
-else
-    . /etc/rc.conf	# For systems without periodic.conf, use rc.conf
-    if [ -r /etc/rc.conf.local ] 
-    then
-        . /etc/rc.conf.local
-    fi
-    periodic_conf=/etc/rc.conf.local
-fi
-
-oldmask=$(umask)
-umask 066
-timeout=10
-
-version="5.5"
-checkin_server=${monthly_statistics_checkin_server:-"rpt.bsdstats.org"}
-bsdstats_log=${monthly_statistics_logfile:-"/var/log/bsdstats"}
-id_token_file='/var/db/bsdstats'
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
-export PATH
-
-unset HTTP_USER_AGENT
-
-IFS="
-"
-
-random () {
-  jot -r 1 0 900
-}
-
-# RFC 2396
-uri_escape () {
-    echo ${1+$@} | sed -e '
-        s/%/%25/g
-        s/;/%3b/g
-        s,/,%2f,g
-        s/?/%3f/g
-        s/:/%3a/g
-        s/@/%40/g
-        s/&/%26/g
-        s/=/%3d/g
-        s/+/%2b/g
-        s/\$/%24/g
-        s/,/%2c/g
-        s/ /%20/g
-        '
-}
-
-do_fetch () {
-    url="http://$checkin_server/scripts/$1"
-    case $(uname) in
-	FreeBSD )	
-		/usr/bin/fetch -T "$timeout" -q -o - "$url"
-		;;
-	* )
-		/usr/bin/ftp -q "$timeout" -V -o - "$url"
-		;;
-    esac
-}
-
-check_dns () {
-    if [ `dig bsdstats.org txt | grep TXT | grep UP | wc -l` = 0 ] 
-    then
-      echo "DNS not reachable, Network Down?"
-      exit
-    fi
-}
-
-send_devices () {
-    case $(uname) in
-	FreeBSD )
-	    for line in `/usr/sbin/pciconf -l`
-	    do
-	      DRIVER=`echo $line | awk -F\@ '{print $1}'`
-	      DEV=`echo $line | awk '{print $4}' | cut -c8-15`
-	      CLASS=`echo $line | awk '{print $2}' | cut -c9-14`
-	      query_string=$query_string`echo \&dev[]=$DRIVER:$DEV:$CLASS`
-	    done
-
-	    report_devices
-	    ;;
-	* )
-	    # Not supported
-	    ;;
-    esac
-}
-
-send_ports () {
-    case $(uname) in
-	FreeBSD )
-	    for line in `/usr/sbin/pkg_info | /usr/bin/awk '{print $1}' `
-	    do
-              category=`grep "@comment ORIGIN" /var/db/pkg/${line}/+CONTENTS | sed -E 's/^\@comment ORIGIN:(.+)\/.+/\1/g'`
-              line=$(uri_escape $line)
-              category=$(uri_escape $category)
-	      query_string=$query_string`echo \&port[]=${category}:${line}`
-	    done
-
-	    report_ports
-	    ;;
-	* )
-	    # Not supported
-	    ;;
-    esac
-}
-
-report_ports () {
-	# Handle HTTP proxy services
-	#
-	# HTTP_PROXY/http_proxy can take the following form:
-	#    [http://][username:password@]proxy[:port][/]
-	# Authentication details may also be provided via HTTP_PROXY_AUTH:
-	#    HTTP_PROXY_AUTH="basic:*:username:password"
-	#
-
-	if [ -z "$HTTP_PROXY" -a -n "$http_proxy" ]; then
-		HTTP_PROXY=$http_proxy
-	fi
-	if [ -n "$HTTP_PROXY" ]; then
-		# Attempt to resolve any HTTP authentication
-		if [ -n "$HTTP_PROXY_AUTH" ]; then
-			PROXY_AUTH_USER=`echo $HTTP_PROXY_AUTH | sed -E 's/^.+:\*:(.+):.+$/\1/g'`
-			PROXY_AUTH_PASS=`echo $HTTP_PROXY_AUTH | sed -E 's/^.+:\*:.+:(.+)$/\1/g'`
-		else
-			# Check for authentication within HTTP_PROXY
-			HAS_HTTP_AUTH=`echo $HTTP_PROXY | sed -E 's/^(http:\/\/)?(.+:.+@)?.+/\2/'`
-			if [ -n "$HAS_HTTP_AUTH" ]; then
-				# Found HTTP authentication details
-				PROXY_AUTH_USER=`echo $HAS_HTTP_AUTH | cut -d: -f1`
-				PROXY_AUTH_PASS=`echo $HAS_HTTP_AUTH | cut -d: -f2`
-			fi
-		fi
-
-		# Determine the proxy components
-		PROXY_HOST=`echo $HTTP_PROXY | sed -E 's/^(http:\/\/)?(.+:.+@)?([^@:]+)(:.+)?/\3/'`
-		PROXY_PORT=`echo $HTTP_PROXY | sed -E 's/^(http:\/\/)?(.+:.+@)?(.+):([0-9]+)/\4/' | sed -e 's/[^0-9]//g'`
-		if [ -z "$PROXY_PORT" ]; then
-			# Use default proxy port
-			PROXY_PORT=3128
-		fi
-	fi
-
-	# Determine the host/port netcat should connect to
-	if [ -n "$PROXY_HOST" -a -n "$PROXY_PORT" ]; then
-		nc_host=$PROXY_HOST
-		nc_port=$PROXY_PORT
-		url_prefix="http://${checkin_server}"
-	else
-		nc_host=$checkin_server
-		nc_port=80
-	fi
-
-	# Proxy authentication, if required
-	if [ -n "$PROXY_AUTH_USER" -a -n "$PROXY_AUTH_PASS" ]; then
-		auth_base64=`echo "$PROXY_AUTH_USER:$PROXY_AUTH_PASS" | openssl base64`
-		proxy_auth="Proxy-Authorization: Basic $auth_base64
-"
-	fi
-
-
-	# Make the request	
-	string_length=`echo ${query_string} | wc -m` 
-	string_length=`expr ${string_length} - 1`
-
-	echo "POST ${url_prefix}/scripts/report_ports.php HTTP/1.0
-Host: ${checkin_server}
-User-Agent: bsdstats ${version}
-Connection: close
-${proxy_auth}Content-Type: application/x-www-form-urlencoded
-Content-Length: ${string_length}
-
-token=${TOKEN}&key=${KEY}${query_string}" | \
-		nc $nc_host $nc_port  | \
-		grep STATUS= | {
-          local IFS
-          IFS='= 
-'
-
-           while read var val
-             do  
-             case $var in
-                 STATUS)
-                     if [ $val = "OK" ]
-                     then
-                       echo "[`date`] System Ports reported"
-                     else
-                       echo "[`date`] System Ports not reported, exiting"
-                       exit
-                     fi
-                 ;; 
-                 *)
-                     echo "[`date`] Error with fetch to server"
-                     exit
-                 ;;
-                 esac
-           done   
-       } >> $bsdstats_log
-
-}
-
-report_devices () {
-      do_fetch report_devices.php?token=$TOKEN\&key=$KEY$query_string | { 
-          local IFS
-          IFS='=
-'
-
-           while read var val
-             do
-             case $var in
-                 STATUS)
-                     if [ $val = "OK" ]
-                     then
-                       echo "[`date`] System Devices reported"
-                     else
-                       echo "[`date`] System Devices not reported, exiting"
-                       exit
-                     fi
-                 ;;
-                 *)
-                     echo "[`date`] Error with fetch to server"
-                     exit
-                 ;;
-                 esac
-           done  
-       } >> $bsdstats_log
-}
-
-get_id_token () {
-    if [ -f $id_token_file ]
-    then
-      if [ `wc -l < $id_token_file` -lt 3 ] 
-      then
-        rm $id_token_file
-      fi
-    fi
-
-    if [ ! -f $id_token_file -o ! -s $id_token_file ] ;
-    then
-       IDTOKEN=$(uri_escape $( openssl rand -base64 32 ) )
-       
-       idf=$( mktemp "$id_token_file.XXXXXX" )  && \
-       chown root:wheel $idf          && \
-       chmod 600 $idf
-
-       do_fetch getid.php?key=$IDTOKEN | {
-          local IFS
-          IFS='=
-'
-
-	   while read var val 
-	     do  
-	     case $var in
-		 KEY)
-                     echo "KEY=$val"
-		 ;;
-		 TOKEN)
-                     echo "TOKEN=$val"
-		 ;;
-		 *)
-                 ;;
-		 esac
-	   done
-           echo "VERSION=$version"
-       } > $idf                                  && \
-
-       mv $idf $id_token_file
-       if [ ! -s $id_token_file ] ;
-       then
-    	  echo "Nothing returned from $checkin_server"
-	  exit 1
-       fi
-    fi
-    . $id_token_file
-    KEY=$( uri_escape $KEY )
-    TOKEN=$( uri_escape $TOKEN )
-}
-
-
-enable_token () {
-      do_fetch enable_token.php?key=$TOKEN\&token=$KEY | {
-          local IFS
-          IFS='=
-'
-
-           while read var val
-             do
-             case $var in
-                 STATUS)
-                     if [ $val = "OK" ]
-                     then
-                       echo "[`date`] System enabled"
-                     else
-                       echo "[`date`] System not enabled, exiting"
-                       exit
-                     fi
-                 ;;
-                 *)
-                     echo "[`date`] Error with fetch to server"
-                     exit
-                 ;;
-                 esac
-           done  
-       } >> $bsdstats_log
-}
-
-disable_token () {
-      do_fetch disable_token.php?key=$TOKEN\&token=$KEY | {
-          local IFS
-          IFS='=
-'
-
-           while read var val
-             do
-             case $var in
-                 STATUS)
-                     if [ $val = "OK" ]
-                     then
-                       echo "[`date`] System disabled"
-                     else
-                       echo "[`date`] System not disabled, exiting"
-                       exit
-                     fi
-                 ;;
-                 *)
-                     echo "[`date`] Error with fetch to server"
-                     exit
-                 ;;
-                 esac
-           done  
-       } >> $bsdstats_log
-}
-
-report_system () {
-      do_fetch report_system.php?token=$TOKEN\&key=$KEY\&rel=$REL\&arch=$ARCH\&opsys=$OS | {
-          local IFS
-          IFS='=
-'
-
-           while read var val
-             do
-             case $var in
-                 STATUS)
-                     if [ $val = "OK" ]
-                     then
-                       echo "[`date`] System reported"
-                     else
-                       echo "[`date`] System report failed, exiting"
-                       exit
-                     fi
-                 ;;
-                 *)
-                     echo "[`date`] Error with fetch to server"
-                     exit
-                 ;;
-                 esac
-           done  
-       } >> $bsdstats_log
-}
-
-report_cpu () {
-    do_fetch report_cpu.php?token=$TOKEN\&key=$KEY\&cpus=$count\&vendor=$VEN\&cpu_type=$DEV | {
-          local IFS
-          IFS='=
-'
-
-           while read var val
-             do
-             case $var in
-                 STATUS)
-                     if [ $val = "OK" ]
-                     then
-                       echo "[`date`] System CPU reported"
-                     else
-                       echo "[`date`] System CPU report failed, exiting"
-                       exit
-                     fi
-                 ;;
-                 *)
-                     echo "[`date`] Error with fetch to server"
-                     exit
-                 ;;
-                 esac
-           done  
-       } >> $bsdstats_log
-}
-case "$monthly_statistics_enable" in
-    [Yy][Ee][Ss])
-      check_dns
-      REL=`/usr/bin/uname -r`
-      ARCH=`/usr/bin/uname -m`
-      OS=`/usr/bin/uname -s`
-      get_id_token
-      test X"$1" = X-nodelay || sleep `random`
-      enable_token
-      report_system
-      echo "Posting monthly OS statistics to $checkin_server"
-      if [ X"$1" != X-nodelay ]; then
-          case "$monthly_statistics_report_devices" in
-              [Yy][Ee][Ss])
-                  send_devices
-                  echo "Posting monthly device statistics to $checkin_server"
-                  line=$( sysctl -n hw.model )
-                  VEN=$( echo $line | cut -d ' ' -f 1 )
-                  DEV=$( uri_escape $( echo $line | cut -d ' ' -f 2- ) )
-                  count=$( sysctl -n hw.ncpu )
-                  report_cpu
-                  echo "Posting monthly CPU statistics to $checkin_server"
-                 ;;
-              *) 
-                 echo "Posting monthly device/CPU statistics disabled"
-                 echo "    set monthly_statistics_report_devices=\"YES\" in $periodic_conf"
-                 ;;
-          esac
-          case "$monthly_statistics_report_ports" in
-              [Yy][Ee][Ss])
-                  send_ports
-                  echo "Posting monthly ports statistics to $checkin_server"
-                 ;;
-              *) 
-                 echo "Posting monthly ports statistics disabled"
-                 echo "    set monthly_statistics_report_ports=\"YES\" in $periodic_conf"
-                 ;;
-          esac
-      fi
-      disable_token
-      ;;
-    *) 
-      echo "Posting monthly OS statistics disabled"
-      echo "    set monthly_statistics_enable=\"YES\" in $periodic_conf"
-    ;;
-esac
-
-umask $oldmask
-exit $rc
Index: sysutils/bsdstats/files/300.statistics.in
===================================================================
RCS file: /a/.cvsup/ports/sysutils/bsdstats/files/300.statistics.in,v
retrieving revision 1.42
diff -u -p -r1.42 300.statistics.in
--- sysutils/bsdstats/files/300.statistics.in	18 Sep 2009 21:19:34 -0000	1.42
+++ sysutils/bsdstats/files/300.statistics.in	19 May 2010 19:52:57 -0000
@@ -28,7 +28,7 @@ checkin_server=${monthly_statistics_chec
 bsdstats_log=${monthly_statistics_logfile:-"/var/log/bsdstats"}
 id_token_file='/var/db/bsdstats'
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/sbin:%%PREFIX%%/bin
 export PATH
 
 unset HTTP_USER_AGENT
Index: sysutils/bsdstats/files/bsdstats.in
===================================================================
RCS file: /a/.cvsup/ports/sysutils/bsdstats/files/bsdstats.in,v
retrieving revision 1.1
diff -u -p -r1.1 bsdstats.in
--- sysutils/bsdstats/files/bsdstats.in	28 Apr 2007 23:54:03 -0000	1.1
+++ sysutils/bsdstats/files/bsdstats.in	19 May 2010 19:52:50 -0000
@@ -21,7 +21,7 @@ load_rc_config bsdstats
 name=bsdstats
 rcvar=`set_rcvar`
 
-command=/usr/local/etc/periodic/monthly/300.statistics
+command=%%PREFIX%%/etc/periodic/monthly/300.statistics
 
 # default to disable
 bsdstats_enable=${bsdstats_enable:-"NO"}
Index: sysutils/bsdstats/files/bsdstats.sh
===================================================================
RCS file: sysutils/bsdstats/files/bsdstats.sh
diff -N sysutils/bsdstats/files/bsdstats.sh
--- sysutils/bsdstats/files/bsdstats.sh	28 Apr 2007 23:54:03 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-#!/bin/sh 
-#
-# $FreeBSD: ports/sysutils/bsdstats/files/bsdstats.sh,v 1.1 2007/04/28 23:54:03 scrappy Exp $
-#
-
-# PROVIDE: bsdstats
-# REQUIRE: LOGIN
-# KEYWORD: shutdown
-
-# bsdstats is disabled by default, if you have configuration file
-#
-# Add the following line to /etc/rc.conf to enable bsdstats:
-#
-#bsdstats_enable="YES"
-#
-
-. /etc/rc.subr
-
-load_rc_config bsdstats
-
-name=bsdstats
-rcvar=`set_rcvar`
-
-command=/usr/local/etc/periodic/monthly/300.statistics
-
-# default to disable
-bsdstats_enable=${bsdstats_enable:-"NO"}
-bsdstats_flags=${bsdstats_flags:-"-nodelay"}
-
-run_rc_command "$1"
Index: sysutils/bsdstats/files/pkg-message.in
===================================================================
RCS file: /a/.cvsup/ports/sysutils/bsdstats/files/pkg-message.in,v
retrieving revision 1.9
diff -u -p -r1.9 pkg-message.in
--- sysutils/bsdstats/files/pkg-message.in	30 Apr 2007 18:49:08 -0000	1.9
+++ sysutils/bsdstats/files/pkg-message.in	2 May 2010 22:20:57 -0000
@@ -23,7 +23,7 @@ To enable ports reporting, add this line
 	monthly_statistics_report_ports="YES"
 
 To run it manually the first time, just run it as:
-	${LOCALBASE}/etc/periodic/monthly/300.statistics -nodelay
+	%%PREFIX%%/etc/periodic/monthly/300.statistics -nodelay
 
 To view current statistics, go to:
         http://www.bsdstats.org
--- a.diff ends here ---
Comment 9 swell.k 2010-06-05 17:57:22 UTC
Makefile@r1.60 (ports/147255) can be safely ignored. INSTALL_SCRIPT in
my diff sets permissions correctly.
Comment 10 Mark Linimon 2010-07-27 05:37:10 UTC
----- Forwarded message from Anonymous <swell.k@gmail.com> -----

From: Anonymous <swell.k@gmail.com>
To: freebsd-ports-bugs@FreeBSD.org
Cc: itetcu@FreeBSD.org
Subject: reassign ports/146257 (bsdstats) to freebsd-ports-bugs@

2 months passed since repocopy[1], still no responce from itetcu@.

Please, reassign to freebsd-ports-bugs@.

[1] precise date: Mon May 17 05:04:34 UTC 2010
_______________________________________________
freebsd-ports-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscribe@freebsd.org"


----- End forwarded message -----
Comment 11 Mark Linimon freebsd_committer freebsd_triage 2010-07-27 20:53:39 UTC
Responsible Changed
From-To: itetcu->freebsd-ports-bugs

Current assignee won't be able to work on this in the immediate future.
Comment 12 Dmitry Marakasov freebsd_committer freebsd_triage 2010-08-19 03:52:30 UTC
Responsible Changed
From-To: freebsd-ports-bugs->amdmi3

I'll take it.
Comment 13 dfilter service freebsd_committer freebsd_triage 2010-08-19 04:06:27 UTC
amdmi3      2010-08-19 03:06:14 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/bsdstats    Makefile pkg-plist 
    sysutils/bsdstats/files 300.statistics.in bsdstats.in 
                            pkg-message.in 
  Removed files:
    sysutils/bsdstats    pkg-message 
    sysutils/bsdstats/files 300.statistics bsdstats.sh 
  Log:
  - Respect LOCALBASE
  - Switch to modern style of rc script handling
  - Installation-related nits
  
  PR:             146257
  Submitted by:   Anonymous <swell.k@gmail.com>
  
  Revision  Changes    Path
  1.61      +6 -6      ports/sysutils/bsdstats/Makefile
  1.43      +0 -446    ports/sysutils/bsdstats/files/300.statistics (dead)
  1.44      +2 -2      ports/sysutils/bsdstats/files/300.statistics.in
  1.3       +2 -2      ports/sysutils/bsdstats/files/bsdstats.in
  1.2       +0 -30     ports/sysutils/bsdstats/files/bsdstats.sh (dead)
  1.11      +1 -1      ports/sysutils/bsdstats/files/pkg-message.in
  1.10      +0 -30     ports/sysutils/bsdstats/pkg-message (dead)
  1.2       +0 -1      ports/sysutils/bsdstats/pkg-plist
_______________________________________________
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"
Comment 14 Dmitry Marakasov freebsd_committer freebsd_triage 2010-08-19 04:06:39 UTC
State Changed
From-To: open->closed

Committed. Thanks!