wiki:RebuildRpms

Version 1 (modified by trac, 12 years ago) (diff)

--

Many RPMs rebuild are not available for RHEL, here is a rough guide on rebuilding RPMs for RHEL.

Repoview: http://fedoraproject.org/extras/3/i386/repodata/repoview/fedora-rpmdevtools-0-1.0-1.html

Nvidia and ATI drivers and kernel modules

livna.org has an excellent guide at http://rpm.livna.org/kernel-modules.html

For RHEL4 use FC3 SRPMs from http://rpm.livna.org/fedora/3/i386/SRPMS.unstable/?C=M;O=D

adduser machbuild
up2date qt-devel kernel-devel kernel-hugemem-devel
su - machbuild
# get the driver and src
mkdir driver
mkdir srpm
wget http://rpm.livna.org/fedora/3/i386/RPMS.unstable/ati-fglrx-8.8.25.1-0.lvn.4.3.i386.rpm
mv ati-fglrx-8.8.25.1-0.lvn.4.3.i386.rpm driver/
wget http://rpm.livna.org/fedora/3/i386/SRPMS.unstable/ati-fglrx-8.8.25.1-0.lvn.4.3.src.rpm
mv ati-fglrx-8.8.25.1-0.lvn.4.3.src.rpm srpm/
~/bin/ati-kernel-module.sh
exit
rpm -Uhv /home/machbuild/driver/*rpm
rpm -Uhv /home/machbuild/latest/kernel-module*rpm

The ati-kernel-module.sh script does this:

#!/bin/sh
NNAME="$(date +%Y%m%d)-$(uname -r)"
cd
fedora-buildrpmtree
rpm -ihv srpm/*rpm
rpmbuild -ba rpmbuild/SPECS/ati-fglrx.spec --target $(uname -m) --without driverp
mkdir $NNAME
rm -f latest
ln -s $NNAME latest
mv rpmbuild/RPMS/i686/*rpm latest
rm -Rf rpmbuild

Whenever you install a new kernel you should run the ati-kernel-module.sh script to build the new kernel module. You do not need a new driver each time. X will work without a kernel module, but you will not have DRI support. Check /var/log/Xorg.0.log for a "DRI initialization failed!" message.

After installing the driver if X does not work check /etc/X11/xorg.conf for problems. I've needed to change the DefaultDepth and display Modes to something reasonable (24 and 1280x1024).

JPackage RPMs of Java software

http://jpackage.org/

Java is a popular programming language, but since running Java applications usually requires a proprietary interpreter, using Linux as a platform for developing Java applications has been difficult. The JPackage Project aims to make the process simpler.

First import the JPackage RPM key:

wget http://www.jpackage.org/jpackage.asc    
rpm --import jpackage.asc

Then, add the JPackage repositories to /etc/sysconfig/rhn/sources

cat >> /etc/sysconfig/rhn/sources <<EOF
yum jpackage16-generic http://mirrors.dotsrc.org/jpackage/1.6/generic/free/
yum jpackage16-rhes-4 http://mirrors.dotsrc.org/jpackage/1.6/redhat-el-4.0/free/
EOF

Now you can easily install packages from JPackage. But wait! Jpackage doesn't have permission to distribute Java itself or several other packages, so how do you get those? The answer is the JPackage "non-free" section which provide SRPMs and some small tips on where to get the source files. Often it takes some clicking around on a confusing Sun webpage to find the download. It can be helpful to install the SRPM and see where the build fails just to find out the name of the file you're looking for:

rpmbuild -ba rpmbuild/SPECS/java3d.spec 
error: File /home/brainj3d/rpmbuild/SOURCES/java3d-sdk-1.3.2-linux-i386.bin: No such file or directory

After you find the download, install the SRPM and put the source file in rpmbuild/SOURCES/. Here's an example with Java3d:

fedora-buildrpmtree 
wget http://mirrors.dotsrc.org/jpackage/1.6/generic/non-free/SRPMS/java3d-1.3.2-1jpp.nosrc.rpm
rpm -ihv java3d-1.3.2-1jpp.nosrc.rpm
less rpmbuild/SPECS/java3d.spec # find the source, click through agreements, etc.
mv java3d-sdk-1.3.1-linux-i386.bin rpmbuild/SOURCES/
rpmbuild -ba --without javadoc rpmbuild/SPECS/java3d.spec