-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpulp.spec
1563 lines (1458 loc) · 71.2 KB
/
pulp.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
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
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%if 0%{?rhel} == 5
%define pulp_admin 0
%define pulp_client_oauth 0
%define pulp_server 0
%else
%define pulp_admin 1
%define pulp_client_oauth 1
%define pulp_server 1
%endif
%if %{pulp_server}
#SELinux
%define selinux_variants mls strict targeted
%define selinux_policyver %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2> /dev/null)
%define moduletype apps
%endif
# Determine whether we should target Upstart or systemd for this build
%if 0%{?rhel} >= 7 || 0%{?fedora} >= 15
%define pulp_systemd 1
%else
%define pulp_systemd 0
%endif
# ---- Pulp Platform -----------------------------------------------------------
Name: pulp
Version: 2.6.0
Release: 0.2.beta%{?dist}
Summary: An application for managing software content
Group: Development/Languages
License: GPLv2
URL: https://fedorahosted.org/pulp/
Source0: https://github.com/%{name}/%{name}/archive/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
# do not include either of these on rhel 5
%if 0%{?rhel} == 6
BuildRequires: python-sphinx10 >= 1.0.8
%endif
%if 0%{?rhel} >= 7 || 0%{?fedora} >= 19
BuildRequires: python-sphinx >= 1.0.8
%endif
BuildRequires: rpm-python
%description
Pulp provides replication, access, and accounting for software repositories.
%prep
%setup -q
%build
for directory in agent bindings client_consumer client_lib common
do
pushd $directory
%{__python} setup.py build
popd
done
# pulp-admin build block
%if %{pulp_admin}
pushd client_admin
%{__python} setup.py build
popd
%endif # End pulp-admin build block
%if %{pulp_server}
pushd server
%{__python} setup.py build
popd
# SELinux Configuration
cd server/selinux/server
%if 0%{?rhel} >= 6
distver=rhel%{rhel}
%endif
%if 0%{?fedora} >= 18
distver=fedora%{fedora}
%endif
sed -i "s/policy_module(pulp-server, [0-9]*.[0-9]*.[0-9]*)/policy_module(pulp-server, %{version})/" pulp-server.te
sed -i "s/policy_module(pulp-celery, [0-9]*.[0-9]*.[0-9]*)/policy_module(pulp-celery, %{version})/" pulp-celery.te
./build.sh ${distver}
cd -
%endif
# build man pages if we are able
pushd docs
%if 0%{?rhel} == 6
make man SPHINXBUILD=sphinx-1.0-build
%endif
%if 0%{?rhel} >= 7 || 0%{?fedora} >= 19
make man
%endif
popd
%install
rm -rf %{buildroot}
for directory in agent bindings client_consumer client_lib common
do
pushd $directory
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
popd
done
# Directories
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/agent
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/agent/conf.d
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/consumer
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/consumer/conf.d
mkdir -p %{buildroot}/%{_sysconfdir}/gofer/plugins
mkdir -p %{buildroot}/%{_sysconfdir}/pki/%{name}
mkdir -p %{buildroot}/%{_sysconfdir}/pki/%{name}/consumer
mkdir -p %{buildroot}/%{_sysconfdir}/pki/%{name}/consumer/server
mkdir -p %{buildroot}/%{_sysconfdir}/rc.d/init.d
mkdir -p %{buildroot}/%{_usr}/lib/%{name}/
mkdir -p %{buildroot}/%{_usr}/lib/%{name}/consumer
mkdir -p %{buildroot}/%{_usr}/lib/%{name}/consumer/extensions
mkdir -p %{buildroot}/%{_usr}/lib/%{name}/agent
mkdir -p %{buildroot}/%{_usr}/lib/%{name}/agent/handlers
mkdir -p %{buildroot}/%{_var}/log/%{name}/
mkdir -p %{buildroot}/%{_libdir}/gofer/plugins
mkdir -p %{buildroot}/%{_bindir}
%if 0%{?rhel} >= 6 || 0%{?fedora} >= 19
mkdir -p %{buildroot}/%{_mandir}/man1
%endif
# pulp-admin installation
%if %{pulp_admin}
pushd client_admin
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
popd
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/admin
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/admin/conf.d
mkdir -p %{buildroot}/%{_sysconfdir}/bash_completion.d
mkdir -p %{buildroot}/%{_usr}/lib/%{name}/admin
mkdir -p %{buildroot}/%{_usr}/lib/%{name}/admin/extensions
cp -R client_admin/etc/pulp/admin/admin.conf %{buildroot}/%{_sysconfdir}/%{name}/admin/
cp client_admin/etc/bash_completion.d/pulp-admin %{buildroot}/%{_sysconfdir}/bash_completion.d/
# pulp-admin man page (no need to fence this against el5 again)
cp docs/_build/man/pulp-admin.1 %{buildroot}/%{_mandir}/man1/
%endif # End pulp_admin installation block
# Server installation
%if %{pulp_server}
pushd server
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
popd
# These directories are specific to the server
mkdir -p %{buildroot}/srv
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/content/sources/conf.d
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/server
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/server/plugins.conf.d
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/vhosts80
mkdir -p %{buildroot}/%{_sysconfdir}/default/
mkdir -p %{buildroot}/%{_sysconfdir}/httpd/conf.d/
mkdir -p %{buildroot}/%{_usr}/lib/%{name}/plugins
mkdir -p %{buildroot}/%{_usr}/lib/%{name}/plugins/types
mkdir -p %{buildroot}/%{_var}/lib/%{name}/celery
mkdir -p %{buildroot}/%{_var}/lib/%{name}/uploads
mkdir -p %{buildroot}/%{_var}/lib/%{name}/published
mkdir -p %{buildroot}/%{_var}/lib/%{name}/static
mkdir -p %{buildroot}/%{_var}/www
# Configuration
cp -R server/etc/pulp/* %{buildroot}/%{_sysconfdir}/%{name}
# Apache Configuration
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
cp server/etc/httpd/conf.d/pulp_apache_24.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/pulp.conf
%else
cp server/etc/httpd/conf.d/pulp_apache_22.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/pulp.conf
%endif
# Server init scripts/unit files and environment files
%if %{pulp_systemd} == 0
cp server/etc/default/upstart_pulp_celerybeat %{buildroot}/%{_sysconfdir}/default/pulp_celerybeat
cp server/etc/default/upstart_pulp_resource_manager %{buildroot}/%{_sysconfdir}/default/pulp_resource_manager
cp server/etc/default/upstart_pulp_workers %{buildroot}/%{_sysconfdir}/default/pulp_workers
cp -d server/etc/rc.d/init.d/* %{buildroot}/%{_initddir}/
# We don't want to install pulp-manage-workers in upstart systems
rm -rf %{buildroot}/%{_libexecdir}
%else
cp server/etc/default/systemd_pulp_celerybeat %{buildroot}/%{_sysconfdir}/default/pulp_celerybeat
cp server/etc/default/systemd_pulp_resource_manager %{buildroot}/%{_sysconfdir}/default/pulp_resource_manager
cp server/etc/default/systemd_pulp_workers %{buildroot}/%{_sysconfdir}/default/pulp_workers
mkdir -p %{buildroot}/%{_usr}/lib/systemd/system/
cp server/usr/lib/systemd/system/* %{buildroot}/%{_usr}/lib/systemd/system/
%endif
# Pulp Web Services
cp -R server/srv %{buildroot}
# Web Content
ln -s %{_var}/lib/pulp/published %{buildroot}/%{_var}/www/pub
# Tools
cp server/bin/* %{buildroot}/%{_bindir}
# Ghost
touch %{buildroot}/%{_sysconfdir}/pki/%{name}/ca.key
touch %{buildroot}/%{_sysconfdir}/pki/%{name}/ca.crt
touch %{buildroot}/%{_sysconfdir}/pki/%{name}/rsa.key
touch %{buildroot}/%{_sysconfdir}/pki/%{name}/rsa_pub.key
# Install SELinux policy modules
pushd server/selinux/server
./install.sh %{buildroot}%{_datadir}
mkdir -p %{buildroot}%{_datadir}/pulp/selinux/server
cp enable.sh %{buildroot}%{_datadir}/pulp/selinux/server
cp uninstall.sh %{buildroot}%{_datadir}/pulp/selinux/server
cp relabel.sh %{buildroot}%{_datadir}/pulp/selinux/server
popd
%endif # End server installation block
# Everything else installation
# Ghost
touch %{buildroot}/%{_sysconfdir}/pki/%{name}/consumer/rsa.key
touch %{buildroot}/%{_sysconfdir}/pki/%{name}/consumer/rsa_pub.key
touch %{buildroot}/%{_sysconfdir}/pki/%{name}/consumer/server/rsa_pub.key
# Configuration
cp -R agent/etc/pulp/agent/agent.conf %{buildroot}/%{_sysconfdir}/%{name}/agent/
cp -R client_consumer/etc/pulp/consumer/consumer.conf %{buildroot}/%{_sysconfdir}/%{name}/consumer/
%if 0%{?rhel} >= 6 || 0%{?fedora} >= 19
cp client_consumer/etc/bash_completion.d/pulp-consumer %{buildroot}/%{_sysconfdir}/bash_completion.d/
%endif
# Agent
rm -rf %{buildroot}/%{python_sitelib}/%{name}/agent/gofer
cp agent/etc/gofer/plugins/pulpplugin.conf %{buildroot}/%{_sysconfdir}/gofer/plugins
cp -R agent/pulp/agent/gofer/pulpplugin.py %{buildroot}/%{_libdir}/gofer/plugins
# Ghost
touch %{buildroot}/%{_sysconfdir}/pki/%{name}/consumer/consumer-cert.pem
# pulp-consumer man page
%if 0%{?rhel} >= 6 || 0%{?fedora} >= 19
cp docs/_build/man/pulp-consumer.1 %{buildroot}/%{_mandir}/man1
%endif
%clean
rm -rf %{buildroot}
# define required pulp platform version.
%global pulp_version %{version}
# ---- Server ------------------------------------------------------------------
%if %{pulp_server}
%package server
Summary: The pulp platform server
Group: Development/Languages
Requires: python-%{name}-common = %{pulp_version}
Requires: python-celery >= 3.1.0
Requires: python-celery < 3.2.0
Requires: python-pymongo >= 2.5.2
Requires: python-mongoengine >= 0.7.10
Requires: python-setuptools
Requires: python-webpy
Requires: python-okaara >= 1.0.32
Requires: python-oauth2 >= 1.5.211
Requires: python-httplib2
Requires: python-isodate >= 0.5.0-1.pulp
Requires: python-BeautifulSoup
Requires: python-qpid
Requires: python-nectar >= 1.1.6
Requires: httpd
Requires: mod_ssl
Requires: openssl
Requires: nss-tools
Requires: python-ldap
Requires: python-gofer >= 1.4.0
Requires: python-gofer-qpid >= 1.4.0
Requires: crontabs
Requires: acl
Requires: mod_wsgi >= 3.4-1.pulp
Requires: m2crypto
Requires: genisoimage
# RHEL6 ONLY
%if 0%{?rhel} == 6
Requires: nss >= 3.12.9
%endif
%if %{pulp_systemd} == 1
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%endif
Obsoletes: pulp
%description server
Pulp provides replication, access, and accounting for software repositories.
%files server
# - root:root
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/default/pulp_celerybeat
%config(noreplace) %{_sysconfdir}/default/pulp_workers
%config(noreplace) %{_sysconfdir}/default/pulp_resource_manager
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
%dir %{_sysconfdir}/pki/%{name}
%dir %{_sysconfdir}/%{name}/content/sources/conf.d
%dir %{_sysconfdir}/%{name}/server
%dir %{_sysconfdir}/%{name}/server/plugins.conf.d
%dir %{_sysconfdir}/%{name}/vhosts80
%dir /srv/%{name}
/srv/%{name}/webservices.wsgi
%{_bindir}/pulp-manage-db
%{_bindir}/pulp-qpid-ssl-cfg
%{_bindir}/pulp-gen-ca-certificate
%{_usr}/lib/%{name}/plugins/types
%{python_sitelib}/%{name}/server/
%{python_sitelib}/%{name}/plugins/
%{python_sitelib}/pulp_server*.egg-info
%if %{pulp_systemd} == 0
# Install the init scripts
%defattr(755,root,root,-)
%config %{_initddir}/pulp_celerybeat
%config %{_initddir}/pulp_workers
%config %{_initddir}/pulp_resource_manager
%else
# Install the systemd unit files
%defattr(-,root,root,-)
%{_usr}/lib/systemd/system/*
%defattr(755,root,root,-)
%{_libexecdir}/pulp-manage-workers
%endif
# 640 root:apache
%defattr(640,root,apache,-)
%ghost %{_sysconfdir}/pki/%{name}/ca.key
%ghost %{_sysconfdir}/pki/%{name}/ca.crt
%ghost %{_sysconfdir}/pki/%{name}/rsa.key
%ghost %{_sysconfdir}/pki/%{name}/rsa_pub.key
%config(noreplace) %{_sysconfdir}/%{name}/server.conf
# - apache:apache
%defattr(-,apache,apache,-)
%{_var}/lib/%{name}/
%dir %{_var}/log/%{name}
%{_var}/www/pub
# Install the docs
%defattr(-,root,root,-)
%doc README LICENSE COPYRIGHT
%post server
# RSA key pair
KEY_DIR="%{_sysconfdir}/pki/%{name}"
KEY_PATH="$KEY_DIR/rsa.key"
KEY_PATH_PUB="$KEY_DIR/rsa_pub.key"
if [ ! -f $KEY_PATH ]
then
openssl genrsa -out $KEY_PATH 2048 &> /dev/null
openssl rsa -in $KEY_PATH -pubout > $KEY_PATH_PUB 2> /dev/null
fi
chmod 640 $KEY_PATH
chmod 644 $KEY_PATH_PUB
chown root:apache $KEY_PATH
chown root:apache $KEY_PATH_PUB
ln -fs $KEY_PATH_PUB %{_var}/lib/%{name}/static
# CA certificate
if [ $1 -eq 1 ]; # not an upgrade
then
pulp-gen-ca-certificate
fi
%if %{pulp_systemd} == 1
%postun server
%systemd_postun
%endif
%endif # End pulp_server if block
# ---- Common ------------------------------------------------------------------
%package -n python-pulp-common
Summary: Pulp common python packages
Group: Development/Languages
Obsoletes: pulp-common
Requires: python-isodate >= 0.5.0-1.pulp
Requires: python-iniparse
# RHEL5 ONLY
%if 0%{?rhel} == 5
Requires: python-simplejson
%endif
%description -n python-pulp-common
A collection of components that are common between the pulp server and client.
%files -n python-pulp-common
%defattr(-,root,root,-)
%dir %{_usr}/lib/%{name}
%dir %{python_sitelib}/%{name}
%{python_sitelib}/%{name}/__init__.*
%{python_sitelib}/%{name}/common/
%{python_sitelib}/pulp_common*.egg-info
%doc README LICENSE COPYRIGHT
# ---- Client Bindings ---------------------------------------------------------
%package -n python-pulp-bindings
Summary: Pulp REST bindings for python
Group: Development/Languages
Requires: python-%{name}-common = %{pulp_version}
%if %{pulp_client_oauth}
Requires: python-oauth2 >= 1.5.170-2.pulp
%endif
Requires: m2crypto
%description -n python-pulp-bindings
The Pulp REST API bindings for python.
%files -n python-pulp-bindings
%defattr(-,root,root,-)
%{python_sitelib}/%{name}/bindings/
%{python_sitelib}/pulp_bindings*.egg-info
%doc README LICENSE COPYRIGHT
# ---- Client Extension Framework -----------------------------------------------------
%package -n python-pulp-client-lib
Summary: Pulp client extensions framework
Group: Development/Languages
Requires: m2crypto
Requires: python-%{name}-common = %{pulp_version}
Requires: python-okaara >= 1.0.32
Requires: python-isodate >= 0.5.0-1.pulp
Requires: python-setuptools
Obsoletes: pulp-client-lib
%description -n python-pulp-client-lib
A framework for loading Pulp client extensions.
%files -n python-pulp-client-lib
%defattr(-,root,root,-)
%{python_sitelib}/%{name}/client/commands/
%{python_sitelib}/%{name}/client/extensions/
%{python_sitelib}/%{name}/client/upload/
%{python_sitelib}/%{name}/client/*.py
%{python_sitelib}/%{name}/client/*.pyc
%{python_sitelib}/%{name}/client/*.pyo
%{python_sitelib}/pulp_client_lib*.egg-info
%doc README LICENSE COPYRIGHT
# ---- Agent Handler Framework -------------------------------------------------
%package -n python-pulp-agent-lib
Summary: Pulp agent handler framework
Group: Development/Languages
Requires: python-%{name}-common = %{pulp_version}
%description -n python-pulp-agent-lib
A framework for loading agent handlers that provide support
for content, bind and system specific operations.
%files -n python-pulp-agent-lib
%defattr(-,root,root,-)
%{python_sitelib}/%{name}/agent/
%{python_sitelib}/pulp_agent*.egg-info
%dir %{_sysconfdir}/%{name}/agent
%dir %{_sysconfdir}/%{name}/agent/conf.d
%dir %{_usr}/lib/%{name}/agent
%doc README LICENSE COPYRIGHT
# ---- Admin Client (CLI) ------------------------------------------------------
%if %{pulp_admin}
%package admin-client
Summary: Admin tool to administer the pulp server
Group: Development/Languages
Requires: python >= 2.6
Requires: python-okaara >= 1.0.32
Requires: python-%{name}-common = %{pulp_version}
Requires: python-%{name}-bindings = %{pulp_version}
Requires: python-%{name}-client-lib = %{pulp_version}
Obsoletes: pulp-admin
Obsoletes: pulp-builtins-admin-extensions <= %{pulp_version}
%description admin-client
A tool used to administer the pulp server, such as repo creation and
synching, and to kick off remote actions on consumers.
%files admin-client
%defattr(-,root,root,-)
%{python_sitelib}/%{name}/client/admin/
%{python_sitelib}/pulp_client_admin*.egg-info
%dir %{_sysconfdir}/%{name}/admin
%dir %{_sysconfdir}/%{name}/admin/conf.d
%{_sysconfdir}/bash_completion.d/pulp-admin
%dir %{_usr}/lib/%{name}/admin/extensions/
%config(noreplace) %{_sysconfdir}/%{name}/admin/admin.conf
%{_bindir}/%{name}-admin
%doc README LICENSE COPYRIGHT
%doc %{_mandir}/man1/pulp-admin.1*
%endif # End of pulp_admin if block
# ---- Consumer Client (CLI) ---------------------------------------------------
%package consumer-client
Summary: Consumer tool to administer the pulp consumer.
Group: Development/Languages
Requires: python-%{name}-common = %{pulp_version}
Requires: python-%{name}-bindings = %{pulp_version}
Requires: python-%{name}-client-lib = %{pulp_version}
Obsoletes: pulp-consumer
Obsoletes: pulp-builtins-consumer-extensions <= %{pulp_version}
%description consumer-client
A tool used to administer a pulp consumer.
%files consumer-client
%defattr(-,root,root,-)
%{python_sitelib}/%{name}/client/consumer/
%{python_sitelib}/pulp_client_consumer*.egg-info
%dir %{_sysconfdir}/%{name}/consumer
%dir %{_sysconfdir}/%{name}/consumer/conf.d
%dir %{_sysconfdir}/pki/%{name}/consumer/
%dir %{_usr}/lib/%{name}/consumer/extensions/
%config(noreplace) %{_sysconfdir}/%{name}/consumer/consumer.conf
%{_bindir}/%{name}-consumer
%ghost %{_sysconfdir}/pki/%{name}/consumer/rsa.key
%ghost %{_sysconfdir}/pki/%{name}/consumer/rsa_pub.key
%ghost %{_sysconfdir}/pki/%{name}/consumer/server/rsa_pub.key
%ghost %{_sysconfdir}/pki/%{name}/consumer/consumer-cert.pem
%doc README LICENSE COPYRIGHT
%if 0%{?rhel} >= 6 || 0%{?fedora} >= 19
%{_sysconfdir}/bash_completion.d/pulp-consumer
%doc %{_mandir}/man1/pulp-consumer.1*
%endif
%post consumer-client
# RSA key pair
KEY_DIR="%{_sysconfdir}/pki/%{name}/consumer/"
KEY_PATH="$KEY_DIR/rsa.key"
KEY_PATH_PUB="$KEY_DIR/rsa_pub.key"
if [ ! -f $KEY_PATH ]
then
openssl genrsa -out $KEY_PATH 2048 &> /dev/null
openssl rsa -in $KEY_PATH -pubout > $KEY_PATH_PUB 2> /dev/null
fi
chmod 640 $KEY_PATH
# ---- Agent -------------------------------------------------------------------
%package agent
Summary: The Pulp agent
Group: Development/Languages
Requires: python-%{name}-bindings = %{pulp_version}
Requires: python-%{name}-agent-lib = %{pulp_version}
Requires: %{name}-consumer-client = %{pulp_version}
Requires: python-gofer >= 1.4.0
Requires: python-gofer-qpid >= 1.4.0
Requires: gofer >= 1.4.0
Requires: m2crypto
%description agent
The pulp agent, used to provide remote command & control and
scheduled actions such as reporting installed content profiles
on a defined interval.
%files agent
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/%{name}/agent/agent.conf
%{_sysconfdir}/gofer/plugins/pulpplugin.conf
%{_libdir}/gofer/plugins/pulpplugin.*
%doc README LICENSE COPYRIGHT
# --- Selinux ---------------------------------------------------------------------
%if %{pulp_server}
%package selinux
Summary: Pulp SELinux policy for pulp components.
Group: Development/Languages
BuildRequires: rpm-python
BuildRequires: make
BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel
BuildRequires: hardlink
Obsoletes: pulp-selinux-server
%if "%{selinux_policyver}" != ""
Requires: selinux-policy >= %{selinux_policyver}
%endif
%if 0%{?fedora} == 19
Requires(post): selinux-policy-targeted >= 3.12.1-74
%endif
Requires(post): policycoreutils-python
Requires(post): /usr/sbin/semodule, /sbin/fixfiles, /usr/sbin/semanage
Requires(postun): /usr/sbin/semodule
%description selinux
SELinux policy for Pulp's components
%post selinux
# Enable SELinux policy modules
if /usr/sbin/selinuxenabled ; then
%{_datadir}/pulp/selinux/server/enable.sh %{_datadir}
fi
# restorcecon wasn't reading new file contexts we added when running under 'post' so moved to 'posttrans'
# Spacewalk saw same issue and filed BZ here: https://bugzilla.redhat.com/show_bug.cgi?id=505066
%posttrans selinux
if /usr/sbin/selinuxenabled ; then
%{_datadir}/pulp/selinux/server/relabel.sh %{_datadir}
fi
%preun selinux
# Clean up after package removal
if [ $1 -eq 0 ]; then
%{_datadir}/pulp/selinux/server/uninstall.sh
%{_datadir}/pulp/selinux/server/relabel.sh
fi
exit 0
%files selinux
%defattr(-,root,root,-)
%doc README LICENSE COPYRIGHT
%{_datadir}/pulp/selinux/server/*
%{_datadir}/selinux/*/pulp-server.pp
%{_datadir}/selinux/*/pulp-celery.pp
%{_datadir}/selinux/devel/include/%{moduletype}/pulp-server.if
%{_datadir}/selinux/devel/include/%{moduletype}/pulp-celery.if
%endif # End selinux if block
%changelog
* Tue Dec 23 2014 Chris Duryee <[email protected]> 2.6.0-0.2.beta
- 1174353 - improving performance of "pulp-admin tasks list"
- 1154790 - inject node strategy into the options. ([email protected])
- 1175512 - Fixes mongoengine database args to use correct database
- 1166202 - documenting that EPEL requires RHEL "optional" and "extras" repos
- 1167908 - Migration for TaskStatus and Reserved Resources
- 1142325 - the unit tests no longer depend on qpidtoollibs.
- 1150128 - The pulp-consumer tool now reports the error message for permission
exceptions. ([email protected])
- 1012091 - SELinux policy now allows setting directory attributes in /tmp
- 1171509 - FastForwardXmlFileContext was sometimes finding the wrong file and
was not cleaning up after itself. ([email protected])
- 1165355 - Add a sanitize_checksum_type function. ([email protected])
- 1166703 - builder.py now checks to make sure master isn't checked out.
- 1163451 - create ~/.pulp with correct perms, and warn when it has wrong perms
- 1155604 - fixing incorrect formatting of a note ([email protected])
* Mon Dec 22 2014 Randy Barlow <[email protected]> 2.5.2-0.1.rc
- Pulp rebuild
* Mon Dec 22 2014 Randy Barlow <[email protected]> 2.4.4-0.3.beta
- 1155604 - fixing incorrect formatting of a note ([email protected])
* Fri Dec 19 2014 Randy Barlow <[email protected]> 2.5.2-0.0.beta
- 1166202 - documenting that EPEL requires RHEL "optional" and "extras" repos
- 1155604 - fixing incorrect formatting of a note ([email protected])
* Tue Dec 16 2014 Barnaby Court <[email protected]> 2.5.1-1
- 1171509 - FastForwardXmlFileContext was sometimes finding the wrong file and
was not cleaning up after itself. ([email protected])
- 1165355 - Add a sanitize_checksum_type function. ([email protected])
- 1129828 - split stack traces into separate log records. ([email protected])
- 1165355 - Add a sanitize_checksum_type function. ([email protected])
- 1162820 - Clarify SSL configuration settings. ([email protected])
* Fri Nov 21 2014 Chris Duryee <[email protected]> 2.6.0-0.1.alpha
- 1162820 - Clarify SSL configuration settings. ([email protected])
- 1116825 - Adding a non-existent user to a role now returns HTTP 400 instead
of 404. ([email protected])
- 1004623 - References to old collection names and content_unit_count needs to
be updated ([email protected])
- 1021970 - Add an example how to retrieve permissions for a particular
resource. ([email protected])
- 1128226 - Adjusting 'Repository Content Behavior' section name
- 1161205 - Adds comments to conf files about value of defaults
- 1021579 - document unexpected behavior in unassociate api
- 1081534 - Added /v2 and trailing / to the permissions docs
- 1165271 - Adds 2.5.0 deprecation release note about _ns attribute
- 1111261 - document single event listener retrieval ([email protected])
- 1161690 - Add release note for RabbitMQ support. ([email protected])
- 1132663 - pulp-manage-db now has a --dry-run flag. ([email protected])
- 721314 - add man pages for pulp-admin and pulp-consumer ([email protected])
- 1159067 - Read user cred from config ([email protected])
- 1148928 - 404 is returned when publishing a nonexistent repo group
- 1079511 - better relative url collision prevention ([email protected])
- 1155513 - Search for package in all consumers ([email protected])
- 1146294 - do not require pulp.bindings.server to access DEFAULT_CA_PATH
- 1121102 - support unordered agent replies. ([email protected])
- 1160794 - update python-requests to 2.4.3 ([email protected])
- 1145734 - more correct error message when apache fails ([email protected])
- 1127817 - return a 404 for consumer history request if consumer id does not
exist ([email protected])
- 1135589 - move PRIMARY_ID definition ([email protected])
- 1145723 - log startup message in Celery logs ([email protected])
- 1148919 - remove traceback from log if user enters incorrect password
- 1148796 - pulp-admin tab completion follows plugin structure
- 1132458 - cont - test now works outside of terminal ([email protected])
- 1120671 - missing operation from reaper and monthly tasks
- 1129828 - split stack traces into separate log records. ([email protected])
- 1142304 - remove extraneous errors during unit test runs ([email protected])
- 1139703 - update pickled schedule on schedule updates ([email protected])
- 1142376 - use valid default certificate pack path ([email protected])
- 1136504 - added tab completion for file paths ([email protected])
- 1124589 - python-kombu does not work with Qpid unless the user adjusts
qpidd.conf ([email protected])
- 1133953 - check Mongo version during startup ([email protected])
- 1095483 - fix message to not refer to pulp.log ([email protected])
- 1133939 - tab completion for short options ([email protected])
* Fri Nov 21 2014 Austin Macdonald <[email protected]> 2.5.0-1
- 1129488 - Adjusts mongoDB auto-reconnect to never stop attempting
- 1160796 - Allow TCP connections to all hosts and ports ([email protected])
- 1111228 - Fix API doc typo. ([email protected])
- 1153344 - verify_ssl default to true. ([email protected])
- 1153344 - Support Mongo SSL on the result backend. ([email protected])
- 1153344 - Allow Mongo connections over SSL. ([email protected])
- 1145701 - bump release to allow a koji rebuild ([email protected])
- 1117512 - Fix formatting of last_unit_added & last_unit_removed fields
- 1153054 - pulp.bindings refuse to do SSLv3. ([email protected])
- 1102269 - Added documentation about deprecation of task_type
- 1150297 - Update versions from 2.4.x to 2.5.0. ([email protected])
- 1060752 - Add sample output for repo import_upload ([email protected])
- 1146680 - Stop pulp_workers services with SIGQUIT. ([email protected])
- 1131260 - Shell out to for certificate validation. ([email protected])
* Mon Oct 20 2014 Randy Barlow <[email protected]> 2.4.3-1
- 1153054 - pulp.bindings refuse to do SSLv3. ([email protected])
* Mon Oct 13 2014 Chris Duryee <[email protected]> 2.4.2-1
- 1138356 - adding docs on how to backup pulp ([email protected])
- 1122987 - Adds troubleshooting note around Qpid scalability limits
- 1066472 - Removed 409 response codes in docs for permission api calls
- 1103232 - Document common proxy config options. ([email protected])
- 1081518 - Add help documentation for retrieving a single distributor or
importer ([email protected])
- 1064150 - Creates a troubleshooting page that mentions inconsistency with
trailing slashes ([email protected])
- 1148555 - removes doubled 2.4.1 rest api changes from release notes
- 1022188 - Docs about repos binding to nodes which were activated after
deactivation ([email protected])
- 1145320 - document running pulp-manage-db after installation.
- 1129489 - Document Apache CRLs. ([email protected])
- 1096294 - Document the rsyslog log level settings. ([email protected])
- 1087997 - add link to release note ([email protected])
- 1009429 - Move pulp_manage_puppet bool 2 celery_t. ([email protected])
- 1134972 - remove calls to mongo flush ([email protected])
- 1132609 - celery result backend gets mongo username correctly
- 1131632 - Remove notes to disable SELinux in EL 5. ([email protected])
- 1130119 - do not add full task info to spawned_tasks ([email protected])
- 1131509 - remove quotes from ca_path ([email protected])
- 1130153 - Fixed regression with consumer binding retrieval.
- 1103914 - Pulp exceptions no longer log a traceback by default
- 1128329 - Add warnings about admin.conf to docs. ([email protected])
- 1128222 - Fixed a formatting issue in the installation docs
- 1128831 - Restore python-rhsm-1.8.0. ([email protected])
- 1094470 - Canceling a task that was already in a completed state now results
in a 200 code instead of a 500 ([email protected])
- 1110418 - Added documentation on publishing repository groups
- 1111228 - Removed jdob from the event listener sample return
- 1111197 - Fixed a typo in the sample request in event listeners docs
- 1110449 - Fixed typos in context applicability documentation
- 1094256 - Updated the consumer binding docs to make it clear a 200 can be
returned ([email protected])
- 1083522 - Updated the repo publish documentation to correct the schedule path
- 1079445 - Updated the repo sync documentation to correct the schedule path
- 1078348 - Updated the docs for updating an importer to make it clear that the
task report contains the results ([email protected])
- 1022553 - pulp-admin unbind commands will now return a user-friendly error
message if the consumer or repository given don't exist. ([email protected])
- 1112663 - Allows schedules with monthly or yearly intervals
- 1109870 - fixed typo in passing tags when creating a task for deleting orphan
by type ([email protected])
- 1092450 - Retrieving orphans by content type now returns a 404 if the content
type does not exist ([email protected])
- 1115414 - updated get consumer profiles api to return 404 in case of non-
existing consumer ([email protected])
- 1115391 - removing duplicate unit test and updating one to detect 405 return
code for consumer group bindings GET calls ([email protected])
- 1115385 - Removing GET methods on consumer group bindings since consumer
group bind and unbind are merely used as group operations and are not stored
on the consumer group permanently ([email protected])
- 1117512 - Convert timestamps saved for tracking distributor publishes &
importer syncs to UTC instead of timezone offset ([email protected])
- 1100805 - Fixing consumer group bind and unbind and moving tasks from
tasks/consumer_group.py to consumer group cud manager ([email protected])
* Tue Sep 23 2014 Randy Barlow <[email protected]> 2.4.1-1
- 1136883 - Fixed incorrect tags for applicability in the docs
- 1131260 - Shell out to for certificate validation. ([email protected])
- 1129719 - Raise the certificate validation depth. ([email protected])
- 1131260 - relax version requirement. ([email protected])
- 1130312 - Fix bug query for 2.4.1. ([email protected])
- 1130312 - Add upgrade instructions for 2.4.1. ([email protected])
- 1108306 - Update nectar to fix hang on canceling downloads of large numbers
of files. ([email protected])
- 1093760 - pulp-manage-db now halts if a migration fails ([email protected])
* Sat Aug 09 2014 Randy Barlow <[email protected]> 2.4.0-1
- 1125030 - Handle both styles of certificate stores. ([email protected])
- 1113590 - Nodes requires Pulp's cert to be trusted 1112906 - pulp-admin
requires Pulp's cert to be trusted 1112904 - pulp-consumer requires Pulp's
cert to be trusted ([email protected])
- 1110893 - adding a trailing slash to an API path ([email protected])
- 1115631 - discard disabled sources before doing is_valid check.
- 1005899 - support 'message' reported during node sync. ([email protected])
- 1113590 - Adding documentation about adding ca cert to the system trusted
certs for pulp-admin and pulp-consumer and adding bindings unit tests
- 1112906 - adding SSL CA cert validation to the bindings ([email protected])
- 1112905 - updating pulp-gen-ca-certificate script to create pulp ssl
certificates ([email protected])
- 1112904 - adding configuration for pulp ssl certificates
- 1110668 - updated consumer group binding documentation to refect the actual
behaviour ([email protected])
- 1117060 - added umask setting to celery worker command line, since the
default of 0 is unsafe. ([email protected])
- 1116438 - use apache httpd type and not typealias ([email protected])
- 1115715 - syslog handler works with string formatting tokens in tracebacks.
- 1115631 - disabled content sources discarded before validity check performed.
- 1115129 - update rsa_pub as part of consumer updates. ([email protected])
- 1093871 - sorting tasks by default according to when they were created.
- 1100638 - Update task search API to match the serialization used for task
collection & task get APIs ([email protected])
- 1110674 - A 400 Bad Request is returned when attempting to bind a consumer
group to an invalid repo or distributor id ([email protected])
- 1104654 - Don't require python-oauth2 on RHEL 5. ([email protected])
- 1020912 - add pulp_manage_puppet selinux boolean ([email protected])
- 1110668 - consumer group binding calls now return 404 when invalid group,
repo, or distributor ids are given ([email protected])
- 1074426 - Updated the repository group API docs to reflect actual DELETE
behaviour ([email protected])
- 1109430 - goferd supporting systemd. ([email protected])
- 1105636 - saving a unit through a conduit now fails over to adding or
updating if a unit appears or disappears unexpectedly ([email protected])
- 1094286 - failing to include 'options' or 'units' during content
install/update/uninstall calls on consumers now results in a 400 code
- 1100805 - Fixing consumer group bind and unbind and moving tasks from
tasks/consumer_group.py to consumer group cud manager ([email protected])
- 1094264 - Retrieving bindings by consumer and repository now returns 404 if
the consumer or repository ids are invalid. ([email protected])
- 1060866 - The Repository Group Distributors API is now documented
- 1097781 - Indicate that consumer bind fails when it does.
- 1107782 - fixed in gofer 1.2.1. ([email protected])
- 1102393 - Rework how we select the queue for new reservations.
- 1100892 - check if filename exists before printing ([email protected])
- 1100330 - Improve error message and documentation. ([email protected])
- 1102236 - pass the authenticator to the reply consumer. ([email protected])
- 1099272 - bump mongodb version requirement in docs ([email protected])
- 1098620 - Report NoAvailableQueues as a coded Exception. ([email protected])
- 1101598 - returns the correct data type when copy matches 0 units
- 1097247 - Add status to pulp_celerybeat script. ([email protected])
- 1100084 - read consumer.conf during setup_plugin(). ([email protected])
- 1099945 - use correct serializer when publishing http events
- 1096931 - improving repo update command to better detect spawned tasks
- 1051700 - Don't build pulp-admin on RHEL 5. ([email protected])
- 1096822 - Don't set a canceled Task to finished. ([email protected])
- 1099168 - move %%postun block inside pulp_server if block
- 1096935 - Adds info about qpid-cpp-server-store package to docs
- 1091980 - Update install and upgrade docs with qpid client deps
- 1096968 - return created profile; log reported profiles at debug in the
agent. ([email protected])
- 1094647 - GET of consumer schedule that doesn't exist now returns 404
- 1097817 - agent SSL properties applied. ([email protected])
- 1093870 - Use far less RAM during publish. ([email protected])
- 1093009 - Don't use symlinks for init scripts. ([email protected])
- 1091348 - Always perform distributor updates asyncronously.
- 1094825 - bind/unbind return call_report; 200/202 based on spawned tasks.
- 1095691 - Adding cleanup of Celery Task Results to Reaper
- 1093429 - Changing repo create API to match documented key name.
- 1094637 - fixing consumer schedule API urls in the documentation
- 1094653 - correctly handling the case where an invalid schedule ID is
provided to the REST API ([email protected])
- 1087514 - correct dev-guide for create/update user. ([email protected])
- 1091922 - Fix _delete_queue() traceback. ([email protected])
- 1093417 - propagate transport configuration property. ([email protected])
- 1086278 - Convert upload into a polling command. ([email protected])
- 1091919 - agent load rsa keys on demand. ([email protected])
- 1090570 - Fix content commands handling of returned call report.
- 1073065 - Better document task cancellations. ([email protected])
- 1072955 - Create TaskStatuses with all attributes. ([email protected])
- 1087015 - Capture warnings with the pulp logger ([email protected])
- 1091530 - fix rendering a progress report = None. ([email protected])
- 1091090 - alt-content sources updated to work with nectar 1.2.1.
- 1073999 - removing result from task list and adding it to the task details
- 1069909 - Don't run server code on EL5 for pulp-dev.py. ([email protected])
- 1074670 - Save initialize & finalize in step processing even if no units are
processed. ([email protected])
- 1080609 - pulp-manage-db now ensures the admin. ([email protected])
- 1087863 - Fix progress reporting in node sync command. ([email protected])
- 1087633 - Fix bind task to support node binding. ([email protected])
- 1084716 - Register with Celery's setup_logging. ([email protected])
- 1086437 - Fixes consumer reregistration. ([email protected])
- 1065450 - updating repo delete api docs for responses ([email protected])
- 1080647 - added validation that a unit profile is not None before requesting
applicability regeneration by repos ([email protected])
- 1061783 - added missing example for the consumer group update api
documentation ([email protected])
- 1074668 - updated consumer group update api docs to remove consumer_ids from
acceptable parameters ([email protected])
- 1073997 - adding validation to repo group create call to check for valid repo
ids ([email protected])
- 1085545 - Fix permissions on /etc/pulp/server/plugins.conf.d/nodes/importer.
- 1082130 - Update progress only when task_id != None. ([email protected])
- 1082064 - task status created with state=WAITING when None is passed.
- 1080642 - updated consumer unbind task to mark the binding deleted before
notifying agent ([email protected])
- 1080626 - updated agent manager to return no exception when converting server
bindings to agent bindings in case distributor is already deleted on the
server ([email protected])
- 1080626 - fixing error in the error code description preventing to complete
repo delete on the server ([email protected])
- 965764 - Fix a test for the DownloaderConfig API. ([email protected])
- 1015583 - added a new api so that consumers can request applicability
generation for themselves ([email protected])
- 1078335 - Add import statements for missing tasks. ([email protected])
- 1073154 - Do not log newlines or long messages. ([email protected])
- 1074661 - Raise a validation error if non-existant consumers are specified
during creation of a consumer group ([email protected])
- 1078305 - Repo update not reporting errors properly. Fix error response for
repo update and incorrect documentation for the udpate call.
- 1076225 - Update docs to include information about the result value of the
Task Report as opposed to the Call Report ([email protected])