-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenstack-nova.spec
831 lines (689 loc) · 31.6 KB
/
openstack-nova.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
%global with_doc %{!?_without_doc:1}%{?_without_doc:0}
%global with_trans %{!?_without_trans:1}%{?_without_trans:0}
%global release_name juno
%global milestone rc2
Name: openstack-nova
# Liberty semver reset
# https://review.openstack.org/#/q/I6a35fa0dda798fad93b804d00a46af80f08d475c,n,z
Epoch: 1
Version: XXX
Release: XXX
Summary: OpenStack Compute (nova)
License: ASL 2.0
URL: http://openstack.org/projects/compute/
Source0: http://launchpad.net/nova/%{release_name}/%{version}/+download/nova-%{version}.tar.gz
Source1: nova-dist.conf
Source6: nova.logrotate
Source10: openstack-nova-api.service
Source11: openstack-nova-cert.service
Source12: openstack-nova-compute.service
Source13: openstack-nova-network.service
Source14: openstack-nova-objectstore.service
Source15: openstack-nova-scheduler.service
Source18: openstack-nova-xvpvncproxy.service
Source19: openstack-nova-console.service
Source20: openstack-nova-consoleauth.service
Source25: openstack-nova-metadata-api.service
Source26: openstack-nova-conductor.service
Source27: openstack-nova-cells.service
Source28: openstack-nova-spicehtml5proxy.service
Source29: openstack-nova-novncproxy.service
Source31: openstack-nova-serialproxy.service
Source21: nova-polkit.pkla
Source23: nova-polkit.rules
Source22: nova-ifc-template
Source24: nova-sudoers
Source30: openstack-nova-novncproxy.sysconfig
BuildArch: noarch
BuildRequires: intltool
BuildRequires: python2-devel
BuildRequires: python-sphinx
BuildRequires: python-oslo-sphinx
BuildRequires: python-setuptools
BuildRequires: python-netaddr
BuildRequires: python-pbr
BuildRequires: python-d2to1
BuildRequires: python-six
BuildRequires: python-oslo-i18n
Requires: openstack-nova-compute = %{epoch}:%{version}-%{release}
Requires: openstack-nova-cert = %{epoch}:%{version}-%{release}
Requires: openstack-nova-scheduler = %{epoch}:%{version}-%{release}
Requires: openstack-nova-api = %{epoch}:%{version}-%{release}
Requires: openstack-nova-network = %{epoch}:%{version}-%{release}
Requires: openstack-nova-objectstore = %{epoch}:%{version}-%{release}
Requires: openstack-nova-conductor = %{epoch}:%{version}-%{release}
Requires: openstack-nova-console = %{epoch}:%{version}-%{release}
Requires: openstack-nova-cells = %{epoch}:%{version}-%{release}
Requires: openstack-nova-novncproxy = %{epoch}:%{version}-%{release}
%description
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
%package common
Summary: Components common to all OpenStack Nova services
Group: Applications/System
Requires: python-nova = %{epoch}:%{version}-%{release}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires(pre): shadow-utils
BuildRequires: systemd
# Required to build nova.conf.sample
BuildRequires: python-keystonemiddleware
BuildRequires: python-oslo-service
%description common
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains scripts, config and dependencies shared
between all the OpenStack nova services.
%package compute
Summary: OpenStack Nova Virtual Machine control service
Group: Applications/System
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
Requires: curl
Requires: iscsi-initiator-utils
Requires: iptables iptables-ipv6
Requires: ipmitool
Requires: python-libguestfs
Requires: libvirt-python
Requires: libvirt-daemon-kvm
%if 0%{?rhel}==0
Requires: libvirt-daemon-lxc
%endif
Requires: openssh-clients
Requires: rsync
Requires: lvm2
Requires: python-cinderclient
Requires(pre): qemu-kvm
Requires: genisoimage
Requires: bridge-utils
%description compute
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains the Nova service for controlling Virtual Machines.
%package network
Summary: OpenStack Nova Network control service
Group: Applications/System
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
Requires: radvd
Requires: bridge-utils
Requires: dnsmasq
Requires: dnsmasq-utils
Requires: ebtables
%description network
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains the Nova service for controlling networking.
%package scheduler
Summary: OpenStack Nova VM distribution service
Group: Applications/System
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
%description scheduler
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains the service for scheduling where
to run Virtual Machines in the cloud.
%package cert
Summary: OpenStack Nova certificate management service
Group: Applications/System
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
%description cert
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains the Nova service for managing certificates.
%package api
Summary: OpenStack Nova API services
Group: Applications/System
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
Requires: python-cinderclient
%description api
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains the Nova services providing programmatic access.
%package conductor
Summary: OpenStack Nova Conductor services
Group: Applications/System
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
%description conductor
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains the Nova services providing database access for
the compute service
%package objectstore
Summary: OpenStack Nova simple object store service
Group: Applications/System
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
%description objectstore
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains the Nova service providing a simple object store.
%package console
Summary: OpenStack Nova console access services
Group: Applications/System
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
Requires: python-websockify
%description console
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains the Nova services providing
console access services to Virtual Machines.
%package cells
Summary: OpenStack Nova Cells services
Group: Applications/System
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
%description cells
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains the Nova Cells service providing additional
scaling and (geographic) distribution for compute services.
%package novncproxy
Summary: OpenStack Nova noVNC proxy service
Group: Applications/System
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
Requires: novnc
Requires: python-websockify
%description novncproxy
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains the Nova noVNC Proxy service that can proxy
VNC traffic over browser websockets connections.
%package spicehtml5proxy
Summary: OpenStack Nova Spice HTML5 console access service
Group: Applications/System
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
Requires: python-websockify
%description spicehtml5proxy
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains the Nova services providing the
spice HTML5 console access service to Virtual Machines.
%package serialproxy
Summary: OpenStack Nova serial console access service
Group: Applications/System
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
Requires: python-websockify
%description serialproxy
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform. It gives you the
software, control panels, and APIs required to orchestrate a cloud,
including running instances, managing networks, and controlling access
through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
This package contains the Nova services providing the
serial console access service to Virtual Machines.
%package -n python-nova
Summary: Nova Python libraries
Group: Applications/System
Requires: openssl
# Require openssh for ssh-keygen
Requires: openssh
Requires: sudo
Requires: MySQL-python
Requires: python-paramiko
Requires: python-eventlet
Requires: python-greenlet
Requires: python-iso8601
Requires: python-netaddr
Requires: python-lxml
Requires: python-anyjson
Requires: python-boto
Requires: python-cheetah
Requires: python-ldap
Requires: python-stevedore
Requires: python-memcached
Requires: python-sqlalchemy
Requires: python-migrate
Requires: python-paste-deploy
Requires: python-routes
Requires: python-webob
Requires: python-cryptography
Requires: os-brick
Requires: python-glanceclient >= 1:0
Requires: python-neutronclient
Requires: python-novaclient
Requires: python-oslo-config >= 1:1.2.0
Requires: python-oslo-db
Requires: python-oslo-vmware
Requires: python-six >= 1.4.1
Requires: python-babel
Requires: python-jinja2
Requires: python-oslo-concurrency
Requires: python-keystonemiddleware
Requires: python-oslo-rootwrap
Requires: python-oslo-messaging >= 1.3.0-0.1.a4
Requires: python-oslo-reports
Requires: python-oslo-i18n
Requires: python-posix_ipc
Requires: python-rfc3986
Requires: python-oslo-middleware
Requires: python-oslo-utils
Requires: python-oslo-serialization
Requires: python-oslo-service
Requires: python-pbr
Requires: python-oslo-log
Requires: python-oslo-context
Requires: python-jsonschema
Requires: python-psutil
Requires: python-oslo-versionedobjects
%description -n python-nova
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform.
This package contains the nova Python library.
%if 0%{?with_doc}
%package doc
Summary: Documentation for OpenStack Compute
Group: Documentation
BuildRequires: graphviz
# Required to build module documents
BuildRequires: os-brick
BuildRequires: python-boto
BuildRequires: python-eventlet
BuildRequires: python-barbicanclient
BuildRequires: python-cinderclient
BuildRequires: python-glanceclient
BuildRequires: python-keystoneclient
BuildRequires: python-neutronclient
BuildRequires: python-lxml
BuildRequires: python-oslo-config
BuildRequires: python-oslo-db
BuildRequires: python-oslo-log
BuildRequires: python-oslo-messaging
BuildRequires: python-oslo-reports
BuildRequires: python-oslo-utils
BuildRequires: python-oslo-versionedobjects
BuildRequires: python-oslo-vmware
BuildRequires: python-paramiko
BuildRequires: python-redis
BuildRequires: python-rfc3986
BuildRequires: python-routes
BuildRequires: python-sqlalchemy
BuildRequires: python-webob
BuildRequires: python-websockify
BuildRequires: python-zmq
# while not strictly required, quiets the build down when building docs.
BuildRequires: python-migrate, python-iso8601
%description doc
OpenStack Compute (codename Nova) is open source software designed to
provision and manage large networks of virtual machines, creating a
redundant and scalable cloud computing platform.
This package contains documentation files for nova.
%endif
%prep
%setup -q -n nova-%{upstream_version}
find . \( -name .gitignore -o -name .placeholder \) -delete
find nova -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
# Remove the requirements file so that pbr hooks don't add it
# to distutils requiers_dist config
rm -rf {test-,}requirements.txt tools/{pip,test}-requires
%build
PYTHONPATH=. oslo-config-generator --config-file=etc/nova/nova-config-generator.conf
%{__python2} setup.py build
# Avoid http://bugzilla.redhat.com/1059815. Remove when that is closed
sed -i 's|group/name|group;name|; s|\[DEFAULT\]/|DEFAULT;|' etc/nova/nova.conf.sample
# Programmatically update defaults in sample config
# which is installed at /etc/nova/nova.conf
# First we ensure all values are commented in appropriate format.
# Since icehouse, there was an uncommented keystone_authtoken section
# at the end of the file which mimics but also conflicted with our
# distro editing that had been done for many releases.
sed -i '/^[^#[]/{s/^/#/; s/ //g}; /^#[^ ]/s/ = /=/' etc/nova/nova.conf.sample
# TODO: Make this more robust
# Note it only edits the first occurance, so assumes a section ordering in sample
# and also doesn't support multi-valued variables like dhcpbridge_flagfile.
while read name eq value; do
test "$name" && test "$value" || continue
sed -i "0,/^# *$name=/{s!^# *$name=.*!#$name=$value!}" etc/nova/nova.conf.sample
done < %{SOURCE1}
%install
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
# docs generation requires everything to be installed first
export PYTHONPATH="$( pwd ):$PYTHONPATH"
pushd doc
# Remove this once sphinxcontrib.seqdiag becomes available
sed -i -e '/sphinxcontrib.seqdiag/d' source/conf.py
sed -i -e 's#../../etc/nova/nova-config-generator.conf#../etc/nova/nova-config-generator.conf#' source/conf.py
%if 0%{?with_doc}
SPHINX_DEBUG=1 sphinx-build -b html source build/html
# Fix hidden-file-or-dir warnings
rm -fr build/html/.doctrees build/html/.buildinfo
%endif
# Create dir link to avoid a sphinx-build exception
mkdir -p build/man/.doctrees/
ln -s . build/man/.doctrees/man
SPHINX_DEBUG=1 sphinx-build -b man -c source source/man build/man
mkdir -p %{buildroot}%{_mandir}/man1
install -p -D -m 644 build/man/*.1 %{buildroot}%{_mandir}/man1/
popd
# Setup directories
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/buckets
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/instances
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/keys
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/networks
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/tmp
install -d -m 750 %{buildroot}%{_localstatedir}/log/nova
# Setup ghost CA cert
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/CA
install -p -m 755 nova/CA/*.sh %{buildroot}%{_sharedstatedir}/nova/CA
install -p -m 644 nova/CA/openssl.cnf.tmpl %{buildroot}%{_sharedstatedir}/nova/CA
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/CA/{certs,crl,newcerts,projects,reqs}
touch %{buildroot}%{_sharedstatedir}/nova/CA/{cacert.pem,crl.pem,index.txt,openssl.cnf,serial}
install -d -m 750 %{buildroot}%{_sharedstatedir}/nova/CA/private
touch %{buildroot}%{_sharedstatedir}/nova/CA/private/cakey.pem
# Install config files
install -d -m 755 %{buildroot}%{_sysconfdir}/nova
install -p -D -m 640 %{SOURCE1} %{buildroot}%{_datadir}/nova/nova-dist.conf
install -p -D -m 640 etc/nova/nova.conf.sample %{buildroot}%{_sysconfdir}/nova/nova.conf
install -p -D -m 640 etc/nova/rootwrap.conf %{buildroot}%{_sysconfdir}/nova/rootwrap.conf
install -p -D -m 640 etc/nova/api-paste.ini %{buildroot}%{_sysconfdir}/nova/api-paste.ini
install -p -D -m 640 etc/nova/policy.json %{buildroot}%{_sysconfdir}/nova/policy.json
# Install version info file
cat > %{buildroot}%{_sysconfdir}/nova/release <<EOF
[Nova]
vendor = Fedora Project
product = OpenStack Nova
package = %{release}
EOF
# Install initscripts for Nova services
install -p -D -m 755 %{SOURCE10} %{buildroot}%{_unitdir}/openstack-nova-api.service
install -p -D -m 755 %{SOURCE11} %{buildroot}%{_unitdir}/openstack-nova-cert.service
install -p -D -m 755 %{SOURCE12} %{buildroot}%{_unitdir}/openstack-nova-compute.service
install -p -D -m 755 %{SOURCE13} %{buildroot}%{_unitdir}/openstack-nova-network.service
install -p -D -m 755 %{SOURCE14} %{buildroot}%{_unitdir}/openstack-nova-objectstore.service
install -p -D -m 755 %{SOURCE15} %{buildroot}%{_unitdir}/openstack-nova-scheduler.service
install -p -D -m 755 %{SOURCE18} %{buildroot}%{_unitdir}/openstack-nova-xvpvncproxy.service
install -p -D -m 755 %{SOURCE19} %{buildroot}%{_unitdir}/openstack-nova-console.service
install -p -D -m 755 %{SOURCE20} %{buildroot}%{_unitdir}/openstack-nova-consoleauth.service
install -p -D -m 755 %{SOURCE25} %{buildroot}%{_unitdir}/openstack-nova-metadata-api.service
install -p -D -m 755 %{SOURCE26} %{buildroot}%{_unitdir}/openstack-nova-conductor.service
install -p -D -m 755 %{SOURCE27} %{buildroot}%{_unitdir}/openstack-nova-cells.service
install -p -D -m 755 %{SOURCE28} %{buildroot}%{_unitdir}/openstack-nova-spicehtml5proxy.service
install -p -D -m 755 %{SOURCE29} %{buildroot}%{_unitdir}/openstack-nova-novncproxy.service
install -p -D -m 755 %{SOURCE31} %{buildroot}%{_unitdir}/openstack-nova-serialproxy.service
# Install sudoers
install -p -D -m 440 %{SOURCE24} %{buildroot}%{_sysconfdir}/sudoers.d/nova
# Install logrotate
install -p -D -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-nova
# Install pid directory
install -d -m 755 %{buildroot}%{_localstatedir}/run/nova
# Install template files
install -p -D -m 644 nova/cloudpipe/client.ovpn.template %{buildroot}%{_datarootdir}/nova/client.ovpn.template
install -p -D -m 644 %{SOURCE22} %{buildroot}%{_datarootdir}/nova/interfaces.template
# Install rootwrap files in /usr/share/nova/rootwrap
mkdir -p %{buildroot}%{_datarootdir}/nova/rootwrap/
install -p -D -m 644 etc/nova/rootwrap.d/* %{buildroot}%{_datarootdir}/nova/rootwrap/
# Older format. Remove when we no longer want to support Fedora 17 with master branch packages
install -d -m 755 %{buildroot}%{_sysconfdir}/polkit-1/localauthority/50-local.d
install -p -D -m 644 %{SOURCE21} %{buildroot}%{_sysconfdir}/polkit-1/localauthority/50-local.d/50-nova.pkla
# Newer format since Fedora 18
install -d -m 755 %{buildroot}%{_sysconfdir}/polkit-1/rules.d
install -p -D -m 644 %{SOURCE23} %{buildroot}%{_sysconfdir}/polkit-1/rules.d/50-nova.rules
# Install novncproxy service options template
install -d %{buildroot}%{_sysconfdir}/sysconfig
install -p -m 0644 %{SOURCE30} %{buildroot}%{_sysconfdir}/sysconfig/openstack-nova-novncproxy
# Remove unneeded in production stuff
rm -f %{buildroot}%{_bindir}/nova-debug
rm -fr %{buildroot}%{python2_sitelib}/nova/tests/
rm -fr %{buildroot}%{python2_sitelib}/run_tests.*
rm -f %{buildroot}%{_bindir}/nova-combined
rm -f %{buildroot}/usr/share/doc/nova/README*
%pre common
getent group nova >/dev/null || groupadd -r nova --gid 162
if ! getent passwd nova >/dev/null; then
useradd -u 162 -r -g nova -G nova,nobody -d %{_sharedstatedir}/nova -s /sbin/nologin -c "OpenStack Nova Daemons" nova
fi
exit 0
%pre compute
usermod -a -G qemu nova
exit 0
%post compute
%systemd_post %{name}-compute.service
%post network
%systemd_post %{name}-network.service
%post scheduler
%systemd_post %{name}-scheduler.service
%post cert
%systemd_post %{name}-cert.service
%post api
%systemd_post %{name}-api.service %{name}-metadata-api.service
%post conductor
%systemd_post %{name}-conductor.service
%post objectstore
%systemd_post %{name}-objectstore.service
%post console
%systemd_post %{name}-console.service %{name}-consoleauth.service %{name}-xvpvncproxy.service
%post cells
%systemd_post %{name}-cells.service
%post novncproxy
%systemd_post %{name}-novncproxy.service
%post spicehtml5proxy
%systemd_post %{name}-spicehtml5proxy.service
%post serialproxy
%systemd_post %{name}-serialproxy.service
%preun compute
%systemd_preun %{name}-compute.service
%preun network
%systemd_preun %{name}-network.service
%preun scheduler
%systemd_preun %{name}-scheduler.service
%preun cert
%systemd_preun %{name}-cert.service
%preun api
%systemd_preun %{name}-api.service %{name}-metadata-api.service
%preun objectstore
%systemd_preun %{name}-objectstore.service
%preun conductor
%systemd_preun %{name}-conductor.service
%preun console
%systemd_preun %{name}-console.service %{name}-consoleauth.service %{name}-xvpvncproxy.service
%preun cells
%systemd_preun %{name}-cells.service
%preun novncproxy
%systemd_preun %{name}-novncproxy.service
%preun spicehtml5proxy
%systemd_preun %{name}-spicehtml5proxy.service
%preun serialproxy
%systemd_preun %{name}-serialproxy.service
%postun compute
%systemd_postun_with_restart %{name}-compute.service
%postun network
%systemd_postun_with_restart %{name}-network.service
%postun scheduler
%systemd_postun_with_restart %{name}-scheduler.service
%postun cert
%systemd_postun_with_restart %{name}-cert.service
%postun api
%systemd_postun_with_restart %{name}-api.service %{name}-metadata-api.service
%postun objectstore
%systemd_postun_with_restart %{name}-objectstore.service
%postun conductor
%systemd_postun_with_restart %{name}-conductor.service
%postun console
%systemd_postun_with_restart %{name}-console.service %{name}-consoleauth.service %{name}-xvpvncproxy.service
%postun cells
%systemd_postun_with_restart %{name}-cells.service
%postun novncproxy
%systemd_postun_with_restart %{name}-novncproxy.service
%postun spicehtml5proxy
%systemd_postun_with_restart %{name}-spicehtml5proxy.service
%postun serialproxy
%systemd_postun_with_restart %{name}-serialproxy.service
%files
%doc LICENSE
%{_bindir}/nova-all
%files common
%doc LICENSE
%dir %{_sysconfdir}/nova
%{_sysconfdir}/nova/release
%attr(-, root, nova) %{_datadir}/nova/nova-dist.conf
%config(noreplace) %attr(-, root, nova) %{_sysconfdir}/nova/nova.conf
%config(noreplace) %attr(-, root, nova) %{_sysconfdir}/nova/api-paste.ini
%config(noreplace) %attr(-, root, nova) %{_sysconfdir}/nova/rootwrap.conf
%config(noreplace) %attr(-, root, nova) %{_sysconfdir}/nova/policy.json
%config(noreplace) %{_sysconfdir}/logrotate.d/openstack-nova
%config(noreplace) %{_sysconfdir}/sudoers.d/nova
%config(noreplace) %{_sysconfdir}/polkit-1/localauthority/50-local.d/50-nova.pkla
%config(noreplace) %{_sysconfdir}/polkit-1/rules.d/50-nova.rules
%dir %attr(0750, nova, root) %{_localstatedir}/log/nova
%dir %attr(0755, nova, root) %{_localstatedir}/run/nova
%{_bindir}/nova-manage
%{_bindir}/nova-rootwrap
%{_bindir}/nova-rootwrap-daemon
%{_datarootdir}/nova
%{_mandir}/man1/nova*.1.gz
%defattr(-, nova, nova, -)
%dir %{_sharedstatedir}/nova
%dir %{_sharedstatedir}/nova/buckets
%dir %{_sharedstatedir}/nova/instances
%dir %{_sharedstatedir}/nova/keys
%dir %{_sharedstatedir}/nova/networks
%dir %{_sharedstatedir}/nova/tmp
%files compute
%{_bindir}/nova-compute
%{_bindir}/nova-idmapshift
%{_unitdir}/openstack-nova-compute.service
%{_datarootdir}/nova/rootwrap/compute.filters
%files network
%{_bindir}/nova-network
%{_bindir}/nova-dhcpbridge
%{_unitdir}/openstack-nova-network.service
%{_datarootdir}/nova/rootwrap/network.filters
%files scheduler
%{_bindir}/nova-scheduler
%{_unitdir}/openstack-nova-scheduler.service
%files cert
%{_bindir}/nova-cert
%{_unitdir}/openstack-nova-cert.service
%defattr(-, nova, nova, -)
%dir %{_sharedstatedir}/nova/CA/
%dir %{_sharedstatedir}/nova/CA/certs
%dir %{_sharedstatedir}/nova/CA/crl
%dir %{_sharedstatedir}/nova/CA/newcerts
%dir %{_sharedstatedir}/nova/CA/projects
%dir %{_sharedstatedir}/nova/CA/reqs
%{_sharedstatedir}/nova/CA/*.sh
%{_sharedstatedir}/nova/CA/openssl.cnf.tmpl
%ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sharedstatedir}/nova/CA/cacert.pem
%ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sharedstatedir}/nova/CA/crl.pem
%ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sharedstatedir}/nova/CA/index.txt
%ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sharedstatedir}/nova/CA/openssl.cnf
%ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sharedstatedir}/nova/CA/serial
%dir %attr(0750, -, -) %{_sharedstatedir}/nova/CA/private
%ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sharedstatedir}/nova/CA/private/cakey.pem
%files api
%{_bindir}/nova-api*
%{_unitdir}/openstack-nova-*api.service
%{_datarootdir}/nova/rootwrap/api-metadata.filters
%files conductor
%{_bindir}/nova-conductor
%{_unitdir}/openstack-nova-conductor.service
%files objectstore
%{_bindir}/nova-objectstore
%{_unitdir}/openstack-nova-objectstore.service
%files console
%{_bindir}/nova-console*
%{_bindir}/nova-xvpvncproxy
%{_unitdir}/openstack-nova-console*.service
%{_unitdir}/openstack-nova-xvpvncproxy.service
%files cells
%{_bindir}/nova-cells
%{_unitdir}/openstack-nova-cells.service
%files novncproxy
%{_bindir}/nova-novncproxy
%{_unitdir}/openstack-nova-novncproxy.service
%config(noreplace) %{_sysconfdir}/sysconfig/openstack-nova-novncproxy
%files spicehtml5proxy
%{_bindir}/nova-spicehtml5proxy
%{_unitdir}/openstack-nova-spicehtml5proxy.service
%files serialproxy
%{_bindir}/nova-serialproxy
%{_unitdir}/openstack-nova-serialproxy.service
%files -n python-nova
%doc LICENSE
%{python2_sitelib}/nova
%{python2_sitelib}/nova-*.egg-info
%if 0%{?with_doc}
%files doc
%doc LICENSE doc/build/html
%endif
%changelog