Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,34 @@
From e3adc816d2d56dd929016073937ba24e01e03cb8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 20 Dec 2018 17:37:48 -0800
Subject: [PATCH] Woverride-init is not needed with gcc 9
Fixes
| ../../gnupg-2.2.12/dirmngr/dns.h:525:16: error: lvalue required as
unary '&' operand |
525 | dns_rr_i_init(&dns_quietinit((struct dns_rr_i){ 0, __VA_ARGS__
}), (P))
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
dirmngr/dns.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dirmngr/dns.h b/dirmngr/dns.h
index 024d6dcc8..c6e141e16 100644
--- a/dirmngr/dns.h
+++ b/dirmngr/dns.h
@@ -139,7 +139,7 @@ DNS_PUBLIC int *dns_debug_p(void);
#define DNS_PRAGMA_QUIET _Pragma("clang diagnostic ignored \"-Winitializer-overrides\"")
#define DNS_PRAGMA_POP _Pragma("clang diagnostic pop")
-#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4
+#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4 && __GNUC__ < 9)
#define DNS_PRAGMA_PUSH _Pragma("GCC diagnostic push")
#define DNS_PRAGMA_QUIET _Pragma("GCC diagnostic ignored \"-Woverride-init\"")
#define DNS_PRAGMA_POP _Pragma("GCC diagnostic pop")
--
2.17.1
@@ -0,0 +1,28 @@
From 8b9e3d286e87bc978ec6bb9cfd790d8d253b79c3 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 22 Jan 2018 18:00:21 +0200
Subject: [PATCH] configure.ac: use a custom value for the location of
gpg-agent socket in the filesystem
This should avoid clashes with the host gpg-agent observed on autobuilders.
Upstream-Status: Inappropriate [oe-core specific, and only for -native]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index a547401..60bc2c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1922,7 +1922,7 @@ AC_DEFINE_UNQUOTED(GPGCONF_DISP_NAME, "GPGConf",
AC_DEFINE_UNQUOTED(GPGTAR_NAME, "gpgtar", [The name of the gpgtar tool])
-AC_DEFINE_UNQUOTED(GPG_AGENT_SOCK_NAME, "S.gpg-agent",
+AC_DEFINE_UNQUOTED(GPG_AGENT_SOCK_NAME, "S.gpg-agent.yocto-native",
[The name of the agent socket])
AC_DEFINE_UNQUOTED(GPG_AGENT_EXTRA_SOCK_NAME, "S.gpg-agent.extra",
[The name of the agent socket for remote access])
@@ -0,0 +1,102 @@
From d9048788d906774b1475c3bb1b17e22455c2add4 Mon Sep 17 00:00:00 2001
From: Saul Wold <sgw@linux.intel.com>
Date: Wed, 16 Aug 2017 11:16:30 +0800
Subject: [PATCH] use pkgconfig instead of npth config
Upstream-Status: Inappropriate [openembedded specific]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Rebase to 2.1.23
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
m4/npth.m4 | 53 ++++++++---------------------------------------------
1 file changed, 8 insertions(+), 45 deletions(-)
diff --git a/m4/npth.m4 b/m4/npth.m4
index 619ed89..0cb354d 100644
--- a/m4/npth.m4
+++ b/m4/npth.m4
@@ -19,25 +19,10 @@ AC_DEFUN([_AM_PATH_NPTH_CONFIG],
if test "x$npth_config_prefix" != x ; then
NPTH_CONFIG="$npth_config_prefix/bin/npth-config"
fi
+ AC_PATH_PROG(PKGCONFIG, pkg-config, no)
- use_gpgrt_config=""
- if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
- if $GPGRT_CONFIG npth --exists; then
- NPTH_CONFIG="$GPGRT_CONFIG npth"
- AC_MSG_NOTICE([Use gpgrt-config as npth-config])
- use_gpgrt_config=yes
- fi
- fi
- if test -z "$use_gpgrt_config"; then
- AC_PATH_PROG(NPTH_CONFIG, npth-config, no)
- fi
-
- if test "$NPTH_CONFIG" != "no" ; then
- if test -z "$use_gpgrt_config"; then
- npth_version=`$NPTH_CONFIG --version`
- else
- npth_version=`$NPTH_CONFIG --modversion`
- fi
+ if test "$PKGCONFIG" != "no" ; then
+ npth_version=`$PKGCONFIG --modversion npth`
fi
npth_version_major=`echo $npth_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
@@ -62,7 +47,7 @@ AC_DEFUN([AM_PATH_NPTH],
AC_MSG_CHECKING(for NPTH - version >= $min_npth_version)
ok=no
- if test "$NPTH_CONFIG" != "no" ; then
+ if test "$PKGCONFIG" != "no" ; then
req_major=`echo $min_npth_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
req_minor=`echo $min_npth_version | \
@@ -83,32 +68,9 @@ AC_DEFUN([AM_PATH_NPTH],
fi
if test $ok = yes; then
AC_MSG_RESULT([yes ($npth_version)])
- else
- AC_MSG_RESULT(no)
- fi
- if test $ok = yes; then
- # If we have a recent NPTH, we should also check that the
- # API is compatible.
- if test "$req_npth_api" -gt 0 ; then
- if test -z "$use_gpgrt_config"; then
- tmp=`$NPTH_CONFIG --api-version 2>/dev/null || echo 0`
- else
- tmp=`$NPTH_CONFIG --variable=api_version 2>/dev/null || echo 0`
- fi
- if test "$tmp" -gt 0 ; then
- AC_MSG_CHECKING([NPTH API version])
- if test "$req_npth_api" -eq "$tmp" ; then
- AC_MSG_RESULT([okay])
- else
- ok=no
- AC_MSG_RESULT([does not match. want=$req_npth_api got=$tmp])
- fi
- fi
- fi
- fi
- if test $ok = yes; then
- NPTH_CFLAGS=`$NPTH_CONFIG --cflags`
- NPTH_LIBS=`$NPTH_CONFIG --libs`
+ NPTH_CFLAGS=`$PKGCONFIG --cflags npth`
+ NPTH_LIBS=`$PKGCONFIG --libs npth`
+ AC_MSG_WARN([[GOT HERE - $NPTH_LIBS ]])
ifelse([$2], , :, [$2])
if test -z "$use_gpgrt_config"; then
npth_config_host=`$NPTH_CONFIG --host 2>/dev/null || echo none`
@@ -128,6 +90,7 @@ AC_DEFUN([AM_PATH_NPTH],
fi
fi
else
+ AC_MSG_RESULT(no)
NPTH_CFLAGS=""
NPTH_LIBS=""
ifelse([$3], , :, [$3])
@@ -0,0 +1,34 @@
From 914ae4a3f7529fb069467bf0ded57dd24ee2e763 Mon Sep 17 00:00:00 2001
From: Wenzong Fan <wenzong.fan@windriver.com>
Date: Wed, 16 Aug 2017 11:23:22 +0800
Subject: [PATCH 4/4] autogen.sh: fix find-version for beta checking
find-version always assumes that gnupg is beta if autogen.sh is run
out of git-repo. This doesn't work for users whom just take release
tarball and re-run autoconf in their local build dir.
Upstream-Status: Pending
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Rebase to 2.1.23
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
autogen.sh | 1 -
1 file changed, 1 deletion(-)
diff --git a/autogen.sh b/autogen.sh
index e5ba5bf..05e0e11 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -245,7 +245,6 @@ if [ "$myhost" = "find-version" ]; then
rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
else
ingit=no
- beta=yes
tmp="-unknown"
rev="0000000"
rvd="0"
--
1.8.3.1
@@ -0,0 +1,82 @@
From c4ddea8e6070d1df51058aac08088e27c37e7e73 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Wed, 19 Sep 2018 14:44:40 +0100
Subject: [PATCH] Allow the environment to override where gnupg looks for its
own files. Useful in native builds.
Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
common/homedir.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/common/homedir.c b/common/homedir.c
index 286685f..212a945 100644
--- a/common/homedir.c
+++ b/common/homedir.c
@@ -1213,7 +1213,7 @@ gnupg_socketdir (void)
if (!name)
{
unsigned int dummy;
- name = _gnupg_socketdir_internal (0, &dummy);
+ name = getenv("GNUPG_SOCKETDIR") ?: _gnupg_socketdir_internal (0, &dummy);
gpgrt_annotate_leaked_object (name);
}
@@ -1245,7 +1245,7 @@ gnupg_sysconfdir (void)
if (dir)
return dir;
else
- return GNUPG_SYSCONFDIR;
+ return getenv("GNUPG_SYSCONFDIR") ?: GNUPG_SYSCONFDIR;
#endif /*!HAVE_W32_SYSTEM*/
}
@@ -1281,7 +1281,7 @@ gnupg_bindir (void)
return name;
}
else
- return GNUPG_BINDIR;
+ return getenv("GNUPG_BINDIR") ?: GNUPG_BINDIR;
#endif /*!HAVE_W32_SYSTEM*/
}
@@ -1308,7 +1308,7 @@ gnupg_libexecdir (void)
return name;
}
else
- return GNUPG_LIBEXECDIR;
+ return getenv("GNUPG_LIBEXECDIR") ?: GNUPG_LIBEXECDIR;
#endif /*!HAVE_W32_SYSTEM*/
}
@@ -1338,7 +1338,7 @@ gnupg_libdir (void)
return name;
}
else
- return GNUPG_LIBDIR;
+ return getenv("GNUPG_LIBDIR") ?: GNUPG_LIBDIR;
#endif /*!HAVE_W32_SYSTEM*/
}
@@ -1369,7 +1369,7 @@ gnupg_datadir (void)
return name;
}
else
- return GNUPG_DATADIR;
+ return getenv("GNUPG_DATADIR") ?: GNUPG_DATADIR;
#endif /*!HAVE_W32_SYSTEM*/
}
@@ -1401,7 +1401,7 @@ gnupg_localedir (void)
return name;
}
else
- return LOCALEDIR;
+ return getenv("LOCALEDIR") ?: LOCALEDIR;
#endif /*!HAVE_W32_SYSTEM*/
}
@@ -0,0 +1,87 @@
SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
DESCRIPTION = "A complete and free implementation of the OpenPGP standard \
as defined by RFC4880 (also known as PGP). GnuPG allows you to encrypt \
and sign your data and communications; it features a versatile key \
management system, along with access modules for all kinds of public \
key directories."
HOMEPAGE = "http://www.gnupg.org/"
LICENSE = "GPL-3.0-only & LGPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=189af8afca6d6075ba6c9e0aa8077626 \
file://COPYING.LGPL3;md5=a2b6bf2cb38ee52619e60f30a1fc7257"
DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
inherit autotools gettext texinfo pkgconfig
UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
file://0002-use-pkgconfig-instead-of-npth-config.patch \
file://0004-autogen.sh-fix-find-version-for-beta-checking.patch \
file://0001-Woverride-init-is-not-needed-with-gcc-9.patch \
"
SRC_URI:append:class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch \
file://relocate.patch"
SRC_URI:append:class-nativesdk = " file://relocate.patch"
SRC_URI[sha256sum] = "97eb47df8ae5a3ff744f868005a090da5ab45cb48ee9836dbf5ee739a4e5cf49"
EXTRA_OECONF = "--disable-ldap \
--disable-ccid-driver \
--with-zlib=${STAGING_LIBDIR}/.. \
--with-bzip2=${STAGING_LIBDIR}/.. \
--with-readline=${STAGING_LIBDIR}/.. \
--with-mailprog=${sbindir}/sendmail \
--enable-gpg-is-gpg2 \
"
# A minimal package containing just enough to run gpg+gpgagent (E.g. use gpgme in opkg)
PACKAGES =+ "${PN}-gpg"
FILES:${PN}-gpg = " \
${bindir}/gpg \
${bindir}/gpg2 \
${bindir}/gpg-agent \
"
# Normal package (gnupg) should depend on minimal package (gnupg-gpg)
# to ensure all tools are included. This is done only in non-native
# builds. Native builds don't have sub-packages, so appending RDEPENDS
# in this case breaks recipe parsing.
RDEPENDS:${PN} += "${@ "" if ("native" in d.getVar("PN")) else (d.getVar("PN") + "-gpg")}"
RRECOMMENDS:${PN} = "pinentry"
do_configure:prepend () {
# Else these could be used in prefernce to those in aclocal-copy
rm -f ${S}/m4/gpg-error.m4
rm -f ${S}/m4/libassuan.m4
rm -f ${S}/m4/ksba.m4
rm -f ${S}/m4/libgcrypt.m4
}
do_install:append() {
ln -sf gpg2 ${D}${bindir}/gpg
ln -sf gpgv2 ${D}${bindir}/gpgv
}
do_install:append:class-native() {
create_wrappers ${STAGING_BINDIR_NATIVE}
}
do_install:append:class-nativesdk() {
create_wrappers ${SDKPATHNATIVE}${bindir_nativesdk}
}
create_wrappers() {
for i in gpg2 gpgconf gpg-agent gpg-connect-agent; do
create_wrapper ${D}${bindir}/$i GNUPG_BINDIR=$1
done
}
PACKAGECONFIG ??= "gnutls"
PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls"
PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
BBCLASSEXTEND = "native nativesdk"
lcl_maybe_fortify:mipsarch = ""