Browse code

Added python3 to gobject-introspection and syslog-ng, remove all packages depended on python2 from packages_full.json. (Bug 1878219)

Change-Id: I29bfcec5d676dd25e4ffe9d2b7d5e0bc94cf0ea4
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2847
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>

xiaolin-vmware authored on 2017/06/02 18:59:44
Showing 3 changed files
... ...
@@ -1,76 +1,100 @@
1
-%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
2
-
3
-Name:       	gobject-introspection
4
-Summary:    	Introspection system for GObject-based libraries
5
-Version:    	1.52.1
6
-Release:    	1%{?dist}
7
-Group:      	Development/Libraries
8
-License:    	GPLv2+, LGPLv2+, MIT
9
-URL:        	http://live.gnome.org/GObjectIntrospection
10
-Source0:    	http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.52/%{name}-%{version}.tar.xz
1
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
3
+
4
+Name:           gobject-introspection
5
+Summary:        Introspection system for GObject-based libraries
6
+Version:        1.52.1
7
+Release:        2%{?dist}
8
+Group:          Development/Libraries
9
+License:        GPLv2+, LGPLv2+, MIT
10
+URL:            http://live.gnome.org/GObjectIntrospection
11
+Source0:        http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.52/%{name}-%{version}.tar.xz
11 12
 %define sha1 gobject-introspection=2a0c86bd23d27df0588b79404cfc5619ed6171e8
12
-Vendor:		VMware, Inc.
13
-Distribution:	Photon
13
+Vendor:         VMware, Inc.
14
+Distribution:   Photon
14 15
 BuildRequires:  gettext
15 16
 BuildRequires:  intltool
16 17
 BuildRequires:  flex
17 18
 BuildRequires:  bison
19
+BuildRequires:  which
18 20
 BuildRequires:  glib-devel
19 21
 BuildRequires:  libffi-devel
20
-BuildRequires:	go
21
-Requires:	libffi
22
-Requires:	glib >= 2.52.1
22
+BuildRequires:  go
23
+Requires:       libffi
24
+Requires:       glib >= 2.52.1
23 25
 %description
24 26
 GObject Introspection can scan C header and source files in order to
25 27
 generate introspection "typelib" files.  It also provides an API to examine
26 28
 typelib files, useful for creating language bindings among other
27 29
 things.
28 30
 
29
-%package python
30
-Summary:    Python package for handling GObject introspection data
31
-Group:      Development/Languages
32
-Requires:   %{name} = %{version}-%{release}
33
-BuildRequires:	python2-devel
34
-BuildRequires:	python2-libs
31
+%package        python
32
+Summary:        Python package for handling GObject introspection data
33
+Group:          Development/Languages
34
+Requires:       %{name} = %{version}-%{release}
35
+BuildRequires:  python2-devel
36
+BuildRequires:  python2-libs
35 37
 BuildRequires:  python-xml
36
-Requires:	python2
37
-%description python
38
+Requires:       python2
39
+Requires:       python-xml
40
+%description    python
41
+This package contains a Python package for handling the introspection
42
+data from Python.
43
+
44
+%package -n     python3-gobject-introspection
45
+Summary:        Python3 package for handling GObject introspection data
46
+Group:          Development/Languages
47
+Requires:       %{name} = %{version}-%{release}
48
+BuildRequires:  python3-devel
49
+BuildRequires:  python3-libs
50
+Requires:       python3
51
+%description -n python3-gobject-introspection
38 52
 This package contains a Python package for handling the introspection
39 53
 data from Python.
40 54
 
41 55
 %package devel
42
-Summary:    Libraries and headers for gobject-introspection
43
-Group:      Development/Libraries
44
-Requires:   %{name} = %{version}-%{release}
45
-Requires:   libffi-devel
46
-Requires:   glib-devel
47
-Requires:   python2
48
-Requires:   python2-devel
49
-Requires:   python2-libs
50
-Requires:   python-xml
56
+Summary:        Libraries and headers for gobject-introspection
57
+Group:          Development/Libraries
58
+Requires:       %{name} = %{version}-%{release}
59
+Requires:       libffi-devel
60
+Requires:       glib-devel
51 61
 
52 62
 %description devel
53 63
 Libraries and headers for gobject-introspection.
54 64
 
55 65
 %prep
56 66
 %setup -q
67
+rm -rf ../p3dir
68
+cp -a . ../p3dir
57 69
 
