[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] [PATCH] 2021-09-24-possible-failure-to-preserve-libraries: add item
From:       Sam James <sam () gentoo ! org>
Date:       2021-09-21 1:50:57
Message-ID: 20210921015057.2091044-1-sam () gentoo ! org
[Download RAW message or body]

Bug: https://bugs.gentoo.org/811462
Signed-off-by: Hank Leininger <hlein@korelogic.com>
Signed-off-by: Sam James <sam@gentoo.org>
---
 ...sible-failure-to-preserve-libraries.en.txt | 103 ++++++++++++++++++
 1 file changed, 103 insertions(+)
 create mode 100644 2021-09-24-possible-failure-to-preserve-libraries/2021-09-24-possible-failure-to-preserve-libraries.en.txt


diff --git a/2021-09-24-possible-failure-to-preserve-libraries/2021-09-24-possible-failure-to-preserve-libraries.en.txt \
b/2021-09-24-possible-failure-to-preserve-libraries/2021-09-24-possible-failure-to-preserve-libraries.en.txt
 new file mode 100644
index 0000000..4b4758b
--- /dev/null
+++ b/2021-09-24-possible-failure-to-preserve-libraries/2021-09-24-possible-failure-to-preserve-libraries.en.txt
 @@ -0,0 +1,103 @@
+Title: Possible failure to preserve libraries
+Author: Sam James <sam@gentoo.org>
+Author: Hank Leininger <hlein@korelogic.com>
+Posted: 2021-09-24
+Revision: 1
+News-Item-Format: 2.0
+Display-If-Installed: sys-apps/portage
+
+Possible inconsistency of Portage's internal database (VDB) has been
+observed in some cases, usually when glibc has been upgraded to a new
+major version, but pax-utils has not yet been upgraded to a version
+compatible with it.
+
+While this largely only affects users of Portage's FEATURES="preserve-libs",
+it also affects those who may choose to use it in future given the database
+is corrupt even if certain files are not being used for preserving libraries
+at present.
+
+The full technical details and investigation can be found on a Wiki page
+[0] and on Bugzilla [1]. Work is underway to prevent this happening
+again both within Portage [2] (possibly more to come) and within the
+glibc and pax-utils ebuilds [3][4].
+
+To detect whether a system is affected, emerge the
+app-portage/recover-broken-vdb package:
+```
+$ emerge --ask --verbose --oneshot app-portage/recover-broken-vdb
+```
+which provides two tools: recover-broken-vdb-find-broken.sh and
+recover-broken-vdb.
+
+Then run recover-broken-vdb-find-broken.sh:
+```
+$ recover-broken-vdb-find-broken.sh | tee broken_vdb_packages
+```
+
+It is recommended that this check be run on all Gentoo systems.
+
+If you have any output, read on.
+
+Fixing a broken system is not always straightforward. It is strongly
+recommended to take a backup of your full system before proceeding,
+as well as a copy of /var/db/pkg (the VDB):
+
+1. A tool has been developed [5] to attempt to fix the consistency
+  of the Portage database. Using this tool to modify the VDB is NOT
+  mandatory (read the full news item before proceeding) - you can skip
+  to Step 2 if you wish, but fixing the integrity of the VDB
+  makes it as safe as reasonably possible to proceed with
+  rebuilding packages.
+
+  Run:
+  ```
+  # Take a backup of /var/db/pkg before proceeding, such as by doing:
+  $ cp /var/db/pkg /var/db/pkg.orig
+
+  # And then:
+  $ emerge --ask --verbose --oneshot --noreplace \
+  	app-portage/recover-broken-vdb
+
+  $ recover-broken-vdb
+
+  # The tool will output to a random temporary directory.
+  # Inspect the results, and then update the real /var/db/pkg/
+  # by doing either:
+
+  $ recover-broken-vdb --output /var/db/pkg
+
+  # Or, manually copying the new files from the temporary directory tree
+  # into your real /var/db/pkg/ directory tree.
+  ```
+
+  If you choose not to use this recovery tool, please re-emerge
+  the affected packages (next step) and then -e @world, but
+  there is more risk attached if not all packages can
+  be rebuilt at their current versions.
+
+2. Attempt to rebuild the affected packages, first upgrading
+  app-portage/pax-utils to the latest version:
+  ```
+  $ emerge --ask --verbose --oneshot ">=app-misc/pax-utils-1.3.3"
+  $ emerge --ask --verbose --oneshot $(cat broken_vdb_packages)
+  ```
+
+Given that there are possible other side-effects of the corruption/bug,
+it is strongly recommended that if any corruption is detected, all
+packages on the system should be rebuilt, after following the above
+steps:
+```
+$ emerge --ask --emptytree @world
+```
+
+Please see the wiki [0] for a full description of the background
+of this problem and handling corner cases such as e.g. already
+being affected by system breakage [6] as a result of the bug.
+
+[0] https://wiki.gentoo.org/wiki/Project:Toolchain/Corrupt_VDB_ELF_files
+[1] https://bugs.gentoo.org/811462
+[2] https://github.com/gentoo/portage/pull/744
+[3] https://bugs.gentoo.org/811462#c6
+[4] https://bugs.gentoo.org/811462#c7
+[5] https://github.com/thesamesam/recover-broken-vdb
+[6] https://wiki.gentoo.org/wiki/Fix_my_Gentoo
-- 
2.33.0


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic