diff --git a/www/c-icap/Makefile b/www/c-icap/Makefile index c1d2881aeb5e..35564e152e85 100644 --- a/www/c-icap/Makefile +++ b/www/c-icap/Makefile @@ -1,92 +1,89 @@ PORTNAME= c-icap PORTVERSION= 0.5.10 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= www MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/0.5.x/ DISTNAME= c_icap-${PORTVERSION} MAINTAINER= rodrigo@FreeBSD.org COMMENT= ICAP server implementation WWW= http://c-icap.sourceforge.net/ LICENSE= LGPL21+ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libbrotlicommon.so:archivers/brotli \ libpcre.so:devel/pcre USES= cpe libtool localbase GNU_CONFIGURE= yes CONFIGURE_ARGS= --sysconfdir="${PREFIX}/etc/c-icap" \ --localstatedir=/var INSTALL_TARGET= install-strip CPE_VENDOR= c-icap_project USE_LDCONFIG= yes USE_RC_SUBR= c-icap USERS= ${CICAP_USER} GROUPS= ${CICAP_GROUP} CICAP_USER= c_icap CICAP_UID= 959 CICAP_GROUP= c_icap CICAP_GID= 959 LOG_DIR= /var/log/c-icap RUN_DIR= /var/run/c-icap PLIST_SUB= LOG_DIR=${LOG_DIR} RUN_DIR=${RUN_DIR} \ CICAP_USER=${CICAP_USER} CICAP_GROUP=${CICAP_GROUP} SUB_LIST= RUN_DIR=${RUN_DIR} CICAP_USER=${CICAP_USER} OPTIONS_DEFINE= BDB IPV6 LDAP PERL POSIXSEM LARGE_FILES MEMCACHE OPTIONS_SUB= yes LARGE_FILES_DESC= Enable large files support POSIXSEM_DESC= Use POSIX Semaphores instead of SYSV IPC MEMCACHE_DESC= Enable memcached IPV6_CONFIGURE_ENABLE= ipv6 LARGE_FILES_CONFIGURE_ENABLE= large-files MEMCACHE_CONFIGURE_WITH= memcached MEMCACHE_LIB_DEPENDS= libmemcached.so:databases/libmemcached LDAP_USES= ldap LDAP_CONFIGURE_ON= --with-ldap=yes LDAP_CONFIGURE_OFF= --with-ldap=no PERL_USES= perl5 PERL_CONFIGURE_ON= --with-perl=${PERL} PERL_CONFIGURE_OFF= --without-perl BDB_USES= bdb BDB_CFLAGS= -I${BDB_INCLUDE_DIR} BDB_LDFLAGS= -L${BDB_LIB_DIR} BDB_CONFIGURE_ON= --with-bdb=yes BDB_CONFIGURE_OFF= --with-bdb=no .include -.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400079 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 )) -CFLAGS+= -Wno-error=int-conversion -.endif - post-patch: @${REINPLACE_CMD} \ -e 's|@prefix@/var/log|/var/log/c-icap|g' \ -e 's|@prefix@/etc/|@sysconfdir@/|g' \ ${WRKSRC}/c-icap.conf.in @${REINPLACE_CMD} \ -e 's|\.default|.sample|g' \ ${WRKSRC}/Makefile.am ${WRKSRC}/Makefile.in post-patch-POSIXSEM-on: @${REINPLACE_CMD} \ -e 's|@SYSV_IPC@|0|g' \ ${WRKSRC}/include/c-icap-conf.h.in post-install: @${MKDIR} ${STAGEDIR}/${LOG_DIR} ${STAGEDIR}/${RUN_DIR} .include diff --git a/www/c-icap/files/patch-c-icap.conf.in b/www/c-icap/files/patch-c-icap.conf.in index 1e795e66ecac..62449a4eeecc 100644 --- a/www/c-icap/files/patch-c-icap.conf.in +++ b/www/c-icap/files/patch-c-icap.conf.in @@ -1,11 +1,36 @@ ---- c-icap.conf.in.orig 2018-09-12 13:40:37 UTC +--- c-icap.conf.in.orig 2020-09-14 14:17:26 UTC +++ c-icap.conf.in @@ -132,7 +132,7 @@ MaxRequestsPerChild 0 # Port [::1]:1346 # Default: # None -Port 1344 +Port 127.0.0.1:1344 # TAG: TlsPort # Format: TlsPort [address:]port [tls-method=method] [cert=path_to_pem_cert] [key=path_to_pem_key] [client_ca=path_to_pem_file] [ciphers=ciph1:ciph2...] [tls_options=[!]Opt1|[!]Opt2|...] +@@ -602,8 +602,8 @@ RemoteProxyUserHeaderEncoded on + # store debugging information, errors and other + # information about the c-icap server. + # Default: +-# ServerLog @prefix@/var/log/server.log +-ServerLog @prefix@/var/log/server.log ++# ServerLog /var/log/c-icap/server.log ++ServerLog /var/log/c-icap/server.log + + # TAG: AccessLog + # Format: AccessLog LogFile [LogFormat] [[!]acl1] [[!]acl2] [...] +@@ -615,10 +615,10 @@ ServerLog @prefix@/var/log/server.log + # This directive can be used more than once to specify more than + # one access log files + # Default: +-# AccessLog @prefix@/var/log/access.log ++# AccessLog /var/log/c-icap/access.log + # Example: +-# AccessLog @prefix@/var/log/access.log MyFormat all +-AccessLog @prefix@/var/log/access.log ++# AccessLog /var/log/c-icap/access.log MyFormat all ++AccessLog /var/log/c-icap/access.log + + # TAG: Logger + # Format: Logger LoggerName diff --git a/www/c-icap/files/patch-commands.c b/www/c-icap/files/patch-commands.c new file mode 100644 index 000000000000..0eab874c4135 --- /dev/null +++ b/www/c-icap/files/patch-commands.c @@ -0,0 +1,11 @@ +--- commands.c.orig 2021-09-14 10:21:46 UTC ++++ commands.c +@@ -233,7 +233,7 @@ void ci_command_schedule_on(const char *name, void *da + sch.when = time; + sch.data = data; + if (ci_list_search(COMMANDS_QUEUE, &sch)) { +- ci_debug_printf(7, "command %s already scheduled for execution on %ld, ignore\n", name, time); ++ ci_debug_printf(7, "command %s already scheduled for execution on %" PRId64 ", ignore\n", name, (uint64_t)time); + return; + } + ci_thread_mutex_lock(&COMMANDS_MTX); diff --git a/www/c-icap/files/patch-mpmt__server.c b/www/c-icap/files/patch-mpmt__server.c new file mode 100644 index 000000000000..856677fbfe85 --- /dev/null +++ b/www/c-icap/files/patch-mpmt__server.c @@ -0,0 +1,15 @@ +Invalid integer/pointer conversion. Already fixed upstream: +https://github.com/c-icap/c-icap-server/commit/8ef8966237865ec699ab16d208ff56edaac4ff7b + +Index: mpmt_server.c +--- mpmt_server.c.orig 2021-09-02 14:45:30 UTC ++++ mpmt_server.c +@@ -75,7 +75,7 @@ server_decl_t **threads_list = NULL; + + ci_thread_mutex_t threads_list_mtx; + server_decl_t **threads_list = NULL; +-ci_thread_t listener_thread_id = -1; ++ci_thread_t listener_thread_id; + int listener_running = 0; + + ci_thread_cond_t free_server_cond; diff --git a/www/c-icap/files/patch-txt__format.c b/www/c-icap/files/patch-txt__format.c new file mode 100644 index 000000000000..50e1c92d9569 --- /dev/null +++ b/www/c-icap/files/patch-txt__format.c @@ -0,0 +1,11 @@ +--- txt_format.c.orig 2018-11-09 09:42:02 UTC ++++ txt_format.c +@@ -417,7 +417,7 @@ int fmt_seconds(ci_request_t *req, char *buf,int len, + { + time_t tm; + time(&tm); +- return snprintf(buf, len, "%ld", tm); ++ return snprintf(buf, len, "%" PRId64 , (uint64_t) tm); + } + + int fmt_httpclientip(ci_request_t *req, char *buf,int len, const char *param)