Add new file to existing RPMs
I am modifying the gnome-shell-3.8.xx.rpm package. I've created a few patches for rpm and they work fine. Now I want to add a new source file to rpm, but I can't find how to do it?
For the patches I used below:
- Download the source rpm.
- install rpm which creates SRPMS BUILD, BUILDROOT, RPMS, SOURCES SPECES directories.
- copy my patches to SOURCES directory.
- Modify the SPEC file to include my patches.
- Create a new package with the rpmbuild -bb SPEC / spec_file command.
+3
source to share
1 answer
Drop your patch or any other file you want to include (RPM) put everything in the SOURCE directory
../SOURCES/package-1.0-my.patch
../SOURCES/service.init
Add to SPEC file
Source1: service.init
Patch0: package-1.0-my.patch
Add to section %pre
:
%prep
%setup ...
%patch0 -p1
...
...
install -p -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/service.init
Create RPM:
rpmbuild -ba ../SPEC/package.spec
Notes: Above Source1
is an example, you can use your filename instead service.init
and change the path to set a specific location
+3
source to share