Anonymouslemming
asked on
Adding a helper file to an RPM
Hi all,
I am trying to create an RPM for the Emulex 2.01g drivers for our kernel. The base RPM works fine, but I am now trying to include a helper script in the RPM. This script lives outside the driver source, as I wan't to preserve the emulex tarball.
I tried including
Source: updateinitrd.sh
in my spec file, but it died because it tries to unpack all source files during the RPM creation.
I then tried just adding the file where I do the other installs, but instead of doing
install -m $RPM_BUILD_ROOT/blah
I did
install -m /usr/src/redhat/SOURCES/up dateinitrd .sh /usr/local/bin
This works fine, and the file then appears in my binary RPM and is installed at installation time.
The problem I have is that the file is _NOT_ included in the resulting source RPM, so rebuilding the source RPM means finding this file and manually copying it into place.
Can anyone advise a solution for this ?
I am trying to create an RPM for the Emulex 2.01g drivers for our kernel. The base RPM works fine, but I am now trying to include a helper script in the RPM. This script lives outside the driver source, as I wan't to preserve the emulex tarball.
I tried including
Source: updateinitrd.sh
in my spec file, but it died because it tries to unpack all source files during the RPM creation.
I then tried just adding the file where I do the other installs, but instead of doing
install -m $RPM_BUILD_ROOT/blah
I did
install -m /usr/src/redhat/SOURCES/up
This works fine, and the file then appears in my binary RPM and is installed at installation time.
The problem I have is that the file is _NOT_ included in the resulting source RPM, so rebuilding the source RPM means finding this file and manually copying it into place.
Can anyone advise a solution for this ?
ASKER
As I said in my question, if I include updateinitrd.sh as a Source statement in the SPEC file, it tries to untar it, so it fails with an error.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For instance:
...
Source0: <baseurl>/%{name}-%{versio
Source1: updateinitrd.sh
...
Later down in %install you should have something like this
...
install -m %{SOURCE1} /usr/local/bin
Now, when you build the sources it should get included inside the srpm as well. At least that's the theory. It's been a while since I did something like that ;)