]> git.pld-linux.org Git - packages/apache-mod_bw.git/commitdiff
- up to 0.92, builds auto/th/apache-mod_bw-0_92-1
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 10 Jun 2011 10:53:36 +0000 (10:53 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache-mod_bw-apr_1.0.patch -> 1.2
    apache-mod_bw.spec -> 1.34

apache-mod_bw-apr_1.0.patch [deleted file]
apache-mod_bw.spec

diff --git a/apache-mod_bw-apr_1.0.patch b/apache-mod_bw-apr_1.0.patch
deleted file mode 100644 (file)
index 8e35aa9..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-diff -burN bw_mod-0.6.orig/bw_mod-0.6.c bw_mod-0.6/bw_mod-0.6.c
---- bw_mod-0.6.orig/bw_mod-0.6.c       2005-03-12 14:28:51.665241352 +0100
-+++ bw_mod-0.6/bw_mod-0.6.c    2005-03-12 14:32:46.305570600 +0100
-@@ -510,7 +510,7 @@
-     nowtime = apr_time_now();
-     if ( bwstat->time < (nowtime - 1000000) ) {
-       /* And if we got lock */
--      if ( apr_atomic_cas( &bwstat->lock, 1, 0 ) == 0 ) {
-+      if ( apr_atomic_cas32( &bwstat->lock, 1, 0 ) == 0 ) {
-         /* Calculate bw used in the last timeinterval */
-         bwstat->bandwidth = ( bwstat->bytes_count / (double)(nowtime - bwstat->time)) * 1000000 ;
-@@ -522,7 +522,7 @@
-         bwstat->time = apr_time_now();
-           
-         /* Release lock */
--        apr_atomic_set( &bwstat->lock, 0 );
-+        apr_atomic_set32( &bwstat->lock, 0 );
-      }
-   }    
- }   
-@@ -653,7 +653,7 @@
-   else             bwmaxconn = bwstat;
-  
-   /* Add 1 active connection to the record */
--  apr_atomic_inc( &bwmaxconn->connection_count );
-+  apr_atomic_inc32( &bwmaxconn->connection_count );
-   /* Verbose Output */
-   if (sconf->debug == BANDWIDTH_ENABLED) {
-@@ -682,7 +682,7 @@
-       ap_pass_brigade(f->next, ctx->bb);
-       /* Delete 1 active connection */
--      apr_atomic_dec( &bwmaxconn->connection_count );
-+      apr_atomic_dec32( &bwmaxconn->connection_count );
-       return APR_SUCCESS; 
-     }
-@@ -750,14 +750,14 @@
-         b = APR_BRIGADE_FIRST(bb);
-         /* Add the number of bytes transferred, so we can get an estimated bw usage */
--        apr_atomic_add( &bwstat->bytes_count, packet);
-+        apr_atomic_add32( &bwstat->bytes_count, packet);
-         /* If the connection goes to hell... go with it ! */
-         if (r->connection->aborted) { 
-           /* Verbose. Tells when the connection was ended */
-           if (sconf->debug == BANDWIDTH_ENABLED) 
-             ap_log_error(APLOG_MARK, APLOG_NOTICE|APLOG_NOERRNO, 0,NULL,"[W] Connection to hell"); 
--          apr_atomic_dec( &bwmaxconn->connection_count ); 
-+          apr_atomic_dec32( &bwmaxconn->connection_count ); 
-           return APR_SUCCESS; 
-         }
-@@ -774,14 +774,14 @@
-     b = APR_BRIGADE_FIRST(bb);
-     /* Add the number of bytes to the counter */
--    apr_atomic_add( &bwstat->bytes_count, bytes);
-+    apr_atomic_add32( &bwstat->bytes_count, bytes);
-       
-     /* Pass the final brigade */
-     ap_pass_brigade(f->next, ctx->bb);
-   }
-   /* Delete 1 active connection to the record */
--  apr_atomic_dec( &bwmaxconn->connection_count );
-+  apr_atomic_dec32( &bwmaxconn->connection_count );
-   /* Verbose, tells when we ended the Filter */
-   if (sconf->debug == BANDWIDTH_ENABLED) 
index eae86266c2c95bfeeec97f2cf23f10275acfd8d8..20b0ef9c1a34f19cce2cfa658c22c86da0d248f6 100644 (file)
@@ -5,14 +5,13 @@
 Summary:       Apache module: bandwidth limits
 Summary(pl.UTF-8):     Moduł do Apache: limity pasma
 Name:          apache-mod_%{mod_name}
-Version:       0.6
-Release:       3
+Version:       0.92
+Release:       1
 License:       Apache
 Group:         Networking/Daemons/HTTP
-Source0:       http://www.ivn.cl/apache/bw_mod-%{version}.tgz
-# Source0-md5: 0c92fa6344f487321291a592dbb49856
+Source0:       http://ivn.cl/files/source/mod_bw-%{version}.tgz
+# Source0-md5: 90f5e632dad5de8d49dcdb61453dcf97
 Source1:       %{name}.conf
-Patch0:                %{name}-apr_1.0.patch
 URL:           http://www.ivn.cl/apache/
 BuildRequires: %{apxs}
 BuildRequires: apache-devel >= 2.0.0
@@ -36,13 +35,10 @@ Moduł pozwalający na ograniczanie pasma serwera Apache bazując na
 katalogu, wielkości plików lub zdalnym IP/domenie.
 
 %prep
-%setup -q -n bw_mod-%{version}
-%patch0 -p1
-sed -i -e 's@include "apr@include "apr/apr@g' bw_mod-%{version}.c
-sed -i -e 's@^.*apr_buckets.h.*$@@' bw_mod-%{version}.c
+%setup -qc
 
 %build
-%{apxs} -c bw_mod-%{version}.c
+%{apxs} -c mod_bw.c
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -50,8 +46,8 @@ install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf} \
        $RPM_BUILD_ROOT%{_var}/run/%{name}/{link,master} \
        $RPM_BUILD_ROOT{/etc/cron.d,%{_sbindir}}
 
-install .libs/bw_mod-%{version}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/97_mod_%{mod_name}.conf
+install -p .libs/mod_bw.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/97_mod_%{mod_name}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -66,7 +62,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc bw_mod-%{version}.txt LICENSE
+%doc mod_bw.txt LICENSE ChangeLog
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
 %attr(755,root,root) %{_pkglibdir}/*.so
 #%config(noreplace) %verify(not size mtime md5) %attr(640,root,root) /etc/cron.d/%{name}
This page took 0.03861 seconds and 4 git commands to generate.