While building a kernel, stumbled upon this debugedit bug (making brp-debuginfo fail, causing overall build failure): + /usr/lib/rpm/debugedit -b /usr/src/RPM/BUILD -d /usr/src/debug -l .tmp/src.14318 ./usr/lib/debug/lib/modules/5.9.1-clr-native-alt1.clr992/vmlinux /usr/lib/rpm/debugedit: canonicalization unexpectedly shrank by one character This seems to be probabilistic error. if (shrank > 0) { if (--shrank == 0) error (EXIT_FAILURE, 0, "canonicalization unexpectedly shrank by one character"); else { memset (ptr, 'X', shrank); ptr += shrank; *ptr++ = '\0'; } } If array of paths shrank more than 1 char it is padded with "XX\0", but if it's just one byte it fails.
Related upstream bug https://bugzilla.redhat.com/show_bug.cgi?id=304121 And it's fix https://github.com/rpm-software-management/rpm/commit/88989572fff1f3
I wonder why we not get this more frequent?
(In reply to Vitaly Chikunov from comment #2) > I wonder why we not get this more frequent? Because all such cases are bugs in makefiles (or whatever build systems are used in packages), most of them must have been fixed already?
(In reply to Dmitry V. Levin from comment #3) > (In reply to Vitaly Chikunov from comment #2) > > I wonder why we not get this more frequent? > > Because all such cases are bugs in makefiles (or whatever build systems are > used in packages), most of them must have been fixed already? Maybe autotools/cmake normalizes paths? And only unique compilation harness, which is rare, would get this. We never got this for kernel for years, but, this bug is happened on kernel (with a fistful of patches though, but I didn't find "//"s in them nor in compile log with V=1).
rpm-build-4.0.4-alt152 -> sisyphus: Wed Nov 04 2020 Vitaly Chikunov <vt@altlinux> 4.0.4-alt152 - debuginfo: Allow kbuilds with the output directory. - debugedit: Fix 'canonicalization unexpectedly shrank by one character' (closes: #39184). - brp-sign-kmodules: Sign kernel modules after kernel build.
Thanks!