Skip to content

Commit

Permalink
black magic for apache
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto committed Sep 20, 2023
1 parent 6ed73ac commit ddf1be2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spacewalk/config/spacewalk-config.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#


%global susemanager_shared_path /usr/share/susemanager
%global wwwroot %{susemanager_shared_path}/www
%global wwwdocroot %{wwwroot}/htdocs

%if 0%{?suse_version}
%define apacheconfdir %{_sysconfdir}/apache2
%define apachepkg apache2
Expand Down Expand Up @@ -74,10 +78,11 @@ mv etc $RPM_BUILD_ROOT/
mv var $RPM_BUILD_ROOT/
mv usr $RPM_BUILD_ROOT/

#TODO invert this logic: the default should be for suse, the if should contains directive for other distros
%if 0%{?suse_version}
export NO_BRP_STALE_LINK_ERROR=yes
mv $RPM_BUILD_ROOT/etc/httpd $RPM_BUILD_ROOT%{apacheconfdir}
sed -i 's|var/www/html|srv/www/htdocs|g' $RPM_BUILD_ROOT%{apacheconfdir}/conf.d/zz-spacewalk-www.conf
sed -i 's|/var/www/html|%{wwwdocroot}|g' $RPM_BUILD_ROOT%{apacheconfdir}/conf.d/zz-spacewalk-www.conf
%endif

touch $RPM_BUILD_ROOT/%{_sysconfdir}/rhn/rhn.conf
Expand Down

0 comments on commit ddf1be2

Please sign in to comment.