Browse code

Add python-chardet, python-certifi and fixup dependencies

Also temporarily remove ddclient from full iso install (to avoid other
broken perl dependencies).

Change-Id: I6d7db5f623cc1b791bfe74bdba9c4f1adc6b8327
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5812
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
Tested-by: Anish Swaminathan <anishs@vmware.com>

Srivatsa S. Bhat authored on 2018/09/28 04:46:07
Showing 5 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,71 @@
0
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
3
+Summary:        Python package for providing Mozilla's CA Bundle
4
+Name:           python-certifi
5
+Version:        2018.08.24
6
+Release:        1%{?dist}
7
+URL:            https://github.com/certifi
8
+License:        MPL-2.0
9
+Group:          Development/Languages/Python
10
+Vendor:         VMware, Inc.
11
+Distribution:   Photon
12
+Source0:        https://github.com/certifi/python-certifi/archive/certifi-%{version}.tar.gz
13
+%define sha1    certifi=7433702a8c690e6cf6e7108e7bd3d8999d4976d6
14
+
15
+BuildRequires:  python2-devel
16
+BuildRequires:  python-setuptools
17
+BuildRequires:  ca-certificates
18
+%if %{with_check}
19
+BuildRequires:  python-pytest
20
+%endif
21
+
22
+Requires:       ca-certificates
23
+
24
+BuildArch:      noarch
25
+
26
+%description
27
+Certifi is a carefully curated collection of
28
+Root Certificates for validating the trustworthiness of
29
+SSL certificates while verifying the identity of TLS hosts
30
+
31
+%package -n     python3-certifi
32
+Summary:        Python 3 certifi library
33
+
34
+BuildRequires:  python3-devel
35
+BuildRequires:  python3-setuptools
36
+%if %{with_check}
37
+BuildRequires:  python3-pytest
38
+%endif
39
+
40
+Requires:       ca-certificates
41
+
42
+%description -n python3-certifi
43
+Python 3 version of certifi.
44
+
45
+%prep
46
+%setup -q -n python-certifi-%{version}
47
+
48
+%build
49
+python2 setup.py build
50
+python3 setup.py build
51
+
52
+%install
53
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
54
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
55
+
56
+%check
57
+python2 setup.py test
58
+python3 setup.py test
59
+
60
+%files
61
+%defattr(-,root,root,-)
62
+%{python2_sitelib}/*
63
+
64
+%files -n python3-certifi
65
+%defattr(-,root,root,-)
66
+%{python3_sitelib}/*
67
+
68
+%changelog
69
+*   Wed Sep 19 2018 Ajay Kaher <akaher@vmware.com> 2018.08.24-1
70
+-   Initial packaging
0 71
new file mode 100644
... ...
@@ -0,0 +1,75 @@
0
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
3
+Summary:        A Universal Character Encoding Detector in Python
4
+Name:           python-chardet
5
+Version:        3.0.4
6
+Release:        1%{?dist}
7
+Url:            https://pypi.org/project/chardet/
8
+License:        LGPL v2.1
9
+Group:          Development/Languages/Python
10
+Vendor:         VMware, Inc.
11
+Distribution:   Photon
12
+Source0:        https://github.com/chardet/chardet/archive/chardet-%{version}.tar.gz
13
+%define sha1    chardet=bf740348e002581b026dc4af47d56479097c1fcd
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
19
+%if %{with_check}
20
+BuildRequires:	python-pytest
21
+%endif
22
+
23
+Requires:       python2
24
+Requires:       python2-libs
25
+
26
+BuildArch:      noarch
27
+
28
+%description
29
+chardet is a universal character encoding detector in Python.
30
+
31
+%package -n     python3-chardet
32
+Summary:        python3-chardet
33
+
34
+BuildRequires:  python3
35
+BuildRequires:  python3-libs
36
+BuildRequires:  python3-devel
37
+BuildRequires:  python3-setuptools
38
+BuildRequires:  python3-xml
39
+%if %{with_check}
40
+BuildRequires:	python3-pytest
41
+%endif
42
+
43
+Requires:       python3
44
+Requires:       python3-libs
45
+
46
+%description -n python3-chardet
47
+Python 3 version of chardet.
48
+
49
+%prep
50
+%setup -q -n chardet-%{version}
51
+
52
+%build
53
+python2 setup.py build
54
+python3 setup.py build
55
+
56
+%install
57
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
58
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
59
+
60
+%check
61
+# TODO
62
+
63
+%files
64
+%defattr(-,root,root)
65
+%{python2_sitelib}/*
66
+
67
+%files -n python3-chardet
68
+%defattr(-,root,root,-)
69
+%{python3_sitelib}/*
70
+%{_bindir}/chardetect
71
+
72
+%changelog
73
+*   Thu Sep 27 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 3.0.4-1
74
+-   Initial packaging.
... ...
@@ -4,7 +4,7 @@
4 4
 Summary:        Awesome Python HTTP Library That's Actually Usable
5 5
 Name:           python-requests
6 6
 Version:        2.19.1
7
-Release:        1%{?dist}
7
+Release:        2%{?dist}
8 8
 License:        Apache2
9 9
 Group:          Development/Languages/Python
10 10
 Vendor:         VMware, Inc.
... ...
@@ -18,6 +18,11 @@ BuildRequires:  python2-libs
18 18
 BuildRequires:  python-setuptools
19 19
 Requires:       python2
20 20
 Requires:       python2-libs
21
+Requires:       python-urllib3
22
+Requires:       python-chardet
23
+Requires:       python-pyOpenSSL
24
+Requires:       python-certifi
25
+Requires:       python-idna
21 26
 
22 27
 BuildArch:      noarch
23 28
 
... ...
@@ -53,6 +58,12 @@ BuildRequires:  python3-setuptools
53 53
 BuildRequires:  python3-xml
54 54
 Requires:       python3
55 55
 Requires:       python3-libs
56
+Requires:       python3-urllib3
57
+Requires:       python3-chardet
58
+Requires:       python3-pyOpenSSL
59
+Requires:       python3-certifi
60
+Requires:       python3-idna
61
+
56 62
 %description -n python3-requests
57 63
 Python 3 version.
58 64
 
... ...
@@ -87,6 +98,9 @@ popd
87 87
 %{python3_sitelib}/*
88 88
 
89 89
 %changelog
90
+*   Thu Sep 27 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 2.19.1-2
91
+-   Add a few missing runtime dependencies (urllib3, chardet,
92
+-   pyOpenSSL, certifi, idna).
90 93
 *   Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 2.19.1-1
91 94
 -   Update to version 2.19.1
92 95
 *   Mon Aug 07 2017 Xiaolin Li <xiaolinl@vmware.com> 2.13.0-3
... ...
@@ -178,7 +178,6 @@
178 178
         "cifs-utils",
179 179
         "c-ares",
180 180
         "dnsmasq",
181
-        "ddclient",
182 181
         "netmgmt",
183 182
         "motd"
184 183
     ]
... ...
@@ -5,5 +5,6 @@
5 5
                   "libffi","expat","linux","cpio","Linux-PAM","attr","libcap", "systemd","dbus",
6 6
                   "gzip", "sqlite","nspr","nss","popt","lua","rpm","gptfdisk","tar",
7 7
                   "hawkey", "python3","python3-libs","pcre","glib", "tdnf", "python3-requests",
8
+                  "python3-urllib3", "python3-chardet", "python3-pyOpenSSL", "python3-certifi", "python3-idna",
8 9
                   "grub2-pc", "grub2-efi", "efivar", "efibootmgr", "dracut", "curl", "dosfstools"]
9 10
 }