打包AppImage时如何跳过elf检查?

问题描述

我有一个AppImage文件,并希望将其打包为rpm包。
这是我的.spec文件

%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

当我致电rpmbuild -ba ~/RPM/Specs/MyProduct.spec时,它会在ELF验证步骤上引发错误
整个输出

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)

解决方法

解决了在规范文件底部添加%set_verify_elf_method skip的问题

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...