58 70
 %build
59
-%configure
71
+%configure --with-python=/usr/bin/python2
72
+make %{?_smp_mflags}
73
+
74
+pushd ../p3dir
75
+%configure --with-python=/usr/bin/python3
60 76
 make %{?_smp_mflags}
77
+popd
61 78
 
62 79
 %install
63
-rm -rf $RPM_BUILD_ROOT/*
80
+rm -rf %{buildroot}/*
64 81
 
65
-make install DESTDIR=$RPM_BUILD_ROOT
82
+pushd ../p3dir
83
+make install DESTDIR=%{buildroot}
84
+# Move the python3 modules to the correct location
85
+mkdir -p %{buildroot}/%{python3_sitelib}
86
+mv %{buildroot}/%{_libdir}/gobject-introspection/giscanner %{buildroot}/%{python3_sitelib}
87
+popd
66 88
 
89
+make install DESTDIR=%{buildroot}
67 90
 # Move the python modules to the correct location
68
-mkdir -p $RPM_BUILD_ROOT/%{python_sitelib}
69
-mv $RPM_BUILD_ROOT/%{_libdir}/gobject-introspection/giscanner $RPM_BUILD_ROOT/%{python_sitelib}
91
+mkdir -p %{buildroot}/%{python2_sitelib}
92
+mv %{buildroot}/%{_libdir}/gobject-introspection/giscanner %{buildroot}/%{python2_sitelib}
70 93
 
71 94
 rm -rf $RPM_BUILD_ROOT/%{_datarootdir}/gtk-doc/html
72 95
 find %{buildroot}%{_libdir} -name '*.la' -delete
73 96
 
97
+
74 98
 %check
75 99
 make  %{?_smp_mflags} check
76 100
 
... ...
@@ -88,7 +112,11 @@ make  %{?_smp_mflags} check
88 88
 
89 89
 %files python
90 90
 %defattr(-,root,root,-)
91
-%{python_sitelib}/giscanner
91
+%{python2_sitelib}/giscanner
92
+
93
+%files -n python3-gobject-introspection
94
+%defattr(-,root,root,-)
95
+%{python3_sitelib}/giscanner
92 96
 
93 97
 %files devel
94 98
 %defattr(-,root,root,-)
... ...
@@ -103,17 +131,19 @@ make  %{?_smp_mflags} check
103 103
 %doc %{_mandir}/man1/*.gz
104 104
 
105 105
 %changelog
106
-*	Wed Apr 12 2017 Danut Moraru <dmoraru@vmware.com> 1.52.1-1
107
--	Updated to version 1.52.1
108
-*       Thu Oct 06 2016 ChangLee <changlee@vmware.com> 1.46.0-3
109
--       Modified %check
110
-*	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.46.0-2
111
--	GA - Bump release of all rpms
112
-*       Thu Feb 25 2016 Kumar Kaushik <kaushikk@vmware.com> 1.46.0-1
113
--       Updated version.
114
-*       Mon Oct 12 2015 Xiaolin Li <xiaolinl@vmware.com> 1.43.3-4
115
--       Moving static lib files to devel package.
116
-*       Fri Oct 9 2015 Xiaolin Li <xiaolinl@vmware.com> 1.43.3-3
117
--       Removing la files from packages.
118
-*	Mon Jul 6 2015 Alexey Makhalov <amakhalov@vmware.com> 1.43.3-2
119
--	Added more requirements for devel subpackage.
106
+*   Tue May 23 2017 Xiaolin Li <xiaolinl@vmware.com> 1.52.1-2
107
+-   Added python3 subpackage.
108
+*   Wed Apr 12 2017 Danut Moraru <dmoraru@vmware.com> 1.52.1-1
109
+-   Updated to version 1.52.1
110
+*   Thu Oct 06 2016 ChangLee <changlee@vmware.com> 1.46.0-3
111
+-   Modified %check
112
+*   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.46.0-2
113
+-   GA - Bump release of all rpms
114
+*   Thu Feb 25 2016 Kumar Kaushik <kaushikk@vmware.com> 1.46.0-1
115
+-   Updated version.
116
+*   Mon Oct 12 2015 Xiaolin Li <xiaolinl@vmware.com> 1.43.3-4
117
+-   Moving static lib files to devel package.
118
+*   Fri Oct 9 2015 Xiaolin Li <xiaolinl@vmware.com> 1.43.3-3
119
+-   Removing la files from packages.
120
+*   Mon Jul 6 2015 Alexey Makhalov <amakhalov@vmware.com> 1.43.3-2
121
+-   Added more requirements for devel subpackage.
... ...
@@ -1,28 +1,30 @@
1
-Summary:	Next generation system logger facilty
2
-Name:		syslog-ng
3
-Version:	3.9.1
4
-Release:	1%{?dist}
5
-License:	GPL + LGPL
6
-URL:		https://syslog-ng.org/
7
-Group:		System Environment/Daemons
8
-Vendor: 	VMware, Inc.
9
-Distribution: 	Photon
10
-Source0:	https://github.com/balabit/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
11
-%define sha1 syslog-ng=1ca437393d8895654452bef8ac0b996fe73284f8
12
-Source1:	60-syslog-ng-journald.conf
13
-Requires:	glib
14
-Requires:	json-glib
15
-Requires:	json-c
16
-Requires:   	eventlog
17
-Requires:	python2
18
-Requires:	systemd
19
-BuildRequires:	eventlog
20
-BuildRequires:	glib-devel
21
-BuildRequires:	json-glib-devel
22
-BuildRequires:	json-c-devel
23
-BuildRequires:	python2-libs
24
-BuildRequires:	python2-devel
25
-BuildRequires:	systemd-devel
1
+%{!?python2_sitelib: %global python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
3
+Summary:        Next generation system logger facilty
4
+Name:           syslog-ng
5
+Version:        3.9.1
6
+Release:        2%{?dist}
7
+License:        GPL + LGPL
8
+URL:            https://syslog-ng.org/
9
+Group:          System Environment/Daemons
10
+Vendor:         VMware, Inc.
11
+Distribution:   Photon
12
+Source0:        https://github.com/balabit/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
13
+%define sha1    syslog-ng=1ca437393d8895654452bef8ac0b996fe73284f8
14
+Source1:        60-syslog-ng-journald.conf
15
+Requires:       glib
16
+Requires:       json-glib
17
+Requires:       json-c
18
+Requires:       eventlog
19
+Requires:       systemd
20
+BuildRequires:  eventlog
21
+BuildRequires:  glib-devel
22
+BuildRequires:  json-glib-devel
23
+BuildRequires:  json-c-devel
24
+BuildRequires:  systemd-devel
25
+BuildRequires:  python2-devel
26
+BuildRequires:  python2
27
+BuildRequires:  python2-libs
26 28
 
27 29
 %description
28 30
  The syslog-ng application is a flexible and highly scalable
... ...
@@ -30,41 +32,82 @@ BuildRequires:	systemd-devel
30 30
  centralized logging, where the aim is to collect the log messages of several
31 31
  devices to a single, central log server.
32 32
 
33
-%package	devel
34
-Summary:	Header and development files for syslog-ng
35
-Requires:	%{name} = %{version}
36
-%description	devel
33
+%package -n     python2-syslog-ng
34
+Summary:        python2-syslog-ng
35
+BuildRequires:  python2
36
+BuildRequires:  python2-devel
37
+BuildRequires:  python2-libs
38
+Requires:       python2
39
+Requires:       python2-libs
40
+
41
+%description -n python2-syslog-ng
42
+Python 2 version.
43
+
44
+%package -n     python3-syslog-ng
45
+Summary:        python3-syslog-ng
46
+BuildRequires:  python3
47
+BuildRequires:  python3-devel
48
+BuildRequires:  python3-libs
49
+Requires:       python3
50
+Requires:       python3-libs
51
+
52
+%description -n python3-syslog-ng
53
+Python 3 version.
54
+
55
+%package        devel
56
+Summary:        Header and development files for syslog-ng
57
+Requires:       %{name} = %{version}
58
+%description    devel
37 59
  syslog-ng-devel package contains header files, pkfconfig files, and libraries
38 60
  needed to build applications using syslog-ng APIs.
39 61
 
40
-%package	python
41
-Summary:	python interface for syslog-ng
42
-Requires:	%{name} = %{version}
43
-%description	python
44
- This packages has the python interface to syslog-ng
45
-
46 62
 %prep
47 63
 %setup -q
48
-
64
+rm -rf ../p3dir
65
+cp -a . ../p3dir
49 66
 %build
67
+
68
+./configure \
69
+    CFLAGS="%{optflags}" \
70
+    CXXFLAGS="%{optflags}" \
71
+    --disable-silent-rules \
72
+    --prefix=%{_prefix} \
73
+    --bindir=%{_bindir} \
74
+    --includedir=%{_includedir} \
75
+    --libdir=%{_libdir} \
76
+    --sysconfdir=/etc/syslog-ng \
77
+    --enable-systemd \
78
+    --with-systemdsystemunitdir=%{_libdir}/systemd/system \
79
+    --enable-json=yes \
80
+    --with-jsonc=system \
81
+    --disable-java \
82
+    --disable-redis \
83
+    --with-python=2 \
84
+    PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
85
+make %{?_smp_mflags}
86
+pushd ../p3dir
50 87
 ./configure \
51
-	CFLAGS="%{optflags}" \
52
-	CXXFLAGS="%{optflags}" \
53
-	--disable-silent-rules \
54
-	--prefix=%{_prefix} \
55
-	--bindir=%{_bindir} \
56
-	--includedir=%{_includedir} \
57
-	--libdir=%{_libdir} \
58
-	--sysconfdir=/etc/syslog-ng \
59
-	--enable-systemd \
60
-	--with-systemdsystemunitdir=%{_libdir}/systemd/system \
61
-	--enable-json=yes \
62
-	--with-jsonc=system \
63
-	--disable-java \
64
-	--disable-redis \
65
-        PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
88
+    CFLAGS="%{optflags}" \
89
+    CXXFLAGS="%{optflags}" \
90
+    --disable-silent-rules \
91
+    --prefix=%{_prefix} \
92
+    --bindir=%{_bindir} \
93
+    --includedir=%{_includedir} \
94
+    --libdir=%{_libdir} \
95
+    --sysconfdir=/etc/syslog-ng \
96
+    --enable-systemd \
97
+    --with-systemdsystemunitdir=%{_libdir}/systemd/system \
98
+    --enable-json=yes \
99
+    --with-jsonc=system \
100
+    --disable-java \
101
+    --disable-redis \
102
+    --with-python=3 \
103
+    PYTHON=/bin/python3 \
104
+    PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
66 105
 make %{?_smp_mflags}
67 106
 
107
+popd
108
+
68 109
 %install
69 110
 [ %{buildroot} != "/"] && rm -rf %{buildroot}/*
70 111
 make DESTDIR=%{buildroot} install
... ...
@@ -75,9 +118,19 @@ rm -rf %{buildroot}/%{_infodir}
75 75
 install -vd %{buildroot}%{_sysconfdir}/systemd/journald.conf.d/
76 76
 install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/systemd/journald.conf.d/
77 77
 %{_fixperms} %{buildroot}/*
78
+pushd ../p3dir
79
+make DESTDIR=%{buildroot} install
80
+rm %{buildroot}/%{_libdir}/pkgconfig/syslog-ng-test.pc
81
+rm %{buildroot}/%{_libdir}/syslog-ng/libtest/libsyslog-ng-test.a
82
+rm -rf %{buildroot}/%{_infodir}
83
+find %{buildroot} -name "*.la" -exec rm -f {} \;
84
+popd
78 85
 
79 86
 %check
80 87
 make %{?_smp_mflags} check
88
+pushd ../p3dir
89
+make %{?_smp_mflags} check
90
+popd
81 91
 
82 92
 %post
83 93
 if [ $1 -eq 1 ] ; then
... ...
@@ -107,6 +160,14 @@ rm -rf %{buildroot}/*
107 107
 %{_libdir}/syslog-ng/lib*.so
108 108
 /usr/share/syslog-ng/*
109 109
 
110
+%files -n python2-syslog-ng
111
+%defattr(-,root,root)
112
+%{python2_sitelib}/*
113
+
114
+%files -n python3-syslog-ng
115
+%defattr(-,root,root,-)
116
+%{python3_sitelib}/*
117
+
110 118
 %files devel
111 119
 %defattr(-,root,root)
112 120
 %{_includedir}/syslog-ng/*
... ...
@@ -114,11 +175,9 @@ rm -rf %{buildroot}/*
114 114
 %{_libdir}/libsyslog-ng-native-connector.a
115 115
 %{_libdir}/pkgconfig/*
116 116
 
117
-%files python
118
-%defattr(-,root,root)
119
-/usr/lib/python2.7/site-packages/*
120
-
121 117
 %changelog
118
+*   Thu May 18 2017 Xiaolin Li <xiaolinl@vmware.com> 3.9.1-2
119
+-   Move python2 requires to python2 subpackage and added python3 binding.
122 120
 *   Tue Apr 11 2017 Vinay Kulkarni <kulkarniv@vmware.com> 3.9.1-1
123 121
 -   Update to version 3.9.1
124 122
 *   Tue Oct 04 2016 ChangLee <changlee@vmware.com> 3.6.4-6
... ...
@@ -4,14 +4,13 @@
4 4
         "sudo",
5 5
         "XML-Parser",
6 6
         "intltool",
7
-        "mercurial",
8 7
         "libsigc++",
9 8
         "boost",
10 9
         "build-essential",
11 10
         "bison",
12 11
         "gdb",
13 12
         "libpipeline",
14
-        "python2-tools",
13
+        "python3-tools",
15 14
         "check",
16 15
         "libltdl",
17 16
         "glibc-lang",
... ...
@@ -46,20 +45,19 @@
46 46
         "perl-IO-Socket-SSL",
47 47
         "tcsh",
48 48
         "gobject-introspection",
49
-        "gobject-introspection-python",
49
+        "python3-gobject-introspection",
50 50
         "bash-lang",
51 51
         "kbd",
52 52
         "coreutils-lang",
53 53
         "libxslt",
54 54
         "docbook-xml",
55 55
         "docbook-xsl",
56
-        "gtk-doc",
57 56
         "texinfo",
58 57
         "tar",
59 58
         "kubernetes",
60 59
         "cyrus-sasl",
61 60
         "openldap",
62
-        "python-iniparse",
61
+        "python3-iniparse",
63 62
         "psmisc",
64 63
         "etcd",
65 64
         "util-linux-lang",
... ...
@@ -74,7 +72,7 @@
74 74
         "groff",
75 75
         "man-db",
76 76
         "man-pages",
77
-        "python-hawkey",
77
+        "python3-hawkey",
78 78
         "ruby",
79 79
         "wget",
80 80
         "Linux-PAM-lang",
... ...
@@ -85,7 +83,6 @@
85 85
         "nano",
86 86
         "ncurses-compat", 
87 87
         "tzdata",
88
-        "itstool",
89 88
         "sed-lang",
90 89
         "gptfdisk",
91 90
         "ntp",
... ...
@@ -101,12 +98,10 @@
101 101
         "ostree",
102 102
         "libhif",
103 103
         "rpm-ostree",
104
-        "createrepo",
105 104
         "glibmm",
106 105
         "deltarpm",
107 106
         "cdrkit",
108 107
         "libgsystem",
109
-        "rpm-ostree-toolbox",
110 108
         "libsepol",
111 109
         "libselinux",
112 110
         "device-mapper-libs",
... ...
@@ -117,21 +112,19 @@
117 117
         "device-mapper-event-libs",
118 118
         "libacl",
119 119
         "libselinux-utils",
120
-        "libselinux-python",
120
+        "libselinux-python3",
121 121
         "libaio",
122 122
         "thin-provisioning-tools",
123 123
         "lvm2",
124 124
         "lvm2-libs",
125
-        "lvm2-python-libs",
125
+        "python3-lvm2-libs",
126 126
         "lzo",
127 127
         "lzo-minilzo",
128 128
         "swig",
129
-        "pycurl",
130
-        "urlgrabber",
131
-        "yum-metadata-parser",
132
-        "yum",
129
+        "pycurl3",
130
+        "python3-yum-metadata-parser",
133 131
         "strace",
134
-        "cracklib-python",
132
+        "cracklib-python3",
135 133
         "haveged",
136 134
         "vim-extra",
137 135
         "postgresql",
... ...
@@ -181,13 +174,12 @@
181 181
         "openjdk8-sample",
182 182
         "openjdk8-doc",
183 183
         "haproxy",
184
-        "cython",
185
-        "python-lxml",
186
-        "python-pycparser",
187
-        "python-cffi",
188
-        "python-cryptography",
184
+        "cython3",
185
+        "python3-lxml",
186
+        "python3-pycparser",
187
+        "python3-cffi",
188
+        "python3-cryptography",
189 189
         "cifs-utils",
190
-        "python-curses",
191 190
         "c-ares",
192 191
         "dnsmasq",
193 192
         "ddclient",