loci/scripts/install_packages.sh
Mohammed Naser 9e7b71c304 Reduce build targets
OpenSUSE LEAP is currently not in use by any known downstream
users and it has been broken for quite sometime, leaving the gate
in a broken state and unable to land any code.  There's no active
maintainer for it as well.

Debian support was added by us (VEXXHOST) but we decided that
we're not going to continue using it and move towards Ubuntu, so
we do not want to maintain it, as well as that it is building images
for Train only.

It also updates the README file accordingly as well as includes
focal in there which has been recently added.

Change-Id: Ideb497c169828184d301b6be4359a7c2228aa444
2022-05-23 15:59:49 +00:00

40 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
set -ex
if [[ "${PYTHON3}" != "no" ]]; then
python3=python3
fi
for file in /opt/loci/bindep*; do
PACKAGES+=($(bindep -f $file -b -l newline ${PROJECT} ${PROFILES} ${python3} || :))
done
if [[ ! -z ${PACKAGES} ]]; then
case ${distro} in
ubuntu)
export DEBIAN_FRONTEND=noninteractive
apt-get install -y --no-install-recommends ${PACKAGES[@]} ${DIST_PACKAGES}
# NOTE(mnaser): mod_oauth2 is not available inside packaging repos, so we manually
# install it here.
if [ ${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
;;
centos)
yum -y --setopt=skip_missing_names_on_install=False install ${PACKAGES[@]} ${DIST_PACKAGES}
;;
*)
echo "Unknown distro: ${distro}"
exit 1
;;
esac
fi