[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#769315: marked as done (unblock: c-icap/1:0.3.4-2)



Your message dated Wed, 12 Nov 2014 20:57:38 +0000
with message-id <1415825858.23631.1.camel@adam-barratt.org.uk>
and subject line Re: Bug#769315: unblock: c-icap/1:0.3.4-2
has caused the Debian Bug report #769315,
regarding unblock: c-icap/1:0.3.4-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
769315: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769315
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package c-icap

This fixes a FTBFS of c-icap-modules (#768684)

Debdiff attached.

unblock c-icap/1:0.3.4-2

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff --git a/debian/changelog b/debian/changelog
index ea7846c..1e2f8b1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+c-icap (1:0.3.4-2) unstable; urgency=medium
+
+  * Rename CONF to C_ICAP_CONF to fix FTBFS of c-icap-modules due to redeclared
+    CONF (Closes: #768684)
+
+ -- Mathieu Parent <sathieu@debian.org>  Wed, 12 Nov 2014 18:33:18 +0100
+
 c-icap (1:0.3.4-1) unstable; urgency=medium
 
   * New upstream release
diff --git a/debian/patches/0010-Rename-CONF-to-C_ICAP_CONF.patch b/debian/patches/0010-Rename-CONF-to-C_ICAP_CONF.patch
new file mode 100644
index 0000000..dd252a5
--- /dev/null
+++ b/debian/patches/0010-Rename-CONF-to-C_ICAP_CONF.patch
@@ -0,0 +1,735 @@
+From: Mathieu Parent <math.parent@gmail.com>
+Date: Wed, 12 Nov 2014 17:54:49 +0100
+Subject: Rename CONF to C_ICAP_CONF
+
+Fix FTBFS of c-icap-modules because of redeclared symbol.
+
+Relevant part:
+> /bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../..  -D_FORTIFY_SOURCE=2 -I../../include/  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -fvisibility=hidden -DCI_BUILD_MODULE -D_REENTRANT -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include -I/usr/include/c_icap -c -o clamav_mod_la-clamav_mod.lo `test -f 'clamav_mod.c' || echo './'`clamav_mod.c
+> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -D_FORTIFY_SOURCE=2 -I../../include/ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -fvisibility=hidden -DCI_BUILD_MODULE -D_REENTRANT -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include -I/usr/include/c_icap -c clamav_mod.c  -fPIC -DPIC -o .libs/clamav_mod_la-clamav_mod.o
+> In file included from /usr/include/openssl/crypto.h:131:0,
+>                  from /usr/include/openssl/comp.h:5,
+>                  from /usr/include/openssl/ssl.h:149,
+>                  from /usr/include/clamav.h:31,
+>                  from clamav_mod.c:27:
+> /usr/include/openssl/ossl_typ.h:165:24: error: 'CONF' redeclared as different kind of symbol
+>  typedef struct conf_st CONF;
+>                         ^
+> In file included from /usr/include/c_icap/service.h:25:0,
+>                  from /usr/include/c_icap/request.h:25,
+>                  from virus_scan.h:5,
+>                  from clamav_mod.c:20:
+> /usr/include/c_icap/cfg_param.h:129:30: note: previous declaration of 'CONF' was here
+>  extern struct ci_server_conf CONF;
+>                               ^
+> make[4]: *** [clamav_mod_la-clamav_mod.lo] Error 1
+
+See also: https://bugs.debian.org/768684
+---
+ aserver.c           | 14 +++++-----
+ cfg_param.c         | 76 ++++++++++++++++++++++++++---------------------------
+ include/cfg_param.h |  2 +-
+ module.c            | 32 +++++++++++-----------
+ mpmt_server.c       | 54 ++++++++++++++++++-------------------
+ service.c           |  6 ++---
+ winnt_server.c      | 26 +++++++++---------
+ 7 files changed, 105 insertions(+), 105 deletions(-)
+
+diff --git a/aserver.c b/aserver.c
+index 13d6f82..9e95396 100644
+--- a/aserver.c
++++ b/aserver.c
+@@ -125,9 +125,9 @@ int main(int argc, char **argv)
+      ci_txt_template_set_dir(DATADIR"templates");
+      commands_init();
+ 
+-     if (!(CONF.MAGIC_DB = ci_magic_db_load(CONF.magics_file))) {
++     if (!(C_ICAP_CONF.MAGIC_DB = ci_magic_db_load(C_ICAP_CONF.magics_file))) {
+           ci_debug_printf(1, "Can not load magic file %s!!!\n",
+-                          CONF.magics_file);
++                          C_ICAP_CONF.magics_file);
+      }
+      init_conf_tables();
+      request_stats_init();
+@@ -143,22 +143,22 @@ int main(int argc, char **argv)
+      }
+ 
+ #if ! defined(_WIN32)
+-     if (is_icap_running(CONF.PIDFILE)) {
++     if (is_icap_running(C_ICAP_CONF.PIDFILE)) {
+           ci_debug_printf(1, "c-icap server already running!\n");
+           exit(-1);
+      }
+      if (DAEMON_MODE)
+           run_as_daemon();
+-     if (!set_running_permissions(CONF.RUN_USER, CONF.RUN_GROUP))
++     if (!set_running_permissions(C_ICAP_CONF.RUN_USER, C_ICAP_CONF.RUN_GROUP))
+           exit(-1);
+-     store_pid(CONF.PIDFILE);
++     store_pid(C_ICAP_CONF.PIDFILE);
+ #endif
+ 
+-     if (!init_server(CONF.ADDRESS, CONF.PORT, &(CONF.PROTOCOL_FAMILY)))
++     if (!init_server(C_ICAP_CONF.ADDRESS, C_ICAP_CONF.PORT, &(C_ICAP_CONF.PROTOCOL_FAMILY)))
+           return -1;
+      post_init_modules();
+      post_init_services();
+      start_server();
+-     clear_pid(CONF.PIDFILE);
++     clear_pid(C_ICAP_CONF.PIDFILE);
+      return 0;
+ }
+diff --git a/cfg_param.c b/cfg_param.c
+index 307a4a9..20234a6 100644
+--- a/cfg_param.c
++++ b/cfg_param.c
+@@ -40,7 +40,7 @@
+ int ARGC;
+ char **ARGV;
+ 
+-struct ci_server_conf CONF = {
++struct ci_server_conf C_ICAP_CONF = {
+      NULL, /* LISTEN ADDRESS */ 1344, /*PORT*/ AF_INET,    /*SOCK_FAMILY */
+ #ifdef _WIN32
+      "c:\\TEMP", /*TMPDIR*/ "c:\\TEMP\\c-icap.pid", /*PIDFILE*/ "\\\\.\\pipe\\c-icap",  /*COMMANDS_SOCKET; */
+@@ -131,34 +131,34 @@ struct sub_table {
+ };
+ 
+ static struct ci_conf_entry conf_variables[] = {
+-     {"ListenAddress", &CONF.ADDRESS, intl_cfg_set_str, NULL},
+-     {"PidFile", &CONF.PIDFILE, intl_cfg_set_str, NULL},
+-     {"CommandsSocket", &CONF.COMMANDS_SOCKET, intl_cfg_set_str, NULL},
++     {"ListenAddress", &C_ICAP_CONF.ADDRESS, intl_cfg_set_str, NULL},
++     {"PidFile", &C_ICAP_CONF.PIDFILE, intl_cfg_set_str, NULL},
++     {"CommandsSocket", &C_ICAP_CONF.COMMANDS_SOCKET, intl_cfg_set_str, NULL},
+      {"Timeout", (void *) (&TIMEOUT), intl_cfg_set_int, NULL},
+      {"KeepAlive", NULL, NULL, NULL},
+      {"MaxKeepAliveRequests", &MAX_KEEPALIVE_REQUESTS, intl_cfg_set_int, NULL},
+      {"KeepAliveTimeout", &KEEPALIVE_TIMEOUT, intl_cfg_set_int, NULL},
+-     {"StartServers", &CONF.START_SERVERS, intl_cfg_set_int, NULL},
+-     {"MaxServers", &CONF.MAX_SERVERS, intl_cfg_set_int, NULL},
+-     {"MinSpareThreads", &CONF.MIN_SPARE_THREADS, intl_cfg_set_int, NULL},
+-     {"MaxSpareThreads", &CONF.MAX_SPARE_THREADS, intl_cfg_set_int, NULL},
+-     {"ThreadsPerChild", &CONF.THREADS_PER_CHILD, intl_cfg_set_int, NULL},
++     {"StartServers", &C_ICAP_CONF.START_SERVERS, intl_cfg_set_int, NULL},
++     {"MaxServers", &C_ICAP_CONF.MAX_SERVERS, intl_cfg_set_int, NULL},
++     {"MinSpareThreads", &C_ICAP_CONF.MIN_SPARE_THREADS, intl_cfg_set_int, NULL},
++     {"MaxSpareThreads", &C_ICAP_CONF.MAX_SPARE_THREADS, intl_cfg_set_int, NULL},
++     {"ThreadsPerChild", &C_ICAP_CONF.THREADS_PER_CHILD, intl_cfg_set_int, NULL},
+      {"MaxRequestsPerChild", &MAX_REQUESTS_PER_CHILD, intl_cfg_set_int, NULL},
+      {"MaxRequestsReallocateMem", &MAX_REQUESTS_BEFORE_REALLOCATE_MEM,
+       intl_cfg_set_int, NULL},
+-     {"Port", &CONF.PORT, intl_cfg_set_int, NULL},
+-     {"User", &CONF.RUN_USER, intl_cfg_set_str, NULL},
+-     {"Group", &CONF.RUN_GROUP, intl_cfg_set_str, NULL},
+-     {"ServerAdmin", &CONF.SERVER_ADMIN, intl_cfg_set_str, NULL},
+-     {"ServerName", &CONF.SERVER_NAME, intl_cfg_set_str, NULL},
++     {"Port", &C_ICAP_CONF.PORT, intl_cfg_set_int, NULL},
++     {"User", &C_ICAP_CONF.RUN_USER, intl_cfg_set_str, NULL},
++     {"Group", &C_ICAP_CONF.RUN_GROUP, intl_cfg_set_str, NULL},
++     {"ServerAdmin", &C_ICAP_CONF.SERVER_ADMIN, intl_cfg_set_str, NULL},
++     {"ServerName", &C_ICAP_CONF.SERVER_NAME, intl_cfg_set_str, NULL},
+      {"LoadMagicFile", NULL, cfg_load_magicfile, NULL},
+      {"Logger", &default_logger, cfg_set_logger, NULL},
+      {"ServerLog", &SERVER_LOG_FILE, intl_cfg_set_str, NULL},
+      {"AccessLog", NULL, cfg_set_accesslog, NULL},
+      {"LogFormat", NULL, cfg_set_logformat, NULL},
+      {"DebugLevel", NULL, cfg_set_debug_level, NULL},   /*Set library's debug level */
+-     {"ServicesDir", &CONF.SERVICES_DIR, intl_cfg_set_str, NULL},
+-     {"ModulesDir", &CONF.MODULES_DIR, intl_cfg_set_str, NULL},
++     {"ServicesDir", &C_ICAP_CONF.SERVICES_DIR, intl_cfg_set_str, NULL},
++     {"ModulesDir", &C_ICAP_CONF.MODULES_DIR, intl_cfg_set_str, NULL},
+      {"Service", NULL, cfg_load_service, NULL},
+      {"ServiceAlias", NULL, cfg_service_alias, NULL},
+      {"Module", NULL, cfg_load_module, NULL},
+@@ -445,7 +445,7 @@ int cfg_load_magicfile(const char *directive, const char **argv, void *setdata)
+      }
+ 
+      db_file = argv[0];
+-     if (strcmp(CONF.magics_file, db_file) == 0) {
++     if (strcmp(C_ICAP_CONF.magics_file, db_file) == 0) {
+          ci_debug_printf(2, "The db file %s is the same as default. Ignoring...\n", db_file); 
+          return 1;
+      }
+@@ -455,8 +455,8 @@ int cfg_load_magicfile(const char *directive, const char **argv, void *setdata)
+           ci_debug_printf(1, "Can not load magic file %s!!!\n", db_file);
+           return 0;
+      }
+-     if (!CONF.MAGIC_DB)
+-	 CONF.MAGIC_DB = ndb;
++     if (!C_ICAP_CONF.MAGIC_DB)
++	 C_ICAP_CONF.MAGIC_DB = ndb;
+ 
+      return 1;
+ }
+@@ -511,24 +511,24 @@ int cfg_set_tmp_dir(const char *directive, const char **argv, void *setdata)
+           return 0;
+      }
+ 
+-     cfg_default_value_store(&CONF.TMPDIR, &CONF.TMPDIR, sizeof(char *));
++     cfg_default_value_store(&C_ICAP_CONF.TMPDIR, &C_ICAP_CONF.TMPDIR, sizeof(char *));
+      len = strlen(argv[0]);
+ 
+-     CONF.TMPDIR = ci_cfg_alloc_mem((len + 2) * sizeof(char));
+-     strcpy(CONF.TMPDIR, argv[0]);
++     C_ICAP_CONF.TMPDIR = ci_cfg_alloc_mem((len + 2) * sizeof(char));
++     strcpy(C_ICAP_CONF.TMPDIR, argv[0]);
+ #ifdef _WIN32
+-     if (CONF.TMPDIR[len] != '\\') {
+-          CONF.TMPDIR[len] = '\\';
+-          CONF.TMPDIR[len + 1] = '\0';
++     if (C_ICAP_CONF.TMPDIR[len] != '\\') {
++          C_ICAP_CONF.TMPDIR[len] = '\\';
++          C_ICAP_CONF.TMPDIR[len + 1] = '\0';
+      }
+ #else
+-     if (CONF.TMPDIR[len] != '/') {
+-          CONF.TMPDIR[len] = '/';
+-          CONF.TMPDIR[len + 1] = '\0';
++     if (C_ICAP_CONF.TMPDIR[len] != '/') {
++          C_ICAP_CONF.TMPDIR[len] = '/';
++          C_ICAP_CONF.TMPDIR[len + 1] = '\0';
+      }
+ #endif
+      /*Check if tmpdir exists. If no try to build it , report an error and uses the default... */
+-     CI_TMPDIR = CONF.TMPDIR;   /*Sets the library's temporary dir to .... */
++     CI_TMPDIR = C_ICAP_CONF.TMPDIR;   /*Sets the library's temporary dir to .... */
+      ci_debug_printf(2, "Setting parameter :%s=%s\n", directive, argv[0]);
+      return 1;
+ }
+@@ -836,7 +836,7 @@ int parse_file(const char *conf_file)
+ /* #endif */
+ 
+ static struct ci_options_entry options[] = {
+-     {opt_pre "f", "filename", &CONF.cfg_file, ci_cfg_set_str,
++     {opt_pre "f", "filename", &C_ICAP_CONF.cfg_file, ci_cfg_set_str,
+       "Specify the configuration file"},
+      {opt_pre "N", NULL, &DAEMON_MODE, ci_cfg_disable, "Do not run as daemon"},
+      {opt_pre "d", "level", NULL, cfg_set_debug_level_cmd,
+@@ -858,7 +858,7 @@ int config(int argc, char **argv)
+           ci_args_usage(argv[0], options);
+           exit(-1);
+      }
+-     if (!parse_file(CONF.cfg_file)) {
++     if (!parse_file(C_ICAP_CONF.cfg_file)) {
+           ci_debug_printf(1, "Error opening/parsing config file\n");
+           exit(0);
+      }
+@@ -877,7 +877,7 @@ int reconfig()
+                           "Error in command line options, while reconfiguring!\n");
+           return 0;
+      }
+-     if (!parse_file(CONF.cfg_file)) {
++     if (!parse_file(C_ICAP_CONF.cfg_file)) {
+           ci_debug_printf(1,
+                           "Error opening/parsing config file, while reconfiguring!\n");
+           return 0;
+@@ -917,7 +917,7 @@ void system_shutdown()
+         Release other subsystems
+      */
+     ci_magic_db_free();
+-    CONF.MAGIC_DB = NULL;
++    C_ICAP_CONF.MAGIC_DB = NULL;
+     ci_txt_template_close();
+ }
+ 
+@@ -933,9 +933,9 @@ int system_reconfigure()
+ 
+      ci_debug_printf(1, "All resources released. Going to reload!\n");
+      ci_txt_template_init();
+-     if (!(CONF.MAGIC_DB = ci_magic_db_load(CONF.magics_file))) {
++     if (!(C_ICAP_CONF.MAGIC_DB = ci_magic_db_load(C_ICAP_CONF.magics_file))) {
+           ci_debug_printf(1, "Can not load magic file %s!!!\n",
+-                          CONF.magics_file);
++                          C_ICAP_CONF.magics_file);
+      }
+      init_modules();
+      init_services();
+@@ -944,15 +944,15 @@ int system_reconfigure()
+         - Freeing all memory and resources used by configuration parameters (is it possible???)
+         - reopen and read config file. Now the monitor process has now the new config parameters.
+       */
+-     old_port = CONF.PORT;
++     old_port = C_ICAP_CONF.PORT;
+      if (!reconfig())
+ 	 return 0;
+ 
+      /*
+         - reinit listen socket if needed
+       */
+-     if (old_port != CONF.PORT) {
+-          init_server(CONF.ADDRESS, CONF.PORT, &(CONF.PROTOCOL_FAMILY));
++     if (old_port != C_ICAP_CONF.PORT) {
++          init_server(C_ICAP_CONF.ADDRESS, C_ICAP_CONF.PORT, &(C_ICAP_CONF.PROTOCOL_FAMILY));
+      }
+ 
+      log_open();
+diff --git a/include/cfg_param.h b/include/cfg_param.h
+index ce7e317..5d844ac 100644
+--- a/include/cfg_param.h
++++ b/include/cfg_param.h
+@@ -126,7 +126,7 @@ struct cfg_default_value{
+ #define ALIAS_TABLE 2
+ 
+ #ifndef CI_BUILD_LIB
+-extern struct ci_server_conf CONF;
++extern struct ci_server_conf C_ICAP_CONF;
+ 
+ struct cfg_default_value * cfg_default_value_store(void *param, void *value,int size);
+ struct cfg_default_value * cfg_default_value_replace(void *param, void *value);
+diff --git a/module.c b/module.c
+index e37035c..593ede9 100644
+--- a/module.c
++++ b/module.c
+@@ -71,7 +71,7 @@ void *load_module(const char *module_file)
+      void *module = NULL;
+      CI_DLIB_HANDLE module_handle;
+ 
+-     module_handle = ci_module_load(module_file, CONF.MODULES_DIR);
++     module_handle = ci_module_load(module_file, C_ICAP_CONF.MODULES_DIR);
+      if (!module_handle)
+           return NULL;
+      module = ci_module_sym(module_handle, "module");
+@@ -146,7 +146,7 @@ static int init_module(void *module, enum module_type type)
+           if (((service_handler_module_t *) module)->init_service_handler)
+                ret =
+                    ((service_handler_module_t *) module)->
+-                   init_service_handler(&CONF);
++                   init_service_handler(&C_ICAP_CONF);
+           if (((service_handler_module_t *) module)->conf_table)
+                register_conf_table(((service_handler_module_t *) module)->name,
+                                    ((service_handler_module_t *) module)->
+@@ -154,7 +154,7 @@ static int init_module(void *module, enum module_type type)
+           break;
+      case LOGGER:
+           if (((logger_module_t *) module)->init_logger)
+-               ret = ((logger_module_t *) module)->init_logger(&CONF);
++               ret = ((logger_module_t *) module)->init_logger(&C_ICAP_CONF);
+           if (((logger_module_t *) module)->conf_table)
+                register_conf_table(((logger_module_t *) module)->name,
+                                    ((logger_module_t *) module)->conf_table,
+@@ -165,7 +165,7 @@ static int init_module(void *module, enum module_type type)
+           if (((access_control_module_t *) module)->init_access_controller)
+                ret =
+                    ((access_control_module_t *) module)->
+-                   init_access_controller(&CONF);
++                   init_access_controller(&C_ICAP_CONF);
+           if (((access_control_module_t *) module)->conf_table)
+                register_conf_table(((access_control_module_t *) module)->name,
+                                    ((access_control_module_t *) module)->
+@@ -173,7 +173,7 @@ static int init_module(void *module, enum module_type type)
+           break;
+      case AUTH_METHOD:
+           if (((http_auth_method_t *) module)->init_auth_method)
+-               ret = ((http_auth_method_t *) module)->init_auth_method(&CONF);
++               ret = ((http_auth_method_t *) module)->init_auth_method(&C_ICAP_CONF);
+           if (((http_auth_method_t *) module)->conf_table)
+                register_conf_table(((http_auth_method_t *) module)->name,
+                                    ((http_auth_method_t *) module)->conf_table,
+@@ -184,7 +184,7 @@ static int init_module(void *module, enum module_type type)
+           if (((authenticator_module_t *) module)->init_authenticator)
+                ret =
+                    ((authenticator_module_t *) module)->
+-                   init_authenticator(&CONF);
++                   init_authenticator(&C_ICAP_CONF);
+           if (((authenticator_module_t *) module)->conf_table)
+                register_conf_table(((authenticator_module_t *) module)->name,
+                                    ((authenticator_module_t *) module)->
+@@ -192,7 +192,7 @@ static int init_module(void *module, enum module_type type)
+           break;
+      case COMMON:
+           if (((common_module_t *) module)->init_module)
+-               ret = ((common_module_t *) module)->init_module(&CONF);
++               ret = ((common_module_t *) module)->init_module(&C_ICAP_CONF);
+           if (((common_module_t *) module)->conf_table)
+                register_conf_table(((common_module_t *) module)->name,
+                                    ((common_module_t *) module)->conf_table,
+@@ -607,7 +607,7 @@ int post_init_modules()
+           if (((common_module_t *) common_modules.modules[i])->
+               post_init_module != NULL)
+                ((common_module_t *) common_modules.modules[i])->
+-                   post_init_module(&CONF);
++                   post_init_module(&C_ICAP_CONF);
+      }     
+ 
+ /*     service_handlers */
+@@ -615,7 +615,7 @@ int post_init_modules()
+           if (((service_handler_module_t *) service_handlers.modules[i])->
+               post_init_service_handler != NULL)
+                ((service_handler_module_t *) service_handlers.modules[i])->
+-                   post_init_service_handler(&CONF);
++                   post_init_service_handler(&C_ICAP_CONF);
+      }
+ 
+ /*     loggers? loggers do not have post init handlers .... */
+@@ -626,7 +626,7 @@ int post_init_modules()
+           if (((access_control_module_t *) access_controllers.modules[i])->
+               post_init_access_controller != NULL)
+                ((access_control_module_t *) access_controllers.modules[i])->
+-                   post_init_access_controller(&CONF);
++                   post_init_access_controller(&C_ICAP_CONF);
+      }
+ 
+ 
+@@ -636,7 +636,7 @@ int post_init_modules()
+           if (((http_auth_method_t *) auth_methods.modules[i])->
+               post_init_auth_method != NULL)
+                ((http_auth_method_t *) auth_methods.modules[i])->
+-                   post_init_auth_method(&CONF);
++                   post_init_auth_method(&C_ICAP_CONF);
+      }
+ 
+ /*     authenticators */
+@@ -644,7 +644,7 @@ int post_init_modules()
+           if (((authenticator_module_t *) authenticators.modules[i])->
+               post_init_authenticator != NULL)
+                ((authenticator_module_t *) authenticators.modules[i])->
+-                   post_init_authenticator(&CONF);
++                   post_init_authenticator(&C_ICAP_CONF);
+      }
+ 
+      return 1;
+@@ -684,7 +684,7 @@ int release_modules()
+           if (((access_control_module_t *) access_controllers.modules[i])->
+               release_access_controller != NULL)
+                ((access_control_module_t *) access_controllers.modules[i])->
+-                   release_access_controller(&CONF);
++                   release_access_controller(&C_ICAP_CONF);
+      }
+      RELEASE_MOD_LIST(access_controllers);
+ 
+@@ -693,7 +693,7 @@ int release_modules()
+           if (((http_auth_method_t *) auth_methods.modules[i])->
+               close_auth_method != NULL)
+                ((http_auth_method_t *) auth_methods.modules[i])->
+-                   close_auth_method(&CONF);
++                   close_auth_method(&C_ICAP_CONF);
+      }
+      RELEASE_MOD_LIST(auth_methods);
+ 
+@@ -702,7 +702,7 @@ int release_modules()
+           if (((authenticator_module_t *) authenticators.modules[i])->
+               close_authenticator != NULL)
+                ((authenticator_module_t *) authenticators.modules[i])->
+-                   close_authenticator(&CONF);
++                   close_authenticator(&C_ICAP_CONF);
+      }
+      RELEASE_MOD_LIST(authenticators);
+ 
+@@ -711,7 +711,7 @@ int release_modules()
+           if (((common_module_t *) common_modules.modules[i])->
+               close_module != NULL)
+                ((common_module_t *) common_modules.modules[i])->
+-                   close_module(&CONF);
++                   close_module(&C_ICAP_CONF);
+      }
+      RELEASE_MOD_LIST(common_modules);
+ 
+diff --git a/mpmt_server.c b/mpmt_server.c
+index f630df1..9c7dda0 100644
+--- a/mpmt_server.c
++++ b/mpmt_server.c
+@@ -50,7 +50,7 @@ extern int MAX_KEEPALIVE_REQUESTS;
+ extern int MAX_SECS_TO_LINGER;
+ extern int MAX_REQUESTS_BEFORE_REALLOCATE_MEM;
+ extern int MAX_REQUESTS_PER_CHILD;
+-extern struct ci_server_conf CONF;
++extern struct ci_server_conf C_ICAP_CONF;
+ 
+ typedef struct server_decl {
+      int srv_id;
+@@ -234,13 +234,13 @@ static void cancel_all_threads()
+      ci_thread_cond_broadcast(&(con_queue->queue_cond));
+      /*wait for a milisecond*/
+      ci_usleep(1000);
+-     servers_running = CONF.THREADS_PER_CHILD;
++     servers_running = C_ICAP_CONF.THREADS_PER_CHILD;
+      while (servers_running && wait_for_workers >= 0) {
+          /*child_data->to_be_killed, may change while we are inside this loop*/
+          if (child_data->to_be_killed == IMMEDIATELY) {
+              CHILD_HALT = 1;
+          }
+-         for (i=0; i<CONF.THREADS_PER_CHILD; i++) {
++         for (i=0; i<C_ICAP_CONF.THREADS_PER_CHILD; i++) {
+              if (threads_list[i] != NULL) { /* if the i thread is still alive*/
+                  if (!threads_list[i]->running) { /*if the i thread is not running any more*/
+                      ci_debug_printf(5, "Cancel server %d, thread_id %lu (%d)\n",
+@@ -259,7 +259,7 @@ static void cancel_all_threads()
+                      }
+                  }
+              }/*the i thread is still alive*/
+-         } /* for(i=0;i< CONF.THREADS_PER_CHILD;i++)*/
++         } /* for(i=0;i< C_ICAP_CONF.THREADS_PER_CHILD;i++)*/
+ 
+          /*wait for 1 second for the next round*/
+          ci_usleep(999999);
+@@ -413,7 +413,7 @@ static int server_reconfigure()
+       */
+      old_childs_queue = childs_queue;
+      childs_queue = malloc(sizeof(struct childs_queue));
+-     if (!create_childs_queue(childs_queue, 2 * CONF.MAX_SERVERS)) {
++     if (!create_childs_queue(childs_queue, 2 * C_ICAP_CONF.MAX_SERVERS)) {
+           ci_debug_printf(1,
+                           "Cannot init shared memory. Fatal error, exiting!\n");
+           return 0;              /*It is not enough. We must wait all childs to exit ..... */
+@@ -421,10 +421,10 @@ static int server_reconfigure()
+      /*
+         Start new childs to handle new requests.
+       */
+-     if (CONF.START_SERVERS > CONF.MAX_SERVERS)
+-          CONF.START_SERVERS = CONF.MAX_SERVERS;
++     if (C_ICAP_CONF.START_SERVERS > C_ICAP_CONF.MAX_SERVERS)
++          C_ICAP_CONF.START_SERVERS = C_ICAP_CONF.MAX_SERVERS;
+ 
+-     for (i = 0; i < CONF.START_SERVERS; i++) {
++     for (i = 0; i < C_ICAP_CONF.START_SERVERS; i++) {
+           start_child(LISTEN_SOCKET);
+      }
+ 
+@@ -856,11 +856,11 @@ void child_main(int sockfd, int pipefd)
+      ci_stat_attach_mem(child_data->stats, child_data->stats_size, NULL);
+ 
+      threads_list =
+-         (server_decl_t **) malloc((CONF.THREADS_PER_CHILD + 1) *
++         (server_decl_t **) malloc((C_ICAP_CONF.THREADS_PER_CHILD + 1) *
+                                    sizeof(server_decl_t *));
+-     con_queue = init_queue(CONF.THREADS_PER_CHILD);
++     con_queue = init_queue(C_ICAP_CONF.THREADS_PER_CHILD);
+ 
+-     for (i = 0; i < CONF.THREADS_PER_CHILD; i++) {
++     for (i = 0; i < C_ICAP_CONF.THREADS_PER_CHILD; i++) {
+           if ((threads_list[i] = newthread(con_queue)) == NULL) {
+                exit(-1);        // FATAL error.....
+           }
+@@ -869,7 +869,7 @@ void child_main(int sockfd, int pipefd)
+                                (void *) threads_list[i]);
+           threads_list[i]->srv_pthread = thread;
+      }
+-     threads_list[CONF.THREADS_PER_CHILD] = NULL;
++     threads_list[C_ICAP_CONF.THREADS_PER_CHILD] = NULL;
+      /*Now start the listener thread.... */
+      ret = ci_thread_create(&thread, (void *(*)(void *)) listener_thread,
+                             (void *) &sockfd);
+@@ -962,7 +962,7 @@ int start_child(int fd)
+           MY_PROC_PID = getpid();
+           attach_childs_queue(childs_queue);
+           child_data =
+-              register_child(childs_queue, getpid(), CONF.THREADS_PER_CHILD, pfd[1]);
++              register_child(childs_queue, getpid(), C_ICAP_CONF.THREADS_PER_CHILD, pfd[1]);
+           close(pfd[1]);
+           child_main(fd, pfd[0]);
+           exit(0);
+@@ -1031,11 +1031,11 @@ int start_server()
+      char command_buffer[COMMANDS_BUFFER_SIZE];
+      int user_informed = 0;
+ 
+-     ctl_socket = ci_named_pipe_create(CONF.COMMANDS_SOCKET);
++     ctl_socket = ci_named_pipe_create(C_ICAP_CONF.COMMANDS_SOCKET);
+      if (ctl_socket < 0) {
+           ci_debug_printf(1,
+                           "Error opening control socket %s. Fatal error, exiting!\n",
+-                          CONF.COMMANDS_SOCKET);
++                          C_ICAP_CONF.COMMANDS_SOCKET);
+           exit(0);
+      }
+ 
+@@ -1045,7 +1045,7 @@ int start_server()
+           exit(0);
+      }
+      childs_queue = malloc(sizeof(struct childs_queue));
+-     if (!create_childs_queue(childs_queue, 2 * CONF.MAX_SERVERS)) {
++     if (!create_childs_queue(childs_queue, 2 * C_ICAP_CONF.MAX_SERVERS)) {
+           ci_proc_mutex_destroy(&accept_mutex);
+           ci_debug_printf(1,
+                           "Can't init shared memory. Fatal error, exiting!\n");
+@@ -1055,10 +1055,10 @@ int start_server()
+      init_commands();
+      pid = 1;
+ #ifdef MULTICHILD
+-     if (CONF.START_SERVERS > CONF.MAX_SERVERS)
+-          CONF.START_SERVERS = CONF.MAX_SERVERS;
++     if (C_ICAP_CONF.START_SERVERS > C_ICAP_CONF.MAX_SERVERS)
++          C_ICAP_CONF.START_SERVERS = C_ICAP_CONF.MAX_SERVERS;
+ 
+-     for (i = 0; i < CONF.START_SERVERS; i++) {
++     for (i = 0; i < C_ICAP_CONF.START_SERVERS; i++) {
+           if (pid)
+                pid = start_child(LISTEN_SOCKET);
+      }
+@@ -1073,7 +1073,7 @@ int start_server()
+                }
+                if (ret < 0) {  /*Eof received on pipe. Going to reopen ... */
+                     ci_named_pipe_close(ctl_socket);
+-                    ctl_socket = ci_named_pipe_open(CONF.COMMANDS_SOCKET);
++                    ctl_socket = ci_named_pipe_open(C_ICAP_CONF.COMMANDS_SOCKET);
+                     if (ctl_socket < 0) {
+                          ci_debug_printf(1,
+                                          "Error opening control socket. We are unstable and going down!");
+@@ -1105,16 +1105,16 @@ int start_server()
+                     kill(childs_queue->childs[child_indx].pid, SIGTERM);
+ 
+                }
+-               else if ((freeservers <= CONF.MIN_SPARE_THREADS && childs < CONF.MAX_SERVERS)
+-                        || childs < CONF.START_SERVERS) {
++               else if ((freeservers <= C_ICAP_CONF.MIN_SPARE_THREADS && childs < C_ICAP_CONF.MAX_SERVERS)
++                        || childs < C_ICAP_CONF.START_SERVERS) {
+                     ci_debug_printf(8,
+                                     "Free Servers: %d, children: %d. Going to start a child .....\n",
+                                     freeservers, childs);
+                     pid = start_child(LISTEN_SOCKET);
+                }
+-               else if (freeservers >= CONF.MAX_SPARE_THREADS &&
+-                        childs > CONF.START_SERVERS &&
+-                        (freeservers - CONF.THREADS_PER_CHILD) > CONF.MIN_SPARE_THREADS) {
++               else if (freeservers >= C_ICAP_CONF.MAX_SPARE_THREADS &&
++                        childs > C_ICAP_CONF.START_SERVERS &&
++                        (freeservers - C_ICAP_CONF.THREADS_PER_CHILD) > C_ICAP_CONF.MIN_SPARE_THREADS) {
+ 
+                     if ((child_indx = find_an_idle_child(childs_queue)) >= 0) {
+                          childs_queue->childs[child_indx].father_said =
+@@ -1129,7 +1129,7 @@ int start_server()
+ 			 user_informed = 0;
+                     }
+                }
+-               else if (childs == CONF.MAX_SERVERS && freeservers < CONF.MIN_SPARE_THREADS) {
++               else if (childs == C_ICAP_CONF.MAX_SERVERS && freeservers < C_ICAP_CONF.MIN_SPARE_THREADS) {
+ 		 if(! user_informed) {
+ 		         ci_debug_printf(1,
+ 					 "ATTENTION!!!! Not enough available servers (children %d, free servers %d, used servers %d)!!!!! "
+@@ -1160,7 +1160,7 @@ int start_server()
+ #else
+      child_data = (child_shared_data_t *) malloc(sizeof(child_shared_data_t));
+      child_data->pid = 0;
+-     child_data->freeservers = CONF.THREADS_PER_CHILD;
++     child_data->freeservers = C_ICAP_CONF.THREADS_PER_CHILD;
+      child_data->usedservers = 0;
+      child_data->requests = 0;
+      child_data->connections = 0;
+diff --git a/service.c b/service.c
+index f837ac6..57dbda7 100644
+--- a/service.c
++++ b/service.c
+@@ -368,7 +368,7 @@ ci_service_module_t *add_service(ci_service_module_t *service)
+      xdata = &service_extra_data_list[services_num];
+      init_extra_data(xdata, service->mod_name);
+      if (service->mod_init_service) {
+-          ret = service->mod_init_service(xdata, &CONF);
++          ret = service->mod_init_service(xdata, &C_ICAP_CONF);
+           if (ret != CI_OK)
+                xdata->status = CI_SERVICE_ERROR;
+           else
+@@ -449,7 +449,7 @@ int post_init_services()
+                xdata = &service_extra_data_list[i];
+                if ( xdata->status == CI_SERVICE_OK) {
+                     ret = service_list[i]->
+-                        mod_post_init_service(xdata, &CONF);
++                        mod_post_init_service(xdata, &C_ICAP_CONF);
+                     if (ret != CI_OK)
+                         xdata->status = CI_SERVICE_ERROR;
+                }
+@@ -608,7 +608,7 @@ ci_service_module_t *load_c_service(const char *service_file)
+      ci_service_module_t *service = NULL;
+      CI_DLIB_HANDLE service_handle;
+ 
+-     service_handle = ci_module_load(service_file, CONF.SERVICES_DIR);
++     service_handle = ci_module_load(service_file, C_ICAP_CONF.SERVICES_DIR);
+      if (!service_handle)
+           return NULL;
+      service = ci_module_sym(service_handle, "service");
+diff --git a/winnt_server.c b/winnt_server.c
+index fcb60c8..75e4255 100644
+--- a/winnt_server.c
++++ b/winnt_server.c
+@@ -62,7 +62,7 @@ TCHAR *C_ICAP_CMD = TEXT("c-icap.exe -c");
+ extern int KEEPALIVE_TIMEOUT;
+ extern int MAX_SECS_TO_LINGER;
+ extern int MAX_REQUESTS_BEFORE_REALLOCATE_MEM;
+-extern struct ci_server_conf CONF;
++extern struct ci_server_conf C_ICAP_CONF;
+ ci_socket LISTEN_SOCKET;
+ 
+ #define hard_close_connection(connection)  ci_hard_close(connection->fd)
+@@ -340,11 +340,11 @@ void child_main(ci_socket sockfd)
+ 
+ 
+      threads_list =
+-         (server_decl_t **) malloc((CONF.THREADS_PER_CHILD + 1) *
++         (server_decl_t **) malloc((C_ICAP_CONF.THREADS_PER_CHILD + 1) *
+                                    sizeof(server_decl_t *));
+-     con_queue = init_queue(CONF.THREADS_PER_CHILD);
++     con_queue = init_queue(C_ICAP_CONF.THREADS_PER_CHILD);
+ 
+-     for (i = 0; i < CONF.THREADS_PER_CHILD; i++) {
++     for (i = 0; i < C_ICAP_CONF.THREADS_PER_CHILD; i++) {
+           if ((threads_list[i] = newthread(con_queue)) == NULL) {
+                exit(-1);        // FATAL error.....
+           }
+@@ -352,7 +352,7 @@ void child_main(ci_socket sockfd)
+                                      (void *(*)(void *)) thread_main,
+                                      (void *) threads_list[i]);
+      }
+-     threads_list[CONF.THREADS_PER_CHILD] = NULL;
++     threads_list[C_ICAP_CONF.THREADS_PER_CHILD] = NULL;
+      ci_debug_printf(1, "Threads created ....\n");
+      retcode = ci_thread_create(&worker_thread,
+                                 (void *(*)(void *)) worker_main,
+@@ -614,7 +614,7 @@ int do_child()
+      }
+      ci_debug_printf(1, "Shared memory attached....\n");
+      child_data =
+-         register_child(&childs_queue, child_handle, CONF.THREADS_PER_CHILD,
++         register_child(&childs_queue, child_handle, C_ICAP_CONF.THREADS_PER_CHILD,
+                         parent_pipe);
+      ci_debug_printf(1, "child registered ....\n");
+ 
+@@ -751,14 +751,14 @@ int start_server()
+      ci_proc_mutex_init(&accept_mutex);
+      ci_thread_mutex_init(&control_process_mtx);
+ 
+-     if (!create_childs_queue(&childs_queue, CONF.MAX_SERVERS)) {
++     if (!create_childs_queue(&childs_queue, C_ICAP_CONF.MAX_SERVERS)) {
+           log_server(NULL, "Can't init shared memory.Fatal error, exiting!\n");
+           ci_debug_printf(1,
+                           "Can't init shared memory.Fatal error, exiting!\n");
+           exit(0);
+      }
+ 
+-     for (i = 0; i < CONF.START_SERVERS + 2; i++) {
++     for (i = 0; i < C_ICAP_CONF.START_SERVERS + 2; i++) {
+           child_handle = start_child(LISTEN_SOCKET);
+      }
+ 
+@@ -777,12 +777,12 @@ int start_server()
+                           "Server stats: \n\t Children:%d\n\t Free servers:%d\n\tUsed servers:%d\n\tRequests served:%d\n",
+                           childs, freeservers, used, maxrequests);
+ 
+-          if ((freeservers <= CONF.MIN_SPARE_THREADS && childs < CONF.MAX_SERVERS)
+-              || childs < CONF.START_SERVERS) {
++          if ((freeservers <= C_ICAP_CONF.MIN_SPARE_THREADS && childs < C_ICAP_CONF.MAX_SERVERS)
++              || childs < C_ICAP_CONF.START_SERVERS) {
+                ci_debug_printf(1, "Going to start a child .....\n");
+                child_handle = start_child(LISTEN_SOCKET);
+           }
+-          else if (freeservers >= CONF.MAX_SPARE_THREADS && childs > CONF.START_SERVERS) {
++          else if (freeservers >= C_ICAP_CONF.MAX_SPARE_THREADS && childs > C_ICAP_CONF.START_SERVERS) {
+                ci_thread_mutex_lock(&control_process_mtx);
+                if ((child_indx = find_an_idle_child(&childs_queue)) < 0)
+                     continue;
+@@ -794,7 +794,7 @@ int start_server()
+           }
+      }
+ /*
+-     for(i=0;i<CONF.START_SERVERS;i++){
++     for(i=0;i<C_ICAP_CONF.START_SERVERS;i++){
+ 	  pid=wait(&status);
+ 	  ci_debug_printf(1,"The child %d died with status %d\n",pid,status);
+      }
+@@ -804,7 +804,7 @@ int start_server()
+ #else
+      child_data = (child_shared_data_t *) malloc(sizeof(child_shared_data_t));
+      child_data->pid = 0;
+-     child_data->freeservers = CONF.THREADS_PER_CHILD;
++     child_data->freeservers = C_ICAP_CONF.THREADS_PER_CHILD;
+      child_data->usedservers = 0;
+      child_data->requests = 0;
+      child_data->connections = 0;
diff --git a/debian/patches/series b/debian/patches/series
index c9ea902..99b4b59 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-fix-config-prefix.patch
 0004-man-page-fixes.patch
 0008-Fix-ModulesDir-and-ServicesDir-on-MultiArch.patch
+0010-Rename-CONF-to-C_ICAP_CONF.patch

--- End Message ---
--- Begin Message ---
 Wed, 2014-11-12 at 20:28 +0100, Mathieu Parent wrote:
> Please unblock package c-icap
> 
> This fixes a FTBFS of c-icap-modules (#768684)

Unblocked.

Regards,

Adam

--- End Message ---

Reply to: