Changes between Version 1 and Version 2 of RebuildRpms


Ignore:
Timestamp:
10/18/06 16:13:45 (11 years ago)
Author:
joshuadf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RebuildRpms

    v1 v2  
    11Many RPMs rebuild are not available for RHEL, here is a rough guide on rebuilding RPMs for RHEL. 
    22 
    3 Repoview: http://fedoraproject.org/extras/3/i386/repodata/repoview/fedora-rpmdevtools-0-1.0-1.html 
    4  
    5 == Nvidia and ATI drivers and kernel modules == 
    6  
    7 livna.org has an excellent guide at http://rpm.livna.org/kernel-modules.html 
    8  
    9 For RHEL4 use FC3 SRPMs from [http://rpm.livna.org/fedora/3/i386/SRPMS.unstable/?C=M;O=D] 
    10  
     3 * Set up `fedora-rpmdevtools` from [http://fedoraproject.org/extras/3/i386/repodata/repoview/Development.Tools.group.html Fedora Extras] 
     4 * Add a user just for building RPMs: 
    115{{{ 
    126adduser machbuild 
    13 up2date qt-devel kernel-devel kernel-hugemem-devel 
    147su - machbuild 
    15 # get the driver and src 
    16 mkdir driver 
    17 mkdir srpm 
    18 wget http://rpm.livna.org/fedora/3/i386/RPMS.unstable/ati-fglrx-8.8.25.1-0.lvn.4.3.i386.rpm 
    19 mv ati-fglrx-8.8.25.1-0.lvn.4.3.i386.rpm driver/ 
    20 wget http://rpm.livna.org/fedora/3/i386/SRPMS.unstable/ati-fglrx-8.8.25.1-0.lvn.4.3.src.rpm 
    21 mv ati-fglrx-8.8.25.1-0.lvn.4.3.src.rpm srpm/ 
    22 ~/bin/ati-kernel-module.sh 
    23 exit 
    24 rpm -Uhv /home/machbuild/driver/*rpm 
    25 rpm -Uhv /home/machbuild/latest/kernel-module*rpm 
     8fedora-buildrpmtree 
     9}}} 
     10 * Edit `~/.rpmmacros`, for example: 
     11{{{ 
     12%_topdir      %(echo $HOME)/rpmbuild 
     13%packager       Joshua Daniel Franklin <joshuadf@u> 
     14%_tmpdir      %(echo $HOME)/tmp 
     15 
     16#%_smp_mflags  -j3 
     17 
     18# have built RPMs land in RPMS/ instead of RPMS/<arch>/ 
     19%_rpmfilename  %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm 
     20 
     21# don't use check-rpaths, it's a little too strict 
     22#%__arch_install_post   /usr/lib/rpm/check-rpaths   /usr/lib/rpm/check-buildroot 
     23%__arch_install_post   /usr/lib/rpm/check-buildroot 
     24 
     25# don't build debug RPMs 
     26%debug_package %{nil} 
     27 
    2628}}} 
    2729 
    28 The `ati-kernel-module.sh` script does this: 
    29 {{{ 
    30 #!/bin/sh 
    31 NNAME="$(date +%Y%m%d)-$(uname -r)" 
    32 cd 
    33 fedora-buildrpmtree 
    34 rpm -ihv srpm/*rpm 
    35 rpmbuild -ba rpmbuild/SPECS/ati-fglrx.spec --target $(uname -m) --without driverp 
    36 mkdir $NNAME 
    37 rm -f latest 
    38 ln -s $NNAME latest 
    39 mv rpmbuild/RPMS/i686/*rpm latest 
    40 rm -Rf rpmbuild 
    41 }}} 
    4230 
    43 Whenever you install a new kernel you should run the `ati-kernel-module.sh` script to build the new kernel module. 
    44 You do not need a new driver each time. X will work without a kernel module, but you will not have DRI support. 
    45 Check `/var/log/Xorg.0.log` for a "DRI initialization failed!" message. 
     31== DKMS kernel modules == 
    4632 
    47 After installing the driver if X does not work check `/etc/X11/xorg.conf` for problems. 
    48 I've needed to change the `DefaultDepth` and display `Modes` to something reasonable  
    49 (24 and 1280x1024). 
    50  
     33In the future, a better way of doing binary kernel modules would probably be [http://linux.dell.com/dkms/ DKMS] 
     34which provides an automatic way of rebuilding a kernel modules for a newer kernel. 
     35FreshRPMs has SRPMs of binary graphics drivers using DKMS, for example  
     36[http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/6/nvidia-x11-drv/ Nvidia X11 drivers]. 
    5137 
    5238 
     
    9581rpmbuild -ba --without javadoc rpmbuild/SPECS/java3d.spec  
    9682}}} 
     83 
     84 
     85== Nvidia and ATI drivers and kernel modules == 
     86 
     87On several machines including uvula, stylus, and femur I installed binary RPMs based on a guide at http://rpm.livna.org/kernel-modules.html  
     88This appears to be out of date regarding DKMS and modular xorg, but scripts on those machines use that methodology; for more information see #63.