diff options
6 files changed, 312 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/xmlsec1/xmlsec1/change-finding-path-of-nss.patch b/meta-oe/recipes-support/xmlsec1/xmlsec1/change-finding-path-of-nss.patch new file mode 100644 index 0000000000..1cec47fca0 --- /dev/null +++ b/meta-oe/recipes-support/xmlsec1/xmlsec1/change-finding-path-of-nss.patch | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | From c1c980a95d85bcaf8802524d6148783522b300d7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yulong Pei <Yulong.pei@windriver.com> | ||
| 3 | Date: Wed, 21 Jul 2010 22:33:43 +0800 | ||
| 4 | Subject: [PATCH] change finding path of nss and nspr | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Signed-off-by: Yulong Pei <Yulong.pei@windriver.com> | ||
| 9 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | ||
| 10 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
| 11 | --- | ||
| 12 | configure.ac | 20 ++++++++++---------- | ||
| 13 | 1 file changed, 10 insertions(+), 10 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/configure.ac b/configure.ac | ||
| 16 | index 951b3eb..1fdeb0f 100644 | ||
| 17 | --- a/configure.ac | ||
| 18 | +++ b/configure.ac | ||
| 19 | @@ -866,10 +866,10 @@ MOZILLA_MIN_VERSION="1.4" | ||
| 20 | NSS_CRYPTO_LIB="$XMLSEC_PACKAGE-nss" | ||
| 21 | NSPR_PACKAGE=mozilla-nspr | ||
| 22 | NSS_PACKAGE=mozilla-nss | ||
| 23 | -NSPR_INCLUDE_MARKER="nspr/nspr.h" | ||
| 24 | +NSPR_INCLUDE_MARKER="nspr.h" | ||
| 25 | NSPR_LIB_MARKER="libnspr4$shrext" | ||
| 26 | NSPR_LIBS_LIST="-lnspr4 -lplds4 -lplc4" | ||
| 27 | -NSS_INCLUDE_MARKER="nss/nss.h" | ||
| 28 | +NSS_INCLUDE_MARKER="nss3/nss.h" | ||
| 29 | NSS_LIB_MARKER="libnss3$shrext" | ||
| 30 | NSS_LIBS_LIST="-lnss3 -lsmime3" | ||
| 31 | |||
| 32 | @@ -898,24 +898,24 @@ fi | ||
| 33 | dnl Priority 1: User specifies the path to installation | ||
| 34 | if test "z$NSPR_FOUND" = "zno" -a "z$with_nspr" != "z" -a "z$with_nspr" != "zyes" ; then | ||
| 35 | AC_MSG_CHECKING(for nspr library installation in "$with_nspr" folder) | ||
| 36 | - if test -f "$with_nspr/include/$NSPR_INCLUDE_MARKER" -a -f "$with_nspr/lib/$NSPR_LIB_MARKER" ; then | ||
| 37 | - NSPR_INCLUDE_PATH="$with_nspr/include" | ||
| 38 | - NSPR_LIB_PATH="$with_nspr/lib" | ||
| 39 | + if test -f "$with_nspr/usr/include/$NSPR_INCLUDE_MARKER" -a -f "$with_nspr/${libdir}/$NSPR_LIB_MARKER" ; then | ||
| 40 | + NSPR_INCLUDE_PATH="$with_nspr/usr/include" | ||
| 41 | + NSPR_LIB_PATH="$with_nspr/${libdir}" | ||
| 42 | NSPR_FOUND="yes" | ||
| 43 | AC_MSG_RESULT([yes]) | ||
| 44 | else | ||
| 45 | - AC_MSG_ERROR([not found: "$with_nspr/include/$NSPR_INCLUDE_MARKER" and/or "$with_nspr/lib/$NSPR_LIB_MARKER" files don't exist), typo?]) | ||
| 46 | + AC_MSG_ERROR([not found: "$with_nspr/usr/include/$NSPR_INCLUDE_MARKER" and/or "$with_nspr/${libdir}/$NSPR_LIB_MARKER" files don't exist), typo?]) | ||
| 47 | fi | ||
| 48 | fi | ||
| 49 | if test "z$NSS_FOUND" = "zno" -a "z$with_nss" != "z" -a "z$with_nss" != "zyes" ; then | ||
| 50 | AC_MSG_CHECKING(for nss library installation in "$with_nss" folder) | ||
| 51 | - if test -f "$with_nss/include/$NSS_INCLUDE_MARKER" -a -f "$with_nss/lib/$NSS_LIB_MARKER" ; then | ||
| 52 | - NSS_INCLUDE_PATH="$with_nss/include" | ||
| 53 | - NSS_LIB_PATH="$with_nss/lib" | ||
| 54 | + if test -f "$with_nss/usr/include/$NSS_INCLUDE_MARKER" -a -f "$with_nss/${libdir}/$NSS_LIB_MARKER" ; then | ||
| 55 | + NSS_INCLUDE_PATH="$with_nss/usr/include/nss3" | ||
| 56 | + NSS_LIB_PATH="$with_nss/${libdir}" | ||
| 57 | NSS_FOUND="yes" | ||
| 58 | AC_MSG_RESULT([yes]) | ||
| 59 | else | ||
| 60 | - AC_MSG_ERROR([not found: "$with_nss/include/$NSS_INCLUDE_MARKER" and/or "$with_nss/lib/$NSS_LIB_MARKER" files don't exist), typo?]) | ||
| 61 | + AC_MSG_ERROR([not found: "$with_nss/usr/include/$NSS_INCLUDE_MARKER" and/or "$with_nss/${libdir}/$NSS_LIB_MARKER" files don't exist), typo?]) | ||
| 62 | fi | ||
| 63 | fi | ||
| 64 | |||
| 65 | -- | ||
| 66 | 2.7.4 | ||
| 67 | |||
diff --git a/meta-oe/recipes-support/xmlsec1/xmlsec1/fix-ltmain.sh.patch b/meta-oe/recipes-support/xmlsec1/xmlsec1/fix-ltmain.sh.patch new file mode 100644 index 0000000000..af598fe749 --- /dev/null +++ b/meta-oe/recipes-support/xmlsec1/xmlsec1/fix-ltmain.sh.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | From 847dc52f5a50e34ee4d6e3dc2c708711747a58ca Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yulong Pei <Yulong.pei@windriver.com> | ||
| 3 | Date: Thu, 21 Jan 2010 14:11:20 +0800 | ||
| 4 | Subject: [PATCH] force to use our own libtool | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [ OE specific ] | ||
| 7 | |||
| 8 | Signed-off-by: Yulong Pei <Yulong.pei@windriver.com> | ||
| 9 | |||
| 10 | --- | ||
| 11 | ltmain.sh | 2 +- | ||
| 12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/ltmain.sh b/ltmain.sh | ||
| 15 | index 147d758..a61f16b 100644 | ||
| 16 | --- a/ltmain.sh | ||
| 17 | +++ b/ltmain.sh | ||
| 18 | @@ -6969,7 +6969,7 @@ func_mode_link () | ||
| 19 | dir=$func_resolve_sysroot_result | ||
| 20 | # We need an absolute path. | ||
| 21 | case $dir in | ||
| 22 | - [\\/]* | [A-Za-z]:[\\/]*) ;; | ||
| 23 | + =* | [\\/]* | [A-Za-z]:[\\/]*) ;; | ||
| 24 | *) | ||
| 25 | absdir=`cd "$dir" && pwd` | ||
| 26 | test -z "$absdir" && \ | ||
diff --git a/meta-oe/recipes-support/xmlsec1/xmlsec1/makefile-ptest.patch b/meta-oe/recipes-support/xmlsec1/xmlsec1/makefile-ptest.patch new file mode 100644 index 0000000000..d45356924b --- /dev/null +++ b/meta-oe/recipes-support/xmlsec1/xmlsec1/makefile-ptest.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | From 83a1381e1d6bd1b5ec3df6f7c4bc1f4fe4f860b6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
| 3 | Date: Thu, 15 Jun 2017 14:44:01 +0800 | ||
| 4 | Subject: [PATCH] xmlsec1: add new recipe | ||
| 5 | |||
| 6 | This enables the building of the examples directory | ||
| 7 | and it's installed as ptest. | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [ OE ptest specific ] | ||
| 10 | |||
| 11 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
| 12 | |||
| 13 | --- | ||
| 14 | examples/Makefile | 12 ++++++++++-- | ||
| 15 | 1 file changed, 10 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/examples/Makefile b/examples/Makefile | ||
| 18 | index 89b1d61..c1cbcca 100644 | ||
| 19 | --- a/examples/Makefile | ||
| 20 | +++ b/examples/Makefile | ||
| 21 | @@ -8,9 +8,17 @@ PROGRAMS = \ | ||
| 22 | decrypt1 decrypt2 decrypt3 \ | ||
| 23 | xmldsigverify | ||
| 24 | |||
| 25 | +ifndef CC | ||
| 26 | CC = gcc | ||
| 27 | -CFLAGS += -g $(shell xmlsec1-config --cflags) -DUNIX_SOCKETS | ||
| 28 | -LDLIBS += -g $(shell xmlsec1-config --libs) | ||
| 29 | +endif | ||
| 30 | + | ||
| 31 | +CFLAGS += -I../include -g $(shell PKG_CONFIG_PATH=.. pkg-config --cflags xmlsec1 ) -DUNIX_SOCKETS | ||
| 32 | +LDLIBS += -L../src/.libs -g $(shell PKG_CONFIG_PATH=.. pkg-config --libs xmlsec1 ) | ||
| 33 | + | ||
| 34 | +DESTDIR = /usr/share/xmlsec1 | ||
| 35 | +install-ptest: | ||
| 36 | + if [ ! -d $(DESTDIR) ]; then mkdir -p $(DESTDIR); fi | ||
| 37 | + cp * $(DESTDIR) | ||
| 38 | |||
| 39 | all: $(PROGRAMS) | ||
| 40 | |||
diff --git a/meta-oe/recipes-support/xmlsec1/xmlsec1/run-ptest b/meta-oe/recipes-support/xmlsec1/xmlsec1/run-ptest new file mode 100755 index 0000000000..a203c38f27 --- /dev/null +++ b/meta-oe/recipes-support/xmlsec1/xmlsec1/run-ptest | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | check_return() { | ||
| 4 | if [ $? == 0 ]; then | ||
| 5 | echo -e "PASS: $1\n" | ||
| 6 | else | ||
| 7 | echo -e "FAIL: $1\n" | ||
| 8 | fi | ||
| 9 | } | ||
| 10 | |||
| 11 | echo "---------------------------------------------------" | ||
| 12 | echo "Signing a template file..." | ||
| 13 | ./sign1 sign1-tmpl.xml rsakey.pem > sign1-res.xml | ||
| 14 | ./verify1 sign1-res.xml rsapub.pem | ||
| 15 | check_return sign-tmpl | ||
| 16 | |||
| 17 | echo "---------------------------------------------------" | ||
| 18 | echo "Signing a dynamicaly created template..." | ||
| 19 | ./sign2 sign2-doc.xml rsakey.pem > sign2-res.xml | ||
| 20 | ./verify1 sign2-res.xml rsapub.pem | ||
| 21 | check_return sign-dynamic-templ | ||
| 22 | |||
| 23 | echo "---------------------------------------------------" | ||
| 24 | echo "Signing with X509 certificate..." | ||
| 25 | ./sign3 sign3-doc.xml rsakey.pem rsacert.pem > sign3-res.xml | ||
| 26 | ./verify3 sign3-res.xml ca2cert.pem cacert.pem | ||
| 27 | check_return sign-x509 | ||
| 28 | |||
| 29 | echo "---------------------------------------------------" | ||
| 30 | echo "Verifying a signature with a single key..." | ||
| 31 | ./verify1 sign1-res.xml rsapub.pem | ||
| 32 | ./verify1 sign2-res.xml rsapub.pem | ||
| 33 | check_return verify-single-key | ||
| 34 | |||
| 35 | echo "---------------------------------------------------" | ||
| 36 | echo "Verifying a signature with keys manager..." | ||
| 37 | ./verify2 sign1-res.xml rsapub.pem | ||
| 38 | ./verify2 sign2-res.xml rsapub.pem | ||
| 39 | check_return verify-keys-manager | ||
| 40 | |||
| 41 | echo "---------------------------------------------------" | ||
| 42 | echo "Verifying a signature with X509 certificates..." | ||
| 43 | ./verify3 sign3-res.xml ca2cert.pem cacert.pem | ||
| 44 | check_return verify-x509 | ||
| 45 | |||
| 46 | echo "---------------------------------------------------" | ||
| 47 | echo "Verifying a signature with additional restrictions..." | ||
| 48 | ./verify4 verify4-res.xml ca2cert.pem cacert.pem | ||
| 49 | check_return verify-res | ||
| 50 | |||
| 51 | echo "---------------------------------------------------" | ||
| 52 | echo "Encrypting data with a template file..." | ||
| 53 | ./encrypt1 encrypt1-tmpl.xml deskey.bin > encrypt1-res.xml | ||
| 54 | ./decrypt1 encrypt1-res.xml deskey.bin | ||
| 55 | check_return encrypt-tmpl | ||
| 56 | |||
| 57 | echo "---------------------------------------------------" | ||
| 58 | echo "Encrypting data with a dynamicaly created template..." | ||
| 59 | ./encrypt2 encrypt2-doc.xml deskey.bin > encrypt2-res.xml | ||
| 60 | ./decrypt1 encrypt2-res.xml deskey.bin | ||
| 61 | check_return encrypt-dynamic-tmpl | ||
| 62 | |||
| 63 | echo "---------------------------------------------------" | ||
| 64 | echo "Encrypting data with a session key..." | ||
| 65 | ./encrypt3 encrypt3-doc.xml rsakey.pem > encrypt3-res.xml | ||
| 66 | ./decrypt3 encrypt3-res.xml | ||
| 67 | check_return encrypt-session-key | ||
| 68 | |||
| 69 | echo "---------------------------------------------------" | ||
| 70 | echo "Decrypting data with a single key..." | ||
| 71 | ./decrypt1 encrypt1-res.xml deskey.bin | ||
| 72 | ./decrypt1 encrypt2-res.xml deskey.bin | ||
| 73 | check_return encrypt-single-key | ||
| 74 | |||
| 75 | echo "---------------------------------------------------" | ||
| 76 | echo "Decrypting data with keys manager..." | ||
| 77 | ./decrypt2 encrypt1-res.xml deskey.bin | ||
| 78 | ./decrypt2 encrypt2-res.xml deskey.bin | ||
| 79 | check_return encrypt-keys-manager | ||
| 80 | |||
| 81 | echo "---------------------------------------------------" | ||
| 82 | echo "Writing a custom keys manager..." | ||
| 83 | ./decrypt3 encrypt1-res.xml | ||
| 84 | ./decrypt3 encrypt2-res.xml | ||
| 85 | check_return write-keys-manager | ||
diff --git a/meta-oe/recipes-support/xmlsec1/xmlsec1/xmlsec1-examples-allow-build-in-separate-dir.patch b/meta-oe/recipes-support/xmlsec1/xmlsec1/xmlsec1-examples-allow-build-in-separate-dir.patch new file mode 100644 index 0000000000..8b2533ed9e --- /dev/null +++ b/meta-oe/recipes-support/xmlsec1/xmlsec1/xmlsec1-examples-allow-build-in-separate-dir.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | From 0c38c6864e7ba8f53a657d87894f24374a6a4932 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
| 3 | Date: Tue, 30 Dec 2014 11:18:17 +0800 | ||
| 4 | Subject: [PATCH] examples: allow build in separate dir | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [ OE specific ] | ||
| 7 | |||
| 8 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
| 9 | |||
| 10 | --- | ||
| 11 | examples/Makefile | 6 ++++-- | ||
| 12 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/examples/Makefile b/examples/Makefile | ||
| 15 | index c1cbcca..3f1bd14 100644 | ||
| 16 | --- a/examples/Makefile | ||
| 17 | +++ b/examples/Makefile | ||
| 18 | @@ -12,8 +12,10 @@ ifndef CC | ||
| 19 | CC = gcc | ||
| 20 | endif | ||
| 21 | |||
| 22 | -CFLAGS += -I../include -g $(shell PKG_CONFIG_PATH=.. pkg-config --cflags xmlsec1 ) -DUNIX_SOCKETS | ||
| 23 | -LDLIBS += -L../src/.libs -g $(shell PKG_CONFIG_PATH=.. pkg-config --libs xmlsec1 ) | ||
| 24 | +top_srcdir = .. | ||
| 25 | +top_builddir = .. | ||
| 26 | +CFLAGS += -I$(top_srcdir)/include -g $(shell PKG_CONFIG_PATH=$(top_srcdir) pkg-config --cflags xmlsec1 ) -DUNIX_SOCKETS | ||
| 27 | +LDLIBS += -L$(top_builddir)/src/.libs -g $(shell PKG_CONFIG_PATH=$(top_srcdir) pkg-config --libs xmlsec1 ) | ||
| 28 | |||
| 29 | DESTDIR = /usr/share/xmlsec1 | ||
| 30 | install-ptest: | ||
diff --git a/meta-oe/recipes-support/xmlsec1/xmlsec1_1.2.28.bb b/meta-oe/recipes-support/xmlsec1/xmlsec1_1.2.28.bb new file mode 100644 index 0000000000..0a4c56aa02 --- /dev/null +++ b/meta-oe/recipes-support/xmlsec1/xmlsec1_1.2.28.bb | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | SUMMARY = "XML Security Library is a C library based on LibXML2" | ||
| 2 | DESCRIPTION = "\ | ||
| 3 | XML Security Library is a C library based on \ | ||
| 4 | LibXML2 and OpenSSL. The library was created with a goal to support major \ | ||
| 5 | XML security standards "XML Digital Signature" and "XML Encryption". \ | ||
| 6 | " | ||
| 7 | HOMEPAGE = "http://www.aleksey.com/xmlsec/" | ||
| 8 | DEPENDS = "libtool libxml2 libxslt zlib" | ||
| 9 | |||
| 10 | LICENSE = "MIT" | ||
| 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=352791d62092ea8104f085042de7f4d0" | ||
| 12 | |||
| 13 | SECTION = "libs" | ||
| 14 | |||
| 15 | SRC_URI = "http://www.aleksey.com/xmlsec/download/${BP}.tar.gz \ | ||
| 16 | file://fix-ltmain.sh.patch \ | ||
| 17 | file://change-finding-path-of-nss.patch \ | ||
| 18 | file://makefile-ptest.patch \ | ||
| 19 | file://xmlsec1-examples-allow-build-in-separate-dir.patch \ | ||
| 20 | file://run-ptest \ | ||
| 21 | " | ||
| 22 | |||
| 23 | SRC_URI[md5sum] = "69b8d95c009a404462e19f335e650241" | ||
| 24 | SRC_URI[sha256sum] = "13eec4811ea30e3f0e16a734d1dbf7f9d246a71d540b48d143a07b489f6222d4" | ||
| 25 | |||
| 26 | inherit autotools-brokensep ptest pkgconfig | ||
| 27 | |||
| 28 | CFLAGS += "-I${STAGING_INCDIR}/nspr4 -I${STAGING_INCDIR}/nss3" | ||
| 29 | CPPFLAGS += "-I${STAGING_INCDIR}/nspr4 -I${STAGING_INCDIR}/nss3" | ||
| 30 | |||
| 31 | PACKAGECONFIG ??= "gnutls libgcrypt nss openssl des" | ||
| 32 | PACKAGECONFIG[gnutls] = ",,gnutls" | ||
| 33 | PACKAGECONFIG[libgcrypt] = ",,libgcrypt" | ||
| 34 | PACKAGECONFIG[nss] = "--with-nss=${STAGING_LIBDIR}/../.. --with-nspr=${STAGING_LIBDIR}/../..,,nss nspr" | ||
| 35 | PACKAGECONFIG[openssl] = ",,openssl" | ||
| 36 | PACKAGECONFIG[des] = ",--disable-des,," | ||
| 37 | |||
| 38 | # these can be dynamically loaded with xmlSecCryptoDLLoadLibrary() | ||
| 39 | FILES_SOLIBSDEV = "${libdir}/libxmlsec1.so" | ||
| 40 | FILES_${PN} += "${libdir}/libxmlsec1-*.so" | ||
| 41 | INSANE_SKIP_${PN} = "dev-so" | ||
| 42 | |||
| 43 | FILES_${PN}-dev += "${libdir}/xmlsec1Conf.sh" | ||
| 44 | FILES_${PN}-dbg += "${PTEST_PATH}/.debug/*" | ||
| 45 | |||
| 46 | RDEPENDS_${PN}-ptest += "${PN}-dev" | ||
| 47 | INSANE_SKIP_${PN}-ptest += "dev-deps" | ||
| 48 | |||
| 49 | PTEST_EXTRA_ARGS = "top_srcdir=${S} top_builddir=${B}" | ||
| 50 | |||
| 51 | do_compile_ptest () { | ||
| 52 | oe_runmake -C ${S}/examples ${PTEST_EXTRA_ARGS} all | ||
| 53 | } | ||
| 54 | |||
| 55 | do_install_append() { | ||
| 56 | for i in ${bindir}/xmlsec1-config ${libdir}/xmlsec1Conf.sh \ | ||
| 57 | ${libdir}/pkgconfig/xmlsec1-openssl.pc; do | ||
| 58 | sed -i -e "s@${RECIPE_SYSROOT}@@g" ${D}$i | ||
| 59 | done | ||
| 60 | } | ||
| 61 | |||
| 62 | do_install_ptest () { | ||
| 63 | oe_runmake -C ${S}/examples DESTDIR=${D}${PTEST_PATH} ${PTEST_EXTRA_ARGS} install-ptest | ||
| 64 | } | ||
