added patch needed to run on redhat platforms and added sample config files
authoraquarius <aquarius@251d49ef-1d17-4917-a970-b30cf55b089b>
Sun, 6 Jan 2008 11:06:07 +0000 (11:06 +0000)
committeraquarius <aquarius@251d49ef-1d17-4917-a970-b30cf55b089b>
Sun, 6 Jan 2008 11:06:07 +0000 (11:06 +0000)
git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@39 251d49ef-1d17-4917-a970-b30cf55b089b

Makefile
prometheus-conf-rh.patch [new file with mode: 0644]
prometheus.spec

index 31be395..9c73178 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,10 +14,13 @@ install: main
        install -d $(mandir)/man1
        install -d $(mandir)/man5
        install -d $(sysconfdir)/cron.d
+       install -d $(sysconfdir)/prometheus
        install -m 755 prometheus $(sbindir)
        install -m 644 prometheus.1 $(mandir)/man1
        install -m 644 prometheus.conf.5 $(mandir)/man5
        install -m 755 sample-configuration/prometheus.cron $(sysconfdir)/cron.d/prometheus
+       install -m 600 sample-configuration/prometheus.conf $(sysconfdir)/prometheus
+       install -m 600 sample-configuration/hosts $(sysconfdir)/prometheus
 
 clean:
        rm -f prometheus
diff --git a/prometheus-conf-rh.patch b/prometheus-conf-rh.patch
new file mode 100644 (file)
index 0000000..913d0bc
--- /dev/null
@@ -0,0 +1,36 @@
+--- prometheus.c       2008-01-06 11:54:28.000000000 +0100
++++ prometheus-rh.c    2008-01-06 11:54:09.000000000 +0100
+@@ -57,17 +57,17 @@
+ char *mark="MARK";\r
+ char *mark_iptables="MARK --set-mark ";\r
+ int dry_run=0;                         /* preview - use puts() instead of system() */\r
+-char *config="/etc/prometheus.conf";   /* main configuration file */\r
+-char *hosts="/etc/hosts";              /* line bandwidth definition file */\r
++char *config="/etc/prometheus/prometheus.conf";   /* main configuration file */\r
++char *hosts="/etc/prometheus/hosts";              /* line bandwidth definition file */\r
+ char *tc="/sbin/tc";                   /* requires tc with HTB support */\r
+-char *iptables="/usr/sbin/iptables";       /* requires iptables utility */\r
+-char *iptablessave="/usr/sbin/iptables-save"; /* new */\r
+-char *iptablesrestore="/usr/sbin/iptables-restore";  /* new */\r
++char *iptables="/sbin/iptables";       /* requires iptables utility */\r
++char *iptablessave="/sbin/iptables-save"; /* new */\r
++char *iptablesrestore="/sbin/iptables-restore";  /* new */\r
+ char *iptablesfile="/var/spool/prometheus.iptables";  /* new; file for iptables-restore*/\r
+ char *iptablespreamble="*mangle\n:PREROUTING ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]";\r
+ FILE *iptables_file=NULL;\r
+-char *html="/var/www/traffic.html";    /* hall of fame filename */\r
+-char *preview="/var/www/preview.html"; /* hall of fame preview */\r
++char *html="/var/www/html/traffic.html";    /* hall of fame filename */\r
++char *preview="/var/www/html/preview.html"; /* hall of fame preview */\r
+ char *cmdlog="/var/log/prometheus";    /* command log filename */\r
+ char *credit="/var/run/prometheus.credit";  /* credit log file */\r
+ int enable_credit=1;                   /* enable credit file */\r
+@@ -93,7 +93,7 @@
+ int qos_free_delay=0;   /* seconds to sleep before applying new QoS rules */\r
+ int digital_divide=2;     /* controls digital divide weirdness ratio, 1...3 */ \r
+ int max_nesting=3;      /* maximum nesting of HTB clases, built-in maximum seems to be 4 */\r
+-int htb_r2q=1;      \r
++int htb_r2q=1;\r
+ int burst=8;            /* HTB burst (in kbits) */\r
+ int burst_main=64;\r
+ int burst_group=32;\r
index 8aebe88..eea812f 100644 (file)
@@ -1,12 +1,13 @@
 Summary: Traffic shaper replacement for Internet Service Providers (ISP).
 Name: prometheus
 Version: 0.7.7
-Release: 3
+Release: 4
 License: GPL
 Vendor: Arachne Labs http://www.arachne.cz
 Packager: Tomas Lastovicka <aquarius@lamer.cz>
 Group: Applications/System
 Source0: http://gpl.arachne.cz/download/%name-%version.tar.gz
+Patch0: prometheus-conf-rh.patch
 URL: http://gpl.arachne.cz
 Requires: iptables, iproute
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -29,6 +30,7 @@ of CZFree.Net broadband community network.
 
 %prep
 %setup -q
+%patch0 -p0
 
 %build
 make %{_smp_mflags}
@@ -38,7 +40,8 @@ rm -rf %{buildroot}
 mkdir -p %{buildroot}%{_sbindir}
 mkdir -p %{buildroot}%{_mandir}/man1
 mkdir -p %{buildroot}%{_mandir}/man5
-mkdir -p %{buildroot}%{_sysconfdir}/cron.d/
+mkdir -p %{buildroot}%{_sysconfdir}/cron.d
+mkdir -p %{buildroot}%{_sysconfdir}/prometheus
 
 %makeinstall
 
@@ -51,8 +54,14 @@ rm -rf %{buildroot}
 %{_mandir}/man1/prometheus.1*
 %{_mandir}/man5/prometheus.conf.5*
 %config(noreplace) %{_sysconfdir}/cron.d/prometheus
+%config(noreplace) %{_sysconfdir}/prometheus/prometheus.conf
+%config(noreplace) %{_sysconfdir}/prometheus/hosts
 
 %changelog
+* Sun Jan 6 2008 Tomas Lastovicka <aquarius@lamer.cz> 0.7.7-4
+- added sample configuration files
+- added patch which reflects different locations of some files in redhat-like distros
+
 * Sat Jan 5 2008 Tomas Lastovicka <aquarius@lamer.cz> 0.7.7-3
 - removed screen from dependencies
 - cleaned up cron file
This page took 0.197098 seconds and 4 git commands to generate.