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