pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/c-icap Don't conflict with OpenSSL's CONF type. Bu...
details: https://anonhg.NetBSD.org/pkgsrc/rev/bee52a3771e6
branches: trunk
changeset: 652451:bee52a3771e6
user: joerg <joerg%pkgsrc.org@localhost>
date: Tue Jun 02 20:02:45 2015 +0000
description:
Don't conflict with OpenSSL's CONF type. Bump revision.
diffstat:
www/c-icap/Makefile | 4 +-
www/c-icap/distinfo | 8 +-
www/c-icap/patches/patch-aserver.c | 48 +++++++
www/c-icap/patches/patch-cfg__param.c | 175 ++++++++++++++++++++++++++
www/c-icap/patches/patch-include_cfg__param.h | 13 +
www/c-icap/patches/patch-module.c | 148 +++++++++++++++++++++
www/c-icap/patches/patch-mpmt__server.c | 36 +++++
www/c-icap/patches/patch-service.c | 31 ++++
8 files changed, 460 insertions(+), 3 deletions(-)
diffs (truncated from 510 to 300 lines):
diff -r 1a39e66c1f24 -r bee52a3771e6 www/c-icap/Makefile
--- a/www/c-icap/Makefile Tue Jun 02 19:06:40 2015 +0000
+++ b/www/c-icap/Makefile Tue Jun 02 20:02:45 2015 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.13 2014/10/15 22:10:33 joerg Exp $
+# $NetBSD: Makefile,v 1.14 2015/06/02 20:02:45 joerg Exp $
DISTNAME= c_icap-0.2.5
PKGNAME= ${DISTNAME:S/_/-/}
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=c-icap/}
diff -r 1a39e66c1f24 -r bee52a3771e6 www/c-icap/distinfo
--- a/www/c-icap/distinfo Tue Jun 02 19:06:40 2015 +0000
+++ b/www/c-icap/distinfo Tue Jun 02 20:02:45 2015 +0000
@@ -1,10 +1,16 @@
-$NetBSD: distinfo,v 1.5 2014/10/15 22:10:21 joerg Exp $
+$NetBSD: distinfo,v 1.6 2015/06/02 20:02:45 joerg Exp $
SHA1 (c_icap-0.2.5.tar.gz) = 986f0906780c0d0ad13a40add1e3f4bf7fabf8d5
RMD160 (c_icap-0.2.5.tar.gz) = a9515e36927dcf008d187e079f6bd535b7e8b6bd
Size (c_icap-0.2.5.tar.gz) = 582223 bytes
SHA1 (patch-Makefile.in) = 1e24956dee6d124c4f1e06d4bc6187ca0c2be52b
+SHA1 (patch-aserver.c) = cc6075128968acc2d40adb181d3241010e370258
+SHA1 (patch-cfg__param.c) = 572e8bf53b5d8433c07dddd69e9d03a636feb3e5
SHA1 (patch-configure) = 007831090cdf9b2d6c269793b38f8e65f44dc765
SHA1 (patch-configure.in) = 5a8ad3240425f7c1ff4dec8c3617e00d8665c62a
SHA1 (patch-include_c-icap-conf.h.in) = b7b7e64f561062eeafc9eb88abf95d266cdb0782
+SHA1 (patch-include_cfg__param.h) = 63891cde4ebdcc863e51b37aeb8b98236e1083ea
SHA1 (patch-include_util.h) = 1e041fa22a540fbf477cf6fb628458130977724a
+SHA1 (patch-module.c) = 023475ba2f04044c42eb6360aa15d84d8bcba24a
+SHA1 (patch-mpmt__server.c) = 1b3f942bf6e0b86e3133c9cc1339ae2b013af47f
+SHA1 (patch-service.c) = 3b84d07b91259d1617bd0c23215a7b3d6ba444b5
diff -r 1a39e66c1f24 -r bee52a3771e6 www/c-icap/patches/patch-aserver.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/c-icap/patches/patch-aserver.c Tue Jun 02 20:02:45 2015 +0000
@@ -0,0 +1,48 @@
+$NetBSD: patch-aserver.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
+
+--- aserver.c.orig 2015-05-28 20:06:22.000000000 +0000
++++ aserver.c
+@@ -105,9 +105,9 @@ int main(int argc, char **argv)
+ ci_txt_template_init();
+ ci_txt_template_set_dir(DATADIR"templates");
+
+- if (!(CONF.MAGIC_DB = ci_magic_db_load(CONF.magics_file))) {
++ if (!(ci_CONF.MAGIC_DB = ci_magic_db_load(ci_CONF.magics_file))) {
+ ci_debug_printf(1, "Can not load magic file %s!!!\n",
+- CONF.magics_file);
++ ci_CONF.magics_file);
+ }
+ init_conf_tables();
+ request_stats_init();
+@@ -118,26 +118,26 @@ int main(int argc, char **argv)
+ ci_debug_printf(2, "My hostname is:%s\n", MY_HOSTNAME);
+
+ #if ! defined(_WIN32)
+- if (is_icap_running(CONF.PIDFILE)) {
++ if (is_icap_running(ci_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(ci_CONF.RUN_USER, ci_CONF.RUN_GROUP))
+ exit(-1);
+- store_pid(CONF.PIDFILE);
++ store_pid(ci_CONF.PIDFILE);
+ #endif
+
+ if (!log_open()) {
+ ci_debug_printf(1, "Can not init loggers. Exiting.....\n");
+ exit(-1);
+ }
+- if (!init_server(CONF.ADDRESS, CONF.PORT, &(CONF.PROTOCOL_FAMILY)))
++ if (!init_server(ci_CONF.ADDRESS, ci_CONF.PORT, &(ci_CONF.PROTOCOL_FAMILY)))
+ return -1;
+ post_init_modules();
+ post_init_services();
+ start_server();
+- clear_pid(CONF.PIDFILE);
++ clear_pid(ci_CONF.PIDFILE);
+ return 0;
+ }
diff -r 1a39e66c1f24 -r bee52a3771e6 www/c-icap/patches/patch-cfg__param.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/c-icap/patches/patch-cfg__param.c Tue Jun 02 20:02:45 2015 +0000
@@ -0,0 +1,175 @@
+$NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
+
+--- cfg_param.c.orig 2015-05-28 20:06:20.000000000 +0000
++++ cfg_param.c
+@@ -38,7 +38,7 @@
+ int ARGC;
+ char **ARGV;
+
+-struct ci_server_conf CONF = {
++struct ci_server_conf ci_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; */
+@@ -129,9 +129,9 @@ 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", &ci_CONF.ADDRESS, intl_cfg_set_str, NULL},
++ {"PidFile", &ci_CONF.PIDFILE, intl_cfg_set_str, NULL},
++ {"CommandsSocket", &ci_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},
+@@ -144,19 +144,19 @@ static struct ci_conf_entry conf_variabl
+ {"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", &ci_CONF.PORT, intl_cfg_set_int, NULL},
++ {"User", &ci_CONF.RUN_USER, intl_cfg_set_str, NULL},
++ {"Group", &ci_CONF.RUN_GROUP, intl_cfg_set_str, NULL},
++ {"ServerAdmin", &ci_CONF.SERVER_ADMIN, intl_cfg_set_str, NULL},
++ {"ServerName", &ci_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", &ci_CONF.SERVICES_DIR, intl_cfg_set_str, NULL},
++ {"ModulesDir", &ci_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},
+@@ -443,7 +443,7 @@ int cfg_load_magicfile(const char *direc
+ }
+
+ db_file = argv[0];
+- if (strcmp(CONF.magics_file, db_file) == 0) {
++ if (strcmp(ci_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;
+ }
+@@ -453,8 +453,8 @@ int cfg_load_magicfile(const char *direc
+ ci_debug_printf(1, "Can not load magic file %s!!!\n", db_file);
+ return 0;
+ }
+- if (!CONF.MAGIC_DB)
+- CONF.MAGIC_DB = ndb;
++ if (!ci_CONF.MAGIC_DB)
++ ci_CONF.MAGIC_DB = ndb;
+
+ return 1;
+ }
+@@ -509,24 +509,24 @@ int cfg_set_tmp_dir(const char *directiv
+ return 0;
+ }
+
+- cfg_default_value_store(&CONF.TMPDIR, &CONF.TMPDIR, sizeof(char *));
++ cfg_default_value_store(&ci_CONF.TMPDIR, &ci_CONF.TMPDIR, sizeof(char *));
+ len = strlen(argv[0]);
+
+- CONF.TMPDIR = ci_cfg_alloc_mem((len + 2) * sizeof(char));
+- strcpy(CONF.TMPDIR, argv[0]);
++ ci_CONF.TMPDIR = ci_cfg_alloc_mem((len + 2) * sizeof(char));
++ strcpy(ci_CONF.TMPDIR, argv[0]);
+ #ifdef _WIN32
+- if (CONF.TMPDIR[len] != '\\') {
+- CONF.TMPDIR[len] = '\\';
+- CONF.TMPDIR[len + 1] = '\0';
++ if (ci_CONF.TMPDIR[len] != '\\') {
++ ci_CONF.TMPDIR[len] = '\\';
++ ci_CONF.TMPDIR[len + 1] = '\0';
+ }
+ #else
+- if (CONF.TMPDIR[len] != '/') {
+- CONF.TMPDIR[len] = '/';
+- CONF.TMPDIR[len + 1] = '\0';
++ if (ci_CONF.TMPDIR[len] != '/') {
++ ci_CONF.TMPDIR[len] = '/';
++ ci_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 = ci_CONF.TMPDIR; /*Sets the library's temporary dir to .... */
+ ci_debug_printf(2, "Setting parameter :%s=%s\n", directive, argv[0]);
+ return 1;
+ }
+@@ -814,7 +814,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", &ci_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,
+@@ -836,7 +836,7 @@ int config(int argc, char **argv)
+ ci_args_usage(argv[0], options);
+ exit(-1);
+ }
+- if (!parse_file(CONF.cfg_file)) {
++ if (!parse_file(ci_CONF.cfg_file)) {
+ ci_debug_printf(1, "Error opening/parsing config file\n");
+ exit(0);
+ }
+@@ -855,7 +855,7 @@ int reconfig()
+ "Error in command line options, while reconfiguring!\n");
+ return 0;
+ }
+- if (!parse_file(CONF.cfg_file)) {
++ if (!parse_file(ci_CONF.cfg_file)) {
+ ci_debug_printf(1,
+ "Error opening/parsing config file, while reconfiguring!\n");
+ return 0;
+@@ -890,7 +890,7 @@ void system_shutdown()
+ Release other subsystems
+ */
+ ci_magic_db_free();
+- CONF.MAGIC_DB = NULL;
++ ci_CONF.MAGIC_DB = NULL;
+ ci_txt_template_close();
+ }
+
+@@ -906,9 +906,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 (!(ci_CONF.MAGIC_DB = ci_magic_db_load(ci_CONF.magics_file))) {
+ ci_debug_printf(1, "Can not load magic file %s!!!\n",
+- CONF.magics_file);
++ ci_CONF.magics_file);
+ }
+ init_modules();
+ init_services();
+@@ -917,15 +917,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 = ci_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 != ci_CONF.PORT) {
++ init_server(ci_CONF.ADDRESS, ci_CONF.PORT, &(ci_CONF.PROTOCOL_FAMILY));
+ }
+
+ log_open();
diff -r 1a39e66c1f24 -r bee52a3771e6 www/c-icap/patches/patch-include_cfg__param.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/c-icap/patches/patch-include_cfg__param.h Tue Jun 02 20:02:45 2015 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-include_cfg__param.h,v 1.1 2015/06/02 20:02:45 joerg Exp $
+
+--- include/cfg_param.h.orig 2015-05-28 20:05:29.000000000 +0000
++++ include/cfg_param.h
+@@ -121,7 +121,7 @@ struct cfg_default_value{
+ #define ALIAS_TABLE 2
+
+ #ifndef CI_BUILD_LIB
+-extern struct ci_server_conf CONF;
++extern struct ci_server_conf ci_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 -r 1a39e66c1f24 -r bee52a3771e6 www/c-icap/patches/patch-module.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/c-icap/patches/patch-module.c Tue Jun 02 20:02:45 2015 +0000
@@ -0,0 +1,148 @@
+$NetBSD: patch-module.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
+
+--- module.c.orig 2015-05-28 20:06:17.000000000 +0000
++++ module.c
+@@ -71,7 +71,7 @@ void *load_module(const char *module_fil
+ 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, ci_CONF.MODULES_DIR);
+ if (!module_handle)
+ return NULL;
+ module = ci_module_sym(module_handle, "module");
Home |
Main Index |
Thread Index |
Old Index