IC_
IC_

Reputation: 1789

How to skip elf checks when packing AppImage?

I have an AppImage file and want to package it in an rpm package.
Here is my .spec file:

%prep

%clean
rm -rf $RPM_BUILD_ROOT

%install
mkdir -p $RPM_BUILD_ROOT/opt/Movavi/
cp ~/RPM/SOURCES/MyProduct.AppImage $RPM_BUILD_ROOT/opt/MyCompany/

%files
# %doc
/opt/MyCompany/MyProduct.AppImage

When i call rpmbuild -ba ~/RPM/SPECS/MyProduct.spec it throws an error on ELF validation step
Whole output:

Executing(%prep): /bin/sh -e /tmp/rpm-tmp.71228
+ umask 022
+ /bin/mkdir -p /home/user/RPM/BUILD
+ cd /home/user/RPM/BUILD
+ exit 0
Executing(%install): /bin/sh -e /tmp/rpm-tmp.95497
+ umask 022
+ /bin/mkdir -p /home/user/RPM/BUILD
+ cd /home/user/RPM/BUILD
+ /bin/chmod -Rf u+rwX -- /tmp/MyProduct-buildroot
+ /bin/rm -rf -- /tmp/MyProduct-buildroot
+ mkdir -p /tmp/MyProduct-buildroot/opt/MyCompany/
+ cp /home/user/RPM/SOURCES/MyProduct.AppImage /tmp/MyProduct-buildroot/opt/MyCompany/
+ /usr/lib/rpm/brp-alt
Cleaning files in /tmp/MyProduct-buildroot (auto)
Verifying and fixing files in /tmp/MyProduct-buildroot (binconfig,pkgconfig,libtool,desktop)
Checking contents of files in /tmp/MyProduct-buildroot/ (default)
Compressing files in /tmp/MyProduct-buildroot (auto)
056-debuginfo.brp: WARNING: You have 1 stripped ELF objects. Please compile with debugging information!
056-debuginfo.brp: WARNING: An excerpt from the list of affected files follows:
  ./opt/MyCompany/MyProduct.AppImage
Verifying ELF objects in /tmp/MyProduct-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal)
unsupported ABI version e_ident[8] == 65
e_ident[9] is not zero
e_ident[10] is not zero
verify-elf: WARNING: ./opt/MyCompany/MyProduct.AppImage: eu-elflint failed
ldd: ERROR: ./opt/MyCompany/MyProduct.AppImage: failed to find the program interpreter
verify-elf: ERROR: ./opt/MyCompany/MyProduct.AppImage: ldd failed
error: Bad exit status from /tmp/rpm-tmp.95497 (%install)

RPM build errors:
    Bad exit status from /tmp/rpm-tmp.95497 (%install)

Upvotes: 1

Views: 532

Answers (1)

IC_
IC_

Reputation: 1789

Fixed the problem adding %set_verify_elf_method skip at the bottom of the spec file

Upvotes: 1

Related Questions