Bug#1124810: apt: rred lacks a manual page despite being an installed executable
Package: apt
Version: 3.0.3
Severity: wishlist
X-Debbugs-Cc: neil.whelchel@gmail.com
Dear Maintainer,
The program /usr/lib/apt/methods/rred is installed as part of the apt
package and appears as a running process during package index updates,
but it does not currently provide a manual page.
By long-standing Unix convention, executables that may be seen or
invoked by system operators should have a corresponding manpage for
transparency and discoverability. The lack of documentation makes it
harder to understand the purpose and role of this helper.
The attached rred(1) manual page is based on the behaviour described by
“/usr/lib/apt/methods/rred --help”. It documents its primary use as an
APT acquire-method helper and its supported usage modes.
Please consider including this manpage (with any modifications the
maintainers feel appropriate) in the package.
Thank you,
-Neil Whelchel-
------------------------------------------------------------------------
-- System Information:
Debian Release: 13.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable'), (100, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.57+deb13-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages apt depends on:
ii adduser 3.152
ii base-passwd 3.6.7
ii debian-archive-keyring 2025.1
ii libapt-pkg7.0 3.0.3
ii libc6 2.41-12
ii libgcc-s1 14.2.0-19
ii libseccomp2 2.6.0-2
ii libssl3t64 3.5.4-1~deb13u1
ii libstdc++6 14.2.0-19
ii libsystemd0 257.9-1~deb13u1
ii sqv 1.3.0-3
Versions of packages apt recommends:
ii ca-certificates 20250419
Versions of packages apt suggests:
pn apt-doc <none>
pn aptitude | synaptic | wajig <none>
ii dpkg-dev 1.22.21
ii gnupg 2.4.7-21
pn powermgmt-base <none>
-- no debconf information
.TH RRED 1 "Debian Project" "APT" "General Commands Manual"
.SH NAME
rred \- apply reversed restricted ed (rred) patches to package index files
.SH SYNOPSIS
.B rred
.RI [ options ]
.B -t
.I input output patch-1 … patch-N
.br
.B rred
.RI [ options ]
.B -f
.I patch-1 … patch-N
<
.I input
>
.I output
.br
.B rred
.RI [ options ]
.I patch-1 … patch-N
>
.I merged-patch
.br
.B rred
.RI [ options ]
\" (no arguments: acquire method mode)
.SH DESCRIPTION
The
.B rred
program applies one or more “reversed restricted ed” patches to a text
file and writes the resulting updated content to the specified output.
This patch format is commonly used for incremental updates to Debian
package index files (also known as PDiffs).
The primary use of
.B rred
is as part of APT’s acquire system. When invoked with no command-line
arguments it enters acquire\-method mode and communicates with APT over
standard input and output. In normal operation it is started
automatically by APT during index updates and will appear as a short-lived
background process.
For testing and direct invocation,
.B rred
also provides explicit modes to apply patches to a file, to read from
standard input and write to standard output, or to merge several patch
files into a single patch.
.SH MODES
.TP
.BR -t " input output patch-1 … patch-N"
Apply one or more patches to
.I input
and write the patched result to
.I output .
.TP
.BR -f " patch-1 … patch-N"
Read the base file from standard input, apply the patches, and write the
result to standard output.
.TP
.I patch-1 … patch-N
Write a single “merged” patch combining all listed patches to standard
output.
.TP
(no arguments)
Acquire\-method mode for use by APT. Communication takes place via
messages on standard input and output and is not normally used directly
by users.
.SH PATCH FORMAT
The supported format is “reversed restricted ed”:
.IP \[bu]
only the
.B a
(add),
.B c
(change),
and
.B d
(delete)
commands are accepted, for single or multi-line operations;
.IP \[bu]
no other
.B ed
commands are supported (“restricted”);
.IP \[bu]
commands must appear in reverse order relative to line numbering, with
changes affecting later lines appearing first (“reversed”).
Such patches may be produced with
.BR "diff --ed" .
.SH OPTIONS
.TP
.B \-\-help
Display a brief usage summary and exit.
.TP
.B \-\-version
Display version information and exit.
Other options, if present, are intended for internal use and are not
guaranteed to be stable across releases.
.SH EXIT STATUS
.TP
.B 0
Operation completed successfully.
.TP
.B non\-zero
An error occurred while reading input or applying a patch.
.SH NOTES
Although installed as a normal executable,
.B rred
is primarily a helper used by APT and is rarely invoked manually.
System administrators may encounter it while package index files are
being updated.
.SH SEE ALSO
.BR apt (8),
.BR apt\-get (8),
.BR diff (1),
.BR ed (1)
.SH AUTHORS
.B rred
is part of the APT package management system and is maintained by the
Debian project. This manual page was written for Debian to document its
purpose and behaviour for system operators.
Reply to: