Obscure RPM error on LoongArch
Hello, I'm almost done with my openSUSE LoongArch bootstrap. Unfortunately, I'm now running into an obscure RPM error which doesn't seem to be document anywhere [1]: [ 12s] error: .init_b_cache/compat-usrmerge-tools.rpm: invalid signature tag (unknown) (257) [ 12s] error: .init_b_cache/compat-usrmerge-tools.rpm cannot be installed Does anyone know what could trigger this particular problem? Thanks, Adrian
[1] https://build.opensuse.org/package/live_build_log/devel:LoongArch:Factory/fi...
On Friday 2024-11-29 17:40, John Paul Adrian Glaubitz via openSUSE Factory...:
[ 12s] error: .init_b_cache/compat-usrmerge-tools.rpm: invalid signature tag (unknown) (257) [ 12s] error: .init_b_cache/compat-usrmerge-tools.rpm cannot be installed
Does anyone know what could trigger this particular problem?
Legacy signature stuff.. Sigsize | 257 | int32 | Header+payload size. +/* Retrofit (and uniqify) signature tags for use by rpmTagGetName() and rpmQuery. */ +/* the md5 sum was broken *twice* on big endian machines */ +/* XXX 2nd underscore prevents tagTable generation */ + RPMTAG_SIG_BASE = HEADER_SIGBASE, /* this is 256 */ + RPMTAG_SIGSIZE = RPMTAG_SIG_BASE+1, /* i */
On Fri, 2024-11-29 at 22:31 +0100, Jan Engelhardt wrote:
On Friday 2024-11-29 17:40, John Paul Adrian Glaubitz via openSUSE Factory...:
[ 12s] error: .init_b_cache/compat-usrmerge-tools.rpm: invalid signature tag (unknown) (257) [ 12s] error: .init_b_cache/compat-usrmerge-tools.rpm cannot be installed
Does anyone know what could trigger this particular problem?
Legacy signature stuff..
Sigsize | 257 | int32 | Header+payload size.
+/* Retrofit (and uniqify) signature tags for use by rpmTagGetName() and rpmQuery. */ +/* the md5 sum was broken *twice* on big endian machines */ +/* XXX 2nd underscore prevents tagTable generation */ + RPMTAG_SIG_BASE = HEADER_SIGBASE, /* this is 256 */ + RPMTAG_SIGSIZE = RPMTAG_SIG_BASE+1, /* i */
Ah, very interesting. Do you have a suggestion for a workaround? I'm a bit surprised that this issue shows since I previously did not run into this problem and already successfully built around 1000 packages on LoongArch. I must have changed something in my build environment but I have no clue what. Adrian
On Fri, Nov 29, 2024 at 10:31:09PM +0100, Jan Engelhardt wrote:
On Friday 2024-11-29 17:40, John Paul Adrian Glaubitz via openSUSE Factory...:
[ 12s] error: .init_b_cache/compat-usrmerge-tools.rpm: invalid signature tag (unknown) (257) [ 12s] error: .init_b_cache/compat-usrmerge-tools.rpm cannot be installed
Does anyone know what could trigger this particular problem?
Legacy signature stuff..
Sigsize | 257 | int32 | Header+payload size.
+/* Retrofit (and uniqify) signature tags for use by rpmTagGetName() and rpmQuery. */ +/* the md5 sum was broken *twice* on big endian machines */ +/* XXX 2nd underscore prevents tagTable generation */ + RPMTAG_SIG_BASE = HEADER_SIGBASE, /* this is 256 */ + RPMTAG_SIGSIZE = RPMTAG_SIG_BASE+1, /* i */
However, that means that tag 257 is in fact valid, and something got probably miscompiled if a tag is reported as invalid with the numeric value 257. Thanks Michal
On Friday 2024-11-29 22:52, Michal Suchánek wrote:
On Fri, Nov 29, 2024 at 10:31:09PM +0100, Jan Engelhardt wrote:
On Friday 2024-11-29 17:40, John Paul Adrian Glaubitz via openSUSE Factory...:
[ 12s] error: .init_b_cache/compat-usrmerge-tools.rpm: invalid signature tag (unknown) (257) [ 12s] error: .init_b_cache/compat-usrmerge-tools.rpm cannot be installed
Does anyone know what could trigger this particular problem?
Legacy signature stuff..
Sigsize | 257 | int32 | Header+payload size.
+/* Retrofit (and uniqify) signature tags for use by rpmTagGetName() and rpmQuery. */ +/* the md5 sum was broken *twice* on big endian machines */ +/* XXX 2nd underscore prevents tagTable generation */ + RPMTAG_SIG_BASE = HEADER_SIGBASE, /* this is 256 */ + RPMTAG_SIGSIZE = RPMTAG_SIG_BASE+1, /* i */
However, that means that tag 257 is in fact valid, and something got probably miscompiled if a tag is reported as invalid with the numeric value 257.
I seem to remember that RPMTAG_SIGSIZE (257) is obsoleted by RPMTAG_LONGSIGSIZE (270) and would perform the following steps: - use an x86_64 `rpm -qip` and/or `rpm -U --force --ignorearch` command on the loongarch.rpm; see if it exhibits the same problem of rejecting the file. - if so, either figure out why rpmbuild emitted tag 257 in the first place, - or file a bug report upstream that rpm is too eager rejecting "old" files (there is precedent: https://github.com/rpm-software-management/rpm/issues/1762)
Hi, thanks for the hints! On Fri, 2024-11-29 at 23:27 +0100, Jan Engelhardt wrote:
However, that means that tag 257 is in fact valid, and something got probably miscompiled if a tag is reported as invalid with the numeric value 257.
I seem to remember that RPMTAG_SIGSIZE (257) is obsoleted by RPMTAG_LONGSIGSIZE (270) and would perform the following steps:
- use an x86_64 `rpm -qip` and/or `rpm -U --force --ignorearch` command on the loongarch.rpm; see if it exhibits the same problem of rejecting the file.
The RPM installs just fine. I also test-installed it on Debian loong64 using Debian's "rpm" command just fine. So the package [1] seems to be okay.
- if so, either figure out why rpmbuild emitted tag 257 in the first place,
I guess we can rule this out.
- or file a bug report upstream that rpm is too eager rejecting "old" files (there is precedent: https://github.com/rpm-software-management/rpm/issues/1762)
I think I'm more leaning to think that rpm was miscompiled. But what really puzzles me that it worked just fine in previous builds. Or there might be something wrong with the emulated environment. Adrian
[1] https://ftp.suse.com/pub/people/glaubitz/bootstrap/loongarch64/compat-usrmer...
On Freitag, 29. November 2024, 23:33:50 CET John Paul Adrian Glaubitz via openSUSE Factory wrote:
Hi,
thanks for the hints!
On Fri, 2024-11-29 at 23:27 +0100, Jan Engelhardt wrote:
However, that means that tag 257 is in fact valid, and something got probably miscompiled if a tag is reported as invalid with the numeric value 257.
I seem to remember that RPMTAG_SIGSIZE (257) is obsoleted by RPMTAG_LONGSIGSIZE (270) and would perform the following steps:
- use an x86_64 `rpm -qip` and/or `rpm -U --force --ignorearch` command on the loongarch.rpm; see if it exhibits the same problem of rejecting the file.
The RPM installs just fine. I also test-installed it on Debian loong64 using Debian's "rpm" command just fine. So the package [1] seems to be okay.
there were broken rpm releases writing this header in wrong places it seems. I workarounded for now with some really ugly hacks in build script and rpm to get these packages installing nevertheless. We can get rid of that once we bootstrapped LoongArch64 luckily again. -- Adrian Schroeter <adrian@suse.de> Build Infrastructure Project Manager SUSE Software Solutions Germany GmbH, Frankenstraße 146, 90461 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
participants (4)
-
Adrian Schröter
-
Jan Engelhardt
-
John Paul Adrian Glaubitz
-
Michal Suchánek