-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopensaf.spec.in
1615 lines (1389 loc) · 47.2 KB
/
opensaf.spec.in
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
%define opensaf_user opensaf
%define opensaf_group opensaf
%define is_python %(test "@PYTHON_ENABLED@" = "yes" && echo 1 || echo 0)
%define is_python3 %([[ "@PYTHON_VERSION@" = 3.* ]] && echo 1 || echo 0)
%define is_java %(test "@JAVA_ENABLED@" = "yes" && echo 1 || echo 0)
%define is_am4j %(test "@AM4J_ENABLED@" = "yes" && echo 1 || echo 0)
%define is_tests %(test "@TESTS_ENABLED@" = "yes" && echo 1 || echo 0)
%define is_immxml %(test "@IMMXML_ENABLED@" = "yes" && echo 1 || echo 0)
%define is_ntfimcn %(test "@NTFIMCN_ENABLED@" = "yes" && echo 1 || echo 0)
%define is_ais_plm %(test "@AIS_PLM_ENABLED@" = "yes" && echo 1 || echo 0)
%define is_ais_ckpt %(test "@AIS_CKPT_ENABLED@" = "yes" && echo 1 || echo 0)
%define is_ais_evt %(test "@AIS_EVT_ENABLED@" = "yes" && echo 1 || echo 0)
%define is_ais_lck %(test "@AIS_LCK_ENABLED@" = "yes" && echo 1 || echo 0)
%define is_ais_msg %(test "@AIS_MSG_ENABLED@" = "yes" && echo 1 || echo 0)
%define is_ais_smf %(test "@AIS_SMF_ENABLED@" = "yes" && echo 1 || echo 0)
%if (0%{?suse_version} >= 1210 || 0%{?fedora} >= 18 || 0%{?rhel} >= 7)
%define use_systemd 1
%if 0%{?suse_version} >= 1210
%define _systemd_preun() %{service_del_preun}
%define _systemd_post() %{service_add_post}
%endif
%if (0%{?fedora} >= 18 || 0%{?rhel} >= 7)
%define _systemd_preun() %{systemd_preun}
%define _systemd_post() %{systemd_post}
%endif
%else
%define use_systemd 0
%endif
%define _pkglibdir %{_libdir}/%{name}
%define _pkgsysconfdir %{_sysconfdir}/%{name}
%define _initddir @initscriptdir@
%define _pkgdatadir %{_datadir}/%{name}
%define _pkgclcclidir %{_pkglibdir}/clc-cli
%define _pkgclmscriptsdir %{_pkglibdir}/clm-scripts
%if %is_immxml
%define _pkgimmxmldir %{_datadir}/%{name}/immxml
%define _pkgimmxml_svcdir %{_datadir}/%{name}/immxml/services
%endif
%if %is_python
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?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))")}
%endif
%endif
Summary: OpenSAF is an open source implementation of the SAF AIS specification
Name: opensaf
Version: @OPENSAF_RELEASE@
Release: @OPENSAF_RPM_RELEASE@%{?dist}
License: LGPL
Group: System Environment/Base
URL: http://www.opensaf.org
Source: http://download.opensaf.org/releases/%{name}-%{version}.tar.gz
Packager: @OPENSAF_BUGREPORT@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %use_systemd
BuildRequires: systemd
%systemd_requires
%endif
Requires(pre): /usr/bin/getent /usr/sbin/groupadd /usr/sbin/useradd
%if ! %use_systemd
Requires(post): /usr/lib/lsb/install_initd /sbin/service
Requires(preun): /usr/lib/lsb/remove_initd /sbin/service
%endif
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
%description
OpenSAF is an open source project established to develop a base platform
middleware consistent with Service Availability Forum (SA Forum)
specifications, under the LGPLv2.1 license. The OpenSAF Foundation was
established by leading Communications and Enterprise Computing Companies to
facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF
code base in commercial products.
The OpenSAF project was launched in mid 2007 and has been under development by
an informal group of supporters of the OpenSAF initiative. The OpenSAF
Foundation was founded on January 22nd 2008 with Emerson Network Power,
Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members.
%package amf-libs
Group: System Environment/Libraries
Summary: The OpenSAF implementation of the SAF-AIS-AMF Service
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-amf-libs < %{version}-%{release}
%description amf-libs
The Availability Management Framework provides a set of APIs to enable highly
available applications. In addition to component registration and life cycle
management, it includes functions for error reporting and health monitoring.
The Availability Management Framework also assigns active or standby workloads
to the components of an application as a function of component state and system
configuration. The Availability Management Framework configuration allows
prioritization of resources and provides for a variety of redundancy models.
The Availability Management Framework also provides APIs for components to
track the assignment of work or so-called component service instances among the
set of components protecting the same component service instance.
%package amf-director
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-AMF Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-ntf-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
Requires: %{name}-log-libs = %{version}-%{release}
%description amf-director
The OpenSAF implementation of the SAF-AIS-AMF Service. This daemon must be
running on the System Controller nodes only.
%package amf-nodedirector
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-AMF Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-ntf-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
%description amf-nodedirector
The OpenSAF implementation of the SAF-AIS-AMF Service. This daemon must be
running on both the System Controller nodes and the Payload nodes.
%package amf-integration
Group: System Environment/Libraries
Summary: OpenSAF additions to simplify integration with the SAF-AIS-AMF Service
Requires: %{name}-amf-libs = %{version}-%{release}
%description amf-integration
OpenSAF additions to simplify integration with the SAF-AIS-AMF Service
%if %is_ais_ckpt
%package ckpt-libs
Group: System Environment/Libraries
Summary: The OpenSAF implementation of the SAF-AIS-CKPT Service
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-ckpt-libs < %{version}-%{release}
%description ckpt-libs
The Checkpoint Service provides a facility for processes to record checkpoint
data incrementally, which can be used to protect an application against
failures. When recovering from fail-over or switch-over situations, the
checkpoint data can be retrieved, and execution can be resumed from the state
recorded before the failure.
%package ckpt-director
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-CKPT Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-ckpt-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
%description ckpt-director
The OpenSAF implementation of the SAF-AIS-CKPT Service. This daemon must be
running on the System Controller nodes only.
%package ckpt-nodedirector
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-CKPT Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-ckpt-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
%description ckpt-nodedirector
The OpenSAF implementation of the SAF-AIS-CKPT Service. This daemon must be
running on both the System Controller nodes and the Payload nodes.
%endif
%package clm-libs
Group: System Environment/Libraries
Summary: The OpenSAF implementation of the SAF-AIS-CLM Service
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-clm-libs < %{version}-%{release}
%description clm-libs
The Cluster Membership Service provides applications with membership information
about the nodes that have been administratively configured in the cluster
configuration (these nodes are also called cluster nodes or configured nodes),
and it is core to any clustered system. A cluster consists of this set of
configured nodes, each with a unique node name.
%package clm-server
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-CLM Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
Requires: %{name}-log-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-ntf-libs = %{version}-%{release}
%if %is_ais_plm
Requires: %{name}-plm-libs = %{version}-%{release}
%endif
%description clm-server
The OpenSAF implementation of the SAF-AIS-CLM Service. This daemon must be
running on the System Controller nodes only.
%package clm-nodeagent
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-CLM Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
%description clm-nodeagent
The OpenSAF implementation of the SAF-AIS-CLM Service. This daemon must be
running on both the System Controller nodes and the Payload nodes.
%if %is_ais_evt
%package evt-libs
Group: System Environment/Libraries
Summary: The OpenSAF implementation of the SAF-AIS-EVT Service
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-evt-libs < %{version}-%{release}
%description evt-libs
The Event Service is a publish/subscribe multipoint-to-multipoint communication
mechanism that is based on the concept of event channels. One or more publishers
communicate asynchronously with one or more subscribers by means of events over
a cluster-wide entity named event channel.
%package evt-server
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-EVT Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-evt-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
%description evt-server
The OpenSAF implementation of the SAF-AIS-EVT Service. This daemon must be
running on the System Controller nodes only.
%endif
%package imm-libs
Group: System Environment/Libraries
Summary: The OpenSAF implementation of the SAF-AIS-IMM Service
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-imm-libs < %{version}-%{release}
%description imm-libs
The different entities of an SA Forum cluster, such as components provided by
the Availability Management Framework, checkpoints provided by the Checkpoint
Service, or message queues provided by the Message Service are represented by
various objects of the SA Forum Information Model.
%package imm-director
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-IMM Service
BuildRequires: libxml2-devel
Requires: libxml2
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
%description imm-director
The OpenSAF implementation of the SAF-AIS-IMM Service. This daemon must be
running on the System Controller nodes only.
%package imm-nodedirector
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-IMM Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
%description imm-nodedirector
The OpenSAF implementation of the SAF-AIS-IMM Service. This daemon must be
running on both the System Controller nodes and the Payload nodes.
%if %is_ais_lck
%package lck-libs
Group: System Environment/Libraries
Summary: The OpenSAF implementation of the SAF-AIS-LCK Service
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-lck-libs < %{version}-%{release}
%description lck-libs
The Lock Service is a distributed lock service, which is intended for use in a
cluster where processes in different nodes might compete with each other for
access to a shared resource.
%package lck-director
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-LCK Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-lck-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
%description lck-director
The OpenSAF implementation of the SAF-AIS-LCK Service. This daemon must be
running on the System Controller nodes only.
%package lck-nodedirector
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-LCK Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-lck-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
%description lck-nodedirector
The OpenSAF implementation of the SAF-AIS-LCK Service. This daemon must be
running on both the System Controller nodes and the Payload nodes.
%endif
%package log-libs
Group: System Environment/Libraries
Summary: The OpenSAF implementation of the SAF-AIS-LOG Service
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-log-libs < %{version}-%{release}
%description log-libs
Logging information is a high-level cluster-significant, function-based (as
opposed to implementation-particular) information suited primarily for network
or system administrators, or automated tools to review current and historical
logged information to trouble shoot issues such as misconfigurations, network
disconnects and unavailable resources.
%package log-server
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-LOG Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
%description log-server
The OpenSAF implementation of the SAF-AIS-LOG Service. This daemon must be
running on the System Controller nodes only.
%if %is_ais_plm
%package plm-libs
Group: System Environment/Libraries
Summary: The OpenSAF implementation of the SAF-AIS-PLM Service
BuildRequires: openhpi-devel
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-plm-libs < %{version}-%{release}
%description plm-libs
Platform Management Service is an Application Interface Specification (AIS) of
the Service AvailabilityTM Forum (SA Forum). It is intended for use by
implementers of the Application Interface Specification and by application
developers who would use the Application Interface Specification to develop
applications that must be highly available. To use the PLM Service API, a
process must be bound with the libSaPlm.so library.
%package plm-server
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-PLM Service
BuildRequires: openhpi-devel
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-plm-libs = %{version}-%{release}
Requires: %{name}-ntf-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-plm-coordinator = %{version}-%{release}
%description plm-server
The OpenSAF implementation of the SAF-AIS-PLM Service. This daemon must be
running on the System Controller nodes only.
%package plm-coordinator
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-PLM Service
%if %use_systemd
BuildRequires: systemd-devel
%systemd_requires
%endif
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: /lib/lsb/init-functions
%description plm-coordinator
The OpenSAF implementation of the SAF-AIS-PLM Service. This daemon must be
running on any nodes that need Execution Environment (EE) integration with PLM.
%package plm-hpi
Group: System Environment/Libraries
Summary: The OpenSAF implementation of the SAF-AIS-PLM Service
BuildRequires: openhpi-devel
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: openhpi
Requires: %{name}-plm-server = %{version}-%{release}
%description plm-hpi
The OpenSAF implementation of the SAF-AIS-PLM Service. This provides the HPI
integration support to PLM.
%endif
%if %is_ais_msg
%package msg-libs
Group: System Environment/Libraries
Summary: The OpenSAF implementation of the SAF-AIS-MSG Service
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-msg-libs < %{version}-%{release}
%description msg-libs
The Message Service specifies a buffered message-passing system based on the
concept of a message queue for processes on the same or on different nodes.
Messages are written to message queues and read from them. A single message
queue permits a multipoint-to-point communication. Message queues are
persistent or non-persistent. The Message Service must preserve messages that
have not yet been consumed when the message queue is closed.
%package msg-director
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-MSG Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-msg-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
%description msg-director
The OpenSAF implementation of the SAF-AIS-MSG Service. This daemon must be
running on the System Controller nodes only.
%package msg-nodedirector
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-MSG Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-msg-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
%description msg-nodedirector
The OpenSAF implementation of the SAF-AIS-MSG Service. This daemon must be
running on both the System Controller nodes and the Payload nodes.
%endif
%package ntf-libs
Group: System Environment/Libraries
Summary: The OpenSAF implementation of the SAF-AIS-NTF Service
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-ntf-libs < %{version}-%{release}
%description ntf-libs
ITU-T recommendations X.700 - X.799 deal with the area of system management,
and how it may be applied to a communications system. ITU-T broadly classifies
the management domain into the famous FCAPS model that segregates the overall
management into five areas, with the "F" standing for Fault Management. The
Notification Service is based on these fault management recommendations to a
great degree, but also needs many other supportive recommendations that include,
for example, the concepts of managed objects, which are covered in Structure
of Management Information. Normative references to ITU-T-defined agents and
managers are used in the definition of the current notification standard.
%package ntf-server
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-NTF Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-ntf-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-log-libs = %{version}-%{release}
%description ntf-server
The OpenSAF implementation of the SAF-AIS-NTF Service. This daemon must be
running on the System Controller nodes only.
%if %is_ais_smf
%package smf-libs
Group: System Environment/Libraries
Summary: The OpenSAF implementation of the SAF-AIS-SMF Service
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Obsoletes: %{name}-smf-libs < %{version}-%{release}
%description smf-libs
SA Forum systems are required to provide highly available services to their
users over a long period of time during which the systems may undergo changes
due to growth and evolution, bug fixes, or enhancement of services. These
changes may require addition, removal, replacement, or reconfiguration of
hardware or software elements. High service availability requires that such
changes cause no (or only minimal) loss of service.
%package smf-director
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-SMF Service
BuildRequires: libxml2-devel
Requires: libxml2
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-smf-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
Requires: %{name}-ntf-libs = %{version}-%{release}
%description smf-director
The OpenSAF implementation of the SAF-AIS-SMF Service. This daemon must be
running on the System Controller nodes only.
%package smf-nodedirector
Group: System Environment/Daemons
Summary: The OpenSAF implementation of the SAF-AIS-SMF Service
Requires: /lib/lsb/init-functions
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-smf-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
%description smf-nodedirector
The OpenSAF implementation of the SAF-AIS-SMF Service. This daemon must be
running on both the System Controller nodes and the Payload nodes.
%endif
%package controller
Group: System Environment/Daemons
Summary: The required components to run an OpenSAF System Controller node
Conflicts: %{name}-payload
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-amf-director = %{version}-%{release}
Requires: %{name}-amf-nodedirector = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
Requires: %{name}-clm-server = %{version}-%{release}
Requires: %{name}-clm-nodeagent = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-imm-director = %{version}-%{release}
Requires: %{name}-imm-nodedirector = %{version}-%{release}
Requires: %{name}-log-libs = %{version}-%{release}
Requires: %{name}-log-server = %{version}-%{release}
Requires: %{name}-ntf-libs = %{version}-%{release}
Requires: %{name}-ntf-server = %{version}-%{release}
Requires: %{name}-tools = %{version}-%{release}
%description controller
%package payload
Group: System Environment/Daemons
Summary: The required components to run an OpenSAF Payload node
Conflicts: %{name}-controller
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-amf-nodedirector = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
Requires: %{name}-clm-nodeagent = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-imm-nodedirector = %{version}-%{release}
Requires: %{name}-log-libs = %{version}-%{release}
Requires: %{name}-ntf-libs = %{version}-%{release}
Requires: %{name}-tools = %{version}-%{release}
%description payload
%package libs
Group: System Environment/Libraries
Summary: The non-SAF OpenSAF specific common runtime libraries
Requires: /sbin/ldconfig
Obsoletes: %{name}-libs < %{version}-%{release}
%description libs
%package tools
Group: System/Management
Summary: OpenSAF specific command line tools for management of an OpenSAF based system
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-log-libs = %{version}-%{release}
Requires: %{name}-ntf-libs = %{version}-%{release}
%if %is_ais_smf
Requires: %{name}-smf-libs = %{version}-%{release}
%endif
%description tools
%package devel
Group: Development/Libraries
Summary: The development environment for the OpenSAF project
BuildRequires: pkgconfig
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-log-libs = %{version}-%{release}
Requires: %{name}-ntf-libs = %{version}-%{release}
%if %is_ais_plm
Requires: %{name}-plm-libs = %{version}-%{release}
Requires: %{name}-plm-coordinator = %{version}-%{release}
%endif
%if %is_ais_ckpt
Requires: %{name}-ckpt-libs = %{version}-%{release}
%endif
%if %is_ais_evt
Requires: %{name}-evt-libs = %{version}-%{release}
%endif
%if %is_ais_lck
Requires: %{name}-lck-libs = %{version}-%{release}
%endif
%if %is_ais_msg
Requires: %{name}-msg-libs = %{version}-%{release}
%endif
%if %is_ais_smf
Requires: %{name}-smf-libs = %{version}-%{release}
%endif
%if %is_java
Requires: %{name}-java = %{version}-%{release}
%endif
%description devel
%package samples
Group: Applications/System
Summary: Small sample applications to demonstrate OpenSAF functionalities
Requires: %{name}-devel = %{version}-%{release}
%description samples
%if %is_java
%package java
Group: Development/Libraries
Summary: The Java AIS interface mapping for AMF and CLM
BuildRequires: ant java-devel
Requires: java
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
%description java
%endif
%if %is_python
%package python
Group: Development/Libraries
Summary: The Python AIS Bindings for SAF Services
%if %is_python3
BuildRequires: python3-devel
%else
BuildRequires: python2-devel
%endif
Requires: %{name}-amf-libs = %{version}-%{release}
Requires: %{name}-clm-libs = %{version}-%{release}
Requires: %{name}-imm-libs = %{version}-%{release}
Requires: %{name}-log-libs = %{version}-%{release}
Requires: %{name}-ntf-libs = %{version}-%{release}
%if %is_ais_plm
Requires: %{name}-plm-libs = %{version}-%{release}
Requires: %{name}-plm-coordinator = %{version}-%{release}
%endif
%if %is_ais_ckpt
Requires: %{name}-ckpt-libs = %{version}-%{release}
%endif
%if %is_ais_evt
Requires: %{name}-evt-libs = %{version}-%{release}
%endif
%if %is_ais_lck
Requires: %{name}-lck-libs = %{version}-%{release}
%endif
%if %is_ais_msg
Requires: %{name}-msg-libs = %{version}-%{release}
%endif
%if %is_ais_smf
Requires: %{name}-smf-libs = %{version}-%{release}
%endif
%description python
%endif
%if %is_tests
%package tests
Group: Development/Libraries
Summary: The OpenSAF test programs
Requires: %{name}-controller = %{version}-%{release}
%description tests
%endif
%prep
%setup -q
%if %is_python
%define major_version %(echo @PYTHON_VERSION@ | head -c1)
grep -rE "^#!(.+?)python$" %{_topdir}/BUILD | cut -d ':' -f 1 | xargs -I '{}' sed -i '1 s/python$/python%major_version/g' '{}'
%endif
%build
%configure @ac_configure_args@
%{__make} %{?_smp_mflags}
%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT
%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/*.la
%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/libopensaf_core.so
%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/libopensaf_core.a
%{__rm} -rf $RPM_BUILD_ROOT%{_pkglibdir}/*.la
%{__rm} -rf $RPM_BUILD_ROOT%{_pkglibdir}/*.a
%{__rm} -rf $RPM_BUILD_ROOT%{_pkglibdir}/*.so
%{__rm} -rf $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%pre
getent group %{opensaf_group} > /dev/null || groupadd -r %{opensaf_group}
getent passwd %{opensaf_user} > /dev/null || \
useradd -r -g %{opensaf_user} -d %{_pkgdatadir} -s /sbin/nologin -c "OpenSAF" %{opensaf_user}
if ! grep %{opensaf_user} /etc/sudoers > /dev/null; then
echo '%{opensaf_user} ALL = NOPASSWD: /sbin/reboot, /sbin/shutdown, /sbin/tipc-config, /usr/bin/pkill, /usr/bin/killall' >> /etc/sudoers
echo 'Defaults:%opensaf !requiretty' >> /etc/sudoers
echo 'Defaults:opensaf !requiretty' >> /etc/sudoers
fi
exit 0
%post
# $1 == 1 (install), $1 == 2 (upgrade)
if [ $1 -gt 1 ]; then
%if %use_systemd
/bin/systemctl try-restart opensafd.service
%else
/sbin/service opensafd try-restart >/dev/null 2>&1 || :
%endif
else
%if %use_systemd
%_systemd_post opensafd.service
%else
/usr/lib/lsb/install_initd %{_initddir}/opensafd
%endif
fi
%preun
# $1 == 1 (upgrade), $1 == 0, (uninstall)
if [ $1 = 0 ]; then
%if %use_systemd
%_systemd_preun opensafd.service
%else
/sbin/service opensafd stop >/dev/null 2>&1 || :
/usr/lib/lsb/remove_initd %{_initddir}/opensafd
sed -i '/%{opensaf_user}/d' /etc/sudoers
%endif
fi
%post amf-libs -p /sbin/ldconfig
%postun amf-libs -p /sbin/ldconfig
%if %is_ais_plm
%post plm-libs -p /sbin/ldconfig
%postun plm-libs -p/sbin/ldconfig
%if %is_ais_plm
%post plm-coordinator
# $1 == 1 (install), $1 == 2 (upgrade)
if [ $1 -gt 1 ]; then
echo "" >/dev/null 2>&1 || :
else
%if %use_systemd
%_systemd_post plmcboot.service
%_systemd_post plmcd.service
%else
/usr/lib/lsb/install_initd %{_initddir}/plmcboot
/usr/lib/lsb/install_initd %{_initddir}/plmcd
%endif
fi
%preun plm-coordinator
# $1 == 1 (upgrade), $1 == 0, (uninstall)
if [ $1 = 0 ]; then
%if %use_systemd
%_systemd_preun plmcboot.service
%_systemd_preun plmcd.service
%else
/usr/lib/lsb/remove_initd %{_initddir}/plmcboot
/usr/lib/lsb/remove_initd %{_initddir}/plmcd
%endif
fi
%endif
%if %is_immxml
%post plm-hpi
/sbin/ldconfig
sed -i '/isHpiSupported/{N;s|<value>0</value>|<value>1</value>|g}' \
%{_pkgimmxml_svcdir}/plmsv_objects.xml
%endif
%postun plm-hpi -p /sbin/ldconfig
%endif
%if %is_ais_ckpt
%post ckpt-libs -p /sbin/ldconfig
%postun ckpt-libs -p /sbin/ldconfig
%endif
%post clm-libs -p /sbin/ldconfig
%postun clm-libs -p /sbin/ldconfig
%if %is_ais_evt
%post evt-libs -p /sbin/ldconfig
%postun evt-libs -p /sbin/ldconfig
%endif
%post imm-libs -p /sbin/ldconfig
%postun imm-libs -p /sbin/ldconfig
%if %is_ais_lck
%post lck-libs -p /sbin/ldconfig
%postun lck-libs -p /sbin/ldconfig
%endif
%post log-libs -p /sbin/ldconfig
%postun log-libs -p /sbin/ldconfig
%if %is_ais_msg
%post msg-libs -p /sbin/ldconfig
%postun msg-libs -p /sbin/ldconfig
%endif
%post ntf-libs -p /sbin/ldconfig
%postun ntf-libs -p /sbin/ldconfig
%if %is_ais_smf
%post smf-libs -p /sbin/ldconfig
%postun smf-libs -p /sbin/ldconfig
%endif
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%post controller
%if !%is_ais_plm
sed -i '/plmd/d' %{_pkgsysconfdir}/nodeinit.conf.controller
%endif
# $1 == 1 (install), $1 == 2 (upgrade)
if [ $1 = 1 ] || [ $1 = 2 ]; then
echo "controller" > %{_pkgsysconfdir}/node_type
hostname -s > %{_pkgsysconfdir}/node_name
fi
/sbin/ldconfig
%preun controller
# $1 == 1 (upgrade), $1 == 0, (uninstall)
%postun controller -p /sbin/ldconfig
%post payload
# $1 == 1 (install), $1 == 2 (upgrade)
if [ $1 = 1 ] || [ $1 = 2 ]; then
echo "payload" > %{_pkgsysconfdir}/node_type
hostname -s > %{_pkgsysconfdir}/node_name
fi
/sbin/ldconfig
%preun payload
# $1 == 1 (upgrade), $1 == 0, (uninstall)
%postun payload -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING.LIB INSTALL NEWS THANKS
%doc README 00-README.uml 00-README.conf 00-README.debug
%dir %{_pkglibdir}
%dir %{_pkgsysconfdir}
%attr(-,%{opensaf_user},%{opensaf_group}) %dir %{_localstatedir}/lib/%{name}
%attr(-,%{opensaf_user},%{opensaf_group}) %dir %{_localstatedir}/log/%{name}
%attr(-,%{opensaf_user},%{opensaf_group}) %dir %{_localstatedir}/run/%{name}
%config(noreplace) %{_pkgsysconfdir}/chassis_id
%config(noreplace) %{_pkgsysconfdir}/slot_id
%config(noreplace) %{_pkgsysconfdir}/subslot_id
%config(noreplace) %{_pkgsysconfdir}/node_type
%config(noreplace) %{_pkgsysconfdir}/node_name
%config %{_pkgsysconfdir}/osafdir.conf
%config %{_pkgsysconfdir}/nid.conf
%if %use_systemd
%config %_unitdir/opensafd.service
%endif
%config %{_initddir}/opensafd
%{_pkglibdir}/opensafd
%{_pkglibdir}/opensaf_reboot
%{_pkglibdir}/opensaf_scale_out
%{_pkglibdir}/plm_scale_out
%{_pkglibdir}/opensaf_sc_active
%{_pkglibdir}/configure_tipc
%{_pkglibdir}/tipc-config
%files amf-libs
%defattr(-,root,root)
%{_libdir}/libSaAmf.so.*
%{_pkglibdir}/libamf_common.so.*
%files amf-director
%defattr(-,root,root)
%dir %{_pkgsysconfdir}
%dir %{_pkglibdir}
%dir %{_pkgclcclidir}
%dir %{_pkgdatadir}
%if %is_immxml
%dir %{_pkgimmxml_svcdir}
%dir %{_pkgimmxmldir}
%endif
%config(noreplace) %{_pkgsysconfdir}/amfd.conf
%{_pkglibdir}/osafamfd
%{_pkgclcclidir}/osaf-amfd
%if %is_immxml
%{_pkgimmxml_svcdir}/amf_classes.xml
%{_pkgimmxml_svcdir}/amf_objects.xml
%{_pkgimmxml_svcdir}/amfwdog_pl_template.xml
%{_pkgimmxml_svcdir}/amfwdog_sc_template.xml
%{_pkgimmxml_svcdir}/amfwdog_objects.xml
%endif
%files amf-nodedirector
%defattr(-,root,root)
%dir %{_pkgsysconfdir}
%dir %{_pkglibdir}
%dir %{_pkgclcclidir}
%config(noreplace) %{_pkgsysconfdir}/amfnd.conf
%config(noreplace) %{_pkgsysconfdir}/amfwdog.conf
%{_pkglibdir}/osafamfnd
%{_pkgclcclidir}/osaf-amfnd
%{_pkglibdir}/osafamfwd