PDA

View Full Version : [SOLVED] Question on RPMBUILD


chajohari
22nd November 2010, 10:40 AM
Hi,
i have a requirement. browsed to find solutions about it.
i am building a binary rpm.

inside the spec file. i will calculate the size of the file being packaged. and i want to store it inside the rpm package as an entry in rpm HEADER/STORE/ or as a RPM_CUSTOM_XXX variables...I want to use it during installation in %pre section..before installing the file inside the package i want to make sure destination holds the enough free space. otherwise fail the installatino (..this is just one requirement..i have other custom requirements).

is it possible to put some hardcoded(userdefined data) value inside the rpm package at build time and use it during installation in %pre section? if yes? how to do it.

thanks
chajo

sej7278
22nd November 2010, 07:56 PM
to define a variable: %define file_size 100mb

to read back the variable value use: %{file_size}

chajohari
23rd November 2010, 12:25 PM

Thanks for help.

smr54
23rd November 2010, 01:52 PM
Not sure how you marked the thread solved, but it doesn't seem to have taken properly--the way to do it is to click the thread tools link at the top of the thread, and then choose marked solved.