$(basename $0): Build Arvados packages and (optionally) upload them.
Syntax:
- $(basename $0) WORKSPACE=/path/to/arvados [options]
+ WORKSPACE=/path/to/arvados $(basename $0) [options]
Options:
exit 1
fi
+# Test for fpm
+fpm --version >/dev/null 2>&1
+
+if [[ "$?" != 0 ]]; then
+ echo >&2 "$helpmessage"
+ echo >&2
+ echo >&2 "Error: fpm not found"
+ echo >&2
+ exit 1
+fi
+
if [[ "$DEBUG" != 0 ]]; then
echo "Workspace is $WORKSPACE"
fi
PACKAGE_TYPE='python'
fi
- declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward@curoverse.com>" "-s" "$PACKAGE_TYPE" "-t" "deb")
+ 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")
if [[ "$PACKAGE_NAME" != "$PACKAGE" ]]; then
COMMAND_ARR+=('-n' "$PACKAGE_NAME")
if [[ "$FPM_PACKAGE_NAME" == "" ]]; then
EXITCODE=1
- echo "Error: Unable to figure out package name from fpm results:"
+ echo "Error: $PACKAGE: Unable to figure out package name from fpm results:"
echo
echo $FPM_RESULTS
echo
# out our git tree here
chmod o+r "$WORKSPACE" -R
+# More cleanup - make sure all executables that we'll package are 755
+find -type d -name 'bin' |xargs -I {} find {} -type f |xargs -I {} chmod 755 {}
+
# Now fix our umask to something better suited to building and publishing
# gems and packages
umask 0022
cd "$WORKSPACE"
-GIT_HASH=`git log --format=format:%ct.%h -n1 .`
+GIT_TIMESTAMP=`git log --first-parent --max-count=1 --format=format:%ct -n1 .`
+HUMAN_READABLE_TIMESTAMP=`TZ=UTC date -d @$GIT_TIMESTAMP +%Y%m%d%H%M%S`
+GIT_HASH=`git log --first-parent --max-count=1 --format=format:$HUMAN_READABLE_TIMESTAMP.%h -n1 .`
cd sdk/python
handle_python_package
# Build arvados src deb package
cd $WORKSPACE/debs
-build_and_scp_deb $WORKSPACE/src-build-dir/=/usr/local/arvados/src arvados-src 'Curoverse, Inc.' 'dir' "0.1.$GIT_HASH" "-x '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"
+build_and_scp_deb $WORKSPACE/src-build-dir/=/usr/local/arvados/src arvados-src 'Curoverse, Inc.' 'dir' "0.1.$GIT_HASH" "--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"
# clean up, check out master and step away from detached-head state
cd "$WORKSPACE/src-build-dir"
build_and_scp_deb $WORKSPACE/services/nodemanager arvados-node-manager 'Curoverse, Inc.' 'python' "$(awk '($1 == "Version:"){print $2}' $WORKSPACE/services/nodemanager/arvados_node_manager.egg-info/PKG-INFO)" "--url=https://arvados.org" "--description=The Arvados node manager"
# A few dependencies
-build_and_scp_deb python-gflags
-build_and_scp_deb pyvcf
-build_and_scp_deb google-api-python-client
-build_and_scp_deb httplib2
-build_and_scp_deb ws4py
-build_and_scp_deb virtualenv
+for deppkg in python-gflags pyvcf google-api-python-client oauth2client \
+ pyasn1 pyasn1-modules rsa uritemplate httplib2 ws4py virtualenv \
+ pykka apache-libcloud requests six; do
+ build_and_scp_deb "$deppkg"
+done
# Finally, publish the packages, if necessary
if [[ "$UPLOAD" != 0 && "$CALL_FREIGHT" != 0 ]]; then