From: Michael Meffie Date: Thu, 19 Mar 2020 20:17:32 +0000 (-0400) Subject: Update rpmbuild instructions to show how to build from tarball X-Git-Url: http://git.openafs.org/?p=openafs-wiki.git;a=commitdiff_plain;h=fba766dfa9e6019df4905026d4bd6d881f764db5 Update rpmbuild instructions to show how to build from tarball We do not always release a source RPM, so show how to build packages from the source tarball in the RHEL and CentOS guides. --- diff --git a/admin/InstallingOpenAFSonCentOS7.mdwn b/admin/InstallingOpenAFSonCentOS7.mdwn index 9403f36..76a7f6d 100644 --- a/admin/InstallingOpenAFSonCentOS7.mdwn +++ b/admin/InstallingOpenAFSonCentOS7.mdwn @@ -120,17 +120,30 @@ Start the Kerberos servers. ### Installing servers -OpenAFS source RPM packages are available on the OpenAFS website. You will need to build the -RPMs using the `rpmbuild` command. There are third party sources for pre-built packages, in particular -the CentOS Storage SIG, but note that at least with the Storage SIG's packages, configuration files are -located in `/etc/openafs` and servers `/usr/libexec/openafs` instead of the traditional paths. +The OpenAFS source tarballs are available on the OpenAFS website. You will +need to build the source RPM with a script provided in the source tarball, and +then build the RPMs using the `rpmbuild` command. There are third party +sources for pre-built packages, in particular the CentOS Storage SIG, but note +that at least with the Storage SIG's packages, configuration files are located +in `/etc/openafs` and servers `/usr/libexec/openafs` instead of the traditional +paths. - # curl -O http://openafs.org/dl/openafs//openafs--1.src.rpm - # yum install ncurses-devel flex bison automake autoconf libtool perl-devel perl-ExtUtils-Embed krb5-del - # rpmbuild --rebuild -bb \ - openafs--1.src.rpm + $ sudo yum install rpm-build yum-utils make perl libtool bzip2 wget -where `` is the OpenAFS version you wish to install, e.g. "1.8.3". + $ wget https://www.openafs.org/dl/openafs//openafs--src.tar.bz2 + $ wget https://www.openafs.org/dl/openafs//openafs--doc.tar.bz2 + $ wget https://www.openafs.org/dl/openafs//RELNOTES- + $ wget https://www.openafs.org/dl/openafs//ChangeLog + + $ tar xf openafs--src.tar.bz2 --strip-components=4 '*/makesrpm.pl' + $ perl makesrpm.pl openafs--src.tar.bz2 openafs--doc.tar.bz2 RELNOTES- ChangeLog + + $ rpm -iv openafs--1.src.rpm + $ sudo yum-builddep ~/rpmbuild/SPECS/openafs.spec + + $ rpmbuild -bb --define "build_modules 0" ~/rpmbuild/SPECS/openafs.spec + +where `` is the OpenAFS version you wish to install, e.g. "1.8.5". Use `yum` to install the OpenAFS server packages from your your rpmbuild RPMS directory: diff --git a/admin/InstallingOpenAFSonRHEL.mdwn b/admin/InstallingOpenAFSonRHEL.mdwn index adeb0e2..4b6cfb7 100644 --- a/admin/InstallingOpenAFSonRHEL.mdwn +++ b/admin/InstallingOpenAFSonRHEL.mdwn @@ -319,15 +319,34 @@ that matches your kernel version. # yum install -y dkms gcc # yum install -y openafs openafs-client openafs-krb5 dkms-openafs -Alternately, you can build the kernel module from the source rpm. You will +Alternately, you can build the kernel module from the source tarball. You will need to download the OpenAFS SRPM file from OpenAFS.org, install the `kernel-devel` package that matches your kernel version, and the necessary build tools. Use the `rpmbuild` command to build the kernel module. - # rpmbuild --rebuild -bb \ + # Install prereqs + $ sudo yum install rpm-build yum-utils make perl libtool bzip2 wget + $ sudo yum install "kernel-devel-uname-r == $(uname -r)" + + # Download source release. + $ wget https://www.openafs.org/dl/openafs//openafs--src.tar.bz2 + $ wget https://www.openafs.org/dl/openafs//openafs--doc.tar.bz2 + $ wget https://www.openafs.org/dl/openafs//RELNOTES- + $ wget https://www.openafs.org/dl/openafs//ChangeLog + + # Build the source RPM. + $ tar xf openafs--src.tar.bz2 --strip-components=4 '*/makesrpm.pl' + $ perl makesrpm.pl openafs--src.tar.bz2 openafs--doc.tar.bz2 RELNOTES- ChangeLog + + # Install spec and build dependencies. + $ rpm -iv openafs--1.src.rpm + $ sudo yum-builddep ~/rpmbuild/SPECS/openafs.spec + + # Build kmod + $ rpmbuild -bb \ --define 'build_userspace 0' \ --define 'build_modules 1' \ - openafs--1.src.rpm + ~/rpmbuild/SPECS/openafs.spec ### Client side configuration