[ARVADOS] updated: 1.1.3-346-ga2e8e31

Git user git at public.curoverse.com
Mon Apr 2 10:02:56 EDT 2018


Summary of changes:
 .../pipeline_instances/_running_component.html.erb |   4 +-
 .../views/work_units/_component_detail.html.erb    |   2 +-
 .../test/integration/anonymous_access_test.rb      |   6 +-
 build/run-build-packages-one-target.sh             |  17 ++-
 doc/install/install-sso.html.textile.liquid        |   6 +-
 doc/sdk/python/cookbook.html.textile.liquid        |  42 +++++++
 doc/user/cwl/cwl-extensions.html.textile.liquid    |   2 +-
 sdk/cwl/arvados_cwl/arvcontainer.py                |  13 ++-
 sdk/cwl/setup.py                                   |   2 +-
 sdk/go/arvados/keep_service.go                     |  34 +++++-
 sdk/python/arvados/collection.py                   |   6 +
 services/api/app/models/arvados_model.rb           |   6 +-
 services/api/app/models/container.rb               |  34 +++---
 services/api/app/models/container_request.rb       |   5 +-
 services/api/lib/arvados_model_updates.rb          |  21 ++++
 services/api/lib/current_api_client.rb             |   6 -
 services/api/test/unit/container_request_test.rb   |   6 +
 services/keep-balance/balance.go                   | 108 +++++++++++++----
 services/keep-balance/balance_run_test.go          | 128 ++++++++++++++++++---
 services/keep-balance/balance_test.go              |  48 +++++++-
 services/keep-balance/block_state.go               |  12 +-
 services/keep-balance/keep_service.go              |  26 +++++
 services/keepstore/azure_blob_volume.go            |   2 +-
 services/keepstore/handlers.go                     |   4 +-
 services/keepstore/mounts_test.go                  |  10 +-
 services/keepstore/pull_worker_test.go             |   2 +-
 services/keepstore/volume.go                       |  24 ++--
 services/nodemanager/arvnodeman/daemon.py          |   5 +-
 services/nodemanager/arvnodeman/jobqueue.py        |  13 ++-
 services/nodemanager/tests/integration_test.py     |  84 ++++++++++----
 services/nodemanager/tests/test_daemon.py          |  23 +++-
 services/nodemanager/tests/test_jobqueue.py        |  12 +-
 32 files changed, 568 insertions(+), 145 deletions(-)
 create mode 100644 services/api/lib/arvados_model_updates.rb

       via  a2e8e31c8dc76ba772dca48e940960e084f7dc15 (commit)
       via  0381484cce9877c31231f92daa74ae971e43ba2f (commit)
       via  e9b4a6fc35b469794d0f6a080254006187501f66 (commit)
       via  595606c78208fe8a783299091108b48ebccfc1c7 (commit)
       via  2dbd8ea3bc22f8f0eecf4bbe752d0bec8bf88726 (commit)
       via  d506c0c47b3bee53d89fcbb9d3b933d4b3aee39a (commit)
       via  24f9bc348608393ec88d5632e3b4a627420dcba1 (commit)
       via  758a38ee0a652f2e8ca8bee94f0e182767bf499b (commit)
       via  dcb35293cb12d0fbcae5fd3f95026b3dc7713ab0 (commit)
       via  e64ab2bb55a6c547956c83907e72dda349cdc5e9 (commit)
       via  37cfe352d0522015759b66ab552a964d74a76914 (commit)
       via  3ada9e786796ae8861c375a1cc389e2a8873cd45 (commit)
       via  73d6064c3816d2d569ae47cd5609e5dfdfe235a1 (commit)
       via  e8a24e57d286b4db22903762ebd888dc63d32206 (commit)
       via  1a6777657c96a1a23678d9ec41e7d02ace55e5e8 (commit)
       via  7a38d6b19120b3284533196ff3c94c2043826aef (commit)
       via  ab052248e5637d7d0a3ad8636dfd1b674a2ccc45 (commit)
       via  0d5d9ba7fecfb5842930f27d9c450b33a8b4f153 (commit)
       via  c6ad0a2440f5e8f8361eeed07d0048c3d38c651b (commit)
       via  0cbae7c90cb9298d930e8a0f001764df729fec86 (commit)
       via  2f6a83dba97c5dbcbb3b077deafaa08797293edb (commit)
       via  56b434f7e4ca8ceae70b4b75ce4e01f254fcd550 (commit)
       via  acecc56abbd717bd05bf4a6544a677f4b5a8fc9b (commit)
       via  8e66062845cb567092de48edf9b2faaf1a4e2ae3 (commit)
       via  0f2d5848629c68d8f59f140d4879d7172536dcb8 (commit)
       via  5bac1f802ff40c4e82542a4fac49086fcc86e135 (commit)
       via  d73d6a3db684ad46eecd98fa8208594142ebdc2c (commit)
       via  1c2372c62c11f6de9d452483e79dc15aaecc0578 (commit)
       via  fd8c6aa9f8e8588fca348d8ae5b9422dfb0ab7fb (commit)
       via  c9283683ff2e2dc3c52b4bc48b1d13d8dd1c9674 (commit)
       via  9ca97ebf3f28fb88559a994daf222f629ad9d0aa (commit)
       via  fdaaf4f5b58406b10167714b57affe0905e3216b (commit)
       via  04319cbe8d3e8c858bb6d93037e09d3af4271c42 (commit)
       via  4998ea2c5a8b2bf9066de8c454d5fb990ff9cba6 (commit)
       via  d41ae3025fe6a06317aa8806bdc1913d994b4014 (commit)
       via  71d59d43760dcacb0e6f56ec77f693b93f9e875d (commit)
       via  0192a6a19302bbe469264319429c5f50322b1233 (commit)
       via  5667012a090b6c561cdf0f84554d4673b2020954 (commit)
       via  198a3409881f5b9f1fe77ae551efde1968bfb639 (commit)
       via  45d780e20c41181c33562f99262bcf1f507f5a6a (commit)
       via  368191c0f0f7c094a6ba7619dcf5e572a3f84f79 (commit)
       via  54ef4b36d1fa48960a87f527c5dd69101486d908 (commit)
       via  2b1a65816ab15bac35f260aa65f979d17e37323e (commit)
       via  a2e3be11c517402346702f8d4e3d2e851fec7b46 (commit)
       via  1ea42486b1badd6ebd1a0071f3dd7bc1ec41b920 (commit)
       via  ac74647ec063c81654f0d4ec368a3e6bd74484a6 (commit)
       via  2baac8a6702551064b065f752f75a9b40dbec0f5 (commit)
       via  378eeb13b1c4d188d07bde0abfe3955ad53d4beb (commit)
       via  98fb00994467e805f764d799e78420ecac9c0879 (commit)
       via  7a104e46ce7ebe905500824affa15c380fc5f2c5 (commit)
       via  f1ee0cb2f85c4ea988700da2e3957565b6861ad5 (commit)
       via  b17321254d9bdfb0939d3705b4b110d7df75afe2 (commit)
       via  66aaa7d715eedd38265ee0987ef2a5cf7b623fd9 (commit)
       via  9e92ae4c7fb2ca196b1dd9bc96e2944f1c8f8f8e (commit)
       via  f728be219a1a3cd2cc65f52c3160d76d17a96656 (commit)
       via  a15ab44d2b2dad42a32dc0179ccdd686586893f3 (commit)
       via  f94fdceb54ce870be790b7830756d8c04ba2e26e (commit)
       via  d85b7e29a4b7304e746ae2511b64473d88efc6e5 (commit)
       via  9059fc9d13db73bde93b589955a941af44b4447d (commit)
       via  d63d7dc79ed74beaaceda15ca88344de12258da3 (commit)
       via  50542359e38f9963ff6864c919e94edb286d69d8 (commit)
       via  1d5934b254afc9e6082a154b5c365df968b3a65f (commit)
       via  b60d064e281243088d3dd63fcb99478344b2a8de (commit)
       via  9b53c7be9d77f2175944e80f0daf701f32fc3e1f (commit)
       via  25b62d2b7ba5273928ee98085fa2f4674caa67e6 (commit)
       via  cfc90c7c90afe0e953aaf1ec0a4ebf539898d8f5 (commit)
       via  44426069373d8657706d796f37618b9d7f6eca59 (commit)
       via  41e612b59ad85ee7f22ebf3239ec8ff1cbb463c5 (commit)
       via  8e96f8cacd728b1a1b4316ecb2fb7cd233a97144 (commit)
       via  741acb186f89237011fd7bf371218246d7f85403 (commit)
       via  61f4a861fb993f68240d884c3e9cc1e750d0753b (commit)
       via  388c54e21fafcfbf01e0fe6775a6b62134605990 (commit)
       via  93d9c63e1fd4d4c268aa9050406b9a212f3d4a22 (commit)
       via  9746d8b3d8c259836799656ff6e5f401d9d4d492 (commit)
       via  2dd214985e9727bf0b5fbf11b0e39c3e7d3cc5c4 (commit)
      from  686f304bb48d22336e80111a2e65ffd425bcf453 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit a2e8e31c8dc76ba772dca48e940960e084f7dc15
