Expose and document rpmdb --verifydb operation
Resolves: RHEL-14591
This commit is contained in:
parent
9f50765424
commit
515f57c7ab
135
0001-Expose-and-document-rpmdb-verifydb-operation.patch
Normal file
135
0001-Expose-and-document-rpmdb-verifydb-operation.patch
Normal file
@ -0,0 +1,135 @@
|
||||
From 173b737f40e7da85f79544e3f4ea4ad7b8f7d5c2 Mon Sep 17 00:00:00 2001
|
||||
From: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Mon, 6 Nov 2023 15:58:54 +0200
|
||||
Subject: [PATCH] Expose and document rpmdb --verifydb operation
|
||||
|
||||
After years of BDB, sometimes folks just want some assurance that their db
|
||||
is still fine. Properly exposing an operation to do so hopefully makes
|
||||
less likely to poke at the db directly (with eg sqlite3 command).
|
||||
---
|
||||
docs/man/rpmdb.8.md | 4 ++++
|
||||
tools/rpmdb.c | 4 ++--
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/rpmdb.c b/rpmdb.c
|
||||
index 22b0b3e5d..36efff8af 100644
|
||||
--- a/rpmdb.c
|
||||
+++ b/rpmdb.c
|
||||
@@ -23,8 +23,8 @@ static struct poptOption dbOptsTable[] = {
|
||||
{ "rebuilddb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode, MODE_REBUILDDB,
|
||||
N_("rebuild database inverted lists from installed package headers"),
|
||||
NULL},
|
||||
- { "verifydb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR|POPT_ARGFLAG_DOC_HIDDEN),
|
||||
- &mode, MODE_VERIFYDB, N_("verify database files"), NULL},
|
||||
+ { "verifydb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR),
|
||||
+ &mode, MODE_VERIFYDB, N_("verify database"), NULL},
|
||||
{ "salvagedb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR|POPT_ARGFLAG_DOC_HIDDEN),
|
||||
&mode, MODE_SALVAGEDB, N_("salvage database"), NULL},
|
||||
{ "exportdb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode, MODE_EXPORTDB,
|
||||
--
|
||||
2.41.0
|
||||
|
||||
--- a/doc/rpmdb.8 2020-05-28 12:04:25.024136615 +0200
|
||||
+++ b/doc/rpmdb.8 2023-11-07 23:27:27.000000000 +0100
|
||||
@@ -1,48 +1,57 @@
|
||||
-.TH "RPMDB" "8" "29 June 2010" "Red Hat, Inc"
|
||||
+.\" Automatically generated by Pandoc 2.19.2
|
||||
+.\"
|
||||
+.\" Define V font for inline verbatim, using C font in formats
|
||||
+.\" that render this, and otherwise B font.
|
||||
+.ie "\f[CB]x\f[]"x" \{\
|
||||
+. ftr V B
|
||||
+. ftr VI BI
|
||||
+. ftr VB B
|
||||
+. ftr VBI BI
|
||||
+.\}
|
||||
+.el \{\
|
||||
+. ftr V CR
|
||||
+. ftr VI CI
|
||||
+. ftr VB CB
|
||||
+. ftr VBI CBI
|
||||
+.\}
|
||||
+.TH "RPMDB" "8" "29 June 2010" "" ""
|
||||
+.hy
|
||||
.SH NAME
|
||||
-rpmdb \- RPM Database Tool
|
||||
+.PP
|
||||
+rpmdb - RPM Database Tool
|
||||
.SH SYNOPSIS
|
||||
-
|
||||
-\fBrpm\fR {\fB--initdb|--rebuilddb\fR}
|
||||
-
|
||||
-.SH "DESCRIPTION"
|
||||
-The general form of an rpm rebuild database command is
|
||||
-.PP
|
||||
-
|
||||
-\fBrpm\fR {\fB--initdb|--rebuilddb\fR} [\fB-v\fR] [\fB--dbpath \fIDIRECTORY\fB\fR] [\fB--root \fIDIRECTORY\fB\fR]
|
||||
-
|
||||
-.PP
|
||||
-Use \fB--initdb\fR to create a new database if one doesn't already exist
|
||||
-(existing database is not overwritten), use
|
||||
-\fB--rebuilddb\fR to rebuild the database indices from
|
||||
-the installed package headers.
|
||||
-.PP
|
||||
-
|
||||
-.SH "SEE ALSO"
|
||||
-
|
||||
-.nf
|
||||
-\fBpopt\fR(3),
|
||||
-\fBrpm\fR(8),
|
||||
-\fBrpmkeys\fR(8),
|
||||
-\fBrpmsign\fR(8),
|
||||
-\fBrpm2cpio\fR(8),
|
||||
-\fBrpmbuild\fR(8),
|
||||
-\fBrpmspec\fR(8),
|
||||
-.fi
|
||||
-
|
||||
-\fBrpm --help\fR - as rpm supports customizing the options via popt aliases
|
||||
-it's impossible to guarantee that what's described in the manual matches
|
||||
-what's available.
|
||||
-
|
||||
-
|
||||
-\fBhttp://www.rpm.org/ <URL:http://www.rpm.org/>
|
||||
-\fR
|
||||
-.SH "AUTHORS"
|
||||
-
|
||||
+.PP
|
||||
+\f[B]rpm\f[R] {\f[B]--initdb|--rebuilddb\f[R]}
|
||||
+.SH DESCRIPTION
|
||||
+.PP
|
||||
+The general form of an rpm rebuild database command is
|
||||
+.PP
|
||||
+\f[B]rpm\f[R] {\f[B]--initdb|--rebuilddb\f[R]} [\f[B]-v\f[R]]
|
||||
+[\f[B]--dbpath \f[R]\f[I]DIRECTORY\f[R]] [\f[B]--root
|
||||
+\f[R]\f[I]DIRECTORY\f[R]]
|
||||
+.PP
|
||||
+Use \f[B]--initdb\f[R] to create a new database if one doesn\[aq]t
|
||||
+already exist (existing database is not overwritten), use
|
||||
+\f[B]--rebuilddb\f[R] to rebuild the database indices from the installed
|
||||
+package headers.
|
||||
+.SH SEE ALSO
|
||||
+.PP
|
||||
+\f[B]popt\f[R](3), \f[B]rpm\f[R](8), \f[B]rpmkeys\f[R](8),
|
||||
+\f[B]rpmsign\f[R](8), \f[B]rpm2cpio\f[R](8), \f[B]rpmbuild\f[R](8),
|
||||
+\f[B]rpmspec\f[R](8)
|
||||
+.PP
|
||||
+\f[B]rpm --help\f[R] - as rpm supports customizing the options via popt
|
||||
+aliases it\[aq]s impossible to guarantee that what\[aq]s described in
|
||||
+the manual matches what\[aq]s available.
|
||||
+.PP
|
||||
+\f[B]http://www.rpm.org/ <URL:http://www.rpm.org/>\f[R]
|
||||
+.SH AUTHORS
|
||||
+.IP
|
||||
.nf
|
||||
-Marc Ewing <marc@redhat.com>
|
||||
-Jeff Johnson <jbj@redhat.com>
|
||||
-Erik Troan <ewt@redhat.com>
|
||||
-Panu Matilainen <pmatilai@redhat.com>
|
||||
+\f[C]
|
||||
+Marc Ewing <marc\[at]redhat.com>
|
||||
+Jeff Johnson <jbj\[at]redhat.com>
|
||||
+Erik Troan <ewt\[at]redhat.com>
|
||||
+Panu Matilainen <pmatilai\[at]redhat.com>
|
||||
+\f[R]
|
||||
.fi
|
||||
-
|
2
rpm.spec
2
rpm.spec
@ -103,6 +103,7 @@ Patch130: 0001-Use-file-state-machine-from-rpm-4.19.patch
|
||||
|
||||
Patch131: 0001-Fix-short-circuiting-of-version-strings-in-expressio.patch
|
||||
Patch132: 0001-Fix-a-copy-paste-help-description-of-whatconflicts-R.patch
|
||||
Patch133: 0001-Expose-and-document-rpmdb-verifydb-operation.patch
|
||||
|
||||
# These are not yet upstream
|
||||
Patch906: rpm-4.7.1-geode-i686.patch
|
||||
@ -655,6 +656,7 @@ fi
|
||||
* Thu 16 Nov 2023 Florian Festi <ffesti@redhat.com> - 4.16.1.3-27
|
||||
- Fix short circuiting of version strings in expressions (RHEL-15688)
|
||||
- Fix description of whatconflicts in the man page (RHEL-6303)
|
||||
- Expose and document rpmdb --verifydb operation (RHEL-14591)
|
||||
|
||||
* Fri Nov 10 2023 Florian Festi <ffesti@redhat.com> - 4.16.1.3-26
|
||||
- Backport file handling code from rpm-4.19 to fix CVE-2021-35937,
|
||||
|
Loading…
Reference in New Issue
Block a user