4 read -rd "\000" helpmessage <<EOF
5 $(basename $0): Build Arvados packages and (optionally) upload them.
8 WORKSPACE=/path/to/arvados $(basename $0) [options]
13 Upload packages (default: false)
15 Scp user for apt server (only required when --upload is specified)
17 Apt server hostname (only required when --upload is specified)
18 --build-bundle-packages (default: false)
19 Build api server and workbench packages with vendor/bundle included
21 Output debug information (default: false)
23 WORKSPACE=path Path to the Arvados source tree to build packages from
38 echo >&2 "$helpmessage"
54 --build-bundle-packages)
55 BUILD_BUNDLE_PACKAGES=1
58 echo >&2 "$0: Unrecognized option: '$arg'. Try: $0 --help"
65 if [[ "$UPLOAD" != '0' && ("$APTUSER" == '' || "$APTSERVER" == '') ]]; then
66 echo >&2 "$helpmessage"
68 echo >&2 "Error: please specify --scp-user and --apt-server if --upload is set"
74 if ! [[ -n "$WORKSPACE" ]]; then
75 echo >&2 "$helpmessage"
77 echo >&2 "Error: WORKSPACE environment variable not set"
83 fpm --version >/dev/null 2>&1
85 if [[ "$?" != 0 ]]; then
86 echo >&2 "$helpmessage"
88 echo >&2 "Error: fpm not found"
93 if ! easy_install3 --version >/dev/null; then
97 Error: easy_install3 (from python3-setuptools) not found
103 RUN_BUILD_PACKAGES_PATH="`dirname \"$0\"`"
104 RUN_BUILD_PACKAGES_PATH="`( cd \"$RUN_BUILD_PACKAGES_PATH\" && pwd )`" # absolutized and normalized
105 if [ -z "$RUN_BUILD_PACKAGES_PATH" ] ; then
106 # error; for some reason, the path is not accessible
107 # to the script (e.g. permissions re-evaled after suid)
111 if [[ "$DEBUG" != 0 ]]; then
112 echo "$0 is running from $RUN_BUILD_PACKAGES_PATH"
113 echo "Workspace is $WORKSPACE"
117 # Generates a version number from the git log for the current working
118 # directory, and writes it to stdout.
119 local git_ts git_hash
120 declare $(TZ=UTC git log -n1 --first-parent --max-count=1 \
121 --format=format:"git_ts=%ct git_hash=%h" .)
122 echo "0.1.$(date -ud "@$git_ts" +%Y%m%d%H%M%S).$git_hash"
125 timestamp_from_git() {
126 # Generates a version number from the git log for the current working
127 # directory, and writes it to stdout.
128 local git_ts git_hash
129 declare $(TZ=UTC git log -n1 --first-parent --max-count=1 \
130 --format=format:"git_ts=%ct git_hash=%h" .)
134 handle_python_package () {
135 # This function assumes the current working directory is the python package directory
136 if [[ "$UPLOAD" != 0 ]]; then
137 # Make sure only to use sdist - that's the only format pip can deal with (sigh)
138 if [[ "$DEBUG" != 0 ]]; then
139 python setup.py sdist upload
141 python setup.py -q sdist upload
144 # Make sure only to use sdist - that's the only format pip can deal with (sigh)
145 if [[ "$DEBUG" != 0 ]]; then
146 python setup.py sdist
148 python setup.py -q sdist
153 # Build debs for everything
154 build_and_scp_deb () {
155 # The package source. Depending on the source type, this can be a
156 # path, or the name of the package in an upstream repository (e.g.,
160 # The name of the package to build. Defaults to $PACKAGE.
161 PACKAGE_NAME=${1:-$PACKAGE}
163 # Optional: the vendor of the package. Should be "Curoverse, Inc." for
164 # packages of our own software. Passed to fpm --vendor.
167 # The type of source package. Passed to fpm -s. Default "python".
168 PACKAGE_TYPE=${1:-python}
170 # Optional: the package version number. Passed to fpm -v.
174 # fpm does not actually support a python3 package type. Instead we recognize
175 # it as a convenience shortcut to add several necessary arguments to
176 # fpm's command line later, after we're done handling positional arguments.
177 if [ "python3" = "$PACKAGE_TYPE" ]; then
179 set -- "$@" --python-bin python3 --python-easyinstall easy_install3 \
180 --python-package-name-prefix python3 --depends python3
183 declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "-s" "$PACKAGE_TYPE" "-t" "deb" "-x" "usr/local/lib/python2.7/dist-packages/tests")
185 if [[ "$PACKAGE_NAME" != "$PACKAGE" ]]; then
186 COMMAND_ARR+=('-n' "$PACKAGE_NAME")
189 if [[ "$VENDOR" != "" ]]; then
190 COMMAND_ARR+=('--vendor' "$VENDOR")
193 if [[ "$VERSION" != "" ]]; then
194 COMMAND_ARR+=('-v' "$VERSION")
197 # Append remaining function arguments directly to fpm's command line.
202 COMMAND_ARR+=("$PACKAGE")
204 if [[ "$DEBUG" != 0 ]]; then
206 echo "${COMMAND_ARR[@]}"
210 FPM_RESULTS=$("${COMMAND_ARR[@]}")
213 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
216 # verify build results and scp debs, if needed
217 verify_and_scp_deb () {
223 if [[ $FPM_RESULTS =~ ([A-Za-z0-9_\-.]*\.deb) ]]; then
224 FPM_PACKAGE_NAME=${BASH_REMATCH[1]}
227 if [[ "$FPM_PACKAGE_NAME" == "" ]]; then
229 echo "Error: $PACKAGE: Unable to figure out package name from fpm results:"
234 if [[ ! $FPM_RESULTS =~ "File already exists" ]]; then
235 if [[ "$FPM_EXIT_CODE" != "0" ]]; then
236 echo "Error building debian package for $1:\n $FPM_RESULTS"
238 if [[ "$UPLOAD" != 0 ]]; then
239 scp -P2222 $FPM_PACKAGE_NAME $APTUSER@$APTSERVER:tmp/
244 echo "Debian package $FPM_PACKAGE_NAME exists, not rebuilding"
249 if [[ -f /etc/profile.d/rvm.sh ]]; then
250 source /etc/profile.d/rvm.sh
253 # Make all files world-readable -- jenkins runs with umask 027, and has checked
254 # out our git tree here
255 chmod o+r "$WORKSPACE" -R
257 # More cleanup - make sure all executables that we'll package are 755
258 find -type d -name 'bin' |xargs -I {} find {} -type f |xargs -I {} chmod 755 {}
260 # Now fix our umask to something better suited to building and publishing
264 if [[ "$DEBUG" != 0 ]]; then
265 echo "umask is" `umask`
269 if [[ "$DEBUG" != 0 ]]; then
270 echo -e "\nPerl packages\n"
273 if [[ "$DEBUG" != 0 ]]; then
279 cd "$WORKSPACE/sdk/perl"
281 if [[ -e Makefile ]]; then
282 make realclean >"$PERL_OUT"
284 find -maxdepth 1 \( -name 'MANIFEST*' -or -name 'libarvados-perl_*.deb' \) \
288 perl Makefile.PL >"$PERL_OUT" && \
289 make install PREFIX=install INSTALLDIRS=perl >"$PERL_OUT" && \
290 build_and_scp_deb install/=/usr libarvados-perl "Curoverse, Inc." dir \
291 "$(version_from_git)"
294 if [[ "$DEBUG" != 0 ]]; then
300 if type rvm-exec >/dev/null 2>&1; then
301 FPM_GEM_PREFIX=$(rvm-exec system gem environment gemdir)
303 FPM_GEM_PREFIX=$(gem environment gemdir)
308 # clean up old packages
309 find -maxdepth 1 \( -name 'arvados-*.gem' -or -name 'rubygem-arvados_*.deb' \) \
312 if [[ "$DEBUG" != 0 ]]; then
313 gem build arvados.gemspec
315 # -q appears to be broken in gem version 2.2.2
316 gem build arvados.gemspec -q >/dev/null 2>&1
319 if [[ "$UPLOAD" != 0 ]]; then
321 gem push arvados-*gem
324 build_and_scp_deb arvados-*.gem "" "Curoverse, Inc." gem "" \
325 --prefix "$FPM_GEM_PREFIX"
327 # Build arvados-cli GEM
331 rm -f arvados-cli*gem
333 if [[ "$DEBUG" != 0 ]]; then
334 gem build arvados-cli.gemspec
336 # -q appears to be broken in gem version 2.2.2
337 gem build arvados-cli.gemspec -q >/dev/null
340 if [[ "$UPLOAD" != 0 ]]; then
342 gem push arvados-cli*gem
346 if [[ "$DEBUG" != 0 ]]; then
348 echo "Python packages"
355 handle_python_package
357 cd ../../services/fuse
358 handle_python_package
360 cd ../../services/nodemanager
361 handle_python_package
363 if [[ ! -d "$WORKSPACE/debs" ]]; then
364 mkdir -p $WORKSPACE/debs
368 # We use $WORKSPACE/src-build-dir as the clean directory from which to build the src package
369 if [[ ! -d "$WORKSPACE/src-build-dir" ]]; then
370 mkdir "$WORKSPACE/src-build-dir"
372 if [[ "$DEBUG" != 0 ]]; then
373 git clone https://github.com/curoverse/arvados.git src-build-dir
375 git clone -q https://github.com/curoverse/arvados.git src-build-dir
379 cd "$WORKSPACE/src-build-dir"
380 # just in case, check out master
381 if [[ "$DEBUG" != 0 ]]; then
384 # go into detached-head state
385 git checkout `git log --format=format:%h -n1 .`
387 git checkout -q master
389 # go into detached-head state
390 git checkout -q `git log --format=format:%h -n1 .`
393 # Build arvados src deb package
395 PKG_VERSION=$(version_from_git)
397 build_and_scp_deb $WORKSPACE/src-build-dir/=/usr/local/arvados/src arvados-src 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--exclude=usr/local/arvados/src/.git" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=The Arvados source code" "--architecture=all"
399 # clean up, check out master and step away from detached-head state
400 cd "$WORKSPACE/src-build-dir"
401 if [[ "$DEBUG" != 0 ]]; then
404 git checkout -q master
408 export GOPATH=$(mktemp -d)
409 mkdir -p "$GOPATH/src/git.curoverse.com"
410 ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git"
413 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/keepstore"
414 PKG_VERSION=$(version_from_git)
415 go get "git.curoverse.com/arvados.git/services/keepstore"
417 build_and_scp_deb $GOPATH/bin/keepstore=/usr/bin/keepstore keepstore 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=Keepstore is the Keep storage daemon, accessible to clients on the LAN"
420 cd "$GOPATH/src/git.curoverse.com/arvados.git/sdk/go"
421 GO_SDK_VERSION=$(version_from_git)
422 GO_SDK_TIMESTAMP=$(timestamp_from_git)
425 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/keepproxy"
426 KEEPPROXY_VERSION=$(version_from_git)
427 KEEPPROXY_TIMESTAMP=$(timestamp_from_git)
429 if [[ "$GO_SDK_TIMESTAMP" -gt "$KEEPPROXY_TIMESTAMP" ]]; then
430 PKG_VERSION=$GO_SDK_VERSION
432 PKG_VERSION=$KEEPPROXY_VERSION
435 go get "git.curoverse.com/arvados.git/services/keepproxy"
437 build_and_scp_deb $GOPATH/bin/keepproxy=/usr/bin/keepproxy keepproxy 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=Keepproxy makes a Keep cluster accessible to clients that are not on the LAN"
440 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/datamanager"
441 DATAMANAGER_VERSION=$(version_from_git)
442 DATAMANAGER_TIMESTAMP=$(timestamp_from_git)
444 if [[ "$GO_SDK_TIMESTAMP" -gt "$DATAMANAGER_TIMESTAMP" ]]; then
445 PKG_VERSION=$GO_SDK_VERSION
447 PKG_VERSION=$DATAMANAGER_VERSION
450 go get "git.curoverse.com/arvados.git/services/datamanager"
452 build_and_scp_deb $GOPATH/bin/datamanager=/usr/bin/arvados-data-manager arvados-data-manager 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=Datamanager ensures block replication levels, reports on disk usage and determines which blocks should be deleted when space is needed."
455 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/arv-git-httpd"
456 ARVGITHTTPD_VERSION=$(version_from_git)
457 ARVGITHTTPD_TIMESTAMP=$(timestamp_from_git)
459 if [[ "$GO_SDK_TIMESTAMP" -gt "$ARVGITHTTPD_TIMESTAMP" ]]; then
460 PKG_VERSION=$GO_SDK_VERSION
462 PKG_VERSION=$ARVGITHTTPD_VERSION
465 go get "git.curoverse.com/arvados.git/services/arv-git-httpd"
467 build_and_scp_deb $GOPATH/bin/arv-git-httpd=/usr/bin/arvados-git-httpd arvados-git-httpd 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=Provides authenticated http access to Arvados-hosted git repositories."
470 cd "$GOPATH/src/git.curoverse.com/arvados.git/services/crunchstat"
471 PKG_VERSION=$(version_from_git)
472 go get "git.curoverse.com/arvados.git/services/crunchstat"
474 build_and_scp_deb $GOPATH/bin/crunchstat=/usr/bin/crunchstat crunchstat 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=Crunchstat gathers cpu/memory/network statistics of running Crunch jobs"
477 # Please resist the temptation to add --no-python-fix-name to the fpm call here
478 # (which would remove the python- prefix from the package name), because this
479 # package is a dependency of arvados-fuse, and fpm can not omit the python-
480 # prefix from only one of the dependencies of a package... Maybe I could
481 # whip up a patch and send it upstream, but that will be for another day. Ward,
484 # Python version numbering is obscure. Strip dashes and replace them with dots
485 # to match our other version numbers. Cf. commit 4afcb8c, compliance with PEP-440.
486 build_and_scp_deb $WORKSPACE/sdk/python python-arvados-python-client 'Curoverse, Inc.' 'python' "$(awk '($1 == "Version:"){ gsub(/-/,".",$2); print $2 }' $WORKSPACE/sdk/python/arvados_python_client.egg-info/PKG-INFO)" "--url=https://arvados.org" "--description=The Arvados Python SDK"
489 # Please see comment about --no-python-fix-name above; we stay consistent and do
490 # not omit the python- prefix first.
492 # Python version numbering is obscure. Strip dashes and replace them with dots
493 # to match our other version numbers. Cf. commit 4afcb8c, compliance with PEP-440.
494 build_and_scp_deb $WORKSPACE/services/fuse python-arvados-fuse 'Curoverse, Inc.' 'python' "$(awk '($1 == "Version:"){ gsub(/-/,".",$2); print $2 }' $WORKSPACE/services/fuse/arvados_fuse.egg-info/PKG-INFO)" "--url=https://arvados.org" "--description=The Keep FUSE driver"
498 # Python version numbering is obscure. Strip dashes and replace them with dots
499 # to match our other version numbers. Cf. commit 4afcb8c, compliance with PEP-440.
500 build_and_scp_deb $WORKSPACE/services/nodemanager arvados-node-manager 'Curoverse, Inc.' 'python' "$(awk '($1 == "Version:"){ gsub(/-/,".",$2); print $2}' $WORKSPACE/services/nodemanager/arvados_node_manager.egg-info/PKG-INFO)" "--url=https://arvados.org" "--description=The Arvados node manager"
502 # The Docker image cleaner
504 build_and_scp_deb $WORKSPACE/services/dockercleaner arvados-docker-cleaner 'Curoverse, Inc.' 'python3' "$(awk '($1 == "Version:"){print $2}' $WORKSPACE/services/dockercleaner/arvados_docker_cleaner.egg-info/PKG-INFO)" "--url=https://arvados.org" "--description=The Arvados Docker image cleaner"
507 for deppkg in python-gflags pyvcf google-api-python-client oauth2client \
508 pyasn1 pyasn1-modules rsa uritemplate httplib2 ws4py virtualenv \
509 pykka apache-libcloud requests six pyexecjs jsonschema ciso8601 \
510 pycrypto backports.ssl_match_hostname; do
511 build_and_scp_deb "$deppkg"
514 # Python 3 dependencies
515 for deppkg in docker-py six requests; do
516 # The empty string is the vendor argument: these aren't Curoverse software.
517 build_and_scp_deb "$deppkg" "python3-$deppkg" "" python3
520 # Build the API server package
522 cd "$WORKSPACE/services/api"
524 API_VERSION=$(version_from_git)
525 PACKAGE_NAME=arvados-api-server
527 if [[ ! -d "$WORKSPACE/services/api/tmp" ]]; then
528 mkdir $WORKSPACE/services/api/tmp
531 BUNDLE_OUTPUT=`bundle install --path vendor/bundle`
533 if [[ "$DEBUG" != 0 ]]; then
537 /usr/bin/git rev-parse HEAD > git-commit.version
541 # Annoyingly, we require a database.yml file for rake assets:precompile to work. So for now,
542 # we do that in the upgrade script.
543 # TODO: add bogus database.yml file so we can precompile the assets and put them in the
544 # package. Then remove that database.yml file again. It has to be a valid file though.
545 #RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile
547 # This is the complete package with vendor/bundle included.
548 # It's big, so we do not build it by default.
549 if [[ "$BUILD_BUNDLE_PACKAGES" != 0 ]]; then
550 declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "--vendor='Curoverse, Inc.'" "--url='https://arvados.org'" "--description='Arvados API server - Arvados is a free and open source platform for big data science.'" "--license='GNU Affero General Public License, version 3.0'" "-s" "dir" "-t" "deb" "-n" "$PACKAGE_NAME" "-v" "$API_VERSION" "-x" "var/www/arvados-api/current/tmp" "-x" "var/www/arvados-api/current/log" "-x" "var/www/arvados-api/current/vendor/cache/*" "-x" "var/www/arvados-api/current/coverage" "-x" "var/www/arvados-api/current/Capfile*" "-x" "var/www/arvados-api/current/config/deploy*" "--after-install=$RUN_BUILD_PACKAGES_PATH/arvados-api-server-extras/postinst.sh" "$WORKSPACE/services/api/=/var/www/arvados-api/current" "$RUN_BUILD_PACKAGES_PATH/arvados-api-server-extras/arvados-api-server-upgrade.sh=/usr/local/bin/arvados-api-server-upgrade.sh")
552 if [[ "$DEBUG" != 0 ]]; then
554 echo "${COMMAND_ARR[@]}"
558 FPM_RESULTS=$("${COMMAND_ARR[@]}")
560 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
563 # Build the 'bare' package without vendor/bundle.
564 declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "--vendor='Curoverse, Inc.'" "--url='https://arvados.org'" "--description='Arvados API server - Arvados is a free and open source platform for big data science.'" "--license='GNU Affero General Public License, version 3.0'" "-s" "dir" "-t" "deb" "-n" "${PACKAGE_NAME}-bare" "-v" "$API_VERSION" "-x" "var/www/arvados-api/current/tmp" "-x" "var/www/arvados-api/current/log" "-x" "var/www/arvados-api/current/vendor/bundle" "-x" "var/www/arvados-api/current/vendor/cache/*" "-x" "var/www/arvados-api/current/coverage" "-x" "var/www/arvados-api/current/Capfile*" "-x" "var/www/arvados-api/current/config/deploy*" "--after-install=$RUN_BUILD_PACKAGES_PATH/arvados-api-server-extras/postinst.sh" "$WORKSPACE/services/api/=/var/www/arvados-api/current" "$RUN_BUILD_PACKAGES_PATH/arvados-api-server-extras/arvados-api-server-upgrade.sh=/usr/local/bin/arvados-api-server-upgrade.sh")
566 if [[ "$DEBUG" != 0 ]]; then
568 echo "${COMMAND_ARR[@]}"
572 FPM_RESULTS=$("${COMMAND_ARR[@]}")
574 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
576 # API server package build done
578 # Build the workbench server package
580 cd "$WORKSPACE/apps/workbench"
582 WORKBENCH_VERSION=$(version_from_git)
583 PACKAGE_NAME=arvados-workbench
585 if [[ ! -d "$WORKSPACE/apps/workbench/tmp" ]]; then
586 mkdir $WORKSPACE/apps/workbench/tmp
589 BUNDLE_OUTPUT=`bundle install --path vendor/bundle`
591 if [[ "$DEBUG" != 0 ]]; then
595 /usr/bin/git rev-parse HEAD > git-commit.version
597 RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile >/dev/null
601 # This is the complete package with vendor/bundle included.
602 # It's big, so we do not build it by default.
603 if [[ "$BUILD_BUNDLE_PACKAGES" != 0 ]]; then
605 declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "--vendor='Curoverse, Inc.'" "--url='https://arvados.org'" "--description='Arvados Workbench - Arvados is a free and open source platform for big data science.'" "--license='GNU Affero General Public License, version 3.0'" "-s" "dir" "-t" "deb" "-n" "$PACKAGE_NAME" "-v" "$WORKBENCH_VERSION" "-x" "var/www/arvados-workbench/current/tmp" "-x" "var/www/arvados-workbench/current/log" "-x" "var/www/arvados-workbench/current/vendor/cache/*" "-x" "var/www/arvados-workbench/current/coverage" "-x" "var/www/arvados-workbench/current/Capfile*" "-x" "var/www/arvados-workbench/current/config/deploy*" "--after-install=$RUN_BUILD_PACKAGES_PATH/arvados-workbench-extras/postinst.sh" "$WORKSPACE/apps/workbench/=/var/www/arvados-workbench/current" "$RUN_BUILD_PACKAGES_PATH/arvados-workbench-extras/arvados-workbench-upgrade.sh=/usr/local/bin/arvados-workbench-upgrade.sh")
607 if [[ "$DEBUG" != 0 ]]; then
609 echo "${COMMAND_ARR[@]}"
613 FPM_RESULTS=$("${COMMAND_ARR[@]}")
615 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
618 # Build the 'bare' package without vendor/bundle.
620 declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "--vendor='Curoverse, Inc.'" "--url='https://arvados.org'" "--description='Arvados Workbench - Arvados is a free and open source platform for big data science.'" "--license='GNU Affero General Public License, version 3.0'" "-s" "dir" "-t" "deb" "-n" "${PACKAGE_NAME}-bare" "-v" "$WORKBENCH_VERSION" "-x" "var/www/arvados-workbench/current/tmp" "-x" "var/www/arvados-workbench/current/log" "-x" "var/www/arvados-workbench/current/vendor/bundle" "-x" "var/www/arvados-workbench/current/vendor/cache/*" "-x" "var/www/arvados-workbench/current/coverage" "-x" "var/www/arvados-workbench/current/Capfile*" "-x" "var/www/arvados-workbench/current/config/deploy*" "--after-install=$RUN_BUILD_PACKAGES_PATH/arvados-workbench-extras/postinst.sh" "$WORKSPACE/apps/workbench/=/var/www/arvados-workbench/current" "$RUN_BUILD_PACKAGES_PATH/arvados-workbench-extras/arvados-workbench-upgrade.sh=/usr/local/bin/arvados-workbench-upgrade.sh")
622 if [[ "$DEBUG" != 0 ]]; then
624 echo "${COMMAND_ARR[@]}"
628 FPM_RESULTS=$("${COMMAND_ARR[@]}")
630 verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
632 # Workbench package build done
634 # Finally, publish the packages, if necessary
635 if [[ "$UPLOAD" != 0 && "$CALL_FREIGHT" != 0 ]]; then
636 ssh -p2222 $APTUSER@$APTSERVER -t "cd tmp && ls -laF *deb && freight add *deb apt/wheezy && freight cache && rm -f *deb"
638 if [[ "$UPLOAD" != 0 ]]; then
639 echo "No new packages generated. No freight run necessary."
643 # clean up temporary GOPATH