From c18ab4005222f73e5e50684ed1f242d8988baec4 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Mon, 10 Aug 2015 10:41:00 -0400 Subject: [PATCH] 6934: Package libpam-arvados using Python recipe. Add sdk/pam to run-tests. --- jenkins/run-build-packages.sh | 26 ++++++++++---------------- jenkins/run-tests.sh | 10 ++++++++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/jenkins/run-build-packages.sh b/jenkins/run-build-packages.sh index 1ceecee..9dcfd1f 100755 --- a/jenkins/run-build-packages.sh +++ b/jenkins/run-build-packages.sh @@ -424,15 +424,16 @@ if [[ "$DEBUG" != 0 ]]; then echo fi -cd "$WORKSPACE" +cd "$WORKSPACE/sdk/pam" +handle_python_package -cd sdk/python +cd "$WORKSPACE/sdk/python" handle_python_package -cd ../../services/fuse +cd "$WORKSPACE/services/fuse" handle_python_package -cd ../../services/nodemanager +cd "$WORKSPACE/services/nodemanager" handle_python_package # Arvados-src @@ -558,6 +559,11 @@ cd $WORKSPACE/packages/$TARGET rm -rf "$WORKSPACE/sdk/python/build" fpm_build $WORKSPACE/sdk/python "${PYTHON2_PKG_PREFIX}-arvados-python-client" 'Curoverse, Inc.' 'python' "$(awk '($1 == "Version:"){print $2}' $WORKSPACE/sdk/python/arvados_python_client.egg-info/PKG-INFO)" "--url=https://arvados.org" "--description=The Arvados Python SDK" --deb-recommends=git +# The PAM module +cd $WORKSPACE/packages/$TARGET +rm -rf "$WORKSPACE/sdk/pam/build" +fpm_build $WORKSPACE/sdk/pam libpam-arvados 'Curoverse, Inc.' 'python' "$(awk '($1 == "Version:"){print $2}' $WORKSPACE/sdk/pam/arvados_pam.egg-info/PKG-INFO)" "--url=https://arvados.org" "--description=PAM module for authenticating shell logins using Arvados API tokens" + # The FUSE driver # Please see comment about --no-python-fix-name above; we stay consistent and do # not omit the python- prefix first. @@ -588,18 +594,6 @@ for deppkg in "${PYTHON3_BACKPORTS[@]}"; do fpm_build "$deppkg" "$outname" "" python3 done -# libpam-arvados -cd $WORKSPACE/sdk/pam -PKG_VERSION=$(version_from_git) -cd $WORKSPACE/packages/$TARGET - -if [[ "$FORMAT" == "deb" ]]; then - fpm_build $WORKSPACE/sdk/pam/debian/shellinabox=/etc/pam.d/shellinabox libpam-arvados 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--url=https://arvados.org" "--license=Apache License, Version 2.0" "--description=PAM module for Arvados" "--config-files=/etc/default" "-d libpam-python" $WORKSPACE/sdk/pam/arvados_pam.py=/usr/bin/arvados_pam.py $WORKSPACE/sdk/pam/debian/arvados_pam=/etc/default/arvados_pam -#else - # FIXME enable and test once we have the centos pam.d file - #fpm_build $WORKSPACE/sdk/pam/centos/shellinabox=/etc/pam.d/shellinabox libpam-arvados 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--url=https://arvados.org" "--license=Apache License, Version 2.0" "--description=PAM module for Arvados" "--config-files=/etc/default" "-d libpam-python" $WORKSPACE/sdk/pam/arvados_pam.py=/usr/bin/arvados_pam.py $WORKSPACE/sdk/pam/centos/arvados_pam=/etc/default/arvados_pam -fi - # Build the API server package cd "$WORKSPACE/services/api" diff --git a/jenkins/run-tests.sh b/jenkins/run-tests.sh index 7759944..e191b44 100755 --- a/jenkins/run-tests.sh +++ b/jenkins/run-tests.sh @@ -63,6 +63,7 @@ services/keepstore services/nodemanager services/arv-git-httpd sdk/cli +sdk/pam sdk/python sdk/ruby sdk/go/arvadosclient @@ -390,6 +391,10 @@ ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git" \ virtualenv --setuptools "$VENVDIR" || fatal "virtualenv $VENVDIR failed" . "$VENVDIR/bin/activate" +if (pip install setuptools | grep setuptools-0) || [ "$($VENVDIR/bin/easy_install --version | cut -d\ -f2 | cut -d. -f1)" -lt 18 ]; then + pip install --upgrade setuptools +fi + # Note: this must be the last time we change PATH, otherwise rvm will # whine a lot. setup_ruby_environment @@ -506,10 +511,10 @@ do_install() { # the source dist package to avoid a pip bug. # see https://arvados.org/issues/5766 for details. - # Also need to install twice, because if it belives the package is + # Also need to install twice, because if it believes the package is # already installed, pip it won't install it. So the first "pip # install" ensures that the dependencies are met, the second "pip - # install" ensures that we've actually install the local package + # install" ensures that we've actually installed the local package # we just built. cd "$WORKSPACE/$1" \ && "${3}python" setup.py sdist rotate --keep=1 --match .tar.gz \ @@ -585,6 +590,7 @@ do_install sdk/cli cli # keepproxy). declare -a pythonstuff pythonstuff=( + sdk/pam sdk/python services/fuse services/nodemanager -- 2.30.2