summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-proxy/c-icap
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-proxy/c-icap')
-rw-r--r--net-proxy/c-icap/Manifest1
-rw-r--r--net-proxy/c-icap/c-icap-0.2.6.ebuild113
-rw-r--r--net-proxy/c-icap/files/c-icap-0.1.3+db-5.0.patch13
-rw-r--r--net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch72
-rw-r--r--net-proxy/c-icap/files/c-icap-0.1.6-implicit.patch12
-rw-r--r--net-proxy/c-icap/files/c-icap-0.2.2-asneeded.patch27
-rw-r--r--net-proxy/c-icap/files/c-icap-0.2.6-fix-icap-parsing.patch11
-rw-r--r--net-proxy/c-icap/files/c-icap.conf13
-rw-r--r--net-proxy/c-icap/files/c-icap.init.219
-rw-r--r--net-proxy/c-icap/files/c-icap.init.327
-rw-r--r--net-proxy/c-icap/files/c-icap.logrotate13
-rw-r--r--net-proxy/c-icap/metadata.xml11
12 files changed, 332 insertions, 0 deletions
diff --git a/net-proxy/c-icap/Manifest b/net-proxy/c-icap/Manifest
new file mode 100644
index 000000000000..e7c36ddd237c
--- /dev/null
+++ b/net-proxy/c-icap/Manifest
@@ -0,0 +1 @@
+DIST c_icap-0.2.6.tar.gz 581856 SHA256 e5caf8d53975fbffdd50f99ebf7bf88067c842609ab69e08b4337961ac46482a SHA512 3b1fe1f89581ec4649f74771f4a33a08637428f6cf81a9228f5d08405207c3495e6dadd590254dd6804ccbb7c34af1fc62973563c6156c4249941a599a072a40 WHIRLPOOL 8dd8a999e8863f3873629b0e0dc72e7a4109d37531bf2752d587b4c4df128dba6280b0d9226e3e4edffc615cca6cb6795cc62c9fe2b75ba7adbbcc2f108935ea
diff --git a/net-proxy/c-icap/c-icap-0.2.6.ebuild b/net-proxy/c-icap/c-icap-0.2.6.ebuild
new file mode 100644
index 000000000000..d78e107ea3d9
--- /dev/null
+++ b/net-proxy/c-icap/c-icap-0.2.6.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils multilib flag-o-matic
+
+MY_PN="${PN/-/_}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="C Implementation of an ICAP server"
+HOMEPAGE="http://c-icap.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="berkdb ipv6 ldap"
+
+RDEPEND="berkdb? ( sys-libs/db )
+ ldap? ( net-nds/openldap )
+ sys-libs/zlib"
+
+DEPEND="${RDEPEND}"
+RDEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/c-icap-0.2.6-fix-icap-parsing.patch
+}
+
+src_configure() {
+ # some void *** pointers get casted around and can be troublesome to
+ # fix properly.
+ append-flags -fno-strict-aliasing
+
+ econf \
+ --sysconfdir=/etc/${PN} \
+ --disable-dependency-tracking \
+ --disable-maintainer-mode \
+ --disable-static \
+ --enable-large-files \
+ $(use_enable ipv6) \
+ $(use_with berkdb bdb) \
+ $(use_with ldap)
+}
+
+src_compile() {
+ emake LOGDIR="/var/log"
+}
+
+src_install() {
+ emake \
+ LOGDIR="/var/log" \
+ DESTDIR="${D}" install
+
+ find "${D}" -name '*.la' -delete || die
+
+ # Move the daemon out of the way
+ dodir /usr/libexec
+ mv "${D}"/usr/bin/c-icap "${D}"/usr/libexec || die
+
+ # Remove the default configuration files since we have etc-update to
+ # take care of it for us.
+ rm "${D}"/etc/${PN}/c-icap.*.default || die
+
+ # Fix the configuration file; for some reason it's a bit messy
+ # around.
+ sed -i \
+ -e 's:/usr/var/:/var/:g' \
+ -e 's:/var/log/:/var/log/c-icap/:g' \
+ -e 's:/usr/etc/:/etc/c-icap/:g' \
+ -e 's:/usr/local/c-icap/etc/:/etc/c-icap/:g' \
+ -e 's:/usr/lib/:/usr/'$(get_libdir)'/:g' \
+ "${D}"/etc/${PN}/c-icap.conf \
+ || die
+
+ dodoc AUTHORS README TODO ChangeLog
+
+ newinitd "${FILESDIR}/${PN}.init.3" ${PN}
+ newconfd "${FILESDIR}/${PN}.conf" ${PN}
+ keepdir /var/log/c-icap
+
+ insopts -m0644
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ # avoid triggering portage's symlink protection; this is handled by
+ # the init script anyway.
+ rm -rf "${D}"/var/run
+}
+
+pkg_postinst() {
+ elog "To enable Squid to call the ICAP modules from a local server you should set"
+ elog "the following in your squid.conf:"
+ elog ""
+ elog " icap_enable on"
+ elog ""
+ elog " # not strictly needed, but some modules might make use of these"
+ elog " icap_send_client_ip on"
+ elog " icap_send_client_username on"
+ elog ""
+ elog " icap_service service_req reqmod_precache bypass=1 icap://localhost:1344/service"
+ elog " adaptation_access service_req allow all"
+ elog ""
+ elog " icap_service service_resp respmod_precache bypass=0 icap://localhost:1344/service"
+ elog " adaptation_access service_resp allow all"
+ elog ""
+ elog "You obviously will have to replace \"service\" with the actual ICAP service to"
+ elog "use."
+}
diff --git a/net-proxy/c-icap/files/c-icap-0.1.3+db-5.0.patch b/net-proxy/c-icap/files/c-icap-0.1.3+db-5.0.patch
new file mode 100644
index 000000000000..6be5fafb2311
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap-0.1.3+db-5.0.patch
@@ -0,0 +1,13 @@
+Index: c_icap-0.1.3/modules/bdb_tables.c
+===================================================================
+--- c_icap-0.1.3.orig/modules/bdb_tables.c
++++ c_icap-0.1.3/modules/bdb_tables.c
+@@ -108,7 +108,7 @@ int bdb_table_do_real_open(struct ci_loo
+ }
+
+
+-#if(DB_VERSION_MINOR>=1)
++#if (DB_VERSION_MAJOR > 4) || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
+ if ((ret = dbdata->db->open( dbdata->db, NULL, table->path, NULL,
+ DB_BTREE, DB_RDONLY|DB_THREAD, 0)) != 0) {
+ #else
diff --git a/net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch b/net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch
new file mode 100644
index 000000000000..2e2a325989bb
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch
@@ -0,0 +1,72 @@
+--- a/configure.in 2010-12-21 17:50:08.000000000 +0100
++++ b/configure.in 2011-06-10 00:24:06.000000000 +0200
+@@ -423,10 +423,8 @@
+ )
+
+ dnl Checking if interprocess posix semaphores works....
+-POSIX_SEMAPHORES="0"
+-AC_MSG_CHECKING(if posix 1003.1b interprocess semaphores works)
+-AC_TRY_RUN(
+-[
++AC_CACHE_CHECK([if posix 1003.1b interprocess semaphores works], ac_cv_10031b_ipc_sem,
++[AC_TRY_RUN([
+ #include <semaphore.h>
+ #include <sys/wait.h>
+
+@@ -452,18 +450,24 @@
+ exit(0);
+ }
+ ],
+-AC_DEFINE(HAVE_POSIX_SEMAPHORES,1,[Define HAVE_POSIX_SEMAPHORES if posix 1003.1b semaphores works])
+-POSIX_SEMAPHORES="1"
+-AC_MSG_RESULT(yes),
+-AC_MSG_RESULT(no)
++ac_cv_10031b_ipc_sem=yes,
++ac_cv_10031b_ipc_sem=no,
++[AC_MSG_ERROR([cross-compiling,
++ presetting ac_cv_10031b_ipc_sem=(yes|no) will help])]
+ )
++])
++AS_IF(
++ [test $ac_cv_10031b_ipc_sem = yes],
++ [AC_DEFINE(HAVE_POSIX_SEMAPHORES,1,[Define HAVE_POSIX_SEMAPHORES if posix 1003.1b semaphores works])
++ POSIX_SEMAPHORES="1"
++ ],[
++ POSIX_SEMAPHORES="0"
++ ])
+ AC_SUBST(POSIX_SEMAPHORES)
+
+ dnl Checking for file locking
+-POSIX_FILE_LOCK="0"
+-AC_MSG_CHECKING(if fcntl file locking works)
+-AC_TRY_RUN(
+-[
++AC_CACHE_CHECK([if fcntl file locking works], ac_cv_fcntl,
++[AC_TRY_RUN([
+ #include <unistd.h>
+ #include <fcntl.h>
+
+@@ -487,11 +491,19 @@
+ return 0;
+ }
+ ],
+-AC_DEFINE(HAVE_POSIX_FILE_LOCK,1,[Define HAVE_POSIX_FILE_LOCK if posix fcntl file locking works])
+-POSIX_FILE_LOCK="1"
+-AC_MSG_RESULT(yes),
+-AC_MSG_RESULT(no)
++ac_cv_fcntl=yes,
++ac_cv_fcntl=no,
++[AC_MSG_ERROR([cross-compiling,
++ presetting ac_cv_fcntl=(yes|no) will help])]
+ )
++])
++AS_IF(
++ [test $ac_cv_fcntl = yes],
++ [AC_DEFINE(HAVE_POSIX_FILE_LOCK,1,[Define HAVE_POSIX_FILE_LOCK if posix fcntl file locking works])
++ POSIX_FILE_LOCK="1"
++ ],[
++ POSIX_FILE_LOCK="0"
++ ])
+ AC_SUBST(POSIX_FILE_LOCK)
+
+ #pthread_rwlock
diff --git a/net-proxy/c-icap/files/c-icap-0.1.6-implicit.patch b/net-proxy/c-icap/files/c-icap-0.1.6-implicit.patch
new file mode 100644
index 000000000000..aabffea7dc53
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap-0.1.6-implicit.patch
@@ -0,0 +1,12 @@
+Index: c_icap-0.1.6/txtTemplate.c
+===================================================================
+--- c_icap-0.1.6.orig/txtTemplate.c
++++ c_icap-0.1.6/txtTemplate.c
+@@ -27,6 +27,7 @@
+ #include <sys/param.h>
+ #include <assert.h>
+ #include <stdlib.h>
++#include <ctype.h>
+
+ #include "body.h"
+ #include "c-icap.h"
diff --git a/net-proxy/c-icap/files/c-icap-0.2.2-asneeded.patch b/net-proxy/c-icap/files/c-icap-0.2.2-asneeded.patch
new file mode 100644
index 000000000000..17d5877d3ad5
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap-0.2.2-asneeded.patch
@@ -0,0 +1,27 @@
+Index: c_icap-0.2.1/Makefile.am
+===================================================================
+--- c_icap-0.2.1.orig/Makefile.am
++++ c_icap-0.2.1/Makefile.am
+@@ -37,7 +37,7 @@ c_icap_SOURCES = aserver.c request.c cfg
+ # libicapapi ......
+ libicapapi_la_CFLAGS= -Iinclude/ @ZLIB_ADD_FLAG@ -DCI_BUILD_LIB
+
+-libicapapi_la_LIBADD = @ZLIB_ADD_LDADD@
++libicapapi_la_LIBADD = @ZLIB_ADD_LDADD@ @DL_ADD_FLAG@ @THREADS_LDADD@
+ libicapapi_la_LDFLAGS= -shared -version-info @CICAPLIB_VERSION@
+
+
+@@ -47,10 +47,10 @@ c_icap_CFLAGS= -Iinclude/ -DCONFDIR=\"$(
+ -DSERVDIR=\"$(SERVICESDIR)\" -DLOGDIR=\"$(LOGDIR)\" \
+ -DDATADIR=\"$(DATADIR)\"
+
+-c_icap_LDADD = libicapapi.la @DL_ADD_FLAG@ @THREADS_LDADD@
+-c_icap_LDFLAGS = -rdynamic -rpath @libdir@ @THREADS_LDFLAGS@
++c_icap_LDADD = libicapapi.la
++c_icap_LDFLAGS = -rdynamic @THREADS_LDFLAGS@
+
+-EXT_PROGRAMS_MKLIB = -licapapi @DL_ADD_FLAG@ @THREADS_LDADD@
++EXT_PROGRAMS_MKLIB = -licapapi
+
+
+ INCS = access.h body.h cfg_param.h c-icap-conf.h c-icap.h ci_threads.h \
diff --git a/net-proxy/c-icap/files/c-icap-0.2.6-fix-icap-parsing.patch b/net-proxy/c-icap/files/c-icap-0.2.6-fix-icap-parsing.patch
new file mode 100644
index 000000000000..b0275edefee5
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap-0.2.6-fix-icap-parsing.patch
@@ -0,0 +1,11 @@
+--- c-icap-0.2.2.orig/request.c 2013-02-03 16:37:43.000000000 +0000
++++ c-icap-02.2/request.c 2012-06-19 12:55:51.000000000 +0000
+@@ -267,7 +267,7 @@
+ req->req_server[servnamelen] = '\0';
+ if (*end == '/') { /*service */
+ start = ++end;
+- while (*end != ' ' && *end != '?')
++ while (*end && *end != ' ' && *end != '?')
+ end++;
+ len = end - start;
+ if (len > 0) {
diff --git a/net-proxy/c-icap/files/c-icap.conf b/net-proxy/c-icap/files/c-icap.conf
new file mode 100644
index 000000000000..b41176a5396d
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap.conf
@@ -0,0 +1,13 @@
+# $Id$
+
+# Use this to change the configuration file to use for c-icap.
+configfile=/etc/c-icap/c-icap.conf
+
+# Use this to set any extra option for the daemon. Do not use the -f
+# option here.
+EXTRA_OPTS=""
+
+# If you enabled LDAP support, and you'd like to access tables stored
+# in the local LDAP instance, you want to uncomment the following
+# line.
+#rc_need="slapd"
diff --git a/net-proxy/c-icap/files/c-icap.init.2 b/net-proxy/c-icap/files/c-icap.init.2
new file mode 100644
index 000000000000..398990d22ec0
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap.init.2
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile=$(awk '$1 == "PidFile" { print $2 }' /etc/c-icap/c-icap.conf)
+
+command="/usr/libexec/c-icap"
+command_arguments="${EXTRA_OPTS}"
+
+depend() {
+ need localmount
+}
+
+start_pre() {
+ cmdsocket=$(awk '$1 == "CommandsSocket" { print $2 }' /etc/c-icap/c-icap.conf)
+
+ checkpath -d "$(dirname "${cmdsocket}")" "$(dirname "${pidfile}")"
+}
diff --git a/net-proxy/c-icap/files/c-icap.init.3 b/net-proxy/c-icap/files/c-icap.init.3
new file mode 100644
index 000000000000..4a3e0269bae1
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap.init.3
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+: ${configfile:=/etc/c-icap/c-icap.conf}
+
+get_config() {
+ local value=$(awk '$1 == "'$1'" { print $2 }' ${configfile})
+ echo ${value:-$2}
+}
+
+command="/usr/libexec/c-icap"
+command_arguments="${EXTRA_OPTS} -f ${configfile}"
+pidfile=$(get_config PidFile /var/run/c-icap/c-icap.pid)
+
+depend() {
+ need localmount
+ config ${configfile}
+ [ "$(get_config Logger file_logger)" = "sys_logger" ] && use logger
+}
+
+start_pre() {
+ local cmdsocket=$(get_config CommandsSocket /var/run/c-icap/c-icap.ctl)
+
+ checkpath -d "$(dirname "${cmdsocket}")" "$(dirname "${pidfile}")"
+}
diff --git a/net-proxy/c-icap/files/c-icap.logrotate b/net-proxy/c-icap/files/c-icap.logrotate
new file mode 100644
index 000000000000..c4c0a5d34f6e
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap.logrotate
@@ -0,0 +1,13 @@
+/var/log/c-icap/access.log {
+ missingok
+ postrotate
+ /etc/init.d/c-icap restart
+ endscript
+}
+
+/var/log/cicap-server.log {
+ missingok
+ postrotate
+ /etc/init.d/c-icap restart
+ endscript
+}
diff --git a/net-proxy/c-icap/metadata.xml b/net-proxy/c-icap/metadata.xml
new file mode 100644
index 000000000000..6f1cc64be402
--- /dev/null
+++ b/net-proxy/c-icap/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ <description>Co-maintainer, not trying to call for exclusive</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">c-icap</remote-id>
+ </upstream>
+</pkgmetadata>