Browse code

Cherry-picking salt 3006.7 changes from 5.0 to dev

- cherry-picked commit - 3ef0bfa9aed6e42dd99b44ae2d6e52c9497b65bc

Change-Id: If3c2796d6fb0da0e91234c521d12e21ceab226ec
Signed-off-by: praffulmehrotra <prafful.mehrotra@broadcom.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/c/photon/+/23798
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Shreenidhi Shedi <shreenidhi.shedi@broadcom.com>

praffulmehrotra authored on 2024/04/25 05:45:01
Showing 11 changed files
... ...
@@ -13,3 +13,4 @@ common/data/pkg_info.json
13 13
 SPECS/falco/*.spec
14 14
 SPECS/sysdig/*.spec
15 15
 SPECS/kernels-drivers-intel/*.spec
16
+.idea/
16 17
new file mode 100644
... ...
@@ -0,0 +1,41 @@
0
+Name:           python3-backports_abc
1
+Version:        0.5
2
+Release:        1%{?dist}
3
+Summary:        A backport of recent additions to the 'collections.abc' module.
4
+License:        PSFL
5
+Group:          Development/Languages/Python
6
+Url:            https://github.com/cython/backports_abc
7
+Vendor:         VMware, Inc.
8
+Distribution:   Photon
9
+
10
+Source0:        https://pypi.python.org/packages/68/3c/1317a9113c377d1e33711ca8de1e80afbaf4a3c950dd0edfaf61f9bfe6d8/backports_abc-%{version}.tar.gz
11
+%define sha512  backports_abc=7c8a30857a1199e2539279d8fe82456db53fc2c8f0be2c696e029406756f6b7ad3628f4fc5203b58e6a89cb3a0bffdf85feb5af9e7d0bcd4ce0641ac469c9a1a
12
+
13
+BuildRequires:  python3-devel
14
+BuildRequires:  python3-setuptools
15
+
16
+Requires:       python3
17
+
18
+BuildArch:      noarch
19
+
20
+%description
21
+
22
+%prep
23
+%autosetup -n backports_abc-%{version}
24
+
25
+%build
26
+%{py3_build}
27
+
28
+%install
29
+%{py3_install}
30
+
31
+%check
32
+python3 tests.py
33
+
34
+%files
35
+%defattr(-,root,root,-)
36
+%{python3_sitelib}/*
37
+
38
+%changelog
39
+* Wed Apr 17 2024 Prafful Mehrotra <prafful.mehrotra@broadcom.com> 0.5-1
40
+- Bringing python-backports_abc to Ph5 for SALT 3006.7
0 41
new file mode 100644
... ...
@@ -0,0 +1,49 @@
0
+Summary:        Version numbering for anarchists and software realists
1
+Name:           python3-looseversion
2
+Version:        1.3.0
3
+Release:        1%{?dist}
4
+License:        Python Software Foundation License
5
+Group:          Development/Languages/Python
6
+Vendor:         VMware, Inc.
7
+Distribution:   Photon
8
+Url:            https://github.com/effigies/looseversion
9
+
10
+Source0:        https://files.pythonhosted.org/packages/64/7e/f13dc08e0712cc2eac8e56c7909ce2ac280dbffef2ffd87bd5277ce9d58b/looseversion-%{version}.tar.gz
11
+%define sha512  looseversion=a54c788ba698b07308cfc75b5afba2cda59451d72d178be92b43c433deac9b24bffafa26f121af79a3d42eca8f83e7f50477498e1a17aec47cc213d39aa47eb2
12
+
13
+BuildRequires:  python3-devel
14
+BuildRequires:  python3-setuptools
15
+BuildRequires:  python3-wheel
16
+BuildRequires:  python3-pip
17
+BuildRequires:  python3-hatchling
18
+BuildRequires:  python3-pathspec
19
+BuildRequires:  python3-pluggy
20
+BuildRequires:  python3-packaging
21
+
22
+Requires:       python3
23
+
24
+BuildArch:      noarch
25
+
26
+%description
27
+Version numbering for anarchists and software realists
28
+
29
+%prep
30
+%autosetup -p1 -n looseversion-%{version}
31
+
32
+%build
33
+%pyproject_wheel
34
+
35
+%install
36
+%pyproject_install
37
+
38
+%check
39
+pip3 install tox
40
+tox
41
+
42
+%files
43
+%defattr(-,root,root)
44
+%{python3_sitelib}/*
45
+
46
+%changelog
47
+* Thu Apr 18 2024 Prafful Mehrotra <prafful.mehrotra@broadcom.com> 1.3.0-1
48
+- Adding looseversion python package to Photon 5
0 49
new file mode 100644
... ...
@@ -0,0 +1,39 @@
0
+/var/log/salt/master {
1
+    weekly
2
+    missingok
3
+    rotate 5
4
+    compress
5
+    notifempty
6
+}
7
+
8
+/var/log/salt/minion {
9
+    weekly
10
+    missingok
11
+    rotate 5
12
+    compress
13
+    notifempty
14
+}
15
+
16
+/var/log/salt/key {
17
+    weekly
18
+    missingok
19
+    rotate 5
20
+    compress
21
+    notifempty
22
+}
23
+
24
+/var/log/salt/cloud {
25
+    weekly
26
+    missingok
27
+    rotate 5
28
+    compress
29
+    notifempty
30
+}
31
+
32
+/var/log/salt/ssh {
33
+    weekly
34
+    missingok
35
+    rotate 5
36
+    compress
37
+    notifempty
38
+}
0 39
new file mode 100644
... ...
@@ -0,0 +1,6 @@
0
+diff --git a/requirements/base.txt b/requirements/base.txt
1
+index 96037ccf14..712dcca023 100644
2
+--- a/requirements/base.txt
3
+@@ -7 +6,0 @@ distro>=1.0.1
4
+-contextvars
0 5
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+[Unit]
1
+Description=The Salt API
2
+Documentation=man:salt-api(1) file:///usr/share/doc/salt/html/contents.html https://docs.saltproject.io/en/latest/contents.html
3
+After=network.target
4
+
5
+[Service]
6
+Type=notify
7
+NotifyAccess=all
8
+LimitNOFILE=8192
9
+ExecStart=/usr/bin/salt-api
10
+TimeoutStopSec=3
11
+
12
+[Install]
13
+WantedBy=multi-user.target
0 14
new file mode 100644
... ...
@@ -0,0 +1,4 @@
0
+disable salt-api.service
1
+disable salt-minion.service
2
+disable salt-master.service
3
+disable salt-syndic.service
0 4
new file mode 100644
... ...
@@ -0,0 +1,13 @@
0
+[Unit]
1
+Description=The Salt Master Server
2
+Documentation=man:salt-master(1) file:///usr/share/doc/salt/html/contents.html https://docs.saltproject.io/en/latest/contents.html
3
+After=network.target
4
+
5
+[Service]
6
+LimitNOFILE=100000
7
+Type=notify
8
+NotifyAccess=all
9
+ExecStart=/usr/bin/salt-master
10
+
11
+[Install]
12
+WantedBy=multi-user.target
0 13
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+[Unit]
1
+Description=The Salt Minion
2
+Documentation=man:salt-minion(1) file:///usr/share/doc/salt/html/contents.html https://docs.saltproject.io/en/latest/contents.html
3
+After=network.target salt-master.service
4
+
5
+[Service]
6
+KillMode=process
7
+Type=notify
8
+NotifyAccess=all
9
+LimitNOFILE=8192
10
+ExecStart=/usr/bin/salt-minion
11
+
12
+[Install]
13
+WantedBy=multi-user.target
0 14
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+[Unit]
1
+Description=The Salt Master Server
2
+Documentation=man:salt-syndic(1) file:///usr/share/doc/salt/html/contents.html https://docs.saltproject.io/en/latest/contents.html
3
+After=network.target
4
+PartOf=salt-master.service
5
+
6
+[Service]
7
+Type=notify
8
+NotifyAccess=all
9
+LimitNOFILE=8192
10
+ExecStart=/usr/bin/salt-syndic
11
+
12
+[Install]
13
+WantedBy=multi-user.target
0 14
new file mode 100644
... ...
@@ -0,0 +1,260 @@
0
+Name:           salt3
1
+Version:        3006.7
2
+Release:        1%{?dist}
3
+Summary:        A parallel remote execution system with python3
4
+Group:          System Environment/Daemons
5
+License:        ASL 2.0
6
+URL:            http://saltstack.org/
7
+Vendor:         VMware, Inc.
8
+Distribution:   Photon
9
+
10
+Source0:        https://github.com/saltstack/salt/releases/download/v%{version}/salt-%{version}.tar.gz
11
+%define sha512  salt=9d1759a7c0dfc9ad4fdc94460f0f3799483737207bfdc8ddd1424e5c6083ea74ef520f13c323d5cbd7f65c1d9bb13bbbeb5f2cafe6dcacbc2689e733794aef2d
12
+Source2:        salt-master.service
13
+Source3:        salt-syndic.service
14
+Source4:        salt-minion.service
15
+Source5:        salt-api.service
16
+Source6:        logrotate.salt
17
+Source7:        salt-default.preset
18
+
19
+Patch0:         requirements.patch
20
+
21
+BuildArch:      noarch
22
+
23
+BuildRequires:  python3-devel
24
+BuildRequires:  python3-setuptools
25
+BuildRequires:  systemd
26
+BuildRequires:  python3-distro
27
+
28
+Requires:       pciutils
29
+Requires:       python3-backports_abc
30
+Requires:       python3-pycryptodomex
31
+Requires:       python3-jinja2
32
+Requires:       python3-msgpack
33
+Requires:       python3-PyYAML
34
+Requires:       python3-requests
35
+Requires:       python3-zmq
36
+Requires:       python3-tornado
37
+Requires:       python3-psutil
38
+Requires:       python3-distro
39
+Requires:       python3-looseversion
40
+
41
+%ifarch x86_64
42
+Requires:       dmidecode
43
+%endif
44
+
45
+%description
46
+Salt is a distributed remote execution system used to execute commands and
47
+query data. It was developed in order to bring the best solutions found in
48
+the world of remote execution together and make them better, faster and more
49
+malleable. Salt accomplishes this via its ability to handle larger loads of
50
+information, and not just dozens, but hundreds or even thousands of individual
51
+servers, handle them quickly and through a simple and manageable interface.
52
+
53
+%package        master
54
+Summary:        Management component for salt, a parallel remote execution system with python3
55
+Group:          System Environment/Daemons
56
+Requires:       %{name} = %{version}-%{release}
57
+
58
+%description    master
59
+The Salt master is the central server to which all minions connect.
60
+
61
+%package        minion
62
+Summary:        Client component for Salt, a parallel remote execution system
63
+Group:          System Environment/Daemons
64
+Requires:       %{name} = %{version}-%{release}
65
+
66
+%description    minion
67
+The Salt minion is the agent component of Salt. It listens for instructions
68
+from the master, runs jobs, and returns results back to the master.
69
+
70
+%package        syndic
71
+Summary:        Master-of-master component for Salt, a parallel remote execution system
72
+Group:          System Environment/Daemons
73
+Requires:       %{name} = %{version}-%{release}
74
+
75
+%description    syndic
76
+The Salt syndic is a master daemon which can receive instruction from a
77
+higher-level master, allowing for tiered organization of your Salt
78
+infrastructure.
79
+
80
+%package        api
81
+Summary:        REST API for Salt, a parallel remote execution system
82
+Group:          System administration tools
83
+Requires:       %{name}-master = %{version}-%{release}
84
+
85
+%description    api
86
+salt-api provides a REST interface to the Salt master.
87
+
88
+%package        cloud
89
+Summary:        Cloud provisioner for Salt, a parallel remote execution system
90
+Group:          System administration tools
91
+Requires:       %{name}-master = %{version}-%{release}
92
+
93
+%description    cloud
94
+The salt-cloud tool provisions new cloud VMs, installs salt-minion on them, and
95
+adds them to the master's collection of controllable minions.
96
+
97
+%package        ssh
98
+Summary:        Agentless SSH-based version of Salt, a parallel remote execution system
99
+Group:          System administration tools
100
+Requires:       %{name} = %{version}-%{release}
101
+
102
+%description    ssh
103
+The salt-ssh tool can run remote execution functions and states without the use
104
+of an agent (salt-minion) service.
105
+
106
+%package        proxy
107
+Summary:        Command Proxy of Salt, a parallel remote execution system
108
+Group:          System administration tools
109
+Requires:       %{name} = %{version}-%{release}
110
+
111
+%description    proxy
112
+Receives commands from a Salt master and proxies these commands to devices
113
+that are unable to run a full minion.
114
+
115
+%package spm
116
+Summary:        Salt Package Manager of Salt, a parallel remote execution system
117
+Group:          System administration tools
118
+Requires:       %{name} = %{version}-%{release}
119
+
120
+%description    spm
121
+Salt Package Manager
122
+
123
+%prep
124
+%autosetup -n salt-%{version} -p1
125
+
126
+%build
127
+
128
+%install
129
+cd %{_builddir}/salt-%{version}
130
+python3 setup.py install -O1 --root %{buildroot}
131
+
132
+# Add some directories
133
+install -d -m 0755 %{buildroot}%{_var}/cache/salt
134
+install -d -m 0755 %{buildroot}%{_sysconfdir}/salt
135
+install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/cloud.conf.d
136
+install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/cloud.deploy.d
137
+install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/cloud.maps.d
138
+install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/cloud.profiles.d
139
+install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/cloud.providers.d
140
+
141
+# Add the config files
142
+install -p -m 0640 conf/minion %{buildroot}%{_sysconfdir}/salt/minion
143
+install -p -m 0640 conf/master %{buildroot}%{_sysconfdir}/salt/master
144
+install -p -m 0640 conf/cloud %{buildroot}%{_sysconfdir}/salt/cloud
145
+install -p -m 0640 conf/roster %{buildroot}%{_sysconfdir}/salt/roster
146
+
147
+mkdir -p %{buildroot}%{_unitdir}
148
+install -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/
149
+install -p -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/
150
+install -p -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/
151
+install -p -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/
152
+mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/
153
+install -p -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/salt
154
+
155
+install -v -D -m 0644 %{SOURCE7} %{buildroot}%{_presetdir}/50-salt.preset
156
+
157
+%clean
158
+rm -rf %{buildroot}
159
+
160
+%preun master
161
+%systemd_preun salt-master.service
162
+
163
+%preun syndic
164
+%systemd_preun salt-syndic.service
165
+
166
+%preun minion
167
+%systemd_preun salt-minion.service
168
+
169
+%post master
170
+%systemd_post salt-master.service
171
+
172
+%post minion
173
+%systemd_post salt-minion.service
174
+
175
+%postun master
176
+%systemd_postun salt-master.service
177
+
178
+%postun syndic
179
+%systemd_postun salt-syndic.service
180
+
181
+%postun minion
182
+%systemd_postun salt-minion.service
183
+
184
+%files
185
+%defattr(-,root,root,-)
186
+%{python3_sitelib}/salt/*
187
+%{python3_sitelib}/salt-*-py3.11.egg-info
188
+%{_sysconfdir}/logrotate.d/salt
189
+%{_var}/cache/salt
190
+%{_bindir}/salt-pip
191
+%{_presetdir}/50-salt.preset
192
+
193
+%files master
194
+%defattr(-,root,root)
195
+%doc %{_mandir}/man7/salt.7.*
196
+%doc %{_mandir}/man1/salt-cp.1.*
197
+%doc %{_mandir}/man1/salt-key.1.*
198
+%doc %{_mandir}/man1/salt-master.1.*
199
+%doc %{_mandir}/man1/salt-run.1.*
200
+%doc %{_mandir}/man1/salt.1.*
201
+%{_bindir}/salt
202
+%{_bindir}/salt-cp
203
+%{_bindir}/salt-key
204
+%{_bindir}/salt-master
205
+%{_bindir}/salt-run
206
+%{_unitdir}/salt-master.service
207
+%config(noreplace) %{_sysconfdir}/salt/master
208
+
209
+%files minion
210
+%defattr(-,root,root)
211
+%doc %{_mandir}/man1/salt-call.1.*
212
+%doc %{_mandir}/man1/salt-minion.1.*
213
+%{_bindir}/salt-minion
214
+%{_bindir}/salt-call
215
+%{_unitdir}/salt-minion.service
216
+%config(noreplace) %{_sysconfdir}/salt/minion
217
+
218
+%files syndic
219
+%defattr(-,root,root,-)
220
+%doc %{_mandir}/man1/salt-syndic.1.*
221
+%{_bindir}/salt-syndic
222
+%{_unitdir}/salt-syndic.service
223
+
224
+%files api
225
+%defattr(-,root,root)
226
+%doc %{_mandir}/man1/salt-api.1.*
227
+%{_bindir}/salt-api
228
+%{_unitdir}/salt-api.service
229
+
230
+%files cloud
231
+%defattr(-,root,root,-)
232
+%doc %{_mandir}/man1/salt-cloud.1.*
233
+%{_bindir}/salt-cloud
234
+%{_sysconfdir}/salt/cloud.conf.d
235
+%{_sysconfdir}/salt/cloud.deploy.d
236
+%{_sysconfdir}/salt/cloud.maps.d
237
+%{_sysconfdir}/salt/cloud.profiles.d
238
+%{_sysconfdir}/salt/cloud.providers.d
239
+%config(noreplace) %{_sysconfdir}/salt/cloud
240
+
241
+%files ssh
242
+%defattr(-,root,root,-)
243
+%doc %{_mandir}/man1/salt-ssh.1.*
244
+%{_bindir}/salt-ssh
245
+%{_sysconfdir}/salt/roster
246
+
247
+%files proxy
248
+%defattr(-,root,root,-)
249
+%doc %{_mandir}/man1/salt-proxy.1.*
250
+%{_bindir}/salt-proxy
251
+
252
+%files spm
253
+%defattr(-,root,root,-)
254
+%doc %{_mandir}/man1/spm.1.*
255
+%{_bindir}/spm
256
+
257
+%changelog
258
+* Wed Apr 17 2024 Prafful Mehrotra <prafful.mehrotra@broadcom.com> 3006.7-1
259
+- Update to 3006.7-1 for Ph5 and adding python_backport_abc, looseversion