[ARVADOS-DEV] created: 83c4da9b9c08e82d637931b2845574b60fbaf6a9

git at public.curoverse.com git at public.curoverse.com
Mon Aug 10 10:42:04 EDT 2015


        at  83c4da9b9c08e82d637931b2845574b60fbaf6a9 (commit)


commit 83c4da9b9c08e82d637931b2845574b60fbaf6a9
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Aug 10 10:41:00 2015 -0400

    6934: Package libpam-arvados using Python recipe. Read additional fpm args from fpm-info.sh.

diff --git a/jenkins/run-build-packages.sh b/jenkins/run-build-packages.sh
index 1ceecee..923cb18 100755
--- a/jenkins/run-build-packages.sh
+++ b/jenkins/run-build-packages.sh
@@ -311,6 +311,19 @@ fpm_build () {
     COMMAND_ARR+=("$i")
   done
 
+  # Append --depends X and other arguments specified by fpm-info.sh in
+  # the package source dir. These are added last so they can override
+  # the arguments added by this script.
+  declare -a fpm_args=()
+  declare -a fpm_depends=()
+  if [[ -e fpm-info.sh ]]; then
+    source fpm-info.sh
+  fi
+  for i in "${fpm_depends[@]}"; do
+    set -- "$@" --depends "$i"
+  done
+  COMMAND_ARR+=("${fpm_args[@]}")
+
   COMMAND_ARR+=("$PACKAGE")
 
   if [[ "$DEBUG" != 0 ]]; then
@@ -426,6 +439,9 @@ fi
 
 cd "$WORKSPACE"
 
+cd sdk/pam
+handle_python_package
+
 cd sdk/python
 handle_python_package
 
@@ -558,6 +574,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 +609,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

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list