Compare commits

...
Sign in to create a new pull request.

17 commits

Author SHA1 Message Date
Fedora Release Engineering
af0dbcb9b0 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 09:39:51 +00:00
Fedora Release Engineering
4cf4c0d223 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 21:07:30 +00:00
Fedora Release Engineering
d4e6241bd8 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 21:17:30 +00:00
Fedora Release Engineering
18215950b1 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 16:44:24 +00:00
Fedora Release Engineering
cbb4933d6c Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 10:50:39 +00:00
Fedora Release Engineering
200192e08a Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 11:04:34 +00:00
Fedora Release Engineering
3c46c06f40 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 19:39:50 +00:00
9c9b0bfedc Update license identifier to SPDX expression 2023-03-26 17:59:16 +02:00
Fedora Release Engineering
a410add3bf Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 08:14:19 +00:00
Fedora Release Engineering
70a391b787 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 13:53:43 +00:00
Fedora Release Engineering
b430910f59 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 05:50:07 +00:00
Fedora Release Engineering
122852645b - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 22:16:28 +00:00
Fedora Release Engineering
ba66b322c6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-28 00:40:44 +00:00
3f121b8d1a Spec file cleanup 2020-12-31 02:46:04 +01:00
Fedora Release Engineering
3410bc669a - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 15:21:43 +00:00
Fedora Release Engineering
f3ec65ce87 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 05:17:22 +00:00
Fedora Release Engineering
2ed2b6647a - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 04:58:42 +00:00
3 changed files with 142 additions and 45 deletions

View file

@ -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

View file

@ -9,7 +9,7 @@
<!ENTITY dhfirstname "<firstname>Thibaut</firstname>">
<!ENTITY dhsurname "<surname>Paumard</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>February 6, 2008</date>">
<!ENTITY dhdate "<date>April 3rd, 2012</date>">
<!ENTITY dhsection "<manvolnum>8</manvolnum>">
<!ENTITY dhemail "<email>&lt;paumard@users.sourceforge.net&gt;</email>">
<!ENTITY dhusername "Thibaut Paumard">
@ -44,7 +44,7 @@
<refnamediv>
<refname>&dhpackage;</refname>
<refpurpose>zero free blocks from ext2/3 file-systems</refpurpose>
<refpurpose>zero free blocks from ext2, ext3 and ext4 file-systems</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
@ -54,6 +54,8 @@
<arg><option>-v</option></arg>
<arg><option>-f fillval</option></arg>
<arg choice=req><replaceable>filesystem</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
@ -61,14 +63,21 @@
<title>DESCRIPTION</title>
<para><command>&dhpackage;</command> finds the unallocated,
non-zeroed blocks in an ext2 or ext3
blocks with non-zero value content in an ext2, ext3 or ext4
<replaceable>filesystem</replaceable> (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).
<para>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.</para>
<para>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.</para>
<para>The usual way to achieve the same result (zeroing the
unallocated blocks) is to run <command>dd</command> (1) to
create a file full of zeroes that takes up the entire free
@ -94,10 +103,19 @@
<command>mount -o remount,ro
<replaceable>filesystem</replaceable></command>.</para>
<para><command>&dhpackage;</command> 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.</para>
<para><command>&dhpackage;</command> 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 (<command>VBoxManage modifyhd --compact</command>,
provided with virtualbox, is able to do that for some disk image
formats).</para>
<para>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.</para>
</refsect1>
<refsect1>
@ -115,7 +133,19 @@
<term><option>-v</option>
</term>
<listitem>
<para>Be verbose.</para>
<para>Be verbose: show the number of blocks modified by
<command>&dhpackage;</command> (or that would be modified,
in case the <option>-n</option> is used), the number of free
blocks and the total number of blocks on the
filesystem;</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-f value</option>
</term>
<listitem>
<para>Specify the octet value to fill empty blocks with (defaults to
0). Argument must be within the range 0 to 255.</para>
</listitem>
</varlistentry>
</variablelist>

View file

@ -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 <releng@fedoraproject.org> - 1.1.1-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild