Hi, We'd like to simplify deployment of new blades and I need to package some of proprietary libs we are using, and obviously I don't have sources for them. Can anybody point me into good direction how to make packages from binaries? I have basic knowledge about building rpms, but it seems to be source oriented.
Thanks in advance
On 8/10/07, Tomasz Napierała zen@allegro.pl wrote:
Hi, We'd like to simplify deployment of new blades and I need to package some of proprietary libs we are using, and obviously I don't have sources for them. Can anybody point me into good direction how to make packages from binaries? I have basic knowledge about building rpms, but it seems to be source oriented.
For the most part, you build them the same as you do normal rpms, you just use a dummy %build section, unless you actually have to work on the files. Take a look at some of the spec files at http://dag.wieers.com/packages/ particularly the w32codec, or the acroread plugin.
Tomasz Napiera?a wrote:
Hi, We'd like to simplify deployment of new blades and I need to package some of proprietary libs we are using, and obviously I don't have sources for them. Can anybody point me into good direction how to make packages from binaries? I have basic knowledge about building rpms, but it seems to be source oriented.
The process is basically the same as building from source files - except that you don't have to do anything in the %build stage - in fact you could also miss out the %prep stage if you don't need to extract files from a tar archive etc. Normally just a case of putting files where you want them in the %install stage.
The 'noarch' rpms normally don't build anything - so they could be a good starting point - the crontabs spec file is a simple example - although if you are generating platform specific RPMS, you won't want the 'BuildArchitectures: noarch' line.
James Pearson
Thanks for response.
On Friday 10 August 2007 14:45:31 James Pearson wrote:
The 'noarch' rpms normally don't build anything - so they could be a good starting point - the crontabs spec file is a simple example - although if you are generating platform specific RPMS, you won't want the 'BuildArchitectures: noarch' line.
That's another question though. I need to build separate packages for 4 archs. Whuile it's pretty easy to do it while compilind, I'm not sure about binary only packages. Any partucular problems I should be aware of?
Regards,
Tomasz Napiera?a wrote:
Thanks for response.
On Friday 10 August 2007 14:45:31 James Pearson wrote:
The 'noarch' rpms normally don't build anything - so they could be a good starting point - the crontabs spec file is a simple example - although if you are generating platform specific RPMS, you won't want the 'BuildArchitectures: noarch' line.
That's another question though. I need to build separate packages for 4 archs. Whuile it's pretty easy to do it while compilind, I'm not sure about binary only packages. Any partucular problems I should be aware of?
I guess you use the '--target=ARCH' on the rpmbuild command line and then in the spec file do something like:
%ifarch i386 do i386 specific stuff here %endif
%ifarch x86_64 do x86_64 specific stuff here %endif
etc.
Have a look at the kernel spec file which does various architecture dependent stuff
James Pearson
Tomasz Napiera?a wrote:
Thanks for response.
On Friday 10 August 2007 14:45:31 James Pearson wrote:
The 'noarch' rpms normally don't build anything - so they could be a good starting point - the crontabs spec file is a simple example - although if you are generating platform specific RPMS, you won't want the 'BuildArchitectures: noarch' line.
That's another question though. I need to build separate packages for 4 archs. Whuile it's pretty easy to do it while compilind, I'm not sure about binary only packages. Any partucular problems I should be aware of?
Also, just in case the others have not made it clear .. you will create a tarball of your binary files in a file named <name>-<version>.tar.bz2 and spec file. You will make that your SRPM with rpmbuild -bs, and build it to your binaries with rpmbuild -bb.
It needs to extract to <name>-<version> in the BUILD directory (%setup will do that).
Then you just need to have an %install section that puts files where you want it to go on the machine.
You can have a different directory under <name>-<version> for each arch and use %ifarch as suggested earlier.
Also, the example SRPMS already relayed by other people in this thread are good to see the processes.
Thanks, Johnny Hughes
On Fri, 2007-08-10 at 14:07 +0200, Tomasz Napierała wrote:
We'd like to simplify deployment of new blades and I need to package some of proprietary libs we are using, and obviously I don't have sources for them. Can anybody point me into good direction how to make packages from binaries? I have basic knowledge about building rpms, but it seems to be source oriented.
In addition, you might want to consider using the NoSource directive in your spec files so that others can benefit from your efforts without you mistakenly adding the binaries in the (N)SRPMs.
http://www.redhat.com/archives/rpm-list/2004-February/msg00057.html