forked from xrootd/xrootd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xrootd.spec
1063 lines (896 loc) · 31.4 KB
/
xrootd.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%bcond_with asan
%bcond_with ceph
%bcond_with clang
%bcond_with compat
%bcond_with docs
%bcond_with git
%bcond_without tests
%bcond_without xrdec
%if %{?rhel}%{!?rhel:0} == 7
%bcond_with openssl11
%endif
%global compat_version 4.12.9
%global devtoolset devtoolset-7
%global llvmtoolset llvm-toolset-7
Name: xrootd
Epoch: 1
Release: 1%{?dist}%{?with_clang:.clang}%{?with_asan:.asan}%{?with_openssl11:.ssl11}
Summary: Extended ROOT File Server
Group: System Environment/Daemons
License: LGPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND curl AND MIT AND Zlib
URL: https://xrootd.slac.stanford.edu
%if !%{with git}
Version: 5.6.9
Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz
%else
%define git_version %(tar xzf %{_sourcedir}/%{name}.tar.gz -O xrootd/VERSION)
%define src_version %(sed -e "s/%%(describe)/v5.7-rc%(date +%%Y%%m%%d)/" <<< "%git_version")
%define rpm_version %(sed -e 's/v//; s/-rc/~rc/; s/-g/+git/; s/-/.post/; s/-/./' <<< "%src_version")
Version: %rpm_version
Source0: %{name}.tar.gz
%endif
%if %{with compat}
Source1: %{url}/download/v%{compat_version}/%{name}-%{compat_version}.tar.gz
%endif
%undefine __cmake_in_source_build
%if %{?rhel}%{!?rhel:0} == 7
%define cmake %cmake3
%define __cmake %__cmake3
%undefine __cmake3_in_source_build
%endif
%if %{with tests}
# CppUnit crashes with LTO enabled
%global _lto_cflags %nil
%endif
%if %{?rhel}%{!?rhel:0} == 7
BuildRequires: cmake3
BuildRequires: %{devtoolset}-toolchain
%else
BuildRequires: cmake
BuildRequires: gcc-c++
%endif
BuildRequires: gdb
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: fuse-devel
BuildRequires: krb5-devel
BuildRequires: libcurl-devel
BuildRequires: tinyxml-devel
BuildRequires: libxml2-devel
BuildRequires: ncurses-devel
BuildRequires: perl-generators
BuildRequires: readline-devel
BuildRequires: zlib-devel
BuildRequires: selinux-policy-devel
BuildRequires: systemd-rpm-macros
BuildRequires: systemd-devel
%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-setuptools
BuildRequires: python3-wheel
%endif
%if %{?rhel}%{!?rhel:0} == 7
BuildRequires: python2-devel
BuildRequires: python2-pip
BuildRequires: python2-setuptools
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-pip
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_other_pkgversion}-devel
BuildRequires: python%{python3_other_pkgversion}-pip
BuildRequires: python%{python3_other_pkgversion}-setuptools
%endif
BuildRequires: json-c-devel
BuildRequires: libmacaroons-devel
BuildRequires: libuuid-devel
BuildRequires: voms-devel
BuildRequires: scitokens-cpp-devel
BuildRequires: davix-devel
%if %{with asan}
BuildRequires: libasan
%if %{?rhel}%{!?rhel:0} == 7
BuildRequires: %{devtoolset}-libasan-devel
%endif
Requires: libasan
%endif
%if %{with ceph}
BuildRequires: librados-devel
BuildRequires: libradosstriper-devel
%endif
%if %{with clang}
%if %{?rhel}%{!?rhel:0} == 7
BuildRequires: %{llvmtoolset}-clang
%else
BuildRequires: clang
%endif
%endif
%if %{with docs}
BuildRequires: doxygen
BuildRequires: graphviz
%{?el7:BuildRequires: python2-sphinx}
%{!?el7:BuildRequires: python3-sphinx}
%endif
%if %{with openssl11}
BuildRequires: openssl11-devel
%else
BuildRequires: openssl-devel
%endif
%if %{with tests}
BuildRequires: attr
BuildRequires: cppunit-devel
BuildRequires: gtest-devel
BuildRequires: openssl
%endif
%if %{with xrdec}
BuildRequires: isa-l-devel
%endif
Requires: %{name}-client%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-server%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-selinux = %{epoch}:%{version}-%{release}
%description
The Extended root file server consists of a file server called xrootd
and a cluster management server called cmsd.
The xrootd server was developed for the root analysis framework to
serve root files. However, the server is agnostic to file types and
provides POSIX-like access to any type of file.
The cmsd server is the next generation version of the olbd server,
originally developed to cluster and load balance Objectivity/DB AMS
database servers. It provides enhanced capability along with lower
latency and increased throughput.
%package server
Summary: XRootD server daemons
Group: System Environment/Daemons
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-client%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-server-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: expect
Requires: logrotate
Requires(pre): shadow-utils
%{?systemd_requires}
%description server
This package contains the XRootD servers without the SELinux support.
Unless you are installing on a system without SELinux also install the
xrootd-selinux package.
%package selinux
Summary: SELinux policy modules for the XRootD servers
Group: System Environment/Base
BuildArch: noarch
Requires: selinux-policy
Requires(post): policycoreutils
Requires(postun): policycoreutils
%description selinux
This package contains SELinux policy modules for the xrootd-server package.
%package libs
Summary: Libraries used by XRootD servers and clients
Group: System Environment/Libraries
%description libs
This package contains libraries used by the XRootD servers and clients.
%package devel
Summary: Development files for XRootD
Group: Development/Libraries
Provides: %{name}-libs-devel = %{epoch}:%{version}-%{release}
Provides: %{name}-libs-devel%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-libs-devel < %{epoch}:%{version}-%{release}
%description devel
This package contains header files and development libraries for XRootD
development.
%package client-libs
Summary: Libraries used by XRootD clients
Group: System Environment/Libraries
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description client-libs
This package contains libraries used by XRootD clients.
%package client-devel
Summary: Development files for XRootD clients
Group: Development/Libraries
Provides: %{name}-cl-devel = %{epoch}:%{version}-%{release}
Provides: %{name}-cl-devel%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-cl-devel < %{epoch}:%{version}-%{release}
%description client-devel
This package contains header files and development libraries for XRootD
client development.
%package server-libs
Summary: Libraries used by XRootD servers
Group: System Environment/Libraries
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description server-libs
This package contains libraries used by XRootD servers.
%package server-devel
Summary: Development files for XRootD servers
Group: Development/Libraries
Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-client-devel%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-server-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description server-devel
This package contains header files and development libraries for XRootD
server development.
%package private-devel
Summary: Private XRootD headers
Group: Development/Libraries
Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-client-devel%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-server-devel%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description private-devel
This package contains some private XRootD headers. Backward and forward
compatibility between versions is not guaranteed for these headers.
%package client
Summary: XRootD command line client tools
Group: Applications/Internet
Provides: %{name}-cl = %{epoch}:%{version}-%{release}
Provides: %{name}-cl%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-cl < %{epoch}:%{version}-%{release}
%description client
This package contains the command line tools used to communicate with
XRootD servers.
%package fuse
Summary: XRootD FUSE tool
Group: Applications/Internet
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: fuse
%description fuse
This package contains the FUSE (file system in user space) XRootD mount
tool.
%package voms
Summary: VOMS attribute extractor plugin for XRootD
Group: System Environment/Libraries
Provides: vomsxrd = %{epoch}:%{version}-%{release}
Provides: %{name}-voms-plugin = %{epoch}:%{version}-%{release}
Provides: xrdhttpvoms = %{epoch}:%{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-voms-plugin < 1:0.6.0-3
Obsoletes: xrdhttpvoms < 0.2.5-9
Obsoletes: vomsxrd < 1:0.6.0-4
%description voms
The VOMS attribute extractor plugin for XRootD.
%package scitokens
Summary: SciTokens authorization support for XRootD
Group: System Environment/Libraries
License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause
Requires: %{name}-server%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description scitokens
This ACC (authorization) plugin for the XRootD framework utilizes the
SciTokens library to validate and extract authorization claims from a
SciToken passed during a transfer. Configured appropriately, this
allows the XRootD server admin to delegate authorization decisions for
a subset of the namespace to an external issuer.
%package -n xrdcl-http
Summary: HTTP client plugin for XRootD
Group: System Environment/Libraries
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description -n xrdcl-http
xrdcl-http is an XRootD client plugin which allows XRootD to interact
with HTTP repositories.
%if %{with ceph}
%package ceph
Summary: XRootD plugin for interfacing with the Ceph storage platform
Group: System Environment/Libraries
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description ceph
The xrootd-ceph is an OSS layer plugin for the XRootD server for
interfacing with the Ceph storage platform.
%endif
%if %{?rhel}%{!?rhel:0} == 7
%package -n python2-%{name}
Summary: Python 2 bindings for XRootD
Group: System Environment/Libraries
%py_provides python2-%{name}
Provides: %{name}-python = %{epoch}:%{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-python < %{epoch}:%{version}-%{release}
%description -n python2-%{name}
This package contains Python 2 bindings for XRootD.
%endif
%package -n python%{python3_pkgversion}-%{name}
Summary: Python 3 bindings for XRootD
Group: System Environment/Libraries
%py_provides python%{python3_pkgversion}-%{name}
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description -n python%{python3_pkgversion}-%{name}
This package contains Python 3 bindings for XRootD.
%if %{?rhel}%{!?rhel:0} == 7
%package -n python%{?python3_other_pkgversion}-%{name}
Summary: Python 3 bindings for XRootD
Group: System Environment/Libraries
%py_provides python%{python3_other_pkgversion}-%{name}
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description -n python%{?python3_other_pkgversion}-%{name}
This package contains Python 3 bindings for XRootD.
%endif
%package doc
Summary: Developer documentation for the XRootD libraries
Group: Documentation
BuildArch: noarch
%description doc
This package contains the API documentation of the XRootD libraries.
%if %{with compat}
%package client-compat
Summary: XRootD 4 compatibility client libraries
Group: System Environment/Libraries
%description client-compat
This package contains compatibility libraries for XRootD 4 clients.
%package server-compat
Summary: XRootD 4 compatibility server binaries
Group: System Environment/Daemons
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description server-compat
This package contains compatibility binaries for XRootD 4 servers.
%endif
%prep
%if %{with compat}
%setup -T -b 1 -n %{name}-%{compat_version}
%endif
%if %{with git}
%autosetup -n %{name}
%else
%autosetup -p1
%endif
%build
%if %{?rhel}%{!?rhel:0} == 7
. /opt/rh/%{devtoolset}/enable
%if %{with clang}
. /opt/rh/%{llvmtoolset}/enable
%endif
%endif
%if %{with clang}
export CC=clang
export CXX=clang++
%endif
%if %{with compat}
%__cmake \
-S %{_builddir}/%{name}-%{compat_version} \
-B %{_builddir}/%{name}-%{compat_version}/build \
%if %{with openssl11}
-DOPENSSL_INCLUDE_DIR=/usr/include/openssl11 \
-DOPENSSL_CRYPTO_LIBRARY=/usr/lib64/libcrypto.so.1.1 \
-DOPENSSL_SSL_LIBRARY=/usr/lib64/libssl.so.1.1 \
%endif
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS_RELEASE:STRING='%{optflags}' \
-DCMAKE_CXX_FLAGS_RELEASE:STRING='%{optflags}' \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \
-DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
-DFORCE_ENABLED:BOOL=TRUE \
-DENABLE_ASAN:BOOL=%{with asan} \
-DENABLE_FUSE:BOOL=TRUE \
-DENABLE_KRB5:BOOL=TRUE \
-DENABLE_MACAROONS:BOOL=TRUE \
-DENABLE_READLINE:BOOL=TRUE \
-DENABLE_SCITOKENS:BOOL=TRUE \
-DENABLE_TESTS:BOOL=FALSE \
-DENABLE_VOMS:BOOL=TRUE \
-DENABLE_XRDCL:BOOL=TRUE \
-DENABLE_XRDCLHTTP:BOOL=TRUE \
-DXRDCEPH_SUBMODULE:BOOL=%{with ceph} \
-DENABLE_XRDCLHTTP:BOOL=TRUE \
-DXRDCL_ONLY:BOOL=FALSE \
-DXRDCL_LIB_ONLY:BOOL=FALSE \
-DENABLE_PYTHON:BOOL=FALSE
make -C %{_builddir}/%{name}-%{compat_version}/build %{?_smp_mflags}
%endif
%cmake \
-DFORCE_ENABLED:BOOL=TRUE \
-DUSE_SYSTEM_ISAL:BOOL=TRUE \
-DENABLE_ASAN:BOOL=%{with asan} \
-DENABLE_FUSE:BOOL=TRUE \
-DENABLE_KRB5:BOOL=TRUE \
-DENABLE_MACAROONS:BOOL=TRUE \
-DENABLE_READLINE:BOOL=TRUE \
-DENABLE_SCITOKENS:BOOL=TRUE \
-DENABLE_TESTS:BOOL=%{with tests} \
-DENABLE_VOMS:BOOL=TRUE \
-DENABLE_XRDCL:BOOL=TRUE \
-DENABLE_XRDCLHTTP:BOOL=TRUE \
-DENABLE_XRDEC:BOOL=%{with xrdec} \
-DXRDCEPH_SUBMODULE:BOOL=%{with ceph} \
-DENABLE_XRDCLHTTP:BOOL=TRUE \
-DXRDCL_ONLY:BOOL=FALSE \
-DXRDCL_LIB_ONLY:BOOL=FALSE \
%if %{with openssl11}
-DOPENSSL_INCLUDE_DIR=/usr/include/openssl11 \
-DOPENSSL_CRYPTO_LIBRARY=/usr/lib64/libcrypto.so.1.1 \
-DOPENSSL_SSL_LIBRARY=/usr/lib64/libssl.so.1.1 \
%endif
-DENABLE_PYTHON:BOOL=TRUE \
-DINSTALL_PYTHON_BINDINGS:BOOL=FALSE \
%if %{?rhel}%{!?rhel:0} == 7
-DXRD_PYTHON_REQ_VERSION=%{python2_version}
%else
-DXRD_PYTHON_REQ_VERSION=%{python3_version}
%endif
%cmake3_build
make -C packaging/common -f /usr/share/selinux/devel/Makefile
%if %{with docs}
doxygen Doxyfile
%endif
%if %{with tests}
%check
%ctest3
%endif
%install
%if %{?rhel}%{!?rhel:0} == 7
. /opt/rh/%{devtoolset}/enable
%endif
%if %{with compat}
pushd %{_builddir}/%{name}-%{compat_version}/build
make install DESTDIR=%{buildroot}
rm -rf %{buildroot}%{_datadir} %{buildroot}%{_includedir}
rm -f %{buildroot}%{_libdir}/libXrd{AppUtils,Cl,Client,Crypto,CryptoLite}.so
rm -f %{buildroot}%{_libdir}/libXrd{Ffs,Main,Ofs,Posix*,Server,Utils}.so
for i in cmsd frm_purged frm_xfrd xrootd; do
mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/${i}-4
done
pushd %{buildroot}%{_bindir}
find . ! -name '*-4' -delete
popd
popd
%endif
%cmake3_install
# Remove test binaries and libraries
%if %{with tests}
rm -f %{buildroot}%{_bindir}/test-runner
rm -f %{buildroot}%{_bindir}/xrdshmap
rm -f %{buildroot}%{_libdir}/libXrd*Tests*
rm -f %{buildroot}%{_libdir}/libXrdClTestMonitor*.so
%endif
%if %{with ceph}
rm -f %{buildroot}%{_libdir}/libXrdCephPosix.so
%endif
rm -f %{buildroot}%{python3_sitearch}/xrootd-*.*-info/direct_url.json
rm -f %{buildroot}%{python3_sitearch}/xrootd-*.*-info/RECORD
[ -r %{buildroot}%{python3_sitearch}/xrootd-*.*-info/INSTALLER ] && \
sed s/pip/rpm/ -i %{buildroot}%{python3_sitearch}/xrootd-*.*-info/INSTALLER
%{__python3} -m pip install \
--no-deps --ignore-installed --disable-pip-version-check --verbose \
--prefix %{buildroot}%{_prefix} %{_vpath_builddir}/bindings/python
%if %{?rhel}%{!?rhel:0} == 7
%{__python2} -m pip install \
--no-deps --ignore-installed --disable-pip-version-check --verbose \
--prefix %{buildroot}%{_prefix} %{_vpath_builddir}/bindings/python
%{__python3_other} -m pip install \
--no-deps --ignore-installed --disable-pip-version-check --verbose \
--prefix %{buildroot}%{_prefix} %{_vpath_builddir}/bindings/python
%endif
%if %{with docs}
%if %{?rhel}%{!?rhel:0} == 7
LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
PYTHONPATH=%{buildroot}%{python2_sitearch} \
PYTHONDONTWRITEBYTECODE=1 \
make -C bindings/python/docs html
%endif
%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8
LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
PYTHONPATH=%{buildroot}%{python3_sitearch} \
PYTHONDONTWRITEBYTECODE=1 \
make -C bindings/python/docs html SPHINXBUILD=sphinx-build-3
%endif
%endif
# Service unit files
mkdir -p %{buildroot}%{_unitdir}
install -m 644 packaging/common/[email protected] %{buildroot}%{_unitdir}
install -m 644 packaging/common/[email protected] %{buildroot}%{_unitdir}
install -m 644 packaging/common/[email protected] %{buildroot}%{_unitdir}
install -m 644 packaging/common/[email protected] %{buildroot}%{_unitdir}
install -m 644 packaging/common/[email protected] %{buildroot}%{_unitdir}
install -m 644 packaging/common/[email protected] %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 644 packaging/rhel/xrootd.tmpfiles %{buildroot}%{_tmpfilesdir}/%{name}.conf
# Server config
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
install -m 644 -p packaging/common/%{name}-clustered.cfg \
%{buildroot}%{_sysconfdir}/%{name}/%{name}-clustered.cfg
install -m 644 -p packaging/common/%{name}-standalone.cfg \
%{buildroot}%{_sysconfdir}/%{name}/%{name}-standalone.cfg
install -m 644 -p packaging/common/%{name}-filecache-clustered.cfg \
%{buildroot}%{_sysconfdir}/%{name}/%{name}-filecache-clustered.cfg
install -m 644 -p packaging/common/%{name}-filecache-standalone.cfg \
%{buildroot}%{_sysconfdir}/%{name}/%{name}-filecache-standalone.cfg
sed 's!/usr/lib64/!!' packaging/common/%{name}-http.cfg > \
%{buildroot}%{_sysconfdir}/%{name}/%{name}-http.cfg
# Client config
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/client.plugins.d
install -m 644 -p packaging/common/client.conf \
%{buildroot}%{_sysconfdir}/%{name}/client.conf
sed 's!/usr/lib/!!' packaging/common/client-plugin.conf.example > \
%{buildroot}%{_sysconfdir}/%{name}/client.plugins.d/client-plugin.conf.example
sed -e 's!/usr/lib64/!!' -e 's!-5!!' packaging/common/recorder.conf > \
%{buildroot}%{_sysconfdir}/%{name}/client.plugins.d/recorder.conf
sed 's!/usr/lib64/!!' packaging/common/http.client.conf.example > \
%{buildroot}%{_sysconfdir}/%{name}/client.plugins.d/xrdcl-http-plugin.conf
chmod 644 %{buildroot}%{_datadir}/%{name}/utils/XrdCmsNotify.pm
sed 's!/usr/bin/env perl!/usr/bin/perl!' -i \
%{buildroot}%{_datadir}/%{name}/utils/netchk \
%{buildroot}%{_datadir}/%{name}/utils/XrdCmsNotify.pm \
%{buildroot}%{_datadir}/%{name}/utils/XrdOlbMonPerf
sed 's!/usr/bin/env bash!/bin/bash!' -i %{buildroot}%{_bindir}/xrootd-config
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/config.d
mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
mkdir -p %{buildroot}%{_localstatedir}/spool/%{name}
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
install -m 644 -p packaging/common/%{name}.logrotate \
%{buildroot}%{_sysconfdir}/logrotate.d/%{name}
mkdir -p %{buildroot}%{_datadir}/selinux/packages/%{name}
install -m 644 -p packaging/common/%{name}.pp \
%{buildroot}%{_datadir}/selinux/packages/%{name}
%if %{with docs}
mkdir -p %{buildroot}%{_pkgdocdir}
cp -pr doxydoc/html %{buildroot}%{_pkgdocdir}
cp -pr bindings/python/docs/build/html %{buildroot}%{_pkgdocdir}/python
rm %{buildroot}%{_pkgdocdir}/python/.buildinfo
%endif
%ldconfig_scriptlets libs
%ldconfig_scriptlets client-libs
%ldconfig_scriptlets server-libs
%pre server
getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || useradd -r -g %{name} -s /sbin/nologin \
-d %{_localstatedir}/spool/%{name} -c "System user for XRootD" %{name}
%post server
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
if [ $1 -eq 1 ] ; then
systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun server
if [ $1 -eq 0 ] ; then
for DAEMON in xrootd cmsd frm_purged frm_xfrd; do
for INSTANCE in `systemctl | grep $DAEMON@ | awk '{print $1;}'`; do
systemctl --no-reload disable $INSTANCE > /dev/null 2>&1 || :
systemctl stop $INSTANCE > /dev/null 2>&1 || :
done
done
fi
%postun server
if [ $1 -ge 1 ] ; then
systemctl daemon-reload >/dev/null 2>&1 || :
for DAEMON in xrootd cmsd frm_purged frm_xfrd; do
for INSTANCE in `systemctl | grep $DAEMON@ | awk '{print $1;}'`; do
systemctl try-restart $INSTANCE >/dev/null 2>&1 || :
done
done
fi
%post selinux
semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp >/dev/null 2>&1 || :
%postun selinux
if [ $1 -eq 0 ] ; then
semodule -r %{name} >/dev/null 2>&1 || :
fi
%files
# Empty
%files server
%{_bindir}/cconfig
%{_bindir}/cmsd
%{_bindir}/frm_admin
%{_bindir}/frm_purged
%{_bindir}/frm_xfragent
%{_bindir}/frm_xfrd
%{_bindir}/mpxstats
%{_bindir}/wait41
%{_bindir}/xrdacctest
%{_bindir}/xrdpfc_print
%{_bindir}/xrdpwdadmin
%{_bindir}/xrdsssadmin
%{_bindir}/xrootd
%{_mandir}/man8/cmsd.8*
%{_mandir}/man8/frm_admin.8*
%{_mandir}/man8/frm_purged.8*
%{_mandir}/man8/frm_xfragent.8*
%{_mandir}/man8/frm_xfrd.8*
%{_mandir}/man8/mpxstats.8*
%{_mandir}/man8/xrdpfc_print.8*
%{_mandir}/man8/xrdpwdadmin.8*
%{_mandir}/man8/xrdsssadmin.8*
%{_mandir}/man8/xrootd.8*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/utils
%{_unitdir}/*
%{_tmpfilesdir}/%{name}.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%dir %{_sysconfdir}/%{name}/config.d
%attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{name}/*.cfg
%attr(-,xrootd,xrootd) %{_localstatedir}/log/%{name}
%attr(-,xrootd,xrootd) %{_localstatedir}/spool/%{name}
%ghost %attr(-,xrootd,xrootd) %{_rundir}/%{name}
%files selinux
%{_datadir}/selinux/packages/%{name}/%{name}.pp
%files libs
%{_libdir}/libXrdAppUtils.so.*
%{_libdir}/libXrdCrypto.so.*
%{_libdir}/libXrdCryptoLite.so.*
%{_libdir}/libXrdUtils.so.*
%{_libdir}/libXrdXml.so.*
# Plugins
%{_libdir}/libXrdCksCalczcrc32-5.so
%{_libdir}/libXrdCryptossl-5.so
%{_libdir}/libXrdSec-5.so
%{_libdir}/libXrdSecProt-5.so
%{_libdir}/libXrdSecgsi-5.so
%{_libdir}/libXrdSecgsiAUTHZVO-5.so
%{_libdir}/libXrdSecgsiGMAPDN-5.so
%{_libdir}/libXrdSeckrb5-5.so
%{_libdir}/libXrdSecpwd-5.so
%{_libdir}/libXrdSecsss-5.so
%{_libdir}/libXrdSecunix-5.so
%{_libdir}/libXrdSecztn-5.so
%license COPYING* LICENSE
%files devel
%{_bindir}/xrootd-config
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/XProtocol
%{_includedir}/%{name}/Xrd
%{_includedir}/%{name}/XrdCks
%{_includedir}/%{name}/XrdNet
%{_includedir}/%{name}/XrdOuc
%{_includedir}/%{name}/XrdSec
%{_includedir}/%{name}/XrdSys
%{_includedir}/%{name}/XrdXml
%{_includedir}/%{name}/XrdVersion.hh
%{_libdir}/libXrdAppUtils.so
%{_libdir}/libXrdCrypto.so
%{_libdir}/libXrdCryptoLite.so
%{_libdir}/libXrdUtils.so
%{_libdir}/libXrdXml.so
%{_libdir}/cmake/XRootD
%dir %{_datadir}/%{name}
%files client-libs
%{_libdir}/libXrdCl.so.*
%if %{with xrdec}
%{_libdir}/libXrdEc.so.*
%endif
%{_libdir}/libXrdFfs.so.*
%{_libdir}/libXrdPosix.so.*
%{_libdir}/libXrdPosixPreload.so.*
# This lib may be used for LD_PRELOAD so the .so link needs to be included
%{_libdir}/libXrdPosixPreload.so
%{_libdir}/libXrdSsiLib.so.*
%{_libdir}/libXrdSsiShMap.so.*
# Plugins
%{_libdir}/libXrdClProxyPlugin-5.so
%{_libdir}/libXrdClRecorder-5.so
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/client.conf
%dir %{_sysconfdir}/%{name}/client.plugins.d
%config(noreplace) %{_sysconfdir}/%{name}/client.plugins.d/client-plugin.conf.example
%config(noreplace) %{_sysconfdir}/%{name}/client.plugins.d/recorder.conf
%files client-devel
%{_includedir}/%{name}/XrdCl
%{_includedir}/%{name}/XrdPosix
%{_libdir}/libXrdCl.so
%if %{with xrdec}
%{_libdir}/libXrdEc.so
%endif
%{_libdir}/libXrdFfs.so
%{_libdir}/libXrdPosix.so
%files server-libs
%{_libdir}/libXrdHttpUtils.so.*
%{_libdir}/libXrdServer.so.*
# Plugins
%{_libdir}/libXrdBlacklistDecision-5.so
%{_libdir}/libXrdBwm-5.so
%{_libdir}/libXrdCmsRedirectLocal-5.so
%{_libdir}/libXrdFileCache-5.so
%{_libdir}/libXrdHttp-5.so
%{_libdir}/libXrdHttpTPC-5.so
%{_libdir}/libXrdMacaroons-5.so
%{_libdir}/libXrdN2No2p-5.so
%{_libdir}/libXrdOfsPrepGPI-5.so
%{_libdir}/libXrdOssCsi-5.so
%{_libdir}/libXrdOssSIgpfsT-5.so
%{_libdir}/libXrdPfc-5.so
%{_libdir}/libXrdPss-5.so
%{_libdir}/libXrdSsi-5.so
%{_libdir}/libXrdSsiLog-5.so
%{_libdir}/libXrdThrottle-5.so
%{_libdir}/libXrdXrootd-5.so
%files server-devel
%{_includedir}/%{name}/XrdAcc
%{_includedir}/%{name}/XrdCms
%{_includedir}/%{name}/XrdHttp
%{_includedir}/%{name}/XrdOfs
%{_includedir}/%{name}/XrdOss
%{_includedir}/%{name}/XrdPfc
%{_includedir}/%{name}/XrdSfs
%{_includedir}/%{name}/XrdXrootd
%{_libdir}/libXrdHttpUtils.so
%{_libdir}/libXrdServer.so
%files private-devel
%{_includedir}/%{name}/private
%{_libdir}/libXrdSsiLib.so
%{_libdir}/libXrdSsiShMap.so
%files client
%{_bindir}/xrdadler32
%{_bindir}/xrdcks
%{_bindir}/xrdcopy
%{_bindir}/xrdcp
%{_bindir}/xrdcrc32c
%{_bindir}/xrdfs
%{_bindir}/xrdgsiproxy
%{_bindir}/xrdgsitest
%{_bindir}/xrdmapc
%{_bindir}/xrdpinls
%{_bindir}/xrdreplay
%{_mandir}/man1/xrdadler32.1*
%{_mandir}/man1/xrdcopy.1*
%{_mandir}/man1/xrdcp.1*
%{_mandir}/man1/xrdfs.1*
%{_mandir}/man1/xrdgsiproxy.1*
%{_mandir}/man1/xrdgsitest.1*
%{_mandir}/man1/xrdmapc.1*
%files fuse
%{_bindir}/xrootdfs
%{_mandir}/man1/xrootdfs.1*
%files voms
%{_libdir}/libXrdVoms-5.so
%{_libdir}/libXrdHttpVOMS-5.so
%{_libdir}/libXrdSecgsiVOMS-5.so
%doc %{_mandir}/man1/libXrdVoms.1*
%doc %{_mandir}/man1/libXrdSecgsiVOMS.1*
%files scitokens
%{_libdir}/libXrdAccSciTokens-5.so
%doc src/XrdSciTokens/README.md
%files -n xrdcl-http
%{_libdir}/libXrdClHttp-5.so
%config(noreplace) %{_sysconfdir}/%{name}/client.plugins.d/xrdcl-http-plugin.conf
%if %{with ceph}
%files ceph
%{_libdir}/libXrdCeph-5.so
%{_libdir}/libXrdCephXattr-5.so
%{_libdir}/libXrdCephPosix.so.*
%endif
%files -n python%{python3_pkgversion}-%{name}
%{python3_sitearch}/xrootd-*.*-info
%{python3_sitearch}/pyxrootd
%{python3_sitearch}/XRootD
%if %{?rhel}%{!?rhel:0} == 7
%files -n python2-%{name}
%{python2_sitearch}/xrootd-*.*-info
%{python2_sitearch}/pyxrootd
%{python2_sitearch}/XRootD
%files -n python%{?python3_other_pkgversion}-%{name}
%{python3_other_sitearch}/xrootd-*.*-info
%{python3_other_sitearch}/pyxrootd
%{python3_other_sitearch}/XRootD
%endif
%if %{with docs}
%files doc
%doc %{_pkgdocdir}
%endif
%if %{with compat}
%files client-compat
# from xrootd-libs:
%{_libdir}/libXrdAppUtils.so.1*
%{_libdir}/libXrdCks*-4.so
%{_libdir}/libXrdClProxyPlugin-4.so
%{_libdir}/libXrdCrypto.so.1*
%{_libdir}/libXrdCryptoLite.so.1*
%{_libdir}/libXrdCryptossl-4.so
%{_libdir}/libXrdSec*-4.so
%{_libdir}/libXrdUtils.so.2*
%{_libdir}/libXrdXml.so.2*
# from xrootd-client-libs
%{_libdir}/libXrdCl.so.2*
%{_libdir}/libXrdClient.so.2*
%{_libdir}/libXrdFfs.so.2*
%{_libdir}/libXrdPosix.so.2*
%{_libdir}/libXrdPosixPreload.so.1*
%{_libdir}/libXrdSsiLib.so.1*
%{_libdir}/libXrdSsiShMap.so.1*
%files server-compat
# from server (renamed)
%{_bindir}/cmsd-4
%{_bindir}/frm_purged-4
%{_bindir}/frm_xfrd-4
%{_bindir}/xrootd-4
# from server-libs
%{_libdir}/libXrdBwm-4.so
%{_libdir}/libXrdPss-4.so
%{_libdir}/libXrdXrootd-4.so
%{_libdir}/libXrdFileCache-4.so
%{_libdir}/libXrdBlacklistDecision-4.so
%{_libdir}/libXrdHttp-4.so
%{_libdir}/libXrdHttpTPC-4.so
%{_libdir}/libXrdHttpUtils.so.1*
%{_libdir}/libXrdMacaroons-4.so
%{_libdir}/libXrdN2No2p-4.so
%{_libdir}/libXrdOssSIgpfsT-4.so
%{_libdir}/libXrdServer.so.2*
%{_libdir}/libXrdSsi-4.so
%{_libdir}/libXrdSsiLog-4.so
%{_libdir}/libXrdThrottle-4.so
%{_libdir}/libXrdCmsRedirectLocal-4.so
%{_libdir}/libXrdVoms-4.so
%endif
%changelog
* Fri Mar 08 2024 Guilherme Amadio <[email protected]> - 1:5.6.9-1
- XRootD 5.6.9
* Fri Feb 23 2024 Guilherme Amadio <[email protected]> - 1:5.6.8-1
- XRootD 5.6.8
* Tue Feb 06 2024 Guilherme Amadio <[email protected]> - 1:5.6.7-1
- XRootD 5.6.7
* Thu Jan 25 2024 Guilherme Amadio <[email protected]> - 1:5.6.6-1
- XRootD 5.6.6
* Mon Jan 22 2024 Guilherme Amadio <[email protected]> - 1:5.6.5-1
- XRootD 5.6.5
* Fri Dec 08 2023 Guilherme Amadio <[email protected]> - 1:5.6.4-1
- Use isa-l library from the system
- Extract version from tarball when building git snapshots
- XRootD 5.6.4
* Fri Oct 27 2023 Guilherme Amadio <[email protected]> - 1:5.6.3-2
- XRootD 5.6.3
* Mon Sep 18 2023 Guilherme Amadio <[email protected]> - 1:5.6.2-2
- Add patch with fix for id parsing in XrdAccAuthFile (#2088)
* Fri Sep 15 2023 Guilherme Amadio <[email protected]> - 1:5.6.2-1
- Link XRootD 4 with openssl1.1 when using --with openssl11
- XRootD 5.6.2
* Fri Aug 11 2023 Guilherme Amadio <[email protected]> - 1:5.6.1-1
- Modernize spec file to add more optional features and select
default build options automatically for each supported OS.
- Use latest official release tarball by default.
- Enable snapshot builds from git.
* Thu Oct 15 2020 Michal Simon <[email protected]> - 5.0.2-1
- Introduce xrootd-scitokens package
* Wed May 27 2020 Michal Simon <[email protected]> - 4.12.2-1
- Remove xrootd-voms-devel
* Fri Apr 17 2020 Michal Simon <[email protected]> - 4.12.0-1
- Introduce xrootd-voms and xrootd-voms-devel packages
* Mon Sep 02 2019 Michal Simon <[email protected]> - 4.10.1-1
- Move xrdmapc to client package