diff --git a/zerofree.8 b/zerofree.8
index b0be0d2..ee306b5 100644
--- a/zerofree.8
+++ b/zerofree.8
@@ -1,25 +1,36 @@
.TH "ZEROFREE" "8"
.SH "NAME"
-zerofree \(em zero free blocks from ext2/3 file-systems
+zerofree \(em zero free blocks from ext2, ext3 and ext4 file-systems
.SH "SYNOPSIS"
.PP
-\fBzerofree\fR [\fB-n\fP] [\fB-v\fP] \fIfilesystem\fR
+\fBzerofree\fR [\fB-n\fP] [\fB-v\fP] [\fB-f fillval\fP] \fIfilesystem\fR
.SH "DESCRIPTION"
.PP
\fBzerofree\fR finds the unallocated,
-non-zeroed blocks in an ext2 or ext3
+blocks with non-zero value content in an ext2, ext3 or ext4
\fIfilesystem\fR (e.g. /dev/hda1) and
-fills them with zeroes. This is useful if the device on which
-this file-system resides is a disk image. In this case,
+fills them with zeroes (or another octet of your choice).
+
+
+.PP
+Filling unused areas with zeroes is useful if the device on
+which this file-system resides is a disk image. In this case,
depending on the type of disk image, a secondary utility may be
able to reduce the size of the disk image after zerofree has
-been run.
+been run.
+
+.PP
+Filling unused areas may also be useful with solid-state
+drives (SSDs). On some SSDs, filling blocks with ones (0xFF)
+is reported to trigger Flash block erasure by the firmware,
+possibly giving a write performance increase.
+
.PP
The usual way to achieve the same result (zeroing the
unallocated blocks) is to run \fBdd\fR (1) to
create a file full of zeroes that takes up the entire free
space on the drive, and then delete this file. This has many
-disadvantages, which zerofree alleviates:
+disadvantages, which zerofree alleviates:
.IP " \(bu" 6
it is slow;
.IP " \(bu" 6
@@ -27,7 +38,8 @@ it makes the disk image (temporarily) grow to its maximal
extent;
.IP " \(bu" 6
it (temporarily) uses all free space on the disk, so other
-concurrent write actions may fail.
+concurrent write actions may fail.
+
.PP
\fIfilesystem\fR has to be unmounted or
mounted read-only for \fBzerofree\fR to work. It
@@ -36,17 +48,36 @@ will exit with an error message if the
remount the root file-system readonly, you can first switch to
single user runlevel (\fBtelinit 1\fR) then use
\fBmount \-o remount,ro
-\fIfilesystem\fR\fR.
+\fIfilesystem\fR\fR.
+
.PP
-\fBzerofree\fR has been written to be
-run from GNU/Linux systems installed as guest OSes inside a
-virtual machine. It may however be useful in other
-situations.
+\fBzerofree\fR has been written to be run
+from GNU/Linux systems installed as guest OSes inside a virtual
+machine. In this case, it is typically run from within the guest
+system, and a utility is then run from the host system to shrink
+disk image (\fBVBoxManage modifyhd \-\-compact\fR,
+provided with virtualbox, is able to do that for some disk image
+formats).
+
+.PP
+It may however be useful in other situations: for instance
+it can be used to make it more difficult to retrieve deleted
+data. Beware that securely deleting sensitive data is not in
+general an easy task and usually requires writing several times
+on the deleted blocks.
+
.SH "OPTIONS"
.IP "\fB-n\fP " 10
Perform a dry run (do not modify the file-system);
.IP "\fB-v\fP " 10
-Be verbose.
+Be verbose: show the number of blocks modified by
+\fBzerofree\fR (or that would be modified,
+in case the \fB-n\fP is used), the number of free
+blocks and the total number of blocks on the
+filesystem;
+.IP "\fB-f value\fP " 10
+Specify the octet value to fill empty blocks with (defaults to
+0). Argument must be within the range 0 to 255.
.SH "SEE ALSO"
.PP
dd (1).
@@ -62,4 +93,4 @@ later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL-2.
-.\" created by instant / docbook-to-man, Wed 25 Nov 2009, 17:45
+.\" created by instant / docbook-to-man, Thu 31 Dec 2020, 01:06
diff --git a/zerofree.sgml b/zerofree.sgml
index e5c43a3..1c40f71 100644
--- a/zerofree.sgml
+++ b/zerofree.sgml
@@ -9,7 +9,7 @@
Thibaut">
Paumard">
- February 6, 2008">
+ April 3rd, 2012">
8">
<paumard@users.sourceforge.net>">
@@ -44,7 +44,7 @@
&dhpackage;
- zero free blocks from ext2/3 file-systems
+ zero free blocks from ext2, ext3 and ext4 file-systems
@@ -54,6 +54,8 @@
+
+
filesystem
@@ -61,14 +63,21 @@
DESCRIPTION&dhpackage; finds the unallocated,
- non-zeroed blocks in an ext2 or ext3
+ blocks with non-zero value content in an ext2, ext3 or ext4
filesystem (e.g. /dev/hda1) and
- fills them with zeroes. This is useful if the device on which
- this file-system resides is a disk image. In this case,
+ fills them with zeroes (or another octet of your choice).
+
+ Filling unused areas with zeroes is useful if the device on
+ which this file-system resides is a disk image. In this case,
depending on the type of disk image, a secondary utility may be
able to reduce the size of the disk image after zerofree has
been run.
+ Filling unused areas may also be useful with solid-state
+ drives (SSDs). On some SSDs, filling blocks with ones (0xFF)
+ is reported to trigger Flash block erasure by the firmware,
+ possibly giving a write performance increase.
+
The usual way to achieve the same result (zeroing the
unallocated blocks) is to run dd (1) to
create a file full of zeroes that takes up the entire free
@@ -94,10 +103,19 @@
mount -o remount,ro
filesystem.
- &dhpackage; has been written to be
- run from GNU/Linux systems installed as guest OSes inside a
- virtual machine. It may however be useful in other
- situations.
+ &dhpackage; has been written to be run
+ from GNU/Linux systems installed as guest OSes inside a virtual
+ machine. In this case, it is typically run from within the guest
+ system, and a utility is then run from the host system to shrink
+ disk image (VBoxManage modifyhd --compact,
+ provided with virtualbox, is able to do that for some disk image
+ formats).
+
+ It may however be useful in other situations: for instance
+ it can be used to make it more difficult to retrieve deleted
+ data. Beware that securely deleting sensitive data is not in
+ general an easy task and usually requires writing several times
+ on the deleted blocks.
@@ -115,7 +133,19 @@
- Be verbose.
+ Be verbose: show the number of blocks modified by
+ &dhpackage; (or that would be modified,
+ in case the is used), the number of free
+ blocks and the total number of blocks on the
+ filesystem;
+
+
+
+
+
+
+ Specify the octet value to fill empty blocks with (defaults to
+ 0). Argument must be within the range 0 to 255.
diff --git a/zerofree.spec b/zerofree.spec
index c3bb596..45118bc 100644
--- a/zerofree.spec
+++ b/zerofree.spec
@@ -1,24 +1,21 @@
Summary: Utility to force unused ext2/3/4 inodes and blocks to zero
Name: zerofree
Version: 1.1.1
-Release: 3%{?dist}
-License: GPLv2
-
+Release: 18%{?dist}
+License: GPL-2.0-only
URL: https://frippery.org/uml/
-
Source0: https://frippery.org/uml/%{name}-%{version}.tgz
Source1: https://frippery.org/uml/sparsify.c
Source2: https://frippery.org/uml/index.html
-
# zerofree.sgml is the source for the man page from Debian.
-# Unfortunately we cannot build this in Fedora because of an apparent
-# bug in our DocBook tools. Therefore I also include the generated
-# man page (generated on a Debian system from this source).
+# Unfortunately we cannot build this in Fedora because we do not have
+# docbook-to-man, just docbook2man and db2x_docbook2man. The included
+# man page was generated on a Debian system from this source.
Source3: zerofree.sgml
Source4: zerofree.8
-
-BuildRequires: gcc, e2fsprogs-devel
-
+BuildRequires: gcc
+BuildRequires: make
+BuildRequires: e2fsprogs-devel
%description
zerofree is a utility to set unused filesystem inodes and blocks of an
@@ -32,24 +29,19 @@ 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} .
-
+cp -p %{SOURCE1} %{SOURCE2} .
%build
-make CC="gcc $RPM_OPT_FLAGS"
-gcc $RPM_OPT_FLAGS sparsify.c -o sparsify -lext2fs
-
+make CC="%{__cc} $RPM_OPT_FLAGS $RPM_LD_FLAGS"
+%{__cc} $RPM_OPT_FLAGS $RPM_LD_FLAGS -o sparsify sparsify.c -lext2fs
%install
install -D -p -m 755 zerofree $RPM_BUILD_ROOT%{_sbindir}/zerofree
install -D -p -m 755 sparsify $RPM_BUILD_ROOT%{_sbindir}/sparsify
install -D -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man8/zerofree.8
-
%files
%license COPYING
%doc index.html
@@ -57,8 +49,52 @@ install -D -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man8/zerofree.8
%{_sbindir}/sparsify
%{_mandir}/man8/zerofree.8*
-
%changelog
+* Fri Jul 17 2026 Fedora Release Engineering - 1.1.1-18
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
+
+* Sat Jan 17 2026 Fedora Release Engineering - 1.1.1-17
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
+
+* Fri Jul 25 2025 Fedora Release Engineering - 1.1.1-16
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
+
+* Sun Jan 19 2025 Fedora Release Engineering - 1.1.1-15
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
+
+* Sat Jul 20 2024 Fedora Release Engineering - 1.1.1-14
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
+
+* Sat Jan 27 2024 Fedora Release Engineering - 1.1.1-13
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
+
+* Sat Jul 22 2023 Fedora Release Engineering - 1.1.1-12
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
+
+* Sat Jan 21 2023 Fedora Release Engineering - 1.1.1-11
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
+
+* Sat Jul 23 2022 Fedora Release Engineering - 1.1.1-10
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
+
+* Sat Jan 22 2022 Fedora Release Engineering - 1.1.1-9
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+
+* Fri Jul 23 2021 Fedora Release Engineering - 1.1.1-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+
+* Thu Jan 28 2021 Fedora Release Engineering - 1.1.1-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+
+* Wed Jul 29 2020 Fedora Release Engineering - 1.1.1-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
+* Fri Jan 31 2020 Fedora Release Engineering - 1.1.1-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
+* Sat Jul 27 2019 Fedora Release Engineering - 1.1.1-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
* Sun Feb 03 2019 Fedora Release Engineering - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild