Browse code

minor spec cleanups-5

Change-Id: Ic2ca96b6e8c305a90948ea08f9cf5473c83d84b7
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/18596
Tested-by: gerrit-photon <photon-checkins@vmware.com>

Shreenidhi Shedi authored on 2022/11/15 20:22:53
Showing 5 changed files
... ...
@@ -1,5 +1,3 @@
1
-%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
-
3 1
 Name:           docker-pycreds3
4 2
 Version:        0.4.0
5 3
 Release:        1%{?dist}
... ...
@@ -8,15 +6,18 @@ License:        ASL2.0
8 8
 Group:          Development/Languages/Python
9 9
 Vendor:         VMware, Inc.
10 10
 Distribution:   Photon
11
-Url:            https://files.pythonhosted.org/packages/c5/e6/d1f6c00b7221e2d7c4b470132c931325c8b22c51ca62417e300f5ce16009/docker-pycreds-%{version}.tar.gz
12
-Source0:        docker-pycreds-%{version}.tar.gz
13
-%define sha1    docker-pycreds=36a0e5d70f0a237e2bbd3f87dbd3e60a4e486d53
11
+URL:            https://github.com/shin-/dockerpy-creds
12
+
13
+Source0: https://github.com/shin-/dockerpy-creds/archive/refs/tags/docker-pycreds-%{version}.tar.gz
14
+%define sha512 docker-pycreds=ca5f68ef2405cc57c0b54224d4f8199c9a4c9217d78f627bffeb950998b09a69b608d1e365cac6859661346fd078c3d081828bb4ff2e18bf7a9384451ae2225a
14 15
 
15
-BuildRequires:  python3
16
-BuildRequires:  python3-libs
16
+BuildRequires:  python3-devel
17 17
 BuildRequires:  python3-setuptools
18
+%if 0%{?with_check}
19
+BuildRequires:  python3-pytest
20
+%endif
21
+
18 22
 Requires:       python3
19
-Requires:       python3-libs
20 23
 
21 24
 BuildArch:      noarch
22 25
 
... ...
@@ -24,26 +25,34 @@ BuildArch:      noarch
24 24
 Python API for docker credentials store
25 25
 
26 26
 %prep
27
-%setup -n docker-pycreds-%{version}
27
+%autosetup -p1 -n docker-pycreds-%{version}
28 28
 
29 29
 %build
30
-python3 setup.py build
30
+%py3_build
31 31
 
32 32
 %install
33
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
33
+%py3_install
34
+
35
+%clean
36
+rm -rf %{buildroot}
37
+
38
+%if 0%{?with_check}
39
+%check
40
+%pytest
41
+%endif
34 42
 
35 43
 %files
36 44
 %defattr(-,root,root,-)
