[arch-commits] Commit in buildbot/trunk (5 files)

Chih-Hsuan Yen yan12125 at archlinux.org
Sun Dec 6 03:12:20 UTC 2020


    Date: Sunday, December 6, 2020 @ 03:12:20
  Author: yan12125
Revision: 770997

upgpkg: buildbot 2.9.1-1; fix/improve dependencies; enable more tests

* Remove setuptools from buildbot-worker as scripts generated by setuptools now tries importlib.metadata before pkg_resources
* Drop landed patches
* Enable tests that use scripts from buildbot-contrib
* python-requests has been used in HTTP steps since long time ago

Added:
  buildbot/trunk/subunit-tests.diff
Modified:
  buildbot/trunk/PKGBUILD
Deleted:
  buildbot/trunk/ignore-lib2to3-deprecated.diff
  buildbot/trunk/reproducible-html.diff
  buildbot/trunk/sqlalchemy-1.13.18.diff

--------------------------------+
 PKGBUILD                       |   40 +++++++++++++++++++++------------------
 ignore-lib2to3-deprecated.diff |   14 -------------
 reproducible-html.diff         |   22 ---------------------
 sqlalchemy-1.13.18.diff        |   13 ------------
 subunit-tests.diff             |   37 ++++++++++++++++++++++++++++++++++++
 5 files changed, 59 insertions(+), 67 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-12-06 02:22:49 UTC (rev 770996)
+++ PKGBUILD	2020-12-06 03:12:20 UTC (rev 770997)
@@ -8,14 +8,14 @@
          python-buildbot-www python-buildbot-waterfall-view
          python-buildbot-console-view python-buildbot-grid-view
          python-buildbot-wsgi-dashboards python-buildbot-badges)
