-
Notifications
You must be signed in to change notification settings - Fork 5
/
spacewalk-splice-tool.spec
391 lines (326 loc) · 16.4 KB
/
spacewalk-splice-tool.spec
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
# spacewalk-splice-tool package
Name: spacewalk-splice-tool
Version: 0.50
Release: 1%{?dist}
Summary: A tool for gathering active system checkin data from spacewalk server and report to Splice server
Group: Development/Languages
License: GPLv2+
URL: https://github.com/splice/spacewalk-splice-tool
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-setuptools
BuildRequires: python2-devel
Requires: python-certutils
Requires: python-oauth2
Requires: splice-common >= 0.77
Requires: /usr/sbin/crond
Requires: katello-cli
Requires: subscription-manager
Requires: subscription-manager-migration-data >= 2.0.1
%description
A tool for gathering system checkin data from spacewalk server and report to Splice server
%prep
%setup -q
%build
pushd src
%{__python} setup.py build
popd
%install
rm -rf %{buildroot}
pushd src
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
popd
mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig/
mkdir -p %{buildroot}/%{_sysconfdir}/splice/
mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_var}/log/%{name}
mkdir -p %{buildroot}/%{_sysconfdir}/cron.d
# Configuration
cp -R etc/splice/checkin.conf %{buildroot}/%{_sysconfdir}/splice/
cp -R etc/cron.d/* %{buildroot}/%{_sysconfdir}/cron.d/
# Tools
cp bin/* %{buildroot}/%{_bindir}/
# Remove egg info
rm -rf %{buildroot}/%{python_sitelib}/*.egg-info
%clean
rm -rf %{buildroot}
%post
/sbin/service crond condrestart
%postun
/sbin/service crond condrestart
%files
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/spacewalk-splice-checkin
%{python_sitelib}/spacewalk_splice_tool*
%attr(0640, root, splice) %config(noreplace) %{_sysconfdir}/splice/checkin.conf
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/cron.d/spacewalk-sst-sync
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/cron.d/splice-sst-sync
%doc LICENSE
%changelog
* Tue Apr 08 2014 Chris Duryee <[email protected]> 0.50-1
- fix spec file ([email protected])
* Tue Apr 08 2014 Chris Duryee <[email protected]> 0.49-1
- clean up checkin.conf, and pep8 ([email protected])
* Fri Feb 21 2014 Chris Duryee (beav) <[email protected]>
- forgot some wiring, and remove print statements ([email protected])
- allow users to flatten org structure if desired ([email protected])
- Allow disabling of autoentitle via conf file ([email protected])
- remove extraneous log statement ([email protected])
- 1064523: parse ';' properly in channel list when calculating clones
- add failing test for 1064523 ([email protected])
* Thu Jan 09 2014 Chris Duryee (beav) <[email protected]>
- use sync_users config setting ([email protected])
- refactor to put "report_input" a conf option instead of cli option
- delete manifest zip after importing ([email protected])
- add travis config ([email protected])
- add prefixes to host/guest list ([email protected])
- allow data to come in from multiple spacewalks ([email protected])
- fix unit test to not require actual CertificateDirectory ([email protected])
* Tue Sep 17 2013 Chris Duryee (beav) <[email protected]>
- 1009035: convert some rhel4 arches to known arch values ([email protected])
* Wed Sep 11 2013 Chris Duryee (beav) <[email protected]>
- 1007072: convert EM64T to x86_64 ([email protected])
* Wed Sep 11 2013 John Matthews <[email protected]> 0.44-1
- 1006593 - splice log rolling sets incorrect permissions
* Tue Sep 10 2013 Chris Duryee (beav) <[email protected]>
- 1004954: reduce default thread count ([email protected])
* Fri Sep 06 2013 Chris Duryee (beav) <[email protected]>
- 1004954: reduce default thread count ([email protected])
* Thu Sep 05 2013 Chris Duryee (beav) <[email protected]>
- 1004335: abort with error if org names have '<>/' in them
* Tue Aug 20 2013 Chris Duryee (beav) <[email protected]>
- remove debug print ([email protected])
* Thu Aug 01 2013 Chris Duryee (beav) <[email protected]>
- go back to findByProduct ([email protected])
* Thu Jul 25 2013 Chris Duryee (beav) <[email protected]>
- ssh as user-configurable user instead of root ([email protected])
* Thu Jul 25 2013 Chris Duryee (beav) <[email protected]>
- remove deletion record removal ([email protected])
* Thu Jul 25 2013 John Matthews <[email protected]> 0.36-1
- Update path to splice_ca ([email protected])
- autoentitle systems via async task after updates ([email protected])
* Wed Jul 24 2013 Chris Duryee (beav) <[email protected]>
- 984009: ssh timeout when fetching system list ([email protected])
- 987485: sync virt status based on is_virtualized ([email protected])
* Tue Jul 23 2013 Chris Duryee (beav) <[email protected]>
- change organization_id to organization_label, and send lastCheckin up with
consumer update again ([email protected])
- sync deletions, and change organization_id in MPU to org label
* Tue Jul 16 2013 John Matthews <[email protected]> 0.33-1
- 983683 - spacewalk-splice-tool has no dependency on subscription-manager-
migration-data ([email protected])
* Tue Jul 16 2013 John Matthews <[email protected]> 0.32-1
- 978390 - splice config files should be protected ([email protected])
* Tue Jul 16 2013 John Matthews <[email protected]> 0.31-1
- 980184 - discrepancies in /etc/splice/checkin.conf ([email protected])
* Tue Jul 16 2013 John Matthews <[email protected]> 0.30-1
- 980180 - spacewalk-splice-tool package should be noarch
- add the spacewalk-id as soon as possible ([email protected])
* Thu Jul 11 2013 Chris Duryee (beav) <[email protected]>
- typoed an argument that broke ssh ([email protected])
* Thu Jul 11 2013 Chris Duryee (beav) <[email protected]>
- various fixups ([email protected])
* Tue Jul 02 2013 Chris Duryee (beav) <[email protected]>
- remove dep to smmd, which is not always available ([email protected])
- rename rmu to mpu, to avoid confusion ([email protected])
- make SafeConfigParser handle config defaults ([email protected])
- use multithread for enriching RMU ([email protected])
- break queued worker out into something that others can use
- checkin.py: support old configs without num_threads option set
* Fri Jun 28 2013 Chris Duryee (beav) <[email protected]>
- multiple small fixups ([email protected])
- updates to checkin.conf ([email protected])
- Test for utils ([email protected])
- Add another test (100% coverage on checkin.py) ([email protected])
- Add basic test for splice_sync ([email protected])
- Do not exit from upload_to_rcs, allow it to be handled by main()
- lots of pep8 fixups ([email protected])
- use multiple threads when updating consumers ([email protected])
- fix unit test for org name vs label ([email protected])
- fix sync options unit test ([email protected])
* Fri Jun 21 2013 James Slagle <[email protected]> 0.25-1
- 972915 - Change sst to run as splice user in cron file ([email protected])
- Remove unused config option ([email protected])
* Wed Jun 19 2013 Chris Duryee (beav) <[email protected]>
- change URL from headpin to sam ([email protected])
* Wed Jun 19 2013 James Slagle <[email protected]> 0.23-1
- 972953 - Name roles with the satellite org name instead of org id. Handle
org renames as well ([email protected])
- 972942 - Propogate org name changes from satellite to sam
* Wed Jun 19 2013 John Matthews <[email protected]> 0.22-1
- 972969 - No need to specify spacewalk-report command anymore
- 973330 - sample-json directory should exist and be writeable
- 972879 - Use a seperate lockfile for each sync so they can run at the same
time. Also, if neither sync is specified, then run both (added some help
indicating such) ([email protected])
* Tue Jun 18 2013 James Slagle <[email protected]> 0.21-1
- Make sure ssh always connects as root to the satellite ([email protected])
* Tue Jun 11 2013 John Matthews <[email protected]> 0.20-1
- 972146 - use org ID in role name instead of org name ([email protected])
- 972192 - Handle ssh commands that don't run successfully ([email protected])
- fix typo in cron and shift time over a bit, until we have two lockfiles
* Wed Jun 05 2013 Chris Duryee (beav) <[email protected]>
- remove katello-checkin file ([email protected])
- data handling fixes ([email protected])
* Wed Jun 05 2013 James Slagle <[email protected]> 0.18-1
- rebuild
* Tue Jun 04 2013 James Slagle <[email protected]> 0.17-1
- Require katello-cli ([email protected])
- Add releasers.conf ([email protected])
* Tue Jun 04 2013 Chris Duryee (beav) <[email protected]>
- utf8 fix and org ordering fix ([email protected])
- re-enable distributor delete, and change report name ([email protected])
- use checkin_date on mpu, not date ([email protected])
- add host/guest mapping report ([email protected])
- use org name instead of label for roles ([email protected])
* Wed May 22 2013 Chris Duryee (beav) <[email protected]>
- Revert "use org name instead of org label on roles" ([email protected])
* Wed May 22 2013 Chris Duryee (beav) <[email protected]>
- use org name instead of org label on roles ([email protected])
- update virt uuid fact if needed ([email protected])
- host/guest mappings ([email protected])
- send up spacewalk hostname, remove unused fields ([email protected])
- send installed products as part of registration ([email protected])
- use katello org id here, per wes ([email protected])
- fix deletion ([email protected])
- Make http protocol configurable since running katello out of a checkout uses
http, not https ([email protected])
- Initialize CERT_DIR lazily instead of on import, but still only once
- do not create default environment anymore ([email protected])
- fix subscription_status call ([email protected])
- initialize certificatedirectory sooner ([email protected])
* Tue May 14 2013 Chris Duryee (beav) <[email protected]>
- use owner key instead of ID when populating MPU ([email protected])
- Set default socket timeout from config file ([email protected])
* Fri May 10 2013 Chris Duryee (beav) <[email protected]>
- use new style entitlement_status ([email protected])
- katello->splice changes ([email protected])
- rename most candlepin identifiers to katello ([email protected])
- Make top level url for katello api configurable ([email protected])
- Logging updates ([email protected])
- Better test for spacewalk_sync ([email protected])
- Systems are now keyed by name ([email protected])
- Refactor to not call getRelease on import ([email protected])
- Add test base class ([email protected])
- Set cores per socket fact ([email protected])
- use config options for katello connection, and send up spacewalk hostname
- use system name instead of spacewalk ID, and leave OS field blank
- use name instead of spacewalk id ([email protected])
- remove some dead code ([email protected])
- Update code to call correct report ([email protected])
- Rename cp-export ([email protected])
- Update synopsis and description of cp-export ([email protected])
- do a checkin and refresh when creating/updating systems ([email protected])
- link distributors when creating new orgs ([email protected])
- Fix config variable reference ([email protected])
- Move ssh options to config file ([email protected])
- Fix channel setting ([email protected])
- Cloned channel report for spacewalk ([email protected])
- Fix clone channel logic for new report ([email protected])
- cloned channel lookup ([email protected])
- Merging upstream master into role change branch ([email protected])
- handle sat admin syncing ([email protected])
- Nothing requires rhic-serve-common anymore ([email protected])
- remove some print statements ([email protected])
- syncing roles ([email protected])
- additional fixes ([email protected])
- Fix config file path ([email protected])
- typo ([email protected])
- Script itself should actually call ssh ([email protected])
- No longer require spacewalk-reports ([email protected])
- Move checkin.conf to just /etc/splice ([email protected])
- Add needed variables to functions ([email protected])
- Run both sync options if neither is specified ([email protected])
- create needed dir ([email protected])
- Fix file location ([email protected])
- Fix file attrs ([email protected])
- spec file updates ([email protected])
- Bash script andcron config for running sst ([email protected])
- refactor into seperate syncs ([email protected])
- remove systems when deleted in sw ([email protected])
- sync org deletes, and unit tests ([email protected])
- import order ([email protected])
- Be sure to always release lockfile ([email protected])
- Add options for seperate sync steps ([email protected])
- whitespace ([email protected])
- Add vim swap files to .gitignore ([email protected])
- lots of changes to support katello ([email protected])
- s/owner/organization in url, no oauth, WIP on owner sync ([email protected])
* Tue Apr 16 2013 John Matthews <[email protected]> 0.11-1
- Added a CLI option: --sample-json if set to a path we will output the json
data we send to Splice as separate files ([email protected])
- Added rhic-serve-common dep to spec file ([email protected])
- default to one socket, instead of blank ([email protected])
- populate org id and name in mpu ([email protected])
* Thu Apr 11 2013 John Matthews <[email protected]> 0.10-1
- Automatic commit of package [spacewalk-splice-tool] release [0.9-1].
- Upload Pool/Product/Rules data to splice.common.api during 'checkin' run
- config cleanup, and removal of some dead code ([email protected])
* Thu Apr 11 2013 John Matthews <[email protected]> 0.9-1
- Upload Pool/Product/Rules data to splice.common.api during 'checkin' run
- use oauth instead of username/pass ([email protected])
- spec updates ([email protected])
- delete systems from candlepin that were deleted in spacewalk
- do not allow two instances of sst to run at once ([email protected])
- use org ID instead of org name, and clean up logging statements
- Read data out of spacewalk DB instead of using APIs ([email protected])
- Use all systems in spacewalk, do not perform group to rhic mapping
- add entitlementStatus to MPU ([email protected])
- use qty of the entitlement, not the pool ([email protected])
- send candlepin data to rcs ([email protected])
- set facts in a way that candlepin expects ([email protected])
- candlepin support ([email protected])
- candlepin support ([email protected])
* Fri Feb 01 2013 John Matthews <[email protected]> 0.8-1
- Change default num sockets to 0 if no data is available
* Thu Jan 31 2013 John Matthews <[email protected]> 0.7-1
- Update to handle errors and display error messages from remote server
* Wed Jan 30 2013 John Matthews <[email protected]> 0.6-1
- Added support for "inactive" systems ([email protected])
- Update for new location of certs ([email protected])
- send server metadata before product usage ([email protected])
- find root for cloned channels when calculating product usage
- additional debugging, and clone mapping POC ([email protected])
- changes for socket support (wip) ([email protected])
- fixing facts data to match what report server expects ([email protected])
* Wed Oct 31 2012 Pradeep Kilambi <[email protected]> 0.5-1
- using local config to avoid django interference ([email protected])
* Wed Oct 31 2012 Pradeep Kilambi <[email protected]> 0.4-1
- requiring current version of splice-common for compatibility
* Wed Oct 31 2012 Pradeep Kilambi <[email protected]> 0.3-1
- Add logging support ([email protected])
- Adding requires on splice-common ([email protected])
- updating cron info and added a note if user wants to update the crontab
- adding support to upload product usage ([email protected])
- adding rel-eng dir ([email protected])
- updating spec file ([email protected])
* Mon Oct 29 2012 Pradeep Kilambi <[email protected]> 0.2-1
- new package built with tito