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 (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,55 +1,55 @@ @@ -1,55 +1,55 @@
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}
17.else 17.else
18TARGET_MAKE= $${prefix}/bin/bmake 18TARGET_MAKE= $${prefix}/bin/bmake
19.endif 19.endif
20 20
21NEATO= ${PREFIX}/bin/neato 21NEATO= ${PREFIX}/bin/neato
22 22
23SUBST_CLASSES+= tools 23SUBST_CLASSES+= tools
24SUBST_STAGE.tools= post-patch 24SUBST_STAGE.tools= post-patch
25SUBST_MESSAGE.tools= Fixing references to tools 25SUBST_MESSAGE.tools= Fixing references to tools
26SUBST_FILES.tools= pbulk.conf scripts/build scripts/build-client-start \ 26SUBST_FILES.tools= pbulk.conf scripts/build scripts/build-client-start \
27 scripts/bulkbuild scripts/bulkbuild-rebuild scripts/bulkbuild-restart \ 27 scripts/bulkbuild scripts/bulkbuild-rebuild scripts/bulkbuild-restart \
28 scripts/client-clean scripts/client-prepare \ 28 scripts/client-clean scripts/client-prepare \
29 scripts/pkg-build scripts/pkg-up-to-date scripts/pre-build \ 29 scripts/pkg-build scripts/pkg-up-to-date scripts/pre-build \
30 scripts/report scripts/scan scripts/scan-client-start scripts/upload \ 30 scripts/report scripts/scan scripts/scan-client-start scripts/upload \
31 scripts/compute-packages.awk scripts/create-broken-graph.awk \ 31 scripts/compute-packages.awk scripts/create-broken-graph.awk \
32 scripts/create-report-html.awk scripts/create-report-txt.awk \ 32 scripts/create-report-html.awk scripts/create-report-txt.awk \
33 scripts/create-report.awk 33 scripts/create-report.awk
34SUBST_VARS.tools= AWK BZIP2 CHOWN DIGEST GZIP_CMD ID MAIL_CMD NEATO \ 34SUBST_VARS.tools= AWK BZIP2 CHOWN DIGEST GZIP_CMD ID MAIL_CMD NEATO \
35 PBULK_CONFIG PBULK_CONFIG_VERSION PKG_ADD_CMD \ 35 PBULK_CONFIG PBULK_CONFIG_VERSION PKG_ADD_CMD \
36 PKG_DELETE_CMD PKG_INFO_CMD PREFIX SED SH TAR \ 36 PKG_DELETE_CMD PKG_INFO_CMD PREFIX SED SH TAR \
37 TARGET_MAKE 37 TARGET_MAKE
38 38
39CONF_FILES+= share/examples/pbulk/pbulk.conf ${PKG_SYSCONFDIR}/pbulk.conf 39CONF_FILES+= share/examples/pbulk/pbulk.conf ${PKG_SYSCONFDIR}/pbulk.conf
40 40
41PBULK_CONFIG= ${PKG_SYSCONFDIR}/pbulk.conf 41PBULK_CONFIG= ${PKG_SYSCONFDIR}/pbulk.conf
42PBULK_CONFIG_VERSION= 0.63 42PBULK_CONFIG_VERSION= 0.63
43 43
44INSTALLATION_DIRS= bin libexec/pbulk share/examples/pbulk 44INSTALLATION_DIRS= bin libexec/pbulk share/examples/pbulk
45USE_BSD_MAKEFILE= yes 45USE_BSD_MAKEFILE= yes
46 46
47BUILD_DIRS= scripts 47BUILD_DIRS= scripts
48 48
49do-extract: 49do-extract:
50 ${CP} -r ${FILESDIR}/pbulk ${WRKDIR} 50 ${CP} -r ${FILESDIR}/pbulk ${WRKDIR}
51 51
52post-install: 52post-install:
53 ${INSTALL_DATA} ${WRKSRC}/pbulk.conf ${DESTDIR}${PREFIX}/share/examples/pbulk/pbulk.conf 53 ${INSTALL_DATA} ${WRKSRC}/pbulk.conf ${DESTDIR}${PREFIX}/share/examples/pbulk/pbulk.conf
54 54
55.include "../../mk/bsd.pkg.mk" 55.include "../../mk/bsd.pkg.mk"

cvs diff -r1.3 -r1.4 pkgsrc/pkgtools/pbulk/files/pbulk/scripts/build-client-start (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 (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,41 +1,42 @@ @@ -1,41 +1,42 @@
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
16 case ${unique_clients} in 16 case ${unique_clients} in
17 "${client}" | "${client} "* | *" ${client} "* | *" ${client}" ) 17 "${client}" | "${client} "* | *" ${client} "* | *" ${client}" )
18 : # exists already 18 : # exists already
19 ;; 19 ;;
20 *) 20 *)
21 if [ -n "$unique_clients" ]; then 21 if [ -n "$unique_clients" ]; then
22 unique_clients="$unique_clients " 22 unique_clients="$unique_clients "
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 (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