-pkgver=2.8.4
-_bb_contrib_commit=ada3c8f30ca7e1b6bb260e2e5971053fbd254333
-pkgrel=2
+pkgver=2.9.1
+_bb_contrib_commit=4c8615db51253f0be4bfd08210a3aaf903a74b4f
+pkgrel=1
 arch=(any)
 url='https://buildbot.net'
 license=(GPL2)
 checkdepends=(python-boto3 python-lz4 python-treq python-txrequests
-              python-moto python-parameterized python-mock
+              python-moto python-parameterized python-mock python-subunit
               openssh chromium)
 makedepends=(python-twisted python-jinja python-zope-interface
              python-sqlalchemy-migrate python-dateutil python-txaio
@@ -26,15 +26,11 @@
              git yarn)
 source=("https://github.com/buildbot/buildbot/releases/download/v$pkgver/buildbot-v$pkgver.gitarchive.tar.gz"{,.asc}
         "git+https://github.com/buildbot/buildbot-contrib.git#commit=$_bb_contrib_commit"
-        "reproducible-html.diff"
-        "sqlalchemy-1.13.18.diff"
-        "ignore-lib2to3-deprecated.diff")
-sha256sums=('b8c1d807d89dc220422843d7043831ee35ca03dfd7fd4da5a4f73899dffa1849'
+        "subunit-tests.diff")
+sha256sums=('388e0a757019b73148f6552c1cccbc13e998f13cacb32e56e4c85387b0adbc75'
             'SKIP'
             'SKIP'
-            'b921d29994eff3af134ca1b37acf291a6a95f5da35a2a4f885557adcca22f864'
-            'cd6119e8f8346ad2bcfedb3bfdbfcdcbb9908ea1db9f3ec09d323f6c9d13d9df'
-            '30a29f954560ce3edf36307a5fa5b54874739330aad04841dbdca8ec8948667f')
+            'cd66bf65e45fa0a5916a6e0201dcebc4db001e4f47da856afbffc58a04356d55')
 validpgpkeys=(
   '390EB159056ED56F66AB1092AECD456B4D2531FC'  # Pierre Tardy <tardyp at gmail.com> (@tardyp on GitHub)
   'FD0004A26EADFE43A4C3F249C6F7AE200374452D'  # Povilas Kanapickas <povilas at radix.lt> (@p12tic on GitHub)
@@ -42,10 +38,10 @@
 
 prepare() {
   cd buildbot-$pkgver
-  patch -Np1 -i ../reproducible-html.diff
-  patch -Np1 -i ../sqlalchemy-1.13.18.diff
-  patch -Np1 -i ../ignore-lib2to3-deprecated.diff
 
+  # Some master tests use scripts from contrib
+  ln -s ../../buildbot-contrib/master/contrib master/contrib
+
   # HACK: do not use virtualenv
   sed -i -e 's#frontend_deps:.*#frontend_deps:#' Makefile
 
@@ -57,6 +53,11 @@
   rm -v master/buildbot/scripts/windows_service.py
   sed -i '/buildbot_worker_windows_service/d' worker/setup.py
   rm -v worker/buildbot_worker/scripts/windows_service.py
+
+  # Subunit logs are from testtools. Arch Linux's testtools is patched to use
+  # traceback instead of traceback2, and causing a difference. See
+  # https://github.com/testing-cabal/testtools/pull/299 for more defailts.
+  patch -Np1 -i ../subunit-tests.diff
 }
 
 build() {
@@ -87,8 +88,8 @@
   done
 
   ################### buildbot-docs ####################
-  cd "$srcdir/buildbot-$pkgver"
-  make docs
+  cd "$srcdir"/buildbot-$pkgver/master/docs
+  make clean html singlehtml
 }
 
 check() {
@@ -123,9 +124,10 @@
 
 package_buildbot() {
   pkgdesc='The Continuous Integration Framework'
+  # include setuptools as plugins are enumerated via pkg_resources
   depends=(python-twisted python-jinja python-zope-interface
            python-sqlalchemy-migrate python-dateutil python-txaio
-           python-autobahn python-pyjwt python-yaml)
+           python-autobahn python-pyjwt python-yaml python-setuptools)
   optdepends=(
     # reporters
     'python-pyopenssl: to use SSL/TLS in mail or IRC notifiers'
@@ -137,6 +139,7 @@
     # steps
     'python-subunit: for SubunitShellCommand'
     'python-treq: for using HTTP requests as steps'
+    'python-requests: for using HTTP requests as steps'
     'python-txrequests: for using HTTP requests as steps'
     # workers
     'buildbot-worker: for local worker'
@@ -146,6 +149,7 @@
     'python-novaclient: for OpenStack latent worker'
     # www
     'python-ldap3: to authenticate users via LDAP'
+    'python-pypugjs: to use custom Pug.js templates'
 
     # misc
     'python-lz4: to compress logs using lz4'
@@ -159,7 +163,7 @@
 
 package_buildbot-worker() {
   pkgdesc='Buildbot worker daemon'
-  depends=(python-setuptools python-twisted python-future)
+  depends=(python-twisted python-future)
 
   cd buildbot-$pkgver/worker
   python setup.py install --root="$pkgdir" --optimize=1 --skip-build

Deleted: ignore-lib2to3-deprecated.diff
===================================================================
--- ignore-lib2to3-deprecated.diff	2020-12-06 02:22:49 UTC (rev 770996)
+++ ignore-lib2to3-deprecated.diff	2020-12-06 03:12:20 UTC (rev 770997)
@@ -1,14 +0,0 @@
-diff --git a/master/buildbot/test/__init__.py b/master/buildbot/test/__init__.py
-index 29eb4557a..700517edd 100644
---- a/master/buildbot/test/__init__.py
-+++ b/master/buildbot/test/__init__.py
-@@ -134,3 +134,9 @@ warnings.filterwarnings('ignore', ".*Not importing directory .*/zope: missing __
-                         category=ImportWarning)
- warnings.filterwarnings('ignore', ".*Not importing directory .*/sphinxcontrib: missing __init__",
-                         category=ImportWarning)
-+
-+# ignore warnings from importing lib2to3 via buildbot_pkg ->
-+# setuptools.command.build_py -> setuptools.lib2to3_ex -> lib2to3
-+# https://github.com/pypa/setuptools/issues/2086
-+warnings.filterwarnings('ignore', ".*lib2to3 package is deprecated",
-+                        category=PendingDeprecationWarning)

Deleted: reproducible-html.diff
===================================================================
--- reproducible-html.diff	2020-12-06 02:22:49 UTC (rev 770996)
+++ reproducible-html.diff	2020-12-06 03:12:20 UTC (rev 770997)
@@ -1,22 +0,0 @@
---- a/www/base/src/app/layout.jade	2020-02-28 05:30:40.000000000 +0800
-+++ b/www/base/src/app/layout.jade	2020-05-24 22:01:39.401819550 +0800
-@@ -1,3 +1,5 @@
-+- var timestamp = process.env.SOURCE_DATE_EPOCH ? (parseInt(process.env.SOURCE_DATE_EPOCH) * 1000) : new Date().getTime();
-+
- doctype html
- html.no-js(ng-app="app", xmlns:ng='http://angularjs.org', xmlns:app='ignored')
-     head
-@@ -18,10 +20,10 @@
-     script(src="browser-warning-list.js")
-     script
-       | window.T =  {{ custom_templates | tojson }};
--    script(src="scripts.js?_" + (new Date()).getTime())
-+    script(src="scripts.js?_" + timestamp)
-     | {% for app in config.plugins -%}
--    script(src="{{app}}/scripts.js?_" + (new Date()).getTime())
--    link(href='{{app}}/styles.css?_' + (new Date()).getTime(), rel='stylesheet')
-+    script(src="{{app}}/scripts.js?_" + timestamp)
-+    link(href='{{app}}/styles.css?_' + timestamp, rel='stylesheet')
-     script
-       | angular.module('app').requires.push('{{app}}')
-     | {% endfor %}

Deleted: sqlalchemy-1.13.18.diff
===================================================================
--- sqlalchemy-1.13.18.diff	2020-12-06 02:22:49 UTC (rev 770996)
+++ sqlalchemy-1.13.18.diff	2020-12-06 03:12:20 UTC (rev 770997)
@@ -1,13 +0,0 @@
-diff --git a/master/buildbot/db/enginestrategy.py b/master/buildbot/db/enginestrategy.py
-index 7cd014e37..cb835602b 100644
---- a/master/buildbot/db/enginestrategy.py
-+++ b/master/buildbot/db/enginestrategy.py
-@@ -216,7 +216,7 @@ class BuildbotEngineStrategy(strategies.PlainEngineStrategy):
-                 raise TypeError("Buildbot requires use_unicode=True " +
-                                 "(and adds it automatically)")
-         else:
--            u.query['use_unicode'] = True
-+            u.query['use_unicode'] = "True"
- 
-         if 'charset' in u.query:
-             if u.query['charset'] != "utf8":

Added: subunit-tests.diff
===================================================================
--- subunit-tests.diff	                        (rev 0)
+++ subunit-tests.diff	2020-12-06 03:12:20 UTC (rev 770997)
@@ -0,0 +1,37 @@
+diff --git a/master/buildbot/test/unit/test_steps_subunit.py b/master/buildbot/test/unit/test_steps_subunit.py
+index 4e9f326b6..fdac4b17f 100644
+--- a/master/buildbot/test/unit/steps/test_subunit.py
++++ b/master/buildbot/test/unit/steps/test_subunit.py
+@@ -120,8 +120,7 @@ class TestSubUnit(steps.BuildStepMixin, TestReactorMixin, unittest.TestCase):
+         self.expectOutcome(result=FAILURE, state_string="shell Total 1 test(s) 1 error (failure)")
+         self.expectLogfile('problems', '''\
+ test1
+-testtools.testresult.real._StringException: Traceback (most recent call last):
+-ValueError: invalid literal for int() with base 10: '_error1'
++testtools.testresult.real._StringException: ValueError: invalid literal for int() with base 10: '_error1'
+ 
+ ''')
+         return self.runStep()
+@@ -148,12 +147,10 @@ ValueError: invalid literal for int() with base 10: '_error1'
+         self.expectOutcome(result=FAILURE, state_string="shell Total 2 test(s) 2 errors (failure)")
+         self.expectLogfile('problems', '''\
+ test1
+-testtools.testresult.real._StringException: Traceback (most recent call last):
+-ValueError: invalid literal for int() with base 10: '_error1'
++testtools.testresult.real._StringException: ValueError: invalid literal for int() with base 10: '_error1'
+ 
+ test2
+-testtools.testresult.real._StringException: Traceback (most recent call last):
+-ValueError: invalid literal for int() with base 10: '_error2'
++testtools.testresult.real._StringException: ValueError: invalid literal for int() with base 10: '_error2'
+ 
+ ''')
+         return self.runStep()
+@@ -180,7 +177,6 @@ ValueError: invalid literal for int() with base 10: '_error2'
+         # note that the warnings list is ignored..
+         self.expectLogfile('warnings', '''\
+ error: test2 [
+-Traceback (most recent call last):
+ ValueError: invalid literal for int() with base 10: '_error2'
+ ]
+ ''')



More information about the arch-commits mailing list