]> git.pld-linux.org Git - packages/apache-mod_watch.git/commitdiff
- build with apache 2.4 auto/th/apache-mod_watch-4.03-9
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 5 May 2013 20:39:28 +0000 (22:39 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 5 May 2013 20:39:28 +0000 (22:39 +0200)
- rel 9

apache-mod_watch-apache24.patch [new file with mode: 0644]
apache-mod_watch.spec

diff --git a/apache-mod_watch-apache24.patch b/apache-mod_watch-apache24.patch
new file mode 100644 (file)
index 0000000..93ee867
--- /dev/null
@@ -0,0 +1,114 @@
+--- mod_watch-4.3/mod_watch.c.orig     2013-05-05 22:35:43.271485347 +0200
++++ mod_watch-4.3/mod_watch.c  2013-05-05 22:36:50.621484860 +0200
+@@ -785,8 +785,8 @@
+       struct watchConfDir *dconf;
+       /* Do not count if the connection is excluded. */
+-      if (ntIsMember(networkExcludeList, r->connection->remote_addr)
+-      && !ntIsMember(networkIncludeList, r->connection->remote_addr))
++      if (ntIsMember(networkExcludeList, r->useragent_addr)
++      && !ntIsMember(networkIncludeList, r->useragent_addr))
+               return DECLINED;
+       if (watch_what & (WATCH_OWNER|WATCH_OWNER_BY_PORT)) {
+@@ -820,12 +820,12 @@
+       }
+       if (watch_what & WATCH_REMOTE_IP) {
+-              key = apr_psprintf(r->pool, "ip/%s", r->connection->remote_ip);
++              key = apr_psprintf(r->pool, "ip/%s", r->connection->client_ip);
+               watchPostReadRequestHash(r, "watch-remote-ip", key);
+       }
+       if (watch_what & WATCH_REMOTE_IP_BY_PORT) {
+-              key = apr_psprintf(r->pool, "ip/%s,%u", r->connection->remote_ip, ap_get_server_port(r));
++              key = apr_psprintf(r->pool, "ip/%s,%u", r->connection->client_ip, ap_get_server_port(r));
+               watchPostReadRequestHash(r, "watch-remote-ip-by-port", key);
+       }
+@@ -939,8 +939,8 @@
+       }
+       /* Do not count if the connection is excluded. */
+-      if (ntIsMember(networkExcludeList, r->connection->remote_addr)
+-      && !ntIsMember(networkIncludeList, r->connection->remote_addr))
++      if (ntIsMember(networkExcludeList, r->useragent_addr)
++      && !ntIsMember(networkIncludeList, r->useragent_addr))
+               return DECLINED;
+ #ifdef WATCH_OUTPUT_VERSION_3
+@@ -980,12 +980,12 @@
+       }
+       if (watch_what & WATCH_REMOTE_IP) {
+-              key = apr_psprintf(r->pool, "ip/%s", r->connection->remote_ip);
++              key = apr_psprintf(r->pool, "ip/%s", r->connection->client_ip);
+               watchLogHash(r, key, data);
+       }
+       if (watch_what & WATCH_REMOTE_IP_BY_PORT) {
+-              key = apr_psprintf(r->pool, "ip/%s,%u", r->connection->remote_ip, ap_get_server_port(r));
++              key = apr_psprintf(r->pool, "ip/%s,%u", r->connection->client_ip, ap_get_server_port(r));
+               watchLogHash(r, key, data);
+       }
+@@ -1345,7 +1345,7 @@
+ watchPreConfig(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
+ {
+ #if defined(WHEN_APACHE_EXPLAINS_WHAT_TO_DO) && defined(__unix__)
+-      unixd_pre_config(ptemp);
++      ap_unixd_pre_config(ptemp);
+ #endif
+       watchDocumentsList = apr_array_make(pconf, 0, sizeof *watchDocumentsDef);
+       networkIncludeList = apr_array_make(pconf, 0, sizeof (apr_ipsubnet_t *));
+@@ -1401,8 +1401,8 @@
+        * child processes can R/W to it later when ever they need to flush
+        * or dump shared memory hash table entries to disk.
+        */
+-      (void) chown(stateDirectory, unixd_config.user_id, unixd_config.group_id);
+-      (void) chown(stateDirectoryIp, unixd_config.user_id, unixd_config.group_id);
++      (void) chown(stateDirectory, ap_unixd_config.user_id, ap_unixd_config.group_id);
++      (void) chown(stateDirectoryIp, ap_unixd_config.user_id, ap_unixd_config.group_id);
+ #endif
+       /* Create shared memory hash table. */
+@@ -1425,7 +1425,7 @@
+ watchChildInit(apr_pool_t *p, server_rec *s)
+ {
+ #if defined(WHEN_APACHE_EXPLAINS_WHAT_TO_DO) && defined(__unix__)
+-      unixd_setup_child();
++      ap_unixd_setup_child();
+ #endif
+       shChildInit(shtable, p);
+ }
+--- mod_watch-4.3/SharedHash.c~        2013-05-05 22:38:31.131484131 +0200
++++ mod_watch-4.3/SharedHash.c 2013-05-05 22:38:59.641483926 +0200
+@@ -159,7 +159,7 @@
+               (void) fprintf(fp, "\n");
+               fclose(fp);
+ #if defined(__unix__)
+-              (void) chown(tp->pathname, unixd_config.user_id, unixd_config.group_id);
++              (void) chown(tp->pathname, ap_unixd_config.user_id, ap_unixd_config.group_id);
+ #endif
+       }
+ }
+@@ -485,8 +485,8 @@
+                 goto error1;
+         }
+-        shmbuf.shm_perm.uid = unixd_config.user_id;
+-        shmbuf.shm_perm.gid = unixd_config.group_id;
++        shmbuf.shm_perm.uid = ap_unixd_config.user_id;
++        shmbuf.shm_perm.gid = ap_unixd_config.group_id;
+         shmbuf.shm_perm.mode = 0600;
+         if (shmctl(theMem->shmid, IPC_SET, &shmbuf) != 0) {
+@@ -524,7 +524,7 @@
+       }
+ #if defined(__unix__)
+-      unixd_set_global_mutex_perms((apr_global_mutex_t *) tp->mutex);
++      ap_unixd_set_global_mutex_perms((apr_global_mutex_t *) tp->mutex);
+ #endif
+       tp->info = (struct shInfo *) MemoryAllocate(tp->memory, sizeof *tp->info);
index 601a2b6b021a7b9290e3ece5839783fbdc52f508..83678fcca8172b117489f2b600fe3cb68dd2cb2f 100644 (file)
@@ -1,13 +1,13 @@
 # TODO
 # - package -DSTATEDIR=/var/lib/mod_watch ?
 %define                mod_name        watch
-%define        apxs            /usr/sbin/apxs
+%define                apxs            /usr/sbin/apxs
 %include       /usr/lib/rpm/macros.perl
 Summary:       Apache module: Monitoring Interface for MRTG
 Summary(pl.UTF-8):     Moduł do apache: Interfejs do monitorowania za pomocą MRTG
 Name:          apache-mod_%{mod_name}
 Version:       4.03
-Release:       8
+Release:       9
 License:       BSD
 Group:         Networking/Daemons/HTTP
 Source0:       http://www.snert.com/Software/download/mod_watch%(echo %{version} | tr -d .).tgz
@@ -16,6 +16,7 @@ Source1:      %{name}.conf
 Patch0:                %{name}-apr-fix.patch
 Patch1:                %{name}-shm-fix.patch
 Patch2:                %{name}-mutex.patch
+Patch3:                %{name}-apache24.patch
 URL:           http://www.snert.com/Software/mod_watch/
 BuildRequires: %{apxs}
 BuildRequires: apache-devel >= 2.0.52-2
@@ -49,6 +50,7 @@ wspiera mod_vhost_alias oraz mod_gzip.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %{__make} -f Makefile.dso build \
This page took 0.114005 seconds and 4 git commands to generate.