diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2014-10-14 02:56:08 -0400 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-10-16 07:00:59 +0200 |
commit | b310b1daf8793b948719175b3de813bcb2e350ce (patch) | |
tree | 11e7b8bf433e0484e1819aef832a09fd1de43b82 /meta-networking/recipes-daemons/squid | |
parent | 91939fda6ba7546d2e24730a1a225691015231b6 (diff) | |
download | meta-openembedded-b310b1daf8793b948719175b3de813bcb2e350ce.tar.gz |
squid: add new recipe
squid is a fully-featured http proxy and web-cache daemon for Linux.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-networking/recipes-daemons/squid')
9 files changed, 296 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/squid/files/Add-default-entry-for-cross-compile.patch b/meta-networking/recipes-daemons/squid/files/Add-default-entry-for-cross-compile.patch new file mode 100644 index 000000000..5f845bb4c --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/Add-default-entry-for-cross-compile.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From faa212a4e0aaf442ff58fca50770a8fadc1038e3 Mon Sep 17 00:00:00 2001 | ||
2 | Message-Id: <faa212a4e0aaf442ff58fca50770a8fadc1038e3.1382041123.git.Jim.Somerville@windriver.com> | ||
3 | From: Jim Somerville <Jim.Somerville@windriver.com> | ||
4 | Date: Thu, 17 Oct 2013 16:17:48 -0400 | ||
5 | Subject: [PATCH 1/1] Add default entry for cross compile | ||
6 | |||
7 | Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> | ||
8 | --- | ||
9 | acinclude/krb5.m4 | 6 +++++- | ||
10 | 1 files changed, 5 insertions(+), 1 deletions(-) | ||
11 | |||
12 | diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4 | ||
13 | index 5d9ac36..7a072a2 100644 | ||
14 | --- a/acinclude/krb5.m4 | ||
15 | +++ b/acinclude/krb5.m4 | ||
16 | @@ -82,7 +82,11 @@ main(void) | ||
17 | |||
18 | return 0; | ||
19 | } | ||
20 | -]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ]) | ||
21 | +]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ], | ||
22 | +[ | ||
23 | + dnl Can't test in cross compiled env - so assume good | ||
24 | + squid_cv_broken_heimdal_krb5_h=no | ||
25 | +]) | ||
26 | ], | ||
27 | [ | ||
28 | dnl Can't test in cross compiled env - so assume good | ||
29 | -- | ||
30 | 1.7.4.1 | ||
31 | |||
diff --git a/meta-networking/recipes-daemons/squid/files/Change-ksh-reference-in-krb-ldap-helper-to-bash.patch b/meta-networking/recipes-daemons/squid/files/Change-ksh-reference-in-krb-ldap-helper-to-bash.patch new file mode 100644 index 000000000..6591d5c6f --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/Change-ksh-reference-in-krb-ldap-helper-to-bash.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 37da4010f41d936c2c727fc32adab832bdde9bec Mon Sep 17 00:00:00 2001 | ||
2 | Message-Id: <37da4010f41d936c2c727fc32adab832bdde9bec.1382481765.git.Jim.Somerville@windriver.com> | ||
3 | From: Jim Somerville <Jim.Somerville@windriver.com> | ||
4 | Date: Tue, 22 Oct 2013 18:39:39 -0400 | ||
5 | Subject: [PATCH 1/1] Change ksh reference in krb ldap helper to bash | ||
6 | |||
7 | Very simple cert_tool script with no ksh specifics. | ||
8 | Change it to use bash so a package dependency doesn't | ||
9 | get created to ksh. | ||
10 | |||
11 | Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> | ||
12 | --- | ||
13 | helpers/external_acl/kerberos_ldap_group/cert_tool | 3 ++- | ||
14 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
15 | |||
16 | diff --git a/helpers/external_acl/kerberos_ldap_group/cert_tool b/helpers/external_acl/kerberos_ldap_group/cert_tool | ||
17 | index 9f14959..b61be5d 100644 | ||
18 | --- a/helpers/external_acl/kerberos_ldap_group/cert_tool | ||
19 | +++ b/helpers/external_acl/kerberos_ldap_group/cert_tool | ||
20 | @@ -1,4 +1,5 @@ | ||
21 | -#!/bin/ksh | ||
22 | +#!/bin/bash | ||
23 | +# The above was originally ksh | ||
24 | # | ||
25 | # ----------------------------------------------------------------------------- | ||
26 | # | ||
27 | -- | ||
28 | 1.7.4.1 | ||
29 | |||
diff --git a/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch b/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch new file mode 100644 index 000000000..2304c5f1d --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 0d5b337ff5ef7dd48f970f08bd95d6327917cfd1 Mon Sep 17 00:00:00 2001 | ||
2 | Message-Id: <0d5b337ff5ef7dd48f970f08bd95d6327917cfd1.1382375807.git.Jim.Somerville@windriver.com> | ||
3 | From: Jim Somerville <Jim.Somerville@windriver.com> | ||
4 | Date: Mon, 21 Oct 2013 12:50:44 -0400 | ||
5 | Subject: [PATCH 1/1] Fix flawed dynamic -ldb link test in configure | ||
6 | |||
7 | The test uses dbopen, but just ignores the fact | ||
8 | that this function may not exist in the db version | ||
9 | used. This leads to the dynamic link test failing | ||
10 | and the configure script just making assumptions | ||
11 | about why and setting the need for -ldb incorrectly. | ||
12 | |||
13 | Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> | ||
14 | --- | ||
15 | configure.ac | 12 ++++++++++-- | ||
16 | 1 files changed, 10 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/configure.ac b/configure.ac | ||
19 | index 962a748..42e6a93 100644 | ||
20 | --- a/configure.ac | ||
21 | +++ b/configure.ac | ||
22 | @@ -3051,8 +3051,16 @@ AC_CHECK_DECL(dbopen,,,[ | ||
23 | #include <db.h> | ||
24 | #endif]) | ||
25 | |||
26 | -dnl 1.85 | ||
27 | -SQUID_CHECK_DBOPEN_NEEDS_LIBDB | ||
28 | +if test "x$ac_cv_have_decl_dbopen" = "xyes"; then | ||
29 | + dnl 1.85 | ||
30 | + SQUID_CHECK_DBOPEN_NEEDS_LIBDB | ||
31 | +else | ||
32 | + # dbopen isn't there. So instead of running a compile/link test that | ||
33 | + # uses it and is thus guaranteed to fail, we just assume that we will | ||
34 | + # need to link in the db library, rather than fabricate some other | ||
35 | + # dynamic compile/link test. | ||
36 | + ac_cv_dbopen_libdb="yes" | ||
37 | +fi | ||
38 | if test "x$ac_cv_dbopen_libdb" = "xyes"; then | ||
39 | LIB_DB="-ldb" | ||
40 | fi | ||
41 | -- | ||
42 | 1.7.4.1 | ||
43 | |||
diff --git a/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch b/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch new file mode 100644 index 000000000..4ca27444a --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 17e5a28667f667859c48bee25e575a072d39ee1b Mon Sep 17 00:00:00 2001 | ||
2 | Message-Id: <17e5a28667f667859c48bee25e575a072d39ee1b.1381956170.git.Jim.Somerville@windriver.com> | ||
3 | From: Jim Somerville <Jim.Somerville@windriver.com> | ||
4 | Date: Wed, 16 Oct 2013 16:41:03 -0400 | ||
5 | Subject: [PATCH 1/1] Set up for cross compilation | ||
6 | |||
7 | Set the host compiler to BUILD_CXX so | ||
8 | proper cross compilation can occur. | ||
9 | |||
10 | Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> | ||
11 | --- | ||
12 | configure.ac | 1 + | ||
13 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
14 | |||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index c2d3033..dda9ed9 100644 | ||
17 | --- a/configure.ac | ||
18 | +++ b/configure.ac | ||
19 | @@ -19,6 +19,7 @@ m4_include([acinclude/lib-checks.m4]) | ||
20 | m4_include([acinclude/ax_cxx_compile_stdcxx_0x.m4]) | ||
21 | m4_include([acinclude/ax_cxx_0x_types.m4]) | ||
22 | |||
23 | +HOSTCXX="$BUILD_CXX" | ||
24 | PRESET_CFLAGS="$CFLAGS" | ||
25 | PRESET_CXXFLAGS="$CXXFLAGS" | ||
26 | PRESET_LDFLAGS="$LDFLAGS" | ||
27 | -- | ||
28 | 1.7.4.1 | ||
29 | |||
diff --git a/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch b/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch new file mode 100644 index 000000000..7b6dcc820 --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | Subject: [PATCH] Skip AC_RUN_IFELSE tests | ||
2 | |||
3 | Upstream-Status: Inappropriate [cross compiling specific] | ||
4 | |||
5 | Such tests are not supported in a cross compile | ||
6 | environment. Choose sane defaults. | ||
7 | |||
8 | Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> | ||
9 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
10 | --- | ||
11 | acinclude/krb5.m4 | 10 +++++++++- | ||
12 | acinclude/lib-checks.m4 | 8 ++++++-- | ||
13 | 2 files changed, 15 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4 | ||
16 | index 946bea8..7a072a2 100644 | ||
17 | --- a/acinclude/krb5.m4 | ||
18 | +++ b/acinclude/krb5.m4 | ||
19 | @@ -82,7 +82,15 @@ main(void) | ||
20 | |||
21 | return 0; | ||
22 | } | ||
23 | -]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ]) | ||
24 | +]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ], | ||
25 | +[ | ||
26 | + dnl Can't test in cross compiled env - so assume good | ||
27 | + squid_cv_broken_heimdal_krb5_h=no | ||
28 | +]) | ||
29 | + ], | ||
30 | + [ | ||
31 | + dnl Can't test in cross compiled env - so assume good | ||
32 | + squid_cv_broken_heimdal_krb5_h=no | ||
33 | ]) | ||
34 | ]) | ||
35 | ]) dnl SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H | ||
36 | diff --git a/acinclude/lib-checks.m4 b/acinclude/lib-checks.m4 | ||
37 | index 2bf98ee..50dba9b 100644 | ||
38 | --- a/acinclude/lib-checks.m4 | ||
39 | +++ b/acinclude/lib-checks.m4 | ||
40 | @@ -128,7 +128,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS],[ | ||
41 | AC_DEFINE(SQUID_SSLGETCERTIFICATE_BUGGY, 1) | ||
42 | AC_MSG_RESULT([yes]) | ||
43 | ], | ||
44 | - []) | ||
45 | + [ | ||
46 | + AC_MSG_RESULT([skipped - can't test in cross-compiled env]) | ||
47 | + ]) | ||
48 | |||
49 | AC_MSG_CHECKING(whether the workaround for SSL_get_certificate works) | ||
50 | AC_RUN_IFELSE([ | ||
51 | @@ -154,7 +156,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS],[ | ||
52 | [ | ||
53 | AC_MSG_RESULT([no]) | ||
54 | ], | ||
55 | -[]) | ||
56 | +[ | ||
57 | + AC_MSG_RESULT([skipped - can't test in cross-compiled env]) | ||
58 | +]) | ||
59 | |||
60 | SQUID_STATE_ROLLBACK(check_SSL_get_certificate) | ||
61 | ]) | ||
62 | -- | ||
63 | 1.7.1 | ||
64 | |||
diff --git a/meta-networking/recipes-daemons/squid/files/run-ptest b/meta-networking/recipes-daemons/squid/files/run-ptest new file mode 100644 index 000000000..de79a293c --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | make -C test-suite -k runtest-TESTS | ||
diff --git a/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch b/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch new file mode 100644 index 000000000..9e2ceab88 --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 2192fdbc90b0ff2d5408e8763df200620870deea Mon Sep 17 00:00:00 2001 | ||
2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
3 | Date: Mon, 13 Oct 2014 01:32:37 -0700 | ||
4 | Subject: [PATCH] squid: use serial-tests config needed by ptest | ||
5 | |||
6 | ptest needs buildtest-TESTS and runtest-TESTS targets. | ||
7 | serial-tests is required to generate those targets. | ||
8 | |||
9 | Upstream-Status: Inappropriate [default automake behavior incompatible with ptest] | ||
10 | |||
11 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
12 | --- | ||
13 | configure.ac | 2 +- | ||
14 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
15 | |||
16 | diff --git a/configure.ac b/configure.ac | ||
17 | index 6f7171f..ab9b93e 100644 | ||
18 | --- a/configure.ac | ||
19 | +++ b/configure.ac | ||
20 | @@ -3,7 +3,7 @@ AC_PREREQ(2.61) | ||
21 | AC_CONFIG_HEADERS([include/autoconf.h]) | ||
22 | AC_CONFIG_AUX_DIR(cfgaux) | ||
23 | AC_CONFIG_SRCDIR([src/main.cc]) | ||
24 | -AM_INIT_AUTOMAKE([tar-ustar nostdinc]) | ||
25 | +AM_INIT_AUTOMAKE([tar-ustar nostdinc serial-tests]) | ||
26 | AC_REVISION($Revision$)dnl | ||
27 | AC_PREFIX_DEFAULT(/usr/local/squid) | ||
28 | AM_MAINTAINER_MODE | ||
29 | -- | ||
30 | 1.7.1 | ||
31 | |||
diff --git a/meta-networking/recipes-daemons/squid/files/volatiles.03_squid b/meta-networking/recipes-daemons/squid/files/volatiles.03_squid new file mode 100644 index 000000000..b96865d73 --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/volatiles.03_squid | |||
@@ -0,0 +1,2 @@ | |||
1 | # <type> <owner> <group> <mode> <path> <linksource> | ||
2 | d squid squid 0755 /var/run/squid none | ||
diff --git a/meta-networking/recipes-daemons/squid/squid_3.4.7.bb b/meta-networking/recipes-daemons/squid/squid_3.4.7.bb new file mode 100644 index 000000000..37e4bba9e --- /dev/null +++ b/meta-networking/recipes-daemons/squid/squid_3.4.7.bb | |||
@@ -0,0 +1,64 @@ | |||
1 | SUMMARY = "A fully-featured http proxy and web-cache daemon for Linux" | ||
2 | DESCRIPTION = "A fully-featured http proxy and web-cache daemon for Linux. \ | ||
3 | Squid offers a rich access control, authorization and logging environment to \ | ||
4 | develop web proxy and content serving applications. \ | ||
5 | Squid offers a rich set of traffic optimization options, most of which are \ | ||
6 | enabled by default for simpler installation and high performance. \ | ||
7 | " | ||
8 | HOMEPAGE = "http://www.squid-cache.org" | ||
9 | SECTION = "network" | ||
10 | LICENSE = "GPLv2+" | ||
11 | |||
12 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" | ||
13 | MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}" | ||
14 | |||
15 | SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${PV}.tar.bz2 \ | ||
16 | file://Set-up-for-cross-compilation.patch \ | ||
17 | file://Skip-AC_RUN_IFELSE-tests.patch \ | ||
18 | file://Fix-flawed-dynamic-ldb-link-test-in-configure.patch \ | ||
19 | file://Change-ksh-reference-in-krb-ldap-helper-to-bash.patch \ | ||
20 | file://squid-use-serial-tests-config-needed-by-ptest.patch \ | ||
21 | file://run-ptest \ | ||
22 | file://volatiles.03_squid \ | ||
23 | " | ||
24 | |||
25 | LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \ | ||
26 | file://COPYRIGHT;md5=2900f50789c498be8e9f1eb23b55cbe9 \ | ||
27 | " | ||
28 | SRC_URI[md5sum] = "9951034b10f7ee0f45a95cfae61c57c2" | ||
29 | SRC_URI[sha256sum] = "7b423f3d3495a317503ca559ea535f80445fd7c4e3c3e268cb7a8c97c61af2b6" | ||
30 | |||
31 | DEPENDS = "libtool krb5 openldap db cyrus-sasl" | ||
32 | |||
33 | inherit autotools useradd ptest | ||
34 | |||
35 | USERADD_PACKAGES = "${PN}" | ||
36 | USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" | ||
37 | |||
38 | EXTRA_OECONF += "--with-default-user=squid" | ||
39 | |||
40 | TESTDIR = "test-suite" | ||
41 | do_compile_ptest() { | ||
42 | oe_runmake -C ${TESTDIR} buildtest-TESTS | ||
43 | } | ||
44 | |||
45 | do_install_ptest() { | ||
46 | cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} | ||
47 | cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} | ||
48 | |||
49 | # do NOT need to rebuild Makefile itself | ||
50 | sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile | ||
51 | } | ||
52 | |||
53 | do_install_append() { | ||
54 | install -d ${D}${sysconfdir}/default/volatiles | ||
55 | install -m 0644 ${WORKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/volatiles.03_squid | ||
56 | rmdir "${D}${localstatedir}/run/${BPN}" | ||
57 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run" | ||
58 | } | ||
59 | |||
60 | FILES_${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" | ||
61 | FILES_${PN}-dbg += "/usr/src/debug" | ||
62 | FILES_${PN}-doc += "${datadir}/*.txt" | ||
63 | |||
64 | RDEPENDS_${PN}-ptest += "make" | ||