rpmbuild打包出错处理

Compiling /data/users/app/rpmbuild/BUILDROOT/filebeat-7.12-0.x86_64/opt/filebeat/module/auditd/log/ingest/gen-ecs-mappings.py ...
File "/opt/filebeat/module/auditd/log/ingest/gen-ecs-mappings.py", line 17
def extract_object(name: str, source: dict) -> dict:
^
SyntaxError: invalid syntax

error: Bad exit status from /var/tmp/rpm-tmp.CwPoYe (%install)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.CwPoYe (%install)
处理方式在
spec文件最上方添加
%global __python /usr/bin/python3
根因分析在生成python二进制文件的时候使用了python2
如果想只打包不让rpm命令做编译可以新增
%global __os_install_post %{nil}
删除
%build标签

你可能感兴趣的:(rpmbuild打包出错处理)