Sun Dec 18 22:41:12 2016 UTC ()
pbulk-0.64:
Ensure to reset port after each loop, so that "client" and "client:port"
notation can be mixed.


(joerg)
diff -r1.79 -r1.80 pkgsrc/pkgtools/pbulk/Makefile
diff -r1.3 -r1.4 pkgsrc/pkgtools/pbulk/files/pbulk/scripts/build-client-start
diff -r1.1 -r1.2 pkgsrc/pkgtools/pbulk/files/pbulk/scripts/client-prepare
diff -r1.5 -r1.6 pkgsrc/pkgtools/pbulk/files/pbulk/scripts/scan-client-start

cvs diff -r1.79 -r1.80 pkgsrc/pkgtools/pbulk/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/pbulk/Makefile 2016/12/18 22:38:16 1.79
+++ pkgsrc/pkgtools/pbulk/Makefile 2016/12/18 22:41:12 1.80
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.79 2016/12/18 22:38:16 joerg Exp $ 1# $NetBSD: Makefile,v 1.80 2016/12/18 22:41:12 joerg Exp $
2 2
3PKGNAME= pbulk-0.63 3PKGNAME= pbulk-0.64
4COMMENT= Modular bulk build framework 4COMMENT= Modular bulk build framework
5 5
6.include "../../pkgtools/pbulk/Makefile.common" 6.include "../../pkgtools/pbulk/Makefile.common"
7 7
8USE_TOOLS+= awk:run bzip2:run digest:run gzip:run make:run \ 8USE_TOOLS+= awk:run bzip2:run digest:run gzip:run make:run \
9 mail:run sed:run tar:run 9 mail:run sed:run tar:run
10DEPENDS+= rsync-[0-9]*:../../net/rsync 10DEPENDS+= rsync-[0-9]*:../../net/rsync
11DEPENDS+= pbulk-base>=0.38:../../pkgtools/pbulk-base 11DEPENDS+= pbulk-base>=0.38:../../pkgtools/pbulk-base
12 12
13.include "../../mk/bsd.prefs.mk" 13.include "../../mk/bsd.prefs.mk"
14 14
15.if ${OPSYS} == "NetBSD" && ${MAKE} == "/usr/bin/make" 15.if ${OPSYS} == "NetBSD" && ${MAKE} == "/usr/bin/make"
16TARGET_MAKE= ${MAKE} 16TARGET_MAKE= ${MAKE}

cvs diff -r1.3 -r1.4 pkgsrc/pkgtools/pbulk/files/pbulk/scripts/build-client-start (expand / switch to unified diff)

--- pkgsrc/pkgtools/pbulk/files/pbulk/scripts/build-client-start 2015/06/07 22:49:04 1.3
+++ pkgsrc/pkgtools/pbulk/files/pbulk/scripts/build-client-start 2016/12/18 22:41:12 1.4
@@ -1,24 +1,25 @@ @@ -1,24 +1,25 @@
1#!@SH@ 1#!@SH@
2# $NetBSD: build-client-start,v 1.3 2015/06/07 22:49:04 joerg Exp $ 2# $NetBSD: build-client-start,v 1.4 2016/12/18 22:41:12 joerg Exp $
3 3
4. @PBULK_CONFIG@ 4. @PBULK_CONFIG@
5 5
6set -e 6set -e
7 7
8if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then 8if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then
9 echo "Your configuration has version ${config_version}." 9 echo "Your configuration has version ${config_version}."
10 echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." 10 echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@."
11 exit 1 11 exit 1
12fi 12fi
13 13
14for client in ${build_clients}; do 14for client in ${build_clients}; do
15 case ${client} in  15 case ${client} in
16 *:*) 16 *:*)
17 port="-p ${client##*:}" 17 port="-p ${client##*:}"
18 client=${client%%:*} 18 client=${client%%:*}
19 ;; 19 ;;
20 *) 20 *)
 21 port=
21 ;; 22 ;;
22 esac 23 esac
23 ssh $port $client "${pbuild} -c ${master_port_build} -b ${pbuild_script}" & 24 ssh $port $client "${pbuild} -c ${master_port_build} -b ${pbuild_script}" &
24done 25done

cvs diff -r1.1 -r1.2 pkgsrc/pkgtools/pbulk/files/pbulk/scripts/client-prepare (expand / switch to unified diff)

