[Revisor-users] Adding binary to a respin?

Arno Karner arnokarner at yahoo.com
Tue Oct 16 10:04:44 UTC 2007



----- 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

%package tni
Summary: tni
Group: tnishell/tni in house scripts

%package sco
Summary: sco
Group: scoshell/sco client scripts

%package lnx
Summary: lnx
Group: lnxshell/linux client scripts

%description
shell scripts
%description tni
tni

%description sco
sco

%description lnx
lnx

Requires: coreutils, utils
%doc

%files
%attr(00555,root,root) /loc/sh/add2root
%attr(00555,root,root) /loc/sh/add2root.sco
%attr(00555,root,root) /loc/sh/addusers
%attr(00555,root,root) /loc/sh/addusers_func
%attr(00555,root,root) /loc/sh/au_arno
%attr(00555,root,root) /loc/sh/au_coolcat
<snip>

%files tni
%attr(00555,root,root) /usr/local/sh/add2root
%attr(00555,root,root) /usr/local/sh/add2root.sco
%attr(00555,root,root) /usr/local/sh/addusers
%attr(00555,root,root) /usr/local/sh/addusers_func
%attr(00555,root,root) /usr/local/sh/au_arno
%attr(00555,root,root) /usr/local/sh/au_coolcat
<snip>

%files sco
%attr(00555,root,root) /usr/local/sh/add2root
%attr(00555,root,root) /usr/local/sh/add2root.sco
%attr(00555,root,root) /usr/local/sh/addusers
%attr(00555,root,root) /usr/local/sh/addusers_func
%attr(00555,root,root) /usr/local/sh/au_httpdn
%attr(00555,root,root) /usr/local/sh/au_httpdw
<snip>

%files lnx
%attr(00555,root,root) /usr/local/sh/add2root
%attr(00555,root,root) /usr/local/sh/addusers
%attr(00555,root,root) /usr/local/sh/addusers_func
%attr(00555,root,root) /usr/local/sh/au_httpdn
%attr(00555,root,root) /usr/local/sh/au_httpdw
<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


Arno




      ____________________________________________________________________________________
Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.
http://autos.yahoo.com/index.html
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraunity.org/pipermail/revisor-users/attachments/20071016/ede0dcfb/attachment.html 


More information about the Revisor-users mailing list