Creating an RPM without source

Associate
Joined
19 Jun 2006
Posts
162
Location
Swansea, Wales
Hi,

I need some help creating an RPM which doesn't suck up source code. Instead I want it to suck up bash scripts and then run them when I install the RPM.

Here's my SPEC file so far...

Code:
Summary: Used to update my machines
Name: pxe-update
Version: 0.0.1
Release: 1
Group: System Environment/Base
BuildRoot: /var/tmp/%{name}-buildroot
License: GPL

%description
The pxe-update package is used to deploy a variety of scripts which perform specific actions to add, remove or alter the configuration of a server.

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
sh test1.sh

%clean
rm -rf $RPM_BUILD_ROOT

%files


%changelog
* Wed Aug 19 2009 Rob White <[email protected]>
- First test of RPM

I put this in /usr/src/redhat/SPECS and I put test1.sh in /usr/src/redhat/BUILD.

Then i ran 'rpmbuild -bb pxe_update-0.0.1.spec.

If i have the .sh file in SOURCES I had an error...

sh: test1.sh: No such file or directory

When I moved the .sh file to BUILD then the process completed succesfully.

However, when I then install the created RPM, the script doesn't run.

Any help appreciated!
 
I think your missing several important statements such as %prep, %build and also %files, did you get this to work - if not let me know what exactly your trying to achieve (what does the shell script do?) and I'll try building it on one of my systems.
 
Back
Top Bottom