public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/zerofree] epel10: Spec file cleanup
@ 2026-06-15 0:17 Robert Scheck
0 siblings, 0 replies; only message in thread
From: Robert Scheck @ 2026-06-15 0:17 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/zerofree
Branch : epel10
Commit : 3f121b8d1a07395c1b06755947f7ca8df20a65dc
Author : Robert Scheck <robert@fedoraproject.org>
Date : 2020-12-31T02:46:04+01:00
Stats : +95/-43 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/zerofree/c/3f121b8d1a07395c1b06755947f7ca8df20a65dc?branch=epel10
Log:
Spec file cleanup
---
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 @@
<!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><paumard@users.sourceforge.net></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>
diff --git a/zerofree.spec b/zerofree.spec
index 1ccc3b9..a389fa1 100644
--- a/zerofree.spec
+++ b/zerofree.spec
@@ -3,22 +3,19 @@ Name: zerofree
Version: 1.1.1
Release: 6%{?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 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,7 +49,6 @@ install -D -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man8/zerofree.8
%{_sbindir}/sparsify
%{_mandir}/man8/zerofree.8*
-
%changelog
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-15 0:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-15 0:17 [rpms/zerofree] epel10: Spec file cleanup Robert Scheck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox