Recreating Index Databases
Hi, I am using openSUSE TUmbleweed. What is the general principal and thought/s about recreating the 'index databases' on the machine with (# rpm --rebuilddb)? Is there another command or systemd service that should be run after this? Can this cause damage to the existing paths, files or directories already in place? Are there known negative effects of the command? To me it seems like perhaps a command like 'zypper clean' or 'zypper ref' even though obviously different in what it does. Something of a sort of maintenance procedure of sorts? Article -> https://en.wikipedia.org/wiki/RPM_Package_Manager#Forks -Regards
On 2024-03-14 06:01, -pj wrote:
Hi, I am using openSUSE TUmbleweed. What is the general principal and thought/s about recreating the 'index databases' on the machine with (# rpm --rebuilddb)?
Is there another command or systemd service that should be run after this?
Can this cause damage to the existing paths, files or directories already in place? Are there known negative effects of the command?
To me it seems like perhaps a command like 'zypper clean' or 'zypper ref' even though obviously different in what it does. Something of a sort of maintenance procedure of sorts?
Article -> https://en.wikipedia.org/wiki/RPM_Package_Manager#Forks
It is a last resource type of command, used in desperation, when the database is already broken. It only affects the database itself. I don't suppose it can cause damage if run when it is not needed. Damage comes from not being able to fully repair a broken database. Consequences will be rpm not knowing some packages are already installed or not detecting properly what to update; but again, not because the command itself breaks things, but because it fails to repair previous breakage, AFAIK. If the command fails, there is a periodic backup of the database in /var/adm/backup/rpmdb -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)
On 03-14-2024 07:58AM, Carlos E. R. wrote:
On 2024-03-14 06:01, -pj wrote:
Hi, I am using openSUSE TUmbleweed. What is the general principal and thought/s about recreating the 'index databases' on the machine with (# rpm --rebuilddb)?
Is there another command or systemd service that should be run after this?
Can this cause damage to the existing paths, files or directories already in place? Are there known negative effects of the command?
To me it seems like perhaps a command like 'zypper clean' or 'zypper ref' even though obviously different in what it does. Something of a sort of maintenance procedure of sorts?
Article -> https://en.wikipedia.org/wiki/RPM_Package_Manager#Forks
It is a last resource type of command, used in desperation, when the database is already broken. It only affects the database itself. I don't suppose it can cause damage if run when it is not needed. Damage comes from not being able to fully repair a broken database. Consequences will be rpm not knowing some packages are already installed or not detecting properly what to update; but again, not because the command itself breaks things, but because it fails to repair previous breakage, AFAIK.
If the command fails, there is a periodic backup of the database in /var/adm/backup/rpmdb
Thanks for your response and information on and about this. Before I received your message I proceeded to do the following. Passing 'rpm --rebuilddb' had a seemingly negative consequence. :[ 1. I cloned the existing drive (SSD) to the backup (HDD) and then tested the backup, as far as booting into OS. 2. I then booted into the primary (SSD) OS. Then I passed "# rpm --rebuilddb" It took a couple minutes to complete. NOTE: I *should* have gotten screenshots of the following scenerio. I have since recloned the primary (SSD) drive from backup (HDD). Continue reading - 3. I passed '# rpmconfigcheck' and an error about path (I think) was displayed. I closed the Konsole instance and opened another Konsole instance . Then repassed '# rpmconfigcheck' with no output besides another prompt displayed after (what I assume) completed. So for a moment I assumed things were fine. 5. Then attempted to open a previously known to work application, 'cpupower-gui' from launcher in Plasma with no result. Attempted in Konsole as root with a bunch of python errors resulting. 6. Tried reinstalling all of the installed packages on the machine entirely passing *** zypper in --no-recommends -f $(rpm -q -a --qf '%{NAME} ') *** and the result was like a 'dependency hell' situation if that is the correct term? Things just could not be resolved. Then aborted. ------------------------------------------------------------------------- The 'rpm --rebuilddb' command never displayed out any output so I think that it did not fail? Can you tell me more about the files in /var/adm/backup/rpmdb ? Are they compacted in directory form? Thinkcentre-M57p:/var/adm/backup/rpmdb # ls -lah total 375M drwxr-xr-x 1 root root 262 Mar 14 10:57 . drwx------ 1 root root 42 Feb 2 10:16 .. -rw-r--r-- 1 root root 75M Mar 8 08:18 Packages.db-20240308.gz -rw-r--r-- 1 root root 75M Mar 9 00:15 Packages.db-20240309.gz -rw-r--r-- 1 root root 75M Mar 10 00:45 Packages.db-20240310.gz -rw-r--r-- 1 root root 75M Mar 11 00:09 Packages.db-20240311.gz -rw-r--r-- 1 root root 75M Mar 14 10:57 Packages.db-20240314.gz -rw-r--r-- 1 root root 36 Mar 14 10:57 rpmdb_recent_md5 It seems they are compacted being in .gz format. - Reading here: https://tr.opensuse.org/SDB:RPM_database_corrupted Says "please make a backup of the directory /var/lib/rpm first". So then create directory /var/lib/rpm.backup <- or something like that? A question was asked on the forums by a more advanced user and the specifics of - how to retrieve a backup from /var/adm/backup/rpmdb was not discussed. Last thread -> https://forums.opensuse.org/t/regenerating-an-rpm-database-from-installed-pa... Can you elaborate on how you would retrieve a backup from /var/adm/backup/rpmdb ? e.g. copy one of the (.gz) over to a then empty (and backup up) /var/lib/rpm and gunzip Packages.db-20240314.gz? :|
On 2024-03-14 19:32, -pj wrote:
On 03-14-2024 07:58AM, Carlos E. R. wrote:
On 2024-03-14 06:01, -pj wrote:
Hi, I am using openSUSE TUmbleweed. What is the general principal and thought/s about recreating the 'index databases' on the machine with (# rpm --rebuilddb)?
Is there another command or systemd service that should be run after this?
Can this cause damage to the existing paths, files or directories already in place? Are there known negative effects of the command?
To me it seems like perhaps a command like 'zypper clean' or 'zypper ref' even though obviously different in what it does. Something of a sort of maintenance procedure of sorts?
Article -> https://en.wikipedia.org/wiki/RPM_Package_Manager#Forks
It is a last resource type of command, used in desperation, when the database is already broken. It only affects the database itself. I don't suppose it can cause damage if run when it is not needed. Damage comes from not being able to fully repair a broken database. Consequences will be rpm not knowing some packages are already installed or not detecting properly what to update; but again, not because the command itself breaks things, but because it fails to repair previous breakage, AFAIK.
If the command fails, there is a periodic backup of the database in /var/adm/backup/rpmdb
Thanks for your response and information on and about this. Before I received your message I proceeded to do the following. Passing 'rpm --rebuilddb' had a seemingly negative consequence. :[
1. I cloned the existing drive (SSD) to the backup (HDD) and then tested the backup, as far as booting into OS.
2. I then booted into the primary (SSD) OS. Then I passed "# rpm --rebuilddb" It took a couple minutes to complete.
As far as I know, "rpm --rebuilddb" only touches the files in "/var/lib/rpm" (currently /usr/lib/sysimage/rpm). The periodical backup is simply a copy of the /var/lib/rpm/Packages file, from which all the others can be reconstructed by the rebuild command. Nothing of the problem you describe relates to running the rebuild command. Maybe rpmconfigcheck having trouble. ...
------------------------------------------------------------------------- The 'rpm --rebuilddb' command never displayed out any output so I think that it did not fail?
Right.
Can you tell me more about the files in /var/adm/backup/rpmdb ? Are they compacted in directory form?
They are just dated and compressed copies of /usr/lib/sysimage/rpm/Packages
Thinkcentre-M57p:/var/adm/backup/rpmdb # ls -lah total 375M drwxr-xr-x 1 root root 262 Mar 14 10:57 . drwx------ 1 root root 42 Feb 2 10:16 .. -rw-r--r-- 1 root root 75M Mar 8 08:18 Packages.db-20240308.gz -rw-r--r-- 1 root root 75M Mar 9 00:15 Packages.db-20240309.gz -rw-r--r-- 1 root root 75M Mar 10 00:45 Packages.db-20240310.gz -rw-r--r-- 1 root root 75M Mar 11 00:09 Packages.db-20240311.gz -rw-r--r-- 1 root root 75M Mar 14 10:57 Packages.db-20240314.gz -rw-r--r-- 1 root root 36 Mar 14 10:57 rpmdb_recent_md5
It seems they are compacted being in .gz format. -
Reading here: https://tr.opensuse.org/SDB:RPM_database_corrupted
Says "please make a backup of the directory /var/lib/rpm first". So then create directory /var/lib/rpm.backup <- or something like that?
Sure. Or a tgz.
A question was asked on the forums by a more advanced user and the specifics of - how to retrieve a backup from /var/adm/backup/rpmdb was not discussed. Last thread -> https://forums.opensuse.org/t/regenerating-an-rpm-database-from-installed-pa...
Can you elaborate on how you would retrieve a backup from /var/adm/backup/rpmdb ? e.g. copy one of the (.gz) over to a then empty (and backup up) /var/lib/rpm and gunzip Packages.db-20240314.gz?
:|
I only had to do that once. I think I deleted /var/lib/rpm/*, copied over the last /var/adm/backup/rpmdb file, expanded it, then run rebuildrpm. Verified that the result was not corrupted, it was, so repeat with an earlier backup, till it worked. -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)
On 03-14-2024 03:33PM, Carlos E. R. wrote:
On 2024-03-14 19:32, -pj wrote:
On 03-14-2024 07:58AM, Carlos E. R. wrote:
On 2024-03-14 06:01, -pj wrote:
Hi, I am using openSUSE TUmbleweed. What is the general principal and thought/s about recreating the 'index databases' on the machine with (# rpm --rebuilddb)?
Is there another command or systemd service that should be run after this?
Can this cause damage to the existing paths, files or directories already in place? Are there known negative effects of the command?
To me it seems like perhaps a command like 'zypper clean' or 'zypper ref' even though obviously different in what it does. Something of a sort of maintenance procedure of sorts?
Article -> https://en.wikipedia.org/wiki/RPM_Package_Manager#Forks
It is a last resource type of command, used in desperation, when the database is already broken. It only affects the database itself. I don't suppose it can cause damage if run when it is not needed. Damage comes from not being able to fully repair a broken database. Consequences will be rpm not knowing some packages are already installed or not detecting properly what to update; but again, not because the command itself breaks things, but because it fails to repair previous breakage, AFAIK.
If the command fails, there is a periodic backup of the database in /var/adm/backup/rpmdb
Thanks for your response and information on and about this. Before I received your message I proceeded to do the following. Passing 'rpm --rebuilddb' had a seemingly negative consequence. :[
1. I cloned the existing drive (SSD) to the backup (HDD) and then tested the backup, as far as booting into OS.
2. I then booted into the primary (SSD) OS. Then I passed "# rpm --rebuilddb" It took a couple minutes to complete.
As far as I know, "rpm --rebuilddb" only touches the files in "/var/lib/rpm" (currently /usr/lib/sysimage/rpm).
The periodical backup is simply a copy of the /var/lib/rpm/Packages file, from which all the others can be reconstructed by the rebuild command.
Nothing of the problem you describe relates to running the rebuild command. Maybe rpmconfigcheck having trouble.
... Envoking rpmconfigcheck currently in Konsole seems to complete with no visual error. New prompt is then displayed.
------------------------------------------------------------------------- The 'rpm --rebuilddb' command never displayed out any output so I think that it did not fail?
Right.
Something really seems to have gone not right while using rpm --rebuilddb . Do you think I should try it again? If screenshots or more details of errors are given would that be more help? I failed to mention before that - snapper snapshots didn't work in order to get a working cpupower-gui . I don't know if it's a good reference program for testing or *not*. It's not supposed to be run in Konsole. It is supposed to be run through GUI launcher. Is there a way to test the rpm database for integrity before attempting to rebuild it with rpm --rebuilddb ? Just trying to see what your thoughts are without asking to much and upsetting here.
Can you tell me more about the files in /var/adm/backup/rpmdb ? Are they compacted in directory form?
They are just dated and compressed copies of /usr/lib/sysimage/rpm/Packages
How does the OS interlink these directories between each other -> /usr/lib/sysimage/rpm *to* var/lib/rpm <- they have identical contents? Why are both these directories needed?
Thinkcentre-M57p:/var/adm/backup/rpmdb # ls -lah total 375M drwxr-xr-x 1 root root 262 Mar 14 10:57 . drwx------ 1 root root 42 Feb 2 10:16 .. -rw-r--r-- 1 root root 75M Mar 8 08:18 Packages.db-20240308.gz -rw-r--r-- 1 root root 75M Mar 9 00:15 Packages.db-20240309.gz -rw-r--r-- 1 root root 75M Mar 10 00:45 Packages.db-20240310.gz -rw-r--r-- 1 root root 75M Mar 11 00:09 Packages.db-20240311.gz -rw-r--r-- 1 root root 75M Mar 14 10:57 Packages.db-20240314.gz -rw-r--r-- 1 root root 36 Mar 14 10:57 rpmdb_recent_md5
It seems they are compacted being in .gz format. -
Reading here: https://tr.opensuse.org/SDB:RPM_database_corrupted
Says "please make a backup of the directory /var/lib/rpm first". So then create directory /var/lib/rpm.backup <- or something like that?
Sure. Or a tgz.
Ok.
A question was asked on the forums by a more advanced user and the specifics of - how to retrieve a backup from /var/adm/backup/rpmdb was not discussed. Last thread -> https://forums.opensuse.org/t/regenerating-an-rpm-database-from-installed-pa...
Can you elaborate on how you would retrieve a backup from /var/adm/backup/rpmdb ? e.g. copy one of the (.gz) over to a then empty (and backup up) /var/lib/rpm and gunzip Packages.db-20240314.gz?
:|
I only had to do that once. I think I deleted /var/lib/rpm/*, copied over the last /var/adm/backup/rpmdb file, expanded it, then run rebuildrpm. Verified that the result was not corrupted, it was, so repeat with an earlier backup, till it worked.
Does this rpm corruption mainly start with a power outage during updating or what? It can also be the package/s itself? https://software.opensuse.org/package/rpmrebuild <-> A tool to build a rpm file from the rpm database. Ok, I just reviewed this and would like your input -> http://ftp.rpm.org/max-rpm/ch-rpm-verify.html Does zypper handle alot of this rpm verification process when updating from installed/trusted repos? Some of the packages coming from OBS may be unsafe so how in the world does one negate that issue? I understand to try only to use packages from trusted packagers. Can you rebuild all currently installed rpms themselves with "rebuildrpm" somehow? How to verify all currently installed rpms on the system? Where can the modification times of the current installed RPM's in openSUSE be viewed? -Thanks for all your help.
On Fri, Mar 15, 2024 at 3:17 AM -pj <pj.opensuse@gmx.com> wrote: ...
Is there a way to test the rpm database for integrity before attempting to rebuild it with rpm --rebuilddb ?
There is rpm --verifydb ...
How does the OS interlink these directories between each other -> /usr/lib/sysimage/rpm *to* var/lib/rpm <- they have identical contents? Why are both these directories needed?
For compatibility reasons. You cannot change every document and page on the Internet to refer to the new location. ...
Can you rebuild all currently installed rpms themselves with "rebuildrpm" somehow?
Why? What is your goal? But anyway, you can always script it using your language of choice (shell, Python, whatever).
How to verify all currently installed rpms on the system?
rpm --verify --all assuming we use "verify" to mean the same thing.
Where can the modification times of the current installed RPM's in openSUSE be viewed?
What is "the modification times of the current installed RPM's"?
On 03-15-2024 01:53AM, Andrei Borzenkov wrote:
On Fri, Mar 15, 2024 at 3:17 AM -pj <pj.opensuse@gmx.com> wrote: ...
Is there a way to test the rpm database for integrity before attempting to rebuild it with rpm --rebuilddb ?
There is
rpm --verifydb
... I was looking for something like that thanks.
How does the OS interlink these directories between each other -> /usr/lib/sysimage/rpm *to* var/lib/rpm <- they have identical contents? Why are both these directories needed?
For compatibility reasons. You cannot change every document and page on the Internet to refer to the new location.
... Ok, that makes more sense to me now. I started thinking maybe 'bashrc' or something...
Can you rebuild all currently installed rpms themselves with "rebuildrpm" somehow?
Why? What is your goal?
I was thinking in order to correct any corrupted rpm's. Now I see more because of 'rpm --verify --all'.
But anyway, you can always script it using your language of choice (shell, Python, whatever).
Ok very good. I am not an advanced user but this gives me more hope.
How to verify all currently installed rpms on the system?
rpm --verify --all
Very good to know this. I ran '# rpm --verify --all' and the output I cannot fully understand. The results are here: -> https://paste.opensuse.org/pastes/3539092f68cd Can you explain or point me to how I can understand the characters meanings; on the left side of the output? I understand I can search around for more info.
assuming we use "verify" to mean the same thing.
Yes I think you assumed correct on this.🙂
Where can the modification times of the current installed RPM's in openSUSE be viewed?
What is "the modification times of the current installed RPM's"?
Information about when the rpm for the package was last changed. When 'zypper dup' is passed, is there a way to view the changesd rpm's associated to the currently updated and installed rpms? Maybe a spec file or something? I understand I should do more reading on this also. Do the rpm's change when a 'zypper dup' is performed? How can one display the entire list of the installed rpm's on openSUSE? I know about 'zypper se rpm*'. Ok thanks for your help.
On 2024-03-16 02:54, -pj wrote:
On 03-15-2024 01:53AM, Andrei Borzenkov wrote:
On Fri, Mar 15, 2024 at 3:17 AM -pj <> wrote:
rpm --verify --all
Very good to know this. I ran '# rpm --verify --all' and the output I cannot fully understand. The results are here: -> https://paste.opensuse.org/pastes/3539092f68cd
Can you explain or point me to how I can understand the characters meanings; on the left side of the output? I understand I can search around for more info.
man rpm Then search for "--verify". It will be the second occurrence, and there are a few screens of it.
assuming we use "verify" to mean the same thing.
Yes I think you assumed correct on this.🙂
Where can the modification times of the current installed RPM's in openSUSE be viewed?
What is "the modification times of the current installed RPM's"?
Information about when the rpm for the package was last changed.
But the rpm was not changed on your machine. It is "always" changed on some other machine at opensuse.org. You simply download it.
When 'zypper dup' is passed, is there a way to view the changesd rpm's associated to the currently updated and installed rpms? Maybe a spec file or something? I understand I should do more reading on this also.
Do the rpm's change when a 'zypper dup' is performed?
How can one display the entire list of the installed rpm's on openSUSE? I know about 'zypper se rpm*'.
rpm -qa
Ok thanks for your help.
-- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)
On 16.03.2024 04:54, -pj wrote: ...
Where can the modification times of the current installed RPM's in openSUSE be viewed?
What is "the modification times of the current installed RPM's"?
Information about when the rpm for the package was last changed.
This is tautology. RPM *is* the package format, so in colloquial usage "rpm" and "package" are synonyms. If you asking "when this package has been installed" - "rpm -qi". Which also shows some more information that loosely fits into "package was last changed" depending on how one interprets this phrase.
When 'zypper dup' is passed, is there a way to view the changesd rpm's associated to the currently updated and installed rpms?
There are too many "rpm"s in this sentence, I do not understand what you are asking or what you want to achieve.
Maybe a spec file or something? I understand I should do more reading on this also.
Do the rpm's change when a 'zypper dup' is performed?
Sorry? What do you mean with "do the rpm's change"?
On 2024-03-15 01:16, -pj wrote:
On 03-14-2024 03:33PM, Carlos E. R. wrote:
On 2024-03-14 19:32, -pj wrote:
On 03-14-2024 07:58AM, Carlos E. R. wrote:
On 2024-03-14 06:01, -pj wrote:
...
As far as I know, "rpm --rebuilddb" only touches the files in "/var/lib/rpm" (currently /usr/lib/sysimage/rpm).
The periodical backup is simply a copy of the /var/lib/rpm/Packages file, from which all the others can be reconstructed by the rebuild command.
Nothing of the problem you describe relates to running the rebuild command. Maybe rpmconfigcheck having trouble.
... Envoking rpmconfigcheck currently in Konsole seems to complete with no visual error. New prompt is then displayed.
------------------------------------------------------------------------- The 'rpm --rebuilddb' command never displayed out any output so I think that it did not fail?
Right.
Something really seems to have gone not right while using rpm --rebuilddb .
Do you think I should try it again? If screenshots or more details of errors are given would that be more help? I failed to mention before that - snapper snapshots didn't work in order to get a working cpupower-gui . I don't know if it's a good reference program for testing or *not*. It's not supposed to be run in Konsole. It is supposed to be run through GUI launcher.
Is there a way to test the rpm database for integrity before attempting to rebuild it with rpm --rebuilddb ?
I fail to know what is the original dire problem that you are trying to correct via rebuildrpm Any program that exercises the database will produce an error message if the database is corrupt. But you can do: rpm --verify --all or rpm --verifydb as Andrei Borzenkov says. The latter command I remember but I don't know which man page applies, I can't find it.
Just trying to see what your thoughts are without asking to much and upsetting here.
Can you tell me more about the files in /var/adm/backup/rpmdb ? Are they compacted in directory form?
They are just dated and compressed copies of /usr/lib/sysimage/rpm/Packages
How does the OS interlink these directories between each other -> /usr/lib/sysimage/rpm *to* var/lib/rpm <- they have identical contents? Why are both these directories needed?
/var/lib/rpm is the old or classical directory. A lot of documentation points to it. It was migrated to a new location at /usr/lib/sysimage/rpm for some reason. Thus a symlink is created so that old commands and docs keep working. ...
A question was asked on the forums by a more advanced user and the specifics of - how to retrieve a backup from /var/adm/backup/rpmdb was not discussed. Last thread -> https://forums.opensuse.org/t/regenerating-an-rpm-database-from-installed-pa...
Can you elaborate on how you would retrieve a backup from /var/adm/backup/rpmdb ? e.g. copy one of the (.gz) over to a then empty (and backup up) /var/lib/rpm and gunzip Packages.db-20240314.gz?
:|
I only had to do that once. I think I deleted /var/lib/rpm/*, copied over the last /var/adm/backup/rpmdb file, expanded it, then run rebuildrpm. Verified that the result was not corrupted, it was, so repeat with an earlier backup, till it worked.
Does this rpm corruption mainly start with a power outage during updating or what? It can also be the package/s itself?
I have only seen it from a power crash or some software crash during updating/installing.
https://software.opensuse.org/package/rpmrebuild <-> A tool to build a rpm file from the rpm database.
That's a different command! Not related at all. We may have been confusing --rebuildrpm with --rebuilddb. Not the same thing at all.
Ok, I just reviewed this and would like your input -> http://ftp.rpm.org/max-rpm/ch-rpm-verify.html
Does zypper handle alot of this rpm verification process when updating from installed/trusted repos?
I don't know.
Some of the packages coming from OBS may be unsafe so how in the world does one negate that issue? I understand to try only to use packages from trusted packagers.
That has nothing to do with rpm verification or corrupted database.
Can you rebuild all currently installed rpms themselves with "rebuildrpm" somehow?
somehow is an understatement.
How to verify all currently installed rpms on the system?
Verify, in what sense?
Where can the modification times of the current installed RPM's in openSUSE be viewed?
rpm -q -a --queryformat .... something. Use "rpm --querytags" to find the available tags. -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)
On 03-15-2024 06:19AM, Carlos E. R. wrote:
On 2024-03-15 01:16, -pj wrote:
On 03-14-2024 03:33PM, Carlos E. R. wrote:
On 2024-03-14 19:32, -pj wrote:
On 03-14-2024 07:58AM, Carlos E. R. wrote:
On 2024-03-14 06:01, -pj wrote:
...
As far as I know, "rpm --rebuilddb" only touches the files in "/var/lib/rpm" (currently /usr/lib/sysimage/rpm).
The periodical backup is simply a copy of the /var/lib/rpm/Packages file, from which all the others can be reconstructed by the rebuild command.
Nothing of the problem you describe relates to running the rebuild command. Maybe rpmconfigcheck having trouble.
... Envoking rpmconfigcheck currently in Konsole seems to complete with no visual error. New prompt is then displayed.
------------------------------------------------------------------------- The 'rpm --rebuilddb' command never displayed out any output so I think that it did not fail?
Right.
Something really seems to have gone not right while using rpm --rebuilddb .
Do you think I should try it again? If screenshots or more details of errors are given would that be more help? I failed to mention before that - snapper snapshots didn't work in order to get a working cpupower-gui . I don't know if it's a good reference program for testing or *not*. It's not supposed to be run in Konsole. It is supposed to be run through GUI launcher.
Is there a way to test the rpm database for integrity before attempting to rebuild it with rpm --rebuilddb ?
I fail to know what is the original dire problem that you are trying to correct via rebuildrpm
You are correct.
Any program that exercises the database will produce an error message if the database is corrupt. But you can do:
rpm --verify --all
or
rpm --verifydb
as Andrei Borzenkov says. The latter command I remember but I don't know which man page applies, I can't find it.
Thank you Carlos E.R. and Anrei Borzenkov.
Just trying to see what your thoughts are without asking to much and upsetting here.
Can you tell me more about the files in /var/adm/backup/rpmdb ? Are they compacted in directory form?
They are just dated and compressed copies of /usr/lib/sysimage/rpm/Packages
How does the OS interlink these directories between each other -> /usr/lib/sysimage/rpm *to* var/lib/rpm <- they have identical contents? Why are both these directories needed?
/var/lib/rpm is the old or classical directory. A lot of documentation points to it. It was migrated to a new location at /usr/lib/sysimage/rpm for some reason. Thus a symlink is created so that old commands and docs keep working.
...
A question was asked on the forums by a more advanced user and the specifics of - how to retrieve a backup from /var/adm/backup/rpmdb was not discussed. Last thread -> https://forums.opensuse.org/t/regenerating-an-rpm-database-from-installed-pa...
Can you elaborate on how you would retrieve a backup from /var/adm/backup/rpmdb ? e.g. copy one of the (.gz) over to a then empty (and backup up) /var/lib/rpm and gunzip Packages.db-20240314.gz?
:|
I only had to do that once. I think I deleted /var/lib/rpm/*, copied over the last /var/adm/backup/rpmdb file, expanded it, then run rebuildrpm. Verified that the result was not corrupted, it was, so repeat with an earlier backup, till it worked.
Does this rpm corruption mainly start with a power outage during updating or what? It can also be the package/s itself?
I have only seen it from a power crash or some software crash during updating/installing.
Ok thanks.
https://software.opensuse.org/package/rpmrebuild <-> A tool to build a rpm file from the rpm database.
That's a different command! Not related at all.
We may have been confusing --rebuildrpm with --rebuilddb. Not the same thing at all.
I understand that --rebuildrpm and --rebuilddb are separate tools. I am off topic and very sorry about that.
Ok, I just reviewed this and would like your input -> http://ftp.rpm.org/max-rpm/ch-rpm-verify.html
Does zypper handle alot of this rpm verification process when updating from installed/trusted repos?
I don't know.
Some of the packages coming from OBS may be unsafe so how in the world does one negate that issue? I understand to try only to use packages from trusted packagers.
That has nothing to do with rpm verification or corrupted database.
Can you rebuild all currently installed rpms themselves with "rebuildrpm" somehow?
somehow is an understatement.
Ok
How to verify all currently installed rpms on the system?
Verify, in what sense?
Now I understand a bit more about 'rpm --verify --all'
Where can the modification times of the current installed RPM's in openSUSE be viewed?
rpm -q -a --queryformat .... something. Use "rpm --querytags" to find the available tags.
Ok.
On 2024-03-16 03:24, -pj wrote:
On 03-15-2024 06:19AM, Carlos E. R. wrote:
On 2024-03-15 01:16, -pj wrote:
On 03-14-2024 03:33PM, Carlos E. R. wrote:
On 2024-03-14 19:32, -pj wrote:
On 03-14-2024 07:58AM, Carlos E. R. wrote:
On 2024-03-14 06:01, -pj wrote:
...
https://software.opensuse.org/package/rpmrebuild <-> A tool to build a rpm file from the rpm database.
That's a different command! Not related at all.
We may have been confusing --rebuildrpm with --rebuilddb. Not the same thing at all.
I understand that --rebuildrpm and --rebuilddb are separate tools. I am off topic and very sorry about that.
Not off topic. Just that they do very different things. ... -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)
On Thu, Mar 14, 2024 at 11:34 PM Carlos E. R. <robin.listas@telefonica.net> wrote:
I only had to do that once. I think I deleted /var/lib/rpm/*, copied over the last /var/adm/backup/rpmdb file, expanded it, then run rebuildrpm.
This tool has nothing to do with rebuilding RPM database and most likely will not even run as long as RPM DB is missing/corrupted.
On 2024-03-15 07:36, Andrei Borzenkov wrote:
On Thu, Mar 14, 2024 at 11:34 PM Carlos E. R. <robin.listas@telefonica.net> wrote:
I only had to do that once. I think I deleted /var/lib/rpm/*, copied over the last /var/adm/backup/rpmdb file, expanded it, then run rebuildrpm.
This tool has nothing to do with rebuilding RPM database and most likely will not even run as long as RPM DB is missing/corrupted.
The procedure was, from memory: rm /var/lib/rpm/* cp /var/adm/backup/rpmdb/Packages-date.gz /var/lib/rpm/Packages.gz gunzip /var/lib/rpm/Packages.gz rpm --rebuilddb but I am not going to try. The command is not even listed in "man rpm", it is in "man rpmdb". We may have been confusing --rebuildrpm with --rebuilddb -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)
On 03-15-2024 07:33AM, Carlos E. R. wrote:
On 2024-03-15 07:36, Andrei Borzenkov wrote:
On Thu, Mar 14, 2024 at 11:34 PM Carlos E. R. <robin.listas@telefonica.net> wrote:
I only had to do that once. I think I deleted /var/lib/rpm/*, copied over the last /var/adm/backup/rpmdb file, expanded it, then run rebuildrpm.
This tool has nothing to do with rebuilding RPM database and most likely will not even run as long as RPM DB is missing/corrupted.
The procedure was, from memory:
rm /var/lib/rpm/* cp /var/adm/backup/rpmdb/Packages-date.gz /var/lib/rpm/Packages.gz gunzip /var/lib/rpm/Packages.gz rpm --rebuilddb
but I am not going to try.
The command is not even listed in "man rpm", it is in "man rpmdb".
We may have been confusing --rebuildrpm with --rebuilddb
I made another off topic mistake and started trying to ask questions about '--rebuildrpm' so it is my fault about that. You have been very helpful with your insight on this.
Op donderdag 14 maart 2024 06:01:58 CET schreef -pj:
Hi, I am using openSUSE TUmbleweed. What is the general principal and thought/s about recreating the 'index databases' on the machine with (# rpm --rebuilddb)?
Is there another command or systemd service that should be run after this?
Can this cause damage to the existing paths, files or directories already in place? Are there known negative effects of the command?
To me it seems like perhaps a command like 'zypper clean' or 'zypper ref' even though obviously different in what it does. Something of a sort of maintenance procedure of sorts?
Article -> https://en.wikipedia.org/wiki/RPM_Package_Manager#Forks
-Regards Could you please stick to your OP? One thing at the time. Your threads are derailing far too much by readding new questions.
-- Gertjan Lettink a.k.a. Knurpht openSUSE Board openSUSE Forums Team
On 03-15-2024 09:32PM, Knurpht-openSUSE wrote:
Op donderdag 14 maart 2024 06:01:58 CET schreef -pj:
Hi, I am using openSUSE TUmbleweed. What is the general principal and thought/s about recreating the 'index databases' on the machine with (# rpm --rebuilddb)?
Is there another command or systemd service that should be run after this?
Can this cause damage to the existing paths, files or directories already in place? Are there known negative effects of the command?
To me it seems like perhaps a command like 'zypper clean' or 'zypper ref' even though obviously different in what it does. Something of a sort of maintenance procedure of sorts?
Article -> https://en.wikipedia.org/wiki/RPM_Package_Manager#Forks
-Regards Could you please stick to your OP? One thing at the time. Your threads are derailing far too much by readding new questions.
Yes. I am sorry thanks.
participants (4)
-
-pj
-
Andrei Borzenkov
-
Carlos E. R.
-
Knurpht-openSUSE