--- pkgsrc/pkgtools/pbulk/files/pbulk/scripts/client-prepare 2016/12/18 22:38:16 1.1
+++ pkgsrc/pkgtools/pbulk/files/pbulk/scripts/client-prepare 2016/12/18 22:41:12 1.2
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1#!@SH@ 1#!@SH@
2# $NetBSD: client-prepare,v 1.1 2016/12/18 22:38:16 joerg Exp $ 2# $NetBSD: client-prepare,v 1.2 2016/12/18 22:41:12 joerg Exp $
3 3
4. @PBULK_CONFIG@ 4. @PBULK_CONFIG@
5 5
6set -e 6set -e
7 7
8if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then 8if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then
9 echo "Your configuration has version ${config_version}." 9 echo "Your configuration has version ${config_version}."
10 echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." 10 echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@."
11 exit 1 11 exit 1
12fi 12fi
13 13
14unique_clients= 14unique_clients=
15for client in ${scan_clients} ${build_clients}; do 15for client in ${scan_clients} ${build_clients}; do
@@ -23,19 +23,20 @@ for client in ${scan_clients} ${build_cl @@ -23,19 +23,20 @@ for client in ${scan_clients} ${build_cl
23 fi 23 fi
24 unique_clients="$unique_clients ${client}" 24 unique_clients="$unique_clients ${client}"
25 ;; 25 ;;
26 esac 26 esac
27done 27done
28 28
29for client in ${unique_clients}; do 29for client in ${unique_clients}; do
30 case ${client} in  30 case ${client} in
31 *:*) 31 *:*)
32 port="-p ${client##*:}" 32 port="-p ${client##*:}"
33 client=${client%%:*} 33 client=${client%%:*}
34 ;; 34 ;;
35 *) 35 *)
 36 port=
36 ;; 37 ;;
37 esac 38 esac
38 ssh $port $client "${client_prepare_action}" & 39 ssh $port $client "${client_prepare_action}" &
39done 40done
40 41
41wait 42wait

cvs diff -r1.5 -r1.6 pkgsrc/pkgtools/pbulk/files/pbulk/scripts/scan-client-start (expand / switch to unified diff)

--- pkgsrc/pkgtools/pbulk/files/pbulk/scripts/scan-client-start 2016/12/18 22:38:16 1.5
+++ pkgsrc/pkgtools/pbulk/files/pbulk/scripts/scan-client-start 2016/12/18 22:41:12 1.6
@@ -1,32 +1,33 @@ @@ -1,32 +1,33 @@
1#!@SH@ 1#!@SH@
2# $NetBSD: scan-client-start,v 1.5 2016/12/18 22:38:16 joerg Exp $ 2# $NetBSD: scan-client-start,v 1.6 2016/12/18 22:41:12 joerg Exp $
3 3
4. @PBULK_CONFIG@ 4. @PBULK_CONFIG@
5 5
6set -e 6set -e
7 7
8if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then 8if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then
9 echo "Your configuration has version ${config_version}." 9 echo "Your configuration has version ${config_version}."
10 echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." 10 echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@."
11 exit 1 11 exit 1
12fi 12fi
13 13
14if [ -f "${bulklog}.old/meta/pscan" ]; then 14if [ -f "${bulklog}.old/meta/pscan" ]; then
15 extra_pscan_args="-L ${bulklog}.old/meta/pscan" 15 extra_pscan_args="-L ${bulklog}.old/meta/pscan"
16else 16else
17 extra_pscan_args="" 17 extra_pscan_args=""
18fi 18fi
19 19
20${client_prepare} 20${client_prepare}
21 21
22for client in ${scan_clients}; do 22for client in ${scan_clients}; do
23 case ${client} in  23 case ${client} in
24 *:*) 24 *:*)
25 port="-p ${client##*:}" 25 port="-p ${client##*:}"
26 client=${client%%:*} 26 client=${client%%:*}
27 ;; 27 ;;
28 *) 28 *)
 29 port=
29 ;; 30 ;;
30 esac 31 esac
31 ssh $port $client "${pscan} -c ${master_port_scan} -M ${make} ${extra_pscan_args} ${pkgsrc}" & 32 ssh $port $client "${pscan} -c ${master_port_scan} -M ${make} ${extra_pscan_args} ${pkgsrc}" &
32done 33done