From be6992385402bd593bed648af13595434c12ccac Mon Sep 17 00:00:00 2001 From: Lars Beckers Date: Mon, 19 Aug 2019 00:22:19 +0200 Subject: [PATCH] update to v0.2.8 --- .SRCINFO | 24 +++++------- PKGBUILD | 28 ++++--------- issue587.patch | 104 ------------------------------------------------- 3 files changed, 17 insertions(+), 139 deletions(-) delete mode 100644 issue587.patch diff --git a/.SRCINFO b/.SRCINFO index 759f9272198ce..99d038aa6247d 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,27 +1,21 @@ # Generated by makepkg 5.1.3 -# Mon May 27 13:48:07 UTC 2019 +# Sun Aug 18 22:21:21 UTC 2019 pkgbase = mitogen pkgdesc = Distributed self-replicating programs in Python - pkgver = 0.2.7 + pkgver = 0.2.8 pkgrel = 1 - url = https://mitogen.readthedocs.io/ + url = https://mitogen.networkgenomics.com/ arch = any license = BSD makedepends = python-setuptools depends = python optdepends = ansible: for using the ansible strategy plugin - source = https://github.com/dw/mitogen/archive/v0.2.7.tar.gz - source = issue587.patch - md5sums = b21b4cb198143e7cf98089597e9af237 - md5sums = bf062429e804d86cfb2d93f4fb8e045f - sha1sums = 096ca59a8d5a96f9d579840940ca9edfa0abdcb7 - sha1sums = 63cab394110c84b27dceed3ed424b3ab7bdc9e69 - sha256sums = ecc861794577963fc7b703b2fa03a3aff3e02ab94d09d870465413ac7bea9934 - sha256sums = fb62e672ae12e67b4b895a4867db766c93092b58ef895c6de52904d7b49edacb - sha384sums = ffce55e4737b5654fc1990770c10d06a493a9804582fe4f3563ca5f210b5cafb224b702ddf432f32b921f12cfd07465c - sha384sums = 0f23ab92f36b578abfcca0d0fb74a50d1d9efc83878cd50009d5e6cac7b9eb5dbd3412184b0bd173f0a2303442193120 - sha512sums = 463a311b4c4c8285da582f7cb92b322c42107d6b4a906b2dc0221ba7e9620312f9b30ddf718c39d925be7985df9b7e830b1d864e39c758db3e443e83e33ee9e5 - sha512sums = 0fc09e417de2a2603ae84464515fddd9a67548fdaf15de2ab31961c20bcff61cb64f48142628339e7075667b4670aa7ac79db793dc5dfe86c645ef723bddcb32 + source = https://github.com/dw/mitogen/archive/v0.2.8.tar.gz + md5sums = fb530685fb32184689de82735c4d68a7 + sha1sums = 5e1804f6edcbfda7cbbb863ddfd6154a09f6a1af + sha256sums = 95b90b786ec09490e8a748394da36b442d9647ed754a1d7924fdefd2b904c6d4 + sha384sums = e155be0d248c9abd027561a48d19d1e4a73eb1229f199581209fc30441c8ed950fc1adbee4ce2b5fb5081960405a019f + sha512sums = 0c1f37fe60dd6be987f1be3d9888e1b58c61a98dfa88a22400817c9a31723456c6f47bf96da36335f049cc2f4c87af2c69ef03699c1a43bbf13557927620e688 pkgname = mitogen diff --git a/PKGBUILD b/PKGBUILD index 5140883e94cc2..622b457ca6af0 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,22 +1,15 @@ pkgname=mitogen -pkgver=0.2.7 +pkgver=0.2.8 pkgrel=1 pkgdesc="Distributed self-replicating programs in Python" license=("BSD") -url="https://mitogen.readthedocs.io/" +url="https://mitogen.networkgenomics.com/" depends=('python') makedepends=('python-setuptools') optdepends=('ansible: for using the ansible strategy plugin') -source=("https://github.com/dw/mitogen/archive/v${pkgver}.tar.gz" - "issue587.patch") +source=("https://github.com/dw/mitogen/archive/v${pkgver}.tar.gz") arch=('any') -# branch snapshot fixes incompatibilities with ansible v2.8 -prepare() { - cd "$srcdir/$pkgname-$pkgver" - patch -p1 < "$srcdir/issue587.patch" -} - build() { cd "$srcdir/$pkgname-$pkgver" python setup.py build @@ -28,13 +21,8 @@ package() { install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } -md5sums=('b21b4cb198143e7cf98089597e9af237' - 'bf062429e804d86cfb2d93f4fb8e045f') -sha1sums=('096ca59a8d5a96f9d579840940ca9edfa0abdcb7' - '63cab394110c84b27dceed3ed424b3ab7bdc9e69') -sha256sums=('ecc861794577963fc7b703b2fa03a3aff3e02ab94d09d870465413ac7bea9934' - 'fb62e672ae12e67b4b895a4867db766c93092b58ef895c6de52904d7b49edacb') -sha384sums=('ffce55e4737b5654fc1990770c10d06a493a9804582fe4f3563ca5f210b5cafb224b702ddf432f32b921f12cfd07465c' - '0f23ab92f36b578abfcca0d0fb74a50d1d9efc83878cd50009d5e6cac7b9eb5dbd3412184b0bd173f0a2303442193120') -sha512sums=('463a311b4c4c8285da582f7cb92b322c42107d6b4a906b2dc0221ba7e9620312f9b30ddf718c39d925be7985df9b7e830b1d864e39c758db3e443e83e33ee9e5' - '0fc09e417de2a2603ae84464515fddd9a67548fdaf15de2ab31961c20bcff61cb64f48142628339e7075667b4670aa7ac79db793dc5dfe86c645ef723bddcb32') +md5sums=('fb530685fb32184689de82735c4d68a7') +sha1sums=('5e1804f6edcbfda7cbbb863ddfd6154a09f6a1af') +sha256sums=('95b90b786ec09490e8a748394da36b442d9647ed754a1d7924fdefd2b904c6d4') +sha384sums=('e155be0d248c9abd027561a48d19d1e4a73eb1229f199581209fc30441c8ed950fc1adbee4ce2b5fb5081960405a019f') +sha512sums=('0c1f37fe60dd6be987f1be3d9888e1b58c61a98dfa88a22400817c9a31723456c6f47bf96da36335f049cc2f4c87af2c69ef03699c1a43bbf13557927620e688') diff --git a/issue587.patch b/issue587.patch deleted file mode 100644 index 60baeca270341..0000000000000 --- a/issue587.patch +++ /dev/null @@ -1,104 +0,0 @@ -diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml -index dc5f716..588a3b8 100644 ---- a/.ci/azure-pipelines.yml -+++ b/.ci/azure-pipelines.yml -@@ -87,3 +87,9 @@ jobs: - #VER: 2.6.2 - #DISTROS: debian - #STRATEGY: linear -+ -+ Vanilla_280_27: -+ python.version: '2.7' -+ MODE: ansible -+ VER: 2.8.0 -+ DISTROS: debian -diff --git a/ansible_mitogen/strategy.py b/ansible_mitogen/strategy.py -index b9211fc..b6b9aaf 100644 ---- a/ansible_mitogen/strategy.py -+++ b/ansible_mitogen/strategy.py -@@ -40,9 +40,15 @@ import ansible_mitogen.process - import ansible - import ansible.executor.process.worker - -+try: -+ # 2.8+ has a standardized "unset" object. -+ from ansible.utils.sentinel import Sentinel -+except ImportError: -+ Sentinel = None -+ - - ANSIBLE_VERSION_MIN = '2.3' --ANSIBLE_VERSION_MAX = '2.7' -+ANSIBLE_VERSION_MAX = '2.8' - NEW_VERSION_MSG = ( - "Your Ansible version (%s) is too recent. The most recent version\n" - "supported by Mitogen for Ansible is %s.x. Please check the Mitogen\n" -@@ -115,7 +121,11 @@ def wrap_action_loader__get(name, *args, **kwargs): - This is used instead of static subclassing as it generalizes to third party - action modules outside the Ansible tree. - """ -- klass = action_loader__get(name, class_only=True) -+ get_kwargs = {'class_only': True} -+ if ansible.__version__ >= '2.8': -+ get_kwargs['collection_list'] = kwargs.pop('collection_list', None) -+ -+ klass = action_loader__get(name, **get_kwargs) - if klass: - bases = (ansible_mitogen.mixins.ActionModuleMixin, klass) - adorned_klass = type(str(name), bases, {}) -@@ -261,14 +271,17 @@ class StrategyMixin(object): - name=task.action, - mod_type='', - ) -- ansible_mitogen.loaders.connection_loader.get( -- name=play_context.connection, -- class_only=True, -- ) - ansible_mitogen.loaders.action_loader.get( - name=task.action, - class_only=True, - ) -+ if play_context.connection is not Sentinel: -+ # 2.8 appears to defer computing this until inside the worker. -+ # TODO: figure out where it has moved. -+ ansible_mitogen.loaders.connection_loader.get( -+ name=play_context.connection, -+ class_only=True, -+ ) - - return super(StrategyMixin, self)._queue_task( - host=host, -diff --git a/ansible_mitogen/transport_config.py b/ansible_mitogen/transport_config.py -index ad1cab3..d5f15b1 100644 ---- a/ansible_mitogen/transport_config.py -+++ b/ansible_mitogen/transport_config.py -@@ -380,8 +380,9 @@ class PlayContextSpec(Spec): - for term in ansible.utils.shlex.shlex_split( - first_true(( - self._play_context.become_flags, -- self._play_context.sudo_flags, -- # Ansible 2.3. -+ # Ansible <=2.7. -+ getattr(self._play_context, 'sudo_flags', ''), -+ # Ansible <=2.3. - getattr(C, 'DEFAULT_BECOME_FLAGS', ''), - getattr(C, 'DEFAULT_SUDO_FLAGS', '') - ), default='') -diff --git a/tests/ansible/integration/async/runner_one_job.yml b/tests/ansible/integration/async/runner_one_job.yml -index ca798a7..3b14fa3 100644 ---- a/tests/ansible/integration/async/runner_one_job.yml -+++ b/tests/ansible/integration/async/runner_one_job.yml -@@ -37,7 +37,12 @@ - - result1.ansible_job_id == job1.ansible_job_id - - result1.attempts <= 100000 - - result1.changed == True -- - result1.cmd == "sleep 1;\n echo alldone" -+ - | -+ # ansible/b72e989e1837ccad8dcdc926c43ccbc4d8cdfe44 -+ (ansible_version.full >= '2.8' and -+ result1.cmd == "sleep 1;\necho alldone\n") or -+ (ansible_version.full < '2.8' and -+ result1.cmd == "sleep 1;\n echo alldone") - - result1.delta|length == 14 - - result1.start|length == 26 - - result1.finished == 1