Merge: 0381484 686f304
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Mon Apr 2 11:02:01 2018 -0300

    Merge branch '13200-new-package-versioning-jb' of git.curoverse.com:arvados into 13200-new-package-versioning-jb
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>


commit 0381484cce9877c31231f92daa74ae971e43ba2f
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Wed Mar 28 14:56:09 2018 -0300

    13200: remove verbose bash on run-build-packages.sh
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index a302997..497545d 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -x 
+#!/bin/bash
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0

commit e9b4a6fc35b469794d0f6a080254006187501f66
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Wed Mar 28 11:35:33 2018 -0300

    13200: remove verbose bash on build packages
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-build-test-packages-one-target.sh b/build/run-build-test-packages-one-target.sh
index 744b583..7bdaaca 100755
--- a/build/run-build-test-packages-one-target.sh
+++ b/build/run-build-test-packages-one-target.sh
@@ -115,6 +115,7 @@ if [[ "$UPLOAD" != 0 ]]; then
   timer_reset
 
   if [ ${#failures[@]} -eq 0 ]; then
+    echo "/usr/local/arvados-dev/jenkins/run_upload_packages.py -H jenkinsapt at apt.arvados.org -o Port=2222 --workspace $WORKSPACE $TARGET"
     /usr/local/arvados-dev/jenkins/run_upload_packages.py -H jenkinsapt at apt.arvados.org -o Port=2222 --workspace $WORKSPACE $TARGET
   else
     echo "Skipping package upload, there were errors building and/or testing the packages"

commit 595606c78208fe8a783299091108b48ebccfc1c7
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Mon Mar 26 11:54:12 2018 -0300

    13200: Fix format gitinfo on all the services
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/services/nodemanager/arvados_version.py b/services/nodemanager/arvados_version.py
new file mode 100644
index 0000000..db46417
--- /dev/null
+++ b/services/nodemanager/arvados_version.py
@@ -0,0 +1,20 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import subprocess
+import time
+
+class VersionInfoFromGit():
+    """Return arvados version from git
+    """
+    def git_latest_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'describe', '--abbrev=0']).strip()
+        return str(gitinfo.decode('utf-8'))
+
+    def git_timestamp_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'log', '--first-parent', '--max-count=1',
+             '--format=format:%ct', '.']).strip()
+        return str(time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo))))
diff --git a/services/nodemanager/setup.py b/services/nodemanager/setup.py
index 454c24e..9ae1135 100644
--- a/services/nodemanager/setup.py
+++ b/services/nodemanager/setup.py
@@ -15,13 +15,14 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "0.1"
     try:
-        import gittaggers
-        tagger = gittaggers.EggInfoFromGit
+        import arvados_version
+        vtag = arvados_version.VersionInfoFromGit()
+        version = vtag.git_latest_tag() + vtag.git_timestamp_tag()
     except ImportError:
         pass
 
+
 setup(name='arvados-node-manager',
       version=version,
       description='Arvados compute node manager',
diff --git a/tools/crunchstat-summary/arvados_version.py b/tools/crunchstat-summary/arvados_version.py
new file mode 100644
index 0000000..db46417
--- /dev/null
+++ b/tools/crunchstat-summary/arvados_version.py
@@ -0,0 +1,20 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import subprocess
+import time
+
+class VersionInfoFromGit():
+    """Return arvados version from git
+    """
+    def git_latest_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'describe', '--abbrev=0']).strip()
+        return str(gitinfo.decode('utf-8'))
+
+    def git_timestamp_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'log', '--first-parent', '--max-count=1',
+             '--format=format:%ct', '.']).strip()
+        return str(time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo))))
diff --git a/tools/crunchstat-summary/setup.py b/tools/crunchstat-summary/setup.py
index ce1467b..0965fae 100755
--- a/tools/crunchstat-summary/setup.py
+++ b/tools/crunchstat-summary/setup.py
@@ -14,13 +14,14 @@ SETUP_DIR = os.path.dirname(__file__) or '.'
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "0.1"
     try:
-        import gittaggers
-        tagger = gittaggers.EggInfoFromGit
+        import arvados_version
+        vtag = arvados_version.VersionInfoFromGit()
+        version = vtag.git_latest_tag() + vtag.git_timestamp_tag()
     except ImportError:
         pass
 
+
 setup(name='crunchstat_summary',
       version=version,
       description='read crunch log files and summarize resource usage',

commit 2dbd8ea3bc22f8f0eecf4bbe752d0bec8bf88726
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Mon Mar 26 11:37:43 2018 -0300

    13200: format gitinfo on all the services
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 77ea465..fb4df6a 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/bash
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0
diff --git a/services/dockercleaner/arvados_version.py b/services/dockercleaner/arvados_version.py
new file mode 100644
index 0000000..db46417
--- /dev/null
+++ b/services/dockercleaner/arvados_version.py
@@ -0,0 +1,20 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import subprocess
+import time
+
+class VersionInfoFromGit():
+    """Return arvados version from git
+    """
+    def git_latest_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'describe', '--abbrev=0']).strip()
+        return str(gitinfo.decode('utf-8'))
+
+    def git_timestamp_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'log', '--first-parent', '--max-count=1',
+             '--format=format:%ct', '.']).strip()
+        return str(time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo))))
diff --git a/services/dockercleaner/setup.py b/services/dockercleaner/setup.py
index 6a6a96a..b287bd0 100644
--- a/services/dockercleaner/setup.py
+++ b/services/dockercleaner/setup.py
@@ -12,10 +12,10 @@ from setuptools import setup, find_packages
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "0.1"
     try:
-        import gittaggers
-        tagger = gittaggers.EggInfoFromGit
+        import arvados_version
+        vtag = arvados_version.VersionInfoFromGit()
+        version = vtag.git_latest_tag() + vtag.git_timestamp_tag()
     except ImportError:
         pass
 
diff --git a/services/fuse/arvados_version.py b/services/fuse/arvados_version.py
new file mode 100644
index 0000000..db46417
--- /dev/null
+++ b/services/fuse/arvados_version.py
@@ -0,0 +1,20 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import subprocess
+import time
+
+class VersionInfoFromGit():
+    """Return arvados version from git
+    """
+    def git_latest_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'describe', '--abbrev=0']).strip()
+        return str(gitinfo.decode('utf-8'))
+
+    def git_timestamp_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'log', '--first-parent', '--max-count=1',
+             '--format=format:%ct', '.']).strip()
+        return str(time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo))))
diff --git a/services/fuse/setup.py b/services/fuse/setup.py
index 2358eb9..8bc1131 100644
--- a/services/fuse/setup.py
+++ b/services/fuse/setup.py
@@ -15,13 +15,13 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "0.1"
     try:
-        import gittaggers
-        tagger = gittaggers.EggInfoFromGit
+        import arvados_version
+        vtag = arvados_version.VersionInfoFromGit()
+        version = vtag.git_latest_tag() + vtag.git_timestamp_tag()
     except ImportError:
         pass
-
+        
 short_tests_only = False
 if '--short-tests-only' in sys.argv:
     short_tests_only = True

commit d506c0c47b3bee53d89fcbb9d3b933d4b3aee39a
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Mon Mar 26 10:44:11 2018 -0300

    13200: format gitinfo on all the services
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/sdk/cwl/arvados_version.py b/sdk/cwl/arvados_version.py
new file mode 100644
index 0000000..db46417
--- /dev/null
+++ b/sdk/cwl/arvados_version.py
@@ -0,0 +1,20 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import subprocess
+import time
+
+class VersionInfoFromGit():
+    """Return arvados version from git
+    """
+    def git_latest_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'describe', '--abbrev=0']).strip()
+        return str(gitinfo.decode('utf-8'))
+
+    def git_timestamp_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'log', '--first-parent', '--max-count=1',
+             '--format=format:%ct', '.']).strip()
+        return str(time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo))))
diff --git a/sdk/cwl/gittaggers.py b/sdk/cwl/gittaggers.py
index 40f6e6c..8ccb664 100644
--- a/sdk/cwl/gittaggers.py
+++ b/sdk/cwl/gittaggers.py
@@ -31,7 +31,7 @@ class EggInfoFromGit(egg_info):
     def git_latest_tag(self):
         gitinfo = subprocess.check_output(
             ['git', 'describe', '--abbrev=0']).strip()
