Browse code

Added requires for paramiko

Added packages:
- bcrypt
- PyNaCl

Change-Id: I7e6020f86235b59bc76d97e735418fdc7abc8718
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6830
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

Tapas Kundu authored on 2019/03/07 04:11:24
Showing 3 changed files
... ...
@@ -3,7 +3,7 @@
3 3
 Summary:        Python SSH module
4 4
 Name:           paramiko
5 5
 Version:        2.4.2
6
-Release:        1%{?dist}
6
+Release:        2%{?dist}
7 7
 License:        LGPL
8 8
 Group:          System Environment/Security
9 9
 Vendor:         VMware, Inc.
... ...
@@ -19,29 +19,32 @@ BuildRequires:  python2-devel
19 19
 BuildRequires:  ecdsa > 0.11
20 20
 BuildRequires:  pycrypto > 2.1
21 21
 BuildRequires:  python-cryptography
22
-
22
+BuildRequires:  python3-devel
23
+BuildRequires:  python3-ecdsa > 0.11
24
+BuildRequires:  python3-pycrypto > 2.1
25
+BuildRequires:  python3-cryptography
26
+BuildRequires:  python3-setuptools
27
+BuildRequires:  python3-xml
23 28
 Requires:       python2
24 29
 Requires:       pycrypto > 2.1
25 30
 Requires:       ecdsa > 0.11
26 31
 Requires:       python-cryptography
27
-
32
+Requires:       python-PyNaCl
33
+Requires:       python-bcrypt
28 34
 
29 35
 %description
30 36
 "Paramiko" is a combination of the esperanto words for "paranoid" and "friend". It's a module for Python 2.6+ that implements the SSH2 protocol for secure (encrypted and authenticated) connections to remote machines. Unlike SSL (aka TLS), SSH2 protocol does not require hierarchical certificates signed by a powerful central authority.
31 37
 
32 38
 %package -n     python3-paramiko
33 39
 Summary:        python3-paramiko
34
-BuildRequires:  python3-devel
35
-BuildRequires:  python3-ecdsa > 0.11
36
-BuildRequires:  python3-pycrypto > 2.1
37
-BuildRequires:  python3-cryptography
38
-BuildRequires:  python3-setuptools
39
-BuildRequires:  python3-xml
40 40
 
41 41
 Requires:       python3
42 42
 Requires:       python3-pycrypto > 2.1
43 43
 Requires:       python3-ecdsa > 0.11
44 44
 Requires:       python3-cryptography
45
+Requires:       python3-PyNaCl
46
+Requires:       python3-bcrypt
47
+
45 48
 %description -n python3-paramiko
46 49
 
47 50
 Python 3 version.
