-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/TACC/tacc_stats
- Loading branch information
Showing
4 changed files
with
23 additions
and
88 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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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,53 +1,55 @@ | ||
Summary: TACC system statistics collector | ||
Summary: Job-level Tracking and Analysis System | ||
Name: tacc_statsd | ||
Version: 2.3.1 | ||
Release: 1%{?dist} | ||
Version: 2.3.4 | ||
Release: 5%{?dist} | ||
License: GPL | ||
Vendor: Texas Advanced Computing Center | ||
Group: System Environment/Base | ||
Packager: TACC - [email protected] | ||
Source: tacc_stats-%{version}.tar.gz | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||
|
||
#%include rpm-dir.inc | ||
%include rpm-dir.inc | ||
%define debug_package %{nil} | ||
%{!?rmqserver: %{error: define rmqserver!} exit 1 } | ||
%{!?system: %{error: define system name!} exit 1} | ||
%{!?server: %{error: define server!} exit 1 } | ||
%{!?queue: %{error: define queue name!} exit 1} | ||
|
||
%define _bindir /opt/%{name} | ||
%define _sysconfdir /etc | ||
%define _sysconfdir /etc/systemd/system | ||
|
||
%description | ||
This package provides the tacc_stats daemon, along with an /etc/init.d | ||
script to provide control. | ||
This package provides the tacc_statsd daemon, along with a systemv | ||
unit file. | ||
|
||
%prep | ||
%setup -n tacc_stats-%{version} | ||
|
||
%build | ||
./configure --bindir=%{_bindir} --sysconfdir=%{_sysconfdir} --disable-infiniband --disable-opa CPPFLAGS=-I/admin/build/admin/rpms/stampede2/SOURCES/opa-ff/builtinclude.OPENIB_FF.release LDFLAGS=-L/admin/build/admin/rpms/stampede2/SOURCES/opa-ff/builtlibs.OPENIB_FF.release --enable-rabbitmq | ||
./configure --bindir=%{_bindir} --sysconfdir=%{_sysconfdir} --enable-rabbitmq | ||
make clean | ||
make | ||
|
||
%install | ||
rm -rf %{buildroot} | ||
cd src | ||
install -m 0755 -d %{buildroot}/%{_bindir} | ||
install -m 0755 -d %{buildroot}/%{_sysconfdir} | ||
install -m 0755 -d %{buildroot}/%{_sysconfdir}/init.d | ||
install -m 6755 tacc_stats %{buildroot}/%{_bindir}/tacc_stats | ||
install -m 0511 tacc_stats.conf %{buildroot}/%{_sysconfdir}/tacc_stats.conf | ||
install -m 0755 taccstats %{buildroot}/%{_sysconfdir}/init.d/taccstats | ||
install -m 0664 taccstats.service %{buildroot}/%{_sysconfdir}/taccstats.service | ||
|
||
%post | ||
chkconfig --add taccstats | ||
sed -i 's/localhost/%{rmqserver}/' %{_sysconfdir}/tacc_stats.conf | ||
sed -i 's/default/%{system}/' %{_sysconfdir}/tacc_stats.conf | ||
/sbin/service taccstats restart | ||
sed -i 's/localhost/%{server}/' %{_sysconfdir}/taccstats.service | ||
sed -i 's/default/%{queue}/' %{_sysconfdir}/taccstats.service | ||
sed -i 's/tacc_statsd/%{name}/' %{_sysconfdir}/taccstats.service | ||
|
||
systemctl daemon-reload | ||
systemctl enable taccstats | ||
#systemctl restart taccstats | ||
|
||
%preun | ||
if [ $1 == 0 ]; then | ||
/sbin/service taccstats stop || : | ||
chkconfig --del taccstats || : | ||
systemctl stop taccstats | ||
systemctl disable taccstats | ||
fi | ||
|
||
%clean | ||
|
@@ -57,6 +59,4 @@ rm -rf %{buildroot} | |
%defattr(-,root,root,-) | ||
%dir %{_bindir}/ | ||
%attr(6755,root,root) %{_bindir}/tacc_stats | ||
%attr(0744,root,root) %{_sysconfdir}/tacc_stats.conf | ||
%attr(0744,root,root) %{_sysconfdir}/init.d/taccstats | ||
|
||
%attr(0644,root,root) %{_sysconfdir}/taccstats.service |