mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-06 13:18:42 +02:00
behave: Set PassengerRuby according to the interpreter required by obs-bundled-gems RPM package
This commit is contained in:
@@ -16,6 +16,7 @@ FIXTURES_DIR="$TOPDIR/fixtures"
|
||||
OSC="osc -A https://localhost"
|
||||
|
||||
# create additional users
|
||||
# NOTE: if the following command ends with 500, it might be due to an incorrect interpreter version in /etc/apache2/conf.d/mod_passenger.conf
|
||||
$OSC person register --login=alice --realname='' --email='alice@example.com' --password='opensuse'
|
||||
$OSC person register --login=bob --realname='' --email='bob@example.com' --password='opensuse'
|
||||
|
||||
|
@@ -20,8 +20,11 @@ sed -i 's!^OBS_WORKER_INSTANCES=.*!OBS_WORKER_INSTANCES="1"!' /etc/sysconfig/obs
|
||||
# enable xforward
|
||||
sed -i 's!^#use_xforward:.*!use_xforward: true!' /srv/www/obs/api/config/options.yml
|
||||
|
||||
# determine required ruby interpreter from an installed RPM
|
||||
RUBY_PATH=$(rpm -q obs-bundled-gems --requires | grep /usr/bin/ruby)
|
||||
|
||||
# configure passenger
|
||||
sed -i -E 's!^(\s*)PassengerRuby .*!\1PassengerRuby "/usr/bin/ruby.ruby3.1"!' /etc/apache2/conf.d/mod_passenger.conf
|
||||
sed -i -E "s!^(\s*)PassengerRuby .*!\1PassengerRuby \"$RUBY_PATH\"!" /etc/apache2/conf.d/mod_passenger.conf
|
||||
|
||||
# enable apache SSL server flag
|
||||
sed -i 's!^APACHE_SERVER_FLAGS=.*!APACHE_SERVER_FLAGS="SSL"!' /etc/sysconfig/apache2
|
||||
|
Reference in New Issue
Block a user