teknoraver / rpms / rpm

Forked from rpms/rpm 3 months ago
Clone

Blame 0001-Expose-and-document-rpmdb-verifydb-operation.patch

Florian Festi 515f57
From 173b737f40e7da85f79544e3f4ea4ad7b8f7d5c2 Mon Sep 17 00:00:00 2001
Florian Festi 515f57
From: Panu Matilainen <pmatilai@redhat.com>
Florian Festi 515f57
Date: Mon, 6 Nov 2023 15:58:54 +0200
Florian Festi 515f57
Subject: [PATCH] Expose and document rpmdb --verifydb operation
Florian Festi 515f57
Florian Festi 515f57
After years of BDB, sometimes folks just want some assurance that their db
Florian Festi 515f57
is still fine. Properly exposing an operation to do so hopefully makes
Florian Festi 515f57
less likely to poke at the db directly (with eg sqlite3 command).
Florian Festi 515f57
---
Florian Festi 515f57
 docs/man/rpmdb.8.md | 4 ++++
Florian Festi 515f57
 tools/rpmdb.c       | 4 ++--
Florian Festi 515f57
 2 files changed, 6 insertions(+), 2 deletions(-)
Florian Festi 515f57
Florian Festi 515f57
diff --git a/rpmdb.c b/rpmdb.c
Florian Festi 515f57
index 22b0b3e5d..36efff8af 100644
Florian Festi 515f57
--- a/rpmdb.c
Florian Festi 515f57
+++ b/rpmdb.c
Florian Festi 515f57
@@ -23,8 +23,8 @@ static struct poptOption dbOptsTable[] = {
Florian Festi 515f57
     { "rebuilddb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode, MODE_REBUILDDB,
Florian Festi 515f57
 	N_("rebuild database inverted lists from installed package headers"),
Florian Festi 515f57
 	NULL},
Florian Festi 515f57
-    { "verifydb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR|POPT_ARGFLAG_DOC_HIDDEN),
Florian Festi 515f57
-	&mode, MODE_VERIFYDB, N_("verify database files"), NULL},
Florian Festi 515f57
+    { "verifydb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR),
Florian Festi 515f57
+	&mode, MODE_VERIFYDB, N_("verify database"), NULL},
Florian Festi 515f57
     { "salvagedb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR|POPT_ARGFLAG_DOC_HIDDEN),
Florian Festi 515f57
 	&mode, MODE_SALVAGEDB, N_("salvage database"), NULL},
Florian Festi 515f57
     { "exportdb", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode, MODE_EXPORTDB,
Florian Festi 515f57
-- 
Florian Festi 515f57
2.41.0
Florian Festi 515f57
Florian Festi 515f57
--- a/doc/rpmdb.8	2020-05-28 12:04:25.024136615 +0200
Florian Festi 515f57
+++ b/doc/rpmdb.8	2023-11-07 23:27:27.000000000 +0100
Florian Festi 515f57
@@ -1,48 +1,57 @@
Florian Festi 515f57
-.TH "RPMDB" "8" "29 June 2010" "Red Hat, Inc"
Florian Festi 515f57
+.\" Automatically generated by Pandoc 2.19.2
Florian Festi 515f57
+.\"
Florian Festi 515f57
+.\" Define V font for inline verbatim, using C font in formats
Florian Festi 515f57
+.\" that render this, and otherwise B font.
Florian Festi 515f57
+.ie "\f[CB]x\f[]"x" \{\
Florian Festi 515f57
+. ftr V B
Florian Festi 515f57
+. ftr VI BI
Florian Festi 515f57
+. ftr VB B
Florian Festi 515f57
+. ftr VBI BI
Florian Festi 515f57
+.\}
Florian Festi 515f57
+.el \{\
Florian Festi 515f57
+. ftr V CR
Florian Festi 515f57
+. ftr VI CI
Florian Festi 515f57
+. ftr VB CB
Florian Festi 515f57
+. ftr VBI CBI
Florian Festi 515f57
+.\}
Florian Festi 515f57
+.TH "RPMDB" "8" "29 June 2010" "" ""
Florian Festi 515f57
+.hy
Florian Festi 515f57
 .SH NAME
Florian Festi 515f57
-rpmdb \- RPM Database Tool
Florian Festi 515f57
+.PP
Florian Festi 515f57
+rpmdb - RPM Database Tool
Florian Festi 515f57
 .SH SYNOPSIS
Florian Festi 515f57
-
Florian Festi 515f57
-\fBrpm\fR {\fB--initdb|--rebuilddb\fR}
Florian Festi 515f57
-
Florian Festi 515f57
-.SH "DESCRIPTION"
Florian Festi 515f57
-The general form of an rpm rebuild database command is 
Florian Festi 515f57
-.PP
Florian Festi 515f57
-
Florian Festi 515f57
-\fBrpm\fR {\fB--initdb|--rebuilddb\fR} [\fB-v\fR] [\fB--dbpath \fIDIRECTORY\fB\fR] [\fB--root \fIDIRECTORY\fB\fR]
Florian Festi 515f57
-
Florian Festi 515f57
-.PP
Florian Festi 515f57
-Use \fB--initdb\fR to create a new database if one doesn't already exist
Florian Festi 515f57
-(existing database is not overwritten), use
Florian Festi 515f57
-\fB--rebuilddb\fR to rebuild the database indices from
Florian Festi 515f57
-the installed package headers.
Florian Festi 515f57
-.PP
Florian Festi 515f57
-
Florian Festi 515f57
-.SH "SEE ALSO"
Florian Festi 515f57
-
Florian Festi 515f57
-.nf
Florian Festi 515f57
-\fBpopt\fR(3),
Florian Festi 515f57
-\fBrpm\fR(8),
Florian Festi 515f57
-\fBrpmkeys\fR(8),
Florian Festi 515f57
-\fBrpmsign\fR(8),
Florian Festi 515f57
-\fBrpm2cpio\fR(8),
Florian Festi 515f57
-\fBrpmbuild\fR(8),
Florian Festi 515f57
-\fBrpmspec\fR(8),
Florian Festi 515f57
-.fi
Florian Festi 515f57
-
Florian Festi 515f57
-\fBrpm --help\fR - as rpm supports customizing the options via popt aliases 
Florian Festi 515f57
-it's impossible to guarantee that what's described in the manual matches 
Florian Festi 515f57
-what's available.
Florian Festi 515f57
-
Florian Festi 515f57
-
Florian Festi 515f57
-\fBhttp://www.rpm.org/ <URL:http://www.rpm.org/>
Florian Festi 515f57
-\fR
Florian Festi 515f57
-.SH "AUTHORS"
Florian Festi 515f57
-
Florian Festi 515f57
+.PP
Florian Festi 515f57
+\f[B]rpm\f[R] {\f[B]--initdb|--rebuilddb\f[R]}
Florian Festi 515f57
+.SH DESCRIPTION
Florian Festi 515f57
+.PP
Florian Festi 515f57
+The general form of an rpm rebuild database command is
Florian Festi 515f57
+.PP
Florian Festi 515f57
+\f[B]rpm\f[R] {\f[B]--initdb|--rebuilddb\f[R]} [\f[B]-v\f[R]]
Florian Festi 515f57
+[\f[B]--dbpath \f[R]\f[I]DIRECTORY\f[R]] [\f[B]--root
Florian Festi 515f57
+\f[R]\f[I]DIRECTORY\f[R]]
Florian Festi 515f57
+.PP
Florian Festi 515f57
+Use \f[B]--initdb\f[R] to create a new database if one doesn\[aq]t
Florian Festi 515f57
+already exist (existing database is not overwritten), use
Florian Festi 515f57
+\f[B]--rebuilddb\f[R] to rebuild the database indices from the installed
Florian Festi 515f57
+package headers.
Florian Festi 515f57
+.SH SEE ALSO
Florian Festi 515f57
+.PP
Florian Festi 515f57
+\f[B]popt\f[R](3), \f[B]rpm\f[R](8), \f[B]rpmkeys\f[R](8),
Florian Festi 515f57
+\f[B]rpmsign\f[R](8), \f[B]rpm2cpio\f[R](8), \f[B]rpmbuild\f[R](8),
Florian Festi 515f57
+\f[B]rpmspec\f[R](8)
Florian Festi 515f57
+.PP
Florian Festi 515f57
+\f[B]rpm --help\f[R] - as rpm supports customizing the options via popt
Florian Festi 515f57
+aliases it\[aq]s impossible to guarantee that what\[aq]s described in
Florian Festi 515f57
+the manual matches what\[aq]s available.
Florian Festi 515f57
+.PP
Florian Festi 515f57
+\f[B]http://www.rpm.org/ <URL:http://www.rpm.org/>\f[R]
Florian Festi 515f57
+.SH AUTHORS
Florian Festi 515f57
+.IP
Florian Festi 515f57
 .nf
Florian Festi 515f57
-Marc Ewing <marc@redhat.com>
Florian Festi 515f57
-Jeff Johnson <jbj@redhat.com>
Florian Festi 515f57
-Erik Troan <ewt@redhat.com>
Florian Festi 515f57
-Panu Matilainen <pmatilai@redhat.com>
Florian Festi 515f57
+\f[C]
Florian Festi 515f57
+Marc Ewing <marc\[at]redhat.com>
Florian Festi 515f57
+Jeff Johnson <jbj\[at]redhat.com>
Florian Festi 515f57
+Erik Troan <ewt\[at]redhat.com>
Florian Festi 515f57
+Panu Matilainen <pmatilai\[at]redhat.com>
Florian Festi 515f57
+\f[R]
Florian Festi 515f57
 .fi
Florian Festi 515f57
-