37 45
 %{python3_sitelib}/*
38 46
 
39 47
 %changelog
40
-*   Thu Oct 15 2020 Ashwin H <ashwinh@vmware.com> 0.4.0-1
41
--   Upgrade to 0.4.0 release.
42
-*   Thu Jun 18 2020 Tapas Kundu <tkundu@vmware.com> 0.3.0-2
43
-=   Mass removal python2
44
-*   Tue Sep 04 2018 Tapas Kundu <tkundu@vmware.com> 0.3.0-1
45
--   Upgraded to 0.3.0 version
46
-*   Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 0.2.1-2
47
--   Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
48
-*   Sun Jun 04 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.2.1-1
49
--   Initial version of docker-pycreds for PhotonOS.
48
+* Thu Oct 15 2020 Ashwin H <ashwinh@vmware.com> 0.4.0-1
49
+- Upgrade to 0.4.0 release.
50
+* Thu Jun 18 2020 Tapas Kundu <tkundu@vmware.com> 0.3.0-2
51
+- Mass removal python2
52
+* Tue Sep 04 2018 Tapas Kundu <tkundu@vmware.com> 0.3.0-1
53
+- Upgraded to 0.3.0 version
54
+* Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 0.2.1-2
55
+- Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
56
+* Sun Jun 04 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.2.1-1
57
+- Initial version of docker-pycreds for PhotonOS.
... ...
@@ -6,12 +6,13 @@ Group:         Applications/System
6 6
 Vendor:        VMware, Inc.
7 7
 License:       MIT
8 8
 URL:           https://github.com/stedolan/jq
9
-Source0:       https://github.com/stedolan/jq/releases/download/jq-%{version}/jq-%{version}.tar.gz
10
-%define sha1 jq=73bcbdc45be4db907a864e829b06cd869f77f4f7
11 9
 Distribution:  Photon
12
-%if %{with_check}
13
-BuildRequires: which
14 10
 
11
+Source0: https://github.com/stedolan/jq/releases/download/jq-%{version}/jq-%{version}.tar.gz
12
+%define sha512 %{name}=5da71f53c325257f1f546a2520fe47828b495c953270df25ea0e37741463fdda72f0ba4d5b05b25114ec30f27a559344c2b024bacabf610759f4e3e9efadb480
13
+
14
+%if 0%{?with_check}
15
+BuildRequires: which
15 16
 %endif
16 17
 
17 18
 %description
... ...
@@ -26,22 +27,25 @@ Requires:   %{name} = %{version}-%{release}
26 26
 Development files for jq
27 27
 
28 28
 %prep
29
-%setup -n %{name}-%{version}
29
+%autosetup -p1 -n %{name}-%{version}
30 30
 
31 31
 %build
32 32
 autoreconf -fi
33
-%configure --with-oniguruma=no --disable-static
34
-make %{?_smp_mflags}
33
+%configure \
34
+    --with-oniguruma=no \
35
+    --disable-static
36
+
37
+%make_build
35 38
 
36 39
 %install
37
-make DESTDIR=%{buildroot} install
38
-find %{buildroot} -name '*.la' -delete
40
+%make_install %{?_smp_mflags}
39 41
 
42
+%if 0%{?with_check}
40 43
 %check
41
-make check
44
+make check %{?_smp_mflags}
45
+%endif
42 46
 
43 47
 %post -p /sbin/ldconfig
44
-
45 48
 %postun -p /sbin/ldconfig
46 49
 
47 50
 %clean
... ...
@@ -57,15 +61,15 @@ rm -rf %{buildroot}/*
57 57
 %{_includedir}/*
58 58
 
59 59
 %changelog
60
-*  Tue Oct 27 2020 Dweep Advani <dadvani@vmware.com> 1.6-2
61
--  Removed bundled oniguruma library
62
-*  Tue Jun 30 2020 Gerrit Photon <photon-checkins@vmware.com> 1.6-1
63
--  Automatic Version Bump
64
-*  Mon Nov 19 2018 Ashwin H<ashwinh@vmware.com> 1.5-4
65
--  Add which for %check
66
-*  Tue Aug 22 2017 Chang Lee <changlee@vmware.com> 1.5-3
67
--  Add oniguruma for %check
68
-*  Wed Jun 07 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.5-2
69
--  Fix for CVE-2015-8863 and CVE-2016-4074
70
-*  Mon May 15 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.5-1
71
--  Initial version
60
+* Tue Oct 27 2020 Dweep Advani <dadvani@vmware.com> 1.6-2
61
+- Removed bundled oniguruma library
62
+* Tue Jun 30 2020 Gerrit Photon <photon-checkins@vmware.com> 1.6-1
63
+- Automatic Version Bump
64
+* Mon Nov 19 2018 Ashwin H<ashwinh@vmware.com> 1.5-4
65
+- Add which for %check
66
+* Tue Aug 22 2017 Chang Lee <changlee@vmware.com> 1.5-3
67
+- Add oniguruma for %check
68
+* Wed Jun 07 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.5-2
69
+- Fix for CVE-2015-8863 and CVE-2016-4074
70
+* Mon May 15 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.5-1
71
+- Initial version
... ...
@@ -1,53 +1,50 @@
1
-%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
-
3 1
 Name:           python3-backports_abc
4 2
 Version:        0.5
5 3
 Release:        4%{?dist}
6 4
 Summary:        A backport of recent additions to the 'collections.abc' module.
7 5
 License:        PSFL
8 6
 Group:          Development/Languages/Python
9
-Url:            https://github.com/cython/backports_abc
10
-Source0:        https://pypi.python.org/packages/68/3c/1317a9113c377d1e33711ca8de1e80afbaf4a3c950dd0edfaf61f9bfe6d8/backports_abc-0.5.tar.gz
11
-%define sha1 backports_abc=91c000d7f18066f428b015caf5308ca34d492f77
12
-
7
+URL:            https://github.com/cython/backports_abc
13 8
 Vendor:         VMware, Inc.
14 9
 Distribution:   Photon
15 10
 
16
-BuildRequires:  python3
17
-BuildRequires:  python3-libs
11
+Source0: https://github.com/cython/backports_abc/archive/refs/tags/backports_abc-%{version}.tar.gz
12
+%define sha512 backports_abc=7c8a30857a1199e2539279d8fe82456db53fc2c8f0be2c696e029406756f6b7ad3628f4fc5203b58e6a89cb3a0bffdf85feb5af9e7d0bcd4ce0641ac469c9a1a
13
+
14
+BuildRequires:  python3-devel
18 15
 BuildRequires:  python3-setuptools
16
+
19 17
 Requires:       python3
20
-Requires:       python3-libs
21 18
 
22 19
 BuildArch:      noarch
23 20
 
24 21
 %description
25
-
26
-
22
+Backport of recent additions to the "collections.abc" stdlib module (Py3.5)
27 23
 
28 24
 %prep
29
-%setup -n backports_abc-%{version}
25
+%autosetup -p1 -n backports_abc-%{version}
30 26
 
31 27
 %build
32
-python3 setup.py build
28
+%py3_build
33 29
 
34 30
 %install
35
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
31
+%py3_install
36 32
 
33
+%if 0%{?with_check}
37 34
 %check
38 35
 python3 tests.py
36
+%endif
39 37
 
40 38
 %files
41 39
 %defattr(-,root,root,-)
42 40
 %{python3_sitelib}/*
43 41
 
44 42
 %changelog
45
-*   Sat Jun 20 2020 Tapas Kundu <tkundu@vmware.com> 0.5-4
46
--   Mass removal python2
47
-*   Tue Dec 17 2019 Vinothkumar D <vinothkumard@vmware.com> 0.5-3
48
--   To build python2 and python3 backports_abc packages.
49
-*   Tue Dec 04 2018 Ashwin H <ashwinh@vmware.com> 0.5-2
50
--   Add %check
51
-*   Wed Nov 29 2017 Padmini Thirumalachar <pthirumalachar@vmware.com> 0.5-1
52
--   Initial version of python backports_abc for PhotonOS.
53
-
43
+* Sat Jun 20 2020 Tapas Kundu <tkundu@vmware.com> 0.5-4
44
+- Mass removal python2
45
+* Tue Dec 17 2019 Vinothkumar D <vinothkumard@vmware.com> 0.5-3
46
+- To build python2 and python3 backports_abc packages.
47
+* Tue Dec 04 2018 Ashwin H <ashwinh@vmware.com> 0.5-2
48
+- Add %check
49
+* Wed Nov 29 2017 Padmini Thirumalachar <pthirumalachar@vmware.com> 0.5-1
50
+- Initial version of python backports_abc for PhotonOS.
... ...
@@ -1,47 +1,41 @@
1
-%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
-
3 1
 Name:           python3-fuse
4 2
 Version:        1.0.2
5 3
 Release:        1%{?dist}
6 4
 Summary:        Python interface to libfuse
7 5
 License:        LGPL
8 6
 Group:          Development/Languages/Python
9
-Url:            https://github.com/libfuse/%{name}/archive/%{version}.tar.gz
10
-Source0:        python-fuse-%{version}.tar.gz
11
-%define sha1    python-fuse=f01919b521bae353d2819cdc62bd54e0711c7a7f
7
+URL:            https://github.com/libfuse/python-fuse
12 8
 Vendor:         VMware, Inc.
13 9
 Distribution:   Photon
14
-BuildRequires:  fuse
10
+
11
+Source0: https://github.com/libfuse/python-fuse/archive/refs/tags/python-fuse-%{version}.tar.gz
12
+%define sha512 python-fuse=9c71e621db41ea70fe0cf824df73b81704f08f38470b6cddd2d7c5933c90edd80af86a0aa20f19e0e4e4aec1dde1c49b65646931cf7debdc5dc875cb3e2d1c31
13
+
15 14
 BuildRequires:  fuse-devel
16 15
 BuildRequires:  pkg-config
17
-BuildRequires:  python3
18 16
 BuildRequires:  python3-devel
19
-BuildRequires:  python3-libs
20 17
 BuildRequires:  python3-setuptools
18
+
21 19
 Requires:       fuse
22 20
 Requires:       python3
23
-Requires:       python3-libs
24 21
 
25 22
 %description
26 23
 FUSE (Filesystem in USErspace) is a simple interface for userspace programs to export a virtual filesystem to the linux kernel. "fuse.py" reexports the root filesystem within the mount point. It also offers a class, fuse.Fuse, which can be subclassed to create a filesystem.
27 24
 
28 25
 %prep
29
-%setup -n python-fuse-%{version}
26
+%autosetup -p1 -n python-fuse-%{version}
30 27
 
31 28
 %build
32
-python3 setup.py build
29
+%py3_build
33 30
 
34 31
 %install
35
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} --skip-build
32
+%py3_install
36 33
 find %{buildroot}%{_libdir} -name '*.pyc' -delete
37 34
 
38
-%check
39
-easy_install py
40
-
41 35
 %files
42 36
 %defattr(-,root,root,-)
43 37
 %{python3_sitelib}/fuse*
44 38
 
45 39
 %changelog
46
-*   Thu Feb 18 2021 Tapas Kundu <tkundu@vmware.com> 1.0.2-1
47
--   Initial packaging for python3-fuse
40
+* Thu Feb 18 2021 Tapas Kundu <tkundu@vmware.com> 1.0.2-1
41
+- Initial packaging for python3-fuse
... ...
@@ -1,5 +1,3 @@
1
-%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
-
3 1
 Name:           python3-mako
4 2
 Version:        1.1.3
5 3
 Release:        2%{?dist}
... ...
@@ -8,20 +6,19 @@ License:        MIT
8 8
 Group:          Development/Languages/Python
9 9
 Vendor:         VMware, Inc.
10 10
 Distribution:   Photon
11
-Url:            https://pypi.python.org/packages/56/4b/cb75836863a6382199aefb3d3809937e21fa4cb0db15a4f4ba0ecc2e7e8e/Mako-%{version}.tar.gz
12
-Source0:        Mako-%{version}.tar.gz
13
-%define sha1    Mako=098f90baefe938434e426b8682cdfb89fa223eba
11
+URL:            https://www.makotemplates.org
12
+
13
+Source0: https://github.com/sqlalchemy/mako/archive/refs/tags/Mako-%{version}.tar.gz
14
+%define sha512 Mako=a9b94fa34a61e7794b6e4549fa0bada6ff84dfb0d9edb8d5c7f9b95d12184fa4499f42303cfee720b576a9f7e986a57d91ad3aeb26c9f93154dbc08fb2975952
14 15
 
15
-BuildRequires:  python3
16
-BuildRequires:  python3-libs
16
+BuildRequires:  python3-devel
17 17
 BuildRequires:  python3-setuptools
18 18
 
19
-%if %{with_check}
19
+%if 0%{?with_check}
20 20
 BuildRequires:  python3-pytest
21 21
 %endif
22 22
 
23 23
 Requires:       python3
24
-Requires:       python3-libs
25 24
 
26 25
 BuildArch:      noarch
27 26
 
... ...
@@ -29,17 +26,19 @@ BuildArch:      noarch
29 29
 A super-fast templating language that borrows the best ideas from the existing templating languages. Mako is a template library written in Python. It provides a familiar, non-XML syntax which compiles into Python modules for maximum performance. Mako’s syntax and API borrows from the best ideas of many others, including Django templates, Cheetah, Myghty, and Genshi.
30 30
 
31 31
 %prep
32
-%setup -n Mako-%{version}
32
+%autosetup -p1 -n Mako-%{version}
33 33
 
34 34
 %build
35
-python3 setup.py build
35
+%py3_build
36 36
 
37 37
 %install
38
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
39
-mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/mako-render3
38
+%py3_install
39
+mv %{buildroot}%{_bindir}/mako-render %{buildroot}%{_bindir}/mako-render3
40 40
 
41
+%if 0%{?with_check}
41 42
 %check
42 43
 python3 setup.py test
44
+%endif
43 45
 
44 46
 %files
45 47
 %defattr(-,root,root,-)
... ...
@@ -47,21 +46,21 @@ python3 setup.py test
47 47
 %{_bindir}/mako-render3
48 48
 
49 49
 %changelog
50
-*   Tue Dec 15 2020 Shreenidhi Shedi <sshedi@vmware.com> 1.1.3-2
51
--   Fix build with new rpm
52
-*   Fri Jul 24 2020 Gerrit Photon <photon-checkins@vmware.com> 1.1.3-1
53
--   Automatic Version Bump
54
-*   Tue Jun 16 2020 Tapas Kundu <tkundu@vmware.com> 1.0.7-2
55
--   Mass removal python2
56
-*   Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 1.0.7-1
57
--   Update to version 1.0.7
58
-*   Thu Jul 06 2017 Xiaolin Li <xiaolinl@vmware.com> 1.0.6-5
59
--   Fix make check issues.
60
-*   Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 1.0.6-4
61
--   Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
62
-*   Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.0.6-3
63
--   Separate the python2 and python3 specific scripts in the bin directory
64
-*   Fri Mar 03 2017 Xiaolin Li <xiaolinl@vmware.com> 1.0.6-2
65
--   Added python3 package.
66
-*   Fri Feb 03 2017 Vinay Kulkarni <kulkarniv@vmware.com> 1.0.6-1
67
--   Initial version of python-mako package for Photon.
50
+* Tue Dec 15 2020 Shreenidhi Shedi <sshedi@vmware.com> 1.1.3-2
51
+- Fix build with new rpm
52
+* Fri Jul 24 2020 Gerrit Photon <photon-checkins@vmware.com> 1.1.3-1
53
+- Automatic Version Bump
54
+* Tue Jun 16 2020 Tapas Kundu <tkundu@vmware.com> 1.0.7-2
55
+- Mass removal python2
56
+* Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 1.0.7-1
57
+- Update to version 1.0.7
58
+* Thu Jul 06 2017 Xiaolin Li <xiaolinl@vmware.com> 1.0.6-5
59
+- Fix make check issues.
60
+* Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 1.0.6-4
61
+- Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
62
+* Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.0.6-3
63
+- Separate the python2 and python3 specific scripts in the bin directory
64
+* Fri Mar 03 2017 Xiaolin Li <xiaolinl@vmware.com> 1.0.6-2
65
+- Added python3 package.
66
+* Fri Feb 03 2017 Vinay Kulkarni <kulkarniv@vmware.com> 1.0.6-1
67
+- Initial version of python-mako package for Photon.