Centos – How to upgrade xorg-x11-server

centos-6xdmxxorg

I want to use Xdmx, but it has got bug. I found this bug on Bugzilla and there is information that bug is fixed in xorg-x11-server-1.14.3-2.fc19 package. I use Centos 6.5 and I cannot upgrade to 7 (I have to use 6.5).

My X version:

$ Xorg -version

X.Org X Server 1.13.0
Release Date: 2012-09-05
X Protocol Version 11, Revision 0
Build Operating System: c6b9 2.6.32-220.el6.x86_64 
Current Operating System: Linux ppl-poz-nb0052 2.6.32-431.23.3.el6.x86_64 #1 SMP Thu Jul 31 17:20:51 UTC 2014 x86_64
Kernel command line: ro root=UUID=3f9656fc-2cef-4467-88e2-7a388765ad9a rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=129M@0M  KEYBOARDTYPE=pc KEYTABLE=pl2 rd_NO_LVM rd_NO_DM selinux=0
Build Date: 20 December 2013  12:09:45PM
Build ID: xorg-x11-server 1.13.0-23.1.el6.centos 
Current version of pixman: 0.26.2
    Before reporting problems, check http://wiki.centos.org/Documentation
    to make sure that you have the latest version.

I would like to upgrade my X server. I am new to Centos and I am not sure how to do that. I found some rpm packages with version 1.15 dedicated for Centos 7 and I get error during installation. I also searched Fedora packages on this website and I can not download any rpm package.

How to install xorg-x11-server-1.14.3-2.fc19 or newer version on my Centos 6.5?

Best Answer

See https://serverfault.com/questions/71299/installing-fedora-rpms-in-centos. Generally, your best bet will be to install from the source package.

Some information on building source RPMs: http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch11s03.html

To apply the suggested fix to CentOS 6.5, you can follow these steps:

  1. Prep for rpmbuild
  2. Download source RPMs
    • CentOS Vault has Outdated SRPMs, but you can get the current shipping one from RedHat.
  3. Unpack the SRPM

    rpm -U xorg-x11-server-1.13.0-23.1.el6_5.src.rpm
    
  4. Create a working dir within rpmbuild. This can really be anywhere.

    cd rpmbuild
    mkdir dmxfix
    cd dmxfix
    
  5. Grab the spec file and the original source tarball.

    cp ../SPECS/xorg-x11-server-1.13.0.spec .
    cp ../SOURCES/xorg-x11-server-1.13.0.tar.bz2 .
    
  6. Untar the source; we need two copies. One is the original, the other is our working path. We'll use these for diffs later.

    tar -xzvf xorg-x11-server-1.13.0.tar.bz2
    mv xorg-x11-server-1.13.0 xorg-x11-server-1.13.0-pristine
    tar -xzvf xorg-x11-server-1.13.0.tar.bz2
    
  7. Apply changes. You can apply patches you found somewhere else, or make your own changes directly to the code.

  8. Create the patch file.

    diff -ur xorg-x11-server-1.13.0-pristine xorg-x11-server-1.13.0 > dmx-pointer.patch
    # Insert "From:" line.  rpmbuild uses git, and the patches require an email
    # address to track the committer.  Put your name/email here.
    sed -i '1i From:  Your Name <spam@email.com>' dmx-pointer.patch
    cp dmx-pointer.patch ../SOURCES
    
  9. Modify spec file that you copied into your work directory earlier. You'll need to make a few changes.

    1. Change the Release: line... the best bet is to increment the minor number, like change from 23.1%{?dist} to 23.2%{?dist}.
    2. Add a PatchNN: line. e.g. Patch56: xdmx-pointer.patch
    3. Add a line to changelog, starting at the top of the %changelog section:

      * Tue Sep 02 2014 John Doeseph <fake@email.com> 1.13.0-23.2
      - Fix pointer jumps on click (freedesktop.org #63486)`
      
  10. Build from our newly modified spec file

    rpmbuild -ba xorg-x11-server-1.13.0.spec
    
  11. Install from new RPMs in ../RPMS

    yum install ../RPMS/x86_64/xorg-x11-server-Xdmx-1.13.0-23.2.el6.x86_64.rpm
    

The above steps were mostly derived from http://www.owlriver.com/tips/patching_srpms/

Note that the rpmbuild will create 8 different xorg-x11-server packages: common, debuginfo, devel, Xdmx, Xephyr, Xnest, Xorg, and Xvfb. I install/upgrade ALL xorg-x11-server-* files on all machines running DMX to maintain consistency. Unfortunately, the two changes suggested on freedesktop.org did not seem to fully fix my DMX mouse pointer issues. (I'm interested in hearing other's results.)

Related Question