-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpulp.spec
1822 lines (1669 loc) · 79.6 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
# Required gofer version
%global gofer_version 2.5
# ---- Pulp Platform -----------------------------------------------------------
Name: pulp
Version: 2.6.3
Release: 0.1.alpha%{?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 devel
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}
for directory in server nodes/common nodes/parent nodes/child nodes/extensions/admin nodes/extensions/consumer
do
pushd $directory
%{__python} setup.py build
popd
done
# 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 devel
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}/%{_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}
for directory in server nodes/common nodes/parent nodes/child nodes/extensions/admin nodes/extensions/consumer
do
pushd $directory
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
popd
done
# 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
# These directories are used for Nodes
mkdir -p %{buildroot}/%{_var}/lib/%{name}/nodes/published/http
mkdir -p %{buildroot}/%{_var}/lib/%{name}/nodes/published/https
mkdir -p %{buildroot}/%{_var}/www/%{name}/nodes
# 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
# Nodes Configuration
pushd nodes/common
cp -R etc/pulp %{buildroot}/%{_sysconfdir}
popd
pushd nodes/parent
cp -R etc/httpd %{buildroot}/%{_sysconfdir}
cp -R etc/pulp %{buildroot}/%{_sysconfdir}
popd
pushd nodes/child
cp -R etc/pulp %{buildroot}/%{_sysconfdir}
popd
# Nodes Scripts
pushd nodes/common
cp bin/* %{buildroot}/%{_bindir}
popd
# Types
cp -R nodes/child/pulp_node/importers/types/* %{buildroot}/%{_usr}/lib/pulp/plugins/types/
# WWW
ln -s %{_var}/lib/pulp/nodes/published/http %{buildroot}/%{_var}/www/pulp/nodes
ln -s %{_var}/lib/pulp/nodes/published/https %{buildroot}/%{_var}/www/pulp/nodes
# End Nodes Configuration
%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
cp agent/etc/gofer/plugins/pulpplugin.conf %{buildroot}/%{_sysconfdir}/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-oauth2 >= 1.5.211
Requires: python-httplib2
Requires: python-isodate >= 0.5.0-1.pulp
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 >= %{gofer_version}
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
%dir %{_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,-)
%{_initddir}/pulp_celerybeat
%{_initddir}/pulp_workers
%{_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,-)
%dir %{_var}/lib/%{name}
%{_var}/lib/%{name}/celery
%{_var}/lib/%{name}/published
%{_var}/lib/%{name}/static
%{_var}/lib/%{name}/uploads
%dir %{_var}/log/%{name}
%{_var}/www/pub
# Install the docs
%defattr(-,root,root,-)
%doc README LICENSE COPYRIGHT
%pre server
# If we are upgrading
if [ $1 -gt 1 ] ; then
%if %{pulp_systemd} == 1
/bin/systemctl stop pulp_workers > /dev/null 2>&1
/bin/systemctl stop pulp_celerybeat > /dev/null 2>&1
/bin/systemctl stop pulp_resource_manager > /dev/null 2>&1
%else
/sbin/service pulp_workers stop > /dev/null 2>&1
/sbin/service pulp_celerybeat stop > /dev/null 2>&1
/sbin/service pulp_resource_manager stop > /dev/null 2>&1
%endif
fi
%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
%preun server
# If we are uninstalling
if [ $1 -eq 0 ] ; then
%if %{pulp_systemd} == 1
/bin/systemctl stop pulp_workers > /dev/null 2>&1
/bin/systemctl stop pulp_celerybeat > /dev/null 2>&1
/bin/systemctl stop pulp_resource_manager > /dev/null 2>&1
%else
/sbin/service pulp_workers stop > /dev/null 2>&1
/sbin/service pulp_celerybeat stop > /dev/null 2>&1
/sbin/service pulp_resource_manager stop > /dev/null 2>&1
%endif
fi
%if %{pulp_systemd} == 1
%postun server
%systemd_postun
%endif
# ---- Nodes Common ----------------------------------------------------------------
%package nodes-common
Summary: Pulp nodes common modules
Group: Development/Languages
Requires: pulp-server = %{pulp_version}
Requires: python-pulp-bindings = %{pulp_version}
%description nodes-common
Pulp nodes common modules.
%files nodes-common
%defattr(-,root,root,-)
%dir %{python_sitelib}/pulp_node
%dir %{python_sitelib}/pulp_node/extensions
%{_bindir}/pulp-gen-nodes-certificate
%{python_sitelib}/pulp_node/extensions/__init__.py*
%{python_sitelib}/pulp_node/*.py*
%{python_sitelib}/pulp_node_common*.egg-info
%defattr(640,root,apache,-)
# The nodes.conf file contains OAuth secrets, so we don't want it to be world readable
%config(noreplace) %{_sysconfdir}/pulp/nodes.conf
%defattr(-,root,root,-)
%doc
%post nodes-common
# Generate the certificate used to access the local server.
pulp-gen-nodes-certificate
%postun nodes-common
# clean up the nodes certificate.
if [ $1 -eq 0 ]; then
rm -rf /etc/pki/pulp/nodes
fi
# ---- Parent Nodes ----------------------------------------------------------
%package nodes-parent
Summary: Pulp parent nodes support
Group: Development/Languages
Requires: %{name}-nodes-common = %{version}
Requires: pulp-server = %{pulp_version}
%description nodes-parent
Pulp parent nodes support.
%files nodes-parent
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/httpd/conf.d/pulp_nodes.conf
%{_sysconfdir}/pulp/server/plugins.conf.d/nodes/distributor/
%{python_sitelib}/pulp_node/profilers/
%{python_sitelib}/pulp_node/distributors/
%{python_sitelib}/pulp_node_parent*.egg-info
%defattr(-,apache,apache,-)
%{_var}/lib/pulp/nodes
%{_var}/www/pulp/nodes
%defattr(-,root,root,-)
%doc
# ---- Child Nodes -----------------------------------------------------------
%package nodes-child
Summary: Pulp child nodes support
Group: Development/Languages
Requires: %{name}-nodes-common = %{version}
Requires: pulp-server = %{pulp_version}
Requires: python-pulp-agent-lib = %{pulp_version}
Requires: python-nectar >= 1.1.2
%description nodes-child
Pulp child nodes support.
%files nodes-child
%defattr(-,root,root,-)
%dir %{_sysconfdir}/pulp/server/plugins.conf.d/nodes/importer
%{python_sitelib}/pulp_node/importers/
%{python_sitelib}/pulp_node/handlers/
%{python_sitelib}/pulp_node_child*.egg-info
%{_usr}/lib/pulp/plugins/types/nodes.json
%{_sysconfdir}/pulp/agent/conf.d/nodes.conf
%defattr(640,root,apache,-)
# We don't want the importer config to be world readable, since it can contain proxy passwords
%{_sysconfdir}/pulp/server/plugins.conf.d/nodes/importer/*
%defattr(-,root,root,-)
%doc
# ---- Nodes Admin Extensions ------------------------------------------------------
%package nodes-admin-extensions
Summary: Pulp admin client extensions
Group: Development/Languages
Requires: %{name}-nodes-common = %{version}
Requires: pulp-admin-client = %{pulp_version}
%description nodes-admin-extensions
Pulp nodes admin client extensions.
%files nodes-admin-extensions
%defattr(-,root,root,-)
%{python_sitelib}/pulp_node/extensions/admin/
%{python_sitelib}/pulp_node_admin_extensions*.egg-info
%doc
# ---- Nodes Consumer Extensions ---------------------------------------------------
%package nodes-consumer-extensions
Summary: Pulp nodes consumer client extensions
Group: Development/Languages
Requires: %{name}-nodes-common = %{version}
Requires: %{name}-consumer-client = %{pulp_version}
%description nodes-consumer-extensions
Pulp nodes consumer client extensions.
%files nodes-consumer-extensions
%defattr(-,root,root,-)
%{python_sitelib}/pulp_node/extensions/consumer/
%{python_sitelib}/pulp_node_consumer_extensions*.egg-info
%doc
%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
# ---- Devel ------------------------------------------------------------------
%package -n python-pulp-devel
Summary: Pulp devel python packages
Group: Development/Languages
%description -n python-pulp-devel
A collection of tools used for developing & testing Pulp plugins
%files -n python-pulp-devel
%defattr(-,root,root,-)
%dir %{python_sitelib}/%{name}
%{python_sitelib}/%{name}/__init__.*
%{python_sitelib}/%{name}/devel/
%{python_sitelib}/pulp_devel*.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-%{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 >= %{gofer_version}
Requires: gofer >= %{gofer_version}
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
%{python_sitelib}/%{name}/agent/gofer/
%{_sysconfdir}/gofer/plugins/pulpplugin.conf
%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
%pre selinux
# Record old version so we can limit which restorecon statement are executed later
test -e %{_localstatedir}/lib/rpm-state/%{name} || mkdir -p %{_localstatedir}/lib/rpm-state/%{name}
oldversion=$(semodule -l | grep pulp-server)
echo ${oldversion:12} > %{_localstatedir}/lib/rpm-state/%{name}/old-version
exit 0
%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
cat %{_localstatedir}/lib/rpm-state/%{name}/old-version | xargs %{_datadir}/pulp/selinux/server/relabel.sh
rm %{_localstatedir}/lib/rpm-state/%{name}/old-version
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
rm -r %{_localstatedir}/lib/rpm-state/%{name}
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 Feb 10 2015 Chris Duryee <[email protected]> 2.6.0-0.7.beta
- Pulp rebuild
* Tue Feb 10 2015 Chris Duryee <[email protected]> 2.6.0-0.6.beta
- 1190756 - Send SIGQUIT to the workers instead of the proxy.
- 1190824 - Don't log the length of the database pw. ([email protected])
- 1185011 - pulp-admin says sync schedule deleted succesfully for non-existing
schedule id. ([email protected])
- 1190794 - Fixes release note formatting on 2.6.0 release note
- 1185937 - added release not for python-gofer-amqplib. ([email protected])
- 1182279 - DEBUG level logs database password. ([email protected])
- 1174361 - Revert patch introduced with b0f2319. It is not needed.
- 1120671 - scheduled tasks show correct resources in task list
- 1159303 - delete agent queues during unregistration. ([email protected])
- 1186420 - fixed reading cert_t for custom SSL config ([email protected])
- 1186420 - reading cert_t for custom SSL config ([email protected])
- 1183706 - Remove permission check from upstart celery scripts
- 1183700 - Update pulp.spec to overwrite Celery related init scripts
- 1184187 - Causes all platform tests to use pulp_unittest ([email protected])
* Tue Feb 10 2015 Barnaby Court 2.6.0-0.5.beta
- Merge pulp-nodes.spec into pulp.spec
* Fri Jan 16 2015 Chris Duryee <[email protected]> 2.6.0-0.5.beta
- 1174283 - bump python-requests to 2.4.3 ([email protected])
- 1145723 - touch and chown log file before writing to it ([email protected])
- 1182335 - Fixes username and password auth for mongoDB connection
* Tue Jan 13 2015 Chris Duryee <[email protected]> 2.6.0-0.4.beta
- Pulp rebuild
* Mon Jan 12 2015 Chris Duryee <[email protected]> 2.6.0-0.3.beta
- 1066022 - update role doc to remove mentions of permissions
- 1171278 - additional helper method for finding units ([email protected])
* 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])