Blob Blame History Raw
Summary:        Utility to force unused ext2 inodes and blocks to zero
Name:           zerofree
Version:        1.0.1
Release:        5%{?dist}
License:        GPL+
Group:          System Environment/Libraries

Source0:        http://intgat.tigress.co.uk/rmy/uml/%{name}-%{version}.tgz
Source1:        http://intgat.tigress.co.uk/rmy/uml/sparsify.c
Source2:        http://intgat.tigress.co.uk/rmy/uml/index.html
URL:            http://intgat.tigress.co.uk/rmy/uml/

BuildRequires:  e2fsprogs-devel

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)


%description
zerofree is a utility to set unused filesystem inodes and blocks of an
ext2 filesystem to zero.  This can improve the compressibility and
privacy of an ext2 filesystem.

This tool was inspired by the ext2fs privacy (i.e. secure deletion)
patch described in a Linux kernel mailing list thread.

WARNING: The filesystem to be processed should be unmounted or mounted
read-only.  The tool tries to check this before running, but you
should be careful.


%prep
%setup -q
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .


%build
make CC="gcc $RPM_OPT_FLAGS"
gcc $RPM_OPT_FLAGS sparsify.c -o sparsify -lext2fs


%install
rm -rf $RPM_BUILD_ROOT

install -D -p -m 755 zerofree $RPM_BUILD_ROOT%{_sbindir}/zerofree
install -D -p -m 755 sparsify $RPM_BUILD_ROOT%{_sbindir}/sparsify


%files
%defattr(-,root,root,-)
%doc COPYING index.html
%{_sbindir}/zerofree
%{_sbindir}/sparsify


%clean
rm -rf $RPM_BUILD_ROOT


%changelog
* Fri May 15 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-5
- Include the index file as a source file.
- Improve the description, remove spelling mistakes and other typos.
- Use the upstream SRPM directly, unpacking source from it.
- Fix use of dist macro.
- Pass the RPM OPTFLAGS to C compiler (should also fix debuginfo pkg).
- Use 'cp -p' to preserve timestamps when copying index.html file.
- Fix the defattr line.
- License is GPL+ (any version of the GPL including 1).
- Use a simpler install command to install the binary.
- Fix the upstream URL to point to the real original project.
- Add the sparsify command.

* Thu May 14 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-1
- Initial packaging for Fedora, based on R P Herrold's package.

* Wed May 13 2009 R P Herrold <info@owlriver.com> - 1.0.1-1
- initial packaging