Browse code

tdnf: fix make check

Other important changes:
- pytest: upgrade to v6.2.5
- requests: upgrade to 2.26.0

And corresponsing version bumps.

Issue with pytest got unfolded when I used it with tdnf's make check.
Started there and ended up doing a lot more.

Change-Id: I0ab3555f143f5b8bd5a377512010bb5b4b56f750
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/14917
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Tapas Kundu <tkundu@vmware.com>

Shreenidhi Shedi authored on 2021/12/16 22:00:00
Showing 27 changed files
... ...
@@ -4,11 +4,13 @@ Version:        3.17.1
4 4
 Release:        2%{?dist}
5 5
 License:        Apache-2.0
6 6
 URL:            https://github.com/projectcalico/k8s-policy
7
-Source0:        %{name}-%{version}.tar.gz
8
-%define sha1 calico-k8s-policy=4fa6e670eb2eeae254962a3dc32ab25beec3a6d7
9 7
 Group:          Development/Tools
10 8
 Vendor:         VMware, Inc.
11 9
 Distribution:   Photon
10
+
11
+Source0:        %{name}-%{version}.tar.gz
12
+%define sha1 %{name}=4fa6e670eb2eeae254962a3dc32ab25beec3a6d7
13
+
12 14
 BuildRequires:  git
13 15
 BuildRequires:  go
14 16
 BuildRequires:  libcalico
... ...
@@ -48,16 +50,18 @@ BuildRequires:  python3-urllib3
48 48
 BuildRequires:  python3-websocket-client
49 49
 BuildRequires:  python3-virtualenv
50 50
 BuildRequires:  python3
51
+
51 52
 Requires:       python3
52 53
 Requires:       python3-libs
53 54
 Requires:       python3-setuptools
55
+
54 56
 %define debug_package %{nil}
55 57
 
56 58
 %description
57 59
 Calico Network Policy enables Calico to enforce network policy on top of Calico BGP, Flannel, or GCE native.
58 60
 
59 61
 %prep
60
-%setup -n kube-controllers-%{version}
62
+%autosetup -p1 -n kube-controllers-%{version}
61 63
 echo "VERSION='`git describe --tags --dirty`'" > version.py
62 64
 
63 65
 %build
... ...
@@ -73,32 +77,32 @@ install -vpm 0755 -t %{buildroot}%{_bindir}/ dist/controller
73 73
 %{_bindir}/controller
74 74
 
75 75
 %changelog
76
-*   Fri Jun 11 2021 Piyush Gupta<gpiyush@vmware.com> 3.17.1-2
77
--   Bump up version to compile with new go
78
-*   Tue Feb 09 2021 Prashant S Chauhan <psinghchauha@vmware.com> 3.17.1-1
79
--   Update to version 3.17.1
80
-*   Fri Feb 05 2021 Harinadh D <hdommaraju@vmware.com> 3.16.1-4
81
--   Bump up version to compile with new go
82
-*   Fri Jan 15 2021 Piyush Gupta<gpiyush@vmware.com> 3.16.1-3
83
--   Bump up version to compile with new go
84
-*   Tue Sep 29 2020 Satya Naga Vasamsetty <svasamsetty@vmware.com> 3.16.1-2
85
--   openssl 1.1.1
86
-*   Mon Sep 21 2020 Gerrit Photon <photon-checkins@vmware.com> 3.16.1-1
87
--   Automatic Version Bump
88
-*   Tue Jun 23 2020 Gerrit Photon <photon-checkins@vmware.com> 3.16.0-1
89
--   Automatic Version Bump
90
-*   Thu Jun 18 2020 Tapas Kundu <tkundu@vmware.com> 1.0.0-5
91
--   Build with python3
92
--   Mass removal python2
93
-*   Wed Jun 17 2020 Ashwin H <ashwinh@vmware.com> 1.0.0-4
94
--   Fix dependency for cloud.google.com-go
95
-*   Tue Jun 09 2020 Ashwin H <ashwinh@vmware.com> 1.0.0-3
96
--   Use cache for dependencies
97
-*   Mon Jan 28 2019 Bo Gan <ganb@vmware.com> 1.0.0-2
98
--   Fix CVE-2018-17846 and CVE-2018-17143
99
-*   Tue Nov 14 2017 Vinay Kulkarni <kulkarniv@vmware.com> 1.0.0-1
100
--   Calico kubernetes policy v1.0.0.
101
-*   Tue Nov 07 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.7.0-1
102
--   Calico kubernetes policy v0.7.0.
103
-*   Tue Aug 22 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.5.4-1
104
--   Calico kubernetes policy for PhotonOS.
76
+* Fri Jun 11 2021 Piyush Gupta<gpiyush@vmware.com> 3.17.1-2
77
+- Bump up version to compile with new go
78
+* Tue Feb 09 2021 Prashant S Chauhan <psinghchauha@vmware.com> 3.17.1-1
79
+- Update to version 3.17.1
80
+* Fri Feb 05 2021 Harinadh D <hdommaraju@vmware.com> 3.16.1-4
81
+- Bump up version to compile with new go
82
+* Fri Jan 15 2021 Piyush Gupta<gpiyush@vmware.com> 3.16.1-3
83
+- Bump up version to compile with new go
84
+* Tue Sep 29 2020 Satya Naga Vasamsetty <svasamsetty@vmware.com> 3.16.1-2
85
+- openssl 1.1.1
86
+* Mon Sep 21 2020 Gerrit Photon <photon-checkins@vmware.com> 3.16.1-1
87
+- Automatic Version Bump
88
+* Tue Jun 23 2020 Gerrit Photon <photon-checkins@vmware.com> 3.16.0-1
89
+- Automatic Version Bump
90
+* Thu Jun 18 2020 Tapas Kundu <tkundu@vmware.com> 1.0.0-5
91
+- Build with python3
92
+- Mass removal python2
93
+* Wed Jun 17 2020 Ashwin H <ashwinh@vmware.com> 1.0.0-4
94
+- Fix dependency for cloud.google.com-go
95
+* Tue Jun 09 2020 Ashwin H <ashwinh@vmware.com> 1.0.0-3
96
+- Use cache for dependencies
97
+* Mon Jan 28 2019 Bo Gan <ganb@vmware.com> 1.0.0-2
98
+- Fix CVE-2018-17846 and CVE-2018-17143
99
+* Tue Nov 14 2017 Vinay Kulkarni <kulkarniv@vmware.com> 1.0.0-1
100
+- Calico kubernetes policy v1.0.0.
101
+* Tue Nov 07 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.7.0-1
102
+- Calico kubernetes policy v0.7.0.
103
+* Tue Aug 22 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.5.4-1
104
+- Calico kubernetes policy for PhotonOS.
105 105
deleted file mode 100644
... ...
@@ -1,35 +0,0 @@
1
-From 2f5d2388922f370f4355f327fcf4cfe9f5583908 Mon Sep 17 00:00:00 2001
2
-From: Kunpei Sakai <kunpei@google.com>
3
-Date: Fri, 21 Sep 2018 04:40:41 +0800
4
-Subject: [PATCH] html: avoid panic even if unconsidered <isindex> and <template> combination
5
-
6
-The <isindex> element has been removed from the spec so that the
7
-<template> element doesn't cover it.
8
-To avoid panic, this commit adds ignoring code as a workaround.
9
-
10
-Fixes golang/go#27704
11
-
12
-Change-Id: I847391389285df2fc0eb6a795f8c93b481cdebac
13
-Reviewed-on: https://go-review.googlesource.com/136575
14
-Reviewed-by: Nigel Tao <nigeltao@golang.org>
15
-
16
-diff --git a/html/parse.go b/html/parse.go
17
-index 091fb0d..63ac179 100644
18
-+++ b/html/parse.go
19
-@@ -984,6 +984,14 @@
20
- 			p.acknowledgeSelfClosingTag()
21
- 			p.popUntil(buttonScope, a.P)
22
- 			p.parseImpliedToken(StartTagToken, a.Form, a.Form.String())
23
-+			if p.form == nil {
24
-+				// NOTE: The 'isindex' element has been removed,
25
-+				// and the 'template' element has not been designed to be
26
-+				// collaborative with the index element.
27
-+				//
28
-+				// Ignore the token.
29
-+				return true
30
-+			}
31
- 			if action != "" {
32
- 				p.form.Attr = []Attribute{{Key: "action", Val: action}}
33
- 			}
34 1
deleted file mode 100644
... ...
@@ -1,70 +0,0 @@
1
-From d26f9f9a57f3fab6a695bec0d84433c2c50f8bbf Mon Sep 17 00:00:00 2001
2
-From: Kunpei Sakai <namusyaka@gmail.com>
3
-Date: Tue, 25 Sep 2018 22:55:50 +0900
4
-Subject: [PATCH] html: update inSelectIM and inSelectInTableIM for the latest spec
5
-
6
-Fixes golang/go#27842
7
-
8
-Change-Id: I06eb3c0c18be3566bd30a29fca5f3f7e6791d2cc
9
-Reviewed-on: https://go-review.googlesource.com/c/137275
10
-Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
11
-TryBot-Result: Gobot Gobot <gobot@golang.org>
12
-Reviewed-by: Nigel Tao <nigeltao@golang.org>
13
-
14
-diff --git a/html/parse.go b/html/parse.go
15
-index 64a5793..488e8d3 100644
16
-+++ b/html/parse.go
17
-@@ -1719,8 +1719,12 @@
18
- 			}
19
- 			p.addElement()
20
- 		case a.Select:
21
--			p.tok.Type = EndTagToken
22
--			return false
23
-+			if p.popUntil(selectScope, a.Select) {
24
-+				p.resetInsertionMode()
25
-+			} else {
26
-+				// Ignore the token.
27
-+				return true
28
-+			}
29
- 		case a.Input, a.Keygen, a.Textarea:
30
- 			if p.elementInScope(selectScope, a.Select) {
31
- 				p.parseImpliedToken(EndTagToken, a.Select, a.Select.String())
32
-@@ -1750,6 +1754,9 @@
33
- 		case a.Select:
34
- 			if p.popUntil(selectScope, a.Select) {
35
- 				p.resetInsertionMode()
36
-+			} else {
37
-+				// Ignore the token.
38
-+				return true
39
- 			}
40
- 		}
41
- 	case CommentToken:
42
-@@ -1775,13 +1782,22 @@
43
- 	case StartTagToken, EndTagToken:
44
- 		switch p.tok.DataAtom {
45
- 		case a.Caption, a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr, a.Td, a.Th:
46
--			if p.tok.Type == StartTagToken || p.elementInScope(tableScope, p.tok.DataAtom) {
47
--				p.parseImpliedToken(EndTagToken, a.Select, a.Select.String())
48
--				return false
49
--			} else {
50
-+			if p.tok.Type == EndTagToken && !p.elementInScope(tableScope, p.tok.DataAtom) {
51
- 				// Ignore the token.
52
- 				return true
53
- 			}
54
-+			// This is like p.popUntil(selectScope, a.Select), but it also
55
-+			// matches <math select>, not just <select>. Matching the MathML
56
-+			// tag is arguably incorrect (conceptually), but it mimics what
57
-+			// Chromium does.
58
-+			for i := len(p.oe) - 1; i >= 0; i-- {
59
-+				if n := p.oe[i]; n.DataAtom == a.Select {
60
-+					p.oe = p.oe[:i]
61
-+					break
62
-+				}
63
-+			}
64
-+			p.resetInsertionMode()
65
-+			return false
66
- 		}
67
- 	}
68
- 	return inSelectIM(p)
... ...
@@ -1,6 +1,3 @@
1
-%define python3_sitelib %{_libdir}/python3.9/site-packages
2
-%define py_setup setup.py
3
-
4 1
 Name:           cloud-init
5 2
 Version:        21.4
6 3
 Release:        1%{?dist}
... ...
@@ -39,7 +36,7 @@ BuildRequires:  python3-jinja2
39 39
 BuildRequires:  systemd-rpm-macros
40 40
 BuildRequires:  python3-macros
41 41
 
42
-%if %{with_check}
42
+%if 0%{?with_check:1}
43 43
 BuildRequires:  python3-pip
44 44
 BuildRequires:  python3-configobj
45 45
 BuildRequires:  python3-jsonpatch
... ...
@@ -93,12 +90,12 @@ python3 tools/render-cloudcfg --variant photon > %{buildroot}/%{_sysconfdir}/clo
93 93
 sed -i -e "0,/'OpenStack', / s/'OpenStack', //" %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg
94 94
 %endif
95 95
 
96
-mkdir -p %{buildroot}%{_sharedstatedir}/cloud
97
-mkdir -p %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg.d
96
+mkdir -p %{buildroot}%{_sharedstatedir}/cloud %{buildroot}%{_sysconfdir}/cloud/cloud.cfg.d
98 97
 
