Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Janos Mattyasovszky authored and peckpeck committed Sep 22, 2016
1 parent 1f76f82 commit 7d6dfb4
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
8 changes: 4 additions & 4 deletions ncf-api-virtualenv/SPECS/ncf-api-virtualenv.spec
Expand Up @@ -46,7 +46,7 @@
%endif

## SLES
%if 0%{?sles_version}
%if 0%{?suse_version}
%define apache_vhost_dir /etc/apache2/conf.d
%endif

Expand Down Expand Up @@ -93,7 +93,7 @@ Requires: policycoreutils-python
%endif

## SLES
%if 0%{?sles_version}
%if 0%{?suse_version}
Requires: apache2 apache2-mod_wsgi pwdutils
%endif

Expand Down Expand Up @@ -136,7 +136,7 @@ cp -f %{SOURCE3} %{_builddir}
cd %{_sourcedir}

# Build Virtualenv
%if 0%{?sles_version}
%if 0%{?suse_version}
# SLES specific exception, see http://www.rudder-project.org/redmine/issues/6365
python virtualenv-1.10.1/virtualenv.py %{real_name}

Expand Down Expand Up @@ -231,7 +231,7 @@ fi
# automatically, nothing to do here :)
%endif

%if 0%{?sles_version}
%if 0%{?suse_version}
# Enable mod_wsgi using a2enmod
a2enmod wsgi >/dev/null 2>&1

Expand Down
Expand Up @@ -36,7 +36,7 @@

%define maven_settings settings-external.xml

%if 0%{?sles_version}
%if 0%{?suse_version}
%define syslogservicename syslog
%endif

Expand Down Expand Up @@ -101,7 +101,7 @@ Requires: jetty-server

## 3 - SLES
## No Jetty provided by SLES... Use our own.
%if 0%{?sles_version}
%if 0%{?suse_version}
BuildRequires: jdk >= 1.7
Requires: rudder-jetty
%endif
Expand Down
8 changes: 7 additions & 1 deletion rudder-inventory-ldap/SPECS/rudder-inventory-ldap.spec
Expand Up @@ -34,7 +34,7 @@
%define ruddervardir /var/rudder
%define rudderlogdir /var/log/rudder

%if 0%{?sles_version}
%if 0%{?suse_version}
%define syslogservicename syslog
%endif

Expand Down Expand Up @@ -89,6 +89,12 @@ BuildRequires: openssl-devel
BuildRequires: libopenssl-devel
%endif

## See at: https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
## SLE 12 => %if 0%{?suse_version} == 1315 (but could also be Leap 42.1*)
%if 0%{?suse_version} && 0%{?suse_version} == 1315
BuildRequires: libopenssl-devel
%endif

%if 0%{?rhel} && 0%{?rhel} < 7
BuildRequires: openssl-devel libtool-ltdl-devel
%endif
Expand Down
2 changes: 1 addition & 1 deletion rudder-jetty/SPECS/rudder-jetty.spec
Expand Up @@ -38,7 +38,7 @@

%define _binaries_in_noarch_packages_terminate_build 0

%if 0%{?sles_version}
%if 0%{?suse_version}
%define jetty_init_script jetty-sles.sh
%else
%define jetty_init_script jetty-rpm.sh
Expand Down
2 changes: 1 addition & 1 deletion rudder-server-relay/SPECS/rudder-server-relay.spec
Expand Up @@ -144,7 +144,7 @@ service %{apache} stop > /dev/null && echo " Done"
/bin/systemctl stop %{apache}.service && echo " Done"
%endif

%if 0%{?sles_version}
%if 0%{?suse_version}
# On SuSE, enable the required modules
MODULES_TO_ENABLE="dav dav_fs version"

Expand Down
10 changes: 5 additions & 5 deletions rudder-webapp/SPECS/rudder-webapp.spec
Expand Up @@ -38,7 +38,7 @@

%define maven_settings settings-external.xml

%if 0%{?sles_version}
%if 0%{?suse_version}
%define apache apache2
%define apache_tools apache2-utils
%define apache_group www
Expand Down Expand Up @@ -141,7 +141,7 @@ Requires: jetty-server

## 3 - SLES
## No Jetty provided by SLES... Use our own.
%if 0%{?sles_version}
%if 0%{?suse_version}
BuildRequires: jdk >= 1.7
Requires: rudder-jetty
%endif
Expand Down Expand Up @@ -250,7 +250,7 @@ install -m 644 %{SOURCE2} %{buildroot}%{rudderdir}/share/webapps/
cp %{SOURCE3} %{buildroot}%{rudderdir}/etc/
cp %{SOURCE4} %{buildroot}%{rudderdir}/etc/

%if 0%{?sles_version}
%if 0%{?suse_version}
# On SLES, change the Apache DocumentRoot to the OS default
sed -i "s%^DocumentRoot /var/www$%DocumentRoot /srv/www%" %{buildroot}%{rudderdir}/etc/rudder-apache-common.conf
%endif
Expand Down Expand Up @@ -364,7 +364,7 @@ if ! getent group %{config_repository_group} | grep -q ncf-api-venv > /dev/null;
fi

# Add required includes in the SLES apache2 configuration
%if 0%{?sles_version}
%if 0%{?suse_version}
if ! grep -qE "^. /etc/sysconfig/rudder-apache$" /etc/sysconfig/apache2
then
echo -e '# This sources the modules/defines needed by Rudder\n. /etc/sysconfig/rudder-apache' >> /etc/sysconfig/apache2
Expand Down Expand Up @@ -544,7 +544,7 @@ if [ $1 -eq 0 ]; then
echo " Done"
fi

%if 0%{?sles_version}
%if 0%{?suse_version}
# Remove required includes in the SLES apache2 configuration
if [ -f /etc/sysconfig/apache2 ]; then
sed -i "/# This sources the modules\/defines needed by Rudder/d" /etc/sysconfig/apache2
Expand Down

0 comments on commit 7d6dfb4

Please sign in to comment.