Browse code

Pick fix for Bug 1828876 from 1.0 to dev. (Python2 provides /bin/python2, python3 provides /bin/python3)

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

xiaolin-vmware authored on 2017/03/25 11:06:22
Showing 2 changed files
... ...
@@ -1,32 +1,33 @@
1
-Summary:	A high-level scripting language
2
-Name:		python2
3
-Version:	2.7.13
4
-Release:	1%{?dist}
5
-License:	PSF
6
-URL:		http://www.python.org/
7
-Group:		System Environment/Programming
8
-Vendor:		VMware, Inc.
9
-Distribution:	Photon
10
-Source0:	http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
11
-%define sha1 Python=18a8f30a0356c751b8d0ea6f76e764cab13ee046
12
-Patch0: cgi.patch
13
-Patch1: added-compiler-flags-for-curses-module.patch
14
-Patch2: added-pyopenssl-ipaddress-certificate-validation.patch
15
-Patch3: python2-support-photon-platform.patch
16
-BuildRequires:	pkg-config >= 0.28
17
-BuildRequires:	bzip2-devel
1
+Summary:        A high-level scripting language
2
+Name:           python2
3
+Version:        2.7.13
4
+Release:        2%{?dist}
5
+License:        PSF
6
+URL:            http://www.python.org/
7
+Group:          System Environment/Programming
8
+Vendor:         VMware, Inc.
9
+Distribution:   Photon
10
+Source0:        http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
11
+%define sha1    Python=18a8f30a0356c751b8d0ea6f76e764cab13ee046
12
+Patch0:         cgi.patch
13
+Patch1:         added-compiler-flags-for-curses-module.patch
14
+Patch2:         added-pyopenssl-ipaddress-certificate-validation.patch
15
+Patch3:         python2-support-photon-platform.patch
16
+BuildRequires:  pkg-config >= 0.28
17
+BuildRequires:  bzip2-devel
18 18
 BuildRequires:  openssl-devel
19
-BuildRequires:	expat >= 2.1.0
20
-BuildRequires:	libffi >= 3.0.13
21
-BuildRequires:	sqlite-devel
22
-BuildRequires:	ncurses-devel
23
-BuildRequires:	readline-devel
24
-Requires:	bzip2
25
-Requires:  	openssl
26
-Requires:	python2-libs = %{version}-%{release}
27
-Provides: 	python-sqlite
28
-Provides: 	python(abi)
29
-Provides: 	/bin/python
19
+BuildRequires:  expat >= 2.1.0
20
+BuildRequires:  libffi >= 3.0.13
21
+BuildRequires:  sqlite-devel
22
+BuildRequires:  ncurses-devel
23
+BuildRequires:  readline-devel
24
+Requires:       bzip2
25
+Requires:       openssl
26
+Requires:       python2-libs = %{version}-%{release}
27
+Provides:       python-sqlite
28
+Provides:       python(abi)
29
+Provides:       /bin/python
30
+Provides:       /bin/python2
30 31
 
31 32
 %description
32 33
 The Python 2 package contains the Python development environment. It 
... ...
@@ -37,11 +38,11 @@ version is for backward compatibility with other dependent packages.
37 37
 %package libs
38 38
 Summary: The libraries for python runtime
39 39
 Group: Applications/System
40
-Requires:	sqlite-libs
41
-Requires:	expat >= 2.1.0
42
-Requires:	libffi >= 3.0.13
43
-Requires:	ncurses
44
-Requires:	coreutils
40
+Requires:       sqlite-libs
41
+Requires:       expat >= 2.1.0
42
+Requires:       libffi >= 3.0.13
43
+Requires:       ncurses
44
+Requires:       coreutils
45 45
 
46 46
 # Needed for ctypes, to load libraries, worked around for Live CDs size
47 47
 # Requires: binutils
... ...
@@ -107,17 +108,17 @@ to build python programs.
107 107
 %build
