1.rpmbuild构建出来的文件大小变小,md5不一样:
添加:
%define __debug_install_post
%{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} “%{_builddir}/%{?buildsubdir}”
%{nil}
%define __os_install_post %{nil}
%define __strip /bin/true
去除strip和系统的一下操作
2.参考的rpmbuild文件:
```powershell
Name: iflytek_record_client
Version: ${hisee_version}
Release: 1%{?dist}
Summary: The record client
License: GPLv2
Source0: %{name}-%{version}.tar.gz
%description
%prep
%setup -q
%build
%install
cp -R ./ %{buildroot}/
%clean
%files
%defattr(-, root, root, 0755)
/opt/apps/com.iflyrec.record/
/etc/xdg/autostart/recordService.desktop
%define __debug_install_post \
%{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
%{nil}
%define __os_install_post %{nil}
%define __strip /bin/true
%changelog

本文介绍了一种通过修改rpmbuild配置减少构建文件大小的方法,包括调整debug信息安装脚本和禁用strip操作等步骤,并提供了一个具体的示例。
1799

被折叠的 条评论
为什么被折叠?



