rpm-spec

How to exit rpm install in case of an error

这一生的挚爱 提交于 2019-12-01 04:23:00
问题 I am looking for a way to exit rpm install if some condition is false. I have added a small script in the %pre section that exits install if my condition fails. The problem I am facing is I see that the %pre scriptlet is executed, and rpm install does fail. Yet at the end of it I get these 2 lines which I don't want -- Installed ... followed by Complete! Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction missing file zyWhg1.

How to pass user defined parameters to rpmbuild to fill variables

别等时光非礼了梦想. 提交于 2019-11-28 22:54:22
is it possible to pass parameters to rpmbuild to fill user defined variables that are called inside the spec file? Example: The user defined variable %{foobar} which is called in the .spec file (but empty) should be filled with the variable which is passed when executing the rpmbuild command rpmbuild -bb --foobar="Foo" somespecfile.spec rpmbuild -bb --define '_foobar Foo' somespecfile.spec and refer it within the spec as %{_foobar} (the _ is a convention, not a must) smani The closest you can get AFAIK are conditional builds, which allow you to do things like rpmbuild -ba newpackage.spec -

rpmbuild change compression format

别说谁变了你拦得住时间么 提交于 2019-11-27 12:19:15
问题 I try to pack some map files for our geoserver in an internal rpm package. For the build part, this is just to copy the files. I think this works as expected. But it takes terribly long to pack those 20GB of images. I've read that rpm internally compresses the data and that this can be done with several different compression algorithms. But, I don't have a clue which compression my rpm chooses and how I can influence this. I could not find any options for the rpmbuild command, nor for the