-        return str(gitinfo)
+        return str(gitinfo.decode('utf-8'))
 
     def git_timestamp_tag(self):
         gitinfo = subprocess.check_output(
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index 0e9ee94..d1df898 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -16,10 +16,10 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "1.0"
     try:
-        import gittaggers
-        tagger = gittaggers.EggInfoFromGit
+        import arvados_version
+        vtag = arvados_version.VersionInfoFromGit()
+        version = vtag.git_latest_tag() + vtag.git_timestamp_tag()
     except ImportError:
         pass
 
diff --git a/sdk/python/gittaggers.py b/sdk/python/gittaggers.py
index 4e848ed..ccf25c4 100644
--- a/sdk/python/gittaggers.py
+++ b/sdk/python/gittaggers.py
@@ -15,7 +15,7 @@ class EggInfoFromGit(egg_info):
     def git_latest_tag(self):
         gitinfo = subprocess.check_output(
             ['git', 'describe', '--abbrev=0']).strip()
-        return str(gitinfo)
+        return str(gitinfo.decode('utf-8'))
 
     def git_timestamp_tag(self):
         gitinfo = subprocess.check_output(

commit 24f9bc348608393ec88d5632e3b4a627420dcba1
Author: Javier Bértoli <jbertoli at veritasgenetics.com>
Date:   Fri Mar 23 18:50:23 2018 -0300

    Trying some str formatting
    
    refs #13200
    Arvados-DCO-1.1-Signed-off-by: Javier Bértoli <jbertoli at veritasgenetics.com>

diff --git a/sdk/python/arvados_version.py b/sdk/python/arvados_version.py
index 1d55981..db46417 100644
--- a/sdk/python/arvados_version.py
+++ b/sdk/python/arvados_version.py
@@ -11,7 +11,7 @@ class VersionInfoFromGit():
     def git_latest_tag(self):
         gitinfo = subprocess.check_output(
             ['git', 'describe', '--abbrev=0']).strip()
-        return str(gitinfo)
+        return str(gitinfo.decode('utf-8'))
 
     def git_timestamp_tag(self):
         gitinfo = subprocess.check_output(
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 1695159..1adc19f 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -18,7 +18,7 @@ if not version:
     try:
         import arvados_version
         vtag = arvados_version.VersionInfoFromGit()
-        version = str(vtag.git_latest_tag() + vtag.git_timestamp_tag())
+        version = vtag.git_latest_tag() + vtag.git_timestamp_tag()
     except ImportError:
         pass
 

commit 758a38ee0a652f2e8ca8bee94f0e182767bf499b
Author: Javier Bértoli <jbertoli at veritasgenetics.com>
Date:   Fri Mar 23 18:39:14 2018 -0300

    Trying some str formatting
    
    refs #13200
    Arvados-DCO-1.1-Signed-off-by: Javier Bértoli <jbertoli at veritasgenetics.com>

diff --git a/sdk/python/arvados_version.py b/sdk/python/arvados_version.py
index bc8ce73..1d55981 100644
--- a/sdk/python/arvados_version.py
+++ b/sdk/python/arvados_version.py
@@ -17,4 +17,4 @@ class VersionInfoFromGit():
         gitinfo = subprocess.check_output(
             ['git', 'log', '--first-parent', '--max-count=1',
              '--format=format:%ct', '.']).strip()
-        return time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo)))
+        return str(time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo))))
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 1adc19f..1695159 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -18,7 +18,7 @@ if not version:
     try:
         import arvados_version
         vtag = arvados_version.VersionInfoFromGit()
-        version = vtag.git_latest_tag() + vtag.git_timestamp_tag()
+        version = str(vtag.git_latest_tag() + vtag.git_timestamp_tag())
     except ImportError:
         pass
 

commit dcb35293cb12d0fbcae5fd3f95026b3dc7713ab0
Author: Javier Bértoli <jbertoli at veritasgenetics.com>
Date:   Fri Mar 23 17:02:57 2018 -0300

    Add functions to return the python version for packaging
    
    refs #13200
    Arvados-DCO-1.1-Signed-off-by: Javier Bértoli <jbertoli at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 238d6d6..77ea465 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -277,7 +277,7 @@ test_package_presence() {
         fi
 
         repo_pkg_list=$(curl -o - http://apt.arvados.org/pool/${D}/main/${repo_subdir}/)
-        echo ${repo_pkg_list} |grep -q ${pkgname}
+        echo ${repo_pkg_list} |grep -q ${complete_pkgname}
         if [ $? -eq 0 ]; then
           echo "Package $complete_pkgname exists, not rebuilding!"
           curl -o ./${complete_pkgname} http://apt.arvados.org/pool/${D}/main/${repo_subdir}/${complete_pkgname}
diff --git a/sdk/python/arvados_version.py b/sdk/python/arvados_version.py
new file mode 100644
index 0000000..bc8ce73
--- /dev/null
+++ b/sdk/python/arvados_version.py
@@ -0,0 +1,20 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import subprocess
+import time
+
+class VersionInfoFromGit():
+    """Return arvados version from git
+    """
+    def git_latest_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'describe', '--abbrev=0']).strip()
+        return str(gitinfo)
+
+    def git_timestamp_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'log', '--first-parent', '--max-count=1',
+             '--format=format:%ct', '.']).strip()
+        return time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo)))
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 88bf51e..1adc19f 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -15,10 +15,10 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "0.1"
     try:
-        import gittaggers
-        tagger = gittaggers.EggInfoFromGit
+        import arvados_version
+        vtag = arvados_version.VersionInfoFromGit()
+        version = vtag.git_latest_tag() + vtag.git_timestamp_tag()
     except ImportError:
         pass
 

commit e64ab2bb55a6c547956c83907e72dda349cdc5e9
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 23 16:54:08 2018 -0300

    13200:rollback tests
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index dbcef20..a302997 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -385,7 +385,7 @@ package_go_binary tools/keep-exercise keep-exercise \
 # 2014-05-15
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/sdk/python/build"
-arvados_python_client_version="$ARVADOS_BUILDING_VERSION"
+arvados_python_client_version=${ARVADOS_BUILDING_VERSION:-$(awk '($1 == "Version:"){print $2}' $WORKSPACE/sdk/python/arvados_python_client.egg-info/PKG-INFO)}
 test_package_presence ${PYTHON2_PKG_PREFIX}-arvados-python-client "$arvados_python_client_version" python
 if [[ "$?" == "0" ]]; then
   fpm_build $WORKSPACE/sdk/python "${PYTHON2_PKG_PREFIX}-arvados-python-client" 'Curoverse, Inc.' 'python' "$arvados_python_client_version" "--url=https://arvados.org" "--description=The Arvados Python SDK" --depends "${PYTHON2_PKG_PREFIX}-setuptools" --deb-recommends=git
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 999d771..88bf51e 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -15,6 +15,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
+    version = "0.1"
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit

commit 37cfe352d0522015759b66ab552a964d74a76914
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 23 16:49:06 2018 -0300

    13200:test update on version in gittaggers on sdk python
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index a302997..dbcef20 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -385,7 +385,7 @@ package_go_binary tools/keep-exercise keep-exercise \
 # 2014-05-15
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/sdk/python/build"
-arvados_python_client_version=${ARVADOS_BUILDING_VERSION:-$(awk '($1 == "Version:"){print $2}' $WORKSPACE/sdk/python/arvados_python_client.egg-info/PKG-INFO)}
+arvados_python_client_version="$ARVADOS_BUILDING_VERSION"
 test_package_presence ${PYTHON2_PKG_PREFIX}-arvados-python-client "$arvados_python_client_version" python
 if [[ "$?" == "0" ]]; then
   fpm_build $WORKSPACE/sdk/python "${PYTHON2_PKG_PREFIX}-arvados-python-client" 'Curoverse, Inc.' 'python' "$arvados_python_client_version" "--url=https://arvados.org" "--description=The Arvados Python SDK" --depends "${PYTHON2_PKG_PREFIX}-setuptools" --deb-recommends=git

commit 3ada9e786796ae8861c375a1cc389e2a8873cd45
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 23 16:45:20 2018 -0300

    13200:test update on version in gittaggers on sdk python
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 2c9021d..999d771 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -14,17 +14,13 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
-
-tagger = gittaggers.EggInfoFromGit
 if not version:
     try:
         import gittaggers
-        vtag = gittaggers.EggInfoFromGit
-        version = vtag.git_latest_tag()+vtag.git_timestamp_tag()
+        tagger = gittaggers.EggInfoFromGit
     except ImportError:
         pass
 