108 108
 export OPT="${CFLAGS}"
109 109
 ./configure \
110
-	CFLAGS="%{optflags}" \
111
-	CXXFLAGS="%{optflags}" \
112
-	--prefix=%{_prefix} \
113
-	--bindir=%{_bindir} \
114
-	--libdir=%{_libdir} \
115
-	--enable-shared \
116
-	--with-ssl \
117
-	--with-system-expat \
118
-	--with-system-ffi \
119
-	--enable-unicode=ucs4 \
120
-	--with-dbmliborder=gdbm:ndbm
110
+    CFLAGS="%{optflags}" \
111
+    CXXFLAGS="%{optflags}" \
112
+    --prefix=%{_prefix} \
113
+    --bindir=%{_bindir} \
114
+    --libdir=%{_libdir} \
115
+    --enable-shared \
116
+    --with-ssl \
117
+    --with-system-expat \
118
+    --with-system-ffi \
119
+    --enable-unicode=ucs4 \
120
+    --with-dbmliborder=gdbm:ndbm
121 121
 make %{?_smp_mflags}
122 122
 %install
123 123
 [ %{buildroot} != "/"] && rm -rf %{buildroot}/*
... ...
@@ -137,8 +138,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/python2.7/LICENSE.txt
137 137
 find %{buildroot}%{_libdir} -name '*.pyc' -delete
138 138
 find %{buildroot}%{_libdir} -name '*.pyo' -delete
139 139
 
140
-%post	-p /sbin/ldconfig
141
-%postun	-p /sbin/ldconfig
140
+%post   -p /sbin/ldconfig
141
+%postun -p /sbin/ldconfig
142 142
 %clean
143 143
 rm -rf %{buildroot}/*
144 144
 
... ...
@@ -218,6 +219,8 @@ rm -rf %{buildroot}/*
218 218
 %{_bindir}/idle*
219 219
 
220 220
 %changelog
221
+*   Fri Mar 24 2017 Xiaolin Li <xiaolinl@vmware.com> 2.7.13-2
222
+-   Provides /bin/python2.
221 223
 *   Wed Mar 22 2017 Divya Thaluru <dthaluru@vmware.com> 2.7.13-1
222 224
 -   Updated to version 2.7.13
223 225
 *   Fri Jan 20 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.7.11-11
... ...
@@ -258,4 +261,4 @@ rm -rf %{buildroot}/*
258 258
 -   Adding coreutils package to run time required package
259 259
 
260 260
 *   Mon Apr 6 2015 Divya Thaluru <dthaluru@vmware.com> 2.7.9-1
261
--   Initial build.	First version
261
+-   Initial build.  First version
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        A high-level scripting language
2 2
 Name:           python3
3 3
 Version:        3.5.3
4
-Release:        1%{?dist}
4
+Release:        2%{?dist}
5 5
 License:        PSF
6 6
 URL:            http://www.python.org/
7 7
 Group:          System Environment/Programming
... ...
@@ -27,6 +27,7 @@ Provides:       python-sqlite
27 27
 Provides:       python(abi)
28 28
 Provides:       /usr/bin/python
29 29
 Provides:       /bin/python
30
+Provides:       /bin/python3
30 31
 
31 32
 %description
32 33
 The Python 3 package contains a new version of Python development environment.
... ...
@@ -188,6 +189,8 @@ rm -rf %{buildroot}/*
188 188
 %{_bindir}/idle*
189 189
 
190 190
 %changelog
191
+*   Thu Mar 23 2017 Xiaolin Li <xiaolinl@vmware.com> 3.5.3-2
192
+-   Provides /bin/python3.
191 193
 *   Tue Feb 28 2017 Xiaolin Li <xiaolinl@vmware.com> 3.5.3-1
192 194
 -   Updated to version 3.5.3.
193 195
 *   Fri Jan 20 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.5.1-10