Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Feb 2012 01:34:26 +0100
From:      Andy Kosela <akosela@andykosela.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        akosela@andykosela.com
Subject:   ports/164810: [MAINTAINER-UPDATE] ports-mgmt/bpkg: update to 2.1.6
Message-ID:  <4f2f2012.f%2BjRe5qaoU/veOJv%akosela@andykosela.com>
Resent-Message-ID: <201202060030.q160UCJv082927@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         164810
>Category:       ports
>Synopsis:       [MAINTAINER-UPDATE] ports-mgmt/bpkg: update to 2.1.6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 06 00:30:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Andy Kosela
>Release:        FreeBSD 8.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD zork.lan 8.2-RELEASE FreeBSD 8.2-RELEASE #9: Sun May 29 13:29:41 CEST 2011
>Description:
- Update to 2.1.6

* new ftp mode [-CURRENT]
* change path for backup packages
* update man page

>How-To-Repeat:
>Fix:

--- bpkg-2.1.6.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/ports-mgmt/bpkg/Makefile /usr/home/akosela/bpkg/Makefile
--- /usr/ports/ports-mgmt/bpkg/Makefile	2012-02-05 16:40:43.000000000 +0100
+++ /usr/home/akosela/bpkg/Makefile	2012-02-05 23:52:58.000000000 +0100
@@ -8,7 +8,7 @@
 #
 
 PORTNAME=	bpkg
-PORTVERSION=	2.1.5
+PORTVERSION=	2.1.6
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	# none
 DISTFILES=	# none
diff -ruN --exclude=CVS /usr/ports/ports-mgmt/bpkg/files/bpkg.8 /usr/home/akosela/bpkg/files/bpkg.8
--- /usr/ports/ports-mgmt/bpkg/files/bpkg.8	2010-09-29 18:02:01.000000000 +0200
+++ /usr/home/akosela/bpkg/files/bpkg.8	2012-02-06 01:20:04.000000000 +0100
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2007-2010 Andy Kosela <akosela@andykosela.com>
+.\" Copyright (c) 2007-2012 Andy Kosela <akosela@andykosela.com>
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"
-.Dd September 24, 2010
+.Dd February 6, 2012
 .Dt BPKG 8
 .Os
 .Sh NAME
@@ -33,7 +33,7 @@
 .Nd a simple tool for displaying information about ports.
 .Sh SYNOPSIS
 .Nm
-.Op Fl abDdeFfgIijkLMmOopQqrswz
+.Op Fl abDdEeFfgIijkLMmOopQqrswz
 .Ar pkg-name ...
 .Nm
 .Op Fl BCchltvZ
@@ -47,35 +47,38 @@
 The following command line arguments are supported:
 .Bl -tag -width F1
 .It Fl a