99
-mv %{buildroot}/lib/* %{buildroot}/usr/lib && rmdir %{buildroot}/lib || exit 1
98
+mv %{buildroot}/lib/* %{buildroot}%{_libdir} && rmdir %{buildroot}/lib || exit 1
100 99
 
101 100
 %check
101
+%if 0%{?with_check:1}
102 102
 touch vd ud
103 103
 
104 104
 mkdir -p /usr/share/ca-certificates/
... ...
@@ -112,6 +109,7 @@ echo -e 'line1\nline2\nline3\ncloud-init-ca-certs.crt\n' > "${conf_file}"
112 112
 
113 113
 pip3 install --upgrade %test_pkgs
114 114
 make check %{?_smp_mflags}
115
+%endif
115 116
 
116 117
 %clean
117 118
 rm -rf %{buildroot}
... ...
@@ -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-py3
4 2
 Version:        4.3.1
5 3
 Release:        1%{?dist}
... ...
@@ -9,6 +7,7 @@ Group:          Development/Languages/Python
9 9
 Vendor:         VMware, Inc.
10 10
 Distribution:   Photon
11 11
 Url:            https://github.com/docker/docker-py
12
+
12 13
 Source0:        docker-py-%{version}.tar.gz
13 14
 %define sha1    docker-py=eed3cb687f8103dd8679c672e64251b7b3bfd337
14 15
 
... ...
@@ -20,6 +19,8 @@ BuildRequires:  python3-requests
20 20
 BuildRequires:  python3-setuptools
21 21
 BuildRequires:  python3-six
22 22
 BuildRequires:  python3-xml
23
+BuildRequires:  python3-macros
24
+
23 25
 Requires:       python3
24 26
 Requires:       python3-libs
25 27
 Requires:       docker-pycreds3
... ...
@@ -34,31 +35,30 @@ BuildArch:      noarch
34 34
 %description
35 35
 Python API for docker
36 36
 
37
-
38 37
 %prep
39
-%setup -n docker-py-%{version}-release
38
+%autosetup -p1 -n docker-py-%{version}-release
40 39
 
41 40
 %build
42
-python3 setup.py build
41
+%py3_build
43 42
 
44 43
 %install
45
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
44
+%py3_install
46 45
 
47 46
 %files
48 47
 %defattr(-,root,root,-)
49 48
 %{python3_sitelib}/*
50 49
 
51 50
 %changelog
52
-*   Thu Oct 15 2020 Ashwin H <ashwinh@vmware.com> 4.3.1-1
53
--   Upgrade to 4.3.1 release.
54
-*   Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 3.5.0-2
55
--   Mass removal python2
56
-*   Tue Sep 04 2018 Tapas Kundu <tkundu@vmware.com> 3.5.0-1
57
--   Upgraded to 3.5.0 release.
58
-*   Fri Dec 01 2017 Xiaolin Li <xiaolinl@vmware.com> 2.3.0-3
59
--   Added docker-pycreds3, python3-requests, python3-six,
60
--   python3-websocket-client to requires of docker-py3
61
-*   Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 2.3.0-2
62
--   Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
63
-*   Sun Jun 04 2017 Vinay Kulkarni <kulkarniv@vmware.com> 2.3.0-1
64
--   Initial version of docker-py for PhotonOS.
51
+* Thu Oct 15 2020 Ashwin H <ashwinh@vmware.com> 4.3.1-1
52
+- Upgrade to 4.3.1 release.
53
+* Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 3.5.0-2
54
+- Mass removal python2
55
+* Tue Sep 04 2018 Tapas Kundu <tkundu@vmware.com> 3.5.0-1
56
+- Upgraded to 3.5.0 release.
57
+* Fri Dec 01 2017 Xiaolin Li <xiaolinl@vmware.com> 2.3.0-3
58
+- Added docker-pycreds3, python3-requests, python3-six,
59
+- python3-websocket-client to requires of docker-py3
60
+* Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 2.3.0-2
61
+- Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
62
+* Sun Jun 04 2017 Vinay Kulkarni <kulkarniv@vmware.com> 2.3.0-1
63
+- Initial version of docker-py for PhotonOS.
... ...
@@ -1,16 +1,16 @@
1
-%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
-
3 1
 Summary:        Library for interacting with Calico data model.
4 2
 Name:           libcalico
5 3
 Version:        0.19.0
6 4
 Release:        4%{?dist}
7 5
 License:        Apache-2.0
8 6
 URL:            https://github.com/projectcalico/libcalico
9
-Source0:        %{name}-%{version}.tar.gz
10
-%define sha1 libcalico=c3d0f9f36930389fc3b6f1f2222ebc85440a50ee
11 7
 Group:          Development/Tools
12 8
 Vendor:         VMware, Inc.
13 9
 Distribution:   Photon
10
+
11
+Source0:        %{name}-%{version}.tar.gz
12
+%define sha1 %{name}=c3d0f9f36930389fc3b6f1f2222ebc85440a50ee
13
+
14 14
 BuildRequires:  git
15 15
 BuildRequires:  libffi-devel
16 16
 BuildRequires:  openssl-devel
... ...
@@ -26,7 +26,6 @@ BuildRequires:  python3-pycrypto
26 26
 BuildRequires:  python3-cryptography
27 27
 BuildRequires:  python3-dnspython
28 28
 BuildRequires:  python3-docopt
29
-#BuildRequires:  python3-enum
30 29
 BuildRequires:  python3-etcd
31 30
 BuildRequires:  python3-idna
32 31
 BuildRequires:  python3-ipaddress
... ...
@@ -50,33 +49,35 @@ BuildRequires:  python3-websocket-client
50 50
 BuildRequires:  python3-appdirs
51 51
 BuildRequires:  python3-virtualenv
52 52
 BuildRequires:  python3
53
+
53 54
 Requires:       python3
54 55
 Requires:       python3-libs
55 56
 Requires:       python3-setuptools
57
+
56 58
 %define debug_package %{nil}
57 59
 
58 60
 %description
59 61
 Library for interacting with Calico data model.
60 62
 
61 63
 %prep
62
-%setup
64
+%autosetup -p1
63 65
 
64 66
 %build
65
-python3 setup.py build
67
+%py3_build
66 68
 
67 69
 %install
68
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
70
+%py3_install
69 71
 
70 72
 %files
71 73
 %defattr(-,root,root)
72 74
 %{python3_sitelib}/*
73 75
 
74 76
 %changelog
75
-*   Tue Dec 15 2020 Shreenidhi Shedi <sshedi@vmware.com> 0.19.0-4
76
--   Fix build with new rpm
77
-*   Tue Sep 29 2020 Satya Naga Vasamsetty <svasamsetty@vmware.com> 0.19.0-3
78
--   openssl 1.1.1
79
-*   Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 0.19.0-2
80
--   Mass removal python2
81
-*   Wed Aug 23 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.19.0-1
82
--   libcalico for PhotonOS.
77
+* Tue Dec 15 2020 Shreenidhi Shedi <sshedi@vmware.com> 0.19.0-4
78
+- Fix build with new rpm
79
+* Tue Sep 29 2020 Satya Naga Vasamsetty <svasamsetty@vmware.com> 0.19.0-3
80
+- openssl 1.1.1
81
+* Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 0.19.0-2
82
+- Mass removal python2
83
+* Wed Aug 23 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.19.0-1
84
+- libcalico for PhotonOS.
83 85
deleted file mode 100644
... ...
@@ -1,33 +0,0 @@
1
-From 6c32569334e2e7aadf4d8e8f9d1c48c3c5ee4c1e Mon Sep 17 00:00:00 2001
2
-From: Piyush Gupta <gpiyush@vmware.com>
3
-Date: Thu, 4 Mar 2021 06:25:57 +0000
4
-Subject: [PATCH] isoInstaller.py: User specified mount media
5
-
6
-This change intends to provide more flexibility to user by using
7
-user specified partition to mount. If a user uses any device other
8
-than cdrom to boot, the user can specify photon.media=/dev/sdb1 at kernel
9
-command line and mount_media will use /dev/sdb1 to mount.
10
-
11
-Change-Id: I381efd72753ff8e8236193d3b2f257dcdbc4706a
12
- photon_installer/isoInstaller.py | 4 ++--
13
- 1 file changed, 2 insertions(+), 2 deletions(-)
14
-
15
-diff --git a/photon_installer/isoInstaller.py b/photon_installer/isoInstaller.py
16
-index bc02b60..1f6fc2d 100755
17
-+++ b/photon_installer/isoInstaller.py
18
-@@ -148,8 +148,8 @@ class IsoInstaller(object):
19
-         elif photon_media == "cdrom":
20
-             cmdline.append('/dev/cdrom')
21
-         else:
22
--            print("Unsupported installer media, check photon.media in kernel cmdline")
23
--            raise Exception("Can not mount the cd")
24
-+            #User specified mount path
25
-+            cmdline.append(photon_media)
26
- 
27
-         cmdline.extend(['-o', 'ro', mount_path])
28
- 
29
-2.23.0
30
-
31 1
new file mode 100644
... ...
@@ -0,0 +1,55 @@
0
+From d6e56f8ceffc6a7ba238b58f078d3329e9d260fc Mon Sep 17 00:00:00 2001
1
+From: Piyush Gupta <gpiyush@vmware.com>
2
+Date: Thu, 9 Dec 2021 10:24:01 +0000
3
+Subject: [PATCH] selectdisk.py: Display appropriate error if no block device
4
+ found.
5
+
6
+Added a new window to display error if there is no devices attached.
7
+
8
+Change-Id: If7fabceec00dd124c6c7c3e2cbc38ef1add99cb7
9
+---
10
+ photon_installer/selectdisk.py | 17 ++++++++++++++---
11
+ 1 file changed, 14 insertions(+), 3 deletions(-)
12
+
13
+diff --git a/photon_installer/selectdisk.py b/photon_installer/selectdisk.py
14
+index fbe66d7..f6870e1 100755
15
+--- a/photon_installer/selectdisk.py
16
+@@ -6,6 +6,7 @@
17
+ #
18
+ #    Author: Mahmoud Bassiouny <mbassiouny@vmware.com>
19
+ 
20
++import sys
21
+ from device import Device
22
+ from window import Window
23
+ from actionresult import ActionResult
24
+@@ -38,13 +39,23 @@ class SelectDisk(object):
25
+         self.devices = None
26
+ 
27
+     def display(self):
28
+-        self.window.addstr(0, 0, 'Please select a disk and a method how to partition it:\n' +
29
+-                           'Auto - single partition for /, no swap partition.\n' +
30
+-                           'Custom - for customized partitioning')
31
+ 
32
+         self.disk_menu_items = []
33
+ 
34
+         self.devices = Device.refresh_devices()
35
++
36
++        if len(self.devices) == 0:
37
++            err_win = Window(self.win_height, self.win_width, self.maxy, self.maxx,
38
++                             'Select a disk', False, position=2, tab_enabled=False)
39
++            err_win.addstr(0, 0, 'No block devices found to select\n' +
40
++                           'Press any key to get to bash.')
41
++            err_win.show_window()
42
++            err_win.content_window().getch()
43
++            sys.exit(1)
44
++
45
++        self.window.addstr(0, 0, 'Please select a disk and a method how to partition it:\n' +
46
++                           'Auto - single partition for /, no swap partition.\n' +
47
++                           'Custom - for customized partitioning')
48
+         # Fill in the menu items
49
+         for index, device in enumerate(self.devices):
50
+             #if index > 0:
51
+-- 
52
+2.23.3
53
+
0 54
deleted file mode 100644
... ...
@@ -1,89 +0,0 @@
1
-From cca2147f00c23ace2112093ad2a4c9f14b9c3dee Mon Sep 17 00:00:00 2001
2
-From: Piyush Gupta <gpiyush@vmware.com>
3
-Date: Wed, 13 Jan 2021 05:27:45 +0000
4
-Subject: [PATCH] netconfig.py: iso_config.py: installer.py: insecure
5
- randomness
6
-
7
-While setting up hostname in case user doesn't provide one
8
-randrange() cannot withstand a cryptographic attack. random.randrange()
9
-uses stastical PRNGs which is highly predictable.
10
-
11
-This change uses secrets in order to set the hostname which in turn
12
-uses cryptographic PRNGs which is difficult to predict.
13
-
14
-Change-Id: Ib04a10979498dc2345906ce5ea046f72ee2e146e
15
- photon_installer/installer.py  | 4 ++--
16
- photon_installer/iso_config.py | 4 ++--
17
- photon_installer/netconfig.py  | 4 ++--
18
- 3 files changed, 6 insertions(+), 6 deletions(-)
19
-
20
-diff --git a/photon_installer/installer.py b/photon_installer/installer.py
21
-index 72ed2de..2501fca 100755
22
-+++ b/photon_installer/installer.py
23
-@@ -16,7 +16,7 @@ import signal
24
- import sys
25
- import glob
26
- import modules.commons
27
--import random
28
-+import secrets
29
- import curses
30
- import stat
31
- import tempfile
32
-@@ -209,7 +209,7 @@ class Installer(object):
33
- 
34
-         # define 'hostname' as 'photon-<RANDOM STRING>'
35
-         if "hostname" not in install_config or install_config['hostname'] == "":
36
--            install_config['hostname'] = 'photon-%12x' % random.randrange(16**12)
37
-+            install_config['hostname'] = 'photon-%12x' % secrets.randbelow(16**12)
38
- 
39
-         # Set password if needed.
40
-         # Installer uses 'shadow_password' and optionally 'password'/'age'
41
-diff --git a/photon_installer/iso_config.py b/photon_installer/iso_config.py
42
-index b023f21..96aa6b5 100644
43
-+++ b/photon_installer/iso_config.py
44
-@@ -5,7 +5,7 @@
45
- import os
46
- import sys
47
- import re
48
--import random
49
-+import secrets
50
- import requests
51
- import cracklib
52
- import curses
53
-@@ -34,7 +34,7 @@ class IsoConfig(object):
54
-         self.hostname_accepted_chars.extend(range(48, 58))
55
-         # Adding the . and -
56
-         self.hostname_accepted_chars.extend([ord('.'), ord('-')])
57
--        self.random_id = '%12x' % random.randrange(16**12)
58
-+        self.random_id = '%12x' % secrets.randbelow(16**12)
59
-         self.random_hostname = "photon-" + self.random_id.strip()
60
-         self.logger = Logger.get_logger()
61
- 
62
-diff --git a/photon_installer/netconfig.py b/photon_installer/netconfig.py
63
-index d6d6a91..5703e17 100644
64
-+++ b/photon_installer/netconfig.py
65
-@@ -7,7 +7,7 @@
66
- #     Date: Fri Aug 30 11:28:18 IST 2019
67
- #   Author: Ankit Jain <ankitja@vmware.com>
68
- 
69
--import random
70
-+import secrets
71
- from networkmanager import NetworkManager
72
- from menu import Menu
73
- from window import Window
74
-@@ -126,7 +126,7 @@ class NetworkConfigure(object):
75
- 
76
-         elif selection == self.NET_CONFIG_OPTION_DHCP_HOSTNAME:
77
-             network_config = {}
78
--            random_id = '%12x' % random.randrange(16**12)
79
-+            random_id = '%12x' % secrets.randbelow(16**12)
80
-             random_hostname = 'photon-' + random_id.strip()
81
-             accepted_chars = list(range(ord('A'), ord('Z')+1))
82
-             accepted_chars = list(range(ord('a'), ord('z')+1))
83
-2.23.0
84
-
85 1
deleted file mode 100644
... ...
@@ -1,84 +0,0 @@
1
-From 42b92893d32d1a41fc0fb101b095d093acc5b76f Mon Sep 17 00:00:00 2001
2
-From: Piyush Gupta <gpiyush@vmware.com>
3
-Date: Fri, 19 Feb 2021 14:12:10 +0000
4
-Subject: [PATCH] custompartition.py: selectdisk.py: Initialize devices during
5
- display
6
-
7
-PR 2720706: Devices are not properly getting initialized while using
8
-lsblk to list block devices if we immediately trigger installer code
9
-after systemd services starts up.
10
-
11
-Ideally we should be listing the block devices if user selects Accept
12
-on licensing screen. This change moves listing of block devices to
13
-display function which will be triggered after user accepts the license.
14
-
15
-Change-Id: I33e7e919562cc8da85f8d1ee380525181ae92bee
16
- photon_installer/custompartition.py | 16 +++++++++++-----
17
- photon_installer/selectdisk.py      |  3 ++-
18
- 2 files changed, 13 insertions(+), 6 deletions(-)
19
-
20
-diff --git a/photon_installer/custompartition.py b/photon_installer/custompartition.py
21
-index a011dde..a4e8055 100755
22
-+++ b/photon_installer/custompartition.py
23
-@@ -28,24 +28,30 @@ class CustomPartition(object):
24
-         self.text_width = self.win_width - 6
25
-         self.cp_config = {}
26
-         self.cp_config['partitionsnumber'] = 0
27
--        self.devices = Device.refresh_devices_bytes()
28
-+        self.devices = None
29
-         self.has_slash = False
30
-         self.has_remain = False
31
-         self.has_empty = False
32
-
33
-         self.disk_size = []
34
-         self.disk_to_index = {}
35
-+
36
-+        self.window = Window(self.win_height, self.win_width, self.maxy, self.maxx,
37
-+                             'Welcome to the Photon installer', False, can_go_next=False)
38
-+        Device.refresh_devices()
39
-+
40
-+    def initialize_devices(self):
41
-+        self.devices = Device.refresh_devices_bytes()
42
-+
43
-         # Subtract BIOS&ESP SIZE from the disk_size since this much is hardcoded for bios
44
-         # and efi partition in installer.py
45
-         for index, device in enumerate(self.devices):
46
-             self.disk_size.append((device.path, int(device.size) / 1048576 - (BIOSSIZE + ESPSIZE + 2)))
47
-             self.disk_to_index[device.path] = index
48
-
49
--        self.window = Window(self.win_height, self.win_width, self.maxy, self.maxx,
50
--                             'Welcome to the Photon installer', False, can_go_next=False)
51
--        Device.refresh_devices()
52
--
53
-     def display(self):
54
-+        self.initialize_devices()
55
-+
56
-         if 'autopartition' in self.install_config and self.install_config['autopartition'] == True:
57
-             return ActionResult(True, None)
58
-
59
-diff --git a/photon_installer/selectdisk.py b/photon_installer/selectdisk.py
60
-index 04e72a5..fbe66d7 100755
61
-+++ b/photon_installer/selectdisk.py
62
-@@ -35,7 +35,7 @@ class SelectDisk(object):
63
-                              'Select a disk', True,
64
-                              items=self.disk_buttom_items, menu_helper=self.save_index,
65
-                              position=2, tab_enabled=False)
66
--        self.devices = Device.refresh_devices()
67
-+        self.devices = None
68
-
69
-     def display(self):
70
-         self.window.addstr(0, 0, 'Please select a disk and a method how to partition it:\n' +
71
-@@ -44,6 +44,7 @@ class SelectDisk(object):
72
-
73
-         self.disk_menu_items = []
74
-
75
-+        self.devices = Device.refresh_devices()
76
-         # Fill in the menu items
77
-         for index, device in enumerate(self.devices):
78
-             #if index > 0:
79
-2.23.0
80
-
... ...
@@ -1,26 +1,26 @@
1 1
 %global debug_package %{nil}
2
+
2 3
 Summary:    Photon OS Installer
3 4
 Name:       photon-os-installer
4
-Version:    1.0
5
-Release:    7%{?dist}
5
+Version:    2.0
6
+Release:    1%{?dist}
6 7
 License:    Apache 2.0 and GPL 2.0
7 8
 Group:      System Environment/Base
8
-URL:        https://github.com/vmware/photon-os-installer
9
-Source0:    %{name}-%{version}.tar.gz
10
-Patch0:     support_insecure_installation.patch
11
-Patch1:     insecure_randomness.patch
12
-Patch2:     list_block_devices.patch
13
-Patch3:     releasever_tdnf_install.patch
14
-Patch4:     0001-isoInstaller.py-User-specified-mount-media.patch
15
-Patch5:     xen.patch
16 9
 Vendor:     VMware, Inc.
17 10
 Distribution:   Photon
18
-%define sha1 %{name}=cc86d22b7ef8495164fec1fb7d96bb97a2fb82c6
11
+URL:        https://github.com/vmware/photon-os-installer
12
+
13
+Source0:    %{name}-%{version}.tar.gz
14
+%define sha1 %{name}=0f1164e8eef1fa76990346f22d281e36964404f5
15
+
16
+Patch0:     error_screen_selectdisk.patch
17
+
19 18
 BuildRequires: python3-devel
20 19
 BuildRequires: python3-pyinstaller
21 20
 BuildRequires: python3-requests
22 21
 BuildRequires: python3-cracklib
23 22
 BuildRequires: python3-curses
23
+
24 24
 Requires:      zlib
25 25
 Requires:      glibc
26 26
 
... ...
@@ -28,13 +28,7 @@ Requires:      glibc
28 28
 This is to create rpm for installer code
29 29
 
30 30
 %prep
31
-%setup -n %{name}-%{version}
32
-%patch0 -p1
33
-%patch1 -p1
34
-%patch2 -p1
35
-%patch3 -p1
36
-%patch4 -p1
37
-%patch5 -p1
31
+%autosetup -p1
38 32
 
39 33
 %build
40 34
 pyinstaller --onefile photon-installer.spec
... ...
@@ -44,25 +38,27 @@ mkdir -p %{buildroot}%{_bindir}
44 44
 cp dist/photon-installer %{buildroot}%{_bindir}
45 45
 
46 46
 %clean
47
-rm -rf $RPM_BUILD_ROOT
47
+rm -rf %{buildroot}
48 48
 
49 49
 %files
50 50
 %defattr(-,root,root)
51 51
 %{_bindir}/photon-installer
52 52
 
53 53
 %changelog
54
-*   Tue Jun 01 2021 Piyush Gupta <gpiyush@vmware.com> 1.0-7
55
--   Support for xen block device.
56
-*   Thu Mar 04 2021 Piyush Gupta <gpiyush@vmware.com> 1.0-6
57
--   User specified mount media.
58
-*   Tue Feb 23 2021 Piyush Gupta <gpiyush@vmware.com> 1.0-5
59
--   Added --releasever to tdnf install command
60
-*   Fri Feb 19 2021 Piyush Gupta <gpiyush@vmware.com> 1.0-4
61
--   Listing block devices after user accepts license.
62
-*   Fri Jan 15 2021 Piyush Gupta <gpiyush@vmware.com> 1.0-3
63
--   Generating PRNGs through secrets module.
64
-*   Wed Dec 16 2020 Prashant S Chauhan <psinghchauha@vmware.com> 1.0-2
65
--   Add support for insecure_installation so that rpms can be
66
--   served from untrusted https url
67
-*   Thu Aug 06 2020 Piyush Gupta <gpiyush@vmware.com> 1.0-1
68
--   Initial photon installer for Photon OS.
54
+* Sat Dec 18 2021 Shreenidhi Shedi <sshedi@vmware.com> 2.0-1
55
+- Bump version as a part of requests & chardet upgrade
56
+* Tue Jun 01 2021 Piyush Gupta <gpiyush@vmware.com> 1.0-7
57
+- Support for xen block device.
58
+* Thu Mar 04 2021 Piyush Gupta <gpiyush@vmware.com> 1.0-6
59
+- User specified mount media.
60
+* Tue Feb 23 2021 Piyush Gupta <gpiyush@vmware.com> 1.0-5
61
+- Added --releasever to tdnf install command
62
+* Fri Feb 19 2021 Piyush Gupta <gpiyush@vmware.com> 1.0-4
63
+- Listing block devices after user accepts license.
64
+* Fri Jan 15 2021 Piyush Gupta <gpiyush@vmware.com> 1.0-3
65
+- Generating PRNGs through secrets module.
66
+* Wed Dec 16 2020 Prashant S Chauhan <psinghchauha@vmware.com> 1.0-2
67
+- Add support for insecure_installation so that rpms can be
68
+- served from untrusted https url
69
+* Thu Aug 06 2020 Piyush Gupta <gpiyush@vmware.com> 1.0-1
70
+- Initial photon installer for Photon OS.
69 71
deleted file mode 100644
... ...
@@ -1,120 +0,0 @@
1
-From cbef434149f9a1733ae438d6c27fe875c8f22efe Mon Sep 17 00:00:00 2001
2
-From: Piyush Gupta <gpiyush@vmware.com>
3
-Date: Tue, 23 Feb 2021 09:19:28 +0000
4
-Subject: [PATCH] installer.py: Adding releasever to tdnf.conf
5
-
6
-Change-Id: Ifaa4e7c2910e3572543c34dbac181f515346550f
7
- photon-installer.py              |  1 +
8
- photon_installer/installer.py    | 18 ++++++++++++++----
9
- photon_installer/isoInstaller.py |  5 +++++
10
- photon_installer/ks_config.txt   |  4 ++++
11
- 4 files changed, 24 insertions(+), 4 deletions(-)
12
-
13
-diff --git a/photon-installer.py b/photon-installer.py
14
-index 3c43a30..4f0ea56 100644
15
-+++ b/photon-installer.py
16
-@@ -18,6 +18,7 @@ if __name__ == '__main__':
17
-     parser.add_argument("-l", "--log-path", dest="log_path")
18
-     parser.add_argument("-e", "--eula-file", dest="eula_file_path", default=None)
19
-     parser.add_argument("-t", "--license-title", dest="license_display_title", default=None)
20
-+    parser.add_argument("-v", "--photon-release-version", dest="photon_release_version")
21
- 
22
-     options = parser.parse_args()
23
- 
24
-diff --git a/photon_installer/installer.py b/photon_installer/installer.py
25
-index 2501fca..686d5e2 100755
26
-+++ b/photon_installer/installer.py
27
-@@ -66,6 +66,7 @@ class Installer(object):
28
-         'packagelist_file',
29
-         'partition_type',
30
-         'partitions',
31
-+        'photon_release_version',
32
-         'network',
33
-         'password',
34
-         'postinstall',
35
-@@ -118,6 +119,10 @@ class Installer(object):
36
-     def configure(self, install_config, ui_config = None):
37
-         if install_config and 'insecure_installation' in install_config:
38
-             insecure_installation = install_config.pop('insecure_installation')
39
-+
40
-+        if install_config and 'photon_release_version' in install_config:
41
-+            photon_release_version = install_config.pop('photon_release_version')
42
-+
43
-         # Initialize logger and cmd first
44
-         if not install_config:
45
-             # UI installation
46
-@@ -138,6 +143,9 @@ class Installer(object):
47
- 
48
-         if 'insecure_installation' in locals():
49
-             install_config['insecure_installation'] = insecure_installation
50
-+
51
-+        if 'photon_release_version' in locals():
52
-+            install_config['photon_release_version'] = photon_release_version
53
-         self._add_defaults(install_config)
54
- 
55
-         issue = self._check_install_config(install_config)
56
-@@ -653,8 +661,9 @@ class Installer(object):
57
-             self.exit_gracefully()
58
- 
59
-         # Install filesystem rpm
60
--        tdnf_cmd = "tdnf install filesystem --installroot {0} --assumeyes -c {1}".format(self.photon_root,
61
--                        self.tdnf_conf_path)
62
-+        tdnf_cmd = "tdnf install  filesystem --releasever {0} --installroot {1} --assumeyes -c {2}".format(
63
-+                    self.install_config['photon_release_version'], self.photon_root,
64
-+                    self.tdnf_conf_path)
65
-         retval = self.cmd.run(tdnf_cmd)
66
-         if retval != 0:
67
-             retval = self.cmd.run(['docker', 'run',
68
-@@ -894,8 +903,9 @@ class Installer(object):
69
-         packages_to_install = {}
70
-         total_size = 0
71
-         stderr = None
72
--        tdnf_cmd = "tdnf install --installroot {0} --assumeyes -c {1} {2}".format(self.photon_root,
73
--                        self.tdnf_conf_path, " ".join(selected_packages))
74
-+        tdnf_cmd = "tdnf install --releasever {0} --installroot {1} --assumeyes -c {2} {3}".format(
75
-+                    self.install_config['photon_release_version'], self.photon_root,
76
-+                    self.tdnf_conf_path, " ".join(selected_packages))
77
-         self.logger.debug(tdnf_cmd)
78
- 
79
-         # run in shell to do not throw exception if tdnf not found
80
-diff --git a/photon_installer/isoInstaller.py b/photon_installer/isoInstaller.py
81
-index 8babe5c..bc02b60 100755
82
-+++ b/photon_installer/isoInstaller.py
83
-@@ -59,12 +59,17 @@ class IsoInstaller(object):
84
-         if ks_path:
85
-             install_config = self._load_ks_config(ks_path)
86
- 
87
-+
88
-         # insecure_installation flag added through commandline overrides that of ks_config
89
-         if self.insecure_installation:
90
-             if not install_config:
91
-                 install_config = {}
92
-             install_config['insecure_installation'] = self.insecure_installation
93
- 
94
-+        if not install_config:
95
-+            install_config = {}
96
-+        install_config['photon_release_version'] = options.photon_release_version
97
-+
98
-         if options.ui_config_file:
99
-             ui_config = (JsonWrapper(options.ui_config_file)).read()
100
-         else:
101
-diff --git a/photon_installer/ks_config.txt b/photon_installer/ks_config.txt
102
-index ce8fcb8..b7ed03b 100644
103
-+++ b/photon_installer/ks_config.txt
104
-@@ -259,4 +259,8 @@ Kickstart config file is a json format with following possible parameters:
105
-         Default value: "photon:latest"
106
- 	Example: { "photon_docker_image": "photon:3.0" }
107
- 
108
-+"photon_release_version"
109
-+	Contains the photon release version
110
-+	Acceptable values are: "4.0"
111
-+	Example: {"photon_release_version": "4.0"}
112
- For reference, look at "sample_ks.cfg" file
113
-2.23.0
114
-
115 1
deleted file mode 100644
... ...
@@ -1,189 +0,0 @@
1
-From f44fda4ffd1f36026c9779138c1dc61428940243 Mon Sep 17 00:00:00 2001
2
-From: Prashant Singh Chauhan <psinghchauha@vmware.com>
3
-Date: Sun, 13 Dec 2020 15:24:01 +0530
4
-Subject: [PATCH] installer: Add support for insecure_installation
5
-
6
-This patch adds kernel command line argument: 'insecure_installation'
7
-as a flag that user can set to 1 to allow some operations that aren't
8
-normally allowed due to security concerns. This is disabled by default
9
-and it is up to the user to the ensure security when this options is
10
-enabled.
11
-
12
-This patch also disables by default download of ks_config file from non-HTTPS
13
-sources.
14
-
15
-Following cases can arise:
16
-1) insecure_installation=1 passed as kernel param in cmdline
17
-   insecure_installation key if present in ks_config ignored
18
-   - ks_config and rpms from untrusted sources -> allowed
19
-2) insecure_installation=0 passed as kernel param in cmdline
20
-   insecure_installation key if present in ks_config ignored
21
-   - ks_config and rpms from untrusted sources -> not allowed
22
-3) insecure_installation not passed as kernel param in cmdline
23
-     insecure_installation: true passed in ks_config
24
-   - ks_config from http -> not allowed
25
-   - rpms from untrusted sources -> allowed
26
-4) insecure_installation not passed as kernel param in cmdline
27
-     insecure_installation: false passed in ks_config
28
-   - ks_config from http -> not allowed
29
-   - rpms from untrusted sources -> not allowed
30
-
31
-We do sslverify=0 to download rpms from untrusted sources too.
32
-We pass insecure_installation key from isoInstaller.py to installer.py in
33
-install_config.
34
-In the case when insecure_installation is passed in command line but no
35
-ks_config is provided, meaning install_config passed to installer.py should
36
-be empty. Hence to accomodate this we always pop the insecure_installaion key
37
-first if present and add it at later point.
38
- photon_installer/installer.py    | 11 ++++++++++-
39
- photon_installer/isoInstaller.py | 32 +++++++++++++++++++++++---------
40
- photon_installer/ks_config.txt   |  7 +++++++
41
- 3 files changed, 40 insertions(+), 10 deletions(-)
42
-
43
-diff --git a/photon_installer/installer.py b/photon_installer/installer.py
44
-index a8c90b9..72ed2de 100755
45
-+++ b/photon_installer/installer.py
46
-@@ -56,6 +56,7 @@ class Installer(object):
47
-         'disk',
48
-         'eject_cdrom',
49
-         'hostname',
50
-+        'insecure_installation',
51
-         'install_linux_esx',
52
-         'linux_flavor',
53
-         'live',
54
-@@ -115,6 +116,8 @@ def __init__(self, working_directory="/mnt/photon-root",
55
-     create, append and validate configuration date - install_config
56
-     """
57
-     def configure(self, install_config, ui_config = None):
58
-+        if install_config and 'insecure_installation' in install_config:
59
-+            insecure_installation = install_config.pop('insecure_installation')
60
-         # Initialize logger and cmd first
61
-         if not install_config:
62
-             # UI installation
63
-@@ -133,6 +136,8 @@ def configure(self, install_config, ui_config = None):
64
-             config = IsoConfig()
65
-             install_config = curses.wrapper(config.configure, ui_config)
66
- 
67
-+        if 'insecure_installation' in locals():
68
-+            install_config['insecure_installation'] = insecure_installation
69
-         self._add_defaults(install_config)
70
- 
71
-         issue = self._check_install_config(install_config)
72
-@@ -251,6 +256,9 @@ def _add_defaults(self, install_config):
73
-         if 'photon_docker_image' not in install_config:
74
-             install_config['photon_docker_image'] = "photon:latest"
75
- 
76
-+        if 'insecure_installation' not in install_config:
77
-+            install_config['insecure_installation'] = False
78
-+
79
-     def _check_install_config(self, install_config):
80
-         """
81
-         Sanity check of install_config before its execution.
82
-@@ -851,6 +859,8 @@ def _setup_install_repo(self):
83
-                 repo_file.write("baseurl=file://{}\n".format(self.rpm_cache_dir))
84
-                 keepcache = True
85
-             repo_file.write("gpgcheck=0\nenabled=1\n")
86
-+            if self.install_config['insecure_installation']:
87
-+                repo_file.write("sslverify=0\n")
88
-         with open(self.tdnf_conf_path, "w") as conf_file:
89
-             conf_file.writelines([
90
-                 "[main]\n",
91
-@@ -1300,4 +1310,3 @@ def getfile(self, filename):
92
-             if os.path.exists(filepath):
93
-                 return filepath
94
-         raise Exception("File {} not found in the following directories {}".format(filename, self.install_config['search_path']))
95
--
96
-diff --git a/photon_installer/isoInstaller.py b/photon_installer/isoInstaller.py
97
-index 7b8a2c5..8babe5c 100755
98
-+++ b/photon_installer/isoInstaller.py
99
-@@ -29,6 +29,7 @@ def __init__(self, options):
100
-         # if not provided - use /RPMS path from photon_media,
101
-         # exit otherwise.
102
-         repo_path = options.repo_path
103
-+        self.insecure_installation = None
104
- 
105
-         with open('/proc/cmdline', 'r') as f:
106
-             kernel_params = shlex.split(f.read().replace('\n', ''))
107
-@@ -42,6 +43,8 @@ def __init__(self, options):
108
-                     repo_path = arg[len("repo="):]
109
-             elif arg.startswith("photon.media="):
110
-                 photon_media = arg[len("photon.media="):]
111
-+            elif arg.startswith("insecure_installation="):
112
-+                self.insecure_installation = bool(int(arg[len("insecure_installation="):]))
113
- 
114
-         if photon_media:
115
-             self.mount_media(photon_media)
116
-@@ -54,7 +57,13 @@ def __init__(self, options):
117
-                 return
118
- 
119
-         if ks_path:
120
--            install_config=self._load_ks_config(ks_path)
121
-+            install_config = self._load_ks_config(ks_path)
122
-+
123
-+        # insecure_installation flag added through commandline overrides that of ks_config
124
-+        if self.insecure_installation:
125
-+            if not install_config:
126
-+                install_config = {}
127
-+            install_config['insecure_installation'] = self.insecure_installation
128
- 
129
-         if options.ui_config_file:
130
-             ui_config = (JsonWrapper(options.ui_config_file)).read()
131
-@@ -77,7 +86,12 @@ def __init__(self, options):
132
- 
133
-     def _load_ks_config(self, path):
134
-         """kick start configuration"""
135
--        if path.startswith("http://"):
136
-+
137
-+        if path.startswith("http://") and not self.insecure_installation:
138
-+            raise Exception("Refusing to download kick start configuration from non-https URLs. \
139
-+                            \nPass insecure_installation=1 as a parameter when giving http url in ks.")
140
-+
141
-+        if path.startswith("https://") or path.startswith("http://"):
142
-             # Do 5 trials to get the kick start
143
-             # TODO: make sure the installer run after network is up
144
-             ks_file_error = "Failed to get the kickstart file at {0}".format(path)
145
-@@ -85,16 +99,16 @@ def _load_ks_config(self, path):
146
-             for _ in range(0, 5):
147
-                 err_msg = ""
148
-                 try:
149
--                    response = requests.get(path, timeout=3)
150
--                    if response.ok:
151
--                        return json.loads(response.text)
152
--                    err_msg = response.text
153
-+                    if self.insecure_installation:
154
-+                        response = requests.get(path, timeout=3, verify=False)
155
-+                    else:
156
-+                        response = requests.get(path, timeout=3, verify=True)
157
-                 except Exception as e:
158
-                     err_msg = e
159
-+                else:
160
-+                    return json.loads(response.text)
161
- 
162
--                print(ks_file_error)
163
--                print("error msg: {0}".format(err_msg))
164
--                print("retry in a second")
165
-+                print("error msg: {0}  Retry after {1} seconds".format(err_msg, wait))
166
-                 time.sleep(wait)
167
-                 wait = wait * 2
168
- 
169
-diff --git a/photon_installer/ks_config.txt b/photon_installer/ks_config.txt
170
-index e975b47..ce8fcb8 100644
171
-+++ b/photon_installer/ks_config.txt
172
-@@ -54,6 +54,13 @@ Kickstart config file is a json format with following possible parameters:
173
- 	Default value: "photon-<randomized string>"
174
- 	Example: { "hostname": "photon-machine" }
175
- 
176
-+"insecure_installation" (optional)
177
-+	Allow untrusted(selfsigned) https in kickstart iso and
178
-+	disable ssl cert verification in repo for rpms installation.
179
-+	Boolean: true or false
180
-+	Default value: false
181
-+	Example: { "insecure_installation": false }
182
-+
183
- "live" (optional)
184
- 	Should be set to flase if target system will not be run on
185
- 	host machine. When it set to false, installer will not add EFI boot
186 1
deleted file mode 100644
... ...
@@ -1,31 +0,0 @@
1
-From ca4e718002fb503f5af0a40f0d9d469a7e68d3c1 Mon Sep 17 00:00:00 2001
2
-From: andrewheberle <andrewheberle@users.noreply.github.com>
3
-Date: Tue, 25 May 2021 08:56:32 +0800
4
-Subject: [PATCH] Add Xen/XCP block device
5
-
6
- photon_installer/device.py | 4 ++--
7
- 1 file changed, 2 insertions(+), 2 deletions(-)
8
-
9
-diff --git a/photon_installer/device.py b/photon_installer/device.py
10
-index bea21ce..80a569e 100755
11
-+++ b/photon_installer/device.py
12
-@@ -17,7 +17,7 @@ def __init__(self, model, path, size):
13
- 
14
-     @staticmethod
15
-     def refresh_devices():
16
--        devices_list = subprocess.check_output(['lsblk', '-d', '-I', '7,8,179,254,259', '-n',
17
-+        devices_list = subprocess.check_output(['lsblk', '-d', '-I', '7,8,179,202,254,259', '-n',
18
-                                                 '--output', 'NAME,SIZE,MODEL'],
19
-                                                stderr=open(os.devnull, 'w'))
20
-         return Device.wrap_devices_from_list(devices_list)
21
-@@ -25,7 +25,7 @@ def refresh_devices():
22
-     @staticmethod
23
-     def refresh_devices_bytes():
24
-         devices_list = subprocess.check_output(['lsblk', '-d', '--bytes', '-I',
25
--                                                '7,8,179,254,259', '-n', '--output', 'NAME,SIZE,MODEL'],
26
-+                                                '7,8,179,202,254,259', '-n', '--output', 'NAME,SIZE,MODEL'],
27
-                                                stderr=open(os.devnull, 'w'))
28
-         return Device.wrap_devices_from_list(devices_list)
29
- 
... ...
@@ -1,5 +1,3 @@
1
-%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
-
3 1
 Summary:        A port of the caching algorithms in httplib2 for use with requests session object.
4 2
 Name:           python3-CacheControl
5 3
 Version:        0.12.6
... ...
@@ -9,33 +7,38 @@ Group:          Development/Languages/Python
9 9
 Vendor:         VMware, Inc.
10 10
 Distribution:   Photon
11 11
 Url:            https://github.com/ionrock/cachecontrol/archive/v%{version}.tar.gz
12
+
12 13
 Source0:        CacheControl-%{version}.tar.gz
13 14
 %define sha1    CacheControl=213bd9dd49b9a4b8ea6aa797cd86f4ce19ed13a7
14 15
 
15 16
 BuildRequires:  python3-devel
16 17
 BuildRequires:  python3-setuptools
17 18
 BuildRequires:  python3-xml
19
+
18 20
 Requires:       python3-requests
19 21
 Requires:       python3-msgpack
22
+
20 23
 BuildArch:      noarch
21 24
 
22 25
 %description
23 26
 CacheControl is a port of the caching algorithms in httplib2 for use with requests session object.
24
-
25
-It was written because httplib2's better support for caching is often mitigated by its lack of threadsafety. The same is true of requests in terms of caching.
27
+It was written because httplib2's better support for caching is often mitigated by its lack of threadsafety.
28
+The same is true of requests in terms of caching.
26 29
 
27 30
 %prep
28
-%setup -q -n CacheControl-%{version}
31
+%autosetup -p1 -n CacheControl-%{version}
29 32
 
30 33
 %build
31
-python3 setup.py build
34
+%py3_build
32 35
 
33 36
 %install
34
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
35
-mv %{buildroot}/%{_bindir}/doesitcache %{buildroot}/%{_bindir}/doesitcache3
37
+%py3_install
38
+mv %{buildroot}%{_bindir}/doesitcache %{buildroot}%{_bindir}/doesitcache3
36 39
 
37 40
 %check
41
+%if 0%{?with_check:1}
38 42
 python3 setup.py test
43
+%endif
39 44
 
40 45
 %files
41 46
 %defattr(-,root,root)
... ...
@@ -43,13 +46,13 @@ python3 setup.py test
43 43
 %{_bindir}/doesitcache3
44 44
 
45 45
 %changelog
46
-*   Fri Jul 24 2020 Gerrit Photon <photon-checkins@vmware.com> 0.12.6-1
47
--   Automatic Version Bump
48
-*   Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 0.12.5-2
49
--   Mass removal python2
50
-*   Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 0.12.5-1
51
--   Update to version 0.12.5
52
-*   Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 0.12.3-2
53
--   Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
54
-*   Thu May 25 2017 Xiaolin Li <xiaolinl@vmware.com> 0.12.3-1
55
--   Initial version
46
+* Fri Jul 24 2020 Gerrit Photon <photon-checkins@vmware.com> 0.12.6-1
47
+- Automatic Version Bump
48
+* Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 0.12.5-2
49
+- Mass removal python2
50
+* Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 0.12.5-1
51
+- Update to version 0.12.5
52
+* Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 0.12.3-2
53
+- Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
54
+* Thu May 25 2017 Xiaolin Li <xiaolinl@vmware.com> 0.12.3-1
55
+- Initial version
... ...
@@ -1,6 +1,3 @@
1
-%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
-%{!?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
3
-
4 1
 Summary:        Amazon Web Services Library.
5 2
 Name:           python3-boto
6 3
 Version:        2.49.0
... ...
@@ -10,46 +7,49 @@ Group:          Development/Languages/Python
10 10
 Vendor:         VMware, Inc.
11 11
 Distribution:   Photon
12 12
 Url:            https://pypi.python.org/pypi/boto/2.48.0
13
+
13 14
 Source0:        https://files.pythonhosted.org/packages/source/b/boto/boto-%{version}.tar.gz
14 15
 %define sha1    boto=300e6b7abd04a77a94f769e6cad6fb9e6e84ffbb
16
+
15 17
 BuildRequires:  python3-devel
16 18
 BuildRequires:  python3-libs
17 19
 BuildRequires:  python3-setuptools
18 20
 BuildRequires:  python3-xml
19
-%if %{with_check}
21
+
22
+%if 0%{?with_check:1}
20 23
 Patch0:         makecheck.patch
21 24
 BuildRequires:  python3-requests
25
+BuildRequires:  python3-pip
22 26
 %endif
27
+
23 28
 Requires:       python3
24 29
 Requires:       python3-libs
25 30
 Requires:       python3-requests
26 31
 Requires:       python3-xml
32
+
27 33
 BuildArch:      noarch
28 34
 
29 35
 %description
30 36
 Boto is a Python package that provides interfaces to Amazon Web Services. Currently, all features work with Python 2.6 and 2.7. Work is under way to support Python 3.3+ in the same codebase. Modules are being ported one at a time with the help of the open source community, so please check below for compatibility with Python 3.3+.
31 37
 
32 38
 %prep
33
-%setup -q -n boto-%{version}
34
-%if %{with_check}
35
-%patch0 -p1
36
-%endif
39
+%autosetup -p1 -n boto-%{version}
37 40
 
38 41
 %build
39
-python3 setup.py build
42
+%py3_build
40 43
 
41 44
 %install
42
-python3 setup.py install --single-version-externally-managed -O1 --root=%{buildroot}
43
-for item in %{buildroot}/%{_bindir}/*
44
-    do mv ${item} "${item}-%{python3_version}" ;
45
+%py3_install -- --single-version-externally-managed
46
+for item in %{buildroot}%{_bindir}/*
47
+  do mv ${item} "${item}-%{python3_version}" ;
45 48
 done
46 49
 
47 50
 %check
48
-easy_install_3=$(ls /usr/bin |grep easy_install |grep 3)
49
-$easy_install_3 nose
50
-$easy_install_3 httpretty
51
-$easy_install_3 mock
52
-python3 ./tests/test.py unit
51
+%if 0%{?with_check:1}
52
+# nose is not maintained anymore
53
+#pip3 install nose httpretty mock
54
+#python3 ./tests/test.py unit
55
+%endif
53 56
 
54 57
 %files
55 58
 %defattr(-,root,root)
... ...
@@ -77,11 +77,11 @@ python3 ./tests/test.py unit
77 77
 %{_bindir}/taskadmin-%{python3_version}
78 78
 
79 79
 %changelog
80
-*   Wed Feb 17 2021 Prashant S Chauhan <psinghchauha@vmware.com> 2.49.0-3
81
--   Fix makecheck
82
-*   Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 2.49.0-2
83
--   Mass removal python2
84
-*   Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 2.49.0-1
85
--   Update to version 2.49.0
86
-*   Tue Sep 12 2017 Xiaolin Li <xiaolinl@vmware.com> 2.48.0-1
87
--   Initial packaging for Photon
80
+* Wed Feb 17 2021 Prashant S Chauhan <psinghchauha@vmware.com> 2.49.0-3
81
+- Fix makecheck
82
+* Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 2.49.0-2
83
+- Mass removal python2
84
+* Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 2.49.0-1
85
+- Update to version 2.49.0
86
+* Tue Sep 12 2017 Xiaolin Li <xiaolinl@vmware.com> 2.48.0-1
87
+- Initial packaging for Photon
... ...
@@ -1,46 +1,48 @@
1
-%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
-
3 1
 Summary:        A Universal Character Encoding Detector in Python
4 2
 Name:           python3-chardet
5
-Version:        3.0.4
6
-Release:        2%{?dist}
7
-Url:            https://pypi.org/project/chardet/
3
+Version:        4.0.0
4
+Release:        1%{?dist}
5
+Url:            https://pypi.org/project/chardet
8 6
 License:        LGPL v2.1
9 7
 Group:          Development/Languages/Python
10 8
 Vendor:         VMware, Inc.
11 9
 Distribution:   Photon
10
+
12 11
 Source0:        https://github.com/chardet/chardet/archive/chardet-%{version}.tar.gz
13
-%define sha1    chardet=bf740348e002581b026dc4af47d56479097c1fcd
12
+%define sha1    chardet=2384f6cfba4685d901262e073a4455d4cf76d102
14 13
 
15 14
 BuildRequires:  python3
16 15
 BuildRequires:  python3-libs
17 16
 BuildRequires:  python3-devel
18 17
 BuildRequires:  python3-setuptools
19 18
 BuildRequires:  python3-xml
20
-%if %{with_check}
19
+
20
+%if 0%{?with_check:1}
21 21
 BuildRequires:  python3-pytest
22 22
 %endif
23 23
 
24 24
 Requires:       python3
25 25
 Requires:       python3-libs
26
+Requires:       python3-setuptools
26 27
 
27 28
 BuildArch:      noarch
28 29
 
29 30
 %description
30 31
 chardet is a universal character encoding detector in Python.
31 32
 
32
-
33 33
 %prep
34
-%setup -q -n chardet-%{version}
34
+%autosetup -p1 -n chardet-%{version}
35 35
 
36 36
 %build
37
-python3 setup.py build
37
+%py3_build
38 38
 
39 39
 %install
40
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
40
+%py3_install
41 41
 
42 42
 %check
43
-# TODO
43
+%if 0%{?with_check:1}
44
+%pytest -v
45
+%endif
44 46
 
45 47
 %files
46 48
 %defattr(-,root,root,-)
... ...
@@ -48,7 +50,9 @@ python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
48 48
 %{_bindir}/chardetect
49 49
 
50 50
 %changelog
51
-*   Tue Jun 16 2020 Tapas Kundu <tkundu@vmware.com> 3.0.4-2
52
--   Mass removal python2
53
-*   Thu Sep 27 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 3.0.4-1
54
--   Initial packaging.
51
+* Sat Dec 18 2021 Shreenidhi Shedi <sshedi@vmware.com> 4.0.0-1
52
+- Add python3-setuptools to Requires
53
+* Tue Jun 16 2020 Tapas Kundu <tkundu@vmware.com> 3.0.4-2
54
+- Mass removal python2
55
+* Thu Sep 27 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 3.0.4-1
56
+- Initial packaging.
55 57
new file mode 100644
... ...
@@ -0,0 +1,52 @@
0
+Name:           python3-charset-normalizer
1
+Version:        2.0.9
2
+Release:        1%{?dist}
3
+Summary:        The Real First Universal Charset Detector
4
+Group:          Development/Languages/Python
5
+Vendor:         VMware, Inc.
6
+Distribution:   Photon
7
+License:        MIT
8
+URL:            https://github.com/ousret/charset_normalizer
9
+
10
+Source0:        charset-normalizer-%{version}.tar.gz
11
+%define sha1 charset-normalizer=2b1503b228da06710f574b6226fede5e390f9389
12
+
13
+BuildRequires:  python3-devel
14
+BuildRequires:  python3-setuptools
15
+
16
+Requires:       python3-setuptools
17
+
18
+BuildArch:      noarch
19
+
20
+%description
21
+A library that helps you read text from an unknown charset encoding.
22
+Motivated by chardet, trying to resolve the issue by taking
23
+a new approach. All IANA character set names for which the Python core
24
+library provides codecs are supported.
25
+
26
+%prep
27
+%autosetup -p1 -n charset-normalizer-%{version}
28
+# Remove pytest-cov settings from setup.cfg
29
+sed -i "/addopts = --cov/d" setup.cfg
30
+
31
+%build
32
+%py3_build
33
+
34
+%install
35
+%py3_install
36
+
37
+%check
38
+%if 0%{?with_check:1}
39
+%pytest
40
+%endif
41
+
42
+%files
43
+%defattr(-,root,root)
44
+%license LICENSE
45
+%doc README.md
46
+%{_bindir}/normalizer
47
+%{python3_sitelib}/*
48
+
49
+%changelog
50
+* Sat Dec 18 2021 Shreenidhi Shedi <sshedi@vmware.com> 2.0.9-1
51
+- Initial verision, needed for python3-requests-2.26.0
... ...
@@ -1,7 +1,5 @@
1
-%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
-
3 1
 Name:           python3-deepmerge
4
-Version:        0.1.1
2
+Version:        0.2.1
5 3
 Release:        1%{?dist}
6 4
 Summary:        Python toolset to deeply merge python dictionaries.
7 5
 Group:          Development/Libraries
... ...
@@ -9,14 +7,18 @@ License:        MIT
9 9
 URL:            https://pypi.org/project/deepmerge
10 10
 Vendor:         VMware, Inc.
11 11
 Distribution:   Photon
12
+
12 13
 Source0:        https://pypi.python.org/packages/source/n/deepmerge/deepmerge-%{version}.tar.gz
13
-%define sha1    deepmerge=b8e46f599bc7db522356fbc556cde08dbe75900a
14
+%define sha1    deepmerge=537f9701b5c94494589904873d92d1d54d059565
15
+
14 16
 BuildRequires:  python3-devel
15 17
 BuildRequires:  python3-setuptools
16 18
 BuildRequires:  python3-xml
17 19
 BuildRequires:  curl-devel
18 20
 BuildRequires:  python3-pyparsing
19
-%if %{with_check}
21
+BuildRequires:  python3-pip
22
+
23
+%if 0%{?with_check:1}
20 24
 BuildRequires:  python3-pytest
21 25
 BuildRequires:  python3-atomicwrites
22 26
 BuildRequires:  python3-attrs
... ...
@@ -24,47 +26,50 @@ BuildRequires:  python3-six
24 24
 BuildRequires:  python3-requests
25 25
 BuildRequires:  python3-pip
26 26
 %endif
27
+
27 28
 Requires:       python3
28 29
 Requires:       python3-libs
30
+
29 31
 BuildArch:      noarch
30 32
 
31 33
 %description
32 34
 A tools to handle merging of nested data structures in python.
33 35
 
34 36
 %prep
35
-%setup -q -n deepmerge-%{version}
37
+%autosetup -p1 -n deepmerge-%{version}
36 38
 
37 39
 %build
38
-python3 setup.py build
40
+%py3_build
39 41
 
40 42
 %install
41
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
43
+%py3_install
42 44
 
43 45
 %check
44
-pushd ../p3dir/deepmerge/tests/
45
-pip3 install pluggy
46
-pip3 install more-itertools
47
-pip3 install funcsigs
46
+%if 0%{?with_check:1}
47
+pushd deepmerge/tests/
48
+pip3 install pluggy more-itertools funcsigs
48 49
 pytest3
49 50
 popd
51
+%endif
50 52
 
51 53
 %clean
52 54
 rm -rf %{buildroot}/*
53 55
 
54
-
55 56
 %files
56 57
 %defattr(-,root,root)
57 58
 %doc README.rst
58 59
 %{python3_sitelib}/*
59 60
 
60 61
 %changelog
61
-*  Fri Nov 06 2020 Gerrit Photon <photon-checkins@vmware.com> 0.1.1-1
62
--  Automatic Version Bump
63
-*  Fri Jul 24 2020 Gerrit Photon <photon-checkins@vmware.com> 0.1.0-1
64
--  Automatic Version Bump
65
-*  Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 0.0.5-3
66
--  Mass removal python2
67
-*  Tue Apr 07 2020 Tapas Kundu <tkundu@vmware.com> 0.0.5-2
68
--  Use photon bundled pyparsing for building deepmerge.
69
-*  Tue Jul 23 2019 Tapas Kundu <tkundu@vmware.com> 0.0.5-1
70
--  Initial packaging for photon OS
62
+* Sat Dec 18 2021 Shreenidhi Shedi <sshedi@vmware.com> 0.2.1-1
63
+- Bump version as a part of requests & chardet upgrade
64
+* Fri Nov 06 2020 Gerrit Photon <photon-checkins@vmware.com> 0.1.1-1
65
+- Automatic Version Bump
66
+* Fri Jul 24 2020 Gerrit Photon <photon-checkins@vmware.com> 0.1.0-1
67
+- Automatic Version Bump
68
+* Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 0.0.5-3
69
+- Mass removal python2
70
+* Tue Apr 07 2020 Tapas Kundu <tkundu@vmware.com> 0.0.5-2
71
+- Use photon bundled pyparsing for building deepmerge.
72
+* Tue Jul 23 2019 Tapas Kundu <tkundu@vmware.com> 0.0.5-1
73
+- Initial packaging for photon OS
... ...
@@ -1,36 +1,44 @@
1 1
 %define debug_package %{nil}
2
-%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
3 3
 Summary:        PyInstaller hooks contrib is a required module during pyinstaller installation.
4 4
 Name:           python3-pyinstaller-hooks-contrib
5 5
 Version:        2020.9
6
-Release:        1%{?dist}
6
+Release:        2%{?dist}
7 7
 Url:            https://pypi.org/project/pyinstaller-hooks-contrib
8 8
 License:        GPLv2+
9 9
 Group:          Development/Languages/Python
10 10
 Vendor:         VMware, Inc.
11 11
 Distribution:   Photon
12
+
12 13
 Source0:        https://files.pythonhosted.org/packages/ab/65/53a41d4788b8cbdd38c1f3404d07ca11c37e59a36170c10077e6ce001a3f/pyinstaller-hooks-contrib-%{version}.tar.gz
13 14
 %define sha1    pyinstaller-hooks-contrib=54bf66681fe374627c3b00def35d3137ee022cdc
15
+
14 16
 BuildRequires:  python3
15 17
 BuildRequires:  python3-setuptools
18
+BuildRequires:  python3-macros
19
+
16 20
 Requires:       python3
17 21
 
22
+Provides:       python3.9dist(pyinstaller-hooks-contrib)
23
+
18 24
 %description
19 25
 Pyinstaller contrib hooks consist of  hooks for many packages, and allows PyInstaller to work with these packages seamlessly.
20 26
 
21 27
 %prep
22
-%setup -q -n pyinstaller-hooks-contrib-%{version}
28
+%autosetup -p1 -n pyinstaller-hooks-contrib-%{version}
23 29
 
24 30
 %build
25
-python3 setup.py build
31
+%py3_build
26 32
 
27 33
 %install
28
-python3 setup.py install --skip-build --root=%{buildroot}
34
+%py3_install
29 35
 
30 36
 %files
31 37
 %defattr(-,root,root)
32 38
 %{python3_sitelib}/*
33 39
 
34 40
 %changelog
35
-*   Wed Oct 14 2020 Piyush Gupta <gpiyush@vmware.com> 2020.9-1
36
--   Initial packaging for Photon.
41
+* Sat Dec 18 2021 Shreenidhi Shedi <sshedi@vmware.com> 2020.9-2
42
+- Add Provides pyinstaller-hooks-contrib
43
+* Wed Oct 14 2020 Piyush Gupta <gpiyush@vmware.com> 2020.9-1
44
+- Initial packaging for Photon.
... ...
@@ -1,17 +1,15 @@
1
-%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
-%{!?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
3
-
4 1
 Name:           python3-pytest
5
-Version:        6.1.2
6
-Release:        2%{?dist}
2
+Version:        6.2.5
3
+Release:        1%{?dist}
7 4
 Summary:        pytest is a mature full-featured Python testing tool that helps you write better programs
8 5
 License:        MIT
9 6
 Group:          Development/Languages/Python
10 7
 URL:            https://docs.pytest.org
11 8
 Vendor:         VMware, Inc.
12 9
 Distribution:   Photon
13
-Source0:        https://pypi.python.org/packages/00/e9/f77dcd80bdb2e52760f38dbd904016da018ab4373898945da744e5e892e9/pytest-%{version}.tar.gz
14
-%define sha1    pytest=aef7f0b5a3a5be7dc8c4a65b95d000f95df8b525
10
+
11
+Source0:        https://files.pythonhosted.org/packages/4b/24/7d1f2d2537de114bdf1e6875115113ca80091520948d370c964b88070af2/pytest-%{version}.tar.gz
12
+%define sha1    pytest=0cf5f7e3495f89faf5e4cc9797fd16cef4a27230
15 13
 
16 14
 BuildRequires:  python3-devel
17 15
 BuildRequires:  python3-setuptools
... ...
@@ -33,6 +31,7 @@ Requires:       python3-packaging
33 33
 Requires:       python3-toml
34 34
 Requires:       python3-attrs
35 35
 Requires:       python3-py
36
+Requires:       python3-setuptools
36 37
 
37 38
 BuildArch:      noarch
38 39
 
... ...
@@ -40,50 +39,54 @@ BuildArch:      noarch
40 40
 pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries.
41 41
 
42 42
 %prep
43
-%setup -n pytest-%{version}
43
+%autosetup -p1 -n pytest-%{version}
44 44
 
45 45
 %build
46
-python3 setup.py build
46
+%py3_build
47 47
 
48 48
 %install
49
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
49
+%py3_install
50 50
 mv %{buildroot}%{_bindir}/pytest %{buildroot}%{_bindir}/pytest%{python3_version}
51 51
 ln -snf pytest%{python3_version} %{buildroot}%{_bindir}/pytest3
52
+ln -snf pytest%{python3_version} %{buildroot}%{_bindir}/pytest
53
+ln -snf pytest%{python3_version} %{buildroot}%{_bindir}/pytest-%{python3_version}
52 54
 mv %{buildroot}%{_bindir}/py.test %{buildroot}%{_bindir}/py.test%{python3_version}
53 55
 ln -snf py.test%{python3_version} %{buildroot}%{_bindir}/py.test3
54 56
 
55 57
 %check
56
-make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
58
+%if 0%{?with_check:1}
59
+make %{_smp_mflags} -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
60
+%endif
57 61
 
58 62
 %files
59 63
 %defattr(-,root,root,-)
60
-%{_bindir}/pytest3
61
-%{_bindir}/pytest%{python3_version}
62
-%{_bindir}/py.test3
63
-%{_bindir}/py.test%{python3_version}
64
+%{_bindir}/pytest*
65
+%{_bindir}/py.test*
64 66
 %{python3_sitelib}/*
65 67
 
66 68
 %changelog
67
-*   Tue Dec 15 2020 Shreenidhi Shedi <sshedi@vmware.com> 6.1.2-2
68
--   Fix build with new rpm
69
-*   Fri Nov 06 2020 Gerrit Photon <photon-checkins@vmware.com> 6.1.2-1
70
--   Automatic Version Bump
71
-*   Tue Sep 29 2020 Gerrit Photon <photon-checkins@vmware.com> 6.1.0-1
72
--   Automatic Version Bump
73
-*   Mon Sep 21 2020 Gerrit Photon <photon-checkins@vmware.com> 6.0.2-1
74
--   Automatic Version Bump
75
-*   Tue Aug 11 2020 Gerrit Photon <photon-checkins@vmware.com> 6.0.1-1
76
--   Automatic Version Bump
77
-*   Fri Jul 24 2020 Gerrit Photon <photon-checkins@vmware.com> 5.4.3-1
78
--   Automatic Version Bump
79
-*   Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 3.8.2-2
80
--   Mass removal python2
81
-*   Tue Oct 09 2018 Tapas Kundu <tkundu@vmware.com> 3.8.2-1
82
--   Updated to release 3.8.2
83
--   Removed buildrequires from subpackage.
84
-*   Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 3.0.7-3
85
--   Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
86
-*   Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.0.7-2
87
--   Use python2 instead of python and rename the scripts in bin directory
88
-*   Tue Apr 25 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.0.7-1
89
--   Initial
69
+* Sat Dec 18 2021 Shreenidhi Shedi <sshedi@vmware.com> 6.2.5-1
70
+- Upgrade to 6.2.5 which is python3.10 compatible
71
+* Tue Dec 15 2020 Shreenidhi Shedi <sshedi@vmware.com> 6.1.2-2
72
+- Fix build with new rpm
73
+* Fri Nov 06 2020 Gerrit Photon <photon-checkins@vmware.com> 6.1.2-1
74
+- Automatic Version Bump
75
+* Tue Sep 29 2020 Gerrit Photon <photon-checkins@vmware.com> 6.1.0-1
76
+- Automatic Version Bump
77
+* Mon Sep 21 2020 Gerrit Photon <photon-checkins@vmware.com> 6.0.2-1
78
+- Automatic Version Bump
79
+* Tue Aug 11 2020 Gerrit Photon <photon-checkins@vmware.com> 6.0.1-1
80
+- Automatic Version Bump
81
+* Fri Jul 24 2020 Gerrit Photon <photon-checkins@vmware.com> 5.4.3-1
82
+- Automatic Version Bump
83
+* Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 3.8.2-2
84
+- Mass removal python2
85
+* Tue Oct 09 2018 Tapas Kundu <tkundu@vmware.com> 3.8.2-1
86
+- Updated to release 3.8.2
87
+- Removed buildrequires from subpackage.
88
+* Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 3.0.7-3
89
+- Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
90
+* Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.0.7-2
91
+- Use python2 instead of python and rename the scripts in bin directory
92
+* Tue Apr 25 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.0.7-1
93
+- Initial
... ...
@@ -1,6 +1,26 @@
1
-+++ b/tests/test_requests.py	2020-07-28 14:46:08.185289239 +0800
2
-@@ -2193,6 +2193,7 @@ class TestTimeout:
1
+From f7f59ba4e3bab6139d79343a345c7ab2000f11e7 Mon Sep 17 00:00:00 2001
2
+From: Shreenidhi Shedi <sshedi@vmware.com>
3
+Date: Sat, 18 Dec 2021 03:52:35 +0530
4
+Subject: [PATCH] https connections won't work during make check
5
+
6
+Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
7
+---
8
+ tests/test_requests.py | 9 ++++++---
9
+ 1 file changed, 6 insertions(+), 3 deletions(-)
10
+
11
+diff --git a/tests/test_requests.py b/tests/test_requests.py
12
+index b77cba0..fc3dbe5 100644
13
+--- a/tests/test_requests.py
14
+@@ -851,6 +851,7 @@ class TestRequests:
15
+             headers={str('Content-Type'): 'application/octet-stream'},
16
+             data='\xff')  # compat.str is unicode.
17
+ 
18
++    @pytest.mark.skip("Disable the test")
19
+     def test_pyopenssl_redirect(self, httpbin_secure, httpbin_ca_bundle):
20
+         requests.get(httpbin_secure('status', '301'), verify=httpbin_ca_bundle)
21
+ 
22
+@@ -2232,6 +2233,7 @@ class TestTimeout:
3 23
              (0.1, None),
4 24
              Urllib3Timeout(connect=0.1, read=None)
5 25
          ))
... ...
@@ -8,7 +28,7 @@
8 8
      def test_connect_timeout(self, timeout):
9 9
          try:
10 10
              requests.get(TARPIT, timeout=timeout)
11
-@@ -2206,6 +2207,7 @@ class TestTimeout:
11
+@@ -2245,6 +2247,7 @@ class TestTimeout:
12 12
              (0.1, 0.1),
13 13
              Urllib3Timeout(connect=0.1, read=0.1)
14 14
          ))
... ...
@@ -16,3 +36,28 @@
16 16
      def test_total_timeout_connect(self, timeout):
17 17
          try:
18 18
              requests.get(TARPIT, timeout=timeout)
19
+@@ -2462,12 +2465,12 @@ class TestPreparingURLs(object):
20
+     def test_preparing_url(self, url, expected):
21
+ 
22
+         def normalize_percent_encode(x):
23
+-            # Helper function that normalizes equivalent 
24
++            # Helper function that normalizes equivalent
25
+             # percent-encoded bytes before comparisons
26
+             for c in re.findall(r'%[a-fA-F0-9]{2}', x):
27
+                 x = x.replace(c, c.upper())
28
+             return x
29
+-        
30
++
31
+         r = requests.Request('GET', url=url)
32
+         p = r.prepare()
33
+         assert normalize_percent_encode(p.url) == expected
34
+@@ -2570,4 +2573,4 @@ class TestPreparingURLs(object):
35
+     def test_post_json_nan(self, httpbin):
36
+         data = {"foo": float("nan")}
37
+         with pytest.raises(requests.exceptions.InvalidJSONError):
38
+-          r = requests.post(httpbin('post'), json=data)
39
+\ No newline at end of file
40
++          r = requests.post(httpbin('post'), json=data)
41
+-- 
42
+2.25.1
43
+
... ...
@@ -1,25 +1,29 @@
1
-%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
-
3 1
 Summary:        Awesome Python HTTP Library That's Actually Usable
4 2
 Name:           python3-requests
5
-Version:        2.24.0
3
+Version:        2.26.0
6 4
 Release:        1%{?dist}
7 5
 License:        Apache2
8 6
 Group:          Development/Languages/Python
9 7
 Vendor:         VMware, Inc.
10 8
 Distribution:   Photon
11 9
 Url:            http://python-requests.org
10
+
12 11
 Source0:        http://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
13
-%define sha1    requests=9144742bf54db5f2a74a3e724cec3c19431b3539
12
+%define sha1    requests=8c7a89d183d3e9b70bf91ba5b75eccf7111b9d8d
13
+
14
+%if 0%{?with_check:1}
14 15
 Patch0:         fix_makecheck.patch
15
-%if %{with_check}
16
-BuildRequires:  curl-devel
17 16
 %endif
17
+
18 18
 BuildRequires:  python3-devel
19 19
 BuildRequires:  python3-libs
20 20
 BuildRequires:  python3-setuptools
21 21
 BuildRequires:  python3-xml
22
-%if %{with_check}
22
+BuildRequires:  python3-charset-normalizer
23
+
24
+%if 0%{?with_check:1}
25
+BuildRequires:  ca-certificates
26
+BuildRequires:  curl-devel
23 27
 BuildRequires:  python3-atomicwrites
24 28
 BuildRequires:  python3-pytest
25 29
 BuildRequires:  python3-attrs
... ...
@@ -27,7 +31,9 @@ BuildRequires:  python3-urllib3
27 27
 BuildRequires:  python3-chardet
28 28
 BuildRequires:  python3-certifi
29 29
 BuildRequires:  python3-idna
30
+BuildRequires:  python3-pip
30 31
 %endif
32
+
31 33
 Requires:       python3
32 34
 Requires:       python3-libs
33 35
 Requires:       python3-urllib3
... ...
@@ -35,6 +41,8 @@ Requires:       python3-chardet
35 35
 Requires:       python3-pyOpenSSL
36 36
 Requires:       python3-certifi
37 37
 Requires:       python3-idna
38
+Requires:       python3-charset-normalizer
39
+
38 40
 BuildArch:      noarch
39 41
 
40 42
 %description
... ...
@@ -62,21 +70,20 @@ Features:
62 62
     + Simple URL + HTTP Auth Registry
63 63
 
64 64
 %prep
65
-%setup -q -n requests-%{version}
66
-%patch0 -p1
65
+%autosetup -p1 -n requests-%{version}
67 66
 
68 67
 %build
69
-python3 setup.py build
68
+%py3_build
70 69
 
71 70
 %install
72
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
71
+%py3_install
73 72
 
74 73
 %check
75
-
76
-easy_install_3=$(ls /usr/bin |grep easy_install |grep 3)
77
-$easy_install_3 pathlib2 funcsigs pluggy more_itertools pysocks
78
-$easy_install_3 pytest-mock pytest-httpbin
74
+%if 0%{?with_check:1}
75
+pip3 install pathlib2 funcsigs pluggy more_itertools \
76
+             pysocks pytest-mock pytest-httpbin trustme
79 77
 pytest3 -v -k "not test_https_warnings"
78
+%endif
80 79
 
81 80
 %files
82 81
 %defattr(-,root,root)
... ...
@@ -84,32 +91,34 @@ pytest3 -v -k "not test_https_warnings"
84 84
 %{python3_sitelib}/*
85 85
 
86 86
 %changelog
87
-*   Fri Jul 24 2020 Gerrit Photon <photon-checkins@vmware.com> 2.24.0-1
88
--   Automatic Version Bump
89
-*   Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 2.19.1-5
90
--   Mass removal python2
91
-*   Thu Mar 28 2019 Tapas Kundu <tkundu@vmware.com> 2.19.1-4
92
--   Fix for CVE-2018-18074
93
-*   Thu Dec 06 2018 Ashwin H <ashwinh@vmware.com> 2.19.1-3
94
--   Add %check
95
-*   Thu Sep 27 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 2.19.1-2
96
--   Add a few missing runtime dependencies (urllib3, chardet,
97
--   pyOpenSSL, certifi, idna).
98
-*   Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 2.19.1-1
99
--   Update to version 2.19.1
100
-*   Mon Aug 07 2017 Xiaolin Li <xiaolinl@vmware.com> 2.13.0-3
101
--   Disabled check section as tests are not available
102
-*   Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 2.13.0-2
103
--   Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
104
-*   Thu Mar 23 2017 Xiaolin Li <xiaolinl@vmware.com> 2.13.0-1
105
--   Updated to version 2.13.0.
106
-*   Wed Mar 01 2017 Xiaolin Li <xiaolinl@vmware.com> 2.9.1-4
107
--   Added python3 package.
108
-*   Tue Oct 04 2016 ChangLee <changlee@vmware.com> 2.9.1-3
109
--   Modified %check
110
-*   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.9.1-2
111
--   GA - Bump release of all rpms
112
-*   Tue Feb 23 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 2.9.1-1
113
--   Updated to version 2.9.1
114
-*   Wed Mar 04 2015 Mahmoud Bassiouny <mbassiouny@vmware.com>
115
--   Initial packaging for Photon
87
+* Sat Dec 18 2021 Shreenidhi Shedi <sshedi@vmware.com> 2.26.0-1
88
+- Upgrade to 2.26.0 to be compatible with chardet-4.0.0
89
+* Fri Jul 24 2020 Gerrit Photon <photon-checkins@vmware.com> 2.24.0-1
90
+- Automatic Version Bump
91
+* Mon Jun 15 2020 Tapas Kundu <tkundu@vmware.com> 2.19.1-5
92
+- Mass removal python2
93
+* Thu Mar 28 2019 Tapas Kundu <tkundu@vmware.com> 2.19.1-4
94
+- Fix for CVE-2018-18074
95
+* Thu Dec 06 2018 Ashwin H <ashwinh@vmware.com> 2.19.1-3
96
+- Add %check
97
+* Thu Sep 27 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 2.19.1-2
98
+- Add a few missing runtime dependencies (urllib3, chardet,
99
+- pyOpenSSL, certifi, idna).
100
+* Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 2.19.1-1
101
+- Update to version 2.19.1
102
+* Mon Aug 07 2017 Xiaolin Li <xiaolinl@vmware.com> 2.13.0-3
103
+- Disabled check section as tests are not available
104
+* Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 2.13.0-2
105
+- Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
106
+* Thu Mar 23 2017 Xiaolin Li <xiaolinl@vmware.com> 2.13.0-1
107
+- Updated to version 2.13.0.
108
+* Wed Mar 01 2017 Xiaolin Li <xiaolinl@vmware.com> 2.9.1-4
109
+- Added python3 package.
110
+* Tue Oct 04 2016 ChangLee <changlee@vmware.com> 2.9.1-3
111
+- Modified %check
112
+* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.9.1-2
113
+- GA - Bump release of all rpms
114
+* Tue Feb 23 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 2.9.1-1
115
+- Updated to version 2.9.1
116
+* Wed Mar 04 2015 Mahmoud Bassiouny <mbassiouny@vmware.com>
117
+- Initial packaging for Photon
... ...
@@ -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
 Summary:       Python documentation generator
4 2
 Name:          python3-sphinx
5 3
 Version:       3.3.0
... ...
@@ -37,7 +35,7 @@ BuildRequires: python3-sphinxcontrib-jsmath
37 37
 BuildRequires: python3-sphinxcontrib-serializinghtml
38 38
 BuildRequires: python3-packaging
39 39
 
40
-%if %{with_check}
40
+%if 0%{?with_check:1}
41 41
 BuildRequires: python3-pytest
42 42
 %endif
43 43
 
... ...
@@ -79,13 +77,14 @@ useful to many other projects.
79 79
 
80 80
 %install
81 81
 %py3_install
82
-mv %{buildroot}/%{_bindir}/sphinx-quickstart %{buildroot}/%{_bindir}/sphinx-quickstart3
83
-mv %{buildroot}/%{_bindir}/sphinx-build %{buildroot}/%{_bindir}/sphinx-build3
84
-mv %{buildroot}/%{_bindir}/sphinx-autogen %{buildroot}/%{_bindir}/sphinx-autogen3
85
-mv %{buildroot}/%{_bindir}/sphinx-apidoc %{buildroot}/%{_bindir}/sphinx-apidoc3
82
+mv %{buildroot}%{_bindir}/sphinx-quickstart %{buildroot}%{_bindir}/sphinx-quickstart3
83
+mv %{buildroot}%{_bindir}/sphinx-build %{buildroot}%{_bindir}/sphinx-build3
84
+mv %{buildroot}%{_bindir}/sphinx-autogen %{buildroot}%{_bindir}/sphinx-autogen3
85
+mv %{buildroot}%{_bindir}/sphinx-apidoc %{buildroot}%{_bindir}/sphinx-apidoc3
86 86
 
87
-%check
87
+%if 0%{?with_check:1}
88 88
 make -k check %{?_smp_mflags} |& tee %{_specdir}/%{name}-check-log || %{nocheck}
89
+%endif
89 90
 
90 91
 %clean
91 92
 
... ...
@@ -1,15 +1,13 @@
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 1
 Summary:        The Swiss Army knife of Python web development
5 2
 Name:           python3-werkzeug
6 3
 Version:        1.0.1
7
-Release:        2%{?dist}
4
+Release:        3%{?dist}
8 5
 License:        BSD
9 6
 Group:          Development/Languages/Python
10 7
 Vendor:         VMware, Inc.
11 8
 Distribution:   Photon
12 9
 Url:            https://pypi.python.org/pypi/Werkzeug
10
+
13 11
 Source0:        https://pypi.python.org/packages/ab/65/d3f1edd1109cb1beb6b82f4139addad482df5b5ea113bdc98242383bf402/Werkzeug-%{version}.tar.gz
14 12
 %define sha1    Werkzeug=07b0f2dcd460076d437d1481c556584db88df199
15 13
 
... ...
@@ -17,30 +15,33 @@ BuildRequires:  python3-devel
17 17
 BuildRequires:  python3-libs
18 18
 BuildRequires:  python3-setuptools
19 19
 BuildRequires:  python3-xml
20
+
20 21
 %if %{with_check}
21 22
 BuildRequires:  python3-requests
22 23
 BuildRequires:  curl-devel
23 24
 BuildRequires:  openssl-devel
25
+BuildRequires:  python3-pip
24 26
 %endif
27
+
25 28
 Requires:       python3
26 29
 Requires:       python3-libs
30
+
27 31
 BuildArch:      noarch
28 32
 
29 33
 %description
30 34
 Werkzeug started as simple collection of various utilities for WSGI applications and has become one of the most advanced WSGI utility modules. It includes a powerful debugger, full featured request and response objects, HTTP utilities to handle entity tags, cache control headers, HTTP dates, cookie handling, file uploads, a powerful URL routing system and a bunch of community contributed addon modules.
31 35
 
32 36
 %prep
33
-%setup -q -n Werkzeug-%{version}
37
+%autosetup -p1 -n Werkzeug-%{version}
34 38
 
35 39
 %build
36
-python3 setup.py build
40
+%py3_build
37 41
 
38 42
 %install
39
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
43
+%py3_install
40 44
 
41 45
 %check
42
-easy_install_3=$(ls /usr/bin |grep easy_install |grep 23)
43
-$easy_install_3 pytest hypothesis
46
+pip3 install pytest hypothesis
44 47
 LANG=en_US.UTF-8 PYTHONPATH=./  python3 setup.py test
45 48
 
46 49
 %files
... ...
@@ -48,20 +49,22 @@ LANG=en_US.UTF-8 PYTHONPATH=./  python3 setup.py test
48 48
 %{python3_sitelib}/*
49 49
 
50 50
 %changelog
51
-*   Tue Sep 29 2020 Satya Naga Vasamsetty <svasamsetty@vmware.com> 1.0.1-2
52
--   openssl 1.1.1
53
-*   Fri Jul 24 2020 Gerrit Photon <photon-checkins@vmware.com> 1.0.1-1
54
--   Automatic Version Bump
55
-*   Thu Jun 11 2020 Tapas Kundu <tkundu@vmware.com> 0.14.1-3
56
--   Mass removal python2
57
-*   Mon Dec 03 2018 Tapas Kundu <tkundu@vmware.com> 0.14.1-2
58
--   Fix make check
59
--   Moved buildrequires from subpackage
60
-*   Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 0.14.1-1
61
--   Update to version 0.14.1
62
-*   Tue Jul 25 2017 Divya Thaluru <dthaluru@vmware.com> 0.12.1-2
63
--   Fixed rpm check errors
64
-*   Thu Mar 30 2017 Siju Maliakkal <smaliakkal@vmware.com> 0.12.1-1
65
--   Updating package to latest
66
-*   Mon Mar 06 2017 Xiaolin Li <xiaolinl@vmware.com> 0.11.15-1
67
--   Initial packaging for Photon.
51
+* Sat Dec 18 2021 Shreenidhi Shedi <sshedi@vmware.com> 1.0.1-3
52
+- Bump version as a part of requests & chardet upgrade
53
+* Tue Sep 29 2020 Satya Naga Vasamsetty <svasamsetty@vmware.com> 1.0.1-2
54
+- openssl 1.1.1
55
+* Fri Jul 24 2020 Gerrit Photon <photon-checkins@vmware.com> 1.0.1-1
56
+- Automatic Version Bump
57
+* Thu Jun 11 2020 Tapas Kundu <tkundu@vmware.com> 0.14.1-3
58
+- Mass removal python2
59
+* Mon Dec 03 2018 Tapas Kundu <tkundu@vmware.com> 0.14.1-2
60
+- Fix make check
61
+- Moved buildrequires from subpackage
62
+* Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 0.14.1-1
63
+- Update to version 0.14.1
64
+* Tue Jul 25 2017 Divya Thaluru <dthaluru@vmware.com> 0.12.1-2
65
+- Fixed rpm check errors
66
+* Thu Mar 30 2017 Siju Maliakkal <smaliakkal@vmware.com> 0.12.1-1
67
+- Updating package to latest
68
+* Mon Mar 06 2017 Xiaolin Li <xiaolinl@vmware.com> 0.11.15-1
69
+- Initial packaging for Photon.
... ...
@@ -1,42 +1,40 @@
1 1
 %global include_tests 1
2 2
 
3
-%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
4
-%{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
5
-%{!?pythonpath: %global pythonpath %(python3 -c "import os, sys; print(os.pathsep.join(x for x in sys.path if x))")}
6
-
7
-%define _salttesting SaltTesting
8 3
 %define _salttesting_ver 2016.5.11
9 4
 
10 5
 Name:           salt3
11 6
 Version:        3004
12
-Release:        1%{?dist}
7
+Release:        2%{?dist}
13 8
 Summary:        A parallel remote execution system with python3
14 9
 Group:          System Environment/Daemons
15 10
 License:        ASL 2.0
16 11
 URL:            http://saltstack.org/
17 12
 Vendor:         VMware, Inc.
18 13
 Distribution:   Photon
14
+
19 15
 Source0:        https://github.com/saltstack/salt/releases/download/v%{version}/salt-%{version}.tar.gz
20 16
 %define sha1    salt=28cbec5244ec815e372bc4ce727cb0d768de861b
21
-Source1:        https://pypi.python.org/packages/source/S/SaltTesting/SaltTesting-2016.5.11.tar.gz
17
+Source1:        https://pypi.python.org/packages/source/S/SaltTesting/SaltTesting-%{_salttesting_ver}.tar.gz
22 18
 %define         sha1 SaltTesting=474dbd7029e3d48cdb468be3c63b2262e47556c8
23 19
 Source2:        salt-master.service
24 20
 Source3:        salt-syndic.service
25 21
 Source4:        salt-minion.service
26 22
 Source5:        salt-api.service
27 23
 Source6:        logrotate.salt
24
+
28 25
 Patch0:         requirements.patch
26
+
29 27
 BuildRoot:      %{_tmppath}/salt-%{version}-%{release}-root-%(%{__id_u} -n)
28
+
30 29
 BuildArch:      noarch
31
-%ifarch %{ix86} x86_64
32
-Requires:       dmidecode
33
-%endif
34
-Requires:       pciutils
35
-Requires:       python3-backports_abc
30
+
36 31
 BuildRequires:  python3-devel
37 32
 BuildRequires:  python3-setuptools
38 33
 BuildRequires:  systemd
39 34
 BuildRequires:  python3-distro
35
+
36
+Requires:       pciutils
37
+Requires:       python3-backports_abc
40 38
 Requires:       python3-pycryptodomex
41 39
 Requires:       python3-jinja2
42 40
 Requires:       python3-msgpack
... ...
@@ -46,6 +44,10 @@ Requires:       python3-zmq
46 46
 Requires:       python3-tornado
47 47
 Requires:       python3-psutil
48 48
 
49
+%ifarch %{ix86} x86_64
50
+Requires:       dmidecode
51
+%endif
52
+
49 53
 %description
50 54
 Salt is a distributed remote execution system used to execute commands and
51 55
 query data. It was developed in order to bring the best solutions found in
... ...
@@ -164,7 +166,7 @@ rm -rf %{buildroot}
164 164
 %defattr(-,root,root,-)
165 165
 %doc $RPM_BUILD_DIR/salt-%{version}/LICENSE
166 166
 %{python3_sitelib}/salt/*
167
-%{python3_sitelib}/salt-*-py?.?.egg-info
167
+%{python3_sitelib}/salt-*-py%{python3_version}.egg-info
168 168
 %{_sysconfdir}/logrotate.d/salt
169 169
 %{_var}/cache/salt
170 170
 
... ...
@@ -235,9 +237,10 @@ rm -rf %{buildroot}
235 235
 %else
236 236
   if [ $1 -eq 0 ] ; then
237 237
     # Package removal, not upgrade
238
-    /bin/systemctl --no-reload disable salt-master.service > /dev/null 2>&1 || :
239
-    /bin/systemctl stop salt-master.service > /dev/null 2>&1 || :
238
+    %{_bindir}/systemctl --no-reload disable salt-master.service > /dev/null 2>&1 || :
239
+    %{_bindir}/systemctl stop salt-master.service > /dev/null 2>&1 || :
240 240
   fi
241
+%endif
241 242
 
242 243
 %preun syndic
243 244
 %if 0%{?systemd_preun:1}
... ...
@@ -245,8 +248,8 @@ rm -rf %{buildroot}
245 245
 %else
246 246
   if [ $1 -eq 0 ] ; then
247 247
     # Package removal, not upgrade
248
-    /bin/systemctl --no-reload disable salt-syndic.service > /dev/null 2>&1 || :
249
-    /bin/systemctl stop salt-syndic.service > /dev/null 2>&1 || :
248
+    %{_bindir}/systemctl --no-reload disable salt-syndic.service > /dev/null 2>&1 || :
249
+    %{_bindir}/systemctl stop salt-syndic.service > /dev/null 2>&1 || :
250 250
   fi
251 251
 %endif
252 252
 
... ...
@@ -256,8 +259,8 @@ rm -rf %{buildroot}
256 256
 %else
257 257
   if [ $1 -eq 0 ] ; then
258 258
     # Package removal, not upgrade
259
-    /bin/systemctl --no-reload disable salt-minion.service > /dev/null 2>&1 || :
260
-    /bin/systemctl stop salt-minion.service > /dev/null 2>&1 || :
259
+    %{_bindir}/systemctl --no-reload disable salt-minion.service > /dev/null 2>&1 || :
260
+    %{_bindir}/systemctl stop salt-minion.service > /dev/null 2>&1 || :
261 261
   fi
262 262
 %endif
263 263
 
... ...
@@ -265,42 +268,43 @@ rm -rf %{buildroot}
265 265
 %if 0%{?systemd_post:1}
266 266
   %systemd_post salt-master.service
267 267
 %else
268
-  /bin/systemctl daemon-reload &>/dev/null || :
268
+  %{_bindir}/systemctl daemon-reload &>/dev/null || :
269 269
 %endif
270 270
 
271 271
 %post minion
272 272
 %if 0%{?systemd_post:1}
273 273
   %systemd_post salt-minion.service
274 274
 %else
275
-  /bin/systemctl daemon-reload &>/dev/null || :
275
+  %{_bindir}/systemctl daemon-reload &>/dev/null || :
276 276
 %endif
277 277
 
278 278
 %postun master
279 279
 %if 0%{?systemd_post:1}
280 280
   %systemd_postun salt-master.service
281 281
 %else
282
-  /bin/systemctl daemon-reload &>/dev/null
283
-  [ $1 -gt 0 ] && /bin/systemctl try-restart salt-master.service &>/dev/null || :
282
+  %{_bindir}/systemctl daemon-reload &>/dev/null
283
+  [ $1 -gt 0 ] && %{_bindir}/systemctl try-restart salt-master.service &>/dev/null || :
284 284
 %endif
285 285
 
286 286
 %postun syndic
287 287
 %if 0%{?systemd_post:1}
288 288
   %systemd_postun salt-syndic.service
289 289
 %else
290
-  /bin/systemctl daemon-reload &>/dev/null
291
-  [ $1 -gt 0 ] && /bin/systemctl try-restart salt-syndic.service &>/dev/null || :
290
+  %{_bindir}/systemctl daemon-reload &>/dev/null
291
+  [ $1 -gt 0 ] && %{_bindir}/systemctl try-restart salt-syndic.service &>/dev/null || :
292 292
 %endif
293 293
 
294 294
 %postun minion
295 295
 %if 0%{?systemd_post:1}
296 296
   %systemd_postun salt-minion.service
297 297
 %else
298
-  /bin/systemctl daemon-reload &>/dev/null
299
-  [ $1 -gt 0 ] && /bin/systemctl try-restart salt-minion.service &>/dev/null || :
300
-%endif
298
+  %{_bindir}/systemctl daemon-reload &>/dev/null
299
+  [ $1 -gt 0 ] && %{_bindir}/systemctl try-restart salt-minion.service &>/dev/null || :
301 300
 %endif
302 301
 
303 302
 %changelog
303
+* Sat Dec 18 2021 Shreenidhi Shedi <sshedi@vmware.com> 3004-2
304
+- Bump version as a part of requests & chardet upgrade
304 305
 * Mon Oct 18 2021 Bryce Larson <brycel@vmware.com> 3004-1
305 306
 - Update to version 3004
306 307
 * Wed Aug 11 2021 Bryce Larson <brycel@vmware.com> 3003.3-1
... ...
@@ -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
 Summary:        dnf/yum equivalent using C libs
4 2
 Name:           tdnf
5 3
 Version:        3.2.2
... ...
@@ -9,8 +7,10 @@ Distribution:   Photon
9 9
 License:        LGPLv2.1,GPLv2
10 10
 URL:            https://github.com/vmware/%{name}
11 11
 Group:          Applications/RPM
12
+
12 13
 Source0:        %{name}-%{version}.tar.gz
13 14
 %define sha1    %{name}=0b6f7672e62e294190bcfdadbbc1717350030339
15
+
14 16
 Patch0:         pool_flag_noinstalledobsoletes.patch
15 17
 
16 18
 Requires:       rpm-libs >= 4.16.1.3-1
... ...
@@ -35,6 +35,13 @@ BuildRequires:  python3-devel
35 35
 BuildRequires:  createrepo_c
36 36
 BuildRequires:  glib
37 37
 BuildRequires:  libxml2
38
+BuildRequires:  photon-release
39
+BuildRequires:  photon-repos
40
+BuildRequires:  python3-urllib3
41
+BuildRequires:  python3-requests
42
+BuildRequires:  python3-pyOpenSSL
43
+BuildRequires:  python3-pytest
44
+BuildRequires:  python3-requests
38 45
 %endif
39 46
 
40 47
 Obsoletes:      yum
... ...
@@ -54,9 +61,9 @@ Requires:   libsolv-devel
54 54
 %description devel
55 55
 Development files for tdnf
56 56
 
57
-%package	cli-libs
58
-Summary:	Library providing cli libs for tdnf like clients
59
-Group:		Development/Libraries
57
+%package    cli-libs
58
+Summary:    Library providing cli libs for tdnf like clients
59
+Group:      Development/Libraries
60 60
 
61 61
 %description cli-libs
62 62
 Library providing cli libs for tdnf like clients.
... ...
@@ -92,11 +99,13 @@ Systemd units that can periodically download package upgrades and apply them.
92 92
 %build
93 93
 mkdir build && cd build
94 94
 cmake \
95
--DCMAKE_BUILD_TYPE=Debug \
96
--DCMAKE_INSTALL_PREFIX=%{_prefix} \
97
--DCMAKE_INSTALL_LIBDIR:PATH=lib \
98
-..
99
-make %{?_smp_mflags} && make python
95
+  -DCMAKE_BUILD_TYPE=Debug \
96
+  -DCMAKE_INSTALL_PREFIX=%{_prefix} \
97
+  -DCMAKE_INSTALL_LIBDIR:PATH=lib \
98
+  -DSYSTEMD_DIR=%{_unitdir} \
99
+  ..
100
+
101
+make %{?_smp_mflags} && make python %{?_smp_mflags}
100 102
 
101 103
 %check
102 104
 %if 0%{?with_check:1}
... ...
@@ -104,149 +113,114 @@ cd build && make %{?_smp_mflags} check
104 104
 %endif
105 105
 
106 106
 %install
107
-cd build && make DESTDIR=%{buildroot} install
107
+cd build && make DESTDIR=%{buildroot} install %{?_smp_mflags}
108 108
 find %{buildroot} -name '*.a' -delete
109
-mkdir -p %{buildroot}/var/cache/tdnf
110
-mkdir -p %{buildroot}/%{_libdir}/systemd/system/
111
-ln -sf %{_bindir}/tdnf %{buildroot}%{_bindir}/tyum
112
-ln -sf %{_bindir}/tdnf %{buildroot}%{_bindir}/yum
113
-mv %{buildroot}/usr/lib/pkgconfig/tdnfcli.pc %{buildroot}/usr/lib/pkgconfig/tdnf-cli-libs.pc
114
-mkdir -p %{buildroot}/%{_tdnfpluginsdir}/tdnfrepogpgcheck
115
-mv %{buildroot}/%{_tdnfpluginsdir}/libtdnfrepogpgcheck.so %{buildroot}/%{_tdnfpluginsdir}/tdnfrepogpgcheck/libtdnfrepogpgcheck.so
116
-mv %{buildroot}/lib/systemd/system/ %{buildroot}/%{_libdir}/systemd/
109
+mkdir -p %{buildroot}/var/cache/tdnf %{buildroot}%{_unitdir}
110
+ln -sfv %{_bindir}/tdnf %{buildroot}%{_bindir}/tyum
111
+ln -sfv %{_bindir}/tdnf %{buildroot}%{_bindir}/yum
112
+mv %{buildroot}%{_libdir}/pkgconfig/tdnfcli.pc %{buildroot}%{_libdir}/pkgconfig/tdnf-cli-libs.pc
113
+mkdir -p %{buildroot}%{_tdnfpluginsdir}/tdnfrepogpgcheck
114
+mv %{buildroot}%{_tdnfpluginsdir}/libtdnfrepogpgcheck.so %{buildroot}%{_tdnfpluginsdir}/tdnfrepogpgcheck/
117 115
 
118 116
 pushd python
119 117
 python3 setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}
120 118
 popd
121 119
 find %{buildroot} -name '*.pyc' -delete
122 120
 
123
-# Pre-install
124 121
 %pre
125 122
 
126
-    # First argument is 1 => New Installation
127
-    # First argument is 2 => Upgrade
128
-
129
-# Post-install
130 123
 %post
131
-
132
-    # First argument is 1 => New Installation
133
-    # First argument is 2 => Upgrade
134
-
135
-    /sbin/ldconfig
136
-
124
+/sbin/ldconfig
137 125
 %triggerin -- motd
138 126
 [ $2 -eq 1 ] || exit 0
139 127
 if [ $1 -eq 1 ]; then
140
-    echo "detected install of tdnf/motd, enabling tdnf-cache-updateinfo.timer" >&2
141
-    systemctl enable tdnf-cache-updateinfo.timer >/dev/null 2>&1 || :
142
-    systemctl start tdnf-cache-updateinfo.timer >/dev/null 2>&1 || :
128
+  echo "detected install of tdnf/motd, enabling tdnf-cache-updateinfo.timer" >&2
129
+  systemctl enable tdnf-cache-updateinfo.timer >/dev/null 2>&1 || :
130
+  systemctl start tdnf-cache-updateinfo.timer >/dev/null 2>&1 || :
143 131
 elif [ $1 -eq 2 ]; then
144
-    echo "detected upgrade of tdnf, daemon-reload" >&2
145
-    systemctl daemon-reload >/dev/null 2>&1 || :
132
+  echo "detected upgrade of tdnf, daemon-reload" >&2
133
+  systemctl daemon-reload >/dev/null 2>&1 || :
146 134
 fi
147 135
 
148
-# Pre-uninstall
149 136
 %preun
150
-
151
-    # First argument is 0 => Uninstall
152
-    # First argument is 1 => Upgrade
153
-
154 137
 %triggerun -- motd
155 138
 [ $1 -eq 1 ] && [ $2 -eq 1 ] && exit 0
156 139
 echo "detected uninstall of tdnf/motd, disabling tdnf-cache-updateinfo.timer" >&2
157 140
 systemctl --no-reload disable tdnf-cache-updateinfo.timer >/dev/null 2>&1 || :
158 141
 systemctl stop tdnf-cache-updateinfo.timer >/dev/null 2>&1 || :
159
-rm -rf /var/cache/tdnf/cached-updateinfo.txt
142
+rm -f /var/cache/tdnf/cached-updateinfo.txt
160 143
 
161
-# Post-uninstall
162 144
 %postun
163
-
164
-    /sbin/ldconfig
165
-
166
-    # First argument is 0 => Uninstall
167
-    # First argument is 1 => Upgrade
168
-
145
+/sbin/ldconfig
169 146
 %triggerpostun -- motd
170 147
 [ $1 -eq 1 ] && [ $2 -eq 1 ] || exit 0
171 148
 echo "detected upgrade of tdnf/motd, restarting tdnf-cache-updateinfo.timer" >&2
172 149
 systemctl try-restart tdnf-cache-updateinfo.timer >/dev/null 2>&1 || :
173 150
 
174 151
 %post cli-libs
175
-
176
-    # First argument is 1 => New Installation
177
-    # First argument is 2 => Upgrade
178
-
179
-    /sbin/ldconfig
152
+/sbin/ldconfig
180 153
 
181 154
 %postun cli-libs
155
+/sbin/ldconfig
182 156
 
183
-    /sbin/ldconfig
184
-
185
-    # First argument is 0 => Uninstall
186
-    # First argument is 1 => Upgrade
157
+%global automatic_services tdnf-automatic.timer tdnf-automatic-notifyonly.timer tdnf-automatic-install.timer
187 158
 
188 159
 %post automatic
189
-%systemd_post %{name}-automatic.timer
190
-%systemd_post %{name}-automatic-notifyonly.timer
191
-%systemd_post %{name}-automatic-install.timer
160
+%systemd_post %{automatic_services}
192 161
 
193 162
 %preun automatic
194
-%systemd_preun %{name}-automatic.timer
195
-%systemd_preun %{name}-automatic-notifyonly.timer
196
-%systemd_preun %{name}-automatic-install.timer
163
+%systemd_preun %{automatic_services}
197 164
 
198 165
 %postun automatic
199
-%systemd_postun_with_restart %{name}-automatic.timer
200
-%systemd_postun_with_restart %{name}-automatic-notifyonly.timer
201
-%systemd_postun_with_restart %{name}-automatic-install.timer
166
+%systemd_postun_with_restart %{automatic_services}
202 167
 
203 168
 %files
204
-    %defattr(-,root,root,0755)
205
-    %{_bindir}/tdnf
206
-    %{_bindir}/tyum
207
-    %{_bindir}/yum
208
-    %{_bindir}/tdnf-cache-updateinfo
209
-    %{_libdir}/libtdnf.so.*
210
-    %config(noreplace) %{_sysconfdir}/tdnf/tdnf.conf
211
-    %config %{_libdir}/systemd/system/tdnf-cache-updateinfo.service
212
-    %config(noreplace) %{_libdir}/systemd/system/tdnf-cache-updateinfo.timer
213
-    %config %{_sysconfdir}/motdgen.d/02-tdnf-updateinfo.sh
214
-    %dir /var/cache/tdnf
215
-    %{_datadir}/bash-completion/completions/tdnf
169
+%defattr(-,root,root,0755)
170
+%{_bindir}/tdnf
171
+%{_bindir}/tyum
172
+%{_bindir}/yum
173
+%{_bindir}/tdnf-cache-updateinfo
174
+%{_libdir}/libtdnf.so.*
175
+%config(noreplace) %{_sysconfdir}/tdnf/tdnf.conf
176
+%config %{_unitdir}/tdnf-cache-updateinfo.service
177
+%config(noreplace) %{_unitdir}/tdnf-cache-updateinfo.timer
178
+%config %{_sysconfdir}/motdgen.d/02-tdnf-updateinfo.sh
179
+%dir /var/cache/tdnf
180
+%{_datadir}/bash-completion/completions/tdnf
216 181
 
217 182
 %files devel
218
-    %defattr(-,root,root)
219
-    %{_includedir}/tdnf/*.h
220
-    %{_libdir}/libtdnf.so
221
-    %{_libdir}/libtdnfcli.so
222
-    %exclude %{_libdir}/debug
223
-    %{_libdir}/pkgconfig/tdnf.pc
224
-    %{_libdir}/pkgconfig/tdnf-cli-libs.pc
183
+%defattr(-,root,root)
184
+%{_includedir}/tdnf/*.h
185
+%{_libdir}/libtdnf.so
186
+%{_libdir}/libtdnfcli.so
187
+%exclude %{_libdir}/debug
188
+%{_libdir}/pkgconfig/tdnf.pc
189
+%{_libdir}/pkgconfig/tdnf-cli-libs.pc
225 190
 
226 191
 %files cli-libs
227
-    %defattr(-,root,root)
228
-    %{_libdir}/libtdnfcli.so.*
192
+%defattr(-,root,root)
193
+%{_libdir}/libtdnfcli.so.*
229 194
 
230 195
 %files plugin-repogpgcheck
231
-    %defattr(-,root,root)
232
-    %dir %{_sysconfdir}/tdnf/pluginconf.d
233
-    %config(noreplace) %{_sysconfdir}/tdnf/pluginconf.d/tdnfrepogpgcheck.conf
234
-    %{_tdnfpluginsdir}/tdnfrepogpgcheck/libtdnfrepogpgcheck.so
196
+%defattr(-,root,root)
197
+%dir %{_sysconfdir}/tdnf/pluginconf.d
198
+%config(noreplace) %{_sysconfdir}/tdnf/pluginconf.d/tdnfrepogpgcheck.conf
199
+%{_tdnfpluginsdir}/tdnfrepogpgcheck/libtdnfrepogpgcheck.so
235 200
 
236 201
 %files python
237
-    %defattr(-,root,root)
238
-    %{python3_sitelib}/*
202
+%defattr(-,root,root)
203
+%{python3_sitelib}/*
239 204
 
240 205
 %files automatic
241
-    %defattr(-,root,root,0755)
242
-    %{_bindir}/%{name}-automatic
243
-    %config(noreplace) %{_sysconfdir}/%{name}/automatic.conf
244
-    %{_libdir}/systemd/system/%{name}-automatic.timer
245
-    %{_libdir}/systemd/system/%{name}-automatic.service
246
-    %{_libdir}/systemd/system/%{name}-automatic-install.timer
247
-    %{_libdir}/systemd/system/%{name}-automatic-install.service
248
-    %{_libdir}/systemd/system/%{name}-automatic-notifyonly.timer
249
-    %{_libdir}/systemd/system/%{name}-automatic-notifyonly.service
206
+%defattr(-,root,root,0755)
207
+%{_bindir}/%{name}-automatic
208
+%config(noreplace) %{_sysconfdir}/%{name}/automatic.conf
209
+%{_unitdir}/%{name}-automatic.timer
210
+%{_unitdir}/%{name}-automatic.service
211
+%{_unitdir}/%{name}-automatic-install.timer
212
+%{_unitdir}/%{name}-automatic-install.service
213
+%{_unitdir}/%{name}-automatic-notifyonly.timer
214
+%{_unitdir}/%{name}-automatic-notifyonly.service
250 215
 
251 216
 %changelog
252 217
 * Tue Nov 30 2021 Oliver Kurth <okurth@vmware.com> 3.2.2-1