r24087 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24086‎ | r24087 | r24088 >
Date:15:29, 14 July 2007
Author:tstarling
Status:old
Tags:
Comment:
Use the makefile for both redhat and debian. Custom spec file instead of distutils.
Modified paths:
  • /trunk/ganglia_metrics/Makefile (modified) (history)
  • /trunk/ganglia_metrics/MySQLStats.py (modified) (history)
  • /trunk/ganglia_metrics/ganglia_metrics.spec (added) (history)
  • /trunk/ganglia_metrics/init.d/gmetricd (modified) (history)

Diff [purge]

Index: trunk/ganglia_metrics/ganglia_metrics.spec
@@ -0,0 +1,46 @@
 2+%define name ganglia_metrics
 3+%define version 1.1
 4+%define release 1
 5+
 6+Summary: Ganglia metric daemon
 7+Name: %{name}
 8+Version: %{version}
 9+Release: %{release}
 10+Source0: %{name}-%{version}.tar.gz
 11+License: GPL or something
 12+Group: Development/Libraries
 13+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 14+Prefix: %{_prefix}
 15+BuildArch: noarch
 16+Vendor: Tim Starling <tstarling@wikimedia.org>
 17+Url: http://svn.wikimedia.org/viewvc/mediawiki/trunk/ganglia_metrics/
 18+
 19+%description
 20+Ganglia metric daemon
 21+
 22+%prep
 23+%setup
 24+
 25+%build
 26+make
 27+
 28+%install
 29+make install DESTDIR=$RPM_BUILD_ROOT
 30+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 31+install -m755 init.d/gmetricd $RPM_BUILD_ROOT/etc/rc.d/init.d/gmetricd
 32+
 33+%clean
 34+rm -rf $RPM_BUILD_ROOT
 35+
 36+%files
 37+%defattr(-,root,root)
 38+/usr/lib/ganglia-metrics
 39+/usr/lib/ganglia-metrics/gmetricd.py
 40+/usr/lib/ganglia-metrics/SelectServer.py
 41+/usr/lib/ganglia-metrics/gmetricd.pyo
 42+/usr/lib/ganglia-metrics/GangliaMetrics.py
 43+/usr/lib/ganglia-metrics/__init__.py
 44+/usr/lib/ganglia-metrics/SelectServer.pyo
 45+/usr/lib/ganglia-metrics/GangliaMetrics.pyo
 46+/usr/sbin/gmetricd
 47+/etc/rc.d/init.d/gmetricd
Index: trunk/ganglia_metrics/init.d/gmetricd
@@ -2,7 +2,7 @@
33 # chkconfig: 2345 20 80
44 # description: gmetricd startup script
55 #
6 -GMETRICD=/usr/bin/gmetricd
 6+GMETRICD=/usr/sbin/gmetricd
77
88 . /etc/rc.d/init.d/functions
99
Index: trunk/ganglia_metrics/MySQLStats.py
@@ -60,7 +60,7 @@
6161 return dom
6262
6363 def markDown(self):
64 - self.metrics['mysql_questions'].set(None)
 64+ self.metrics['mysql_questions'].set(None, None)
6565 self.metrics['mysql_threads_connected'].set(None)
6666 self.metrics['mysql_threads_running'].set(None)
6767 self.metrics['mysql_slave_lag'].set(None)
Index: trunk/ganglia_metrics/Makefile
@@ -1,14 +1,17 @@
2 -all: SelectServer.pyo GangliaMetrics.pyo gmetricd.pyo
 2+SOURCES=__init__.py gmetricd.py GangliaMetrics.py MySQLStats.py SelectServer.py
 3+OBJECTS=gmetricd.pyo GangliaMetrics.pyo MySQLStats.pyo SelectServer.pyo
34
 5+all: $(OBJECTS)
 6+
47 clean:
5 - rm -f SelectServer.pyo GangliaMetrics.pyo gmetricd.pyo
 8+ rm -f $(OBJECTS)
69
710 %.pyo : %.py
811 python -O -m py_compile $<
912
1013 install:
1114 install -d $(DESTDIR)/usr/lib/ganglia-metrics
12 - install -m644 gmetricd.py gmetricd.pyo __init__.py SelectServer.py SelectServer.pyo GangliaMetrics.py GangliaMetrics.pyo $(DESTDIR)/usr/lib/ganglia-metrics
 15+ install -m644 $(OBJECTS) $(SOURCES) $(DESTDIR)/usr/lib/ganglia-metrics
1316 install -d $(DESTDIR)/usr/sbin
1417 install -m755 gmetricd $(DESTDIR)/usr/sbin/gmetricd
1518

Status & tagging log