-
 short_tests_only = False
 if '--short-tests-only' in sys.argv:
     short_tests_only = True

commit 73d6064c3816d2d569ae47cd5609e5dfdfe235a1
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 23 16:11:42 2018 -0300

    13200:test update on version in gittaggers on sdk python
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 0c143a1..2c9021d 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -13,7 +13,9 @@ SETUP_DIR = os.path.dirname(__file__) or '.'
 README = os.path.join(SETUP_DIR, 'README.rst')
 
 tagger = egg_info_cmd.egg_info
+version = os.environ.get("ARVADOS_BUILDING_VERSION")
 
+tagger = gittaggers.EggInfoFromGit
 if not version:
     try:
         import gittaggers
@@ -22,6 +24,7 @@ if not version:
     except ImportError:
         pass
 
+
 short_tests_only = False
 if '--short-tests-only' in sys.argv:
     short_tests_only = True

commit e8a24e57d286b4db22903762ebd888dc63d32206
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 23 15:41:02 2018 -0300

    13200:test update on version in gittaggers on sdk python
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/go-python-package-scripts/postinst b/build/go-python-package-scripts/postinst
index cc63f35..6d303f2 100755
--- a/build/go-python-package-scripts/postinst
+++ b/build/go-python-package-scripts/postinst
@@ -9,6 +9,7 @@ if [ "%{name}" != "%\{name\}" ]; then
     # Red Hat ("%{...}" is interpolated at package build time)
     pkg="%{name}"
     pkgtype=rpm
+    prefix="${RPM_INSTALL_PREFIX}"
 else
     # Debian
     script="$(basename "${0}")"
diff --git a/build/go-python-package-scripts/prerm b/build/go-python-package-scripts/prerm
index 49bd7fc..d840ee1 100755
--- a/build/go-python-package-scripts/prerm
+++ b/build/go-python-package-scripts/prerm
@@ -9,6 +9,7 @@ if [ "%{name}" != "%\{name\}" ]; then
     # Red Hat ("%{...}" is interpolated at package build time)
     pkg="%{name}"
     pkgtype=rpm
+    prefix="${RPM_INSTALL_PREFIX}"
 else
     # Debian
     script="$(basename "${0}")"
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 88bf51e..0c143a1 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -13,12 +13,12 @@ SETUP_DIR = os.path.dirname(__file__) or '.'
 README = os.path.join(SETUP_DIR, 'README.rst')
 
 tagger = egg_info_cmd.egg_info
-version = os.environ.get("ARVADOS_BUILDING_VERSION")
+
 if not version:
-    version = "0.1"
     try:
         import gittaggers
-        tagger = gittaggers.EggInfoFromGit
+        vtag = gittaggers.EggInfoFromGit
+        version = vtag.git_latest_tag()+vtag.git_timestamp_tag()
     except ImportError:
         pass
 

commit 1a6777657c96a1a23678d9ec41e7d02ace55e5e8
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 23 13:58:33 2018 -0300

    13200:test to remove prefix on python
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/go-python-package-scripts/postinst b/build/go-python-package-scripts/postinst
index 6d303f2..cc63f35 100755
--- a/build/go-python-package-scripts/postinst
+++ b/build/go-python-package-scripts/postinst
@@ -9,7 +9,6 @@ if [ "%{name}" != "%\{name\}" ]; then
     # Red Hat ("%{...}" is interpolated at package build time)
     pkg="%{name}"
     pkgtype=rpm
-    prefix="${RPM_INSTALL_PREFIX}"
 else
     # Debian
     script="$(basename "${0}")"
diff --git a/build/go-python-package-scripts/prerm b/build/go-python-package-scripts/prerm
index d840ee1..49bd7fc 100755
--- a/build/go-python-package-scripts/prerm
+++ b/build/go-python-package-scripts/prerm
@@ -9,7 +9,6 @@ if [ "%{name}" != "%\{name\}" ]; then
     # Red Hat ("%{...}" is interpolated at package build time)
     pkg="%{name}"
     pkgtype=rpm
-    prefix="${RPM_INSTALL_PREFIX}"
 else
     # Debian
     script="$(basename "${0}")"
