-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating rpm spec files to work with mod_wsgi
- Loading branch information
1 parent
754de72
commit 44413b1
Showing
2 changed files
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
%define install_base /usr/lib/perfsonar | ||
%define pkg_install_base %{install_base}/host_metrics | ||
%define httpd_config_base /etc/httpd/conf.d | ||
%define wsgi_config_base /var/www/html/perfsonar/host_exporter | ||
|
||
#Version variables set by automated scripts | ||
%define perfsonar_auto_version 5.2.0 | ||
|
@@ -72,16 +73,15 @@ A package that installs and sets-up Prometheus node_exporter for a perfSONAR ins | |
make -f /usr/share/selinux/devel/Makefile -C selinux perfsonar_host_metrics.pp | ||
|
||
%install | ||
make PERFSONAR-ROOTPATH=%{buildroot}/%{pkg_install_base} HTTPD-CONFIGPATH=%{buildroot}/%{httpd_config_base} install | ||
mkdir -p %{buildroot}/%{_unitdir}/ | ||
install -m 644 *.service %{buildroot}/%{_unitdir}/ | ||
make PERFSONAR-ROOTPATH=%{buildroot}/%{pkg_install_base} HTTPD-CONFIGPATH=%{buildroot}/%{httpd_config_base} WSGI-CONFIGPATH=%{buildroot}/%{wsgi_config_base} install | ||
mkdir -p %{buildroot}/usr/share/selinux/packages/ | ||
mv selinux/*.pp %{buildroot}/usr/share/selinux/packages/ | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
||
%post | ||
ln -sT -f %{pkg_install_base} %{wsgi_config_base}/host_exporter | ||
|
||
#selinux | ||
semodule -n -i /usr/share/selinux/packages/perfsonar_host_metrics.pp | ||
|
@@ -91,7 +91,6 @@ fi | |
|
||
#Restart/enable opensearch and logstash | ||
%systemd_post node_exporter.service | ||
%systemd_post perfsonar-host-exporter.service | ||
if [ "$1" = "1" ]; then | ||
#set SELinux booleans to allow httpd proxy to work | ||
%selinux_set_booleans -s %{selinuxtype} %{selinuxbooleans} | ||
|
@@ -103,8 +102,6 @@ if [ "$1" = "1" ]; then | |
systemctl daemon-reload | ||
systemctl enable node_exporter.service | ||
systemctl restart node_exporter.service | ||
systemctl enable perfsonar-host-exporter.service | ||
systemctl restart perfsonar-host-exporter.service | ||
#Enable and restart apache for reverse proxy | ||
systemctl enable httpd | ||
systemctl restart httpd | ||
|
@@ -115,11 +112,10 @@ fi | |
|
||
%preun | ||
%systemd_preun node_exporter.service | ||
%systemd_preun perfsonar-host-exporter.service | ||
|
||
%postun | ||
+%{__rm} -f %{wsgi_config_base}/host_exporter | ||
%systemd_postun_with_restart node_exporter.service | ||
%systemd_postun_with_restart perfsonar-host-exporter.service | ||
if [ $1 -eq 0 ]; then | ||
%selinux_unset_booleans -s %{selinuxtype} %{selinuxbooleans} | ||
semodule -n -r perfsonar_host_metrics | ||
|
@@ -132,11 +128,11 @@ fi | |
%defattr(0644,perfsonar,perfsonar,0755) | ||
%license LICENSE | ||
%attr(0755, perfsonar, perfsonar) %{pkg_install_base}/exporter_opts.sh | ||
%attr(0755, perfsonar, perfsonar) %{pkg_install_base}/perfsonar_host_exporter | ||
%attr(0755, perfsonar, perfsonar) %{pkg_install_base}/perfsonar_host_exporter.py | ||
%attr(0644, perfsonar, perfsonar) %{httpd_config_base}/apache-node_exporter.conf | ||
%attr(0644, perfsonar, perfsonar) %{httpd_config_base}/apache-perfsonar_host_exporter.conf | ||
%attr(0644, perfsonar, perfsonar) %{wsgi_config_base}/host_exporter.wsgi | ||
%attr(0644,root,root) /usr/share/selinux/packages/* | ||
%{_unitdir}/perfsonar-host-exporter.service | ||
|
||
%changelog | ||
* Tue Oct 24 2023 [email protected] 5.0.5-0.0.a1 | ||
|