Skip to content

Commit

Permalink
scripts: add replacements scripts for /sbin/ldconfig calls in glibc-c…
Browse files Browse the repository at this point in the history
…ommon

The scriptlet in glibc adds a dependency on bash to glibc-common, which
is required by glibc, so effectively the whole world depends on bash.
I want to rewrite the script in lua to drop this dependency, and also
to avoid a (bogus?) warning from rpm about a dependency loop.

Quoting https://bugzilla.redhat.com/show_bug.cgi?id=2018913#c34:

warning: SCC coreos#1: 5 members (5 external dependencies)
warning: 	glibc-2.35-2.fc37.x86_64
warning: 		-> glibc-minimal-langpack-2.35-2.fc37.x86_64
warning: 		-> glibc-common-2.35-2.fc37.x86_64
warning: 	ncurses-libs-6.2-9.20210508.fc36.x86_64
warning: 		-> glibc-2.35-2.fc37.x86_64
warning: 	bash-5.1.16-2.fc36.x86_64
warning: 		-> ncurses-libs-6.2-9.20210508.fc36.x86_64
warning: 		-> glibc-2.35-2.fc37.x86_64
warning: 	glibc-common-2.35-2.fc37.x86_64
warning: 		-> glibc-2.35-2.fc37.x86_64
warning: 		-> bash-5.1.16-2.fc36.x86_64
warning: 	glibc-minimal-langpack-2.35-2.fc37.x86_64
warning: 		-> glibc-common-2.35-2.fc37.x86_64
warning: 		-> glibc-2.35-2.fc37.x86_64

If we look into SCC coreos#1, bash obviously requires glibc because it links
to it. The loop is created by glibc → glibc-common → bash, because
glibc-common has %transfiletriggerin and %transfiletriggerpostun using
bash to call /sbin/ldconfig.

The pull request for glibc: https://src.fedoraproject.org/rpms/glibc/pull-request/54
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2018913
(But note that this change doesn't necessarilly help in any way with
the bug. The main motivation is as described above.)
  • Loading branch information
keszybz authored and jlebon committed Feb 22, 2022
1 parent 64f970f commit c95a1d4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/libpriv/rpmostree-scripts.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ static const RpmOstreeLuaReplacement lua_replacements[] = {
"/usr/bin/sh",
glibc_langpacks_script
},
/* See https://src.fedoraproject.org/rpms/glibc/pull-request/54, which converts this to
* Lua as part of https://bugzilla.redhat.com/show_bug.cgi?id=2018913.
*/
{ "glibc-common.transfiletriggerin",
"/usr/bin/sh",
"/sbin/ldconfig"
},
{ "glibc-common.transfiletriggerpostun",
"/usr/bin/sh",
"/sbin/ldconfig"
},
/* See https://src.fedoraproject.org/rpms/glibc/pull-request/12
* Code originally introduced in https://src.fedoraproject.org/rpms/glibc/c/34927af202deb7d97dbb211a3cb13b1c53b496d3?branch=master
* Most of that script is about working around bugs from a traditional RPM in-place update,
Expand Down

0 comments on commit c95a1d4

Please sign in to comment.