pbulk-0.64: Ensure to reset port after each loop, so that "client" and "client:port" notation can be mixed.diff -r1.79 -r1.80 pkgsrc/pkgtools/pbulk/Makefile
(joerg)
@@ -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 | |||
3 | PKGNAME= pbulk-0.63 | 3 | PKGNAME= pbulk-0.64 | |
4 | COMMENT= Modular bulk build framework | 4 | COMMENT= Modular bulk build framework | |
5 | 5 | |||
6 | .include "../../pkgtools/pbulk/Makefile.common" | 6 | .include "../../pkgtools/pbulk/Makefile.common" | |
7 | 7 | |||
8 | USE_TOOLS+= awk:run bzip2:run digest:run gzip:run make:run \ | 8 | USE_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 | |
10 | DEPENDS+= rsync-[0-9]*:../../net/rsync | 10 | DEPENDS+= rsync-[0-9]*:../../net/rsync | |
11 | DEPENDS+= pbulk-base>=0.38:../../pkgtools/pbulk-base | 11 | DEPENDS+= 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" | |
16 | TARGET_MAKE= ${MAKE} | 16 | TARGET_MAKE= ${MAKE} | |
17 | .else | 17 | .else | |
18 | TARGET_MAKE= $${prefix}/bin/bmake | 18 | TARGET_MAKE= $${prefix}/bin/bmake | |
19 | .endif | 19 | .endif | |
20 | 20 | |||
21 | NEATO= ${PREFIX}/bin/neato | 21 | NEATO= ${PREFIX}/bin/neato | |
22 | 22 | |||
23 | SUBST_CLASSES+= tools | 23 | SUBST_CLASSES+= tools | |
24 | SUBST_STAGE.tools= post-patch | 24 | SUBST_STAGE.tools= post-patch | |
25 | SUBST_MESSAGE.tools= Fixing references to tools | 25 | SUBST_MESSAGE.tools= Fixing references to tools | |
26 | SUBST_FILES.tools= pbulk.conf scripts/build scripts/build-client-start \ | 26 | SUBST_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 | |
34 | SUBST_VARS.tools= AWK BZIP2 CHOWN DIGEST GZIP_CMD ID MAIL_CMD NEATO \ | 34 | SUBST_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 | |||
39 | CONF_FILES+= share/examples/pbulk/pbulk.conf ${PKG_SYSCONFDIR}/pbulk.conf | 39 | CONF_FILES+= share/examples/pbulk/pbulk.conf ${PKG_SYSCONFDIR}/pbulk.conf | |
40 | 40 | |||
41 | PBULK_CONFIG= ${PKG_SYSCONFDIR}/pbulk.conf | 41 | PBULK_CONFIG= ${PKG_SYSCONFDIR}/pbulk.conf | |
42 | PBULK_CONFIG_VERSION= 0.63 | 42 | PBULK_CONFIG_VERSION= 0.63 | |
43 | 43 | |||
44 | INSTALLATION_DIRS= bin libexec/pbulk share/examples/pbulk | 44 | INSTALLATION_DIRS= bin libexec/pbulk share/examples/pbulk | |
45 | USE_BSD_MAKEFILE= yes | 45 | USE_BSD_MAKEFILE= yes | |
46 | 46 | |||
47 | BUILD_DIRS= scripts | 47 | BUILD_DIRS= scripts | |
48 | 48 | |||
49 | do-extract: | 49 | do-extract: | |
50 | ${CP} -r ${FILESDIR}/pbulk ${WRKDIR} | 50 | ${CP} -r ${FILESDIR}/pbulk ${WRKDIR} | |
51 | 51 | |||
52 | post-install: | 52 | post-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" |
@@ -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 | |||
6 | set -e | 6 | set -e | |
7 | 7 | |||
8 | if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then | 8 | if [ "${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 | |
12 | fi | 12 | fi | |
13 | 13 | |||
14 | for client in ${build_clients}; do | 14 | for 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}" & | |
24 | done | 25 | done |
@@ -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 | |||
6 | set -e | 6 | set -e | |
7 | 7 | |||
8 | if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then | 8 | if [ "${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 | |
12 | fi | 12 | fi | |
13 | 13 | |||
14 | unique_clients= | 14 | unique_clients= | |
15 | for client in ${scan_clients} ${build_clients}; do | 15 | for 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 | |
27 | done | 27 | done | |
28 | 28 | |||
29 | for client in ${unique_clients}; do | 29 | for 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}" & | |
39 | done | 40 | done | |
40 | 41 | |||
41 | wait | 42 | wait |
@@ -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 | |||
6 | set -e | 6 | set -e | |
7 | 7 | |||
8 | if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then | 8 | if [ "${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 | |
12 | fi | 12 | fi | |
13 | 13 | |||
14 | if [ -f "${bulklog}.old/meta/pscan" ]; then | 14 | if [ -f "${bulklog}.old/meta/pscan" ]; then | |
15 | extra_pscan_args="-L ${bulklog}.old/meta/pscan" | 15 | extra_pscan_args="-L ${bulklog}.old/meta/pscan" | |
16 | else | 16 | else | |
17 | extra_pscan_args="" | 17 | extra_pscan_args="" | |
18 | fi | 18 | fi | |
19 | 19 | |||
20 | ${client_prepare} | 20 | ${client_prepare} | |
21 | 21 | |||
22 | for client in ${scan_clients}; do | 22 | for 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}" & | |
32 | done | 33 | done |