#------------------------------------------------------------------------------- # Helper macros and variables #------------------------------------------------------------------------------- %define _unpackaged_files_terminate_build 0 %define distribution %(/usr/lib/rpm/redhat/dist.sh --distnum) %define devtoolset devtoolset-8 %define cmake cmake3 %define compiler gcc # 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 AddressSanitizer. To enable it, # pass the "--with asan" flag to the rpmbuild command %bcond_without asan # By default we build without code coverage. To enable it, # pass the "--with coverage" flag to the rpmbuild command %bcond_without coverage # By default we use eosprotobuf3 for EL7 %bcond_without eos_protobuf3_rh # By default we don't use eosxrootd for EL7 %bcond_without eos_xrootd_rh # Define required dependency for XRootD %define eos_xrootd_version_min 0:4.11.0 %define xrootd_version_min 1:4.11.0 %define major_version 4 %define release_version 1 # release tags like x.y.z-1 enable automatically to build with eos-xrootd %if "%release_version" == "1" %define _with_eos_xrootd_rh 1 %endif #------------------------------------------------------------------------------- # Compute additional macros based on environment or existing definitions #------------------------------------------------------------------------------- %if %{?_with_clang:1}%{!?_with_clang:0} %define compiler clang %endif %if %{?_with_asan:1}%{!?_with_asan:0} %define devtoolset devtoolset-8 %endif %if %{?fedora:1}%{!?fedora:0} %define cmake cmake %endif %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 #------------------------------------------------------------------------------- # Custom strip command for SLC6, CC7 #------------------------------------------------------------------------------- %if "%{compiler}" == "gcc" %if 0%{distribution} == 6 || 0%{distribution} == 7 %global __strip /opt/rh/%{devtoolset}/root/usr/bin/strip %endif %endif #------------------------------------------------------------------------------- # Package definitions #------------------------------------------------------------------------------- Summary: The EOS project Name: eos Version: 4.6.7 Release: 1%{dist} Prefix: /usr License: none Group: Applications/File Source: %{name}-%{version}-1.tar.gz BuildRoot: %{_tmppath}/%{name}-root # Add EPEL repository explicitly which holds many of the other dependencies %if 0%{?distribution} == 6 BuildRequires: sl-release-scl Requires: sl-release-scl %else %if 0%{?distribution} == 7 BuildRequires: epel-release Requires: epel-release %endif %endif BuildRequires: %{cmake} >= 3.3 # ---------------------- # select xrootd package # ---------------------- %if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0} # Install eos-xrootd %if 0%{?distribution} == 7 BuildRequires: eos-xrootd == %{eos_xrootd_version_min} # dont' put an explicit dependency on xrootd because eos-xrootd hides the shared libraries from provide %global __requires_exclude ^libXrd* %else # Install default xrootd 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 # Install default xrootd 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 # ----------------------- # select protobuf package # ----------------------- %if ! %{without eos_protobuf3_rh} # Install eos-protobuf3 %if 0%{?distribution} == 7 BuildRequires: eos-protobuf3 = 3.5.1-5.el7.cern.eos BuildRequires: eos-protobuf3-compiler = 3.5.1-5.el7.cern.eos BuildRequires: eos-protobuf3-devel = 3.5.1-5.el7.cern.eos # don't put an explicit dependency on protobuf because eos-protobuf3 hides shared libraries from provide %if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0} %global __requires_exclude ^(libprotobuf.so.*$|libXrd*) %else %global __requires_exclude ^libprotobuf.so.*$ %endif %else %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 %endif %else %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 %endif BuildRequires: git, readline-devel BuildRequires: openssl, openssl-devel BuildRequires: ncurses, ncurses-devel BuildRequires: zlib, zlib-devel BuildRequires: fuse-devel, fuse >= 2.5 BuildRequires: krb5-devel %if %{use_richacl} BuildRequires: librichacl-devel, richacl >= 1.12 %endif BuildRequires: redhat-rpm-config 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 BuildRequires: cppunit-devel BuildRequires: help2man %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 BuildRequires: grpc, grpc-devel, grpc-plugins %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 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 "%{compiler}" == "gcc" %if 0%{distribution} == 6 || 0%{distribution} == 7 BuildRequires: %{devtoolset} BuildRequires: %{devtoolset}-binutils-devel # We want swap-support on eosxd - requires rocksdb KV BuildRequires: eos-rocksdb = 5.7.3-1%{dist} %else BuildRequires: binutils-devel %endif %endif %if "%{compiler}" == "clang" BuildRequires: clang BuildRequires: libatomic Requires: libatomic %if 0%{distribution} == 7 BuildRequires: llvm-toolset-7 %endif %endif %if %{?_with_asan:1}%{!?_with_asan:0} %if 0%{distribution} == 6 || 0%{distribution} == 7 BuildRequires: %{devtoolset}-libasan-devel %else BuildRequires: libasan %endif %endif %if %{use_systemd} BuildRequires: systemd %endif %description The EOS software package. %prep %setup -n %{name}-%{version}-1 %global build_type RelWithDebInfo %global build_flags -DBUILD_MANPAGES=1 -DFUSEXCLIENT=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_coverage:1}%{!?_with_coverage:0} %global build_type Debug %global build_flags %{build_flags} -DCOVERAGE=1 -DCOV_CROSS_PROFILE=1 %endif %build test -e $RPM_BUILD_ROOT && rm -r $RPM_BUILD_ROOT mkdir -p build cd build %if "%{?compiler}" == "gcc" %if 0%{distribution} == 6 || 0%{distribution} == 7 scl enable %{devtoolset} "env QA_RPATHS=3 %{cmake} ../ -DRELEASE=1 -DCMAKE_BUILD_TYPE=%{build_type} -DXROOTD_ROOT_DIR=/opt/eos/xrootd/ %{build_flags}" %else %{cmake} ../ -DRELEASE=1 -DCMAKE_BUILD_TYPE=%{build_type} %{build_flags} %endif %else %if 0%{distribution} == 7 scl enable llvm-toolset-7 "env QA_RPATHS=3 CC=clang CXX=clang++ %{cmake} ../ -DRELEASE=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_RPATH=/lib64/:/usr/lib64/ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=true -DXROOTD_ROOT_DIR=/opt/eos/xrootd/ %{build_flags}" %else CC=clang CXX=clang++ %{cmake} ../ -DRELEASE=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=true %{build_flags} %endif %endif %{__make} %{_smp_mflags} %install 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 # ---------------------- # select xrootd package # ---------------------- %if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0} # Install eos-xrootd %if 0%{?distribution} == 7 Requires: eos-xrootd == %{eos_xrootd_version_min} %else Requires: xrootd >= %{xrootd_version_min} Requires: xrootd-client >= %{xrootd_version_min} Requires: xrootd-private-devel >= %{xrootd_version_min} %endif %else Requires: xrootd >= %{xrootd_version_min} Requires: xrootd-client >= %{xrootd_version_min} Requires: xrootd-private-devel >= %{xrootd_version_min} %endif Requires: eos-client = 4.6.7 Requires: libmicrohttpd >= 0.9.38 Requires: acl Requires: gdb Requires: jemalloc Requires: jsoncpp Requires: psmisc Requires: libcurl Requires: logrotate # ----------------------- # select protobuf package # ----------------------- %if ! %{without eos_protobuf3_rh} # Install eos-protobuf3 %if 0%{?distribution} == 7 Requires: eos-protobuf3 = 3.5.1-5.el7.cern.eos %else %if %{?fedora}%{!?fedora:0} >= 27 Requires: protobuf >= 3.3 %else Requires: protobuf3 >= 3.3 %endif %endif %else %if %{?fedora}%{!?fedora:0} >= 27 Requires: protobuf >= 3.3 %else Requires: protobuf3 >= 3.3 %endif %endif %if %{use_systemd} Requires: systemd %else Requires: chkconfig Requires: initscripts Requires: sysvinit-tools %endif %if 0%{?rhel} == 6 || 0%{?el6} == 1 BuildRequires: zeromq3, zeromq3-devel Requires: zeromq3 %else BuildRequires: zeromq, zeromq-devel, cppzmq-devel Requires: zeromq %endif BuildRequires: eos-folly = 2019.11.11.00-1%{dist} Requires: eos-folly = 2019.11.11.00-1%{dist} %description -n eos-server The EOS server installation containing MGM, FST & MQ service. %files -n eos-server %defattr(-, root, root, -) %{_bindir}/eos-ns-convert %{_bindir}/eos-ns-convert-to-locality-hashes %{_bindir}/eos-dump-proto-md %{_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-fsck-fs %{_sbindir}/eos-adler32 %{_sbindir}/eos-mmap %{_sbindir}/eos-repair-tool %{_sbindir}/eos-ioping %{_sbindir}/eos-iobw %{_sbindir}/eos-iops %{_sbindir}/eos-leveldb-inspect %{_sbindir}/eos-filter-stacktrace %{_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}/libXrdEosFst-4.so %{_libdir}/libEosNsInMemory.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 %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) %{_localstatedir}/eos %dir %attr(700,daemon,daemon) %{_localstatedir}/eos/html %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(555,daemon,daemon) %{_localstatedir}/eos/wfe/bash/shell %exclude %dir %{_localstatedir}/eos/archive/ %exclude %dir %{_localstatedir}/log/eos/archive/ %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 #------------------------------------------------------------------------------- # Package eos-ns-inspect #------------------------------------------------------------------------------- %package -n eos-ns-inspect Summary: EOS namespace inspection tool for instance administrators Group: Applications/File # Select xrootd package %if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0} # Install eos-xrootd %if 0%{?distribution} == 7 Requires: eos-xrootd == %{eos_xrootd_version_min} %else Requires: xrootd-client >= %{xrootd_version_min} %endif %else Requires: xrootd-client >= %{xrootd_version_min} %endif # Select protobuf package %if ! %{without eos_protobuf3_rh} # Install eos-protobuf3 %if 0%{?distribution} == 7 Requires: eos-protobuf3 = 3.5.1-5.el7.cern.eos %else %if %{?fedora}%{!?fedora:0} >= 27 Requires: protobuf >= 3.3 %else Requires: protobuf3 >= 3.3 %endif %endif %else %if %{?fedora}%{!?fedora:0} >= 27 Requires: protobuf >= 3.3 %else Requires: protobuf3 >= 3.3 %endif %endif BuildRequires: eos-folly = 2019.11.11.00-1%{dist} Requires: eos-folly = 2019.11.11.00-1%{dist} %description -n eos-ns-inspect EOS namespace inspection tool for instance administrators %files -n eos-ns-inspect %defattr(-, root, root, -) %{_bindir}/eos-ns-inspect %endif #------------------------------------------------------------------------------- # Package eos-client #------------------------------------------------------------------------------- %package -n eos-client Summary: The EOS shell client Group: Applications/File %if 0%{?rhel} == 6 || 0%{?el6} == 1 Requires: zeromq3 %else Requires: zeromq %endif # Select xrootd package %if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0} # Install eos-xrootd %if 0%{?distribution} == 7 Requires: eos-xrootd == %{eos_xrootd_version_min} %else Requires: xrootd-client >= %{xrootd_version_min} %endif %else Requires: xrootd-client >= %{xrootd_version_min} %endif # Select protobuf package %if ! %{without eos_protobuf3_rh} # Install eos-protobuf3 %if 0%{?distribution} == 7 Requires: eos-protobuf3 %else %if %{?fedora}%{!?fedora:0} >= 27 Requires: protobuf >= 3.3 %else Requires: protobuf3 >= 3.3 %endif %endif %else %if %{?fedora}%{!?fedora:0} >= 27 Requires: protobuf >= 3.3 %else Requires: protobuf3 >= 3.3 %endif %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}/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 # This file is required by both the eos-fuse and eos-fusex package, therefore # to avoid any conflicts we distribute it with eos-client. %if 0%{distribution} == 6 %config(noreplace) %{_sysconfdir}/fuse.conf %{_sysconfdir}/fuse.conf.eos %else %{_sysconfdir}/fuse.conf.eos %endif # Documentation %doc %{_mandir}/man1/ #------------------------------------------------------------------------------- # Package eos-fuse #------------------------------------------------------------------------------- %package -n eos-fuse Summary: The new EOS fuse client Group: Applications/File Requires: eos-fuse-core = 4.6.7 Requires: eos-fuse-sysv = 4.6.7 %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 # ---------------------- # select xrootd package # ---------------------- %if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0} # Install eos-xrootd %if 0%{?distribution} == 7 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 = 4.6.7 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) %{_localstatedir}/log/eos %dir %attr(755,daemon,daemon) %{_localstatedir}/log/eos/fuse %dir %attr(0755, root, root) %{_localstatedir}/run/eosd/ %dir %attr(1777, root, root) %{_localstatedir}/run/eosd/credentials/ %dir %attr(1777, root, root) %{_localstatedir}/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 %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 = 4.6.7 %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 = 4.6.7 Requires: eos-fusex-selinux = 4.6.7 Requires: eos-fusex-cern-autofs = 4.6.7 %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 # ---------------------- # select xrootd package # ---------------------- %if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0} # Install eos-xrootd %if 0%{?distribution} == 7 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 = 4.6.7 Requires: fuse Requires: jemalloc Requires: attr %if %{use_richacl} Requires: librichacl, richacl >= 1.12 %endif %if 0%{?rhel} == 6 || 0%{?el6} == 1 Requires: zeromq3 %else Requires: zeromq %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) %{_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/ #------------------------------------------------------------------------------- # 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 #------------------------------------------------------------------------------- # Package eos-fusex-cern-autofs #------------------------------------------------------------------------------- %package -n eos-fusex-cern-autofs Summary: The autofs mounter for CERN EOS user/project mounting Group: Applications/File %description -n eos-fusex-cern-autofs The autofs mounter for CERN EOS user/project mounting %files -n eos-fusex-cern-autofs %defattr(-, root, root, -) /sbin/automount.cern.eos %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 # ---------------------- # select xrootd package # ---------------------- %if %{?_with_eos_xrootd_rh:1}%{!?_with_eos_xrootd_rh:0} # Install eos-xrootd %if 0%{?distribution} == 7 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 %defattr(-, eosarchi, c3, -) %{_bindir}/eosarchived.py %{_bindir}/eosarch_run.py %{_bindir}/eosarch_reconstruct.py %{python_sitelib}/eosarch* %config(noreplace) %{_sysconfdir}/eosarchived.conf %if %{use_systemd} %{_prefix}/lib/systemd/system/eosarchived.service %config(noreplace) %{_sysconfdir}/sysconfig/eosarchived_env %else %{_sysconfdir}/rc.d/init.d/eosarchived %config(noreplace) %{_sysconfdir}/sysconfig/eosarchived %endif %dir %attr(755,eosarchi,c3) %{_localstatedir}/eos/archive/ %dir %attr(755,eosarchi,c3) %{_localstatedir}/log/eos/archive/ %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" %if %{use_systemd} systemctl daemon-reload > /dev/null 2>&1 || : systemctl restart eosarchived > /dev/null 2>&1 || : %else /sbin/chkconfig --add eosarchived /sbin/service eosarchived restart > /dev/null 2>&1 || : %endif ;; 2) # Upgrade %if %{use_systemd} echo "Restarting EOS archive services" systemctl daemon-reload > /dev/null 2>&1 || : systemctl restart eosarchived > /dev/null 2>&1 || : %else echo "Stopping EOS archive services" /sbin/service eosarchived stop > /dev/null 2>&1 || : # In case runlevels changed /sbin/chkconfig --del eosarchived /sbin/chkconfig --add eosarchived %endif ;; esac %preun -n eos-archive case "$1" in 0) # Uninstall echo "Stopping EOS archive services" %if %{use_systemd} systemctl stop eosarchived > /dev/null 2>&1 || : %else /sbin/service eosarchived stop > /dev/null 2>&1 || : /sbin/chkconfig --del eosarchived || : %endif ;; 1) # Upgrade %if %{use_systemd} == 0 echo "Starting EOS archive services" /sbin/service eosarchived restart > /dev/null 2>&1 || : %endif ;; esac %endif #------------------------------------------------------------------------------- # Package eos-test #------------------------------------------------------------------------------- %package -n eos-test Summary: The EOS test package Group: Applications/File Requires: cadaver bc davix jq dmidecode %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-fsck-test %{_sbindir}/eos-rename-test %{_sbindir}/eos-grpc-test %{_sbindir}/eos-token-test %{_sbindir}/eos-http-upload-test %{_sbindir}/eoscp-rain-test %{_sbindir}/eos-fuse-test %{_sbindir}/eos-fusex-tests %{_sbindir}/eos-fst-test %{_sbindir}/eos-oc-test %{_sbindir}/fusex-benchmark %{_sbindir}/eos-fusex-certify %{_sbindir}/eos-fusex-ioverify %{_sbindir}/xrdcpabort %{_sbindir}/xrdcpappend %{_sbindir}/xrdcpposixcache %{_sbindir}/xrdcpextend %{_sbindir}/xrdcpholes %{_sbindir}/xrdcpbackward %{_sbindir}/xrdcpdownloadrandom %{_sbindir}/xrdcprandom %{_sbindir}/xrdcpshrink %{_sbindir}/xrdcptruncate %{_sbindir}/xrdcppartial %{_sbindir}/xrdcpslowwriter %{_sbindir}/xrdstress %{_sbindir}/xrdstress.exe %{_sbindir}/eos-io-test %{_sbindir}/eos-io-tool %{_sbindir}/eos-unit-tests %{_sbindir}/eos-fst-unit-tests %{_sbindir}/eos-ns-quarkdb-tests %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 %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 %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