Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add copy/paste amazon instructions

Table of Contents

Building the Native SP from SRPM Source Packages

...

If you need to disable the RPM's dependency on the native OS Apache development package, you can use the option for that listed above in the table.

Examples

Amazon Linux with Apache 2.4

Amazon Linux with Apache 2.4 requires some additional arguments to be provided. This is because it uses the package http24_devel rather than http_devel and apxs is in a different location than expected.

Code Block
languagebash
titleAmazon Linux Build From SRPM
linenumberstrue
# Source RPMS to rebuild, and the order to rebuild them in.
RPMS_ORDER='log4shib-1.0.9-3.3.src.rpm xerces-c-3.1.4-1.2.src.rpm xml-security-c-1.7.3-3.3.src.rpm curl-openssl-7.57.0-1.1.src.rpm  xmltooling-1.6.3-3.1.src.rpm opensaml-2.6.1-3.1.src.rpm shibboleth-2.6.1-3.1.src.rpm'
for rpm in $RPMS_ORDER; do echo $rpm;
    wget "http://download.opensuse.org/repositories/security://shibboleth/CentOS_CentOS-6/src/$rpm"
done


# Build tools, as suggested earlier in the wiki
yum install \
  automake \
  boost-devel \
  chrpath \
  doxygen \
  gcc-c++ \
  groff \
  httpd24-devel \
  libidn-devel \
  openldap-devel \
  openssl-devel \
  redhat-rpm-config \
  rpm-build \
  stunnel \
  unixODBC-devel


for rpm in $RPMS_ORDER; do echo $rpm;
  # The shib source rpm has special instructions, so do that seperately
  if [[ $rpm != shibboleth* ]]; then
    sudo rpmbuild --rebuild $rpm
	# Install what we just built since it may be a dependency of the next build
    sudo yum localinstall -y /usr/src/rpm/RPMS/x86_64/*.rpm
  fi
done


# Shibboleth needs to be build differently since it names its apache24 packages differently.
# We need to tell the build to ignore looking for OS packages.
sudo rpmbuild --rebuild --without builtinapache -D 'shib_options -with-apxs24=/usr/bin/apxs -with-apr1=/usr/bin/apr-1-config -enable-apache-24' shibboleth*


sudo yum localinstall /usr/src/rpm/RPMS/x86_64/shibboleth-2.6.1-3.1.x86_64.rpm


# Confirm it has the apache mod you need
rpm -qpl /usr/src/rpm/RPMS/x86_64/shibboleth-2.6.1-3.1.x86_64.rpm | grep mod_shib
# Expected output: /usr/lib64/shibboleth/mod_shib_24.so