-show what dependent ports are, and are not installed.  [portmaster
+show what dependent ports are, and are not installed. [portmaster
 required]
 .It Fl B
-create backup packages in /var/tmp/bpkg/ from all locally installed
-ports.
+create backup packages in /usr/ports/packages/bpkg from all locally
+installed ports.
 .It Fl b
-create backup package in /var/tmp/bpkg/ from a locally installed port.
+create backup package in /usr/ports/packages/bpkg from a locally
+installed port.
 .It Fl C
 clean all distfiles in /usr/ports/distfiles/* and also all work
-directories of the ports tree /usr/ports/*/*/work/  [no arguments]
+directories of the ports tree /usr/ports/*/*/work [no arguments]
 .It Fl c
-clean all distfiles in /usr/ports/distfiles/*  [no arguments]
+clean all distfiles in /usr/ports/distfiles/* [no arguments]
 .It Fl D
 display size of port's source files.
 .It Fl d
 display description of the port.
+.It Fl E
+display available package in the FreeBSD repository. [-CURRENT]
 .It Fl e
 configure OPTIONS for the specified port.
 .It Fl F
-browse www.freshports.org port's entry.  [text WWW browser required]
+browse www.freshports.org port's entry. [text WWW browser required]
 .It Fl f
 show the packing list instructions for the port.
 .It Fl g
 show files that do not match the recorded checksum in the specified
 installed port.
 .It Fl h
-display help.  [no arguments]
+display help. [no arguments]
 .It Fl i
-display short description of the port (priority -- installed ports).
+display short description of the port [priority -- installed ports]
 .It Fl I
 display info about the port.
 .It Fl j
@@ -85,7 +88,7 @@
 .It Fl L
 show the files within the installed port.
 .It Fl l
-display short info about all installed ports.  [no arguments]
+display short info about all installed ports. [no arguments]
 .It Fl M
 show the install-message file for the installed port.
 .It Fl m
@@ -97,24 +100,22 @@
 .It Fl p
 search the ports tree and display short info about each port.
 .It Fl Q
-display the latest available package in the FreeBSD repository.
-[-STABLE]
+display available package in the FreeBSD repository. [-STABLE]
 .It Fl q
-display the latest available package in the FreeBSD repository.
-[-RELEASE]
+display available package in the FreeBSD repository. [-RELEASE]
 .It Fl r
 show the list of all port's dependencies.
 .It Fl s
 show the total size occupied by files installed within the port.
 .It Fl t
-list all installed ports with dates of their installation.  [no
+list all installed ports with dates of their installation. [no
 arguments]
 .It Fl w
 which installed port owns the specified file.
 .It Fl v
-list all installed ports and possible updates.  [no arguments]
+list all installed ports and possible updates. [no arguments]
 .It Fl Z
-display all missing dynamic object dependencies.  [no arguments]
+display all missing dynamic object dependencies. [no arguments]
 .It Fl z
 display dynamic object dependencies for the specified port.
 .El
@@ -139,7 +140,8 @@
 .Pp
 .Dl "$ bpkg -b 'foo bar'"
 .Pp
-Create backup packages of foo and bar in /var/tmp/bpkg directory.
+Create backup packages of foo and bar in /usr/ports/packages/bpkg
+directory.
 .Sh SEE ALSO
 .Xr pkg_add 1 ,
 .Xr pkg_create 1 ,
diff -ruN --exclude=CVS /usr/ports/ports-mgmt/bpkg/files/bpkg.sh.in /usr/home/akosela/bpkg/files/bpkg.sh.in
--- /usr/ports/ports-mgmt/bpkg/files/bpkg.sh.in	2012-02-05 16:40:43.000000000 +0100
+++ /usr/home/akosela/bpkg/files/bpkg.sh.in	2012-02-06 01:06:26.000000000 +0100
@@ -321,56 +321,44 @@
 	exit 0
 }
 
-pkg_ftp()
+pkg_releaseftp()
 {
-	local arch sys e n size_pkg size mtime
-
-	arch=`uname -m`
 	sys=`uname -r | cut -d- -f1`
+	branch='-release'
+	pkg_ftp
+}
 
-	[ -e /tmp/bpkg*.tmp ] && rm /tmp/bpkg*.tmp 1>/dev/null 2>&1
-	for e in $pkg; do
-		echo "ls $e*" >> /tmp/bpkg.tmp
-	done
-	sed -i '' s/[0-9][0-9].*/*/ /tmp/bpkg.tmp
-
-	echo "ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys-release/Latest/"
-	echo "Loading data..."
-	ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys-release/Latest/ < /tmp/bpkg.tmp > /tmp/bpkg1.tmp
-	ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys-release/All/ < /tmp/bpkg.tmp > /tmp/bpkg2.tmp
+pkg_stableftp()
+{
+	sys=`uname -r | cut -d. -f1`
+	branch='-stable'
+	pkg_ftp
+}
 
-	n=1
-	for e in `cat /tmp/bpkg1.tmp | awk '{print $9}' | cut -d. -f1`
-	do
-		size_pkg=`cat /tmp/bpkg1.tmp | sed '/^[A-Z]/d' | sed -n ${n}p |
-		    awk '{print $11}' | cut -d/ -f3`
-		size=`cat /tmp/bpkg2.tmp | grep $size_pkg | awk '{print $5}'`
-		mtime=`cat /tmp/bpkg2.tmp | grep $size_pkg |
-		    awk '{print $6, $7, $8}'`
-		echo "$e -> $size_pkg `convert $size` [$mtime]"
-		n=`expr $n + 1`
-	done
-	rm /tmp/bpkg*.tmp
-	exit 0
+pkg_currentftp()
+{
+	sys=''
+	branch=current
+	pkg_ftp
 }
 
-pkg_latestftp()
+pkg_ftp()
 {
-	local arch sys e n size_pkg size mtime
+	local arch site e n size_pkg size mtime
 
 	arch=`uname -m`
-	sys=`uname -r | cut -d. -f1`
+	site='ftp.freebsd.org/pub/FreeBSD/ports'
 
-	[ -e /tmp/bpkg*.tmp ] && rm /tmp/bpkg*.tmp 1>/dev/null 2>&1
+	[ -e /tmp/bpkg*.tmp ] && rm -f /tmp/bpkg*.tmp 1>/dev/null 2>&1
 	for e in $pkg; do
 		echo "ls $e*" >> /tmp/bpkg.tmp
 	done
 	sed -i '' s/[0-9][0-9].*/*/ /tmp/bpkg.tmp
 
-	echo "ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys-stable/Latest/"
+	echo "$site/$arch/packages-${sys}$branch/Latest/"
 	echo "Loading data..."
-	ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys-stable/Latest/ < /tmp/bpkg.tmp > /tmp/bpkg1.tmp
-	ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys-stable/All/ < /tmp/bpkg.tmp > /tmp/bpkg2.tmp
+	ftp -4Va ftp://$site/$arch/packages-${sys}$branch/Latest/ < /tmp/bpkg.tmp > /tmp/bpkg1.tmp
+	ftp -4Va ftp://$site/$arch/packages-${sys}$branch/All/ < /tmp/bpkg.tmp > /tmp/bpkg2.tmp
 
 	n=1
 	for e in `cat /tmp/bpkg1.tmp | awk '{print $9}' | cut -d. -f1`
@@ -383,7 +371,7 @@
 		echo "$e -> $size_pkg `convert $size` [$mtime]"
 		n=`expr $n + 1`
 	done
-	rm /tmp/bpkg*.tmp
+	rm -f /tmp/bpkg*.tmp
 	exit 0
 }
 
@@ -429,9 +417,9 @@
 	fi
 
 	pkg_install=`pkg_info -xoQ ^$pkg | cut -d: -f1 | awk '{ORS=" " ;print}'`
-	echo "Creating backup package(s) "$pkg_install"in /var/tmp/bpkg/"
-	[ ! -d /var/tmp/bpkg/ ] && mkdir /var/tmp/bpkg/
-	cd /var/tmp/bpkg/
+	echo "Creating backup package(s) "$pkg_install"in /usr/ports/packages/bpkg"
+	[ ! -d /usr/ports/packages/bpkg ] && mkdir -p /usr/ports/packages/bpkg
+	cd /usr/ports/packages/bpkg
 
 	for e in $pkg; do
 		i=`pkg_info -xoQ ^$e | cut -d: -f1`
@@ -446,9 +434,9 @@
 	local e
 
 	root
-	echo "Creating backup packages in /var/tmp/bpkg"
-	[ ! -d /var/tmp/bpkg/ ] && mkdir /var/tmp/bpkg
-	cd /var/tmp/bpkg
+	echo "Creating backup packages in /usr/ports/packages/bpkg"
+	[ ! -d /usr/ports/packages/bpkg ] && mkdir -p /usr/ports/packages/bpkg
+	cd /usr/ports/packages/bpkg
 
 	for e in `pkg_info -Ea`; do
 		pkg_create -b "$e" 1>/dev/null 2>&1
@@ -751,7 +739,7 @@
 ########################################################################
 
 while
-getopts a:b:D:d:e:F:f:g:I:i:j:k:L:M:m:O:o:p:Q:q:r:s:w:z:BCchltvZ opts
+getopts a:b:D:d:E:e:F:f:g:I:i:j:k:L:M:m:O:o:p:Q:q:r:s:w:z:BCchltvZ opts
 do
 	case $opts in
 		a) pkg=$OPTARG
@@ -765,6 +753,8 @@
 		d) pkg=$OPTARG
 		   check_index
 		   pkg_info-x ;;
+		E) pkg=$OPTARG
+		   pkg_currentftp ;;
 		e) pkg=$OPTARG
 		   check_index
 		   make_config ;;
@@ -804,9 +794,9 @@
 		   check_index
 		   pkg_path ;;
 		Q) pkg=$OPTARG
-		   pkg_latestftp ;;
+		   pkg_stableftp ;;
 		q) pkg=$OPTARG
-		   pkg_ftp ;;
+		   pkg_releaseftp ;;
 		r) pkg=$OPTARG
 		   check_index
 		   pkg_info-xr ;;
--- bpkg-2.1.6.patch ends here ---


--Andy
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4f2f2012.f%2BjRe5qaoU/veOJv%akosela>