[cpp-linbuild] 02/02: SSPCPP-981 Implement support for RHEL 7, 8, and 9
John W. O'Brien
john at saltant.com
Wed Oct 11 11:23:06 UTC 2023
This is an automated email from the git hooks/post-receive script.
obrienjw pushed a commit to branch main
in repository cpp-linbuild.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-linbuild.git;a=commit;h=8810b7ec97242cb7468cef744ae7afa6ad3439f5
commit 8810b7ec97242cb7468cef744ae7afa6ad3439f5
Author: John W. O'Brien <john at saltant.com>
AuthorDate: Mon Oct 9 19:20:29 2023 -0400
SSPCPP-981 Implement support for RHEL 7, 8, and 9
---
Makefile | 25 ++++++++++++++++++++++++-
os/rhel7/image/Dockerfile | 27 +++++++++++++++++++++++++++
os/rhel7/image/local.repo | 5 +++++
os/rhel8/image/Dockerfile | 28 ++++++++++++++++++++++++++++
os/rhel8/image/local.repo | 5 +++++
os/rhel9/image/Dockerfile | 28 ++++++++++++++++++++++++++++
os/rhel9/image/local.repo | 5 +++++
7 files changed, 122 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 35da6fd..e9cdada 100644
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,15 @@
# Run an interactive build environment container
# for component <comp> on platform <plat>
#
+# Platform-specific notes:
+#
+# The following platforms are only enabled for all of the above
+# targets when the variable HOST_IS_RHEL_QUALIFIED is defined
+# (the value is not inspected).
+#
+# rhel7
+# rhel8
+# rhel9
# Constants and utility variables
@@ -100,7 +109,7 @@ CURLOPENSSL_DISTNAME=curl
CURLOPENSSL_VERSION=8.3.0
CURLOPENSSL_DISTFILE=$(CURLOPENSSL_DISTNAME)-$(CURLOPENSSL_VERSION).$(DEFAULT_DIST_EXT)
CURLOPENSSL_URL=https://curl.haxx.se/download/$(CURLOPENSSL_DISTFILE)
-CURLOPENSSL_VALID_PLATFORMS=amazonlinux2 centos7
+CURLOPENSSL_VALID_PLATFORMS=amazonlinux2 centos7 rhel7
# Look closely: these variables refer to the OPENSAML variables
XMLTOOLING_COMPNAME=xmltooling
@@ -169,6 +178,20 @@ PLATFORMS=\
rockylinux8 \
rockylinux9
+# Red Hat Enterprise Linux (RHEL) builds, which run inside
+# Universal Base Image (UBI) containers, can only be performed
+# on a RHEL host (8 or higher, suggested) that is registered
+# with an active Red Hat account and attached to a valid
+# subscription that makes the necessary RPM package
+# repositories available inside each container. Ensure that:
+# /etc/rhsm/rhsm.conf:manage_repos = 1
+ifdef HOST_IS_RHEL_QUALIFIED
+PLATFORMS:=$(PLATFORMS) \
+ rhel7 \
+ rhel8 \
+ rhel9
+endif
+
# To add a new platform, create the following
# os/$OS/
# image/
diff --git a/os/rhel7/image/Dockerfile b/os/rhel7/image/Dockerfile
new file mode 100644
index 0000000..10050ab
--- /dev/null
+++ b/os/rhel7/image/Dockerfile
@@ -0,0 +1,27 @@
+FROM registry.access.redhat.com/ubi7/ubi:7.9-1165
+
+COPY *.repo /etc/yum.repos.d/
+
+RUN yum-config-manager \
+ --enable rhel-7-server-optional-rpms \
+ && yum -y update \
+ && yum -y install \
+ autoconf automake boost-devel chrpath doxygen gcc-c++ git groff \
+ httpd-devel libidn-devel libmemcached-devel libtool make \
+ openldap-devel openssl-devel pkgconfig \
+ rpm-build stunnel systemd-devel unixODBC-devel zlib-devel \
+ createrepo \
+ && yum clean all
+
+# internal and external are w.r.t. a container, where external locations
+# are expected to be mounted and pre-populated with required inputs
+ENV BUILD_BASE=/opt/build
+ENV INT_BASE=${BUILD_BASE}/internal
+ENV EXT_BASE=${BUILD_BASE}/external
+
+RUN mkdir -p \
+ ${INT_BASE}/{BUILD,BUILDROOT} \
+ ${EXT_BASE}/{in,out} \
+ && ln -s ${EXT_BASE}/in/macros/macros.shibboleth /etc/rpm/
+
+WORKDIR ${EXT_BASE}/in/SPECS
diff --git a/os/rhel7/image/local.repo b/os/rhel7/image/local.repo
new file mode 100644
index 0000000..abe1732
--- /dev/null
+++ b/os/rhel7/image/local.repo
@@ -0,0 +1,5 @@
+[local]
+name=Local Shibboleth-SP Build Repo
+baseurl=file:///opt/build/external/out/RPMS/$basearch/
+gpgcheck=0
+enabled=0
diff --git a/os/rhel8/image/Dockerfile b/os/rhel8/image/Dockerfile
new file mode 100644
index 0000000..287c901
--- /dev/null
+++ b/os/rhel8/image/Dockerfile
@@ -0,0 +1,28 @@
+FROM registry.access.redhat.com/ubi8/ubi:8.8-1067.1696517599
+
+COPY *.repo /etc/yum.repos.d/
+
+RUN dnf \
+ config-manager \
+ --enable codeready-builder-for-rhel-8-x86_64-rpms \
+ && dnf -y update \
+ && dnf -y install \
+ autoconf automake boost-devel chrpath curl-devel doxygen \
+ gcc-c++ gdb git groff httpd-devel \
+ libmemcached-devel libtool make openldap-devel openssl-devel \
+ pkgconfig rpm-build stunnel systemd-devel unixODBC-devel \
+ zlib-devel createrepo_c yum-utils \
+ && dnf clean all
+
+# internal and external are w.r.t. a container, where external locations
+# are expected to be mounted and pre-populated with required inputs
+ENV BUILD_BASE=/opt/build
+ENV INT_BASE=${BUILD_BASE}/internal
+ENV EXT_BASE=${BUILD_BASE}/external
+
+RUN mkdir -p \
+ ${INT_BASE}/{BUILD,BUILDROOT} \
+ ${EXT_BASE}/{in,out} \
+ && ln -s ${EXT_BASE}/in/macros/macros.shibboleth /etc/rpm/
+
+WORKDIR ${EXT_BASE}/in/SPECS
diff --git a/os/rhel8/image/local.repo b/os/rhel8/image/local.repo
new file mode 100644
index 0000000..abe1732
--- /dev/null
+++ b/os/rhel8/image/local.repo
@@ -0,0 +1,5 @@
+[local]
+name=Local Shibboleth-SP Build Repo
+baseurl=file:///opt/build/external/out/RPMS/$basearch/
+gpgcheck=0
+enabled=0
diff --git a/os/rhel9/image/Dockerfile b/os/rhel9/image/Dockerfile
new file mode 100644
index 0000000..19ae8b7
--- /dev/null
+++ b/os/rhel9/image/Dockerfile
@@ -0,0 +1,28 @@
+FROM registry.access.redhat.com/ubi9/ubi:9.2-755.1696514207
+
+COPY *.repo /etc/yum.repos.d/
+
+RUN dnf \
+ config-manager \
+ --enable codeready-builder-for-rhel-9-x86_64-rpms \
+ && dnf -y update \
+ && dnf -y install \
+ autoconf automake boost-devel chrpath curl-devel doxygen \
+ gcc-c++ gdb git groff httpd-devel \
+ libmemcached-devel libtool make openldap-devel openssl-devel \
+ pkgconfig rpm-build stunnel systemd-devel unixODBC-devel \
+ zlib-devel createrepo_c yum-utils \
+ && dnf clean all
+
+# internal and external are w.r.t. a container, where external locations
+# are expected to be mounted and pre-populated with required inputs
+ENV BUILD_BASE=/opt/build
+ENV INT_BASE=${BUILD_BASE}/internal
+ENV EXT_BASE=${BUILD_BASE}/external
+
+RUN mkdir -p \
+ ${INT_BASE}/{BUILD,BUILDROOT} \
+ ${EXT_BASE}/{in,out} \
+ && ln -s ${EXT_BASE}/in/macros/macros.shibboleth /etc/rpm/
+
+WORKDIR ${EXT_BASE}/in/SPECS
diff --git a/os/rhel9/image/local.repo b/os/rhel9/image/local.repo
new file mode 100644
index 0000000..abe1732
--- /dev/null
+++ b/os/rhel9/image/local.repo
@@ -0,0 +1,5 @@
+[local]
+name=Local Shibboleth-SP Build Repo
+baseurl=file:///opt/build/external/out/RPMS/$basearch/
+gpgcheck=0
+enabled=0
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list