Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 885481 - sys-libs/glibc: downgrade guardrail not effective for binary packages
Summary: sys-libs/glibc: downgrade guardrail not effective for binary packages
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-11 17:56 UTC by John Helmert III
Modified: 2023-05-10 19:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-12-11 17:56:24 UTC
I have several systems on which world upgrades are only done with -G/--getbinpkgonly (though this problem should affect -K/--usepkgonly world upgrades too but I haven't checked). On one such system, I cleaned up its binpkg cache and Portage ended up trying to downgrade glibc (why this happened is probably a Portage bug that I've not investigated properly). With builds from source, the ebuild prevents this from happening in src_unpack, but src_unpack isn't executed for binpkgs:

1670284868: Started emerge on: Dec 05, 2022 18:01:07
1670284868:  *** emerge --newuse --noreplace --update --autounmask-continue --backtrack=100 --binpkg-changed-deps=y --deep --with-bdeps=y --binpkg-respect-use=y --getbinpkgonly --qui
et-build=y --regex-search-auto=y --getbinpkg --usepkgonly --usepkg @world
1670285008:  >>> emerge (1 of 1) sys-libs/glibc-2.35-r10 to /
1670285008:  === (1 of 1) Merging Binary (sys-libs/glibc-2.35-r10::/var/cache/binpkgs/sys-libs/glibc/glibc-2.35-r10-1.xpak)
1670285017:  >>> AUTOCLEAN: sys-libs/glibc:2.2
1670285017:  === Unmerging... (sys-libs/glibc-2.36-r5)
1670285020:  >>> unmerge success: sys-libs/glibc-2.36-r5
1670285025:  === (1 of 1) Post-Build Cleaning (sys-libs/glibc-2.35-r10::/var/cache/binpkgs/sys-libs/glibc/glibc-2.35-r10-1.xpak)
1670285025:  ::: completed emerge (1 of 1) sys-libs/glibc-2.35-r10 to /
1670285026:  *** Finished. Cleaning up...
1670285026:  *** exiting successfully.
1670285026:  *** terminating.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-12 00:10:19 UTC
I suspect this worked before & got lost in refactoring.
Comment 2 Larry the Git Cow gentoo-dev 2023-05-07 21:51:02 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af3e8eb1d66ca412e395e6e473f4d74552550494

commit af3e8eb1d66ca412e395e6e473f4d74552550494
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2023-05-07 21:50:24 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2023-05-07 21:50:51 +0000

    sys-libs/glibc: Add a call to sanity_prechecks in pkg_preinst
    
    Bug: https://bugs.gentoo.org/885481
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 sys-libs/glibc/glibc-9999.ebuild | 3 +++
 1 file changed, 3 insertions(+)
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2023-05-10 19:17:01 UTC
commit 8686f981cd3d2c54826f377138ff793295c5e15d (HEAD -> master, origin/master, origin/HEAD)
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Wed May 10 21:14:22 2023 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed May 10 21:14:54 2023 +0200

    sys-libs/glibc: keyword 2.37-r3
    
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 sys-libs/glibc/glibc-2.37-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)