Skip to content

Commit

Permalink
Fixes #18891: Upgrade failed from 5.0.20 to 6.1.9 on SLES
Browse files Browse the repository at this point in the history
  • Loading branch information
amousset committed Mar 12, 2021
1 parent 9f2f755 commit 0e9a94e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions rudder-webapp/SOURCES/rudder-webapp-postinst
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ chmod 640 "${LDAP_CONF}"
chown -R rudder-slapd:rudder-slapd /var/rudder/ldap/
echo " Done"


echo -n "INFO: Removing ncf-api-venv user and group ..."
# stopping apache before running upgrade scripts
systemctl stop ${APACHE} >> ${LOG_FILE}

echo -n "INFO: Removing ncf-api-venv user and group ..."
rm -rf /var/lib/ncf-api-venv

if getent passwd ncf-api-venv >/dev/null; then
Expand All @@ -43,7 +43,6 @@ fi

echo " Done"


echo -n "INFO: Setting up systemd ..."
systemctl daemon-reload

Expand Down
8 changes: 5 additions & 3 deletions rudder-webapp/SPECS/rudder-webapp.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

%define maven_settings settings-external.xml

%define apache_conf_dir %{apache}/conf.d

# Reference for suse_version : https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
%if 0%{?suse_version}
%define apache apache2
Expand Down Expand Up @@ -175,9 +177,9 @@ rm -rf %{buildroot}
cd %{_sourcedir}
# python should not be needed at install time, but build is run twice, i don't know why
%if 0%{?rhel} == 7 || ( 0%{?suse_version} && 0%{?suse_version} < 1500 )
make --debug install APACHE_VHOSTDIR=%{apache_vhost_dir} DESTDIR=%{buildroot} JETTY_SCRIPT=%{jetty_init_script} APACHE_CONFDIR=%{apache_vhost_dir} PYTHON=python2
make --debug install APACHE_VHOSTDIR=%{apache_vhost_dir} DESTDIR=%{buildroot} JETTY_SCRIPT=%{jetty_init_script} APACHE_CONFDIR=%{apache_conf_dir} PYTHON=python2
%else
make --debug install APACHE_VHOSTDIR=%{apache_vhost_dir} DESTDIR=%{buildroot} JETTY_SCRIPT=%{jetty_init_script} APACHE_CONFDIR=%{apache_vhost_dir}
make --debug install APACHE_VHOSTDIR=%{apache_vhost_dir} DESTDIR=%{buildroot} JETTY_SCRIPT=%{jetty_init_script} APACHE_CONFDIR=%{apache_conf_dir}
%endif

%if 0%{?rhel}
Expand Down Expand Up @@ -287,7 +289,7 @@ then
fi

# Remove old ncf-api-virtualenv conf, or else it will prevent apache start
rm -f /etc/%{apache_vhost_dir}/ncf-api-virtualenv.conf
rm -f /etc/%{apache_conf_dir}/ncf-api-virtualenv.conf


if ! /opt/rudder/share/package-scripts/rudder-webapp-postinst "${RUDDER_FIRST_INSTALL}" "%{apache}"; then
Expand Down

0 comments on commit 0e9a94e

Please sign in to comment.