Bug 1217523 - yast2-core build failure with rpm 4.19
Summary: yast2-core build failure with rpm 4.19
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-27 11:10 UTC by Ana Guerrero
Modified: 2023-11-28 15:02 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
yast2-core with rpm 4.19 (994.84 KB, text/plain)
2023-11-27 11:10 UTC, Ana Guerrero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ana Guerrero 2023-11-27 11:10:27 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
Comment 1 Stefan Hundhammer 2023-11-27 12:47:00 UTC
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.
Comment 2 Stefan Hundhammer 2023-11-27 13:59:02 UTC
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.
Comment 3 Stefan Hundhammer 2023-11-27 14:31:58 UTC
AFAICS deprecated functions are all over the place, that hasn't changed since 6/2012, and it was never a problem.
Comment 4 Stefan Hundhammer 2023-11-27 14:38:46 UTC
Martin, any good idea how to debug this?
Comment 5 Stefan Hundhammer 2023-11-27 14:46:02 UTC
From IRC just now:

<mvidner> HuHa: no obvious idea
Comment 6 Stefan Hundhammer 2023-11-27 16:07:35 UTC
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
Comment 7 Stefan Hundhammer 2023-11-27 16:35:22 UTC
Tentative fix (WIP):

https://github.com/yast/yast-core/pull/165
Comment 8 Stefan Hundhammer 2023-11-28 13:20:00 UTC
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.
Comment 9 Stefan Hundhammer 2023-11-28 15:02:31 UTC
Submitted to Factory as yast2-core-5.0.1 with SR https://build.opensuse.org/request/show/1129630 .