Bugzilla – Bug 1217523
yast2-core build failure with rpm 4.19
Last modified: 2023-11-28 15:02:31 UTC
Created attachment 870996 [details] yast2-core with rpm 4.19 The work to get rpm 4.19 in Tumbleweed has started (SR#1123934) and yast2-core is failing to build. The full log is attached, the relevant lines seems to be: [ 112s] Running target unix [ 112s] Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. [ 112s] Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. [ 112s] Using /home/abuild/rpmbuild/BUILD/yast2-core-5.0.0/libycp/testsuite/config/unix.exp as tool-and-target-specific interface file. [ 112s] Running /home/abuild/rpmbuild/BUILD/yast2-core-5.0.0/libycp/testsuite/libycp.test/bytecode-compatibility.exp ... [ 112s] Checking bytecode version 9.1 [ 113s] ............................................................... [ 113s] Running /home/abuild/rpmbuild/BUILD/yast2-core-5.0.0/libycp/testsuite/libycp.test/bytecode.exp ... [ 116s] ........................................................................... [ 116s] Running /home/abuild/rpmbuild/BUILD/yast2-core-5.0.0/libycp/testsuite/libycp.test/ycp.exp ... [ 116s] ................... [ 116s] FAIL: test case failed for builtin/Builtin-String1: grep: (standard input): binary file matches [ 120s] ........................................................................................................................................................................................................................................................................................................................................... [ 120s] FAIL: test case failed for values/SingleCharStrings: grep: (standard input): binary file matches [ 120s] ....... [ 120s] === libycp Summary === [ 120s] [ 120s] # of expected passes 521 [ 120s] # of unexpected failures 2
That Dejagnu-based testsuite is ancient. We haven't used YCP as a programming language anymore since SLES-12 GA; the last product that used it was SLES-11 SP5 which went out of support last year AFAIK. We are still using libycp with its data types (YCPString, YCPTerm, YCPMap, YCPList etc.) in many parts of YaST, but I don't think we are using YCP as a language anymore with its control flow, let alone the byte code. AFAICS yast2-core does not use rpm as a command line tool or librpm anywhere; anything in that area is done by libzypp via the libyui pkg plugins (libyui-qt-pkg, libyui-ncurses-pkg) which are loaded on demand by 'dlopen()'. So what causes the build / testsuite to fail is so far totally unclear.
This gives some hints how to start individual tests manually: https://github.com/yast/yast-core/blob/master/libycp/testsuite/README cd libycp/testsuite/tests/builtin ../../runycp Builtin-String1.ycp >/tmp/file.out 2>/tmp/file.err diff -u Builtin-String1.out /tmp/file.out diff -u Builtin-String1.err /tmp/file.err --- Builtin-String1.err 2020-10-27 19:45:56.905431054 +0100 +++ /tmp/file.err 2023-11-27 14:57:04.261971103 +0100 @@ -70,12 +70,10 @@ ---------------------------------------------------------------------- "** find et.al. **" ---------------------------------------------------------------------- -[Parser] tests/builtin/Builtin-String1.ycp:45 Warning: find(...) is deprecated, please fix Parsed: ---------------------------------------------------------------------- find ("abcdefghi", "efg") ---------------------------------------------------------------------- -[Parser] tests/builtin/Builtin-String1.ycp:46 Warning: find(...) is deprecated, please fix Parsed: ---------------------------------------------------------------------- find ("aaaaa", "z") I have no clue how relevant that is.
AFAICS deprecated functions are all over the place, that hasn't changed since 6/2012, and it was never a problem.
Martin, any good idea how to debug this?
From IRC just now: <mvidner> HuHa: no obvious idea
mvidner found out that some of those files contain non-UTF-8 / ASCII characters, so 'grep' will likely treat them as binary files. That might be a connection to that message 'binary file matches'. % pwd /work/src/yast/yast-core/libycp/testsuite/tests % file **/*.{out,err} | grep -E '(ISO-8859|data)' builtin/Builtin-String1.err: ISO-8859 text values/SingleCharStrings.out: data values/SingleCharStrings.err: data
Tentative fix (WIP): https://github.com/yast/yast-core/pull/165
The fix (which also contains some more details) is now ready. AFAICS the problem was unrelated to the new 'rpm' package; there must have been some other change in TW. It failed in my TW VM when I did a 'zypper dup', even without that new 'rpm' package; it was probably coincidence that you discovered the problem with that package. I am pretty sure that it would have hit us with any other change, too, that would have needed a rebuild of yast2-core.
Submitted to Factory as yast2-core-5.0.1 with SR https://build.opensuse.org/request/show/1129630 .