Files
loci/scripts/project_specific/keystone/01_add_oauth_modules.sh
Vladimir Kozhukalov 304d131aa6 Remove Centos related code
We have not been testing this code for quite a some time and
there has been little interest in maintaining it.

The change removes all Centos related code to reduce
the maintenance burden.

See the related discussion [1].

[1] https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/thread/GWRYBFSYE3ZLW64WK2ECIOGN3QZYYLTD/

Change-Id: Id1c6bb5c9c486c62f28feb7ba429f7af84e88db0
2025-05-30 23:00:42 -05:00

25 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
set -ex
# NOTE: This doesn't belong here. This should be a user shim or a
# custom base image configuration change to the apt sources
# "libapache2-mod-oauth2" package is available in Ubuntu 22.10
# NOTE(mnaser): mod_oauth2 is not available inside packaging repos, so we manually
# install it here.
if [[ "${PROFILES[*]}" =~ "mod_oauth2" ]] && [[ ${PROJECT} == 'keystone' ]] && [[ $(uname -p) == "x86_64" ]]; then
source /etc/lsb-release
apt-get install -y --no-install-recommends wget apache2
wget --no-check-certificate \
https://github.com/zmartzone/mod_oauth2/releases/download/v3.2.2/libapache2-mod-oauth2_3.2.2-1.${DISTRIB_CODENAME}+1_amd64.deb \
https://github.com/zmartzone/liboauth2/releases/download/v1.4.3/liboauth2_1.4.3-1.${DISTRIB_CODENAME}+1_amd64.deb
apt-get -y --no-install-recommends install \
./libapache2-mod-oauth2_3.2.2-1.${DISTRIB_CODENAME}+1_amd64.deb \
./liboauth2_1.4.3-1.${DISTRIB_CODENAME}+1_amd64.deb
a2enmod oauth2
rm -rfv \
./libapache2-mod-oauth2_3.2.2-1.${DISTRIB_CODENAME}+1_amd64.deb \
./liboauth2_1.4.3-1.${DISTRIB_CODENAME}+1_amd64.deb
apt-get purge -y wget
fi