[Revisor-users] Adding binary to a respin?

Jonathan Steffan jon at fedoraunity.org
Tue Oct 16 00:48:59 UTC 2007


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



More information about the Revisor-users mailing list