Package salt: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
Summary: Tool to manage your infrastructure
Name: salt
Version: 3004
Release: alt1.p9.1
Url: http://saltstack.org
#VCS: https://github.com/saltstack/salt
License: Apache-2.0
Group: System/Configuration/Other

Packager: Andrey Cherepanov <cas@altlinux.org>

BuildArch: noarch

Source0: %name-%version.tar
Source1: master.logrotate
Source2: minion.logrotate
Source3: salt-api.init
Source4: salt-master.init
Source5: salt-minion.init
Source6: salt-syndic.init

Patch1: salt-alt-supported-names.patch
Patch2: salt-python3.10.patch

BuildRequires(pre): rpm-build-python3
BuildRequires: python3-module-setuptools perl-podlators
BuildRequires: python3-module-nose libzeromq-devel
BuildRequires: python3-module-msgpack python3-module-yaml
BuildRequires: python3-module-distro

%add_python3_req_skip win32api win32event win32service win32serviceutil winerror pythoncom distutils ntsecuritycon win32con win32process win32security

# pyrax.exceptions is a not a real dependency: pyrax
# presence is gated at salt/utils/openstack/pyrax/__init__.py
%add_python3_req_skip pyrax.exceptions

# For more detailed autoreqs (under jnpr.*), which can be satisfied;
# this fixes the general UNMET python2.X(jnpr), which used to appear.
%python3_req_hier
# except "virtual" Provides of six.py, which cannot be autogenerated:
# {0} is to strip a space at the end:
%filter_from_requires s:salt\.ext\.::g
%filter_from_requires \,\(/sbin/chkconfig\|/usr/bin/easy_install-2\.7\|/usr/bin/pip\|apt\|curl\|erlang\|ftp\|gawk\|git-core\|grep\|initctl\|local/s*bin\|lxc\|make\|perl-Package\|python-base\|python2-base\|python-module-setuptools\|python-module-virtualenv\|rpm\|salt-minion\|service\|sudo\|systemctl\|systemd\|wget\|yum-config-manager\|rc-update\|/bin/launchctl\|/usr/sbin/installer\|python2\|yum\|dnf\),d

%description
Salt is a distributed remote execution system used to execute commands
and query data. It was developed in order to bring the best solutions
found in the world of remote execution together and make them better,
faster and more malleable. Salt accomplishes this via its ability to
handle larger loads of information, and not just dozens, but hundreds,
or even thousands of individual servers. It handles them quickly and
through a simple yet manageable interface.

%package -n python3-module-salt
Summary: Management component for salt, a parallel remote execution system
Group: Development/Python
Obsoletes: python-module-salt 
%py3_requires yaml msgpack pycryptodomex
Requires: python3-module-contextvars

%description  -n python3-module-salt
Salt is a distributed remote execution system used to execute commands
and query data. It was developed in order to bring the best solutions
found in the world of remote execution together and make them better,
faster and more malleable. Salt accomplishes this via its ability to
handle larger loads of information, and not just dozens, but hundreds,
or even thousands of individual servers. It handles them quickly and
through a simple yet manageable interface.

%package master
Summary: Management component for salt, a parallel remote execution system
Group: System/Configuration/Other
Requires: python3-module-salt = %version-%release

%description master
The Salt master is the central server to which all minions connect.

%package minion
Summary: Client component for salt, a parallel remote execution system
Group: System/Configuration/Other
Requires: python3-module-salt = %version-%release

%description minion
Salt minion is queried and controlled from the master.

%package api
Summary: API for salt
Group: System/Configuration/Other
Requires: python3-module-salt = %version-%release

%description api
salt-api is a modular interface on top of Salt that can provide
a variety of entry points into a running Salt system. It can start
and manage multiple interfaces allowing a REST API to coexist
with XMLRPC or even a Websocket API.

