forked from cern-eos/eos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eos.spec.in
977 lines (856 loc) · 29.4 KB
/
eos.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
#-------------------------------------------------------------------------------
# Helper macros and variables
#-------------------------------------------------------------------------------
%define _unpackaged_files_terminate_build 0
%define devtoolset devtoolset-8
%define cmake cmake3
%define debug_package %{nil}
%global __os_install_post %{nil}
# By default we build the eos client SRPMS, if the entire build is required
# then pass the "--with server" flag to the rpmbuild command
%bcond_without server
# By default we build without clang. To enable it,
# then pass the "--with clang" flag to the rpmbuild command
%bcond_with clang
# By default we build without AddressSanitizer. To enable it,
# pass the "--with asan" flag to the rpmbuild command
%bcond_with asan
# By default we build without ThreadSanitizer. To enable it,
# pass the "--with tsan" flag to the rpmbuild command
%bcond_with tsan
# By default we build without code coverage. To enable it,
# pass the "--with coverage" flag to the rpmbuild command
%bcond_with coverage
# By default we don't use eosxrootd for EL7
%bcond_with eos_xrootd_rh
# By default we allow sse instruction set
%bcond_with no_sse
# By default build without eos-grpc-gateway support
%bcond_with eos_grpc_gateway
# Define required dependencies
%define eos_xrootd_version_min 0:5.6.9
%define xrootd_version_min 1:5.6.9
%define eos_grpc_version 1.56.1
%define eos_rocksdb_version 8.8.1
%define major_version @CPACK_PACKAGE_VERSION_MAJOR@
%define release_version @CPACK_PACKAGE_RELEASE@
# releases for el 7,8 or 9 distributions enable automatically to build with eos-xrootd
%if 0%{?rhel} >= 7 && 0%{?rhel} <= 9
%define _with_eos_xrootd_rh 1
%endif
%define __python /usr/bin/python3
#-------------------------------------------------------------------------------
# Compute additional macros based on environment or existing definitions
#-------------------------------------------------------------------------------
%define compiler gcc
%if %{?_with_clang:1}%{!?_with_clang:0}
%define compiler clang
%endif
#-------------------------------------------------------------------------------
# Package definitions
#-------------------------------------------------------------------------------
Summary: The EOS project
Name: @CPACK_PACKAGE_NAME@
Version: @CPACK_PACKAGE_VERSION@
Release: @CPACK_PACKAGE_RELEASE@%{dist}%{?_with_asan:.asan}%{?_with_tsan:.tsan}
Prefix: /usr
License: none
Group: Applications/File
Source: %{name}-%{version}-@[email protected]
BuildRoot: %{_tmppath}/%{name}-root
# Add EPEL repository explicitly which holds many of the other dependencies
%if 0%{?rhel} >= 7 && 0%{?rhel} <= 9
BuildRequires: epel-release
Requires: epel-release
%endif
# For asan/tsan builds we need devtoolset-9
%if %{?_with_asan:1}%{!?_with_asan:0} || %{?_with_tsan:1}%{!?_with_tsan:0}
%define devtoolset devtoolset-9
%endif
%if %{?_with_asan:1}%{!?_with_asan:0}
%if 0%{?rhel} == 7
BuildRequires: libasan5, %{devtoolset}-libasan-devel
Requires: libasan5
%else
BuildRequires: libasan
Requires: libasan
%endif
%endif
%if %{?_with_tsan:1}%{!?_with_tsan:0}
%if 0%{?rhel} == 7
BuildRequires: libtsan, %{devtoolset}-libtsan-devel
Requires: libtsan
%else
BuildRequires: libtsan
Requires: libtsan
%endif
%endif
# Select xrootd package
%if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0}
# Install eos-xrootd
%if 0%{?rhel} >= 7 && 0%{?rhel} <= 9
BuildRequires: eos-xrootd == %{eos_xrootd_version_min}
# Don't put an explicit dependency on xrootd because eos-xrootd hides the
# shared libraries from provide. Make sure we don't exclude any EOS specific
# libraries.
%global __requires_exclude ^libXrdCl.*$|^libXrdHttp.*$|^libXrdPosix.*$|^libXrdServer.*$|^libXrdSsiLib.*$|^libXrdUtils.*$|^libXrdXml.*$|^libXrdCrypto.*$
%else
# Add default xrootd dependencies
BuildRequires: xrootd >= %{xrootd_version_min}
BuildRequires: xrootd-client-devel >= %{xrootd_version_min}
BuildRequires: xrootd-server-devel >= %{xrootd_version_min}
BuildRequires: xrootd-private-devel >= %{xrootd_version_min}
%endif
%else
# Add default xrootd dependencies
BuildRequires: xrootd >= %{xrootd_version_min}
BuildRequires: xrootd-client-devel >= %{xrootd_version_min}
BuildRequires: xrootd-server-devel >= %{xrootd_version_min}
BuildRequires: xrootd-private-devel >= %{xrootd_version_min}
%endif
# Add eos-grpc dependencies
BuildRequires: eos-grpc = %{eos_grpc_version}
BuildRequires: eos-grpc-devel = %{eos_grpc_version}
BuildRequires: eos-grpc-plugins = %{eos_grpc_version}
# Don't put an explicit dependency on libraries provided by eos-grpc because
# the package hides shared libraries from the list of provided capabilities.
%global __requires_exclude %{__requires_exclude}|^libprot.*$|^libabsl.*$|^libgrpc.*$|^libaddress_sorting.*$|^libre2.*$|^libgpr.*$|^libupb.*$
%if %{?_with_eos_grpc_gateway:1}%{!?_with_eos_grpc_gateway:0}
BuildRequires: eos-grpc-gateway
Requires: eos-grpc-gateway
%endif
BuildRequires: %{cmake} >= 3.17
BuildRequires: git, readline-devel
BuildRequires: openssl, openssl-devel
BuildRequires: ncurses, ncurses-devel
BuildRequires: zlib, zlib-devel
BuildRequires: fuse-devel, fuse >= 2.5
BuildRequires: fuse3-devel, fuse3 >= 3.0
BuildRequires: krb5-devel
BuildRequires: redhat-rpm-config
BuildRequires: libattr-devel, xfsprogs-devel
BuildRequires: gcc gcc-c++
BuildRequires: jsoncpp, jsoncpp-devel
BuildRequires: jemalloc, jemalloc-devel
BuildRequires: glibc-headers
BuildRequires: binutils-devel
BuildRequires: help2man
BuildRequires: libzstd-devel
BuildRequires: lz4-devel
BuildRequires: bzip2-devel
BuildRequires: snappy-devel
Requires: libzstd, zstd, lz4, snappy
BuildRequires: libcap-devel
BuildRequires: gflags gflags-devel
BuildRequires: systemd
BuildRequires: fmt-devel
%if %{?rhel:1}%{!?rhel:0} && 0%{?rhel} <= 7
BuildRequires: openssl-static, ncurses-static
%endif
%if %{?_with_server:1}%{!?_with_server:0}
BuildRequires: eos-rocksdb = %{eos_rocksdb_version}
BuildRequires: openldap-devel
BuildRequires: e2fsprogs-devel
BuildRequires: eos-libmicrohttpd, eos-libmicrohttpd-devel >= 0.9.38
%endif
BuildRequires: eos-grpc = %{eos_grpc_version}
BuildRequires: eos-grpc-devel = %{eos_grpc_version}
BuildRequires: eos-grpc-plugins = %{eos_grpc_version}
Requires: eos-grpc = %{eos_grpc_version}
BuildRequires: bzip2-devel
Requires: bzip2-devel
BuildRequires: elfutils-devel
Requires: elfutils-devel
BuildRequires: procps-ng-devel >= 3.3.10, procps-ng-devel < 4.0.0
Requires: procps-ng >= 3.3.10, procps-ng < 4.0.0
BuildRequires: zlib-static,
BuildRequires: libcurl, libcurl-devel
BuildRequires: libuuid-devel, sparsehash-devel
BuildRequires: zeromq, zeromq-devel
BuildRequires: libevent, libevent-devel
BuildRequires: bzip2-devel
Requires: bzip2
# ISA-L[_crypto], XXHash and scitokens dependencies for CC7 and CS8/9
%if %{?_with_server:1}%{!?_with_server:0}
%if 0%{?rhel} >= 7 && 0%{?rhel} <= 9
BuildRequires: scitokens-cpp-devel
Requires: scitokens-cpp
BuildRequires: xxhash-devel
Requires: xxhash-libs
%if 0%{?rhel} == 7
BuildRequires: libisa-l-devel, libisa-l_crypto-devel
Requires: libisa-l, libisa-l_crypto
%endif
%endif
%endif
# Install newer gcc on CC7
%if 0%{?rhel} == 7
BuildRequires: centos-release-scl
%endif
%if "%{compiler}" == "gcc"
%if 0%{?rhel} == 7
BuildRequires: %{devtoolset}
BuildRequires: %{devtoolset}-binutils-devel
%else
BuildRequires: binutils-devel
%endif
%if 0%{?rhel} >= 7 && 0%{?rhel} <= 9
# We want swap-support on eosxd - requires rocksdb KV
BuildRequires: eos-rocksdb = %{eos_rocksdb_version}
%endif
%endif
%if "%{compiler}" == "clang"
BuildRequires: clang
BuildRequires: libatomic
Requires: libatomic
%if 0%{?rhel} == 7
BuildRequires: llvm-toolset-7.0
BuildRequires: llvm-toolset-7.0-compiler-rt
%else
%if 0%{?fedora} >= 38
BuildRequires: compiler-rt
%endif
%endif
%endif
%description
The EOS software package.
%prep
%setup -n %{name}-%{version}-@CPACK_PACKAGE_RELEASE@
%global build_type RelWithDebInfo
%global build_flags -DBUILD_MANPAGES=1
%if %{?_with_server:0}%{!?_with_server:1}
%global build_flags %{build_flags} -DCLIENT=1
%endif
%if %{?_with_asan:1}%{!?_with_asan:0}
%global build_flags %{build_flags} -DASAN=1
%endif
%if %{?_with_tsan:1}%{!?_with_tsan:0}
%global build_flags %{build_flags} -DTSAN=1
%endif
%if %{?_with_coverage:1}%{!?_with_coverage:0}
%global build_type Debug
%global build_flags %{build_flags} -DCOVERAGE=1 -DCOV_CROSS_PROFILE=1
%endif
%if %{?_with_no_sse:1}%{!?_with_no_sse:0}
%global build_flags %{build_flags} -DNO_SSE=1
%endif
%build
# On C8 we install a custom version of cmake that supports all the required
# features needed by EOS i.e. >= 3.14.
test -e $RPM_BUILD_ROOT && rm -r $RPM_BUILD_ROOT
mkdir -p build
cd build
%if "%{?compiler}" == "gcc"
%if 0%{?rhel} == 7
source /opt/rh/%{devtoolset}/enable
%endif
%if 0%{?rhel} >= 7 && 0%{?rhel} <= 9
%{cmake} ../ -DRELEASE=@CPACK_PACKAGE_RELEASE@ -DCMAKE_BUILD_TYPE=%{build_type} -DXROOTD_ROOT=/opt/eos/xrootd/ %{build_flags}
%else
%{cmake} ../ -DRELEASE=@CPACK_PACKAGE_RELEASE@ -DCMAKE_BUILD_TYPE=%{build_type} %{build_flags}
%endif
%else
%if 0%{?rhel} == 7
source /opt/rh/llvm-toolset-7.0/enable
env QA_RPATHS=3 CC=clang CXX=clang++ %{cmake} ../ -DRELEASE=@CPACK_PACKAGE_RELEASE@ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_RPATH=/lib64/:/usr/lib64/ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=true -DXROOTD_ROOT=/opt/eos/xrootd/ %{build_flags}
%else
CC=clang CXX=clang++ %{cmake} ../ -DRELEASE=@CPACK_PACKAGE_RELEASE@ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=true %{build_flags}
%endif
%endif
%{__make} %{_smp_mflags}
%install
# We have to activate devtoolset in install section as well, since the generation
# of debuginfo happens here. "make install" will still remember to use devtoolset,
# but find-debuginfo.sh will not, resulting in a debuginfo package that is corrupted
# and may cause GDB to crash.
%if "%{?compiler}" == "gcc"
%if 0%{?rhel} == 7
source /opt/rh/%{devtoolset}/enable
%endif
%endif
cd build
%{__make} install DESTDIR=$RPM_BUILD_ROOT
export QA_RPATHS=3
echo "Installed!"
%clean
rm -rf $RPM_BUILD_ROOT
%if %{?_with_server:1}%{!?_with_server:0}
#-------------------------------------------------------------------------------
# Package eos-server
#-------------------------------------------------------------------------------
%package -n eos-server
Summary: The EOS server installation
Group: Applications/File
ExclusiveArch: x86_64 aarch64
# Select xrootd package
%if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0}
# Install eos-xrootd
%if 0%{?rhel} >= 7 && 0%{?rhel} <= 9
Requires: eos-xrootd = %{eos_xrootd_version_min}
%else
Requires: xrootd >= %{xrootd_version_min}
Requires: xrootd-client >= %{xrootd_version_min}
%endif
%else
Requires: xrootd >= %{xrootd_version_min}
Requires: xrootd-client >= %{xrootd_version_min}
%endif
%if %{?_with_eos_grpc_gateway:1}%{!?_with_eos_grpc_gateway:0}
Requires: eos-grpc-gateway
%endif
Requires: eos-client = @CPACK_PACKAGE_VERSION@
Requires: eos-libmicrohttpd >= 0.9.38
Requires: acl
Requires: gdb
Requires: jemalloc
Requires: jsoncpp
Requires: psmisc
Requires: libcurl
Requires: logrotate
Requires: redis
Requires: eos-grpc = %{eos_grpc_version}
Requires: systemd
BuildRequires: zeromq, zeromq-devel
Requires: zeromq
BuildRequires: eos-folly = 2019.11.11.00
Requires: eos-folly = 2019.11.11.00
BuildRequires: perl-generators
%description -n eos-server
The EOS server installation containing MGM, FST & MQ service.
%files -n eos-server
%defattr(-, root, root, -)
%{_bindir}/eos-ns-convert-to-locality-hashes
%{_sbindir}/eos-tty-broadcast
%{_sbindir}/eosfstregister
%{_sbindir}/eosfstinfo
%{_sbindir}/eosadmin
%{_sbindir}/eos-iam-mapfile
%{_sbindir}/eos-check-blockxs
%{_sbindir}/eos-udp-dumper
%{_sbindir}/eos-compute-blockxs
%{_sbindir}/eos-scan-fs
%{_sbindir}/eos-adler32
%{_sbindir}/eos-checksum
%{_sbindir}/eos-mmap
%{_sbindir}/eos-repair-tool
%{_sbindir}/eos-ioping
%{_sbindir}/eos-fmd-tool
%{_sbindir}/eos-rain-hd-dump
%{_sbindir}/eos-rain-check
%{_sbindir}/eos-filter-stacktrace
%{_sbindir}/eos-status
%{_libdir}/libEosCommonServer.so.%{version}
%{_libdir}/libEosCommonServer.so.%{major_version}
%{_libdir}/libEosCommonServer.so
%{_libdir}/libEosFstIo.so.%{version}
%{_libdir}/libEosFstIo.so.%{major_version}
%{_libdir}/libEosFstIo.so
%{_libdir}/libEosNsCommon.so.%{version}
%{_libdir}/libEosNsCommon.so.%{major_version}
%{_libdir}/libEosNsCommon.so
%{_libdir}/libEosAuthOfs.so
%{_libdir}/libEosFstOss.so
%{_libdir}/libEosFstHttp.so
%{_libdir}/libXrdEosFst-*.so
%{_libdir}/libXrdEosMgm-*.so
%{_libdir}/libEosMgmHttp-*.so
%{_libdir}/libXrdMqOfs-*.so
%{_libdir}/libEosNsQuarkdb.so
%config(noreplace) %{_sysconfdir}/xrd.cf.fst
%config(noreplace) %{_sysconfdir}/xrd.cf.mgm
%config(noreplace) %{_sysconfdir}/xrd.cf.mq
%config(noreplace) %{_sysconfdir}/xrd.cf.global-mq
%config(noreplace) %{_sysconfdir}/xrd.cf.sync
%config(noreplace) %{_sysconfdir}/xrd.cf.fed
%config(noreplace) %{_sysconfdir}/xrd.cf.prefix
%config(noreplace) %{_sysconfdir}/xrd.cf.quarkdb
%config(noreplace) %{_sysconfdir}/eos/config/mgm/mgm
%config(noreplace) %{_sysconfdir}/eos/config/mgm/mgm.modules
%config(noreplace) %{_sysconfdir}/eos/config/mq/mq
%config(noreplace) %{_sysconfdir}/eos/config/fst/fst
%config(noreplace) %{_sysconfdir}/eos/config/generic/all
%config(noreplace) %{_sysconfdir}/eos/config/qdb/qdb
%config(noreplace) %{_sysconfdir}/eos/config/modules/alice
%config %{_sysconfdir}/sysconfig/eos_env.example
%{_prefix}/lib/systemd/system/eos.target
%{_prefix}/lib/systemd/system/eos.service
%{_prefix}/lib/systemd/system/[email protected]
%{_prefix}/lib/systemd/system/[email protected]
%{_prefix}/lib/systemd/system/[email protected]
%{_prefix}/lib/systemd/system/[email protected]
%{_prefix}/lib/systemd/system/[email protected]
%{_prefix}/lib/systemd/system/[email protected]
%{_prefix}/lib/systemd/system/[email protected]
%{_prefix}/lib/systemd/system/eos5.service
%{_sbindir}/eos_start_pre.sh
%{_sbindir}/eos_start.sh
%config(noreplace) %{_sysconfdir}/cron.d/eos-logs
%config(noreplace) %{_sysconfdir}/cron.d/eos-reports
%config(noreplace) %{_sysconfdir}/logrotate.d/eos-logs
%dir %attr(700,daemon,daemon) %{_localstatedir}/eos
%dir %attr(700,daemon,daemon) %{_localstatedir}/eos/html
%dir %attr(700,daemon,daemon) %{_localstatedir}/eos/qos
%dir %attr(700,daemon,daemon) %{_localstatedir}/eos/wfe
%dir %attr(700,daemon,daemon) %{_localstatedir}/eos/wfe/bash/
%dir %attr(700,daemon,daemon) %{_localstatedir}/eos/ns-queue
%dir %attr(700,daemon,daemon) %{_localstatedir}/eos/ns-queue/default
%dir %attr(755,daemon,daemon) %{_localstatedir}/log/eos
%dir %attr(755,daemon,daemon) %{_localstatedir}/log/eos/tx
%attr(644,daemon,daemon) %{_localstatedir}/eos/html/error.html
%attr(644,daemon,daemon) %{_localstatedir}/eos/qos/qos.conf
%attr(555,daemon,daemon) %{_localstatedir}/eos/wfe/bash/shell
%post -n eos-server
if [ ! -f /etc/sysconfig/eos-yum-noscripts ]; then
echo "Starting conditional EOS services"
sleep 2
systemctl daemon-reload > /dev/null 2>&1 || :
systemctl --no-legend list-units eos@* | grep -v q*db | awk '{print $1}' | xargs -n1 systemctl restart || :
fi
%preun -n eos-server
if [ ! -f /etc/sysconfig/eos-yum-noscripts ]; then
if [ $1 = 0 ]; then
echo "Stopping EOS services"
systemctl stop eos@* > /dev/null 2>&1 || :
fi
fi
#-------------------------------------------------------------------------------
# Package eos-ns-inspect
#-------------------------------------------------------------------------------
%package -n eos-ns-inspect
Summary: EOS namespace inspection tool for instance administrators
Group: Applications/File
ExclusiveArch: x86_64 aarch64
# Select xrootd package
%if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0}
# Install eos-xrootd
%if 0%{?rhel} >= 7 && 0%{?rhel} <= 9
Requires: eos-xrootd = %{eos_xrootd_version_min}
%else
Requires: xrootd-client >= %{xrootd_version_min}
%endif
%else
Requires: xrootd-client >= %{xrootd_version_min}
%endif
Requires: eos-grpc = %{eos_grpc_version}
BuildRequires: eos-folly = 2019.11.11.00
Requires: eos-folly = 2019.11.11.00
%description -n eos-ns-inspect
EOS namespace inspection tool for instance administrators
%files -n eos-ns-inspect
%defattr(-, root, root, -)
%{_bindir}/eos-ns-inspect
%{_bindir}/eos-config-inspect
%{_bindir}/eos-fid-to-path
%{_bindir}/eos-inode-to-fid
%endif
#-------------------------------------------------------------------------------
# Package eos-client
#-------------------------------------------------------------------------------
%package -n eos-client
Summary: The EOS shell client
Group: Applications/File
ExclusiveArch: x86_64 aarch64
Requires: zeromq
Requires: squashfs-tools
Requires: elfutils
Requires: eos-grpc = %{eos_grpc_version}
Requires: systemd
# Select xrootd package
%if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0}
# Install eos-xrootd
%if 0%{?rhel} >= 7 && 0%{?rhel} <= 9
Requires: eos-xrootd = %{eos_xrootd_version_min}
%else
Requires: xrootd-client >= %{xrootd_version_min}
%endif
%else
Requires: xrootd-client >= %{xrootd_version_min}
%endif
%description -n eos-client
The EOS shell client.
%files -n eos-client
%defattr(-, root, root, -)
%{_bindir}/eos
%{_bindir}/eoscp
%{_libdir}/libXrdMqClient.so.%{version}
%{_libdir}/libXrdMqClient.so.%{major_version}
%{_libdir}/libXrdMqClient.so
%{_libdir}/libEosCommon.so.%{version}
%{_libdir}/libEosCommon.so.%{major_version}
%{_libdir}/libEosCommon.so
%{_sysconfdir}/bash_completion.d/eos
%{_sysconfdir}/fuse.conf.eos
# Documentation
%doc %{_mandir}/man1/
#-------------------------------------------------------------------------------
# Package eos-fusex
#-------------------------------------------------------------------------------
%package -n eos-fusex
Summary: The new EOS fuse client
Group: Applications/File
ExclusiveArch: x86_64 aarch64
Requires: eos-fusex-core = @CPACK_PACKAGE_VERSION@
Requires: eos-fusex-selinux = @CPACK_PACKAGE_VERSION@
Requires: fuse3
Obsoletes: eos-fuse <= %{version}
Obsoletes: eos-fuse-core <= %{version}
Obsoletes: eos-fuse-sysv <= %{version}
%description -n eos-fusex
The new EOS fuse client bundle.
%files -n eos-fusex
%defattr(-, root, root, -)
#-------------------------------------------------------------------------------
# Package eos-fusex-core
#-------------------------------------------------------------------------------
%package -n eos-fusex-core
Summary: The new EOS fuse client
Group: Applications/File
ExclusiveArch: x86_64 aarch64
# Select xrootd package
%if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0}
# Install eos-xrootd
%if 0%{?rhel} >= 7 || 0%{?rhel} <= 9
Requires: eos-xrootd = %{eos_xrootd_version_min}
%else
Requires: xrootd-client >= %{xrootd_version_min}
%endif
%else
Requires: xrootd-client >= %{xrootd_version_min}
%endif
Requires: eos-client = @CPACK_PACKAGE_VERSION@
Requires: fuse
Requires: jemalloc
Requires: attr
Requires: zeromq
%description -n eos-fusex-core
The EOS fuse core containing eosxd/eosxd3.
%files -n eos-fusex-core
%defattr(-, root, root, -)
%{_bindir}/eosxd
%{_bindir}/eosxd3
%{_bindir}/eosfusebind
%{_sbindir}/mount.eosx
%{_sbindir}/mount.eosx3
%{_tmpfilesdir}/eos-fusex-core.conf
%{_sysconfdir}/logrotate.d/eos-fusex-logs
%dir %attr(755,daemon,daemon) %{_localstatedir}/log/eos/
%dir %attr(755,daemon,daemon) %{_localstatedir}/log/eos/fusex/
%dir %attr(755,daemon,daemon) %{_localstatedir}/cache/eos/
%dir %attr(755,daemon,daemon) %{_localstatedir}/cache/eos/fusex/
%post -n eos-fusex-core
# Ensure /var/run/eos creation
systemd-tmpfiles --create %{_tmpfilesdir}/eos-fusex-core.conf || true
#-------------------------------------------------------------------------------
# Package eos-fusex-selinux
#-------------------------------------------------------------------------------
%package -n eos-fusex-selinux
Summary: The new EOS fuse client selinux configuration
Group: Applications/File
ExclusiveArch: x86_64 aarch64
%description -n eos-fusex-selinux
The new EOS fuse core containing selinux definitions.
%files -n eos-fusex-selinux
%defattr(-, root, root, -)
/usr/share/selinux/targeted/eosfuse.pp
/usr/share/selinux/mls/eosfuse.pp
/usr/share/selinux/strict/eosfuse.pp
%post -n eos-fusex-selinux
if [ "$1" -le "1" ]; then # First install
# Note: don't push bash variables between {} since they will be empty!!!
for VARIANT in mls strict targeted
do
/usr/sbin/semodule -i %{_datarootdir}/selinux/$VARIANT/eosfuse.pp || :
done
fi
%preun -n eos-fusex-selinux
if [ "$1" -eq "0" ]; then # Final removal
/usr/sbin/semodule -r eosfuse || :
fi
%postun -n eos-fusex-selinux
if [ "$1" -ge "1" ]; then # Upgrade
for VARIANT in mls strict targeted
do
/usr/sbin/semodule -i %{_datarootdir}/selinux/$VARIANT/eosfuse.pp || :
done
fi
%if %{?_with_server:1}%{!?_with_server:0}
#-------------------------------------------------------------------------------
# Package eos-cfsd
#-------------------------------------------------------------------------------
%package -n eos-cfsd
Summary: The new EOS client filesystem daemon
Group: Applications/File
ExclusiveArch: x86_64 aarch64
# Select xrootd package
%if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0}
# Install eos-xrootd
%if 0%{?rhel} >= 7 || 0%{?rhel} <= 9
Requires: eos-xrootd == %{eos_xrootd_version_min}
%else
Requires: xrootd-client >= %{xrootd_version_min}
%endif
%else
Requires: xrootd-client >= %{xrootd_version_min}
%endif
Requires: eos-client = @CPACK_PACKAGE_VERSION@
Requires: fuse3
Requires: jemalloc
Requires: autofs
%description -n eos-cfsd
The new EOS client filesystem daemon
%files -n eos-cfsd
%defattr(-, root, root, -)
%{_bindir}/eoscfsd
%{_sbindir}/mount.eoscfs
%{_sbindir}/umount.fuse
%config(noreplace) %{_sysconfdir}/eos/cfsd/eoscfsd.conf
%config(noreplace) %{_sysconfdir}/auto.cfsd
%config(noreplace) %{_sysconfdir}/auto.master.d/auto.cfsd
%dir %attr(755,daemon,daemon) %{_localstatedir}/log/eos/
%dir %attr(755,daemon,daemon) %{_localstatedir}/log/eos/cfsd/
%dir %attr(755,daemon,daemon) %{_localstatedir}/cache/eos/
%dir %attr(755,daemon,daemon) %{_localstatedir}/cache/eos/cfsd/
#-------------------------------------------------------------------------------
# Package eos-quarkdb
#-------------------------------------------------------------------------------
%package -n eos-quarkdb
Summary: EOS QuarkDB package
Group: Applications/File
Obsoletes: quarkdb <= 0.4.2
Requires: lz4-devel, lz4, elfutils-devel, jemalloc
# Select xrootd package
%if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0}
# Install eos-xrootd
%if 0%{?rhel} >= 7 && 0%{?rhel} <= 9
Requires: eos-xrootd = %{eos_xrootd_version_min}
%else
Requires: xrootd-server >= %{xrootd_version_min}
%endif
%else
Requires: xrootd-server >= %{xrootd_version_min}
%endif
%description -n eos-quarkdb
EOS Quarkdb package
%files -n eos-quarkdb
%defattr(-, root, root, -)
%{_libdir}/libXrdQuarkDB.so
%{_bindir}/quarkdb-tests
%{_bindir}/quarkdb-stress-tests
%{_bindir}/quarkdb-sudo-tests
%{_bindir}/quarkdb-bench
%{_bindir}/quarkdb-create
%{_bindir}/quarkdb-ldb
%{_bindir}/quarkdb-recovery
%{_bindir}/quarkdb-server
%{_bindir}/quarkdb-sst-inspect
%{_bindir}/quarkdb-validate-checkpoint
#-------------------------------------------------------------------------------
# Package eos-testkeytab
#-------------------------------------------------------------------------------
%package -n eos-testkeytab
Summary: The EOS testkeytab package
Group: Applications/File
ExclusiveArch: x86_64 aarch64
Requires: shadow-utils
%description -n eos-testkeytab
Contains an example keytab file and create the eosnobody ans eosdev users
%files -n eos-testkeytab
%config(noreplace) %attr(-, daemon, daemon) %{_sysconfdir}/eos.keytab
%config(noreplace) %attr(-, daemon, daemon) %{_sysconfdir}/eos.client.keytab
%post -n eos-testkeytab
getent passwd eosnobody || useradd eosnobody
getent passwd eosdev || useradd eosdev
#-------------------------------------------------------------------------------
# Package eos-archive only for >= CC7
#-------------------------------------------------------------------------------
%if 0%{?rhel} >= 7
%package -n eos-archive
Summary: The EOS archive daemon
Group: Applications/File
ExclusiveArch: x86_64 aarch64
BuildRequires: python%{python3_pkgversion}-devel
%if 0%{?rhel} == 7
Requires: python36-zmq
%else
Requires: python3-zmq
%if 0%{?rhel} == 9
BuildRequires: python-rpm-macros
%endif
%endif
Requires: python3 python3-fusepy
# Select xrootd package
%if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0}
# Install eos-xrootd
%if 0%{?rhel} >= 7 && 0%{?rhel} <= 9
Requires: eos-xrootd = %{eos_xrootd_version_min}
%else
Requires: xrootd-python >= %{xrootd_version_min}
%endif
%else
Requires: xrootd-python >= %{xrootd_version_min}
%endif
%description -n eos-archive
The EOS archive daemon.
%files -n eos-archive
%{_sbindir}/eos-backup
%{_sbindir}/eos-backup-browser
%defattr(-, eosarchi, c3, -)
%{_bindir}/eosarchived.py
%{_bindir}/eosarch_run.py
%{_bindir}/eosarch_reconstruct.py
%{python3_sitelib}/eosarch*
%config(noreplace) %{_sysconfdir}/eosarchived.conf
%{_prefix}/lib/systemd/system/eosarchived.service
%config(noreplace) %{_sysconfdir}/sysconfig/eosarchived_env
%dir %attr(770,eosarchi,daemon) %{_localstatedir}/eos/archive/
%dir %attr(770,eosarchi,c3) %{_localstatedir}/log/eos/archive/
# To make sure python3 also uses /opt/ to search for modules
%if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0}
%config(noreplace) %{python3_sitelib}/opt-eos-xrootd.pth
%endif
%pre -n eos-archive
echo "Make sure eosarchi user and c3 group exist"
getent group c3 >/dev/null 2>&1 || groupadd -r -g 1028 c3
getent passwd eosarchi >/dev/null 2>&1 || useradd -r -u 72811 eosarchi
%post -n eos-archive
case "$1" in
1)
# Initial installation
echo "Starting EOS archive services"
systemctl daemon-reload > /dev/null 2>&1 || :
systemctl restart eosarchived > /dev/null 2>&1 || :
;;
2)
# Upgrade
echo "Restarting EOS archive services"
systemctl daemon-reload > /dev/null 2>&1 || :
systemctl restart eosarchived > /dev/null 2>&1 || :
;;
esac
%preun -n eos-archive
case "$1" in
0)
# Uninstall
echo "Stopping EOS archive services"
systemctl stop eosarchived > /dev/null 2>&1 || :
;;
1)
# Upgrade - nothing to do
;;
esac
%endif
#-------------------------------------------------------------------------------
# Package eos-test
#-------------------------------------------------------------------------------
%package -n eos-test
Summary: The EOS test package
Group: Applications/File
ExclusiveArch: x86_64 aarch64
Requires: bc davix jq dmidecode perf perl
%description -n eos-test
Contains an instance and fuse test script and some test executables and test archives.
%files -n eos-test
%defattr(-, root, root, -)
%{_bindir}/eos-mq-dumper
%{_bindir}/eos-mq-feeder
%{_bindir}/eos-grpc-ping
%{_bindir}/eos-grpc-md
%{_bindir}/eos-grpc-ns
%{_bindir}/eos-grpc-insert
%{_sbindir}/eos-mq-tests
%{_sbindir}/eos-instance-test
%{_sbindir}/eos-instance-test-ci
%{_sbindir}/eos-rain-test
%{_sbindir}/eos-drain-test
%{_sbindir}/eos-balance-test
%{_sbindir}/eos-convert-test
%{_sbindir}/eos-test-utils
%{_sbindir}/eos-fsck-test
%{_sbindir}/eos-qos-test
%{_sbindir}/eos-rename-test
%{_sbindir}/eos-grpc-test
%{_sbindir}/eos-groupdrain-test
%{_sbindir}/eos-token-test
%{_sbindir}/eos-squash-test
%{_sbindir}/eos-quota-test
%{_sbindir}/eos-defaultcc-test
%{_sbindir}/eos-bash
%{_sbindir}/eos-synctime-test
%{_sbindir}/eos-rclone-test
%{_sbindir}/eos-timestamp-test
%{_sbindir}/eos-http-upload-test
%{_sbindir}/eos-https-functional-test
%{_sbindir}/eoscp-rain-test
%{_sbindir}/eos-fusex-tests
%{_sbindir}/eos-fusex-functional-test
%{_sbindir}/eos-oc-test
%{_sbindir}/fusex-benchmark
%{_sbindir}/eos-fusex-certify
%{_sbindir}/eos-fusex-ioverify
%{_sbindir}/eos-fusex-recovery
%{_sbindir}/eos-test-credential-bindings
%{_sbindir}/eos-checksum-benchmark
%{_sbindir}/test-eos-iam-mapfile.py
%{_sbindir}/xrdcpnonstreaming
%{_sbindir}/xrdcpabort
%{_sbindir}/xrdcpappend
%{_sbindir}/xrdcpappendoverlap
%{_sbindir}/xrdcpposixcache
%{_sbindir}/xrdcpextend
%{_sbindir}/xrdcpholes
%{_sbindir}/xrdcpbackward
%{_sbindir}/xrdcpdownloadrandom
%{_sbindir}/xrdcprandom
%{_sbindir}/xrdcpshrink
%{_sbindir}/xrdcptruncate
%{_sbindir}/xrdcppartial
%{_sbindir}/xrdcpslowwriter
%{_sbindir}/xrdcpupdate
%{_sbindir}/xrdstress
%{_sbindir}/xrdstress.exe
%{_sbindir}/eos-io-test
%{_sbindir}/eos-io-tool
%{_sbindir}/eos-io-benchmark
%{_sbindir}/eos-unit-tests
%{_sbindir}/eos-unit-tests-with-instance
%{_sbindir}/eos-unit-tests-fst
%{_sbindir}/eos-unit-tests-with-qdb
%{_sbindir}/eos-ns-quarkdb-tests
%{_sbindir}/eos-make-flamegraph
%{_sbindir}/eos-util-flamegraph
%{_sbindir}/eos-util-stackcollapse
%attr(444,daemon,daemon) %{_localstatedir}/eos/test/fuse/untar/untar.tgz
%attr(444,daemon,daemon) %{_localstatedir}/eos/test/fuse/untar/xrootd.tgz
%if %{?_with_asan:1}%{!?_with_asan:0}
%attr(644,daemon,daemon) %{_localstatedir}/eos/test/LeakSanitizer.supp
%endif
%if %{?_with_coverage:1}%{!?_with_coverage:0}
#-------------------------------------------------------------------------------
# Package eos-coverage
#-------------------------------------------------------------------------------
%package -n eos-coverage
Summary: The EOS coverage package
Group: Applications/File
ExclusiveArch: x86_64 aarch64
%description -n eos-coverage
Contains all the ".gcno" files needed to produce coverage data for EOS server.
%files -n eos-coverage
%defattr(-, root, root, -)
%attr(755,daemon,daemon) %{_localstatedir}/eos/coverage/
%endif
#-------------------------------------------------------------------------------
# Package eos-cleanup
#-------------------------------------------------------------------------------
%package -n eos-cleanup
Summary: The EOS test package
Group: Applications/File
ExclusiveArch: x86_64 aarch64
%description -n eos-cleanup
Contains an clean-up scripts to remove 'left-overs' of an EOS instance for FST/MGM/FUSE etc.
%files -n eos-cleanup
%defattr(-, root, root, -)
%{_sbindir}/eos-uninstall
%{_sbindir}/eos-log-clean
%{_sbindir}/eos-fst-clean
%{_sbindir}/eos-mgm-clean
%endif