Compare commits

..

3 commits

Author SHA1 Message Date
Troy Dawson
dcc3652605 remove package.cfg per new epel-playground policy 2020-09-24 16:11:50 +00:00
76accc71dd Merge remote branch 'origin/master' into epel8 2019-07-23 22:44:33 +02:00
Igor Gnatenko
e5554f104d "Adding package.cfg file" 2019-07-23 07:57:28 +02:00
3 changed files with 45 additions and 142 deletions

View file

@ -1,36 +1,25 @@
.TH "ZEROFREE" "8"
.SH "NAME"
zerofree \(em zero free blocks from ext2, ext3 and ext4 file-systems
zerofree \(em zero free blocks from ext2/3 file-systems
.SH "SYNOPSIS"
.PP
\fBzerofree\fR [\fB-n\fP] [\fB-v\fP] [\fB-f fillval\fP] \fIfilesystem\fR
\fBzerofree\fR [\fB-n\fP] [\fB-v\fP] \fIfilesystem\fR
.SH "DESCRIPTION"
.PP
\fBzerofree\fR finds the unallocated,
blocks with non-zero value content in an ext2, ext3 or ext4
non-zeroed blocks in an ext2 or ext3
\fIfilesystem\fR (e.g. /dev/hda1) and
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,
fills them with zeroes. This 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.
.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.
been run.
.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
@ -38,8 +27,7 @@ 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
@ -48,36 +36,17 @@ 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. 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.
\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.
.SH "OPTIONS"
.IP "\fB-n\fP " 10
Perform a dry run (do not modify the file-system);
.IP "\fB-v\fP " 10
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.
Be verbose.
.SH "SEE ALSO"
.PP
dd (1).
@ -93,4 +62,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, Thu 31 Dec 2020, 01:06
.\" created by instant / docbook-to-man, Wed 25 Nov 2009, 17:45

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>April 3rd, 2012</date>">
<!ENTITY dhdate "<date>February 6, 2008</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, ext3 and ext4 file-systems</refpurpose>
<refpurpose>zero free blocks from ext2/3 file-systems</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
@ -54,8 +54,6 @@
<arg><option>-v</option></arg>
<arg><option>-f fillval</option></arg>
<arg choice=req><replaceable>filesystem</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
@ -63,21 +61,14 @@
<title>DESCRIPTION</title>
<para><command>&dhpackage;</command> finds the unallocated,
blocks with non-zero value content in an ext2, ext3 or ext4
non-zeroed blocks in an ext2 or ext3
<replaceable>filesystem</replaceable> (e.g. /dev/hda1) and
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,
fills them with zeroes. This 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
@ -103,19 +94,10 @@
<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. 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>
<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>
</refsect1>
<refsect1>
@ -133,19 +115,7 @@
<term><option>-v</option>
</term>
<listitem>
<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>
<para>Be verbose.</para>
</listitem>
</varlistentry>
</variablelist>

View file

@ -1,21 +1,24 @@
Summary: Utility to force unused ext2/3/4 inodes and blocks to zero
Name: zerofree
Version: 1.1.1
Release: 18%{?dist}
License: GPL-2.0-only
Release: 3%{?dist}
License: GPLv2
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 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.
# 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).
Source3: zerofree.sgml
Source4: zerofree.8
BuildRequires: gcc
BuildRequires: make
BuildRequires: e2fsprogs-devel
BuildRequires: gcc, e2fsprogs-devel
%description
zerofree is a utility to set unused filesystem inodes and blocks of an
@ -29,19 +32,24 @@ 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} %{SOURCE2} .
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .
%build
make CC="%{__cc} $RPM_OPT_FLAGS $RPM_LD_FLAGS"
%{__cc} $RPM_OPT_FLAGS $RPM_LD_FLAGS -o sparsify sparsify.c -lext2fs
make CC="gcc $RPM_OPT_FLAGS"
gcc $RPM_OPT_FLAGS sparsify.c -o sparsify -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
@ -49,52 +57,8 @@ 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