9945: Backwards compatibility fix for libpam-arvados
authorWard Vandewege <wvandewege@veritasgenetics.com>
Mon, 4 Feb 2019 13:36:00 +0000 (08:36 -0500)
committerWard Vandewege <wvandewege@veritasgenetics.com>
Mon, 4 Feb 2019 13:36:00 +0000 (08:36 -0500)
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege@veritasgenetics.com>

build/run-library.sh
sdk/pam/lib/libpam_arvados.py

index 4f7c5b96566db6a8e0801b62ebedf02febc7430b..9df62adee0dd18e751cf680998148162c8b7d5a9 100755 (executable)
@@ -596,6 +596,12 @@ fpm_build_virtualenv () {
     done
   fi
 
+  # the libpam module should place this file in the historically correct place
+  # so as not to break backwards compatibility
+  if [[ -e "$WORKSPACE/$PKG_DIR/dist/build/usr/share/python2.7/dist/libpam-arvados/lib/security/libpam_arvados.py" ]]; then
+    COMMAND_ARR+=("usr/share/$python/dist/$PYTHON_PKG/data/lib/security/libpam_arvados.py=/usr/data/lib/security/")
+  fi
+
   COMMAND_ARR+=(".")
 
   FPM_RESULTS=$("${COMMAND_ARR[@]}")
index 2c0045d6a0d60d9bb71514d3eb2ab0b7a7d3336b..7c3406d30040228e9d5e9a333ee56e9459605eb2 100644 (file)
@@ -2,4 +2,6 @@
 #
 # SPDX-License-Identifier: Apache-2.0
 
+import sys
+sys.path.append('/usr/share/python2.7/dist/libpam-arvados/lib/python2.7/site-packages')
 from arvados_pam import *