From e5996667f5bce583a2d40dae1a953730fd0422f8 Mon Sep 17 00:00:00 2001 From: Ran An Date: Fri, 15 May 2020 01:34:52 +0000 Subject: [PATCH] Add python3-daemon required by logmgmt This reverts commit fc125a7a24c00850aafd4a791a63e8e627b5ee1e. pkg logmgmt upgraded to python3 requires python3 model "daemon", and no pkgs in Centos7 offical repo provide it. this patch refer to the python3-daemon pkg build by rdo for CentOS 8: python-daemon-2.2.3-7.el8.src.rpm disable the rpm check part which is not required in stx to reduce python3 dependencies that not supported by CentOS 7 Depends-on: https://review.opendev.org/#/c/728324/ Depends-on: https://review.opendev.org/#/c/729635/ Depends-on: https://review.opendev.org/#/c/728326/ Change-Id: Iad2e4bb2f2087f46b7c27e80a9423cd5cc1e0517 Story: 2007106 Task: 39291 Signed-off-by: SidneyAn --- centos_pkg_dirs | 1 + python/python-daemon/centos/build_srpm.data | 1 + .../0001-using-el7-python3-dep-pkgs.patch | 66 +++++++++++++++++++ .../centos/meta_patches/PATCH_ORDER | 1 + python/python-daemon/centos/srpm_path | 1 + 5 files changed, 70 insertions(+) create mode 100644 python/python-daemon/centos/build_srpm.data create mode 100644 python/python-daemon/centos/meta_patches/0001-using-el7-python3-dep-pkgs.patch create mode 100644 python/python-daemon/centos/meta_patches/PATCH_ORDER create mode 100644 python/python-daemon/centos/srpm_path diff --git a/centos_pkg_dirs b/centos_pkg_dirs index 1666bd4a2..21b5f20f3 100644 --- a/centos_pkg_dirs +++ b/centos_pkg_dirs @@ -80,3 +80,4 @@ requests-toolbelt python/python-mechanize python/python-html5lib python/python-webencodings +python/python-daemon diff --git a/python/python-daemon/centos/build_srpm.data b/python/python-daemon/centos/build_srpm.data new file mode 100644 index 000000000..8aeb55368 --- /dev/null +++ b/python/python-daemon/centos/build_srpm.data @@ -0,0 +1 @@ +TIS_PATCH_VER=1 diff --git a/python/python-daemon/centos/meta_patches/0001-using-el7-python3-dep-pkgs.patch b/python/python-daemon/centos/meta_patches/0001-using-el7-python3-dep-pkgs.patch new file mode 100644 index 000000000..5ef07c9b4 --- /dev/null +++ b/python/python-daemon/centos/meta_patches/0001-using-el7-python3-dep-pkgs.patch @@ -0,0 +1,66 @@ +From 1539089bcd70852304a630e56516f21645d94484 Mon Sep 17 00:00:00 2001 +From: SidneyAn +Date: Fri, 3 Apr 2020 06:51:41 +0000 +Subject: using el7 python3 dep pkgs + +using el7 pkgs as python3 dep instead of el8 ones +unit tests are also disabled to reduce the python3 deps +which is not supported by el7 + +Signed-off-by: SidneyAn +--- + SPECS/python-daemon.spec | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/SPECS/python-daemon.spec b/SPECS/python-daemon.spec +index 97e1cb2..686228e 100644 +--- a/SPECS/python-daemon.spec ++++ b/SPECS/python-daemon.spec +@@ -1,7 +1,7 @@ + %{?python_enable_dependency_generator} + Name: python-daemon + Version: 2.2.3 +-Release: 7%{?dist} ++Release: 7.el8%{?_tis_dist}.%{tis_patch_ver} + Summary: Library to implement a well-behaved Unix daemon process + + # Some build scripts and test franework are licensed GPLv3+ but htose aren't shipped +@@ -15,11 +15,11 @@ Patch1: 0001-Mock-the-.__class__-attribute-so-tests-pass-in-py2.patch + + BuildArch: noarch + BuildRequires: python3-devel, python3-setuptools +-BuildRequires: python3-testscenarios +-BuildRequires: python3-docutils ++#BuildRequires: python3-testscenarios ++BuildRequires: python36-docutils + BuildRequires: python3-lockfile +-BuildRequires: python3-mock +-BuildRequires: python3-testtools ++BuildRequires: python36-mock ++#BuildRequires: python3-testtools + + %global _description\ + This library implements the well-behaved daemon specification of PEP 3143,\ +@@ -32,8 +32,8 @@ This is the python2 version of the library. + %package -n python3-daemon + Summary: Library to implement a well-behaved Unix daemon process + Requires: python3-lockfile +-Requires: python3-docutils +-%{?python_provide:%python_provide python3-daemon} ++Requires: python36-docutils ++%{?python_provide:%python_provide python%{python3_pkgversion}-daemon} + + %description -n python3-daemon %_description + +@@ -51,7 +51,7 @@ rm -fr %{buildroot}%{python3_sitelib}/tests + + # Test suite requires minimock and lockfile + %check +-PYTHONPATH=$(pwd) %{__python3} -m unittest discover ++#PYTHONPATH=$(pwd) %{__python3} -m unittest discover + + %files -n python3-daemon + %license LICENSE.ASF-2 +-- +2.7.4 + diff --git a/python/python-daemon/centos/meta_patches/PATCH_ORDER b/python/python-daemon/centos/meta_patches/PATCH_ORDER new file mode 100644 index 000000000..dba6bc4b8 --- /dev/null +++ b/python/python-daemon/centos/meta_patches/PATCH_ORDER @@ -0,0 +1 @@ +0001-using-el7-python3-dep-pkgs.patch diff --git a/python/python-daemon/centos/srpm_path b/python/python-daemon/centos/srpm_path new file mode 100644 index 000000000..b37e0b69d --- /dev/null +++ b/python/python-daemon/centos/srpm_path @@ -0,0 +1 @@ +mirror:Source/python-daemon-2.2.3-7.el8.src.rpm