Issue
Recently I upgraded to a new version of RPM (4.8.0) and the build process for my application broke horribly, due to a change in behavior of the %install
directive.
Based on some web trawling I did, I found out that the first thing the %install
directive now does is to remove the build directory and create it from scratch.
Which is fine, except that my spec file already does some work in the build directory in the %prep
and %build
directives, which then gets trashed by the new behavior of the %install
directive.
Once I found this out, the fix was easy: Just do all the work in the %install
directive.
But why the change? I'm guessing that my workflow wasn't the "proper" way to do it, and earlier versions of RPM tolerated it, but now that tolerance has been removed.
So, what is the "proper" workflow? What is the intended use of the various directives?
Solution
%prep
extracts/etc. your sources files, etc. (i.e Untar)
%build
builds your binaries, documentation, etc. (i.e. ./configure && make
)
%install
copies your installed/to-be-packaged files into the %buildroot
.
Answered By - Etan Reisner Answer Checked By - Mildred Charles (WPSolving Admin)