... ...
@@ -81,6 +84,8 @@ LANG=en_US.UTF-8 python3 test.py
81 81
 %{python3_sitelib}/*
82 82
 
83 83
 %changelog
84
+*   Wed Mar 06 2019 Tapas Kundu <tkundu@vmware.com> 2.4.2-2
85
+-   Added bcrypt and PyNaCl to requires.
84 86
 *   Thu Jan 10 2019 Siju Maliakkal <smaliakkal@vmware.com> 2.4.2-1
85 87
 -   Upgraded to 2.4.2 to mitigate CVE-2018-1000805
86 88
 *   Tue Sep 11 2018 Him Kalyan Bordoloi <bordoloih@vmware.com> 2.4.1-1
87 89
new file mode 100644
... ...
@@ -0,0 +1,72 @@
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
+Name:           python-PyNaCl
4
+Version:        1.3.0
5
+Release:        1%{?dist}
6
+Summary:        PyNaCl is a Python binding to libsodium
7
+License:        Apache License, Version 2.0
8
+Group:          Development/Languages/Python
9
+Url:            http://pypi.python.org/packages/source/e/PyNaCl/PyNaCl-%{version}.tar.gz
10
+Vendor:		VMware, Inc.
11
+Distribution: 	Photon
12
+Source0:        PyNaCl-%{version}.tar.gz
13
+%define sha1    PyNaCl=c078953e5643ad4ff7881a4627f5147eb5c76cf4
14
+BuildRequires:  python2
15
+BuildRequires:  python2-libs
16
+BuildRequires:  python2-devel
17
+BuildRequires:  python-setuptools
18
+BuildRequires:  python-cffi
19
+BuildRequires:  python-xml
20
+BuildRequires:  python3
21
+BuildRequires:  python3-libs
22
+BuildRequires:  python3-devel
23
+BuildRequires:  python3-setuptools
24
+BuildRequires:  python3-cffi
25
+BuildRequires:  python3-xml
26
+Requires:       python2
27
+Requires:       python2-libs
28
+
29
+
30
+%description
31
+Good password hashing for your software and your servers.
32
+
33
+%package -n     python3-PyNaCl
34
+Summary:        python-PyNaCl
35
+Requires:       python3
36
+Requires:       python3-libs
37
+
38
+%description -n python3-PyNaCl
39
+Python 3 version.
40
+
41
+%prep
42
+%setup -n PyNaCl-%{version}
43
+rm -rf ../p3dir
44
+cp -a . ../p3dir
45
+
46
+%build
47
+python2 setup.py build
48
+pushd ../p3dir
49
+python3 setup.py build
50
+popd
51
+
52
+%install
53
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
54
+pushd ../p3dir
55
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
56
+popd
57
+
58
+%check
59
+python2 setup.py test
60
+
61
+%files
62
+%defattr(-,root,root,-)
63
+%{python2_sitelib}/*
64
+
65
+%files -n python3-PyNaCl
66
+%defattr(-,root,root)
67
+%{python3_sitelib}/*
68
+
69
+%changelog
70
+*   Wed Mar 06 2019 Tapas Kundu <tkundu@vmware.com> 1.3.0-1
71
+-   Initial packaging for Photon
0 72
new file mode 100644
... ...
@@ -0,0 +1,73 @@
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
+Name:           python-bcrypt
4
+Version:        3.1.6
5
+Release:        1%{?dist}
6
+Summary:        Good password hashing for your software and your servers.
7
+License:        Apache License, Version 2.0
8
+Group:          Development/Languages/Python
9
+Url:            http://pypi.python.org/packages/source/e/bcrypt/bcrypt-%{version}.tar.gz
10
+Vendor:		VMware, Inc.
11
+Distribution: 	Photon
12
+Source0:        bcrypt-%{version}.tar.gz
13
+%define sha1    bcrypt=03a17719edea2f3d1e32b5c510171df304769542
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
19
+BuildRequires:  python-cffi
20
+BuildRequires:  python-xml
21
+BuildRequires:  python3
22
+BuildRequires:  python3-libs
23
+BuildRequires:  python3-devel
24
+BuildRequires:  python3-setuptools
25
+BuildRequires:  python3-cffi
26
+BuildRequires:  python3-xml
27
+Requires:       python2
28
+Requires:       python2-libs
29
+
30
+
31
+%description
32
+Good password hashing for your software and your servers.
33
+
34
+%package -n     python3-bcrypt
35
+Summary:        python-bcrypt
36
+Requires:       python3
37
+Requires:       python3-libs
38
+
39
+%description -n python3-bcrypt
40
+Python 3 version.
41
+
42
+%prep
43
+%setup -n bcrypt-%{version}
44
+rm -rf ../p3dir
45
+cp -a . ../p3dir
46
+
47
+%build
48
+python2 setup.py build
49
+pushd ../p3dir
50
+python3 setup.py build
51
+popd
52
+
53
+%install
54
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
55
+pushd ../p3dir
56
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
57
+popd
58
+
59
+%check
60
+python2 setup.py test
61
+
62
+%files
63
+%defattr(-,root,root,-)
64
+%{python2_sitelib}/*
65
+
66
+%files -n python3-bcrypt
67
+%defattr(-,root,root)
68
+%{python3_sitelib}/*
69
+
70
+%changelog
71
+*   Wed Mar 06 2019 Tapas Kundu <tkundu@vmware.com> 3.1.6-1
72
+-   Initial packaging for Photon