%prep
%setup
%patch1 -p1
%patch2 -p1
# Remove local copy documentation mention
subst 's| file:///usr/share/doc/salt/html/contents.html||' pkg/*.service

%build
%python3_build

%install
%python3_build_install --prefix=/usr

# Add some directories
install -d -m 0755 %buildroot%_var/log/salt
touch %buildroot%_var/log/salt/minion
touch %buildroot%_var/log/salt/master
install -d -m 0755 %buildroot%_var/cache/salt
install -d -m 0755 %buildroot%_sysconfdir/salt
install -d -m 0755 %buildroot%_sysconfdir/salt/master.d
install -d -m 0755 %buildroot%_sysconfdir/salt/minion.d
install -d -m 0755 %buildroot%_sysconfdir/salt/pki
install -d -m 0755 %buildroot%_sysconfdir/salt/pki/master
install -d -m 0755 %buildroot%_sysconfdir/salt/pki/minion
install -d -m 0755 %buildroot%_sysconfdir/salt/cloud.conf.d
install -d -m 0755 %buildroot%_sysconfdir/salt/cloud.deploy.d
install -d -m 0755 %buildroot%_sysconfdir/salt/cloud.maps.d
install -d -m 0755 %buildroot%_sysconfdir/salt/cloud.profiles.d
install -d -m 0755 %buildroot%_sysconfdir/salt/cloud.providers.d
install -d -m 0755 %buildroot%_sysconfdir/salt/proxy.d

install -D -m 755 %SOURCE4 %buildroot%_initdir/salt-master
install -D -m 755 %SOURCE6 %buildroot%_initdir/salt-syndic
install -D -m 755 %SOURCE5 %buildroot%_initdir/salt-minion
install -D -m 755 %SOURCE3 %buildroot%_initdir/salt-api

mkdir -p %buildroot%_unitdir
install -p -m 0644 pkg/salt-master.service %buildroot%_unitdir/
install -p -m 0644 pkg/salt-syndic.service %buildroot%_unitdir/
install -p -m 0644 pkg/salt-minion.service %buildroot%_unitdir/
install -p -m 0644 pkg/salt-api.service %buildroot%_unitdir/
install -p -m 0644 pkg/salt-proxy@.service %buildroot%_unitdir/

mkdir -p %buildroot%_sysconfdir/salt/
install -p -m 0640 conf/minion %buildroot%_sysconfdir/salt/minion
install -p -m 0640 conf/master %buildroot%_sysconfdir/salt/master
install -p -m 0640 conf/cloud  %buildroot%_sysconfdir/salt/cloud
install -p -m 0640 conf/roster %buildroot%_sysconfdir/salt/roster
install -p -m 0640 conf/proxy  %buildroot%_sysconfdir/salt/proxy

mkdir -p %buildroot%_sysconfdir/sysconfig
echo "ARG=''" >  %buildroot%_sysconfdir/sysconfig/salt-master
echo "ARG=''" >  %buildroot%_sysconfdir/sysconfig/salt-syndic
echo "ARG=''" >  %buildroot%_sysconfdir/sysconfig/salt-minion
echo "ARG=''" >  %buildroot%_sysconfdir/sysconfig/salt-api

install -D -m 0644 pkg/salt.bash %buildroot%_sysconfdir/bash_completion.d/salt

install -D -m 0644 %SOURCE1 %buildroot%_sysconfdir/logrotate.d/salt-master
install -D -m 0644 %SOURCE2 %buildroot%_sysconfdir/logrotate.d/salt-minion

%post master
%post_service salt-master
%post_service salt-syndic

%preun master
%preun_service salt-master
%preun_service salt-syndic

%post minion
%post_service salt-minion

%preun minion
%preun_service salt-minion

%files -n python3-module-salt
%doc AUTHORS README*
%config(noreplace) %dir %_sysconfdir/salt
%config(noreplace) %dir %_sysconfdir/salt/pki
%python3_sitelibdir/*
%_man7dir/salt.7.*

%files master
%config(noreplace) %_sysconfdir/salt/master
%config(noreplace) %_sysconfdir/salt/master.d
%config(noreplace) %_sysconfdir/salt/roster
%config %_sysconfdir/bash_completion.d/*
%config(noreplace) %dir %_sysconfdir/bash_completion.d
%config(noreplace) %_sysconfdir/logrotate.d/salt-master
%config(noreplace) %_sysconfdir/salt/pki/master
%config(noreplace) %_sysconfdir/sysconfig/salt-master
%config(noreplace) %_sysconfdir/sysconfig/salt-syndic
%_sysconfdir/salt/cloud.conf.d
%_sysconfdir/salt/cloud.deploy.d
%_sysconfdir/salt/cloud.maps.d
%_sysconfdir/salt/cloud.profiles.d
%_sysconfdir/salt/cloud.providers.d
%config(noreplace) %_sysconfdir/salt/cloud
%ghost %_logdir/salt/master
%_var/cache/salt
%_initdir/salt-master
%_initdir/salt-syndic
%_unitdir/salt-master.service
%_unitdir/salt-syndic.service
%_bindir/salt
%_bindir/salt-master
%_bindir/salt-syndic
%_bindir/salt-cloud
%_bindir/salt-cp
%_bindir/salt-key
%_bindir/salt-run
%_bindir/salt-ssh
%_bindir/spm
%_bindir/salt-unity
%_man1dir/salt.1.*
%_man1dir/salt-master.1.*
%_man1dir/salt-cp.1.*
%_man1dir/salt-cloud.1.*
%_man1dir/salt-key.1.*
%_man1dir/salt-run.1.*
%_man1dir/salt-syndic.1.*
%_man1dir/salt-ssh.1.*
%_man1dir/spm.1.*
%_man1dir/salt-unity.1.*

%files api
%config(noreplace) %_sysconfdir/sysconfig/salt-api
%_bindir/salt-api
%_initdir/salt-api
%_unitdir/salt-api.service
%_man1dir/salt-api.1.*

%files minion
%config(noreplace) %_sysconfdir/salt/minion
%config(noreplace) %_sysconfdir/salt/minion.d
%config(noreplace) %_sysconfdir/salt/proxy
%config(noreplace) %_sysconfdir/logrotate.d/salt-minion
%config(noreplace) %_sysconfdir/sysconfig/salt-minion
%config(noreplace) %_sysconfdir/salt/pki/minion
%ghost %_logdir/salt/minion
%_initdir/salt-minion
%_unitdir/salt-minion.service
%_unitdir/salt-proxy@.service
%_bindir/salt-call
%_bindir/salt-minion
%_bindir/salt-proxy
%_man1dir/salt-call.1.*
%_man1dir/salt-minion.1.*
%_man1dir/salt-proxy.1.*

%changelog
* Tue Apr 05 2022 Andrey Cherepanov <cas@altlinux.org> 3004-alt1.p9.1
- Backport to p9 branch.

* Tue Apr 05 2022 Andrey Cherepanov <cas@altlinux.org> 3004-alt2
- Fix build for Python 3.10.
- Remove yum from autorequirements.

* Mon Oct 18 2021 Andrey Cherepanov <cas@altlinux.org> 3004-alt1
- New version.

* Wed Oct 06 2021 Ivan A. Melnikov <iv@altlinux.org> 3003.2-alt2
- Skip pyrax.exceptions dependency (fixes build on mipsel)

* Fri Sep 24 2021 Andrey Cherepanov <cas@altlinux.org> 3003.2-alt1
- New version.

* Thu Jun 24 2021 Andrey Cherepanov <cas@altlinux.org> 3003.1-alt1
- New version.
- Security fixes: CVE-2021-31607

* Fri Apr 02 2021 Andrey Cherepanov <cas@altlinux.org> 3003-alt2
- Fixed: CVE-2020-28243, CVE-2020-28972, CVE-2020-35662, CVE-2021-3148,
  CVE-2021-3144, CVE-2021-25281, CVE-2021-25282, CVE-2021-25283,
  CVE-2021-25284, CVE-2021-25315, CVE-2021-3197, CVE-2020-16846,
  CVE-2020-17490, CVE-2020-25592

* Thu Apr 01 2021 Andrey Cherepanov <cas@altlinux.org> 3003-alt1
- New version.

* Wed Mar 10 2021 Andrey Cherepanov <cas@altlinux.org> 3002.5-alt1
- New version.

* Thu Nov 19 2020 Andrey Cherepanov <cas@altlinux.org> 3002.2-alt1
- New version.

* Thu Oct 22 2020 Andrey Cherepanov <cas@altlinux.org> 3002-alt1
- New version.

* Tue Aug 25 2020 Andrey Cherepanov <cas@altlinux.org> 3001.1-alt1
- New version.
- Use python3-module-pycryptodomex instead of python3-module-pycrypto.

* Fri May 08 2020 Andrey Cherepanov <cas@altlinux.org> 3000.2-alt1
- New version.
- Remove local copy documentation mention in service files.
- Fix build with Python 3.8.
- Improve detection of ALT distro.
- Fixes:
  + CVE-2020-11651
  + CVE-2020-11652

* Sat Apr 04 2020 Andrey Cherepanov <cas@altlinux.org> 3000.1-alt1
- New version.

* Wed Feb 12 2020 Andrey Cherepanov <cas@altlinux.org> 3000-alt1
- New version.

* Mon Sep 23 2019 Anton Farygin <rider@altlinux.ru> 2019.8-alt2
- build with python-3

* Thu Jul 18 2019 Andrey Cherepanov <cas@altlinux.org> 2019.8-alt1
- New version.
- Drop python-module-salt-tests missing in upstream.

* Mon Feb 25 2019 Andrey Cherepanov <cas@altlinux.org> 2019.2.0-alt1
- New version.

* Wed Jan 09 2019 Andrey Cherepanov <cas@altlinux.org> 2019.2-alt1
- New version.

* Mon Sep 17 2018 Andrey Cherepanov <cas@altlinux.org> 2018.11-alt1
- New version.

* Fri Jun 22 2018 Andrey Cherepanov <cas@altlinux.org> 2018.3.2-alt1
- New version.

* Fri Jun 08 2018 Andrey Cherepanov <cas@altlinux.org> 2018.3.1-alt1
- New version.

* Mon Apr 02 2018 Andrey Cherepanov <cas@altlinux.org> 2018.3.0-alt1
- New version.

* Sat Feb 24 2018 Andrey Cherepanov <cas@altlinux.org> 2018.3-alt1
- New version.

* Wed Dec 13 2017 Andrey Cherepanov <cas@altlinux.org> 2018.2-alt1
- New version.

* Wed Aug 16 2017 Andrey Cherepanov <cas@altlinux.org> 2017.7.1-alt1
- New version

* Thu Jul 13 2017 Andrey Cherepanov <cas@altlinux.org> 2017.7.0-alt1
- New version

* Thu Jun 15 2017 Andrey Cherepanov <cas@altlinux.org> 2017.7-alt1
- New version

* Fri Apr 07 2017 Andrey Cherepanov <cas@altlinux.org> 2017.5-alt1
- New version

* Thu Mar 30 2017 Andrey Cherepanov <cas@altlinux.org> 2016.11.3-alt1
- New version
- Remove optional external executables from autoreq

* Mon Feb 27 2017 Andrey Cherepanov <cas@altlinux.org> 2016.11.1-alt1
- New version 2016.11.1
- Package new files and directories
- Restore init and logrotate files

* Fri Nov 18 2016 Lenar Shakirov <snejok@altlinux.ru> 2016.3.4-alt1
- 2016.3.4

* Thu Sep 08 2016 Valentin Rosavitskiy <valintinr@altlinux.org> 2016.3.3-alt4
- Add extra dependiens because master won't start

* Thu Sep 08 2016 Valentin Rosavitskiy <valintinr@altlinux.org> 2016.3.3-alt3
- Rebuild with last commits from develop branch

* Thu Sep 08 2016 Valentin Rosavitskiy <valintinr@altlinux.org> 2016.3.3-alt2
- Rebuild with new python-module-tornado
- (previous version of tornado was without file locks.py)

* Fri Sep 02 2016 Valentin Rosavitskiy <valintinr@altlinux.org> 2016.3.3-alt1
- New version (ALT 32464)

* Thu Jun 16 2016 Ivan Zakharyaschev <imz@altlinux.org> 2015.8.7-alt2
- %%python_req_hier -- for more detailed autoreqs (under jnpr.*),
  without the general UNMET python2.X(jnpr).

* Mon Feb 29 2016 Valentin Rosavitskiy <valintinr@altlinux.org> 2015.8.7-alt1
- New version

* Mon Aug 31 2015 Valentin Rosavitskiy <valintinr@altlinux.org> 2015.5.5-alt1
- New version

* Fri May 29 2015 Valentin Rosavitskiy <valintinr@altlinux.org> 2015.5.1-alt3
- New version

* Sat Apr 18 2015 Valentin Rosavitskiy <valintinr@altlinux.org> 2015.2-alt3
- Removed code from previous tag (ALT 30929)

* Thu Feb 12 2015 Valentin Rosavitskiy <valintinr@altlinux.org> 2015.2-alt2
- Add subpackage python-module-salt-tests

* Mon Feb 02 2015 Valentin Rosavitskiy <valintinr@altlinux.org> 2015.2-alt1
- New version

* Wed Dec 10 2014 Valentin Rosavitskiy <valintinr@altlinux.org> 2014.7-alt3
- Add subpackage salt-api

* Mon Nov 03 2014 Valentin Rosavitskiy <valintinr@altlinux.org> 2014.7-alt2
- Fix repocop info symlink-extra-slash

* Tue Oct 28 2014 Valentin Rosavitskiy <valintinr@altlinux.org> 2014.7-alt1
- New version

* Tue May 13 2014 Valentin Rosavitskiy <valintinr@altlinux.org> 0.17.5-alt1
- New version

* Fri Jan 10 2014 Slava Dubrovskiy <dubrsl@altlinux.org> 0.17.4-alt1
- New version

* Sun Nov 24 2013 Slava Dubrovskiy <dubrsl@altlinux.org> 0.17.2-alt1
- New version

* Sat Sep 28 2013 Slava Dubrovskiy <dubrsl@altlinux.org> 0.17.0-alt1
- New version

* Wed Jan 02 2013 Slava Dubrovskiy <dubrsl@altlinux.org> 0.11.1-alt3
- Update spec
- Fix init scripts

* Mon Dec 24 2012 Slava Dubrovskiy <dubrsl@altlinux.org> 0.11.1-alt2
- New version

* Thu Dec 06 2012 Slava Dubrovskiy <dubrsl@altlinux.org> 0.10.5-alt1
- Build for ALT