diff --git a/build/run-library.sh b/build/run-library.sh
index 2e441e4..238d6d6 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -50,7 +50,7 @@ version_from_git() {
         return
     fi
 
-    local git_ts git_hash
+    local git_ts git_hash prefix
     if [[ -n "$1" ]] ; then
         prefix="$1"
     else
@@ -391,6 +391,8 @@ fpm_build () {
           python=python2.7
           set -- "$@" --python-bin python2.7 \
               --python-easyinstall "$EASY_INSTALL2" \
+              --python-package-name-prefix "$PYTHON2_PKG_PREFIX" \
+              --prefix "$PYTHON2_PREFIX" \
               --python-install-lib "$PYTHON2_INSTALL_LIB" \
               --python-install-data . \
               --exclude "${PYTHON2_INSTALL_LIB#/}/tests" \
@@ -405,6 +407,8 @@ fpm_build () {
           python=python3
           set -- "$@" --python-bin python3 \
               --python-easyinstall "$EASY_INSTALL3" \
+              --python-package-name-prefix "$PYTHON3_PKG_PREFIX" \
+              --prefix "$PYTHON3_PREFIX" \
               --python-install-lib "$PYTHON3_INSTALL_LIB" \
               --python-install-data . \
               --exclude "${PYTHON3_INSTALL_LIB#/}/tests" \

commit 7a38d6b19120b3284533196ff3c94c2043826aef
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 23 13:48:30 2018 -0300

    13200:test to remove prefix on python
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 677695c..2e441e4 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -391,8 +391,6 @@ fpm_build () {
           python=python2.7
           set -- "$@" --python-bin python2.7 \
               --python-easyinstall "$EASY_INSTALL2" \
-              --python-package-name-prefix "$PYTHON2_PKG_PREFIX" \
-              --prefix "$PYTHON2_PREFIX" \
               --python-install-lib "$PYTHON2_INSTALL_LIB" \
               --python-install-data . \
               --exclude "${PYTHON2_INSTALL_LIB#/}/tests" \
@@ -407,8 +405,6 @@ fpm_build () {
           python=python3
           set -- "$@" --python-bin python3 \
               --python-easyinstall "$EASY_INSTALL3" \
-              --python-package-name-prefix "$PYTHON3_PKG_PREFIX" \
-              --prefix "$PYTHON3_PREFIX" \
               --python-install-lib "$PYTHON3_INSTALL_LIB" \
               --python-install-data . \
               --exclude "${PYTHON3_INSTALL_LIB#/}/tests" \

commit ab052248e5637d7d0a3ad8636dfd1b674a2ccc45
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 23 13:22:44 2018 -0300

    13200:test to remove prefix on python
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 238d6d6..677695c 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -50,7 +50,7 @@ version_from_git() {
         return
     fi
 
-    local git_ts git_hash prefix
+    local git_ts git_hash
     if [[ -n "$1" ]] ; then
         prefix="$1"
     else
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index d9dd970..0e9ee94 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -16,7 +16,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = ""
+    version = "1.0"
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 5804517..88bf51e 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -15,7 +15,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = ""
+    version = "0.1"
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit
diff --git a/services/dockercleaner/setup.py b/services/dockercleaner/setup.py
index 1506c20..6a6a96a 100644
--- a/services/dockercleaner/setup.py
+++ b/services/dockercleaner/setup.py
@@ -12,7 +12,7 @@ from setuptools import setup, find_packages
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = ""
+    version = "0.1"
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit
diff --git a/services/nodemanager/setup.py b/services/nodemanager/setup.py
index 437e95e..454c24e 100644
--- a/services/nodemanager/setup.py
+++ b/services/nodemanager/setup.py
@@ -15,7 +15,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = ""
+    version = "0.1"
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit

commit 0d5d9ba7fecfb5842930f27d9c450b33a8b4f153
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 23 11:50:48 2018 -0300

    13200:test to remove adding 01 to python packages
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index 0e9ee94..d9dd970 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -16,7 +16,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "1.0"
+    version = ""
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 88bf51e..5804517 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -15,7 +15,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "0.1"
+    version = ""
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit
diff --git a/services/dockercleaner/setup.py b/services/dockercleaner/setup.py
index 6a6a96a..1506c20 100644
--- a/services/dockercleaner/setup.py
+++ b/services/dockercleaner/setup.py
@@ -12,7 +12,7 @@ from setuptools import setup, find_packages
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "0.1"
+    version = ""
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit
diff --git a/services/nodemanager/setup.py b/services/nodemanager/setup.py
index 454c24e..437e95e 100644
--- a/services/nodemanager/setup.py
+++ b/services/nodemanager/setup.py
@@ -15,7 +15,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "0.1"
+    version = ""
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit

commit c6ad0a2440f5e8f8361eeed07d0048c3d38c651b
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Thu Mar 22 18:22:11 2018 -0300

    13200:fix complete package name
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 647e8ad..238d6d6 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -291,7 +291,7 @@ test_package_presence() {
       centos_repo="http://rpm.arvados.org/CentOS/7/dev/x86_64/"
 
       repo_pkg_list=$(curl -o - ${centos_repo})
-      echo ${repo_pkg_list} |grep -q ${pkgname}
+      echo ${repo_pkg_list} |grep -q ${complete_pkgname}
       if [ $? -eq 0 ]; then
         echo "Package $complete_pkgname exists, not rebuilding!"
         curl -o ./${complete_pkgname} ${centos_repo}${complete_pkgname}

commit 0cbae7c90cb9298d930e8a0f001764df729fec86
Author: Javier Bértoli <jbertoli at veritasgenetics.com>
Date:   Thu Mar 22 15:10:12 2018 -0300

    Varnames
    
    refs #13200
    Arvados-DCO-1.1-Signed-off-by: Javier Bértoli <jbertoli at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 8c446b9..647e8ad 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -280,7 +280,7 @@ test_package_presence() {
         echo ${repo_pkg_list} |grep -q ${pkgname}
         if [ $? -eq 0 ]; then
           echo "Package $complete_pkgname exists, not rebuilding!"
-          curl -o ./${pkgname} http://apt.arvados.org/pool/${D}/main/${repo_subdir}/${pkgname}
+          curl -o ./${complete_pkgname} http://apt.arvados.org/pool/${D}/main/${repo_subdir}/${complete_pkgname}
           return 1
         else
           echo "Package $complete_pkgname not found, building"
@@ -294,7 +294,7 @@ test_package_presence() {
       echo ${repo_pkg_list} |grep -q ${pkgname}
       if [ $? -eq 0 ]; then
         echo "Package $complete_pkgname exists, not rebuilding!"
-        curl -o ./${pkgname} ${centos_repo}${pkgname}
+        curl -o ./${complete_pkgname} ${centos_repo}${complete_pkgname}
         return 1
       else
         echo "Package $complete_pkgname not found, building"

commit 2f6a83dba97c5dbcbb3b077deafaa08797293edb
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Thu Mar 22 14:33:03 2018 -0300

    13200:fix slash on centos repo
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 6c220e1..8c446b9 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -288,13 +288,13 @@ test_package_presence() {
         fi
       done
     else
-      centos_repo="http://rpm.arvados.org/CentOS/7/dev/x86_64"
+      centos_repo="http://rpm.arvados.org/CentOS/7/dev/x86_64/"
 
       repo_pkg_list=$(curl -o - ${centos_repo})
       echo ${repo_pkg_list} |grep -q ${pkgname}
       if [ $? -eq 0 ]; then
         echo "Package $complete_pkgname exists, not rebuilding!"
-        curl -o ./${pkgname} ${centos_repo}/${pkgname}
+        curl -o ./${pkgname} ${centos_repo}${pkgname}
         return 1
       else
         echo "Package $complete_pkgname not found, building"

commit 56b434f7e4ca8ceae70b4b75ce4e01f254fcd550
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Thu Mar 22 14:16:09 2018 -0300

    13200:remove repo_subdir for centos
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index a4820f0..6c220e1 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -294,7 +294,7 @@ test_package_presence() {
       echo ${repo_pkg_list} |grep -q ${pkgname}
       if [ $? -eq 0 ]; then
         echo "Package $complete_pkgname exists, not rebuilding!"
-        curl -o ./${pkgname} ${centos_repo}/${repo_subdir}/${pkgname}
+        curl -o ./${pkgname} ${centos_repo}/${pkgname}
         return 1
       else
         echo "Package $complete_pkgname not found, building"

commit acecc56abbd717bd05bf4a6544a677f4b5a8fc9b
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Thu Mar 22 12:30:46 2018 -0300

    13200:add verbose just to test new commit behaviour on jenkins
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 26ceb22..a4820f0 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0

commit 8e66062845cb567092de48edf9b2faaf1a4e2ae3
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Wed Mar 21 17:40:00 2018 -0300

    13200:remove verbose bash on run-library
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index a4820f0..26ceb22 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/bash
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0

commit 0f2d5848629c68d8f59f140d4879d7172536dcb8
Author: Javier Bértoli <jbertoli at veritasgenetics.com>
Date:   Wed Mar 21 14:17:41 2018 -0300

    My silly attempt
    
    refs #13200
    Arvados-DCO-1.1-Signed-off-by: Javier Bértoli <jbertoli at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 0bf1db6..a4820f0 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -264,13 +264,42 @@ test_package_presence() {
     # See if we can skip building the package, only if it already exists in the
     # processed/ directory. If so, move it back to the packages directory to make
     # sure it gets picked up by the test and/or upload steps.
-    if [[ -e "processed/$complete_pkgname" ]]; then
-      echo "Package $complete_pkgname exists, not rebuilding!"
-      mv processed/$complete_pkgname .
-      return 1
+    # Get the list of packages from the repos
+
+    if [[ "$FORMAT" == "deb" ]]; then
+      debian_distros="jessie precise stretch trusty wheezy xenial"
+
+      for D in ${debian_distros}; do
+        if [ ${pkgname:0:3} = "lib" ]; then
+          repo_subdir=${pkgname:0:4}
+        else
+          repo_subdir=${pkgname:0:1}
+        fi
+
+        repo_pkg_list=$(curl -o - http://apt.arvados.org/pool/${D}/main/${repo_subdir}/)
+        echo ${repo_pkg_list} |grep -q ${pkgname}
+        if [ $? -eq 0 ]; then
+          echo "Package $complete_pkgname exists, not rebuilding!"
+          curl -o ./${pkgname} http://apt.arvados.org/pool/${D}/main/${repo_subdir}/${pkgname}
+          return 1
+        else
+          echo "Package $complete_pkgname not found, building"
+          return 0
+        fi
+      done
     else
-      echo "Package $complete_pkgname not found, building"
-      return 0
+      centos_repo="http://rpm.arvados.org/CentOS/7/dev/x86_64"
+
+      repo_pkg_list=$(curl -o - ${centos_repo})
+      echo ${repo_pkg_list} |grep -q ${pkgname}
+      if [ $? -eq 0 ]; then
+        echo "Package $complete_pkgname exists, not rebuilding!"
+        curl -o ./${pkgname} ${centos_repo}/${repo_subdir}/${pkgname}
+        return 1
+      else
+        echo "Package $complete_pkgname not found, building"
+        return 0
+      fi
     fi
 }
 

commit 5bac1f802ff40c4e82542a4fac49086fcc86e135
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Tue Mar 20 18:17:01 2018 -0300

    13200:test changes to not build package if no change is present
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index d031a30..0bf1db6 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -58,9 +58,9 @@ version_from_git() {
     fi
 
     declare $(format_last_commit_here "git_ts=%ct git_hash=%h")
-    ARVADOS_BUILDING_VERSION="${prefix}.$(git describe --abbrev=0).$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
+    ARVADOS_BUILDING_VERSION="$(git describe --abbrev=0).$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
     echo "$ARVADOS_BUILDING_VERSION"
-}
+} 
 
 nohash_version_from_git() {
     if [[ -n "$ARVADOS_BUILDING_VERSION" ]]; then

commit d73d6a3db684ad46eecd98fa8208594142ebdc2c
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Tue Mar 20 17:46:46 2018 -0300

    13200:test changes to not build package if no change is present
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index cbb1cc7..d031a30 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -58,7 +58,7 @@ version_from_git() {
     fi
 
     declare $(format_last_commit_here "git_ts=%ct git_hash=%h")
-    ARVADOS_BUILDING_VERSION="$(git describe --abbrev=0).$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
+    ARVADOS_BUILDING_VERSION="${prefix}.$(git describe --abbrev=0).$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
     echo "$ARVADOS_BUILDING_VERSION"
 }
 

commit 1c2372c62c11f6de9d452483e79dc15aaecc0578
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Tue Mar 20 17:10:51 2018 -0300

    13200:test changes to not build package if no change is present
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 12cb408..cbb1cc7 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -67,7 +67,7 @@ nohash_version_from_git() {
         echo "$ARVADOS_BUILDING_VERSION"
         return
     fi
-    version_from_git $1 | cut -d. -f1-3
+    version_from_git $1 | cut -d. -f1-4
 }
 
 timestamp_from_git() {
@@ -76,7 +76,7 @@ timestamp_from_git() {
 
 handle_python_package () {
   # This function assumes the current working directory is the python package directory
-  if [ -n "$(find dist -name "*-$(version_from_git).tar.gz" -print -quit)" ]; then
+  if [ -n "$(find dist -name "*-$(nohash_version_from_git).tar.gz" -print -quit)" ]; then
     # This package doesn't need rebuilding.
     return
   fi

commit fd8c6aa9f8e8588fca348d8ae5b9422dfb0ab7fb
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Tue Mar 20 16:43:49 2018 -0300

    13200:test changes to not build package if no change is present
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index 497545d..a302997 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x 
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0
diff --git a/build/run-library.sh b/build/run-library.sh
index 04add5c..12cb408 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0
@@ -50,9 +50,14 @@ version_from_git() {
         return
     fi
 
-    local git_ts 
+    local git_ts git_hash prefix
+    if [[ -n "$1" ]] ; then
+        prefix="$1"
+    else
+        prefix="0.1"
+    fi
 
-    declare $(format_last_commit_here "git_ts=%ct")
+    declare $(format_last_commit_here "git_ts=%ct git_hash=%h")
     ARVADOS_BUILDING_VERSION="$(git describe --abbrev=0).$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
     echo "$ARVADOS_BUILDING_VERSION"
 }
@@ -71,7 +76,7 @@ timestamp_from_git() {
 
 handle_python_package () {
   # This function assumes the current working directory is the python package directory
-  if [ -n "$(find dist -name "*-$(version_from_git).$(date -ud "@$git_ts" +%Y%m%d%H%M%S).tar.gz" -print -quit)" ]; then
+  if [ -n "$(find dist -name "*-$(version_from_git).tar.gz" -print -quit)" ]; then
     # This package doesn't need rebuilding.
     return
   fi

commit c9283683ff2e2dc3c52b4bc48b1d13d8dd1c9674
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Tue Mar 20 15:39:48 2018 -0300

    13200:small change to output and to test if python packages are rebuilt when there is no change
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 788e3db..04add5c 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/bash
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0

commit 9ca97ebf3f28fb88559a994daf222f629ad9d0aa
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Mon Mar 19 14:47:58 2018 -0300

    13200:small change to output and to test if python packages are rebuilt when there is no change
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index a302997..497545d 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -x 
+#!/bin/bash
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0

commit fdaaf4f5b58406b10167714b57affe0905e3216b
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Mon Mar 19 14:09:47 2018 -0300

    13200:small change to output and to test if python packages are rebuilt when there is no change
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index 497545d..a302997 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x 
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0

commit 04319cbe8d3e8c858bb6d93037e09d3af4271c42
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Mon Mar 19 12:20:30 2018 -0300

    13200:test run library
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 04add5c..788e3db 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0

commit 4998ea2c5a8b2bf9066de8c454d5fb990ff9cba6
Author: Nico Cesar <ncesar at veritasgenetics.com>
Date:   Mon Mar 19 10:18:09 2018 -0400

    13200: minor changes to make it more readable
    
    Arvados-DCO-1.1-Signed-off-by: Nico Cesar ncesar at veritasgenetics.com

diff --git a/build/run-library.sh b/build/run-library.sh
index 6c3b619..04add5c 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -50,11 +50,10 @@ version_from_git() {
         return
     fi
 
-    ARVADOS_BUILDING_VERSION=`git describe --abbrev=0`
     local git_ts 
 
     declare $(format_last_commit_here "git_ts=%ct")
-    ARVADOS_BUILDING_VERSION="$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
+    ARVADOS_BUILDING_VERSION="$(git describe --abbrev=0).$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
     echo "$ARVADOS_BUILDING_VERSION"
 }
 

commit d41ae3025fe6a06317aa8806bdc1913d994b4014
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 16 14:56:07 2018 -0300

    13200:fix python version with git from tag
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index a79256d..497545d 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/bash
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0
@@ -385,7 +385,7 @@ package_go_binary tools/keep-exercise keep-exercise \
 # 2014-05-15
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/sdk/python/build"
-arvados_python_client_version="$(version_from_git)"
+arvados_python_client_version=${ARVADOS_BUILDING_VERSION:-$(awk '($1 == "Version:"){print $2}' $WORKSPACE/sdk/python/arvados_python_client.egg-info/PKG-INFO)}
 test_package_presence ${PYTHON2_PKG_PREFIX}-arvados-python-client "$arvados_python_client_version" python
 if [[ "$?" == "0" ]]; then
   fpm_build $WORKSPACE/sdk/python "${PYTHON2_PKG_PREFIX}-arvados-python-client" 'Curoverse, Inc.' 'python' "$arvados_python_client_version" "--url=https://arvados.org" "--description=The Arvados Python SDK" --depends "${PYTHON2_PKG_PREFIX}-setuptools" --deb-recommends=git
@@ -394,7 +394,7 @@ fi
 # cwl-runner
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/sdk/cwl/build"
-arvados_cwl_runner_version="$(version_from_git)"
+arvados_cwl_runner_version=${ARVADOS_BUILDING_VERSION:-$(awk '($1 == "Version:"){print $2}' $WORKSPACE/sdk/cwl/arvados_cwl_runner.egg-info/PKG-INFO)}
 declare -a iterargs=()
 if [[ -z "$ARVADOS_BUILDING_VERSION" ]]; then
     arvados_cwl_runner_iteration=3
@@ -451,7 +451,7 @@ fi
 # not omit the python- prefix first.
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/services/fuse/build"
-arvados_fuse_version="$(version_from_git)"
+arvados_fuse_version=${ARVADOS_BUILDING_VERSION:-$(awk '($1 == "Version:"){print $2}' $WORKSPACE/services/fuse/arvados_fuse.egg-info/PKG-INFO)}
 test_package_presence "${PYTHON2_PKG_PREFIX}-arvados-fuse" "$arvados_fuse_version" python
 if [[ "$?" == "0" ]]; then
   fpm_build $WORKSPACE/services/fuse "${PYTHON2_PKG_PREFIX}-arvados-fuse" 'Curoverse, Inc.' 'python' "$arvados_fuse_version" "--url=https://arvados.org" "--description=The Keep FUSE driver" --depends "${PYTHON2_PKG_PREFIX}-setuptools"
@@ -469,7 +469,7 @@ fi
 # The Docker image cleaner
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/services/dockercleaner/build"
-dockercleaner_version="$(version_from_git)"
+dockercleaner_version=${ARVADOS_BUILDING_VERSION:-$(awk '($1 == "Version:"){print $2}' $WORKSPACE/services/dockercleaner/arvados_docker_cleaner.egg-info/PKG-INFO)}
 iteration="${ARVADOS_BUILDING_ITERATION:-3}"
 test_package_presence arvados-docker-cleaner "$dockercleaner_version" python "$iteration"
 if [[ "$?" == "0" ]]; then
@@ -478,7 +478,7 @@ fi
 
 # The Arvados crunchstat-summary tool
 cd $WORKSPACE/packages/$TARGET
-crunchstat_summary_version="$(version_from_git)"
+crunchstat_summary_version=${ARVADOS_BUILDING_VERSION:-$(awk '($1 == "Version:"){print $2}' $WORKSPACE/tools/crunchstat-summary/crunchstat_summary.egg-info/PKG-INFO)}
 iteration="${ARVADOS_BUILDING_ITERATION:-2}"
 test_package_presence "$PYTHON2_PKG_PREFIX"-crunchstat-summary "$crunchstat_summary_version" python "$iteration"
 if [[ "$?" == "0" ]]; then

commit 71d59d43760dcacb0e6f56ec77f693b93f9e875d
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 16 14:37:54 2018 -0300

    13200:fix python version with git from tag
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index dce3aa8..a79256d 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -385,7 +385,7 @@ package_go_binary tools/keep-exercise keep-exercise \
 # 2014-05-15
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/sdk/python/build"
-arvados_python_client_version="$version_from_git()"
+arvados_python_client_version="$(version_from_git)"
 test_package_presence ${PYTHON2_PKG_PREFIX}-arvados-python-client "$arvados_python_client_version" python
 if [[ "$?" == "0" ]]; then
   fpm_build $WORKSPACE/sdk/python "${PYTHON2_PKG_PREFIX}-arvados-python-client" 'Curoverse, Inc.' 'python' "$arvados_python_client_version" "--url=https://arvados.org" "--description=The Arvados Python SDK" --depends "${PYTHON2_PKG_PREFIX}-setuptools" --deb-recommends=git
@@ -394,7 +394,7 @@ fi
 # cwl-runner
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/sdk/cwl/build"
-arvados_cwl_runner_version="$version_from_git()"
+arvados_cwl_runner_version="$(version_from_git)"
 declare -a iterargs=()
 if [[ -z "$ARVADOS_BUILDING_VERSION" ]]; then
     arvados_cwl_runner_iteration=3
@@ -451,7 +451,7 @@ fi
 # not omit the python- prefix first.
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/services/fuse/build"
-arvados_fuse_version="$version_from_git()"
+arvados_fuse_version="$(version_from_git)"
 test_package_presence "${PYTHON2_PKG_PREFIX}-arvados-fuse" "$arvados_fuse_version" python
 if [[ "$?" == "0" ]]; then
   fpm_build $WORKSPACE/services/fuse "${PYTHON2_PKG_PREFIX}-arvados-fuse" 'Curoverse, Inc.' 'python' "$arvados_fuse_version" "--url=https://arvados.org" "--description=The Keep FUSE driver" --depends "${PYTHON2_PKG_PREFIX}-setuptools"
@@ -469,7 +469,7 @@ fi
 # The Docker image cleaner
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/services/dockercleaner/build"
-dockercleaner_version="$version_from_git()"
+dockercleaner_version="$(version_from_git)"
 iteration="${ARVADOS_BUILDING_ITERATION:-3}"
 test_package_presence arvados-docker-cleaner "$dockercleaner_version" python "$iteration"
 if [[ "$?" == "0" ]]; then
@@ -478,7 +478,7 @@ fi
 
 # The Arvados crunchstat-summary tool
 cd $WORKSPACE/packages/$TARGET
-crunchstat_summary_version="$version_from_git()"
+crunchstat_summary_version="$(version_from_git)"
 iteration="${ARVADOS_BUILDING_ITERATION:-2}"
 test_package_presence "$PYTHON2_PKG_PREFIX"-crunchstat-summary "$crunchstat_summary_version" python "$iteration"
 if [[ "$?" == "0" ]]; then

commit 0192a6a19302bbe469264319429c5f50322b1233
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 16 14:28:44 2018 -0300

    13200:fix python gittagers version with latest git tag and timestamp
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index e1c9f02..dce3aa8 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -385,7 +385,7 @@ package_go_binary tools/keep-exercise keep-exercise \
 # 2014-05-15
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/sdk/python/build"
-arvados_python_client_version=${ARVADOS_BUILDING_VERSION:-$(awk '($1 == "Version:"){print $2}' $WORKSPACE/sdk/python/arvados_python_client.egg-info/PKG-INFO)}
+arvados_python_client_version="$version_from_git()"
 test_package_presence ${PYTHON2_PKG_PREFIX}-arvados-python-client "$arvados_python_client_version" python
 if [[ "$?" == "0" ]]; then
   fpm_build $WORKSPACE/sdk/python "${PYTHON2_PKG_PREFIX}-arvados-python-client" 'Curoverse, Inc.' 'python' "$arvados_python_client_version" "--url=https://arvados.org" "--description=The Arvados Python SDK" --depends "${PYTHON2_PKG_PREFIX}-setuptools" --deb-recommends=git
@@ -394,7 +394,7 @@ fi
 # cwl-runner
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/sdk/cwl/build"
-arvados_cwl_runner_version=${ARVADOS_BUILDING_VERSION:-$(awk '($1 == "Version:"){print $2}' $WORKSPACE/sdk/cwl/arvados_cwl_runner.egg-info/PKG-INFO)}
+arvados_cwl_runner_version="$version_from_git()"
 declare -a iterargs=()
 if [[ -z "$ARVADOS_BUILDING_VERSION" ]]; then
     arvados_cwl_runner_iteration=3
@@ -451,7 +451,7 @@ fi
 # not omit the python- prefix first.
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/services/fuse/build"
-arvados_fuse_version=${ARVADOS_BUILDING_VERSION:-$(awk '($1 == "Version:"){print $2}' $WORKSPACE/services/fuse/arvados_fuse.egg-info/PKG-INFO)}
+arvados_fuse_version="$version_from_git()"
 test_package_presence "${PYTHON2_PKG_PREFIX}-arvados-fuse" "$arvados_fuse_version" python
 if [[ "$?" == "0" ]]; then
   fpm_build $WORKSPACE/services/fuse "${PYTHON2_PKG_PREFIX}-arvados-fuse" 'Curoverse, Inc.' 'python' "$arvados_fuse_version" "--url=https://arvados.org" "--description=The Keep FUSE driver" --depends "${PYTHON2_PKG_PREFIX}-setuptools"
@@ -469,7 +469,7 @@ fi
 # The Docker image cleaner
 cd $WORKSPACE/packages/$TARGET
 rm -rf "$WORKSPACE/services/dockercleaner/build"
-dockercleaner_version=${ARVADOS_BUILDING_VERSION:-$(awk '($1 == "Version:"){print $2}' $WORKSPACE/services/dockercleaner/arvados_docker_cleaner.egg-info/PKG-INFO)}
+dockercleaner_version="$version_from_git()"
 iteration="${ARVADOS_BUILDING_ITERATION:-3}"
 test_package_presence arvados-docker-cleaner "$dockercleaner_version" python "$iteration"
 if [[ "$?" == "0" ]]; then
@@ -478,7 +478,7 @@ fi
 
 # The Arvados crunchstat-summary tool
 cd $WORKSPACE/packages/$TARGET
-crunchstat_summary_version=${ARVADOS_BUILDING_VERSION:-$(awk '($1 == "Version:"){print $2}' $WORKSPACE/tools/crunchstat-summary/crunchstat_summary.egg-info/PKG-INFO)}
+crunchstat_summary_version="$version_from_git()"
 iteration="${ARVADOS_BUILDING_ITERATION:-2}"
 test_package_presence "$PYTHON2_PKG_PREFIX"-crunchstat-summary "$crunchstat_summary_version" python "$iteration"
 if [[ "$?" == "0" ]]; then

commit 5667012a090b6c561cdf0f84554d4673b2020954
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Fri Mar 16 13:24:17 2018 -0300

    13200:fix python gittagers version with latest git tag and timestamp
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index 497545d..e1c9f02 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0
diff --git a/build/run-library.sh b/build/run-library.sh
index 83d069c..6c3b619 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -1,4 +1,4 @@
-  #!/bin/bash
+#!/bin/bash
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0
@@ -72,7 +72,7 @@ timestamp_from_git() {
 
 handle_python_package () {
   # This function assumes the current working directory is the python package directory
-  if [ -n "$(find dist -name "*-$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S).tar.gz" -print -quit)" ]; then
+  if [ -n "$(find dist -name "*-$(version_from_git).$(date -ud "@$git_ts" +%Y%m%d%H%M%S).tar.gz" -print -quit)" ]; then
     # This package doesn't need rebuilding.
     return
   fi
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index d9dd970..0e9ee94 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -16,7 +16,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = ""
+    version = "1.0"
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 5804517..88bf51e 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -15,7 +15,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = ""
+    version = "0.1"
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit
diff --git a/services/dockercleaner/setup.py b/services/dockercleaner/setup.py
index 1506c20..6a6a96a 100644
--- a/services/dockercleaner/setup.py
+++ b/services/dockercleaner/setup.py
@@ -12,7 +12,7 @@ from setuptools import setup, find_packages
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = ""
+    version = "0.1"
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit
diff --git a/services/nodemanager/setup.py b/services/nodemanager/setup.py
index 437e95e..454c24e 100644
--- a/services/nodemanager/setup.py
+++ b/services/nodemanager/setup.py
@@ -15,7 +15,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = ""
+    version = "0.1"
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit

commit 198a3409881f5b9f1fe77ae551efde1968bfb639
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Wed Mar 14 16:24:15 2018 -0300

    13200:fix python gittagers version with latest git tag and timestamp
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 9f77cb8..83d069c 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -52,6 +52,7 @@ version_from_git() {
 
     ARVADOS_BUILDING_VERSION=`git describe --abbrev=0`
     local git_ts 
+
     declare $(format_last_commit_here "git_ts=%ct")
     ARVADOS_BUILDING_VERSION="$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
     echo "$ARVADOS_BUILDING_VERSION"
@@ -71,7 +72,7 @@ timestamp_from_git() {
 
 handle_python_package () {
   # This function assumes the current working directory is the python package directory
-  if [ -n "$(find dist -name "*-$ARVADOS_BUILDING_VERSION.tar.gz" -print -quit)" ]; then
+  if [ -n "$(find dist -name "*-$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S).tar.gz" -print -quit)" ]; then
     # This package doesn't need rebuilding.
     return
   fi
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index 0e9ee94..d9dd970 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -16,7 +16,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "1.0"
+    version = ""
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 88bf51e..5804517 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -15,7 +15,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "0.1"
+    version = ""
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit
diff --git a/services/dockercleaner/setup.py b/services/dockercleaner/setup.py
index 6a6a96a..1506c20 100644
--- a/services/dockercleaner/setup.py
+++ b/services/dockercleaner/setup.py
@@ -12,7 +12,7 @@ from setuptools import setup, find_packages
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "0.1"
+    version = ""
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit
diff --git a/services/nodemanager/setup.py b/services/nodemanager/setup.py
index 454c24e..437e95e 100644
--- a/services/nodemanager/setup.py
+++ b/services/nodemanager/setup.py
@@ -15,7 +15,7 @@ README = os.path.join(SETUP_DIR, 'README.rst')
 tagger = egg_info_cmd.egg_info
 version = os.environ.get("ARVADOS_BUILDING_VERSION")
 if not version:
-    version = "0.1"
+    version = ""
     try:
         import gittaggers
         tagger = gittaggers.EggInfoFromGit

commit 45d780e20c41181c33562f99262bcf1f507f5a6a
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Wed Mar 14 15:48:26 2018 -0300

    13200:fix python gittagers version with latest git tag and timestamp
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 5db8fd2..9f77cb8 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -52,12 +52,6 @@ version_from_git() {
 
     ARVADOS_BUILDING_VERSION=`git describe --abbrev=0`
     local git_ts 
-    if [[ -n "$1" ]] ; then
-        prefix="$1"
-    else
-        prefix="0.1"
-    fi
-
     declare $(format_last_commit_here "git_ts=%ct")
     ARVADOS_BUILDING_VERSION="$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
     echo "$ARVADOS_BUILDING_VERSION"
@@ -77,7 +71,7 @@ timestamp_from_git() {
 
 handle_python_package () {
   # This function assumes the current working directory is the python package directory
-  if [ -n "$(find dist -name "*-$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S).tar.gz" -print -quit)" ]; then
+  if [ -n "$(find dist -name "*-$ARVADOS_BUILDING_VERSION.tar.gz" -print -quit)" ]; then
     # This package doesn't need rebuilding.
     return
   fi
diff --git a/sdk/cwl/gittaggers.py b/sdk/cwl/gittaggers.py
index da5ae3b..40f6e6c 100644
--- a/sdk/cwl/gittaggers.py
+++ b/sdk/cwl/gittaggers.py
@@ -41,5 +41,5 @@ class EggInfoFromGit(egg_info):
 
     def tags(self):
         if self.tag_build is None:
-            self.tag_build = self.git_timestamp_tag() + self.git_latest_tag()
+            self.tag_build = self.git_latest_tag() + self.git_timestamp_tag()
         return egg_info.tags(self)

commit 368191c0f0f7c094a6ba7619dcf5e572a3f84f79
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Wed Mar 14 14:15:45 2018 -0300

    13200:fix python gittagers version with latest git tag and timestamp
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 9081c22..5db8fd2 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -59,7 +59,8 @@ version_from_git() {
     fi
 
     declare $(format_last_commit_here "git_ts=%ct")
-    echo "$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
+    ARVADOS_BUILDING_VERSION="$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
+    echo "$ARVADOS_BUILDING_VERSION"
 }
 
 nohash_version_from_git() {
diff --git a/sdk/cwl/gittaggers.py b/sdk/cwl/gittaggers.py
index 3fb0fde..da5ae3b 100644
--- a/sdk/cwl/gittaggers.py
+++ b/sdk/cwl/gittaggers.py
@@ -28,6 +28,10 @@ class EggInfoFromGit(egg_info):
     If a build tag has already been set (e.g., "egg_info -b", building
     from source package), leave it alone.
     """
+    def git_latest_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'describe', '--abbrev=0']).strip()
+        return str(gitinfo)
 
     def git_timestamp_tag(self):
         gitinfo = subprocess.check_output(
@@ -37,5 +41,5 @@ class EggInfoFromGit(egg_info):
 
     def tags(self):
         if self.tag_build is None:
-            self.tag_build = self.git_timestamp_tag()
+            self.tag_build = self.git_timestamp_tag() + self.git_latest_tag()
         return egg_info.tags(self)
diff --git a/sdk/python/gittaggers.py b/sdk/python/gittaggers.py
index da73634..4e848ed 100644
--- a/sdk/python/gittaggers.py
+++ b/sdk/python/gittaggers.py
@@ -12,6 +12,11 @@ class EggInfoFromGit(egg_info):
     If a build tag has already been set (e.g., "egg_info -b", building
     from source package), leave it alone.
     """
+    def git_latest_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'describe', '--abbrev=0']).strip()
+        return str(gitinfo)
+
     def git_timestamp_tag(self):
         gitinfo = subprocess.check_output(
             ['git', 'log', '--first-parent', '--max-count=1',
@@ -20,5 +25,5 @@ class EggInfoFromGit(egg_info):
 
     def tags(self):
         if self.tag_build is None:
-            self.tag_build = self.git_timestamp_tag()
+            self.tag_build = self.git_latest_tag()+self.git_timestamp_tag()
         return egg_info.tags(self)

commit 54ef4b36d1fa48960a87f527c5dd69101486d908
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Tue Mar 13 11:11:29 2018 -0300

    13200:fix python package version with latest git tag and timestamp
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index d3a6272..9081c22 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -76,7 +76,7 @@ timestamp_from_git() {
 
 handle_python_package () {
   # This function assumes the current working directory is the python package directory
-  if [ -n "$(find dist -name "*-$(nohash_version_from_git).tar.gz" -print -quit)" ]; then
+  if [ -n "$(find dist -name "*-$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S).tar.gz" -print -quit)" ]; then
     # This package doesn't need rebuilding.
     return
   fi

commit 2b1a65816ab15bac35f260aa65f979d17e37323e
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Mon Mar 12 15:26:06 2018 -0300

    13200:new version using git tag latest and timestamp only
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index 96ccf48..d3a6272 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -50,7 +50,7 @@ version_from_git() {
         return
     fi
 
-    $ARVADOS_BUILDING_VERSION=`git describe --abbrev=0`
+    ARVADOS_BUILDING_VERSION=`git describe --abbrev=0`
     local git_ts 
     if [[ -n "$1" ]] ; then
         prefix="$1"

commit a2e3be11c517402346702f8d4e3d2e851fec7b46
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Mon Mar 12 15:12:22 2018 -0300

    13200:new version using git tag latest and timestamp only
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index a9e6202..96ccf48 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -46,12 +46,20 @@ version_from_git() {
     # dev/prerelease, output a version number based on the git log for
     # the current working directory.
     if [[ -n "$ARVADOS_BUILDING_VERSION" ]]; then
-      local git_ts git_hash prefix
-      declare $(format_last_commit_here "git_ts=%ct")
-      echo "$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
-      return
+        echo "$ARVADOS_BUILDING_VERSION"
+        return
+    fi
+
+    $ARVADOS_BUILDING_VERSION=`git describe --abbrev=0`
+    local git_ts 
+    if [[ -n "$1" ]] ; then
+        prefix="$1"
+    else
+        prefix="0.1"
     fi
 
+    declare $(format_last_commit_here "git_ts=%ct")
+    echo "$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
 }
 
 nohash_version_from_git() {

commit 1ea42486b1badd6ebd1a0071f3dd7bc1ec41b920
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Mon Mar 12 13:05:56 2018 -0300

    13200:test new job with timestamp only removing hash
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index df86dee..a9e6202 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -46,19 +46,12 @@ version_from_git() {
     # dev/prerelease, output a version number based on the git log for
     # the current working directory.
     if [[ -n "$ARVADOS_BUILDING_VERSION" ]]; then
-        echo "$ARVADOS_BUILDING_VERSION"
-        return
-    fi
-
-    local git_ts git_hash prefix
-    if [[ -n "$1" ]] ; then
-        prefix="$1"
-    else
-        prefix="0.1"
+      local git_ts git_hash prefix
+      declare $(format_last_commit_here "git_ts=%ct")
+      echo "$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
+      return
     fi
 
-    declare $(format_last_commit_here "git_ts=%ct")
-    echo "${prefix}.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
 }
 
 nohash_version_from_git() {

commit ac74647ec063c81654f0d4ec368a3e6bd74484a6
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Thu Mar 8 17:19:15 2018 -0300

    13200:test new job with timestamp only removing hash
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index ba94688..df86dee 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+  #!/bin/bash
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0
@@ -57,8 +57,8 @@ version_from_git() {
         prefix="0.1"
     fi
 
-    declare $(format_last_commit_here "git_ts=%ct git_hash=%h")
-    echo "${prefix}.$(date -ud "@$git_ts" +%Y%m%d%H%M%S).$git_hash"
+    declare $(format_last_commit_here "git_ts=%ct")
+    echo "${prefix}.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
 }
 
 nohash_version_from_git() {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list