added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,52 @@
From 9ed3b4e628f9254d5c86006fe63c33a1eb02aee5 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Tue, 4 Feb 2020 23:39:49 -0800
Subject: [PATCH] nss/nspr: fix for multilib
Upstream-Status: Pending
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
configure.ac | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index b46d97d..39f4318 100644
--- a/configure.ac
+++ b/configure.ac
@@ -920,24 +920,24 @@ fi
dnl Priority 1: User specifies the path to installation
if test "z$NSPR_FOUND" = "zno" -a "z$with_nspr" != "z" -a "z$with_nspr" != "zyes" ; then
AC_MSG_CHECKING(for nspr library installation in "$with_nspr" folder)
- if test -f "$with_nspr/include/$NSPR_INCLUDE_MARKER" -a -f "$with_nspr/lib/$NSPR_LIB_MARKER" ; then
- NSPR_INCLUDE_PATH="$with_nspr/include"
- NSPR_LIB_PATH="$with_nspr/lib"
+ if test -f "$with_nspr/${includedir}/$NSPR_INCLUDE_MARKER" -a -f "$with_nspr/${libdir}/$NSPR_LIB_MARKER" ; then
+ NSPR_INCLUDE_PATH="$with_nspr/${includedir}"
+ NSPR_LIB_PATH="$with_nspr/${libdir}"
NSPR_FOUND="yes"
AC_MSG_RESULT([yes])
else
- AC_MSG_ERROR([not found: "$with_nspr/include/$NSPR_INCLUDE_MARKER" and/or "$with_nspr/lib/$NSPR_LIB_MARKER" files don't exist), typo?])
+ AC_MSG_ERROR([not found: "$with_nspr/${includedir}/$NSPR_INCLUDE_MARKER" and/or "$with_nspr/${libdir}/$NSPR_LIB_MARKER" files don't exist), typo?])
fi
fi
if test "z$NSS_FOUND" = "zno" -a "z$with_nss" != "z" -a "z$with_nss" != "zyes" ; then
AC_MSG_CHECKING(for nss library installation in "$with_nss" folder)
- if test -f "$with_nss/include/$NSS_INCLUDE_MARKER" -a -f "$with_nss/lib/$NSS_LIB_MARKER" ; then
- NSS_INCLUDE_PATH="$with_nss/include"
- NSS_LIB_PATH="$with_nss/lib"
+ if test -f "$with_nss/${includedir}/$NSS_INCLUDE_MARKER" -a -f "$with_nss/${libdir}/$NSS_LIB_MARKER" ; then
+ NSS_INCLUDE_PATH="$with_nss/${includedir}"
+ NSS_LIB_PATH="$with_nss/${libdir}"
NSS_FOUND="yes"
AC_MSG_RESULT([yes])
else
- AC_MSG_ERROR([not found: "$with_nss/include/$NSS_INCLUDE_MARKER" and/or "$with_nss/lib/$NSS_LIB_MARKER" files don't exist), typo?])
+ AC_MSG_ERROR([not found: "$with_nss/${includedir}/$NSS_INCLUDE_MARKER" and/or "$with_nss/${libdir}/$NSS_LIB_MARKER" files don't exist), typo?])
fi
fi
--
2.21.0

View File

@@ -0,0 +1,43 @@
From 30e1afe60820c18c89cd10e9dcb7208ad5676d1d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 19 Jan 2023 15:06:35 -0800
Subject: [PATCH] xmldsigverify: Include xmlsec/parser.h
this ensures that xmlSecParserSetDefaultOptions definition is made
available
Fixes
| xmldsigverify.c:275:5: error: call to undeclared function 'xmlSecParserSetDefaultOptions'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
| xmlSecParserSetDefaultOptions(XML_PARSE_NOENT | XML_PARSE_NOCDATA |
| ^
Upstream-Status: Submitted [https://github.com/lsh123/xmlsec/pull/463]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
examples/xmldsigverify.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/xmldsigverify.c b/examples/xmldsigverify.c
index ed538c70..ff68120e 100644
--- a/examples/xmldsigverify.c
+++ b/examples/xmldsigverify.c
@@ -25,6 +25,7 @@
#include <xmlsec/xmldsig.h>
#include <xmlsec/crypto.h>
+#include <xmlsec/parser.h>
/* #define XMLDSIGVERIFY_DEFAULT_TRUSTED_CERTS_FOLDER "/etc/httpd/conf/ssl.crt" */
#define XMLDSIGVERIFY_DEFAULT_TRUSTED_CERTS_FOLDER "/var/www/cgi-bin/keys-certs.def"
#define XMLDSIGVERIFY_KEY_AND_CERTS_FOLDER "/var/www/cgi-bin/keys-certs"
@@ -36,7 +37,7 @@ int verify_request(xmlSecKeysMngrPtr mngr);
int url_decode(char *buf, size_t size);
int
-main(int , char **) {
+main() {
xmlSecKeysMngrPtr mngr;
#ifndef XMLSEC_NO_XSLT
xsltSecurityPrefsPtr xsltSecPrefs = NULL;
--
2.39.1

View File

@@ -0,0 +1,27 @@
From c1c980a95d85bcaf8802524d6148783522b300d7 Mon Sep 17 00:00:00 2001
From: Yulong Pei <Yulong.pei@windriver.com>
Date: Wed, 21 Jul 2010 22:33:43 +0800
Subject: [PATCH] change finding path of nss and nspr
Upstream-Status: Pending
Signed-off-by: Yulong Pei <Yulong.pei@windriver.com>
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
configure.ac | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 951b3eb..1fdeb0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -866,7 +866,7 @@ MOZILLA_MIN_VERSION="1.4"
NSPR_INCLUDE_MARKER="nspr/nspr.h"
NSPR_LIB_MARKER="libnspr4$shrext"
NSPR_LIBS_LIST="-lnspr4 -lplds4 -lplc4"
-NSS_INCLUDE_MARKER="nss/nss.h"
+NSS_INCLUDE_MARKER="nss3/nss.h"
NSS_LIB_MARKER="libnss3$shrext"
NSS_LIBS_LIST="-lnss3 -lsmime3"

View File

@@ -0,0 +1,22 @@
xmlsec1: Fix configure QA error caused by host lookup path
ERROR: mc:my-sdk:xmlsec1-1.2.30-r0 do_configure: QA Issue: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
It will eventually arise after the configure QA as the configure script should only look at the staging sysroot dir, not at the host.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
--- a/configure.ac.orig 2021-01-13 14:37:42.254991177 +0000
+++ b/configure.ac 2021-01-13 14:40:56.546269330 +0000
@@ -250,8 +250,8 @@
dnl ==========================================================================
dnl Common installation locations
dnl ==========================================================================
-COMMON_INCLUDE_DIR="/usr/include /usr/local/include"
-COMMON_LIB_DIR="/usr/lib /usr/lib64 /usr/local/lib"
+COMMON_INCLUDE_DIR="${STAGING_INCDIR}"
+COMMON_LIB_DIR="${STAGING_LIBDIR}"
case $host in
i*86-*-linux-gnu) COMMON_LIB_DIR="$COMMON_LIB_DIR /usr/lib/i386-linux-gnu" ;;
x86_64-*-linux-gnu) COMMON_LIB_DIR="$COMMON_LIB_DIR /usr/lib/x86_64-linux-gnu" ;;

View File

@@ -0,0 +1,26 @@
From 847dc52f5a50e34ee4d6e3dc2c708711747a58ca Mon Sep 17 00:00:00 2001
From: Yulong Pei <Yulong.pei@windriver.com>
Date: Thu, 21 Jan 2010 14:11:20 +0800
Subject: [PATCH] force to use our own libtool
Upstream-Status: Inappropriate [ OE specific ]
Signed-off-by: Yulong Pei <Yulong.pei@windriver.com>
---
ltmain.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ltmain.sh b/ltmain.sh
index 147d758..a61f16b 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -6969,7 +6969,7 @@ func_mode_link ()
dir=$func_resolve_sysroot_result
# We need an absolute path.
case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
+ =* | [\\/]* | [A-Za-z]:[\\/]*) ;;
*)
absdir=`cd "$dir" && pwd`
test -z "$absdir" && \

View File

@@ -0,0 +1,42 @@
From 83a1381e1d6bd1b5ec3df6f7c4bc1f4fe4f860b6 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Thu, 15 Jun 2017 14:44:01 +0800
Subject: [PATCH] xmlsec1: add new recipe
This enables the building of the examples directory
and it's installed as ptest.
Upstream-Status: Inappropriate [ OE ptest specific ]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
examples/Makefile | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/examples/Makefile b/examples/Makefile
index 02480c2..cbc2661 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -8,9 +8,17 @@ PROGRAMS = \
decrypt1 decrypt2 decrypt3 \
xmldsigverify
+ifndef CC
CC = gcc
-CFLAGS += -g $(shell xmlsec1-config --cflags) -DUNIX_SOCKETS -Wall -Wextra
-LDLIBS += -g $(shell xmlsec1-config --libs)
+endif
+
+CFLAGS += -I../include -g $(shell PKG_CONFIG_PATH=.. pkg-config --cflags xmlsec1 ) -DUNIX_SOCKETS -Wall -Wextra
+LDLIBS += -L../src/.libs -g $(shell PKG_CONFIG_PATH=.. pkg-config --libs xmlsec1 )
+
+DESTDIR = /usr/share/xmlsec1
+install-ptest:
+ if [ ! -d $(DESTDIR) ]; then mkdir -p $(DESTDIR); fi
+ cp * $(DESTDIR)
all: $(PROGRAMS)
--
2.25.1

View File

@@ -0,0 +1,85 @@
#!/bin/sh
check_return() {
if [ $? == 0 ]; then
echo -e "PASS: $1\n"
else
echo -e "FAIL: $1\n"
fi
}
echo "---------------------------------------------------"
echo "Signing a template file..."
./sign1 sign1-tmpl.xml rsakey.pem > sign1-res.xml
./verify1 sign1-res.xml rsapub.pem
check_return sign-tmpl
echo "---------------------------------------------------"
echo "Signing a dynamicaly created template..."
./sign2 sign2-doc.xml rsakey.pem > sign2-res.xml
./verify1 sign2-res.xml rsapub.pem
check_return sign-dynamic-templ
echo "---------------------------------------------------"
echo "Signing with X509 certificate..."
./sign3 sign3-doc.xml rsakey.pem rsacert.pem > sign3-res.xml
./verify3 sign3-res.xml ca2cert.pem cacert.pem
check_return sign-x509
echo "---------------------------------------------------"
echo "Verifying a signature with a single key..."
./verify1 sign1-res.xml rsapub.pem
./verify1 sign2-res.xml rsapub.pem
check_return verify-single-key
echo "---------------------------------------------------"
echo "Verifying a signature with keys manager..."
./verify2 sign1-res.xml rsapub.pem
./verify2 sign2-res.xml rsapub.pem
check_return verify-keys-manager
echo "---------------------------------------------------"
echo "Verifying a signature with X509 certificates..."
./verify3 sign3-res.xml ca2cert.pem cacert.pem
check_return verify-x509
echo "---------------------------------------------------"
echo "Verifying a signature with additional restrictions..."
./verify4 verify4-res.xml ca2cert.pem cacert.pem
check_return verify-res
echo "---------------------------------------------------"
echo "Encrypting data with a template file..."
./encrypt1 encrypt1-tmpl.xml deskey.bin > encrypt1-res.xml
./decrypt1 encrypt1-res.xml deskey.bin
check_return encrypt-tmpl
echo "---------------------------------------------------"
echo "Encrypting data with a dynamicaly created template..."
./encrypt2 encrypt2-doc.xml deskey.bin > encrypt2-res.xml
./decrypt1 encrypt2-res.xml deskey.bin
check_return encrypt-dynamic-tmpl
echo "---------------------------------------------------"
echo "Encrypting data with a session key..."
./encrypt3 encrypt3-doc.xml rsakey.pem > encrypt3-res.xml
./decrypt3 encrypt3-res.xml
check_return encrypt-session-key
echo "---------------------------------------------------"
echo "Decrypting data with a single key..."
./decrypt1 encrypt1-res.xml deskey.bin
./decrypt1 encrypt2-res.xml deskey.bin
check_return encrypt-single-key
echo "---------------------------------------------------"
echo "Decrypting data with keys manager..."
./decrypt2 encrypt1-res.xml deskey.bin
./decrypt2 encrypt2-res.xml deskey.bin
check_return encrypt-keys-manager
echo "---------------------------------------------------"
echo "Writing a custom keys manager..."
./decrypt3 encrypt1-res.xml
./decrypt3 encrypt2-res.xml
check_return write-keys-manager

View File

@@ -0,0 +1,32 @@
From 0c38c6864e7ba8f53a657d87894f24374a6a4932 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 30 Dec 2014 11:18:17 +0800
Subject: [PATCH] examples: allow build in separate dir
Upstream-Status: Inappropriate [ OE specific ]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
examples/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/examples/Makefile b/examples/Makefile
index cbc2661..e882b61 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -12,8 +12,10 @@ ifndef CC
CC = gcc
endif
-CFLAGS += -I../include -g $(shell PKG_CONFIG_PATH=.. pkg-config --cflags xmlsec1 ) -DUNIX_SOCKETS -Wall -Wextra
-LDLIBS += -L../src/.libs -g $(shell PKG_CONFIG_PATH=.. pkg-config --libs xmlsec1 )
+top_srcdir = ..
+top_builddir = ..
+CFLAGS += -I$(top_srcdir)/include -g $(shell PKG_CONFIG_PATH=$(top_srcdir) pkg-config --cflags xmlsec1 ) -DUNIX_SOCKETS -Wall -Wextra
+LDLIBS += -L$(top_builddir)/src/.libs -g $(shell PKG_CONFIG_PATH=$(top_srcdir) pkg-config --libs xmlsec1 )
DESTDIR = /usr/share/xmlsec1
install-ptest:
--
2.25.1

View File

@@ -0,0 +1,68 @@
SUMMARY = "XML Security Library is a C library based on LibXML2"
DESCRIPTION = "\
XML Security Library is a C library based on \
LibXML2 and OpenSSL. The library was created with a goal to support major \
XML security standards "XML Digital Signature" and "XML Encryption". \
"
HOMEPAGE = "http://www.aleksey.com/xmlsec/"
DEPENDS = "libtool libxml2 libxslt zlib"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=352791d62092ea8104f085042de7f4d0"
SECTION = "libs"
SRC_URI = "http://www.aleksey.com/xmlsec/download/${BP}.tar.gz \
file://fix-ltmain.sh.patch \
file://change-finding-path-of-nss.patch \
file://makefile-ptest.patch \
file://xmlsec1-examples-allow-build-in-separate-dir.patch \
file://0001-nss-nspr-fix-for-multilib.patch \
file://run-ptest \
file://ensure-search-path-non-host.patch \
file://0001-xmldsigverify-Include-xmlsec-parser.h.patch \
"
SRC_URI[sha256sum] = "5f8dfbcb6d1e56bddd0b5ec2e00a3d0ca5342a9f57c24dffde5c796b2be2871c"
inherit autotools-brokensep ptest pkgconfig
#CFLAGS += "-I${STAGING_INCDIR}/nss3"
#CPPFLAGS += "-I${STAGING_INCDIR}/nss3"
PACKAGECONFIG ??= "gnutls libgcrypt nss openssl des"
PACKAGECONFIG[gnutls] = ",,gnutls"
PACKAGECONFIG[libgcrypt] = ",,libgcrypt"
PACKAGECONFIG[nss] = "--with-nss=${STAGING_DIR_HOST} --with-nspr=${STAGING_DIR_HOST},--with-nss=no --with-nspr=no,nss nspr"
PACKAGECONFIG[openssl] = ",,openssl"
PACKAGECONFIG[des] = ",--disable-des,,"
# these can be dynamically loaded with xmlSecCryptoDLLoadLibrary()
FILES_SOLIBSDEV = "${libdir}/libxmlsec1.so"
FILES:${PN} += "${libdir}/libxmlsec1-*.so"
INSANE_SKIP:${PN} = "dev-so"
FILES:${PN}-dev += "${libdir}/xmlsec1Conf.sh"
FILES:${PN}-dbg += "${PTEST_PATH}/.debug/*"
RDEPENDS:${PN}-ptest += "${PN}-dev"
INSANE_SKIP:${PN}-ptest += "dev-deps"
PTEST_EXTRA_ARGS = "top_srcdir=${S} top_builddir=${B}"
do_compile_ptest () {
oe_runmake -C ${S}/examples ${PTEST_EXTRA_ARGS} all
}
do_install:append() {
for i in ${bindir}/xmlsec1-config ${libdir}/xmlsec1Conf.sh \
${libdir}/pkgconfig/xmlsec1-openssl.pc; do
sed -i -e "s@${RECIPE_SYSROOT}@@g" ${D}$i
done
}
do_install_ptest () {
oe_runmake -C ${S}/examples DESTDIR=${D}${PTEST_PATH} ${PTEST_EXTRA_ARGS} install-ptest
}
BBCLASSEXTEND = "native"