Name: zfs-fuse
Version: 0.6.9
Release: 8.20100709git%{?dist}
Summary: ZFS ported to Linux FUSE
Group: System Environment/Base
License: CDDL
URL: http://zfs-fuse.net/
# The source for this package was pulled from upstream's vcs. Use the
# following command to generate the tarball:
# wget -c 'http://gitweb.zfs-fuse.net/?p=official;a=snapshot;h=maint;sf=tgz' -O 'zfs-fuse-0.6.9-snapshot.tar.gz'
# Add as new source with:
# make new-sources FILES="zfs-fuse-0.6.9-snapshot.tar.gz"
Source00: %{name}/%{name}-%{version}-snapshot.tar.gz
Source01: zfs-fuse.init
Source02: zfs-fuse.scrub
Source03: zfs-fuse.sysconfig
BuildRequires: fuse-devel libaio-devel scons zlib-devel openssl-devel libattr-devel
Requires: fuse >= 2.7.4-1
Requires(post): chkconfig
Requires(preun): chkconfig initscripts
Requires(postun): initscripts
# (2010 karsten@redhat.com) zfs-fuse doesn't have s390(x) implementations for atomic instructions
ExcludeArch: s390
ExcludeArch: s390x
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
ZFS is an advanced modern general-purpose filesystem from Sun
Microsystems, originally designed for Solaris/OpenSolaris.
This project is a port of ZFS to the FUSE framework for the Linux
operating system.
Project home page is at http://zfs-fuse.net/
%prep
%setup -q -n official
f=LICENSE
%{__mv} $f $f.iso88591
iconv -o $f -f iso88591 -t utf8 $f.iso88591
%{__rm} -f $f.iso88591
%build
export CCFLAGS="%{optflags}"
pushd src
# %{__sed} -i -e 's/-pipe -Wall/%{optflags}/' SConstruct
# FIXME(uwe): This patch should not be necessary. Reported as http://zfs-fuse.net/issues/72
%{__sed} -i -e 's/\["-DDEBUG", optim\]/\["-DNDEBUG", optim\]/' SConstruct
# pushd lib/libzfs
# %{__sed} -i -e 's/cpppath.$/cpppath, LIBS = \["crypto"\])/' SConscript
# %{__sed} -i -e "s/^\#include <sys\\/vtoc.h>$/\#include <sys\\/vtoc.h>\\n\#include <sys\\/stat.h>\\n/" libzfs_pool.c
# popd
# pushd cmd/zdb
# %{__sed} -i -e "s/ssl'/ssl crypto'/" SConscript
# popd
# pushd cmd/zfs
# %{__sed} -i -e "s/ssl'/ssl crypto'/" SConscript
# popd
# pushd cmd/zpool
# %{__sed} -i -e "s/ssl'/ssl crypto'/" SConscript
# popd
scons debug=1 optim='%{optflags}'
%install
%{__rm} -rf %{buildroot}
pushd src
scons debug=1 install install_dir=%{buildroot}%{_bindir} man_dir=%{buildroot}%{_mandir}/man8/ cfg_dir=%{buildroot}/%{_sysconfdir}/%{name}
%{__install} -Dp -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
%{__install} -Dp -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/cron.weekly/98-%{name}-scrub
%{__install} -Dp -m 0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%clean
%{__rm} -rf %{buildroot}
%post
# echo "Post: $1 packages"
# Move cache if upgrading
oldcache=/etc/zfs/zpool.cache # this changed per 0.6.9, only needed when upgrading from earlier versions
newcache=/var/lib/zfs/zpool.cache
if [[ -f $oldcache && ! -e $newcache ]]; then
echo "Moving existing zpool.cache to new location"
mkdir -p $(dirname $newcache)
mv $oldcache $newcache
else
if [ -e $oldcache ]; then
echo "Note: old zpool.cache present but no longer used ($oldcache)"
fi
fi
if [ $1 = 1 ] ; then
echo "Initial install. Starting service"
/sbin/chkconfig --add %{name}
/sbin/service %{name} start >/dev/null 2>&1 || :
fi
%preun
# echo "Preun: $1 packages"
if [ $1 = 0 ] ; then
echo "Stopping service since we are uninstalling last package"
/sbin/service %{name} stop >/dev/null 2>&1 || :
/sbin/chkconfig --del %{name}
fi
%postun
# echo "Postun: $1 packages"
if [ $1 -ge 1 ] ; then
echo "Restarting since we have updated the package"
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
else
echo "Removing files since we removed the last package"
rm -rf /var/run/zfs
rm -rf /var/lock/zfs
fi
%files
%defattr(-, root, root, -)
%doc BUGS CHANGES contrib HACKING LICENSE README
%doc README.NFS STATUS TESTING TODO
%{_bindir}/zdb
%{_bindir}/zfs
%{_bindir}/zfs-fuse
%{_bindir}/zpool
%{_bindir}/zstreamdump
%{_bindir}/ztest
%{_initrddir}/%{name}
%{_sysconfdir}/cron.weekly/98-%{name}-scrub
%{_sysconfdir}/sysconfig/%{name}
%{_sysconfdir}/%{name}/zfs_pool_alert
%{_mandir}/man8/zfs-fuse.8.gz
%{_mandir}/man8/zdb.8.gz
%{_mandir}/man8/zfs.8.gz
%{_mandir}/man8/zpool.8.gz
%{_mandir}/man8/zstreamdump.8.gz
%changelog
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.9-8.20100709git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sun Aug 01 2010 Uwe Kubosch <uwe@kubosch.no> - 0.6.9-7.20100709git
- Moved to fedpkg and git
- Fixed missing dependency to libaio
* Fri Jul 09 2010 Uwe Kubosch <uwe@kubosch.no> - 0.6.9-6.20100709git
- Updated to upstream maintenance snapshot.
- Fixes build problems on EL5
- Added zfs-fuse man page
- Removed package patching of linked libraries
* Mon Jul 05 2010 Uwe Kubosch <uwe@kubosch.no> - 0.6.9-5
- Cleanup of RPM spec and init script
* Sun Jul 04 2010 Uwe Kubosch <uwe@kubosch.no> - 0.6.9-4
- Patched SConstruct to define NDEBUG instead of DEBUG to avoid debug code while still generating debug symbols
- Added moving of zfs.cache when updating from pre 0.6.9 version
* Sat Jul 03 2010 Uwe Kubosch <uwe@kubosch.no> - 0.6.9-2
- Updated to upstream stable release 0.6.9
- Patched default debug level from 0 to 1
- Fixed missing compiler flags and debug flag in build: BUG 595442
* Sat May 22 2010 Uwe Kubosch <uwe@kubosch.no> - 0.6.9_beta3-6
- Updated to upstream version 0.6.9_beta3
- Add more build requires to build on F13 BUG 565076
- Add patches for missing libraries and includes to build on F13 BUG 565076
- Added packages for ppc and ppc64
- Build on F13 BUG 565076
- Fixes BUG 558172
- Added man files
- Added zfs_pool_alert
- Added zstreamdump
- Fixed bug in automatic scrub script BUG 559518
* Mon Jan 04 2010 Uwe Kubosch <uwe@kubosch.no> - 0.6.0-6
- Added option for automatic weekly scrubbing.
Set ZFS_WEEKLY_SCRUB=yes in /etc/sysconfig/zfs-fuse to enable
- Changed ZFS_AUTOMOUNT option value from "1" to "yes" for better readability.
ZFS_AUTOMOUNT=1 deprecated and will be removed in version 0.7.0.
- Added option for killing processes with unknown working directory at zfs-fuse startup.
This would be the case if zfs-fuse crashed. Use with care. It may kill unrelated processes.
Set ZFS_KILL_ORPHANS=yes_really in /etc/sysconfig/zfs-fuse to enable.
- Relaxed dependency on fuse from 2.8.0 to 2.7.4 to allow installation on RHEL/Centos 5
* Sat Dec 26 2009 Uwe Kubosch <uwe@kubosch.no> - 0.6.0-5
- Removed chckconfig on and service start commands from install script
See https://fedoraproject.org/wiki/Packaging:SysVInitScript#Why_don.27t_we
* Sat Dec 26 2009 Uwe Kubosch <uwe@kubosch.no> - 0.6.0-4
- Updated to upstream version 0.6.0 STABLE
* Mon Nov 30 2009 Uwe Kubosch <uwe@kubosch.no> - 0.6.0-3
- Updated the home page URL to http://zfs-fuse.net/
* Sat Nov 28 2009 Uwe Kubosch <uwe@kubosch.no> - 0.6.0-2
- Corrected some KOJI build errors.
* Fri Nov 27 2009 Uwe Kubosch <uwe@kubosch.no> - 0.6.0-1
- Updated to upstream version 0.6.0 BETA
- Updated dependency to Fuse 2.8.0
- Minor change in spec: Source0 to Source00 for consistency
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-9.20081221.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Jun 10 2009 Karsten Hopp <karsten@redhat.com> 0.5.0-8.20081221.1
- excludearch s390, s390x as there is no implementation for atomic instructions
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-8.20081221
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Jan 24 2009 Uwe Kubosch <uwe@kubosch.no> - 0.5.0-7.20081221
- Updated etc/init.d/zfs-fuse init script after feedback from Rudd-O
Removed limits for the fuse process which could lead to a hung system
or use lots of memory.
* Sun Dec 28 2008 Uwe Kubosch <uwe@kubosch.no> - 0.5.0-6.20081221
- Updated etc/init.d/zfs-fuse init script after feedback from Rudd-O at
http://groups.google.com/group/zfs-fuse/browse_thread/thread/da94aa803bceef52
- Adds better wait at startup before mounting filesystems.
- Add OOM kill protection.
- Adds syncing of disks at shutdown.
- Adds pool status when asking for service status.
- Changed to start zfs-fuse at boot as default.
- Changed to start zfs-fuse right after installation.
- Cleanup of /var/run/zfs and /var/lock/zfs after uninstall.
* Sun Dec 24 2008 Uwe Kubosch <uwe@kubosch.no> - 0.5.0-5.20081221
- Development tag.
* Sun Dec 21 2008 Uwe Kubosch <uwe@kubosch.no> - 0.5.0-4.20081221
- Updated to upstream trunk of 2008-12-21
- Added config file in /etc/sysconfig/zfs
- Added config option ZFS_AUTOMOUNT=0|1 to mount filesystems at boot
* Tue Nov 11 2008 Uwe Kubosch <uwe@kubosch.no> - 0.5.0-3.20081009
- Rebuild after import into Fedora build system.
* Thu Oct 09 2008 Uwe Kubosch <uwe@kubosch.no> - 0.5.0-2.20081009
- Updated to upstream trunk of 2008-10-09
- Adds changes to make zfs-fuse build out-of-the-box on Fedora 9,
and removes the need for patches.
* Sat Oct 4 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.5.0-1
- initial build