downgrade


Downgrade GNU patch on CentOS 7.0 (64bit) to version 2.6.1

Recently we had to download GNU patch from version 2.7.1 to any version less than version 2.7 series.
We used patch version 2.6.1 which is the latest in the version 2.6 series.

We were trying to compile Linux Kernel 3.0.35 source code with some custom patches.
While applying the patches we got the following errors:

File firmware/imx/sdma/sdma-imx25-to1.bin: git binary diffs are not supported.
File firmware/imx/sdma/sdma-imx31-to1.bin: git binary diffs are not supported.
File firmware/imx/sdma/sdma-imx31-to2.bin: git binary diffs are not supported.
File firmware/imx/sdma/sdma-imx35-to1.bin: git binary diffs are not supported.
File firmware/imx/sdma/sdma-imx35-to2.bin: git binary diffs are not supported.
File firmware/imx/sdma/sdma-imx50-to1.bin: git binary diffs are not supported.
File firmware/imx/sdma/sdma-imx51-to3.bin: git binary diffs are not supported.
File firmware/imx/sdma/sdma-imx53-to1.bin: git binary diffs are not supported.

Apparently, version 2.7 does not support binary diffs.
We can verify this claim from the release announcement.

Support for most features of the “diff –git” format, including renames and copies, permission changes, and symlink diffs. Binary diffs are not supported yet; patch will complain and skip them.

Methodology


#Making sure we are not missing any 32bit libraries since we are on a 64bit machine
yum install glibc.i686 ncurses-libs.i686;
#Download the source code
wget ftp://ftp.gnu.org/gnu/patch/patch-2.6.1.tar.gz;
#Extract the files
tar -zxf patch-2.6.1.tar.gz;
#Navigate to the folder
cd patch-2.6.1;
#Configure the installation and make all necessary checks
./configure;
#Build
make;
#Remove existing version
sudo yum remove patch -y;
#Install
sudo make install;


Downgrade texinfo on CentOS 7.0 (64bit) to version 4.13

Recently we had to download texinfo from version 5.1 to any version less than version 5 series.
We used texinfo version 4.13 which is the latest in the version 4 series.

We were trying to compile some tools using an older version of gcc. Instead of using 4.8.5, we used 4.8.2 to achieve our goal and that caused a problem with some .texi files.

Methodology


#Making sure we are not missing any 32bit libraries since we are on a 64bit machine
yum install glibc.i686 ncurses-libs.i686;
#Download the source code
wget http://ftp.gnu.org/gnu/texinfo/texinfo-4.13.tar.gz;
#Extract the files
tar -zxf texinfo-4.13.tar.gz;
#Navigate to the folder
cd texinfo-4.13;
#Configure the installation and make all necessary checks
./configure;
#Build
make;
#Install
sudo make install;


Downgrade gcc on CentOS 7.0 (64bit) to version 4.8.2

Recently we had to download gcc from version 4.8.5 to 4.8.2.

We were trying to compile some tools and they required using that older version of gcc.
To compile the old version of the gcc we used the version version that was shipped with the distribution.

Methodology

#Making sure we are not missing any 32bit libraries since we are on a 64bit machine
yum install glibc.i686 ncurses-libs.i686;
#Download the source code
wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.gz;
#Extract the files
tar -xvf gcc-4.8.2.tar.gz;
#Navigate to the folder
cd gcc-4.8.2/;
#Make sure we have all dependencies met
./contrib/download_prerequisites;
#Configure the installation and assign the installation folder to be /usr/local/gcc/4.8.2. Finally make all necessary checks before compilation.
./configure --prefix=/usr/local/gcc/4.8.2;
#Build
make;
#Install
sudo make install;