You are here: Foswiki>Computing Web>BuildRpms (revision 1)EditAttach
Notes on building RPMs with an example patching and rebuilding the kernel srpm from SL30x.

The SL30x update rpms are available in:

Install the source rpm, this unpacks the srpm and puts the source code in SOURCE and the spec file in SPECS dir:

# rpm -i kernel-2.4.21-37.EL.src.rpm

The kernel has many patches, and sometimes these may confict; your patch may apply fine to a vanilla kernel, but not to the patched version in the rpm. The order that patches are applied is defined in the spec file. In general, you should add new patches after the existing ones. So, we'll want to apply the existing patches before testing our patch.

# rpmbuild -bp SPECS/kernel

You should no be able to find a copy of the file(s) that you wish to patch in BUILD/kernel-2.4.21, you can diff them with the files in the SOURCE tree to see if they have been touched by patches:

# pwd

# echo "linux-2.4.21/drivers/usb/hid-core.c" > files.txt 
# bunzip2 --stdout ../SOURCES/linux-2.4.21.tar.bz2 | tar -x -T files.txt -f -

# diff linux-2.4.21/drivers/usb/hid-core.c ../BUILD/kernel-2.4.21/linux-2.4.21/drivers/usb/hid-core.c


# cp ../BUILD/kernel-2.4.21/linux-2.4.21/drivers/usb/hid-core.c .

-- TomRockwell - 15 Nov 2005
Topic attachments
I Attachment Action Size Date Who Comment
.rpmmacrosrpmmacros .rpmmacros manage 0.1 K 15 Nov 2005 - 13:53 TomRockwell  
rpm-dirs.tgztgz rpm-dirs.tgz manage 0.3 K 15 Nov 2005 - 13:55 TomRockwell directory structure for RPM build area
Edit | Attach | Print version | History: r5 | r4 < r3 < r2 < r1 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r1 - 15 Nov 2005, TomRockwell

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback