* [Buildroot] [PATCH V2 1/4] package/squid: define the log directory, pidfile and swapdir
2014-11-12 16:16 ` [Buildroot] [PATCH V2 0/4] " Guillaume GARDET
@ 2014-11-12 16:16 ` Guillaume GARDET
2014-11-12 16:16 ` [Buildroot] [PATCH V2 2/4] package/squid: enable ICAP server support in squid Guillaume GARDET
` (4 subsequent siblings)
5 siblings, 0 replies; 38+ messages in thread
From: Guillaume GARDET @ 2014-11-12 16:16 UTC (permalink / raw)
To: buildroot
Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
---
package/squid/squid.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/package/squid/squid.mk b/package/squid/squid.mk
index e8a2ccc..ed51881 100644
--- a/package/squid/squid.mk
+++ b/package/squid/squid.mk
@@ -26,7 +26,10 @@ SQUID_CONF_OPTS = --enable-async-io=8 --enable-linux-netfilter \
--enable-auth-negotiate="wrapper" \
--enable-auth-ntlm="fake" \
--disable-strict-error-checking \
- --enable-external-acl-helpers="file_userip"
+ --enable-external-acl-helpers="file_userip" \
+ --with-logdir=/var/log/squid/ \
+ --with-pidfile=/var/run/squid.pid \
+ --with-swapdir=/var/cache/squid/
# On uClibc librt needs libpthread
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_TOOLCHAIN_USES_UCLIBC),yy)
--
1.8.4.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V2 2/4] package/squid: enable ICAP server support in squid
2014-11-12 16:16 ` [Buildroot] [PATCH V2 0/4] " Guillaume GARDET
2014-11-12 16:16 ` [Buildroot] [PATCH V2 1/4] package/squid: define the log directory, pidfile and swapdir Guillaume GARDET
@ 2014-11-12 16:16 ` Guillaume GARDET
2014-11-16 21:38 ` Thomas Petazzoni
2014-11-12 16:16 ` [Buildroot] [PATCH V2 3/4] c-icap: new package Guillaume GARDET
` (3 subsequent siblings)
5 siblings, 1 reply; 38+ messages in thread
From: Guillaume GARDET @ 2014-11-12 16:16 UTC (permalink / raw)
To: buildroot
Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
---
package/squid/squid.mk | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/package/squid/squid.mk b/package/squid/squid.mk
index ed51881..652fdb8 100644
--- a/package/squid/squid.mk
+++ b/package/squid/squid.mk
@@ -29,7 +29,8 @@ SQUID_CONF_OPTS = --enable-async-io=8 --enable-linux-netfilter \
--enable-external-acl-helpers="file_userip" \
--with-logdir=/var/log/squid/ \
--with-pidfile=/var/run/squid.pid \
- --with-swapdir=/var/cache/squid/
+ --with-swapdir=/var/cache/squid/ \
+ --enable-icap-client
# On uClibc librt needs libpthread
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_TOOLCHAIN_USES_UCLIBC),yy)
@@ -48,6 +49,10 @@ define SQUID_CLEANUP_TARGET
cachemgr.conf mime.conf.default squid.conf.default)
endef
-SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET
+define SQUID_CREATE_MISSING_FOLDER
+ mkdir -p $(TARGET_DIR)/var/log/squid/
+endef
+
+SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET SQUID_CREATE_MISSING_FOLDER
$(eval $(autotools-package))
--
1.8.4.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V2 2/4] package/squid: enable ICAP server support in squid
2014-11-12 16:16 ` [Buildroot] [PATCH V2 2/4] package/squid: enable ICAP server support in squid Guillaume GARDET
@ 2014-11-16 21:38 ` Thomas Petazzoni
2014-11-18 12:47 ` Guillaume GARDET - Oliséo
0 siblings, 1 reply; 38+ messages in thread
From: Thomas Petazzoni @ 2014-11-16 21:38 UTC (permalink / raw)
To: buildroot
Dear Guillaume GARDET,
On Wed, 12 Nov 2014 17:16:31 +0100, Guillaume GARDET wrote:
> Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
>
> ---
> package/squid/squid.mk | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/package/squid/squid.mk b/package/squid/squid.mk
> index ed51881..652fdb8 100644
> --- a/package/squid/squid.mk
> +++ b/package/squid/squid.mk
> @@ -29,7 +29,8 @@ SQUID_CONF_OPTS = --enable-async-io=8 --enable-linux-netfilter \
> --enable-external-acl-helpers="file_userip" \
> --with-logdir=/var/log/squid/ \
> --with-pidfile=/var/run/squid.pid \
> - --with-swapdir=/var/cache/squid/
> + --with-swapdir=/var/cache/squid/ \
> + --enable-icap-client
The commit title says you enable the "ICAP server", but in fact you are
enabling the ICAP client.
>
> # On uClibc librt needs libpthread
> ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_TOOLCHAIN_USES_UCLIBC),yy)
> @@ -48,6 +49,10 @@ define SQUID_CLEANUP_TARGET
> cachemgr.conf mime.conf.default squid.conf.default)
> endef
>
> -SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET
> +define SQUID_CREATE_MISSING_FOLDER
> + mkdir -p $(TARGET_DIR)/var/log/squid/
> +endef
This is wrong, for two reasons:
1/ It's related to your PATCH 1/4, which adds
--with-logdir=/var/log/squid, so it should go with it.
2/ Creating a directory in /var/log at build time doesn't make sense,
because /var/log in Buildroot is a symbolic link to /tmp, and /tmp
is mounted as a tmpfs so that the root filesystem can remain
read-only. Therefore, the proper solution is to create this
directory at boot time. We normally do this in the startup script
provided by the package, but squid doesn't provide one.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V2 2/4] package/squid: enable ICAP server support in squid
2014-11-16 21:38 ` Thomas Petazzoni
@ 2014-11-18 12:47 ` Guillaume GARDET - Oliséo
2014-11-18 13:04 ` Thomas Petazzoni
0 siblings, 1 reply; 38+ messages in thread
From: Guillaume GARDET - Oliséo @ 2014-11-18 12:47 UTC (permalink / raw)
To: buildroot
Le 16/11/2014 22:38, Thomas Petazzoni a ?crit :
> Dear Guillaume GARDET,
>
> On Wed, 12 Nov 2014 17:16:31 +0100, Guillaume GARDET wrote:
>> Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
>>
>> ---
>> package/squid/squid.mk | 9 +++++++--
>> 1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/package/squid/squid.mk b/package/squid/squid.mk
>> index ed51881..652fdb8 100644
>> --- a/package/squid/squid.mk
>> +++ b/package/squid/squid.mk
>> @@ -29,7 +29,8 @@ SQUID_CONF_OPTS = --enable-async-io=8 --enable-linux-netfilter \
>> --enable-external-acl-helpers="file_userip" \
>> --with-logdir=/var/log/squid/ \
>> --with-pidfile=/var/run/squid.pid \
>> - --with-swapdir=/var/cache/squid/
>> + --with-swapdir=/var/cache/squid/ \
>> + --enable-icap-client
> The commit title says you enable the "ICAP server", but in fact you are
> enabling the ICAP client.
ok.
>
>>
>> # On uClibc librt needs libpthread
>> ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_TOOLCHAIN_USES_UCLIBC),yy)
>> @@ -48,6 +49,10 @@ define SQUID_CLEANUP_TARGET
>> cachemgr.conf mime.conf.default squid.conf.default)
>> endef
>>
>> -SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET
>> +define SQUID_CREATE_MISSING_FOLDER
>> + mkdir -p $(TARGET_DIR)/var/log/squid/
>> +endef
> This is wrong, for two reasons:
>
> 1/ It's related to your PATCH 1/4, which adds
> --with-logdir=/var/log/squid, so it should go with it.
Right.
>
> 2/ Creating a directory in /var/log at build time doesn't make sense,
> because /var/log in Buildroot is a symbolic link to /tmp, and /tmp
> is mounted as a tmpfs so that the root filesystem can remain
> read-only. Therefore, the proper solution is to create this
> directory at boot time. We normally do this in the startup script
> provided by the package, but squid doesn't provide one.
What would be the solution then?
Guillaume
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V2 2/4] package/squid: enable ICAP server support in squid
2014-11-18 12:47 ` Guillaume GARDET - Oliséo
@ 2014-11-18 13:04 ` Thomas Petazzoni
0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-11-18 13:04 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 18 Nov 2014 13:47:01 +0100, Guillaume GARDET - Olis?o wrote:
> > 2/ Creating a directory in /var/log at build time doesn't make sense,
> > because /var/log in Buildroot is a symbolic link to /tmp, and /tmp
> > is mounted as a tmpfs so that the root filesystem can remain
> > read-only. Therefore, the proper solution is to create this
> > directory at boot time. We normally do this in the startup script
> > provided by the package, but squid doesn't provide one.
>
> What would be the solution then?
I guess the best solution is probably to add an init script to start
Squid at boot time.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V2 3/4] c-icap: new package
2014-11-12 16:16 ` [Buildroot] [PATCH V2 0/4] " Guillaume GARDET
2014-11-12 16:16 ` [Buildroot] [PATCH V2 1/4] package/squid: define the log directory, pidfile and swapdir Guillaume GARDET
2014-11-12 16:16 ` [Buildroot] [PATCH V2 2/4] package/squid: enable ICAP server support in squid Guillaume GARDET
@ 2014-11-12 16:16 ` Guillaume GARDET
2014-11-16 21:48 ` Thomas Petazzoni
2014-11-12 16:16 ` [Buildroot] [PATCH V2 4/4] c-icap-modules: " Guillaume GARDET
` (2 subsequent siblings)
5 siblings, 1 reply; 38+ messages in thread
From: Guillaume GARDET @ 2014-11-12 16:16 UTC (permalink / raw)
To: buildroot
Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
---
package/Config.in | 1 +
package/c-icap/Config.in | 10 ++++++++++
package/c-icap/c-icap.mk | 27 +++++++++++++++++++++++++++
3 files changed, 38 insertions(+)
create mode 100644 package/c-icap/Config.in
create mode 100644 package/c-icap/c-icap.mk
diff --git a/package/Config.in b/package/Config.in
index 28cf703..fe0af07 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -983,6 +983,7 @@ menu "Networking applications"
source "package/boa/Config.in"
source "package/bridge-utils/Config.in"
source "package/bwm-ng/Config.in"
+ source "package/c-icap/Config.in"
source "package/can-utils/Config.in"
source "package/chrony/Config.in"
source "package/civetweb/Config.in"
diff --git a/package/c-icap/Config.in b/package/c-icap/Config.in
new file mode 100644
index 0000000..e8ac241
--- /dev/null
+++ b/package/c-icap/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_C_ICAP
+ bool "c-icap"
+ help
+ c-icap is an implementation of an ICAP server. It can be used with
+ HTTP proxies that support the ICAP protocol to implement content
+ adaptation and filtering services.
+ Most of the commercial HTTP proxies must support the ICAP protocol.
+ The open source Squid 3.x proxy server supports it.
+
+ http://c-icap.sourceforge.net/
diff --git a/package/c-icap/c-icap.mk b/package/c-icap/c-icap.mk
new file mode 100644
index 0000000..8f93638
--- /dev/null
+++ b/package/c-icap/c-icap.mk
@@ -0,0 +1,27 @@
+################################################################################
+#
+# c-icap
+#
+################################################################################
+
+C_ICAP_VERSION = 0.3.5
+C_ICAP_SOURCE = c_icap-$(C_ICAP_VERSION).tar.gz
+C_ICAP_SITE = http://downloads.sourceforge.net/c-icap/
+C_ICAP_LICENSE = LGPLv2.1+
+C_ICAP_LICENSE_FILES = COPYING
+C_ICAP_INSTALL_STAGING = YES
+C_ICAP_CONF_OPTS = --sysconfdir=/etc --with-process-mutexes=posix
+ifeq ($(BR2_LARGEFILE),y)
+C_ICAP_CONF_OPTS += --enable-large-files
+else
+C_ICAP_CONF_OPTS += --disable-large-files
+endif
+
+define C_ICAP_INSTALL_TARGET_CONFIGS
+ mkdir -p $(TARGET_DIR)/var/run/c-icap/
+ mkdir -p $(TARGET_DIR)/tmp/c-icap/
+endef
+
+C_ICAP_POST_INSTALL_TARGET_HOOKS = C_ICAP_INSTALL_TARGET_CONFIGS
+
+$(eval $(autotools-package))
--
1.8.4.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V2 3/4] c-icap: new package
2014-11-12 16:16 ` [Buildroot] [PATCH V2 3/4] c-icap: new package Guillaume GARDET
@ 2014-11-16 21:48 ` Thomas Petazzoni
0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-11-16 21:48 UTC (permalink / raw)
To: buildroot
Dear Guillaume GARDET,
On Wed, 12 Nov 2014 17:16:32 +0100, Guillaume GARDET wrote:
> Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
>
> ---
> package/Config.in | 1 +
> package/c-icap/Config.in | 10 ++++++++++
> package/c-icap/c-icap.mk | 27 +++++++++++++++++++++++++++
> 3 files changed, 38 insertions(+)
> create mode 100644 package/c-icap/Config.in
> create mode 100644 package/c-icap/c-icap.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 28cf703..fe0af07 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -983,6 +983,7 @@ menu "Networking applications"
> source "package/boa/Config.in"
> source "package/bridge-utils/Config.in"
> source "package/bwm-ng/Config.in"
> + source "package/c-icap/Config.in"
> source "package/can-utils/Config.in"
> source "package/chrony/Config.in"
> source "package/civetweb/Config.in"
> diff --git a/package/c-icap/Config.in b/package/c-icap/Config.in
> new file mode 100644
> index 0000000..e8ac241
> --- /dev/null
> +++ b/package/c-icap/Config.in
> @@ -0,0 +1,10 @@
> +config BR2_PACKAGE_C_ICAP
> + bool "c-icap"
A quick look at the source seems to indicate that this package uses
thread support, so you should depend on BR2_TOOLCHAIN_HAS_THREADS, and
add the corresponding comment (see other packages for examples).
> + help
> + c-icap is an implementation of an ICAP server. It can be used with
> + HTTP proxies that support the ICAP protocol to implement content
> + adaptation and filtering services.
> + Most of the commercial HTTP proxies must support the ICAP protocol.
> + The open source Squid 3.x proxy server supports it.
> +
> + http://c-icap.sourceforge.net/
> diff --git a/package/c-icap/c-icap.mk b/package/c-icap/c-icap.mk
> new file mode 100644
> index 0000000..8f93638
> --- /dev/null
> +++ b/package/c-icap/c-icap.mk
> @@ -0,0 +1,27 @@
> +################################################################################
> +#
> +# c-icap
> +#
> +################################################################################
> +
> +C_ICAP_VERSION = 0.3.5
> +C_ICAP_SOURCE = c_icap-$(C_ICAP_VERSION).tar.gz
> +C_ICAP_SITE = http://downloads.sourceforge.net/c-icap/
> +C_ICAP_LICENSE = LGPLv2.1+
> +C_ICAP_LICENSE_FILES = COPYING
> +C_ICAP_INSTALL_STAGING = YES
> +C_ICAP_CONF_OPTS = --sysconfdir=/etc --with-process-mutexes=posix
--sysconfdir=/etc is not needed, it is already passed by the
autotools-package infrastructure to all target packages.
> +ifeq ($(BR2_LARGEFILE),y)
> +C_ICAP_CONF_OPTS += --enable-large-files
> +else
> +C_ICAP_CONF_OPTS += --disable-large-files
> +endif
> +
> +define C_ICAP_INSTALL_TARGET_CONFIGS
> + mkdir -p $(TARGET_DIR)/var/run/c-icap/
> + mkdir -p $(TARGET_DIR)/tmp/c-icap/
> +endef
Like your change for squid, I don't think this makes sense because /tmp
is mounted as a tmpfs, and /var/run is a symlink to /tmp.
You also probably want:
ifeq ($(BR2_INET_IPV6),y)
C_ICAP_CONF_OPTS += --enable-ipv6
else
C_ICAP_CONF_OPTS += --disable-ipv6
endif
Probably also --without-perl, unless perl is a mandatory dependency.
Also, looking at configure.in, it needs the libdl library, so you'll
need to depend on !BR2_PREFER_STATIC_LIB in Config.in.
It also has some optional dependencies on zlib, bzip2, berkeleydb and
ldap.
For the first three, you can to handle the optional dependencies, by
doing something like:
ifeq ($(BR2_PACKAGE_ZLIB),y)
C_ICAP_CONF_OPTS += --with-zlib
C_ICAP_DEPENDENCIES += zlib
else
C_ICAP_CONF_OPTS += --without-zlib
endif
For the last one, since we don't have a LDAP package in Buildroot,
simply pass --without-ldap in C_ICAP_CONF_OPTS.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V2 4/4] c-icap-modules: new package
2014-11-12 16:16 ` [Buildroot] [PATCH V2 0/4] " Guillaume GARDET
` (2 preceding siblings ...)
2014-11-12 16:16 ` [Buildroot] [PATCH V2 3/4] c-icap: new package Guillaume GARDET
@ 2014-11-12 16:16 ` Guillaume GARDET
2014-11-16 21:38 ` [Buildroot] [PATCH V2 0/4] Add ICAP server support Thomas Petazzoni
2014-11-18 14:54 ` [Buildroot] [PATCH V3 0/5] " Guillaume GARDET
5 siblings, 0 replies; 38+ messages in thread
From: Guillaume GARDET @ 2014-11-12 16:16 UTC (permalink / raw)
To: buildroot
Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
---
package/Config.in | 1 +
package/c-icap-modules/Config.in | 7 +++++++
package/c-icap-modules/c-icap-modules.mk | 27 +++++++++++++++++++++++++++
3 files changed, 35 insertions(+)
create mode 100644 package/c-icap-modules/Config.in
create mode 100644 package/c-icap-modules/c-icap-modules.mk
diff --git a/package/Config.in b/package/Config.in
index fe0af07..8993814 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -984,6 +984,7 @@ menu "Networking applications"
source "package/bridge-utils/Config.in"
source "package/bwm-ng/Config.in"
source "package/c-icap/Config.in"
+ source "package/c-icap-modules/Config.in"
source "package/can-utils/Config.in"
source "package/chrony/Config.in"
source "package/civetweb/Config.in"
diff --git a/package/c-icap-modules/Config.in b/package/c-icap-modules/Config.in
new file mode 100644
index 0000000..616456b
--- /dev/null
+++ b/package/c-icap-modules/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_C_ICAP_MODULES
+ bool "c-icap-modules"
+ depends on BR2_PACKAGE_C_ICAP
+ help
+ Additionals modules for c-icap server.
+
+ http://c-icap.sourceforge.net/
diff --git a/package/c-icap-modules/c-icap-modules.mk b/package/c-icap-modules/c-icap-modules.mk
new file mode 100644
index 0000000..8c3be67
--- /dev/null
+++ b/package/c-icap-modules/c-icap-modules.mk
@@ -0,0 +1,27 @@
+################################################################################
+#
+# c-icap-modules
+#
+################################################################################
+
+C_ICAP_MODULES_VERSION = 0.3.2
+C_ICAP_MODULES_SOURCE = c_icap_modules-$(C_ICAP_MODULES_VERSION).tar.gz
+C_ICAP_MODULES_SITE = http://downloads.sourceforge.net/c-icap/
+C_ICAP_MODULES_LICENCE = GPLv2+
+C_ICAP_MODULES_LICENCE_FILE = COPYING
+C_ICAP_MODULES_CONF_OPTS = --with-c-icap=$(STAGING_DIR)/usr/
+C_ICAP_MODULES_CONF_ENV = CFLAGS="$(CFLAGS) -I$(STAGING_DIR)/usr/include/c_icap/"
+C_ICAP_MODULES_DEPENDENCIES = c-icap
+
+# This sed hack is needed since values are obtained using c-icap-config script
+define C_ICAP_MODULES_REMOVE_BROKEN_INCLUDE_PATH
+ $(SED) "s#-I/usr/include -I/usr/include/c_icap###" $(C_ICAP_MODULES_DIR)/Makefile
+ $(SED) "s#-I/usr/include -I/usr/include/c_icap###" $(C_ICAP_MODULES_DIR)/services/Makefile
+ $(SED) "s#-I/usr/include -I/usr/include/c_icap###" $(C_ICAP_MODULES_DIR)/services/url_check/Makefile
+ $(SED) "s#-I/usr/include -I/usr/include/c_icap###" $(C_ICAP_MODULES_DIR)/services/virus_scan/Makefile
+endef
+
+
+C_ICAP_MODULES_POST_CONFIGURE_HOOKS = C_ICAP_MODULES_REMOVE_BROKEN_INCLUDE_PATH
+
+$(eval $(autotools-package))
--
1.8.4.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V2 0/4] Add ICAP server support
2014-11-12 16:16 ` [Buildroot] [PATCH V2 0/4] " Guillaume GARDET
` (3 preceding siblings ...)
2014-11-12 16:16 ` [Buildroot] [PATCH V2 4/4] c-icap-modules: " Guillaume GARDET
@ 2014-11-16 21:38 ` Thomas Petazzoni
2014-11-18 14:54 ` [Buildroot] [PATCH V3 0/5] " Guillaume GARDET
5 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-11-16 21:38 UTC (permalink / raw)
To: buildroot
Dear Guillaume GARDET,
On Wed, 12 Nov 2014 17:16:29 +0100, Guillaume GARDET wrote:
> This patch series enable ICAP support in squid and add c-icap and c-icap-modules packages.
>
> Comments done on V1 have been integrated.
Please mention which comment have been taken into account when you
write a changelog.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 0/5] Add ICAP server support
2014-11-12 16:16 ` [Buildroot] [PATCH V2 0/4] " Guillaume GARDET
` (4 preceding siblings ...)
2014-11-16 21:38 ` [Buildroot] [PATCH V2 0/4] Add ICAP server support Thomas Petazzoni
@ 2014-11-18 14:54 ` Guillaume GARDET
2014-11-18 14:54 ` [Buildroot] [PATCH V3 1/5] package/squid: define the log directory, pidfile and swapdir Guillaume GARDET
` (4 more replies)
5 siblings, 5 replies; 38+ messages in thread
From: Guillaume GARDET @ 2014-11-18 14:54 UTC (permalink / raw)
To: buildroot
* Changes in V3:
- squid: fix patch split, fix patch title (ICAP server => ICAP client),
add init script, remove dir creation in *.mk files.
- c-icap: depends on BR2_TOOLCHAIN_HAS_THREADS and !BR2_PREFER_STATIC_LIB.
Use zlib, bzip2 and berkeleydb, if available. Enable IPv6, if available.
Disable explicitly LDAP. Add init script. Remove dir creation in *.mk files.
- c-icap-modules: no changes
* Changes in V2:
- squid: split patch
- c-icap: Fix commit message, fix new lines at end of file, remove
unneeded lines/options, enable large files support if available.
- c-icap-modules: Fix commit message, fix indentation, new lines at end of
file, remove unneeded lines/options
---
Guillaume GARDET (5):
package/squid: define the log directory, pidfile and swapdir
package/squid: add init script
package/squid: enable ICAP client support in squid
c-icap: new package
c-icap-modules: new package
package/Config.in | 2 +
package/c-icap-modules/Config.in | 7 ++++
package/c-icap-modules/c-icap-modules.mk | 27 ++++++++++++++
package/c-icap/Config.in | 15 ++++++++
package/c-icap/S96cicap | 35 +++++++++++++++++
package/c-icap/c-icap.mk | 64 ++++++++++++++++++++++++++++++++
package/squid/S97squid | 36 ++++++++++++++++++
package/squid/squid.mk | 13 ++++++-
8 files changed, 198 insertions(+), 1 deletion(-)
create mode 100644 package/c-icap-modules/Config.in
create mode 100644 package/c-icap-modules/c-icap-modules.mk
create mode 100644 package/c-icap/Config.in
create mode 100644 package/c-icap/S96cicap
create mode 100644 package/c-icap/c-icap.mk
create mode 100644 package/squid/S97squid
--
1.8.4.5
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 1/5] package/squid: define the log directory, pidfile and swapdir
2014-11-18 14:54 ` [Buildroot] [PATCH V3 0/5] " Guillaume GARDET
@ 2014-11-18 14:54 ` Guillaume GARDET
2014-11-23 21:17 ` Thomas Petazzoni
2014-11-18 14:54 ` [Buildroot] [PATCH V3 2/5] package/squid: add init script Guillaume GARDET
` (3 subsequent siblings)
4 siblings, 1 reply; 38+ messages in thread
From: Guillaume GARDET @ 2014-11-18 14:54 UTC (permalink / raw)
To: buildroot
Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
---
package/squid/squid.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/package/squid/squid.mk b/package/squid/squid.mk
index e8a2ccc..ed51881 100644
--- a/package/squid/squid.mk
+++ b/package/squid/squid.mk
@@ -26,7 +26,10 @@ SQUID_CONF_OPTS = --enable-async-io=8 --enable-linux-netfilter \
--enable-auth-negotiate="wrapper" \
--enable-auth-ntlm="fake" \
--disable-strict-error-checking \
- --enable-external-acl-helpers="file_userip"
+ --enable-external-acl-helpers="file_userip" \
+ --with-logdir=/var/log/squid/ \
+ --with-pidfile=/var/run/squid.pid \
+ --with-swapdir=/var/cache/squid/
# On uClibc librt needs libpthread
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_TOOLCHAIN_USES_UCLIBC),yy)
--
1.8.4.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 1/5] package/squid: define the log directory, pidfile and swapdir
2014-11-18 14:54 ` [Buildroot] [PATCH V3 1/5] package/squid: define the log directory, pidfile and swapdir Guillaume GARDET
@ 2014-11-23 21:17 ` Thomas Petazzoni
0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-11-23 21:17 UTC (permalink / raw)
To: buildroot
Dear Guillaume GARDET,
On Tue, 18 Nov 2014 15:54:43 +0100, Guillaume GARDET wrote:
> Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
Patch applied to next, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 2/5] package/squid: add init script
2014-11-18 14:54 ` [Buildroot] [PATCH V3 0/5] " Guillaume GARDET
2014-11-18 14:54 ` [Buildroot] [PATCH V3 1/5] package/squid: define the log directory, pidfile and swapdir Guillaume GARDET
@ 2014-11-18 14:54 ` Guillaume GARDET
2014-11-23 21:18 ` Thomas Petazzoni
2014-11-18 14:54 ` [Buildroot] [PATCH V3 3/5] package/squid: enable ICAP client support in squid Guillaume GARDET
` (2 subsequent siblings)
4 siblings, 1 reply; 38+ messages in thread
From: Guillaume GARDET @ 2014-11-18 14:54 UTC (permalink / raw)
To: buildroot
Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
---
package/squid/S97squid | 36 ++++++++++++++++++++++++++++++++++++
package/squid/squid.mk | 7 +++++++
2 files changed, 43 insertions(+)
create mode 100644 package/squid/S97squid
diff --git a/package/squid/S97squid b/package/squid/S97squid
new file mode 100644
index 0000000..0908784
--- /dev/null
+++ b/package/squid/S97squid
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+SQUID_BIN="/usr/sbin/squid"
+SQUID_LOG_DIR="/var/log/squid"
+SQUID_PID=/var/run/squid.pid
+SQUID_CONF=/etc/squid.conf
+SQUID_OPTS=""
+
+# (Re)create log directory and give access to squid user (nobody)
+if [ ! -d $SQUID_LOG_DIR ]; then
+ mkdir -p $SQUID_LOG_DIR
+ chmod 777 $SQUID_LOG_DIR
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting WWW-proxy squid "
+ start-stop-daemon -S -x $SQUID_BIN -- -f $SQUID_CONF $SQUID_OPTS
+ [ $? == 0 ] && echo "OK" || echo "FAIL"
+ ;;
+ stop)
+ echo -n "Shutting down WWW-proxy squid "
+ start-stop-daemon -K -x $SQUID_BIN
+ ;;
+ restart | force-reload)
+ $0 stop
+ sleep 2
+ $0 start
+ if [ "$?" != "0" ]; then
+ exit 1
+ fi
+ ;;
+ *)
+ echo "Usage: /etc/init.d/S97squid {start|stop|restart|force-reload}"
+ exit 1
+esac
diff --git a/package/squid/squid.mk b/package/squid/squid.mk
index ed51881..b0fa69f 100644
--- a/package/squid/squid.mk
+++ b/package/squid/squid.mk
@@ -50,4 +50,11 @@ endef
SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET
+define SQUID_INSTALL_INIT_SYSV
+ # install start/stop script
+ @if [ ! -f $(TARGET_DIR)/etc/init.d/S97squid ]; then \
+ $(INSTALL) -m 0755 -D package/squid/S97squid $(TARGET_DIR)/etc/init.d/S97squid; \
+ fi
+endef
+
$(eval $(autotools-package))
--
1.8.4.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 2/5] package/squid: add init script
2014-11-18 14:54 ` [Buildroot] [PATCH V3 2/5] package/squid: add init script Guillaume GARDET
@ 2014-11-23 21:18 ` Thomas Petazzoni
2014-11-29 19:41 ` Guillaume GARDET - Oliséo
0 siblings, 1 reply; 38+ messages in thread
From: Thomas Petazzoni @ 2014-11-23 21:18 UTC (permalink / raw)
To: buildroot
Dear Guillaume GARDET,
On Tue, 18 Nov 2014 15:54:44 +0100, Guillaume GARDET wrote:
> +# (Re)create log directory and give access to squid user (nobody)
> +if [ ! -d $SQUID_LOG_DIR ]; then
> + mkdir -p $SQUID_LOG_DIR
> + chmod 777 $SQUID_LOG_DIR
Clearly, this doesn't look good. Don't we have a better option than 777
the log directory?
> + restart | force-reload)
> + $0 stop
> + sleep 2
sleep 2 really needed here?
> + $0 start
> + if [ "$?" != "0" ]; then
> + exit 1
> + fi
> + ;;
> + *)
> + echo "Usage: /etc/init.d/S97squid {start|stop|restart|force-reload}"
Replace /etc/init.d/S97squid by $0 maybe?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 2/5] package/squid: add init script
2014-11-23 21:18 ` Thomas Petazzoni
@ 2014-11-29 19:41 ` Guillaume GARDET - Oliséo
2014-11-30 8:33 ` Thomas Petazzoni
0 siblings, 1 reply; 38+ messages in thread
From: Guillaume GARDET - Oliséo @ 2014-11-29 19:41 UTC (permalink / raw)
To: buildroot
Le 23/11/2014 22:18, Thomas Petazzoni a ?crit :
> Dear Guillaume GARDET,
>
> On Tue, 18 Nov 2014 15:54:44 +0100, Guillaume GARDET wrote:
>
>> +# (Re)create log directory and give access to squid user (nobody)
>> +if [ ! -d $SQUID_LOG_DIR ]; then
>> + mkdir -p $SQUID_LOG_DIR
>> + chmod 777 $SQUID_LOG_DIR
> Clearly, this doesn't look good. Don't we have a better option than 777
> the log directory?
Maybe create a squid user? Not sure how to handle this in buildroot. What do you think?
>
>> + restart | force-reload)
>> + $0 stop
>> + sleep 2
> sleep 2 really needed here?
Not sure.
>
>> + $0 start
>> + if [ "$?" != "0" ]; then
>> + exit 1
>> + fi
>> + ;;
>> + *)
>> + echo "Usage: /etc/init.d/S97squid {start|stop|restart|force-reload}"
> Replace /etc/init.d/S97squid by $0 maybe?
If you want.
Guillaume
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 2/5] package/squid: add init script
2014-11-29 19:41 ` Guillaume GARDET - Oliséo
@ 2014-11-30 8:33 ` Thomas Petazzoni
0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-11-30 8:33 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, 29 Nov 2014 20:41:52 +0100, Guillaume GARDET - Olis?o wrote:
> >> +# (Re)create log directory and give access to squid user (nobody)
> >> +if [ ! -d $SQUID_LOG_DIR ]; then
> >> + mkdir -p $SQUID_LOG_DIR
> >> + chmod 777 $SQUID_LOG_DIR
> > Clearly, this doesn't look good. Don't we have a better option than 777
> > the log directory?
>
> Maybe create a squid user? Not sure how to handle this in buildroot. What do you think?
Well, if squid currently runs as root, why do you need to "chmod 777"
the log directory?
But indeed, it would be nicer to run squid as a user. Look at
<pkg>_USERS and <pkg>_PERMISSIONS in the Buildroot manual, or grep
through the packages for such definitions, you'll see some examples on
how to achieve that.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 3/5] package/squid: enable ICAP client support in squid
2014-11-18 14:54 ` [Buildroot] [PATCH V3 0/5] " Guillaume GARDET
2014-11-18 14:54 ` [Buildroot] [PATCH V3 1/5] package/squid: define the log directory, pidfile and swapdir Guillaume GARDET
2014-11-18 14:54 ` [Buildroot] [PATCH V3 2/5] package/squid: add init script Guillaume GARDET
@ 2014-11-18 14:54 ` Guillaume GARDET
2014-11-23 21:18 ` Thomas Petazzoni
2014-11-18 14:54 ` [Buildroot] [PATCH V3 4/5] c-icap: new package Guillaume GARDET
2014-11-18 14:54 ` [Buildroot] [PATCH V3 5/5] c-icap-modules: " Guillaume GARDET
4 siblings, 1 reply; 38+ messages in thread
From: Guillaume GARDET @ 2014-11-18 14:54 UTC (permalink / raw)
To: buildroot
Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
---
package/squid/squid.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/squid/squid.mk b/package/squid/squid.mk
index b0fa69f..cd4090e 100644
--- a/package/squid/squid.mk
+++ b/package/squid/squid.mk
@@ -29,7 +29,8 @@ SQUID_CONF_OPTS = --enable-async-io=8 --enable-linux-netfilter \
--enable-external-acl-helpers="file_userip" \
--with-logdir=/var/log/squid/ \
--with-pidfile=/var/run/squid.pid \
- --with-swapdir=/var/cache/squid/
+ --with-swapdir=/var/cache/squid/ \
+ --enable-icap-client
# On uClibc librt needs libpthread
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_TOOLCHAIN_USES_UCLIBC),yy)
--
1.8.4.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 3/5] package/squid: enable ICAP client support in squid
2014-11-18 14:54 ` [Buildroot] [PATCH V3 3/5] package/squid: enable ICAP client support in squid Guillaume GARDET
@ 2014-11-23 21:18 ` Thomas Petazzoni
0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-11-23 21:18 UTC (permalink / raw)
To: buildroot
Dear Guillaume GARDET,
On Tue, 18 Nov 2014 15:54:45 +0100, Guillaume GARDET wrote:
> Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
>
> ---
> package/squid/squid.mk | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to next, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 4/5] c-icap: new package
2014-11-18 14:54 ` [Buildroot] [PATCH V3 0/5] " Guillaume GARDET
` (2 preceding siblings ...)
2014-11-18 14:54 ` [Buildroot] [PATCH V3 3/5] package/squid: enable ICAP client support in squid Guillaume GARDET
@ 2014-11-18 14:54 ` Guillaume GARDET
2015-07-10 17:09 ` Thomas Petazzoni
2014-11-18 14:54 ` [Buildroot] [PATCH V3 5/5] c-icap-modules: " Guillaume GARDET
4 siblings, 1 reply; 38+ messages in thread
From: Guillaume GARDET @ 2014-11-18 14:54 UTC (permalink / raw)
To: buildroot
Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
---
package/Config.in | 1 +
package/c-icap/Config.in | 15 ++++++++++++
package/c-icap/S96cicap | 35 ++++++++++++++++++++++++++
package/c-icap/c-icap.mk | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 115 insertions(+)
create mode 100644 package/c-icap/Config.in
create mode 100644 package/c-icap/S96cicap
create mode 100644 package/c-icap/c-icap.mk
diff --git a/package/Config.in b/package/Config.in
index 28cf703..fe0af07 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -983,6 +983,7 @@ menu "Networking applications"
source "package/boa/Config.in"
source "package/bridge-utils/Config.in"
source "package/bwm-ng/Config.in"
+ source "package/c-icap/Config.in"
source "package/can-utils/Config.in"
source "package/chrony/Config.in"
source "package/civetweb/Config.in"
diff --git a/package/c-icap/Config.in b/package/c-icap/Config.in
new file mode 100644
index 0000000..71ab470
--- /dev/null
+++ b/package/c-icap/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_C_ICAP
+ bool "c-icap"
+ depends on !BR2_PREFER_STATIC_LIB
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ help
+ c-icap is an implementation of an ICAP server. It can be used with
+ HTTP proxies that support the ICAP protocol to implement content
+ adaptation and filtering services.
+ Most of the commercial HTTP proxies must support the ICAP protocol.
+ The open source Squid 3.x proxy server supports it.
+
+ http://c-icap.sourceforge.net/
+
+comment "c-icap needs a toolchain w/ threads and libdl library"
+ depends on BR2_PREFER_STATIC_LIB || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/c-icap/S96cicap b/package/c-icap/S96cicap
new file mode 100644
index 0000000..f176d9e
--- /dev/null
+++ b/package/c-icap/S96cicap
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+CICAP_BIN="/usr/bin/c-icap"
+CICAP_DIR="/var/run/c-icap"
+CICAP_LOG_DIR="/var/log/c-icap/"
+# (Re)create directories
+if [ ! -d $CICAP_DIR ]; then
+ mkdir -p $CICAP_DIR
+fi
+if [ ! -d $CICAP_LOG_DIR ]; then
+ mkdir -p $CICAP_LOG_DIR
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting c-icap server "
+ start-stop-daemon -S -x $CICAP_BIN
+ [ $? == 0 ] && echo "OK" || echo "FAIL"
+ ;;
+ stop)
+ echo -n "Shutting down c-icap server "
+ start-stop-daemon -K -x $CICAP_BIN
+ ;;
+ restart | force-reload)
+ $0 stop
+ sleep 2
+ $0 start
+ if [ "$?" != "0" ]; then
+ exit 1
+ fi
+ ;;
+ *)
+ echo "Usage: /etc/init.d/S96cicap {start|stop|restart|force-reload}"
+ exit 1
+esac
diff --git a/package/c-icap/c-icap.mk b/package/c-icap/c-icap.mk
new file mode 100644
index 0000000..05e2f6a
--- /dev/null
+++ b/package/c-icap/c-icap.mk
@@ -0,0 +1,64 @@
+################################################################################
+#
+# c-icap
+#
+################################################################################
+
+C_ICAP_VERSION = 0.3.5
+C_ICAP_SOURCE = c_icap-$(C_ICAP_VERSION).tar.gz
+C_ICAP_SITE = http://downloads.sourceforge.net/c-icap/
+C_ICAP_LICENSE = LGPLv2.1+
+C_ICAP_LICENSE_FILES = COPYING
+C_ICAP_INSTALL_STAGING = YES
+C_ICAP_CONF_OPTS = --with-process-mutexes=posix --without-ldap
+
+ifeq ($(BR2_LARGEFILE),y)
+C_ICAP_CONF_OPTS += --enable-large-files
+else
+C_ICAP_CONF_OPTS += --disable-large-files
+endif
+
+ifeq ($(BR2_INET_IPV6),y)
+C_ICAP_CONF_OPTS += --enable-ipv6
+else
+C_ICAP_CONF_OPTS += --disable-ipv6
+endif
+
+ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
+C_ICAP_CONF_OPTS += --with-berkeleydb
+C_ICAP_DEPENDENCIES += berkeleydb
+else
+C_ICAP_CONF_OPTS += --without-berkeleydb
+endif
+
+ifeq ($(BR2_PACKAGE_BZIP2),y)
+C_ICAP_CONF_OPTS += --with-bzip2
+C_ICAP_DEPENDENCIES += bzip2
+else
+C_ICAP_CONF_OPTS += --without-bzip2
+endif
+
+ifeq ($(BR2_PACKAGE_PERL),y)
+C_ICAP_CONF_OPTS += --with-perl
+C_ICAP_DEPENDENCIES += perl
+else
+C_ICAP_CONF_OPTS += --without-perl
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+C_ICAP_CONF_OPTS += --with-zlib
+C_ICAP_DEPENDENCIES += zlib
+else
+C_ICAP_CONF_OPTS += --without-zlib
+endif
+
+C_ICAP_POST_INSTALL_TARGET_HOOKS = C_ICAP_INSTALL_TARGET_CONFIGS
+
+define C_ICAP_INSTALL_INIT_SYSV
+ # install start/stop script
+ @if [ ! -f $(TARGET_DIR)/etc/init.d/S96cicap ]; then \
+ $(INSTALL) -m 0755 -D package/c-icap/S96cicap $(TARGET_DIR)/etc/init.d/S96cicap; \
+ fi
+endef
+
+$(eval $(autotools-package))
--
1.8.4.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 4/5] c-icap: new package
2014-11-18 14:54 ` [Buildroot] [PATCH V3 4/5] c-icap: new package Guillaume GARDET
@ 2015-07-10 17:09 ` Thomas Petazzoni
2015-07-15 16:14 ` Guillaume GARDET - Oliséo
0 siblings, 1 reply; 38+ messages in thread
From: Thomas Petazzoni @ 2015-07-10 17:09 UTC (permalink / raw)
To: buildroot
Dear Guillaume GARDET,
On Tue, 18 Nov 2014 15:54:46 +0100, Guillaume GARDET wrote:
> Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
>
> ---
> package/Config.in | 1 +
> package/c-icap/Config.in | 15 ++++++++++++
> package/c-icap/S96cicap | 35 ++++++++++++++++++++++++++
> package/c-icap/c-icap.mk | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 115 insertions(+)
> create mode 100644 package/c-icap/Config.in
> create mode 100644 package/c-icap/S96cicap
> create mode 100644 package/c-icap/c-icap.mk
I've applied, but a lot of changes were needed to make the patch
correct. In fact, with the patch you posted, the c-icap daemon was not
even starting properly at boot time because the c-icap.conf file
contained invalid paths.
Here are the changes I made before committing:
[Thomas:
- Remove trailing whitespace everywhere
- Rewrap the Config.in help text
- Fix Config.in comment, the proper text for BR2_PREFER_STATIC_LIB is
"dynamic library", not "libdl library"
- Use a PID file in the init script
- Show OK / FAIL when stopping the service
- Remove the largefile/IPv6 handling in c-icap.mk, since they are now
mandatory. We therefore pass --enable-large-files and --enable-ipv6
unconditionally.
- Remove the reference to a non-existing
C_ICAP_INSTALL_TARGET_CONFIGS install target hook.
- Install the init script unconditionally.
- Remove unneeded example configuration files (*.default) from /etc,
and fixup the c-icap.conf so that the default values work with
Buildroot
- Properly handle the *-config scripts installed by c-icap.
- Add hash file.]
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 4/5] c-icap: new package
2015-07-10 17:09 ` Thomas Petazzoni
@ 2015-07-15 16:14 ` Guillaume GARDET - Oliséo
0 siblings, 0 replies; 38+ messages in thread
From: Guillaume GARDET - Oliséo @ 2015-07-15 16:14 UTC (permalink / raw)
To: buildroot
Le 10/07/2015 19:09, Thomas Petazzoni a ?crit :
> Dear Guillaume GARDET,
>
> On Tue, 18 Nov 2014 15:54:46 +0100, Guillaume GARDET wrote:
>> Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
>>
>> ---
>> package/Config.in | 1 +
>> package/c-icap/Config.in | 15 ++++++++++++
>> package/c-icap/S96cicap | 35 ++++++++++++++++++++++++++
>> package/c-icap/c-icap.mk | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
>> 4 files changed, 115 insertions(+)
>> create mode 100644 package/c-icap/Config.in
>> create mode 100644 package/c-icap/S96cicap
>> create mode 100644 package/c-icap/c-icap.mk
> I've applied, but a lot of changes were needed to make the patch
> correct. In fact, with the patch you posted, the c-icap daemon was not
> even starting properly at boot time because the c-icap.conf file
> contained invalid paths.
Thanks.
Guillaume
>
> Here are the changes I made before committing:
>
> [Thomas:
> - Remove trailing whitespace everywhere
> - Rewrap the Config.in help text
> - Fix Config.in comment, the proper text for BR2_PREFER_STATIC_LIB is
> "dynamic library", not "libdl library"
> - Use a PID file in the init script
> - Show OK / FAIL when stopping the service
> - Remove the largefile/IPv6 handling in c-icap.mk, since they are now
> mandatory. We therefore pass --enable-large-files and --enable-ipv6
> unconditionally.
> - Remove the reference to a non-existing
> C_ICAP_INSTALL_TARGET_CONFIGS install target hook.
> - Install the init script unconditionally.
> - Remove unneeded example configuration files (*.default) from /etc,
> and fixup the c-icap.conf so that the default values work with
> Buildroot
> - Properly handle the *-config scripts installed by c-icap.
> - Add hash file.]
>
> Thanks!
>
> Thomas
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 5/5] c-icap-modules: new package
2014-11-18 14:54 ` [Buildroot] [PATCH V3 0/5] " Guillaume GARDET
` (3 preceding siblings ...)
2014-11-18 14:54 ` [Buildroot] [PATCH V3 4/5] c-icap: new package Guillaume GARDET
@ 2014-11-18 14:54 ` Guillaume GARDET
2015-07-12 22:26 ` Thomas Petazzoni
4 siblings, 1 reply; 38+ messages in thread
From: Guillaume GARDET @ 2014-11-18 14:54 UTC (permalink / raw)
To: buildroot
Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
---
package/Config.in | 1 +
package/c-icap-modules/Config.in | 7 +++++++
package/c-icap-modules/c-icap-modules.mk | 27 +++++++++++++++++++++++++++
3 files changed, 35 insertions(+)
create mode 100644 package/c-icap-modules/Config.in
create mode 100644 package/c-icap-modules/c-icap-modules.mk
diff --git a/package/Config.in b/package/Config.in
index fe0af07..8993814 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -984,6 +984,7 @@ menu "Networking applications"
source "package/bridge-utils/Config.in"
source "package/bwm-ng/Config.in"
source "package/c-icap/Config.in"
+ source "package/c-icap-modules/Config.in"
source "package/can-utils/Config.in"
source "package/chrony/Config.in"
source "package/civetweb/Config.in"
diff --git a/package/c-icap-modules/Config.in b/package/c-icap-modules/Config.in
new file mode 100644
index 0000000..616456b
--- /dev/null
+++ b/package/c-icap-modules/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_C_ICAP_MODULES
+ bool "c-icap-modules"
+ depends on BR2_PACKAGE_C_ICAP
+ help
+ Additionals modules for c-icap server.
+
+ http://c-icap.sourceforge.net/
diff --git a/package/c-icap-modules/c-icap-modules.mk b/package/c-icap-modules/c-icap-modules.mk
new file mode 100644
index 0000000..9029b1c
--- /dev/null
+++ b/package/c-icap-modules/c-icap-modules.mk
@@ -0,0 +1,27 @@
+################################################################################
+#
+# c-icap-modules
+#
+################################################################################
+
+C_ICAP_MODULES_VERSION = 0.3.2
+C_ICAP_MODULES_SOURCE = c_icap_modules-$(C_ICAP_MODULES_VERSION).tar.gz
+C_ICAP_MODULES_SITE = http://downloads.sourceforge.net/c-icap/
+C_ICAP_MODULES_LICENCE = GPLv2+
+C_ICAP_MODULES_LICENCE_FILE = COPYING
+C_ICAP_MODULES_CONF_OPTS = --with-c-icap=$(STAGING_DIR)/usr/
+C_ICAP_MODULES_CONF_ENV = CFLAGS="$(CFLAGS) -I$(STAGING_DIR)/usr/include/c_icap/"
+C_ICAP_MODULES_DEPENDENCIES = c-icap
+
+# This sed hack is needed since values are obtained using c-icap-config script
+define C_ICAP_MODULES_REMOVE_BROKEN_INCLUDE_PATH
+ $(SED) "s#-I/usr/include -I/usr/include/c_icap###" $(C_ICAP_MODULES_DIR)/Makefile
+ $(SED) "s#-I/usr/include -I/usr/include/c_icap###" $(C_ICAP_MODULES_DIR)/services/Makefile
+ $(SED) "s#-I/usr/include -I/usr/include/c_icap###" $(C_ICAP_MODULES_DIR)/services/url_check/Makefile
+ $(SED) "s#-I/usr/include -I/usr/include/c_icap###" $(C_ICAP_MODULES_DIR)/services/virus_scan/Makefile
+endef
+
+
+C_ICAP_MODULES_POST_CONFIGURE_HOOKS = C_ICAP_MODULES_REMOVE_BROKEN_INCLUDE_PATH
+
+$(eval $(autotools-package))
--
1.8.4.5
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 5/5] c-icap-modules: new package
2014-11-18 14:54 ` [Buildroot] [PATCH V3 5/5] c-icap-modules: " Guillaume GARDET
@ 2015-07-12 22:26 ` Thomas Petazzoni
2015-07-15 16:15 ` Guillaume GARDET - Oliséo
0 siblings, 1 reply; 38+ messages in thread
From: Thomas Petazzoni @ 2015-07-12 22:26 UTC (permalink / raw)
To: buildroot
Dear Guillaume GARDET,
On Tue, 18 Nov 2014 15:54:47 +0100, Guillaume GARDET wrote:
> Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
>
> ---
> package/Config.in | 1 +
> package/c-icap-modules/Config.in | 7 +++++++
> package/c-icap-modules/c-icap-modules.mk | 27 +++++++++++++++++++++++++++
> 3 files changed, 35 insertions(+)
> create mode 100644 package/c-icap-modules/Config.in
> create mode 100644 package/c-icap-modules/c-icap-modules.mk
I applied your patch, but did quite a few changes before doing so:
[Thomas:
- Do not pass custom CFLAGS and remove the hacks on the Makefile:
since the c-icap-config script is now fixed, it returns correct
values, and the hacks are no longer needed.
- Add optional dependency on zlib and berkeleydb.
- Explicitly disable clamav support.]
Thanks for your contribution!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Buildroot] [PATCH V3 5/5] c-icap-modules: new package
2015-07-12 22:26 ` Thomas Petazzoni
@ 2015-07-15 16:15 ` Guillaume GARDET - Oliséo
0 siblings, 0 replies; 38+ messages in thread
From: Guillaume GARDET - Oliséo @ 2015-07-15 16:15 UTC (permalink / raw)
To: buildroot
Le 13/07/2015 00:26, Thomas Petazzoni a ?crit :
> Dear Guillaume GARDET,
>
> On Tue, 18 Nov 2014 15:54:47 +0100, Guillaume GARDET wrote:
>> Signed-off-by: Guillaume GARDET <guillaume.gardet@oliseo.fr>
>>
>> ---
>> package/Config.in | 1 +
>> package/c-icap-modules/Config.in | 7 +++++++
>> package/c-icap-modules/c-icap-modules.mk | 27 +++++++++++++++++++++++++++
>> 3 files changed, 35 insertions(+)
>> create mode 100644 package/c-icap-modules/Config.in
>> create mode 100644 package/c-icap-modules/c-icap-modules.mk
> I applied your patch, but did quite a few changes before doing so:
>
> [Thomas:
> - Do not pass custom CFLAGS and remove the hacks on the Makefile:
> since the c-icap-config script is now fixed, it returns correct
> values, and the hacks are no longer needed.
> - Add optional dependency on zlib and berkeleydb.
> - Explicitly disable clamav support.]
>
> Thanks for your contribution!
Thanks.
Guillaume
>
> Thomas
^ permalink raw reply [flat|nested] 38+ messages in thread