Skip to content

Commit dc9ef55

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Make stack.sh work on SUSE"
2 parents a718b5e + 35649ae commit dc9ef55

3 files changed

Lines changed: 28 additions & 3 deletions

File tree

files/rpms-suse/general

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
apache2
2+
apache2-devel
13
bc
24
bridge-utils
35
ca-certificates-mozilla
@@ -23,9 +25,11 @@ python-cmd2 # dist:opensuse-12.3
2325
python-devel # pyOpenSSL
2426
python-xml
2527
screen
28+
systemd-devel # for systemd-python
2629
tar
2730
tcpdump
2831
unzip
2932
util-linux
3033
wget
34+
which
3135
zlib-devel

lib/apache

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,15 @@ APACHE_LOG_DIR="/var/log/${APACHE_NAME}"
5353
function enable_apache_mod {
5454
local mod=$1
5555
# Apache installation, because we mark it NOPRIME
56-
if is_ubuntu || is_suse ; then
57-
if ! a2query -m $mod ; then
56+
if is_ubuntu; then
57+
# Skip mod_version as it is not a valid mod to enable
58+
# on debuntu, instead it is built in.
59+
if [[ "$mod" != "version" ]] && ! a2query -m $mod ; then
60+
sudo a2enmod $mod
61+
restart_apache_server
62+
fi
63+
elif is_suse; then
64+
if ! a2enmod -q $mod ; then
5865
sudo a2enmod $mod
5966
restart_apache_server
6067
fi
@@ -96,7 +103,7 @@ function install_apache_uwsgi {
96103
# delete the temp directory
97104
sudo rm -rf $dir
98105

99-
if is_ubuntu; then
106+
if is_ubuntu || is_suse ; then
100107
# we've got to enable proxy and proxy_uwsgi for this to work
101108
sudo a2enmod proxy
102109
sudo a2enmod proxy_uwsgi
@@ -171,6 +178,8 @@ function apache_site_config_for {
171178
# enable_apache_site() - Enable a particular apache site
172179
function enable_apache_site {
173180
local site=$@
181+
# Many of our sites use mod version. Just enable it.
182+
enable_apache_mod version
174183
if is_ubuntu; then
175184
sudo a2ensite ${site}
176185
elif is_fedora || is_suse; then

lib/tls

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ function init_CA {
212212
if is_fedora; then
213213
sudo cp $INT_CA_DIR/ca-chain.pem /usr/share/pki/ca-trust-source/anchors/devstack-chain.pem
214214
sudo update-ca-trust
215+
elif is_suse; then
216+
sudo cp $INT_CA_DIR/ca-chain.pem /usr/share/pki/trust/anchors/devstack-chain.pem
217+
sudo update-ca-certificates
215218
elif is_ubuntu; then
216219
sudo cp $INT_CA_DIR/ca-chain.pem /usr/local/share/ca-certificates/devstack-int.crt
217220
sudo cp $ROOT_CA_DIR/cacert.pem /usr/local/share/ca-certificates/devstack-root.crt
@@ -355,6 +358,9 @@ function fix_system_ca_bundle_path {
355358
elif is_ubuntu; then
356359
sudo rm -f $capath
357360
sudo ln -s /etc/ssl/certs/ca-certificates.crt $capath
361+
elif is_suse; then
362+
sudo rm -f $capath
363+
sudo ln -s /etc/ssl/ca-bundle.pem $capath
358364
else
359365
echo "Don't know how to set the CA bundle, expect the install to fail."
360366
fi
@@ -417,6 +423,9 @@ function enable_mod_ssl {
417423

418424
if is_ubuntu; then
419425
sudo a2enmod ssl
426+
elif is_suse; then
427+
sudo a2enmod ssl
428+
sudo a2enflag SSL
420429
elif is_fedora; then
421430
# Fedora enables mod_ssl by default
422431
:
@@ -523,6 +532,9 @@ $listen_string
523532
LogFormat "%v %h %l %u %t \"%r\" %>s %b"
524533
</VirtualHost>
525534
EOF
535+
if is_suse ; then
536+
sudo a2enflag SSL
537+
fi
526538
for mod in ssl proxy proxy_http; do
527539
enable_apache_mod $mod
528540
done

0 commit comments

Comments
 (0)