# Copyright (C) 2014, 2016 Dave Love, Liverpool University # Licence for this file is as for the source. # Fixme: Split further (server and client -- see Debian packaging) # Distribute a tarball with configure, scanner, and parser # files included to avoid regenerating. # Build both -infiniband and -tcp packages. Not clear how to # do that within Fedora guidelines -- alternatives for all the # binaries and the library? # rpmlint complains about incorrect FSF address in COPYING and # no reload entry in init files # Build one or both security options # Build hadoop component, at least in Fedora, or just distribute the source? # Build webpack # Make jni work # Which targets have the Linux module natively? # Use "rpmbuild --with infiniband" to build with Infiniband but # without TCP BMI support. (Building with both seems to be # problematic.) %bcond_without infiniband %if %{with infiniband} %global transport infiniband %else %global transport tcp %endif # This is needed for hadoop, at least, but requires maven, which # doesn't seem to be available for EPEL6 generally, only RHEL6 %if 0%{?rhel} == 6 %bcond_with jni %else # jni fails with # src/client/jni/libPVFS2POSIXJNI.c:29:47: fatal error: org_orangefs_usrint_PVFS2POSIXJNI.h: No such file or directory # #include "org_orangefs_usrint_PVFS2POSIXJNI.h" %bcond_with jni %endif # security options (not tested) %bcond_with sec-key %bcond_with sec-cert %global svn .svn12997 Name: orangefs Version: 2.9.7 Release: 1%{?svn}%{?dist} Summary: Branch of the Parallel Virtual File System (PVFS2) # COPYING just specifies "GNU General Public License" for the kernel modules. # Assume v2, to be consistent with the LGPLv2 rest and Linux. License: LGPLv2 and GPLv2 URL: http://www.orangefs.org/ #Source0: http://orangefs.org/downloads/%version/source/%{name}-%{version}%{?svn}.tar.gz # from svn export Source0: %{name}-%{version}%{?svn}.tar.gz Source1: orangefs-server Source2: orangefs-client # fix shared lib sonames Patch1: orangefs-soname.patch # avoid bundled lmdb Patch2: orangefs-lmdb.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} BuildRequires: flex bison libaio-devel gtk2-devel BuildRequires: automake BuildRequires: libattr-devel libacl-devel latex2html fuse-devel BuildRequires: perl(Math::BigInt) lmdb-devel %if %{with sec-key}%{with sec-cert} BuildRequires: openssl-devel %endif # This doesn't work on Fedora COPR, which currently just reports an EPEL6 # kernel version -- see below #BuildRequires: kernel-devel-uname-r = %%(uname -r) BuildRequires: kernel-devel BuildRequires: texlive-texmf-latex java-devel dos2unix # See webpack below #BuildRequires: httpd-devel %if %{with jni} %if %(grep -q 'Red Hat Enterprise Linux Server release 6' /etc/redhat-release && echo 1 || echo 0) # This is from the rhel-server-rhscl-6-rpms repo BuildRequires: maven30-maven-compiler-plugin %else Buildrequires: maven-compiler-plugin %endif %endif %if 0%{?fedora} > 19 BuildRequires: apache-commons-logging %else BuildRequires: jakarta-commons-logging %endif %if %{with infiniband} BuildRequires: libibverbs-devel %endif %if %{with sec-cert} BuildRequires: openldap-devel %endif # Assume we should have the db utilities Requires: lmdb %ifarch aarch64 %global usrint 0 %else %global usrint 1 %endif %global desc \ Orange File System is a branch of the Parallel Virtual File\ System. Like PVFS, Orange is a parallel file system designed for use\ on high end computing (HEC) systems that provides very high\ performance access to disk storage for parallel applications. OrangeFS\ is different from PVFS in that we have developed features for OrangeFS\ that are not presently available in the PVFS main distribution. While\ PVFS development tends to focus on specific very large systems, Orange\ considers a number of areas that have not been well supported by PVFS\ in the past. OrangeFS development tends to be driven by input from\ users with specific needs. PVFS design characteristics that are common\ with OrangeFS include:\ Performance\ Reliability\ Optimized MPI-IO support\ Hardware Independence\ Painless Deployment\ Research Platform %description %desc %package %transport Summary: Branch of the Parallel Virtual File System (PVFS2) # #Obsoletes: orangefs < 2.9.5 # # Replaced by grafana support # Obsoletes: orangefs-karma < %version-%release # Obsoletes: orangefs-pacemaker < %version-%release # Provides: orangefs-pacemaker = %version-%release # Provides: pvfs2 = %version-%release %if %{with infiniband} Conflicts: %name-tcp %else Conflicts: %name-infiniband %endif Requires: %{name}-libs-%transport%{?_isa} = %{version}-%{release} %description %transport %desc %if %{with infiniband} This package uses Infiniband networking. %else This package uses TCP networking. %endif %package libs-%transport Summary: Library support for %name-%transport (PVFS2) # Account for sonames in previous version against which things may be linked # Provides: libpvfs2.so()(64bit) # Provides: libpvfs2-threaded.so()(64bit) # Provides: libofs.so()(64bit) %if %{with infiniband} Conflicts: %name-libs-tcp %else Conflicts: %name-libs-infiniband %endif Obsoletes: %name-libs < %version-%release %description libs-%transport Library support for %name-%transport. %package dkms Summary: DKMS kernel module packaging for %name Requires: dkms License: LGPLv2 BuildArch: noarch Obsoletes: orangefs-dkms%{?_isa} < %version-%release %description dkms DKMS kernel module packaging for %name %package %transport-devel Group: Development/Libraries Summary: Library files for %name-%transport %if %{with sec-key}%{with sec-cert} Requires: openssl-devel%{?_isa} %endif %if %{with infiniband} Requires: libibverbs-devel%{?_isa} %endif Requires: %{name}-libs-%transport%{?_isa} = %{version}-%{release} %description %transport-devel Library files for %name-%transport %prep %setup -q -n %name-%version%{?svn} # commons logging rm -r src/client/jni/lib/* rm -r src/apps/admin/lmdb src/common/lmdb %patch1 -p1 -b .soname %patch2 -p1 -b .lmdb # gets in the way on f23 (linked to the wrong place?) rm -f ./src/client/webpack/ltmain.sh autoreconf -fiv -I ./maint/config # spurious-executable-perm on a lot of these find -name \*.[ch] -a -perm -u=x -exec chmod 0644 {} \; chmod 0644 examples/certs/*.cnf dos2unix src/common/security/seccache.[ch] cat << 'EOF' >dkms.conf # DKMS configuration for the pvfs2 kernel module. -*- sh -*- PACKAGE_NAME=orangefs PACKAGE_VERSION="%version" BUILT_MODULE_NAME[0]=pvfs2 BUILT_MODULE_LOCATION[0]="src/kernel/linux-2.6" DEST_MODULE_LOCATION[0]="/extra" AUTOINSTALL=yes MAKE[0]="( cd ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build; \ ./configure --with-kernel=%{_usrsrc}/kernels/$kernelver \ HAVE_FLEX=: HAVE_BISON=: \ CFLAGS=\"$(echo \"$CFLAGS\" | sed -es/-Wall/-Wformat/)\" ); \ make -C ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build KDIR=%{_usrsrc}/kernels/$kernelver just_kmod" CLEAN="make -C ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/src/kernel/linux-2.6 -k clean DIST_RELEASE=true || true" EOF %{?svn:./prepare} %build %if 0%{?rhel} == 6 PATH=${PATH}:/opt/rh/maven30/root/usr/bin %endif # See BR comment #kv=$(rpm -q kernel-devel | sort | tail -n1 | sed -es/kernel-devel-//) ks=$(ls -d %{_usrsrc}/kernels/* | tail -n1) export CFLAGS='-g -pipe' %configure --enable-ucache --enable-shared --disable-static \ --with-kernel=$ks --enable-fuse --with-db-backend=lmdb \ %if %{with jni} --with-jdk=%java_home --enable-jni \ %endif %if %{with infiniband} --with-openib=%{_prefix} --without-bmi-tcp \ %endif %if %{with sec-cert} --enable-security-cert \ %endif %if %{with sec-key} --enable-security-key \ %endif %if !%usrint --disable-usrint \ %endif CFLAGS="$(echo "$CFLAGS" | sed -es/-Wall/-Wformat/) -std=gnu89" \ %if 0%{?fedora} || 0%{?rhel} > 6 LDFLAGS="-Wl,--as-needed" %else CPPFLAGS="-I%_includedir/libdb48" LDFLAGS="-L%_libdir/libdb48 -Wl,--as-needed" %endif # else tends to fail in scanner directory %global _smp_mflags %nil make V=1 %{?_smp_mflags} SO_VER=3 SO_MINOR=0 SO_RELEASE=0 # We don't need the module, but this builds pvfs2-client too, kmod_install # below will build the module anyhow, and it does check that the module # build actually works. # LDFLAGS="-Wl,--as-needed" fails on ppc64, where it gets passed directly # to ld. %ifarch ppc64 make %{?_smp_mflags} V=1 LDFLAGS= kmod %else make %{?_smp_mflags} V=1 kmod %endif make %{?_smp_mflags} V=1 docs -k || true # failing (without security?) #pushd src/client/webpack #%%configure --enable-dav --enable-admin --enable-authn #popd %install mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_usrsrc} mkdir -p $RPM_BUILD_ROOT%_sysconfdir/init.d # kmod_install installs pvfs2-client too make DESTDIR=$RPM_BUILD_ROOT install kmod_install V=1 %{?_smp_mflags} SO_VER=3 SO_MINOR=0 SO_RELEASE=0 # Zap module -- use dkms instead rm -r $RPM_BUILD_ROOT/lib # rpmlint complains "hardcoded-library-path", but there's no relevant # macro, and the pacemaker package explicitly uses /usr/lib mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/orangefs install -m 755 examples/heartbeat/PVFS2 $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/orangefs install src/apps/kernel/linux/*mount_pvfs2.sh examples # fixme: install in sbin, etc? install -m 644 src/apps/user/{checkset_shmall_shmmax.linux,ucache.conf} examples # Tidy up for dkms. distclean zaps configure! DIST_RELEASE prevents # removing generated statecomp files, at least; otherwise the dkms target # needs flex and bison. Don't do docsclean, otherwise we currently lose # the docs for installation. make %{?_smp_mflags} clean DIST_RELEASE=true # source for dkms cp -a . $RPM_BUILD_ROOT%{_usrsrc}/%{name}-%{version} # We don't need/want all the stuff. Maybe could delete more, but note # that configure will fail if .in files go. pushd $RPM_BUILD_ROOT%{_usrsrc}/%{name}-%{version} rm -rf autom4te.cache install-windows test projects patches doc rm -rf */windows io/bmi/bmi_wintcp config.* ChangeLog debug* rm src/apps/admin/pvfs2-genconfig # pvfs2-server.rc.in needed by configure # heartbeat installed in OCF tree rm -rf examples windows doc find src/server src/client/{jni%{?usrint:,usrint},cp-library} -name \*.[ch] | xargs rm -f rm -f src/kernel/linux-2.6/pvfs2.ko* # make sure we don't try to run flex/bison touch src/common/statecomp/parser.[ch] src/common/statecomp/scanner.c %if %{with jni} mkdir -p $RPM_BUILD_ROOT%_jnidir mv $RPM_BUILD_ROOT%_libdir/*jar $RPM_BUILD_ROOT%_jnidir %endif popd install -m 755 %SOURCE1 %SOURCE2 $RPM_BUILD_ROOT%_sysconfdir/init.d mkdir -p $RPM_BUILD_ROOT%_datadir/%name cp -a src/client/{hadoop,webpack} $RPM_BUILD_ROOT%_datadir/%name # It seems ld scripts shouldn't have x set chmod -x $RPM_BUILD_ROOT%_libdir/liborangefsposix.so.* %post /sbin/chkconfig --add orangefs-client /sbin/chkconfig --add orangefs-server %preun /sbin/chkconfig --del orangefs-client /sbin/chkconfig --del orangefs-server %post libs-%transport -p /sbin/ldconfig %postun libs-%transport -p /sbin/ldconfig %post dkms dkms add -m %{name} -v %{version} --rpm_safe_upgrade dkms build -m %{name} -v %{version} || true %preun dkms dkms remove -m %{name} -v %{version} --all --rpm_safe_upgrade || true %files %transport %license COPYING %doc ChangeLog %{_bindir}/* %{_sbindir}/ucache* %{_sbindir}/pvfs2-client* %{_sbindir}/pvfs2-server # intended to be edited # fixme: use sysconfig file instead? %config(noreplace) %{_sbindir}/pvfs2-start-all %config(noreplace) %{_sbindir}/pvfs2-stop-all %doc AUTHORS ChangeLog COPYING CREDITS README* %{?usrint:src/client/usrint/README_UCACHE} %doc doc/*.pdf doc/*.txt %doc examples/ %{_mandir}/man*/* %exclude %{_bindir}/pvfs2-config # only hadoop, webpack here: %if %{with jni} %exclude %_datadir/%name/webpack %_datadir/%name %else %exclude %_datadir/%name %endif # see above about hardcoded-library-path %dir %{_prefix}/lib/ocf/resource.d/orangefs %dir %{_prefix}/lib/ocf/resource.d %dir %{_prefix}/lib/ocf %{_prefix}/lib/ocf/resource.d/orangefs/PVFS2 %{_sysconfdir}/init.d/* %files libs-%transport %{_libdir}/*.so.* %if %{with jni} %{_jnidir}/*.jar %endif %files %transport-devel %{_includedir}/*.h %{_libdir}/*.so %{_bindir}/pvfs2-config %files dkms %{_usrsrc}/%{name}-%{version} %changelog * Fri Sep 15 2017 Dave Love - 2.9.7-1.svn12997 - New version, based on pre-release code submitted for review - Use unbundled lmdb and add patch for that * Mon Jun 6 2016 Dave Love - 2.9.5-1 - New version - Some cleanups - Avoid requiring bison, flex for dkms - Make separately-named IB/TCP packages * Wed Jun 1 2016 Dave Love - 2.9.4-4.svn12439 - New svn version - Remove karma stuff * Mon May 23 2016 Dave Love - 2.9.4-4.svn12416 - New svn version - Revert mixed ib+tcp -- apparently still has problems - Remove openib patch * Mon Apr 11 2016 Dave Love - 2.9.4-3.svn12349 - Add openib patch - Update library soversions * Mon Apr 11 2016 Dave Love - 2.9.4-3.svn12349 - New version - Default to IB+TCP * Thu Mar 31 2016 Dave Love - 2.9.4-2.svn12324 - Don't configure with IB/security options for dkms * Tue Mar 29 2016 Dave Love - 2.9.4-1.svn12324 - New version from svn trunk - Use -std=gnu89 for gcc6 * Tue Mar 29 2016 Dave Love - 2.9.3-7.svn12310 - New version from svn * Tue Mar 8 2016 Dave Love - 2.9.3-6.svn12279 - Avoid library soname bump * Mon Mar 7 2016 Dave Love - 2.9.3-5.svn12279 - Updated version from svn; drop kmod, ucache patches * Mon Feb 1 2016 Dave Love - 2.9.3-4 - Don't require -libs for -dkms - Patch for kmod fixes from trunk - Patch checkset_shmall_shmmax.linux - Clean up installed files * Wed Dec 23 2015 Dave Love - 2.9.3-3 - Require flex, bison for dkms * Thu Jul 23 2015 Dave Love - 2.9.3-2 - Don't default to Infiniband (apparently not working ) * Mon Jul 20 2015 Dave Love - 2.9.3-1 - New version - Add patch to fix malloc redefinition - Drop some patches * Wed Jul 1 2015 Dave Love - 2.9.2-3 - Fix ACL handling * Wed Jul 1 2015 Dave Love - 2.9.2-2 - Fix build on Linux 4+ * Thu Jun 11 2015 Dave Love - 2.9.2-1 - New version - Drop selinux patch, add one for call of open * Thu Feb 19 2015 Dave Love - 2.9.1-2 - Disable jni -- build is looping - Patch to fix building against recent selinux * Tue Feb 17 2015 Dave Love - 2.9.1-1 - New version - Modify db BR - Remove %%defattr and add %%_isa to requires * Fri Dec 12 2014 Dave Love - 2.9.0-2 - Modify CFLAGS for configure to work in Fedora 21 * Wed Nov 19 2014 Dave Love - 2.9.0-1 - New version - Drop most patches - Remove old hadoop stuff - Install source for hadoop and webpack clients - Simplify libdb BR * Sat Oct 25 2014 Dave Love - 2.8.8.r11486-1 - Update to svn 2.8.8 branch (r11486) to fix crashes in library when filesystem not available - Drop kmod patch - Various adjustments * Tue Sep 16 2014 Dave Love - 2.8.8-4 - Install init files; tidy paths with macros * Sat Sep 13 2014 Dave Love - 2.8.8-3 - Support post-EPEL6 kernels - Always BR jakarta-commons-logging; BR automake - Address some rpmlint complaints - Merge pacemaker config into main package and own the directories - Don't require flex, verbs for dkms * Mon Jun 16 2014 Dave Love - 2.8.8-2 - BR kernel-devel, texlive-texmf-latex - Build JNI support and expurgate bundled common-logging - Provide hadoop option * Wed Mar 26 2014 Dave Love - 2.8.8-1 - Update to 2.8.8 - Remove -Wall from rpm CFLAGS - Move pvfs2-config to -devel - Sort out dkms properly * Thu Mar 6 2014 Dave Love - 2.8.7-1 - Initial packaging, somewhat based on a SuSE version