RPM build errors: Installed (but unpackaged) fi...

解決方法:mysql

第一種: add those files below %files sectionsql

 To make it build you just add the unpacked files to the listui

第二種: 對於安裝後的文件會被修改的狀況, 利用%config(noreplace)宏處理spa

例如*.py文件在執行時會產生*.pyc文件orm

第三種: 使用 %exclude 告知rpm不包含哪些文件ci

%filesit

......io

%exclude %{_datadir}/heartbeat-gui/haclient.pycgui

%exclude %{_libexecdir}/mod_sql_mysql.socli

the %exclude directive would exclude them from the package, but also tell RPM, "Yes, these files will be left behind as artifacts of the 'make install', and I know that, so don't crap out telling me that files were left over" (or whatever).

------------------------------------------------------------------------------------------------------------------

一、找到 /usr/lib/rpm/macros 中

%__check_files

/usr/lib/rpm/check-files %{buildroot}   註釋掉

二、在/usr/lib/rpm/macros文件中有一個定義:
%_unpackaged_files_terminate_build 1,把1改成0只警告

三、在spec文件中,找到%files(之下有不少%{_bindir}、%{_libdir}、%{_datadir}的),在其下依葫蘆畫瓢的添加上面提示的內容。
/usr/bin/xxx => %{_bindir}/xxx
/usr/lib/xxx => %{_libdir}/xxx
/usr/include/xxx => %{_includedir}/xxx
/usr/share/xxx => %{_datadir}
/xxx/usr/man/xxx => %{_mandir}/xxx
相關文章
相關標籤/搜索