Bug 1652641 - unable to add a task with binary database data
Summary: unable to add a task with binary database data
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: general
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 26.2
Assignee: Martin Styk
QA Contact: tools-bugs
URL:
Whiteboard:
: 1516834 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-22 14:07 UTC by Karel Volný
Modified: 2018-12-20 13:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-27 14:52:37 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Beaker Project Gerrit 6338 0 None None None 2018-11-26 16:38:15 UTC

Description Karel Volný 2018-11-22 14:07:57 UTC
Description of problem:
While updating the test
/CoreOS/mariadb55/Security/CVE-2010-3840-crash-loading-into-polyfromwkb
for newer mariadb version, I have found that I am unable to submit this task to beaker ...

Version-Release number of selected component (if applicable):
rhts-test-env-4.74-2.fc29eng.noarch

How reproducible:
always

Steps to Reproduce:
1. clone tests/mariadb55 from distgit 
2. cd mariadb55/Security/CVE-2010-3840-crash-loading-into-polyfromwkb
(re-tag if needed)
3. make bkradd

Actual results:
...
make[1]: Leaving directory '/tmp/rhts-build-MqhliD4d/rpm-build/mariadb55-CoreOS-mariadb55-Security-CVE-2010-3840-crash-loading-into-polyfromwkb-1.0'
+ chmod -R a-s /home/kvolny/rpmbuild/BUILDROOT/mariadb55-CoreOS-mariadb55-Security-CVE-2010-3840-crash-loading-into-polyfromwkb-1.0-4.x86_64
+ /usr/lib/rpm/brp-compress
Processing files: mariadb55-CoreOS-mariadb55-Security-CVE-2010-3840-crash-loading-into-polyfromwkb-1.0-4.noarch
Provides: CoreOS-mariadb55-Security-CVE-2010-3840-crash-loading-into-polyfromwkb = 1.0-4 mariadb55-CoreOS-mariadb55-Security-CVE-2010-3840-crash-loading-into-polyfromwkb = 1.0-4 test(/CoreOS/mariadb55/Security/CVE-2010-3840-crash-loading-into-polyfromwkb) = 1.0-4 test-of(mariadb55)-/CoreOS/mariadb55/Security/CVE-2010-3840-crash-loading-into-polyfromwkb = 1.0-4
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
error: Arch dependent binaries in noarch package


RPM build errors:
    Arch dependent binaries in noarch package
make: *** [/usr/share/rhts/lib/rhts-make.include:99: bkradd] Error 1
rm testinfo.desc


Expected results:
no such error, task gets submitted

Additional info:

Comment 1 Martin Styk 2018-11-26 15:23:19 UTC
The issue seems to be caused by data.bin file.

$ file data.bin 
data.bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.4, with debug_info, not stripped

As error stated, rpm is trying to create noarch package, however data.bin is x86-64.

Comment 2 Bill Peck 2018-11-26 15:27:39 UTC
this might be helpful

https://patchwork.openembedded.org/patch/139621/

Comment 3 Martin Styk 2018-11-26 15:42:56 UTC
Workaround

Create file ~/.rpmmacros and store following content in:
%_unpackaged_files_terminate_build      0
%_binaries_in_noarch_packages_terminate_build   0

Comment 4 Bill Peck 2018-11-26 15:50:28 UTC
We don't want to mess with .rpmmacros where we could affect other packages being built.

The following diff should work I think?

diff --git a/bin/rhts-mk-build-package b/bin/rhts-mk-build-package
index 813e0c3..ea0debb 100755
--- a/bin/rhts-mk-build-package
+++ b/bin/rhts-mk-build-package
@@ -161,7 +161,7 @@ popd
 echo "Generating specfile: $GENERATED_SPECFILE"
 find $EXTRACT_DIR -name testinfo.desc | rhts-mk-generate-specfile $ABI_OPTIONS $URL_OPTIONS $RHTS_RPM_NAME $VERSION $RELEASE $provides  > $GENERATED_SPECFILE || exit $?
 echo "Building package:"
-rpmbuild  -bb --define "_builddir $BUILD_DIR" --define "_sourcedir $GENERATED_SOURCE_DIR"  --define "_rpmdir $INSTALL_DIR" $GENERATED_SPECFILE || exit 1
+rpmbuild  -bb --define "_binaries_in_noarch_packages_terminate_build 0" --define "_unpackaged_files_terminate_build 0" --define "_builddir $BUILD_DIR" --define "_sourcedir $GENERATED_SOURCE_DIR"  --define "_rpmdir $INSTALL_DIR" $GENERATED_SPECFILE || exit 1
 
 #bpeck: if $(TESTSERVER) passed in then submit rpm.
 if [ -n "$TESTSERVER" ]; then

Comment 5 Martin Styk 2018-11-26 16:08:29 UTC
Tested and it is working. Do we want to incorporate this change to rhts-mk-build-package? This will affect all created packages.

Comment 6 Bill Peck 2018-11-26 16:14:53 UTC
yes please.

Thanks

Comment 7 Martin Styk 2018-12-12 08:37:21 UTC
*** Bug 1516834 has been marked as a duplicate of this bug. ***

Comment 8 Karel Volný 2018-12-20 13:50:20 UTC
(In reply to Martin Styk from comment #1)
> The issue seems to be caused by data.bin file.
> 
> $ file data.bin 
> data.bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
> linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.4, with
> debug_info, not stripped
> 
> As error stated, rpm is trying to create noarch package, however data.bin is
> x86-64.

I don't know how that works, however mysql/mariadb loads the same file on all architectures


...

thanks for patching this; I've applied the patch locally and I can submit the test to Beaker now ... hope it'll make it into the rhts-devel package soon


Note You need to log in before you can comment on or make changes to this bug.