[Revisor-users] Adding binary to a respin?

Jonathan Steffan jon at fedoraunity.org
Tue Oct 16 21:00:38 UTC 2007


Arno Karner wrote:
> 
> ----- Original Message ----
> From: Jonathan Steffan <jon at fedoraunity.org>
> To: Revisor User Discussion and Support List <revisor-users at fedoraunity.org>
> Sent: Monday, October 15, 2007 7:48:59 PM
> Subject: Re: [Revisor-users] Adding binary to a respin?
> 
> Brian Dykstra wrote:
>> Hi,
>>
>> I'm using Revisor on Fedora 7 to successfully create different builds of
>> boot CDs for specialty needs around the business.  I have a requirement to
>> add a vendor executable binary (no source provided and not a .rpm) file to
>> the /usr/bin directory of the respin.  Is there any cheap and easy way to do
>> this?
> 
> The best way to go about this would be to make a rpm. Here is a very
> simple spec for foo 1.0 that has only one file:
> 
> Name:           foo
> Version:        1
> Release:        1%{?dist}
> Summary:        This is foo
> 
> Group:        Applications/System
> License:    GPL
> URL:        http://foo.org/
> Source0:    foo-1.0.tgz
> BuildRoot:
> %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
> 
> BuildRequires:    somepackage
> Requires:    what, packages, it, needs, to, run, foo
> 
> %description
> This is foo. Better then poo.
> 
> %prep
> %setup -q
> 
> %install
> rm -rf $RPM_BUILD_ROOT
> install -m 755 foo.file $RPM_BUILD_ROOT%{_bindir}/commandfoo
> 
> %clean
> rm -rf $RPM_BUILD_ROOT
> 
> %files
> %defattr(-,root,root,-)
> %{_bindir}/foo.file
> 
> %changelog
> * Mon Oct 15 2007 Foo User 1.0-1
> - Foo
> 
> foo-1.0.tgz will need to have a folder named foo-1.0 (this works out to
> %{name}-%{version} with the contents foo.file. You can also do %setup -q
> -n thenameofthefolder, but that is up to you. I've not tested this spec,
> so let me know if it doesn't work for you.
> 
> If you want more help with the packaging, let us know (or read
> http://www.rpm.org/max-rpm/p5208.html) We currently have 2 configuration
> options to copy data into the compose tree, but I don't think you can
> specify a target like you want (but I might be wrong, I've not looked).
> 
> The config options are:
> 
> copy_dir =
> strip_copy_dir =
> 
> Jonathan Steffan
> daMaestro
> 
> _______________________________________________
> Revisor-users mailing list
> Revisor-users at fedoraunity.org
> http://lists.fedoraunity.org/mailman/listinfo/revisor-users
> 
> 
> 
> 
> 
> hers is part of my spec file for the rpm in question,
> I don't create an srpm in the traditional sense,  and I don't
> build the srpm to get the noarch rpm, thats way over the top for a shell script rpm
> my source rpm is basicly a tar file of the source shell scripts
> the no arch rpm is made from the shell scripts that have alreay been install in /usr/local/sh
> which has a symbolic link /loc -> /usr/local, in the past I have supported 
> sol - solaris section, aix AIX sections, with open solairs I expect the solairs to come back
> there will never be an open AIX, or HP-UX but If I ever get them as clients they would
> 
> Summary: shell scripts
> Name: sh
> Version: 0.7.10
> Release: 5.kfc7
> Source: /usr/src/redhat/SOURCES/sh-0.7.10-5.kfc7.tar
> License: Tech Net Speaks Soft
> Group: shell/scripts
> URL: www.tnss.com
> 

-- Snip --

> 
> %post
> [ ! -L /loc ] && ln -s /usr/local/sh /loc
> grep /loc/sh/set_path /etc/profile > /dev/null
> if [ $? -ne 0 ] ; then
> echo ". /loc/sh/set_path" >> /etc/profile
> fi
> 
> %post tni
> [ ! -L /loc ] && ln -s /usr/local/sh /loc
> grep /loc/sh/set_path /etc/profile > /dev/null
> if [ $? -ne 0 ] ; then
> echo ". /loc/sh/set_path" >> /etc/profile
> fi
> 
> the post section fails because coreutils were not installed before this package
> its that simple

Then you need to add "Requires: coreutils" to your spec.

Jonathan Steffan
daMaestro


More information about the Revisor-users mailing list