15348: Merge branch 'master'
authorTom Clegg <tom@tomclegg.ca>
Wed, 1 Jul 2020 19:01:38 +0000 (15:01 -0400)
committerTom Clegg <tom@tomclegg.ca>
Wed, 1 Jul 2020 19:01:38 +0000 (15:01 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

1  2 
build/run-build-packages.sh
build/run-library.sh

index 1f855a77394294fe343f1200bf79d517662cb3b9,862b93e6e4667ad561c478e13b0f6f53ee2d012f..2d1d0bd19e041017edc473ea6556c81f9f0ed9ab
@@@ -318,8 -318,6 +318,8 @@@ package_go_binary tools/keep-rsync keep
      "Copy all data from one set of Keep servers to another"
  package_go_binary tools/keep-exercise keep-exercise \
      "Performance testing tool for Arvados Keep"
 +package_go_so lib/pam pam_arvados.so libpam-arvados-go \
 +    "Arvados PAM authentication module"
  
  # The Python SDK - Should be built first because it's needed by others
  fpm_build_virtualenv "arvados-python-client" "sdk/python"
@@@ -336,6 -334,9 +336,9 @@@ fpm_build_virtualenv "libpam-arvados" "
  # The FUSE driver
  fpm_build_virtualenv "arvados-fuse" "services/fuse"
  
+ # The FUSE driver - Python3 package
+ fpm_build_virtualenv "arvados-fuse" "services/fuse" "python3"
  # The node manager
  fpm_build_virtualenv "arvados-node-manager" "services/nodemanager"
  
diff --combined build/run-library.sh
index e14458ad99f41d0ff4b2ec3014c79b236e28089c,f8e5129daeb0ce63aba2230c04214ca252bba476..1971a33d0590fdc6e71ba96101adf697db0eb1c0
@@@ -146,7 -146,7 +146,7 @@@ calculate_go_package_version() 
    __returnvar="$version"
  }
  
 -# Usage: package_go_binary services/foo arvados-foo "Compute foo to arbitrary precision"
 +# Usage: package_go_binary services/foo arvados-foo "Compute foo to arbitrary precision" [apache-2.0.txt]
  package_go_binary() {
      local src_path="$1"; shift
      local prog="$1"; shift
      fpm_build "$GOPATH/bin/${basename}=/usr/bin/${prog}" "${prog}" dir "${go_package_version}" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=${description}" "${switches[@]}"
  }
  
 +# Usage: package_go_so lib/foo arvados_foo.so arvados-foo "Arvados foo library"
 +package_go_so() {
 +    local src_path="$1"; shift
 +    local sofile="$1"; shift
 +    local pkg="$1"; shift
 +    local description="$1"; shift
 +
 +    debug_echo "package_go_so $src_path as $pkg"
 +
 +    calculate_go_package_version go_package_version $src_path
 +    cd $WORKSPACE/packages/$TARGET
 +    test_package_presence $pkg $go_package_version go || return 1
 +    cd $WORKSPACE/$src_path
 +    go build -buildmode=c-shared -o ${GOPATH}/bin/${sofile}
 +    cd $WORKSPACE/packages/$TARGET
 +    local -a fpmargs=(
 +        "--url=https://arvados.org"
 +        "--license=Apache License, Version 2.0"
 +        "--description=${description}"
 +        "$WORKSPACE/apache-2.0.txt=/usr/share/doc/$pkg/apache-2.0.txt"
 +    )
 +    if [[ -e "$WORKSPACE/$src_path/pam-configs-arvados" ]]; then
 +        fpmargs+=("$WORKSPACE/$src_path/pam-configs-arvados=/usr/share/pam-configs/arvados-go")
 +    fi
 +    fpm_build "$GOPATH/bin/${sofile}=/usr/lib/${sofile}" "${pkg}" dir "${go_package_version}" "${fpmargs[@]}"
 +}
 +
  default_iteration() {
      if [[ -n "$ARVADOS_BUILDING_VERSION" ]]; then
          echo "$ARVADOS_BUILDING_ITERATION"
@@@ -601,7 -574,7 +601,7 @@@ fpm_build_virtualenv () 
    cd build/usr/share/$python/dist/$PYTHON_PKG/
  
    # Replace the shebang lines in all python scripts, and handle the activate
-   # scripts too This is a functional replacement of the 237 line
+   # scripts too. This is a functional replacement of the 237 line
    # virtualenv_tools.py script that doesn't work in python3 without serious
    # patching, minus the parts we don't need (modifying pyc files, etc).
    for binfile in `ls bin/`; do
      COMMAND_ARR+=('--rpm-auto-add-directories')
    fi
  
-   if [[ "$PKG" == "arvados-python-client" ]]; then
+   if [[ "$PKG" == "arvados-python-client" ]] || [[ "$PKG" == "arvados-fuse" ]]; then
      if [[ "$python" == "python2.7" ]]; then
        COMMAND_ARR+=('--conflicts' "$PYTHON3_PKG_PREFIX-$PKG")
      else