gawk: break unresolvable dependency cycle with glibc - #18542
Open
kgodara912 wants to merge 1 commit into
Open
Conversation
The build graph contained a cycle that could not be resolved from prebuilt
or PMC RPMs:
/sbin/ldconfig-RUN -> mpfr-RUN -> gawk-RUN -> /sbin/ldconfig-BUILD
glibc build-requires gawk, and gawk's explicit `Requires: mpfr` pulled in
mpfr, whose %post scriptlet requires /sbin/ldconfig from glibc. gawk's own
ldconfig scriptlets closed a second, shorter cycle the same way.
Drop the explicit gmp, mpfr and readline requires: RPM already generates
the equivalent soname dependencies (libgmp.so.10, libmpfr.so.6,
libreadline.so.8) at build time, but those are invisible to the
spec-parsing grapher, so only the explicit ones create graph edges.
Drop the ldconfig scriptlets as well. gawk's only shared objects are
loadable extensions under %{_libdir}/gawk/, which is not on the dynamic
linker search path, so there is no shared library cache to refresh.
Bump release to 3 and update the toolchain and pkggen core manifests to
match.
kgodara912
force-pushed
the
kgodara/3.0-dev/gawk_circular_dep
branch
from
August 21, 2026 07:55
5421245 to
ca05459
Compare
kgodara912
marked this pull request as ready for review
August 21, 2026 11:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The build graph contained a cycle that could not be resolved from prebuilt or PMC RPMs:
/sbin/ldconfig-RUN -> mpfr-RUN -> gawk-RUN -> /sbin/ldconfig-BUILD
glibc build-requires gawk, and gawk's explicit
Requires: mpfrpulled in mpfr, whose %post scriptlet requires /sbin/ldconfig from glibc. gawk's own ldconfig scriptlets closed a second, shorter cycle the same way.Drop the explicit gmp, mpfr and readline requires: RPM already generates the equivalent soname dependencies (libgmp.so.10, libmpfr.so.6, libreadline.so.8) at build time, but those are invisible to the spec-parsing grapher, so only the explicit ones create graph edges.
Drop the ldconfig scriptlets as well. gawk's only shared objects are loadable extensions under %{_libdir}/gawk/, which is not on the dynamic linker search path, so there is no shared library cache to refresh.
Bump release to 3.
Explanation:
The pipeline grapher fails with an unresolvable cycle:
glibcbuild-requiresgawk;gawkdeclaredRequires: mpfr;mpfr's%postscriptletrequires
/sbin/ldconfig, whichglibcprovides. gawk's own%post -p /sbin/ldconfigclosed a second, shorter cycle the same way.
This cycle has existed for years. It was harmless because
fixCyclesWithExistingRPMScut it by substituting a prebuilt gawk RPM. Once gawk itself was patched (CVEs in
5.2.2-2) no prebuilt of the new release existed, so there was nothing to cut with.A local build passes because it can reuse the previously built gawk from the local cache.
Fix
Requires: gmp,Requires: mpfr,Requires: readline >= 7.0.%post/%postun -p /sbin/ldconfigscriptlets.5.2.2-3and update the four toolchain/pkggen-core manifests.Why this is safe
The grapher only sees dependencies written in the
.spec. RPM'sfind-requiresgenerates the real runtime deps from linked ELF sonames at build time, and those are
invisible to the graph — so removing the redundant by-name tags breaks the graph edge
without weakening the package.
Verified on the built RPM:
libgmp.so.10,libmpfr.so.6andlibreadline.so.8are matched by the auto-generatedProvidesof gmp, mpfr and readline. Note/sbin/ldconfigis gone, which is what breaksthe cycle. The soname deps are stricter than the old by-name tags, since they pin the
library ABI rather than just the package name.
Install still pulls the libraries in:
Only
mpfris listed because gmp and readline were already present. Removing either isstill refused, since it would orphan gawk.
The ldconfig scriptlets were no-ops: gawk's only shared objects are its loadable
extensions under
%{_libdir}/gawk/, whichldconfignever scans and which gawkdlopen()s itself viaAWKLIBPATH.Feature parity is unaffected — there were no
BuildRequiresfor gmp/mpfr/readline beforethis change either, so the build environment and the resulting binary are identical to
5.2.2-2.Buddy build