From 1951f6c9e2c7dcc607edcc591b16d43c492ad728 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 31 Mar 2020 10:12:52 -0500 Subject: [PATCH 1/2] pin to older python2 versions for kalite on U-20 --- roles/kalite/tasks/install.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index 6a17553d7..9acb7bebd 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -17,6 +17,21 @@ state: present when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19) # 2020-03-27: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. +- name: Use pip to pin older working versions in {{ kalite_venv }} if Raspbian/Debian > 10 or Ubuntu > 19 + pip: + name: + - ipaddr + - pip<20 + - setuptools<45 + - wheel<34 + virtualenv: "{{ kalite_venv }}" # /usr/local/kalite/venv + virtualenv_site_packages: no + virtualenv_command: /usr/bin/virtualenv + virtualenv_python: python2.7 + extra_args: "--no-use-pep517 --no-cache-dir --no-python-version-warning" + when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19) + # 2020-03-27: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. + - name: Use pip to install KA Lite static to {{ kalite_venv }} pip: name: ka-lite-static @@ -26,7 +41,6 @@ virtualenv_command: /usr/bin/virtualenv virtualenv_python: python2.7 extra_args: "--no-cache-dir" - #extra_args="--disable-pip-version-check" when: internet_available | bool - name: "Install from template: venv wrapper /usr/bin/kalite, systemd unit file kalite-serve.service, Apache's kalite.conf" @@ -47,6 +61,15 @@ path: /usr/local/kalite/venv/local/lib/python2.7/site-packages/kalite/packages/dist/ifcfg/parser.py regexp: 'a-zA-Z0-9' replace: 'a-zA-Z0-9\-' + when: not is_ubuntu_20 + +- name: U-20 Fix KA Lite bug in regex parsing ifconfig output, for @m-anish's network names that contain dashes + replace: + path: /usr/local/kalite/venv/lib/python2.7/site-packages/kalite/packages/dist/ifcfg/parser.py + regexp: 'a-zA-Z0-9' + replace: 'a-zA-Z0-9\-' + when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19) + # JV why not just is_ubuntu_20? - name: Create dir {{ kalite_root }} file: From ea88a2e892a200b7a10a8070d99a9a4939940b9f Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 31 Mar 2020 12:28:46 -0400 Subject: [PATCH 2/2] KA Lite Parser fix should always run (2 possible paths) --- roles/kalite/tasks/install.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index 9acb7bebd..7ba045264 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -15,7 +15,8 @@ package: name: python2 state: present - when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19) # 2020-03-27: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. + when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19) + # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. - name: Use pip to pin older working versions in {{ kalite_venv }} if Raspbian/Debian > 10 or Ubuntu > 19 pip: @@ -30,7 +31,7 @@ virtualenv_python: python2.7 extra_args: "--no-use-pep517 --no-cache-dir --no-python-version-warning" when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19) - # 2020-03-27: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. + # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. - name: Use pip to install KA Lite static to {{ kalite_venv }} pip: @@ -56,19 +57,21 @@ - { src: 'kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode: '0644'} - { src: 'kalite.conf', dest: '/etc/{{ apache_conf_dir }}', mode: '0644'} -- name: Fix KA Lite bug in regex parsing ifconfig output, for @m-anish's network names that contain dashes +- name: Fix KA Lite bug in regex parsing ifconfig output, for @m-anish's network names that contain dashes, if Raspbian/Debian < 11 or Ubuntu < 20 replace: path: /usr/local/kalite/venv/local/lib/python2.7/site-packages/kalite/packages/dist/ifcfg/parser.py regexp: 'a-zA-Z0-9' replace: 'a-zA-Z0-9\-' - when: not is_ubuntu_20 + when: is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19 + # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. -- name: U-20 Fix KA Lite bug in regex parsing ifconfig output, for @m-anish's network names that contain dashes +- name: Fix KA Lite bug in regex parsing ifconfig output, for @m-anish's network names that contain dashes, if Raspbian/Debian > 10 or Ubuntu > 19 replace: path: /usr/local/kalite/venv/lib/python2.7/site-packages/kalite/packages/dist/ifcfg/parser.py regexp: 'a-zA-Z0-9' replace: 'a-zA-Z0-9\-' when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19) + # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. # JV why not just is_ubuntu_20? - name: Create dir {{ kalite_root }}