forked from cern-eos/eos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheos.spec.in
837 lines (731 loc) · 24.2 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
#-------------------------------------------------------------------------------
# Helper macros and variables
#-------------------------------------------------------------------------------
%define _unpackaged_files_terminate_build 0
%define distribution %(/usr/lib/rpm/redhat/dist.sh --distnum)
%if %{?rhel:1}%{!?rhel:0}
%if %{rhel} >= 7
%define use_systemd 1
%define use_richacl 1
%else
%define use_systemd 0
%define use_richacl 0
%endif
%else
%if %{?fedora}%{!?fedora:0} >= 19
%define use_systemd 1
%define use_richacl 1
%else
%define use_systemd 0
%define use_richacl 0
%endif
%endif
# 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
# Define minimum required dependency for XRootD
%define xrootd_version 1:4.8.2
%define major_version @CPACK_PACKAGE_VERSION_MAJOR@
#-------------------------------------------------------------------------------
# Custom strip command for SLC6, CC7
#-------------------------------------------------------------------------------
%if 0%{distribution} == 6 || 0%{distribution} == 7
%global __strip /opt/rh/devtoolset-6/root/usr/bin/strip
%endif
#-------------------------------------------------------------------------------
# Package definitions
#-------------------------------------------------------------------------------
Summary: The EOS project
Name: @CPACK_PACKAGE_NAME@
Version: @CPACK_PACKAGE_VERSION@
Release: @CPACK_PACKAGE_RELEASE@%{dist}
Prefix: /usr
License: none
Group: Applications/File
Source: %{name}-%{version}-@CPACK_PACKAGE_RELEASE@.tar.gz
BuildRoot: %{_tmppath}/%{name}-root
%if %{?fedora:1}%{!?fedora:0}
BuildRequires: cmake >= 3.3
%define cmake_cmd cmake
%else
BuildRequires: cmake3 >= 3.3
%define cmake_cmd cmake3
%endif
BuildRequires: xrootd >= %{xrootd_version}
BuildRequires: xrootd-client-devel >= %{xrootd_version}
BuildRequires: xrootd-server-devel >= %{xrootd_version}
BuildRequires: xrootd-private-devel >= %{xrootd_version}
BuildRequires: git, readline-devel
BuildRequires: openssl, openssl-devel
BuildRequires: ncurses, ncurses-devel
BuildRequires: zlib, zlib-devel
BuildRequires: fuse-devel, fuse >= 2.5
%if %{use_richacl}
BuildRequires: librichacl-devel, richacl >= 1.12
%endif
BuildRequires: redhat-rpm-config
%if %{?fedora}%{!?fedora:0} >= 27
BuildRequires: protobuf >= 3.3, protobuf-devel >= 3.3, protobuf-compiler >= 3.3
%else
BuildRequires: protobuf3 >= 3.3, protobuf3-devel >= 3.3, protobuf3-compiler >= 3.3
%endif
BuildRequires: leveldb-devel
BuildRequires: libattr-devel, xfsprogs-devel
BuildRequires: gcc gcc-c++
BuildRequires: jsoncpp, jsoncpp-devel
BuildRequires: hiredis, hiredis-devel
BuildRequires: jemalloc, jemalloc-devel
BuildRequires: glibc-headers
BuildRequires: binutils-devel
%if %{?_with_server:1}%{!?_with_server:0}
BuildRequires: eos-rocksdb = 5.7.3-1%{dist}
BuildRequires: openldap-devel
BuildRequires: e2fsprogs-devel
BuildRequires: libmicrohttpd, libmicrohttpd-devel >= 0.9.38
%endif
BuildRequires: bzip2-devel
Requires: bzip2-devel
BuildRequires: elfutils-devel
Requires: elfutils-devel
BuildRequires: libuuid-devel, ncurses-static, openssl-static, zlib-static,
BuildRequires: libcurl-devel libcurl, sparsehash-devel
%if 0%{?rhel} == 6 || 0%{?el6} == 1 || (0%{?fedora} >= 18 && 0%{?fedora} <= 21)
BuildRequires: zeromq3, zeromq3-devel
BuildRequires: libevent2, libevent2-devel
%else
BuildRequires: zeromq, zeromq-devel, cppzmq-devel
BuildRequires: libevent, libevent-devel
BuildRequires: bzip2-devel
Requires: bzip2
%endif
# Install newer gcc on SLC6 + CC7
%if 0%{distribution} == 7
BuildRequires: centos-release-scl
%endif
%if 0%{distribution} == 6 || 0%{distribution} == 7
BuildRequires: devtoolset-6
BuildRequires: devtoolset-6-binutils-devel
%else
BuildRequires: binutils-devel
%endif
%if %{use_systemd}
BuildRequires: systemd
%endif
%description
The EOS software package.
%prep
%setup -n %{name}-%{version}-@CPACK_PACKAGE_RELEASE@
%build
test -e $RPM_BUILD_ROOT && rm -r $RPM_BUILD_ROOT
mkdir -p build
cd build
%if %{?_with_server:0}%{!?_with_server:1}
%if 0%{distribution} == 6 || 0%{distribution} == 7
scl enable devtoolset-6 "%{cmake_cmd} ../ -DRELEASE=@CPACK_PACKAGE_RELEASE@ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCLIENT=1 -DFUSEXCLIENT=1"
%else
%{cmake_cmd} ../ -DRELEASE=@CPACK_PACKAGE_RELEASE@ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCLIENT=1 -DFUSEXCLIENT=1
%endif
%else
%if 0%{distribution} == 6 || 0%{distribution} == 7
scl enable devtoolset-6 "%{cmake_cmd} ../ -DRELEASE=@CPACK_PACKAGE_RELEASE@ -DCMAKE_BUILD_TYPE=RelWithDebInfo"
%else
%{cmake_cmd} ../ -DRELEASE=@CPACK_PACKAGE_RELEASE@ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFUSEXCLIENT=1
%endif
%endif
%{__make} %{_smp_mflags}
%install
cd build
%{__make} install DESTDIR=$RPM_BUILD_ROOT
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
Requires: xrootd >= %{xrootd_version}
Requires: xrootd-client >= %{xrootd_version}
Requires: xrootd-private-devel >= %{xrootd_version}
Requires: eos-client
Requires: libmicrohttpd >= 0.9.38
Requires: acl
Requires: gdb
Requires: jemalloc
Requires: jsoncpp
Requires: psmisc
Requires: libcurl
%if %{?fedora}%{!?fedora:0} >= 27
Requires: protobuf >= 3.3
%else
Requires: protobuf3 >= 3.3
%endif
%if %{use_systemd}
Requires: systemd
%else
Requires: chkconfig
Requires: initscripts
Requires: sysvinit-tools
%endif
%if 0%{?rhel} == 6 || 0%{?el6} == 1 || (0%{?fedora} >= 18 && 0%{?fedora} <= 21)
BuildRequires: zeromq3, zeromq3-devel
%else
BuildRequires: zeromq, zeromq-devel, cppzmq-devel
%endif
BuildRequires: eos-folly = 2017.09.18.00-4%{dist}
Requires: eos-folly = 2017.09.18.00-4%{dist}
%description -n eos-server
The EOS server installation containing MGM, FST & MQ service.
%files -n eos-server
%defattr(-, root, root, -)
%{_bindir}/xrdmqdumper
%{_bindir}/eos-ns-convert
%{_bindir}/eos-ns-convert-to-locality-hashes
%{_sbindir}/eosfilesync
%{_sbindir}/eosdirsync
%{_sbindir}/eos-tty-broadcast
%{_sbindir}/eos-log-compact
%{_sbindir}/eos-log-repair
%{_sbindir}/eossh-timeout
%{_sbindir}/eosfstregister
%{_sbindir}/eosfstinfo
%{_sbindir}/eosadmin
%{_sbindir}/eos-check-blockxs
%{_sbindir}/eos-udp-dumper
%{_sbindir}/eos-compute-blockxs
%{_sbindir}/eos-scan-fs
%{_sbindir}/eos-adler32
%{_sbindir}/eos-mmap
%{_sbindir}/eos-repair-tool
%{_sbindir}/eos-ioping
%{_sbindir}/eos-iobw
%{_sbindir}/eos-iops
%{_sbindir}/eos-filter-stacktrace
%{_libdir}/libEosProtobuf.so.%{version}
%{_libdir}/libEosProtobuf.so.%{major_version}
%{_libdir}/libEosProtobuf.so
%{_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}/libXrdEosFst.so
%{_libdir}/libEosNsInMemory.so
%{_libdir}/libXrdEosMgm.so
%{_libdir}/libXrdMqOfs.so
%{_libdir}/libEosNsQuarkdb.so
%{_libdir}/libEosNsQuarkdb-Shared.so.%{version}
%{_libdir}/libEosNsQuarkdb-Shared.so.%{major_version}
%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
%if %{use_systemd}
%config %{_sysconfdir}/sysconfig/eos_env.example
%{_prefix}/lib/systemd/system/eos.target
%{_prefix}/lib/systemd/system/eos.service
%{_prefix}/lib/systemd/system/eos@.service
%{_prefix}/lib/systemd/system/eos@master.service
%{_prefix}/lib/systemd/system/eos@slave.service
%{_prefix}/lib/systemd/system/eosfstdb@.service
%{_prefix}/lib/systemd/system/eosslave.service
%{_prefix}/lib/systemd/system/eossync.service
%{_prefix}/lib/systemd/system/eossync@.service
%{_prefix}/lib/systemd/system/eossync@config.service
%{_sbindir}/eos_start_pre.sh
%else
%config %{_sysconfdir}/sysconfig/eos.example
%{_sysconfdir}/rc.d/init.d/eos
%{_sysconfdir}/rc.d/init.d/eossync
%{_sysconfdir}/rc.d/init.d/eosslave
%endif
%{_sysconfdir}/cron.d/eos-logs
%{_sysconfdir}/cron.d/eos-reports
%{_sysconfdir}/logrotate.d/eos-logs
%dir %attr(700,daemon,daemon) /var/eos
%dir %attr(700,daemon,daemon) /var/eos/wfe
%dir %attr(700,daemon,daemon) /var/eos/wfe/bash/
%dir %attr(700,daemon,daemon) /var/eos/ns-queue
%dir %attr(700,daemon,daemon) /var/eos/ns-queue/default
%dir %attr(755,daemon,daemon) /var/log/eos
%dir %attr(755,daemon,daemon) /var/log/eos/tx
%attr(555,daemon,daemon) /var/eos/html/error.html
%attr(555,daemon,daemon) /var/eos/wfe/bash/shell
%post -n eos-server
echo "Starting conditional EOS services"
sleep 2
%if %{use_systemd}
systemctl daemon-reload > /dev/null 2>&1 || :
systemctl restart eos@* > /dev/null 2>&1 || :
%else
/sbin/chkconfig --add eos
/sbin/chkconfig --add eosslave
/sbin/service eos condrestart > /dev/null 2>&1 || :
/sbin/service eosd condrestart > /dev/null 2>&1 || :
%endif
%preun -n eos-server
if [ $1 = 0 ]; then
echo "Stopping EOS services"
%if %{use_systemd}
systemctl stop eosd@* > /dev/null 2>&1
systemctl stop eos@* > /dev/null 2>&1 || :
systemctl stop eossync@* > /dev/null 2>&1
systemctl stop eosslave > /dev/null 2>&1
%else
/sbin/service eosd stop > /dev/null 2>&1
/sbin/service eos stop > /dev/null 2>&1 || :
/sbin/service eossync stop > /dev/null 2>&1
/sbin/service eosslave stop > /dev/null 2>&1
/sbin/chkconfig --del eos
/sbin/chkconfig --del eosslave
%endif
fi
%endif
#-------------------------------------------------------------------------------
# Package eos-client
#-------------------------------------------------------------------------------
%package -n eos-client
Summary: The EOS shell client
Group: Applications/File
Requires: xrootd-client >= %{xrootd_version}
%if %{?fedora}%{!?fedora:0} >= 27
Requires: protobuf >= 3.3
%else
Requires: protobuf3 >= 3.3
%endif
%if %{use_systemd}
Requires: systemd
%else
Requires: chkconfig
Requires: initscripts
Requires: sysvinit-tools
%endif
%description -n eos-client
The EOS shell client.
%files -n eos-client
%defattr(-, root, root, -)
%{_bindir}/eos
%{_bindir}/eosdropboxd
%{_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
# Documentation
%doc %{_mandir}/man1/
#-------------------------------------------------------------------------------
# Package eos-fuse
#-------------------------------------------------------------------------------
%package -n eos-fuse
Summary: The new EOS fuse client
Group: Applications/File
Requires: eos-fuse-core = @CPACK_PACKAGE_VERSION@
Requires: eos-fuse-sysv = @CPACK_PACKAGE_VERSION@
%if %{use_systemd}
Requires: systemd
%else
Requires: chkconfig
Requires: initscripts
Requires: sysvinit-tools
Requires: psmisc
%endif
%description -n eos-fuse
The new EOS fuse client bundle.
%files -n eos-fuse
%defattr(-, root, root, -)
#-------------------------------------------------------------------------------
# Package eos-fuse-core
#-------------------------------------------------------------------------------
%package -n eos-fuse-core
Summary: The EOS fuse client
Group: Applications/File
Requires: xrootd-client >= %{xrootd_version}
Requires: fuse
Requires: jemalloc
Requires: policycoreutils
%description -n eos-fuse-core
The EOS fuse core containing eosd and mount scripts.
%files -n eos-fuse-core
%defattr(-, root, root, -)
%{_bindir}/eosd
%{_bindir}/eosfusebind
/sbin/mount.eos
%{_datarootdir}/selinux/targeted/eosfuse.pp
%{_datarootdir}/selinux/mls/eosfuse.pp
%{_datarootdir}/selinux/strict/eosfuse.pp
%config %{_sysconfdir}/logrotate.d/eos-fuse-logs
%dir %attr(755,daemon,daemon) /var/log/eos
%dir %attr(755,daemon,daemon) /var/log/eos/fuse
%dir %attr(0755, root, root) /var/run/eosd/
%dir %attr(1777, root, root) /var/run/eosd/credentials/
%dir %attr(1777, root, root) /var/run/eosd/credentials/store
# Create the credential store
%if %{?fedora:1}%{!?fedora:0} || 0%{?rhel} >= 7 || 0%{?el7} == 1
%{_usr}/lib/tmpfiles.d/eosd.conf
%endif
%if 0%{distribution} == 6
%config(noreplace) %{_sysconfdir}/fuse.conf
%{_sysconfdir}/fuse.conf.eos
%else
%{_sysconfdir}/fuse.conf.eos
%endif
%post -n eos-fuse-core
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-fuse-core
if [ "$1" -eq "0" ]; then # Final removal
/usr/sbin/semodule -r eosfuse || :
fi
%postun -n eos-fuse-core
if [ "$1" -ge "1" ]; then # Upgrade
for VARIANT in mls strict targeted
do
/usr/sbin/semodule -i %{_datarootdir}/selinux/$VARIANT/eosfuse.pp || :
done
# If the automount daemon catches a USR1 signal, it will umount all currently
# unused autofs managed mounted filesystems and continue running (forced
# expire).
/usr/bin/killall --quiet --signal USR1 automount ||:
fi
#-------------------------------------------------------------------------------
# Package eos-fuse-sysv
#-------------------------------------------------------------------------------
%package -n eos-fuse-sysv
Summary: The EOS fuse client
Group: Applications/File
Requires: eos-fuse-core = @CPACK_PACKAGE_VERSION@
%description -n eos-fuse-sysv
The EOS fuse SYSV init scripts.
%files -n eos-fuse-sysv
%defattr(-, root, root, -)
%{_sysconfdir}/rc.d/init.d/eosd
%post -n eos-fuse-sysv
%if %{?fedora:1}%{!?fedora:0} || 0%{?rhel} >= 7 || 0%{?el7} == 1
echo "Skipping chkconfig for eosd"
%else
/sbin/chkconfig --add eosd
%endif
%preun -n eos-fuse-sysv
%if %{?fedora:1}%{!?fedora:0} || 0%{?rhel} >= 7 || 0%{?el7} == 1
echo "Skipping chkconfig for eosd"
%else
if [ $1 = 0 ]; then
echo "Stopping EOS FUSE services"
/sbin/service eosd stop > /dev/null 2>&1 || :
/sbin/chkconfig --del eosd
fi
%endif
# TODO (esindril): This should be enabled when we move to systemd for fuse
# %if %{use_systemd}
# %config %{_sysconfdir}/sysconfig/eosd_env.example
# %{_prefix}/lib/systemd/system/eosd@.service
# %{_sbindir}/eos_start_pre.sh
# %else
# %{_sysconfdir}/rc.d/init.d/eosd
# %endif
# %post -n eos-fuse-sys
# %if %{use_systemd}
# systemctl daemon-reload > /dev/null 2>&1 || :
# %endif
# %if %{?fedora:1}%{!?fedora:0} || 0%{?rhel} >= 7 || 0%{?el7} == 1
# echo "Skipping chkconfig for eosd"
# %else
# /sbin/chkconfig --add eosd
# %endif
# %preun -n eos-fuse-sys
# %if %{?fedora:1}%{!?fedora:0} || 0%{?rhel} >= 7 || 0%{?el7} == 1
# echo "Skipping chkconfig for eosd"
# %else
# if [ $1 = 0 ]; then
# echo "Stopping EOS FUSE services"
# %if %{use_systemd}
# systemctl stop eosd@* > /dev/null 2>&1 || :
# %else
# /sbin/service eosd stop > /dev/null 2>&1 || :
# %endif
# /sbin/chkconfig --del eosd
# fi
# %endif
#-------------------------------------------------------------------------------
# Package eos-fusex
#-------------------------------------------------------------------------------
%package -n eos-fusex
Summary: The new EOS fuse client
Group: Applications/File
Requires: eos-fusex-core = @CPACK_PACKAGE_VERSION@
Requires: eos-fusex-selinux = @CPACK_PACKAGE_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
Requires: xrootd-client >= %{xrootd_version}
Requires: eos-client = @CPACK_PACKAGE_VERSION@
Requires: fuse
Requires: jemalloc
%if %{use_richacl}
Requires: librichacl, richacl >= 1.12
%endif
%description -n eos-fusex-core
The new EOS fuse core containing eosxd.
%files -n eos-fusex-core
%defattr(-, root, root, -)
%{_bindir}/eosxd
/sbin/mount.eosx
%{_sysconfdir}/logrotate.d/eos-fusex-logs
%dir %attr(755,daemon,daemon) /var/log/eos/
%dir %attr(755,daemon,daemon) /var/log/eos/fusex/
%dir %attr(755,daemon,daemon) /var/cache/eos/
%dir %attr(755,daemon,daemon) /var/cache/eos/fusex/
%if 0%{distribution} == 5 || 0%{distribution} == 6
%config(noreplace) %{_sysconfdir}/fuse.conf
%{_sysconfdir}/fuse.conf.eos
%else
%{_sysconfdir}/fuse.conf.eos
%endif
#-------------------------------------------------------------------------------
# Package eos-fusex-selinux
#-------------------------------------------------------------------------------
%package -n eos-fusex-selinux
Summary: The new EOS fuse client selinux configuration
Group: Applications/File
%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-srm
#-------------------------------------------------------------------------------
%package -n eos-srm
Summary: The EOS srm script package for checksumming and space
Group: Applications/File
Requires: eos-client
%description -n eos-srm
The EOS srm package.
%files -n eos-srm
%defattr(-, root, root, -)
%{_sbindir}/eos-srm-used-bytes
%{_sbindir}/eos-srm-max-bytes
%{_sbindir}/eos-srm-checksum
#-------------------------------------------------------------------------------
# Package eos-testkeytab
#-------------------------------------------------------------------------------
%package -n eos-testkeytab
Summary: The EOS testkeytab package
Group: Applications/File
%description -n eos-testkeytab
Contains an example keytab file.
%files -n eos-testkeytab
%config(noreplace) %attr(-, daemon, daemon) %{_sysconfdir}/eos.keytab
#-------------------------------------------------------------------------------
# Package eos-archive only for >= SLC6
#-------------------------------------------------------------------------------
%if 0%{?rhel} >= 6
%package -n eos-archive
Summary: The EOS archive daemon
Group: Applications/File
Requires: python-daemon python-zmq
Requires: xrootd-python >= %{xrootd_version}
%description -n eos-archive
The EOS archive daemon.
%files -n eos-archive
%defattr(-, root, root, -)
/usr/lib/python*
%{_bindir}/eosarchived.py
%{_bindir}/eosarch_run.py
%{_bindir}/eosarch_reconstruct.py
%config(noreplace) %{_sysconfdir}/sysconfig/eosarchived
%config(noreplace) %{_sysconfdir}/eosarchived.conf
%{_sysconfdir}/rc.d/init.d/eosarchived
%dir %attr(755,daemon,daemon) %{_localstatedir}/log/eos/archive/
%dir %attr(755,daemon,daemon) %{_localstatedir}/eos/archive/
%post -n eos-archive
case "$1" in
1)
# Initial installation
/sbin/chkconfig --add eosarchived
echo "Starting EOS archive services"
/sbin/service eosarchived restart > /dev/null 2>&1 || :
;;
2)
# Upgrade
echo "Stopping EOS archive services"
/sbin/service eosarchived stop > /dev/null 2>&1 || :
/sbin/chkconfig --del eosarchived
# In case runlevels changed
/sbin/chkconfig --add eosarchived
;;
esac
%preun -n eos-archive
case "$1" in
0)
# Un-install
echo "Stopping EOS archive services"
/sbin/service eosarchived stop > /dev/null 2>&1 || :
/sbin/chkconfig --del eosarchived || :
;;
1)
# Upgrade
echo "Starting EOS archive services"
/sbin/service eosarchived restart > /dev/null 2>&1 || :
;;
esac
%endif
#-------------------------------------------------------------------------------
# Package eos-test
#-------------------------------------------------------------------------------
%package -n eos-test
Summary: The EOS test package
Group: Applications/File
Requires: cadaver bc davix
%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, -)
%{_sbindir}/eos-instance-test
%{_sbindir}/eos-instance-test-ci
%{_sbindir}/eos-rain-test
%{_sbindir}/eos-drain-test
%{_sbindir}/eos-http-upload-test
%{_sbindir}/eoscp-rain-test
%{_sbindir}/eos-fuse-test
%{_sbindir}/eos-fst-test
%{_sbindir}/eos-oc-test
%{_sbindir}/fusex-benchmark
%{_sbindir}/eos-fusex-certify
%{_sbindir}/xrdcpabort
%{_sbindir}/xrdcpappend
%{_sbindir}/xrdcpposixcache
%{_sbindir}/xrdcpextend
%{_sbindir}/xrdcpholes
%{_sbindir}/xrdcpbackward
%{_sbindir}/xrdcpdownloadrandom
%{_sbindir}/xrdcprandom
%{_sbindir}/xrdcpshrink
%{_sbindir}/xrdcptruncate
%{_sbindir}/xrdcppartial
%{_sbindir}/xrdstress
%{_sbindir}/xrdstress.exe
%{_sbindir}/eos-io-test
%{_sbindir}/eos-io-tool
%attr(444,daemon,daemon) /var/eos/test/fuse/untar/untar.tgz
%attr(444,daemon,daemon) /var/eos/test/fuse/untar/xrootd.tgz
#-------------------------------------------------------------------------------
# Package eos-cleanup
#-------------------------------------------------------------------------------
%package -n eos-cleanup
Summary: The EOS test package
Group: Applications/File
%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
%if %{?yumrpm:1}%{!?yumrpm:0} == 1
#-------------------------------------------------------------------------------
# Package eos-repo-el6
#-------------------------------------------------------------------------------
%package -n eos-repo-el6
Version: generic
Release: 1
BuildArch: noarch
Summary: The EOS YUM repo configuration for EL6
Group: Applications/File
%description -n eos-repo-el6
Contains a yum configuration file for the production EOS EL6 repo
%files -n eos-repo-el6
%defattr(-, root, root, -)
%{_sysconfdir}/yum.repos.d/eos-el6.repo
#-------------------------------------------------------------------------------
# Package eos-repo-el7
#-------------------------------------------------------------------------------
%package -n eos-repo-el7
Version: generic
Release: 1
BuildArch: noarch
Summary: The EOS YUM repo configuration for EL7
Group: Applications/File
%description -n eos-repo-el7
Contains a yum configuration file for the production EOS EL7 repo
%files -n eos-repo-el7
%defattr(-, root, root, -)
%{_sysconfdir}/yum.repos.d/eos-el7.repo
#-------------------------------------------------------------------------------
# Package eos-repo-el6-dev
#-------------------------------------------------------------------------------
%package -n eos-repo-el6-dev
Version: generic
Release: 1
BuildArch: noarch
Summary: The EOS developement YUM repo configuration for EL6
Group: Applications/File
%description -n eos-repo-el6-dev
Contains a yum configuration file for the development EOS EL6 repo
%files -n eos-repo-el6-dev
%defattr(-, root, root, -)
%{_sysconfdir}/yum.repos.d/eos-el6-dev.repo
#-------------------------------------------------------------------------------
# Package eos-repo-el7-dev
#-------------------------------------------------------------------------------
%package -n eos-repo-el7-dev
Version: generic
Release: 1
BuildArch: noarch
Summary: The EOS development YUM repo configuration for EL7
Group: Applications/File
%description -n eos-repo-el7-dev
Contains a yum configuration file for the development EOS EL7 repo
%files -n eos-repo-el7-dev
%defattr(-, root, root, -)
%{_sysconfdir}/yum.repos.d/eos-el7-dev.repo
%endif
%endif