Merge pull request #1727 from flatcar/buildbot/weekly-portage-stable-package-updates-2024-03-04

Weekly portage-stable package updates 2024-03-04
This commit is contained in:
Krzesimir Nowak 2024-03-06 16:05:13 +01:00 committed by GitHub
commit 93c4a369a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
245 changed files with 5754 additions and 6068 deletions

View File

@ -246,7 +246,6 @@ dev-perl/File-Slurp
dev-perl/Parse-Yapp
dev-python/autocommand
dev-python/boto
dev-python/crcmod
dev-python/cython
dev-python/distro

View File

@ -0,0 +1 @@
- dnsmasq ([CVE-2023-28450](https://nvd.nist.gov/vuln/detail/CVE-2023-28450), [CVE-2023-50387](https://nvd.nist.gov/vuln/detail/CVE-2023-50387), [CVE-2023-50868](https://nvd.nist.gov/vuln/detail/CVE-2023-50868))

View File

@ -0,0 +1,4 @@
- gnupg ([2.4.4](https://lists.gnupg.org/pipermail/gnupg-announce/2024q1/000481.html))
- libksba ([1.6.6](https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libksba.git;a=blob;f=NEWS;h=48b42025773e88fbb78d015d1f154fef4c80ef9f;hb=5b220df6f8216a9d5f6139c7b17f075374a27480))
- sqlite ([3.45.1](https://www.sqlite.org/releaselog/3_45_1.html))
- util-linux ([2.39.3](https://github.com/util-linux/util-linux/blob/v2.39.3/Documentation/releases/v2.39.3-ReleaseNotes))

View File

@ -0,0 +1,8 @@
This is a straight copy of Gentoo package, with no modifications at
all. The reason for keeping it in overlay is that upstream plans to
drop the package on 28th March, 2024.
The package is needed only by the app-emulation/google-compute-engine
package, which is quite old (version string mentions 2019), so work
needs to be done to update it in order to drop the dependency on the
obsolete boto package (Gentoo has dev-python/boto3 package).

View File

@ -7,9 +7,6 @@
# Gentoo upstream package stabilisation
# (the following packages are "unstable" upstream; we're stabilising these)
# Keep versions on both arches in sync.
=app-arch/xz-utils-5.4.6-r1 ~arm64
=app-containers/containerd-1.7.13 ~amd64 ~arm64 # DO NOT EDIT THIS LINE. Added by containerd-apply-patch.sh on 2024-02-02 08:15:57
=app-containers/cri-tools-1.27.0 ~amd64 ~arm64
=app-containers/runc-1.1.12 ~amd64 ~arm64
@ -20,9 +17,6 @@
# Needed by arm64-native SDK.
=app-crypt/efitools-1.9.2-r1 ~arm64
# Needed for addressing security issues related to smartcard keys.
=app-crypt/gnupg-2.2.42-r2 ~arm64
# Needed to fix CVE-2023-36054.
=app-crypt/mit-krb5-1.21.2 ~arm64
@ -59,8 +53,7 @@
=dev-libs/libp11-0.4.12-r6 ~arm64
=dev-libs/opensc-0.24.0 ~arm64
=dev-util/bpftool-6.5.7 ~arm64
=net-dns/bind-tools-9.16.48 ~arm64
=net-dns/libidn2-2.3.7 ~arm64
=net-dns/dnsmasq-2.90 ~arm64
=net-firewall/conntrack-tools-1.4.6-r1 ~arm64
# Required for addressing CVE-2023-0361, CVE-2023-5981, CVE-2024-0567
@ -70,7 +63,6 @@
# Keep versions on both arches in sync.
=net-libs/libnetfilter_cthelper-1.0.1-r1 ~arm64
=net-libs/libnetfilter_cttimeout-1.0.1 ~arm64
=net-libs/libpsl-0.21.5 ~arm64
# Needed for addressing CVE-2023-46218, CVE-2023-46219 and CVE-2024-0853
=net-misc/curl-8.6.0-r1 ~amd64 ~arm64
@ -83,7 +75,6 @@
# Keep versions on both arches in sync.
=sys-apps/kexec-tools-2.0.24 ~arm64
=sys-apps/util-linux-2.39.2-r1 ~amd64
# Enable ipvsadm for arm64.
=sys-cluster/ipvsadm-1.31-r1 ~arm64

View File

@ -17,3 +17,7 @@
# portage-stable masked catalyst-3, and has not provided a stable way to
# update to catalyst-4 so overriding the change for now to use catalyst-3
<dev-util/catalyst-4
# Overwrite portage-stable mask. We still have one package that
# depends on dev-python/boto.
dev-python/boto

View File

@ -16,7 +16,7 @@ SRC_URI+=" verify-sig? ( https://sourceware.org/pub/${PN}/${P}.tar.gz.sig )"
LICENSE="BZIP2"
SLOT="0/1" # subslot = SONAME
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos"
IUSE="static static-libs"
BDEPEND="

View File

@ -11,7 +11,7 @@ SRC_URI="mirror://gnu/cpio/${P}.tar.bz2"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="nls"
PDEPEND="

View File

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit multilib-minimal toolchain-funcs verify-sig
inherit libtool multilib-minimal toolchain-funcs verify-sig
DESCRIPTION="Multi-format archive and compression library"
HOMEPAGE="
@ -78,6 +78,13 @@ PATCHES=(
"${FILESDIR}/${P}-lrzip.patch"
)
src_prepare() {
default
# Needed for flags to be respected w/ LTO
elibtoolize
}
multilib_src_configure() {
export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923

View File

@ -9,7 +9,7 @@ SRC_URI="https://www.lzop.org/download/${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
RDEPEND=">=dev-libs/lzo-2"
DEPEND="${RDEPEND}"

View File

@ -0,0 +1,43 @@
https://github.com/tukaani-project/xz/commit/5c91b454c24e043ca8f2cc7d2b09bd091dafe655
From 5c91b454c24e043ca8f2cc7d2b09bd091dafe655 Mon Sep 17 00:00:00 2001
From: Jia Tan <jiat0218@gmail.com>
Date: Tue, 27 Feb 2024 23:42:41 +0800
Subject: [PATCH] xz: Change logging level for thread reduction to highest
verbosity only.
Now that multi threaded encoding is the default, users do not need to
see a warning message everytime the number of threads is reduced. On
some machines, this could happen very often. It is not unreasonable for
users to need to set double verbose mode to see this kind of
information.
To see these warning messages -vv or --verbose --verbose must be passed
to set xz into the highest possible verbosity mode.
These warnings had caused automated testing frameworks to fail when they
expected no output to stderr.
Thanks to Sebastian Andrzej Siewior for reporting this and for the
initial version of the patch.
--- a/src/xz/coder.c
+++ b/src/xz/coder.c
@@ -581,7 +581,7 @@ coder_set_compression_settings(void)
if (memory_usage <= memory_limit) {
// The memory usage is now low enough.
- message(V_WARNING, _("Reduced the number of "
+ message(V_DEBUG, _("Reduced the number of "
"threads from %s to %s to not exceed "
"the memory usage limit of %s MiB"),
uint64_to_str(
@@ -601,7 +601,7 @@ coder_set_compression_settings(void)
// time the soft limit will never make xz fail and never make
// xz change settings that would affect the compressed output.
if (hardware_memlimit_mtenc_is_default()) {
- message(V_WARNING, _("Reduced the number of threads "
+ message(V_DEBUG, _("Reduced the number of threads "
"from %s to one. The automatic memory usage "
"limit of %s MiB is still being exceeded. "
"%s MiB of memory is required. "

View File

@ -35,7 +35,7 @@ else
"
if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
S="${WORKDIR}/${MY_P}"

View File

@ -0,0 +1,145 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Remember: we cannot leverage autotools in this ebuild in order
# to avoid circular deps with autotools
EAPI=8
inherit flag-o-matic libtool multilib multilib-minimal preserve-libs toolchain-funcs
if [[ ${PV} == 9999 ]] ; then
# Per tukaani.org, git.tukaani.org is a mirror of github and
# may be behind.
EGIT_REPO_URI="
https://github.com/tukaani-project/xz
https://git.tukaani.org/xz.git
"
inherit git-r3 autotools
# bug #272880 and bug #286068
BDEPEND="sys-devel/gettext >=dev-build/libtool-2"
else
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jiatan.asc
inherit verify-sig
MY_P="${PN/-utils}-${PV/_}"
SRC_URI="
https://github.com/tukaani-project/xz/releases/download/v${PV/_}/${MY_P}.tar.gz
mirror://sourceforge/lzmautils/${MY_P}.tar.gz
https://tukaani.org/xz/${MY_P}.tar.gz
verify-sig? (
https://github.com/tukaani-project/xz/releases/download/v${PV/_}/${MY_P}.tar.gz.sig
https://tukaani.org/xz/${MY_P}.tar.gz.sig
)
"
if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
S="${WORKDIR}/${MY_P}"
fi
DESCRIPTION="Utils for managing LZMA compressed files"
HOMEPAGE="https://tukaani.org/xz/"
# See top-level COPYING file as it outlines the various pieces and their licenses.
LICENSE="0BSD LGPL-2.1+ GPL-2+ doc? ( CC-BY-SA-4.0 )"
SLOT="0"
IUSE="cpu_flags_arm_crc32 doc +extra-filters pgo nls static-libs"
if [[ ${PV} != 9999 ]] ; then
BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-jiatan )"
fi
PATCHES=(
"${FILESDIR}"/${P}-logging-verbosity-threads-auto.patch
)
src_prepare() {
default
if [[ ${PV} == 9999 ]] ; then
eautopoint
eautoreconf
else
# Allow building shared libs on Solaris/x64
elibtoolize
fi
}
multilib_src_configure() {
local myconf=(
--enable-threads
$(multilib_native_use_enable doc)
$(use_enable nls)
$(use_enable static-libs static)
$(use_enable cpu_flags_arm_crc32 arm64-crc32)
)
if ! multilib_is_native_abi ; then
myconf+=(
--disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts}
)
fi
if ! use extra-filters ; then
myconf+=(
# LZMA1 + LZMA2 for standard .lzma & .xz files
--enable-encoders=lzma1,lzma2
--enable-decoders=lzma1,lzma2
# those are used by default, depending on preset
--enable-match-finders=hc3,hc4,bt4
# CRC64 is used by default, though some (old?) files use CRC32
--enable-checks=crc32,crc64
)
fi
if [[ ${CHOST} == *-solaris* ]] ; then
export gl_cv_posix_shell="${EPREFIX}"/bin/sh
# Undo Solaris-based defaults pointing to /usr/xpg5/bin
myconf+=( --disable-path-for-script )
fi
ECONF_SOURCE="${S}" econf "${myconf[@]}"
}
multilib_src_compile() {
# -fprofile-partial-training because upstream note the test suite isn't super comprehensive
# See https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
local pgo_generate_flags=$(usev pgo "-fprofile-update=atomic -fprofile-dir=${T}/${ABI}-pgo -fprofile-generate=${T}/${ABI}-pgo $(test-flags-CC -fprofile-partial-training)")
local pgo_use_flags=$(usev pgo "-fprofile-use=${T}/${ABI}-pgo -fprofile-dir=${T}/${ABI}-pgo $(test-flags-CC -fprofile-partial-training)")
emake CFLAGS="${CFLAGS} ${pgo_generate_flags}"
if use pgo ; then
emake CFLAGS="${CFLAGS} ${pgo_generate_flags}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/${ABI}-pgo --output="${T}"/${ABI}-pgo/default.profdata || die
fi
emake clean
emake CFLAGS="${CFLAGS} ${pgo_use_flags}"
fi
}
multilib_src_install_all() {
find "${ED}" -type f -name '*.la' -delete || die
if use doc ; then
rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
fi
}
pkg_preinst() {
preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
}
pkg_postinst() {
preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
}

View File

@ -12,7 +12,7 @@ S="${WORKDIR}"/${P}/build/meson
LICENSE="|| ( BSD GPL-2 )"
SLOT="0/1"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="+lzma lz4 static-libs test zlib"
RESTRICT="!test? ( test )"

View File

@ -1,8 +1,4 @@
DIST gnupg-2.2.41.tar.bz2 7313746 BLAKE2B 0be2965a646a8636a127f89329030860908b0bbc447381782527459aed85f5276c29e7a2c89f87cb715407d9f1aabbf3ae1765073764d05e422035e8d5962569 SHA512 f472e5058ea9881355f0c754a47acd0b5360c36e8976b8563dbc763a7cef792bf88227cc15fe5172d3e9bb9fc34d8448dd5c183949031e91a1997cc7f0f83b55
DIST gnupg-2.2.41.tar.bz2.sig 238 BLAKE2B 7a4dc8dd4b3da77f6684325f46e3e3b1aeac6fcd8382e3148da1a01a5c5a9e14c1352fb28b61e500388d647e1103b8f78ad49e467e01b732c4a13eb849859b98 SHA512 ac6edd35c6b02a02d6c8a4468332213f20159f972aa2f7fd25c6841c662b3d84db5230330d540e0785ddaff080daf8dd250292104ff47560ad59c11803aabefa
DIST gnupg-2.2.42.tar.bz2 7434291 BLAKE2B 5f7f01f31949e5258d638fbff81fa641e5c167e6eaf32c55eb187d4a31b31cd4fe6e51c622e74d8544c4f95c75484e15117f26a8cf26055ff6813d75e54f2b8a SHA512 9c59d034f428d42323b5520e1a8984acc1505ba1d96d90f00e17b24aa91660b2dc64e1a3ceb044c56f39b4c402a77c7e0b226c65218c23c094781b4ef51e2eb5
DIST gnupg-2.2.42.tar.bz2.sig 238 BLAKE2B 251ad0a832042ceb93b0edfda8652104bfb463e291322f22f0ab0d9b35606c3589be7a6f3e9e2aac8f6ac368a7d11840ab83b29997587dc65685de9f2dec3fee SHA512 7073bfc920c571680a1de57b4e6cd83cde24ccb3b5f592602b0c32fd762eef497027b08745044c9f41130ca99bb7ec77222568c2d0a1099d3c1c15137e0221d7
DIST gnupg-2.4.3.tar.bz2 7351327 BLAKE2B b7f4f5e548ec6dfc89cf8792f507ee8642e8500692998cf8d2edc9f5d8002904d24a714b9caffabee6094707c4595e0f54197535135622a7a32aa772f5818f28 SHA512 193a9398445272ec3eb5b79e802efb7414f74bcfffc3db0bf72c0056e04228120c419ed91db168e5733a16a33e548bab5368dd9cf11ecd483825bce189341a1e
DIST gnupg-2.4.3.tar.bz2.sig 119 BLAKE2B 763c0569e5378e132de39e1583c19bae8912455bf7cd5a65bcfc88fa43be99fb6bbf8397192b3086db2f6f0f63fc25789f5e6ce98b2fe63cda3bf673b1c60a20 SHA512 7affff694d194c3befdfc865a7872c0883304ea704e3691eac328d802f12f4f82c2a93eaa1257d3e09b38494b38185f5b8cf35c964f0c3846bbb29b93727ffee
DIST gnupg-2.4.4.tar.bz2 7886036 BLAKE2B 02661e89f0358be09fa3e71e7235b764a7dbda62a48a0c8c7a4e6c9919c3b37d54ead50b930af58f8f2fdb87861b849d3f3751e95cbedf46bdfd76caa90c4db4 SHA512 3d1a3b08d1ce2319d238d8be96591e418ede1dc0b4ede33a4cc2fe40e9c56d5bbc27b1984736d8a786e7f292ddbc836846a8bdb4bf89f064e953c37cb54b94ef
DIST gnupg-2.4.4.tar.bz2.sig 237 BLAKE2B 6ee5878c36fbec747a6d84a268903749d862aab50dd7f9a389aabbf7b94dec1c424615f520b5f4a6d44e02093e8d9ad0b08d0c6cf6fd8886d8c174ce9faac99c SHA512 3ae7b6833576df851901a7619459b514bb82faeed350c864a57a782719d21f694d9ced5a3445c81dfa584a0302f87fedc660b08ea97bb8b861e76d7c5b46d07f

View File

@ -0,0 +1,156 @@
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=d6c428699db7aa20f8b6ca9fe83197a0314b7e91
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=c33c4fdf10b7ed9e03f2afe988d93f3085b727aa
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=41c022072599bc3f12f659e962653548cd86fa3a
From d6c428699db7aa20f8b6ca9fe83197a0314b7e91 Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Thu, 15 Feb 2024 15:38:34 +0900
Subject: [PATCH] dirmngr: Fix proxy with TLS.
* dirmngr/http.c (proxy_get_token, run_proxy_connect): Always
available regardless of USE_TLS.
(send_request): Remove USE_TLS.
--
Since quite some time building w/o TLS won't work.
GnuPG-bug-id: 6997
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -2498,9 +2498,7 @@ proxy_get_token (proxy_info_t proxy, const char *inputstring)
}
-
/* Use the CONNECT method to proxy our TLS stream. */
-#ifdef USE_TLS
static gpg_error_t
run_proxy_connect (http_t hd, proxy_info_t proxy,
const char *httphost, const char *server,
@@ -2709,7 +2707,6 @@ run_proxy_connect (http_t hd, proxy_info_t proxy,
xfree (tmpstr);
return err;
}
-#endif /*USE_TLS*/
/* Make a request string using a standard proxy. On success the
@@ -2866,7 +2863,6 @@ send_request (http_t hd, const char *httphost, const char *auth,
goto leave;
}
-#if USE_TLS
if (use_http_proxy && hd->uri->use_tls)
{
err = run_proxy_connect (hd, proxy, httphost, server, port);
@@ -2878,7 +2874,6 @@ send_request (http_t hd, const char *httphost, const char *auth,
* clear the flag to indicate this. */
use_http_proxy = 0;
}
-#endif /* USE_TLS */
#if HTTP_USE_NTBTLS
err = run_ntbtls_handshake (hd);
--
2.30.2
From c33c4fdf10b7ed9e03f2afe988d93f3085b727aa Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Fri, 16 Feb 2024 11:31:37 +0900
Subject: [PATCH] dirmngr: Fix the regression of use of proxy for TLS
connection.
* dirmngr/http.c (run_proxy_connect): Don't set keep_alive, since it
causes resource leak of FP_WRITE.
Don't try to read response body to fix the hang.
--
GnuPG-bug-id: 6997
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -2520,6 +2520,7 @@ run_proxy_connect (http_t hd, proxy_info_t proxy,
* RFC-4559 - SPNEGO-based Kerberos and NTLM HTTP Authentication
*/
auth_basic = !!proxy->uri->auth;
+ hd->keep_alive = 0;
/* For basic authentication we need to send just one request. */
if (auth_basic
@@ -2541,13 +2542,12 @@ run_proxy_connect (http_t hd, proxy_info_t proxy,
httphost ? httphost : server,
port,
authhdr ? authhdr : "",
- auth_basic? "" : "Connection: keep-alive\r\n");
+ hd->keep_alive? "Connection: keep-alive\r\n" : "");
if (!request)
{
err = gpg_error_from_syserror ();
goto leave;
}
- hd->keep_alive = !auth_basic; /* We may need to send more requests. */
if (opt_debug || (hd->flags & HTTP_FLAG_LOG_RESP))
log_debug_with_string (request, "http.c:proxy:request:");
@@ -2574,16 +2574,6 @@ run_proxy_connect (http_t hd, proxy_info_t proxy,
if (err)
goto leave;
- {
- unsigned long count = 0;
-
- while (es_getc (hd->fp_read) != EOF)
- count++;
- if (opt_debug)
- log_debug ("http.c:proxy_connect: skipped %lu bytes of response-body\n",
- count);
- }
-
/* Reset state. */
es_clearerr (hd->fp_read);
((cookie_t)(hd->read_cookie))->up_to_empty_line = 1;
--
2.30.2
From 41c022072599bc3f12f659e962653548cd86fa3a Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Fri, 16 Feb 2024 16:24:26 +0900
Subject: [PATCH] dirmngr: Fix keep-alive flag handling.
* dirmngr/http.c (run_proxy_connect): Set KEEP_ALIVE if not Basic
Authentication. Fix resource leak of FP_WRITE.
--
GnuPG-bug-id: 6997
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -2520,7 +2520,7 @@ run_proxy_connect (http_t hd, proxy_info_t proxy,
* RFC-4559 - SPNEGO-based Kerberos and NTLM HTTP Authentication
*/
auth_basic = !!proxy->uri->auth;
- hd->keep_alive = 0;
+ hd->keep_alive = !auth_basic; /* We may need to send more requests. */
/* For basic authentication we need to send just one request. */
if (auth_basic
@@ -2684,6 +2684,14 @@ run_proxy_connect (http_t hd, proxy_info_t proxy,
}
leave:
+ if (hd->keep_alive)
+ {
+ es_fclose (hd->fp_write);
+ hd->fp_write = NULL;
+ /* The close has released the cookie and thus we better set it
+ * to NULL. */
+ hd->write_cookie = NULL;
+ }
/* Restore flags, destroy stream, reset state. */
hd->flags = saved_flags;
es_fclose (hd->fp_read);
--
2.30.2

View File

@ -0,0 +1,39 @@
https://bugs.gentoo.org/924386
https://dev.gnupg.org/T7003
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=f50c543326c2eea6b40f548d61cf3a66a077bf54
From f50c543326c2eea6b40f548d61cf3a66a077bf54 Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Fri, 1 Mar 2024 13:59:43 +0900
Subject: [PATCH] agent: Allow simple KEYINFO command when restricted.
* agent/command.c (cmd_keyinfo): Only forbid list command.
--
GnuPG-bug-id: 7003
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
--- a/agent/command.c
+++ b/agent/command.c
@@ -1282,9 +1282,6 @@ cmd_keyinfo (assuan_context_t ctx, char *line)
char hexgrip[41];
int disabled, ttl, confirm, is_ssh;
- if (ctrl->restricted)
- return leave_cmd (ctx, gpg_error (GPG_ERR_FORBIDDEN));
-
if (has_option (line, "--ssh-list"))
list_mode = 2;
else
@@ -1333,6 +1330,9 @@ cmd_keyinfo (assuan_context_t ctx, char *line)
char *dirname;
gnupg_dirent_t dir_entry;
+ if (ctrl->restricted)
+ return leave_cmd (ctx, gpg_error (GPG_ERR_FORBIDDEN));
+
dirname = make_filename_try (gnupg_homedir (),
GNUPG_PRIVATE_KEYS_DIR, NULL);
if (!dirname)
--
2.30.2

View File

@ -1,564 +0,0 @@
https://bugs.gentoo.org/907839
https://dev.gnupg.org/T6481
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=2f872fa68c6576724b9dabee9fb0844266f55d0d
From 2f872fa68c6576724b9dabee9fb0844266f55d0d Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Wed, 24 May 2023 10:36:04 +0900
Subject: [PATCH] gpg: Report BEGIN_* status before examining the input.
* common/miscellaneous.c (is_openpgp_compressed_packet)
(is_file_compressed): Moved to ...
* common/iobuf.c: ... in this file.
(is_file_compressed): Change the argument to INP, the iobuf.
* common/util.h (is_file_compressed): Remove.
* common/iobuf.h (is_file_compressed): Add.
* g10/cipher-aead.c (write_header): Don't call write_status_printf
here.
(cipher_filter_aead): Call write_status_printf when called with
IOBUFCTRL_INIT.
* g10/cipher-cfb.c (write_header): Don't call write_status_printf
here.
(cipher_filter_cfb): Call write_status_printf when called with
IOBUFCTRL_INIT.
* g10/encrypt.c (encrypt_simple): Use new is_file_compressed function,
after call of iobuf_push_filter.
(encrypt_crypt): Likewise.
* g10/sign.c (sign_file): Likewise.
--
GnuPG-bug-id: 6481
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
--- a/common/iobuf.c
+++ b/common/iobuf.c
@@ -3057,3 +3057,123 @@ iobuf_skip_rest (iobuf_t a, unsigned long n, int partial)
}
}
}
+
+
+/* Check whether (BUF,LEN) is valid header for an OpenPGP compressed
+ * packet. LEN should be at least 6. */
+static int
+is_openpgp_compressed_packet (const unsigned char *buf, size_t len)
+{
+ int c, ctb, pkttype;
+ int lenbytes;
+
+ ctb = *buf++; len--;
+ if (!(ctb & 0x80))
+ return 0; /* Invalid packet. */
+
+ if ((ctb & 0x40)) /* New style (OpenPGP) CTB. */
+ {
+ pkttype = (ctb & 0x3f);
+ if (!len)
+ return 0; /* Expected first length octet missing. */
+ c = *buf++; len--;
+ if (c < 192)
+ ;
+ else if (c < 224)
+ {
+ if (!len)
+ return 0; /* Expected second length octet missing. */
+ }
+ else if (c == 255)
+ {
+ if (len < 4)
+ return 0; /* Expected length octets missing */
+ }
+ }
+ else /* Old style CTB. */
+ {
+ pkttype = (ctb>>2)&0xf;
+ lenbytes = ((ctb&3)==3)? 0 : (1<<(ctb & 3));
+ if (len < lenbytes)
+ return 0; /* Not enough length bytes. */
+ }
+
+ return (pkttype == 8);
+}
+
+
+/*
+ * Check if the file is compressed, by peeking the iobuf. You need to
+ * pass the iobuf with INP. Returns true if the buffer seems to be
+ * compressed.
+ */
+int
+is_file_compressed (iobuf_t inp)
+{
+ int i;
+ char buf[32];
+ int buflen;
+
+ struct magic_compress_s
+ {
+ byte len;
+ byte extchk;
+ byte magic[5];
+ } magic[] =
+ {
+ { 3, 0, { 0x42, 0x5a, 0x68, 0x00 } }, /* bzip2 */
+ { 3, 0, { 0x1f, 0x8b, 0x08, 0x00 } }, /* gzip */
+ { 4, 0, { 0x50, 0x4b, 0x03, 0x04 } }, /* (pk)zip */
+ { 5, 0, { '%', 'P', 'D', 'F', '-'} }, /* PDF */
+ { 4, 1, { 0xff, 0xd8, 0xff, 0xe0 } }, /* Maybe JFIF */
+ { 5, 2, { 0x89, 'P','N','G', 0x0d} } /* Likely PNG */
+ };
+
+ if (!inp)
+ return 0;
+
+ for ( ; inp->chain; inp = inp->chain )
+ ;
+
+ buflen = iobuf_ioctl (inp, IOBUF_IOCTL_PEEK, sizeof buf, buf);
+ if (buflen < 0)
+ {
+ buflen = 0;
+ log_debug ("peeking at input failed\n");
+ }
+
+ if ( buflen < 6 )
+ {
+ return 0; /* Too short to check - assume uncompressed. */
+ }
+
+ for ( i = 0; i < DIM (magic); i++ )
+ {
+ if (!memcmp( buf, magic[i].magic, magic[i].len))
+ {
+ switch (magic[i].extchk)
+ {
+ case 0:
+ return 1; /* Is compressed. */
+ case 1:
+ if (buflen > 11 && !memcmp (buf + 6, "JFIF", 5))
+ return 1; /* JFIF: this likely a compressed JPEG. */
+ break;
+ case 2:
+ if (buflen > 8
+ && buf[5] == 0x0a && buf[6] == 0x1a && buf[7] == 0x0a)
+ return 1; /* This is a PNG. */
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ if (buflen >= 6 && is_openpgp_compressed_packet (buf, buflen))
+ {
+ return 1; /* Already compressed. */
+ }
+
+ return 0; /* Not detected as compressed. */
+}
--- a/common/iobuf.h
+++ b/common/iobuf.h
@@ -629,6 +629,9 @@ void iobuf_set_partial_body_length_mode (iobuf_t a, size_t len);
from the following filter (which may or may not return EOF). */
void iobuf_skip_rest (iobuf_t a, unsigned long n, int partial);
+/* Check if the file is compressed, by peeking the iobuf. */
+int is_file_compressed (iobuf_t inp);
+
#define iobuf_where(a) "[don't know]"
/* Each time a filter is allocated (via iobuf_alloc()), a
--- a/common/miscellaneous.c
+++ b/common/miscellaneous.c
@@ -415,112 +415,6 @@ decode_c_string (const char *src)
}
-/* Check whether (BUF,LEN) is valid header for an OpenPGP compressed
- * packet. LEN should be at least 6. */
-static int
-is_openpgp_compressed_packet (const unsigned char *buf, size_t len)
-{
- int c, ctb, pkttype;
- int lenbytes;
-
- ctb = *buf++; len--;
- if (!(ctb & 0x80))
- return 0; /* Invalid packet. */
-
- if ((ctb & 0x40)) /* New style (OpenPGP) CTB. */
- {
- pkttype = (ctb & 0x3f);
- if (!len)
- return 0; /* Expected first length octet missing. */
- c = *buf++; len--;
- if (c < 192)
- ;
- else if (c < 224)
- {
- if (!len)
- return 0; /* Expected second length octet missing. */
- }
- else if (c == 255)
- {
- if (len < 4)
- return 0; /* Expected length octets missing */
- }
- }
- else /* Old style CTB. */
- {
- pkttype = (ctb>>2)&0xf;
- lenbytes = ((ctb&3)==3)? 0 : (1<<(ctb & 3));
- if (len < lenbytes)
- return 0; /* Not enough length bytes. */
- }
-
- return (pkttype == 8);
-}
-
-
-
-/*
- * Check if the file is compressed. You need to pass the first bytes
- * of the file as (BUF,BUFLEN). Returns true if the buffer seems to
- * be compressed.
- */
-int
-is_file_compressed (const byte *buf, unsigned int buflen)
-{
- int i;
-
- struct magic_compress_s
- {
- byte len;
- byte extchk;
- byte magic[5];
- } magic[] =
- {
- { 3, 0, { 0x42, 0x5a, 0x68, 0x00 } }, /* bzip2 */
- { 3, 0, { 0x1f, 0x8b, 0x08, 0x00 } }, /* gzip */
- { 4, 0, { 0x50, 0x4b, 0x03, 0x04 } }, /* (pk)zip */
- { 5, 0, { '%', 'P', 'D', 'F', '-'} }, /* PDF */
- { 4, 1, { 0xff, 0xd8, 0xff, 0xe0 } }, /* Maybe JFIF */
- { 5, 2, { 0x89, 'P','N','G', 0x0d} } /* Likely PNG */
- };
-
- if ( buflen < 6 )
- {
- return 0; /* Too short to check - assume uncompressed. */
- }
-
- for ( i = 0; i < DIM (magic); i++ )
- {
- if (!memcmp( buf, magic[i].magic, magic[i].len))
- {
- switch (magic[i].extchk)
- {
- case 0:
- return 1; /* Is compressed. */
- case 1:
- if (buflen > 11 && !memcmp (buf + 6, "JFIF", 5))
- return 1; /* JFIF: this likely a compressed JPEG. */
- break;
- case 2:
- if (buflen > 8
- && buf[5] == 0x0a && buf[6] == 0x1a && buf[7] == 0x0a)
- return 1; /* This is a PNG. */
- break;
- default:
- break;
- }
- }
- }
-
- if (buflen >= 6 && is_openpgp_compressed_packet (buf, buflen))
- {
- return 1; /* Already compressed. */
- }
-
- return 0; /* Not detected as compressed. */
-}
-
-
/* Try match against each substring of multistr, delimited by | */
int
match_multistr (const char *multistr,const char *match)
--- a/common/util.h
+++ b/common/util.h
@@ -360,8 +360,6 @@ char *try_make_printable_string (const void *p, size_t n, int delim);
char *make_printable_string (const void *p, size_t n, int delim);
char *decode_c_string (const char *src);
-int is_file_compressed (const byte *buf, unsigned int buflen);
-
int match_multistr (const char *multistr,const char *match);
int gnupg_compare_version (const char *a, const char *b);
--- a/g10/cipher-aead.c
+++ b/g10/cipher-aead.c
@@ -174,8 +174,6 @@ write_header (cipher_filter_context_t *cfx, iobuf_t a)
log_debug ("aead packet: len=%lu extralen=%d\n",
(unsigned long)ed.len, ed.extralen);
- write_status_printf (STATUS_BEGIN_ENCRYPTION, "0 %d %d",
- cfx->dek->algo, ed.aead_algo);
print_cipher_algo_note (cfx->dek->algo);
if (build_packet( a, &pkt))
@@ -488,6 +486,11 @@ cipher_filter_aead (void *opaque, int control,
{
mem2str (buf, "cipher_filter_aead", *ret_len);
}
+ else if (control == IOBUFCTRL_INIT)
+ {
+ write_status_printf (STATUS_BEGIN_ENCRYPTION, "0 %d %d",
+ cfx->dek->algo, cfx->dek->use_aead);
+ }
return rc;
}
--- a/g10/cipher-cfb.c
+++ b/g10/cipher-cfb.c
@@ -72,9 +72,6 @@ write_header (cipher_filter_context_t *cfx, iobuf_t a)
log_info (_("Hint: Do not use option %s\n"), "--rfc2440");
}
- write_status_printf (STATUS_BEGIN_ENCRYPTION, "%d %d",
- ed.mdc_method, cfx->dek->algo);
-
init_packet (&pkt);
pkt.pkttype = cfx->dek->use_mdc? PKT_ENCRYPTED_MDC : PKT_ENCRYPTED;
pkt.pkt.encrypted = &ed;
@@ -182,6 +179,12 @@ cipher_filter_cfb (void *opaque, int control,
{
mem2str (buf, "cipher_filter_cfb", *ret_len);
}
+ else if (control == IOBUFCTRL_INIT)
+ {
+ write_status_printf (STATUS_BEGIN_ENCRYPTION, "%d %d",
+ cfx->dek->use_mdc ? DIGEST_ALGO_SHA1 : 0,
+ cfx->dek->algo);
+ }
return rc;
}
--- a/g10/encrypt.c
+++ b/g10/encrypt.c
@@ -410,8 +410,6 @@ encrypt_simple (const char *filename, int mode, int use_seskey)
text_filter_context_t tfx;
progress_filter_context_t *pfx;
int do_compress = !!default_compress_algo();
- char peekbuf[32];
- int peekbuflen;
if (!gnupg_rng_is_compliant (opt.compliance))
{
@@ -448,14 +446,6 @@ encrypt_simple (const char *filename, int mode, int use_seskey)
return rc;
}
- peekbuflen = iobuf_ioctl (inp, IOBUF_IOCTL_PEEK, sizeof peekbuf, peekbuf);
- if (peekbuflen < 0)
- {
- peekbuflen = 0;
- if (DBG_FILTER)
- log_debug ("peeking at input failed\n");
- }
-
handle_progress (pfx, inp, filename);
if (opt.textmode)
@@ -517,17 +507,6 @@ encrypt_simple (const char *filename, int mode, int use_seskey)
/**/ : "CFB");
}
- if (do_compress
- && cfx.dek
- && (cfx.dek->use_mdc || cfx.dek->use_aead)
- && !opt.explicit_compress_option
- && is_file_compressed (peekbuf, peekbuflen))
- {
- if (opt.verbose)
- log_info(_("'%s' already compressed\n"), filename? filename: "[stdin]");
- do_compress = 0;
- }
-
if ( rc || (rc = open_outfile (-1, filename, opt.armor? 1:0, 0, &out )))
{
iobuf_cancel (inp);
@@ -598,6 +577,24 @@ encrypt_simple (const char *filename, int mode, int use_seskey)
else
filesize = opt.set_filesize ? opt.set_filesize : 0; /* stdin */
+ /* Register the cipher filter. */
+ if (mode)
+ iobuf_push_filter (out,
+ cfx.dek->use_aead? cipher_filter_aead
+ /**/ : cipher_filter_cfb,
+ &cfx );
+
+ if (do_compress
+ && cfx.dek
+ && (cfx.dek->use_mdc || cfx.dek->use_aead)
+ && !opt.explicit_compress_option
+ && is_file_compressed (inp))
+ {
+ if (opt.verbose)
+ log_info(_("'%s' already compressed\n"), filename? filename: "[stdin]");
+ do_compress = 0;
+ }
+
if (!opt.no_literal)
{
/* Note that PT has been initialized above in !no_literal mode. */
@@ -617,13 +614,6 @@ encrypt_simple (const char *filename, int mode, int use_seskey)
pkt.pkt.generic = NULL;
}
- /* Register the cipher filter. */
- if (mode)
- iobuf_push_filter (out,
- cfx.dek->use_aead? cipher_filter_aead
- /**/ : cipher_filter_cfb,
- &cfx );
-
/* Register the compress filter. */
if ( do_compress )
{
@@ -783,7 +773,7 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename,
PKT_plaintext *pt = NULL;
DEK *symkey_dek = NULL;
STRING2KEY *symkey_s2k = NULL;
- int rc = 0, rc2 = 0;
+ int rc = 0;
u32 filesize;
cipher_filter_context_t cfx;
armor_filter_context_t *afx = NULL;
@@ -792,8 +782,6 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename,
progress_filter_context_t *pfx;
PK_LIST pk_list;
int do_compress;
- char peekbuf[32];
- int peekbuflen;
if (filefd != -1 && filename)
return gpg_error (GPG_ERR_INV_ARG); /* Both given. */
@@ -866,14 +854,6 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename,
if (opt.verbose)
log_info (_("reading from '%s'\n"), iobuf_get_fname_nonnull (inp));
- peekbuflen = iobuf_ioctl (inp, IOBUF_IOCTL_PEEK, sizeof peekbuf, peekbuf);
- if (peekbuflen < 0)
- {
- peekbuflen = 0;
- if (DBG_FILTER)
- log_debug ("peeking at input failed\n");
- }
-
handle_progress (pfx, inp, filename);
if (opt.textmode)
@@ -900,25 +880,6 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename,
if (!cfx.dek->use_aead)
cfx.dek->use_mdc = !!use_mdc (pk_list, cfx.dek->algo);
- /* Only do the is-file-already-compressed check if we are using a
- * MDC or AEAD. This forces compressed files to be re-compressed if
- * we do not have a MDC to give some protection against chosen
- * ciphertext attacks. */
- if (do_compress
- && (cfx.dek->use_mdc || cfx.dek->use_aead)
- && !opt.explicit_compress_option
- && is_file_compressed (peekbuf, peekbuflen))
- {
- if (opt.verbose)
- log_info(_("'%s' already compressed\n"), filename? filename: "[stdin]");
- do_compress = 0;
- }
- if (rc2)
- {
- rc = rc2;
- goto leave;
- }
-
make_session_key (cfx.dek);
if (DBG_CRYPTO)
log_printhex (cfx.dek->key, cfx.dek->keylen, "DEK is: ");
@@ -960,6 +921,26 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename,
else
filesize = opt.set_filesize ? opt.set_filesize : 0; /* stdin */
+ /* Register the cipher filter. */
+ iobuf_push_filter (out,
+ cfx.dek->use_aead? cipher_filter_aead
+ /**/ : cipher_filter_cfb,
+ &cfx);
+
+ /* Only do the is-file-already-compressed check if we are using a
+ * MDC or AEAD. This forces compressed files to be re-compressed if
+ * we do not have a MDC to give some protection against chosen
+ * ciphertext attacks. */
+ if (do_compress
+ && (cfx.dek->use_mdc || cfx.dek->use_aead)
+ && !opt.explicit_compress_option
+ && is_file_compressed (inp))
+ {
+ if (opt.verbose)
+ log_info(_("'%s' already compressed\n"), filename? filename: "[stdin]");
+ do_compress = 0;
+ }
+
if (!opt.no_literal)
{
pt->timestamp = make_timestamp();
@@ -974,12 +955,6 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename,
else
cfx.datalen = filesize && !do_compress ? filesize : 0;
- /* Register the cipher filter. */
- iobuf_push_filter (out,
- cfx.dek->use_aead? cipher_filter_aead
- /**/ : cipher_filter_cfb,
- &cfx);
-
/* Register the compress filter. */
if (do_compress)
{
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -1035,9 +1035,6 @@ sign_file (ctrl_t ctrl, strlist_t filenames, int detached, strlist_t locusr,
int multifile = 0;
u32 duration=0;
pt_extra_hash_data_t extrahash = NULL;
- char peekbuf[32];
- int peekbuflen = 0;
-
pfx = new_progress_context ();
afx = new_armor_context ();
@@ -1096,14 +1093,6 @@ sign_file (ctrl_t ctrl, strlist_t filenames, int detached, strlist_t locusr,
goto leave;
}
- peekbuflen = iobuf_ioctl (inp, IOBUF_IOCTL_PEEK, sizeof peekbuf, peekbuf);
- if (peekbuflen < 0)
- {
- peekbuflen = 0;
- if (DBG_FILTER)
- log_debug ("peeking at input failed\n");
- }
-
handle_progress (pfx, inp, fname);
}
@@ -1261,7 +1250,7 @@ sign_file (ctrl_t ctrl, strlist_t filenames, int detached, strlist_t locusr,
int compr_algo = opt.compress_algo;
if (!opt.explicit_compress_option
- && is_file_compressed (peekbuf, peekbuflen))
+ && is_file_compressed (inp))
{
if (opt.verbose)
log_info(_("'%s' already compressed\n"), fname? fname: "[stdin]");
--
2.11.0

View File

@ -1,28 +0,0 @@
https://dev.gnupg.org/T6579
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=dc13361524c1477b2106c7385f2059f9ea111b84
From dc13361524c1477b2106c7385f2059f9ea111b84 Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Wed, 5 Jul 2023 09:29:54 +0900
Subject: [PATCH] dirmngr: Enable the call of ks_ldap_help_variables when
USE_LDAP.
* dirmngr/server.c [USE_LDAP] (cmd_ad_query): Conditionalize.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -2776,7 +2776,9 @@ cmd_ad_query (assuan_context_t ctx, char *line)
if (opt_help)
{
+#if USE_LDAP
ks_ldap_help_variables (ctrl);
+#endif
err = 0;
goto leave;
}
--
2.11.0

View File

@ -1,179 +0,0 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintainers should:
# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
# (find the one for the current release then subscribe to it +
# any subsequent ones linked within so you're covered for a while.)
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
# in-source builds are not supported: https://dev.gnupg.org/T6313#166339
inherit flag-o-matic out-of-source multiprocessing systemd toolchain-funcs verify-sig
MY_P="${P/_/-}"
DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
HOMEPAGE="https://gnupg.org/"
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/gnupg/${P}.tar.bz2.sig )"
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test tofu tools usb user-socket wks-server"
RESTRICT="!test? ( test )"
# Existence of executables is checked during configuration.
# Note: On each bump, update dep bounds on each version from configure.ac!
DEPEND="
>=dev-libs/libassuan-2.5.0
>=dev-libs/libgcrypt-1.8.0:=
>=dev-libs/libgpg-error-1.38
>=dev-libs/libksba-1.3.5
>=dev-libs/npth-1.2
>=net-misc/curl-7.10
sys-libs/zlib
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:= )
smartcard? ( usb? ( virtual/libusb:1 ) )
ssl? ( >=net-libs/gnutls-3.0:= )
tofu? ( >=dev-db/sqlite-3.7 )
"
RDEPEND="
${DEPEND}
app-crypt/pinentry
nls? ( virtual/libintl )
selinux? ( sec-policy/selinux-gpg )
wks-server? ( virtual/mta )
"
BDEPEND="
virtual/pkgconfig
doc? ( sys-apps/texinfo )
nls? ( sys-devel/gettext )
verify-sig? ( sec-keys/openpgp-keys-gnupg )
"
DOCS=(
ChangeLog NEWS README THANKS TODO VERSION
doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
)
PATCHES=(
"${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch
)
src_prepare() {
default
# Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
# idea borrowed from libdbus, see
# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
#
# This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
# which in turn requires discovery in Autoconf, something that upstream deeply resents.
sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
-i doc/examples/systemd-user/gpg-agent-ssh.socket || die
}
my_src_configure() {
# Upstream don't support LTO, bug #854222.
filter-lto
local myconf=(
$(use_enable bzip2)
$(use_enable nls)
$(use_enable smartcard scdaemon)
$(use_enable ssl gnutls)
$(use_enable test all-tests)
$(use_enable test tests)
$(use_enable tofu)
$(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver')
$(use_enable wks-server wks-tools)
$(use_with ldap)
$(use_with readline)
# Hardcode mailprog to /usr/libexec/sendmail even if it does not exist.
# As of GnuPG 2.3, the mailprog substitution is used for the binary called
# by wks-client & wks-server; and if it's autodetected but not not exist at
# build time, then then 'gpg-wks-client --send' functionality will not
# work. This has an unwanted side-effect in stage3 builds: there was a
# [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating
# the build where the install guide previously make the user chose the
# logger & mta early in the install.
--with-mailprog=/usr/libexec/sendmail
--disable-ntbtls
--enable-gpg
--enable-gpgsm
--enable-large-secmem
CC_FOR_BUILD="$(tc-getBUILD_CC)"
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
KSBA_CONFIG="${ESYSROOT}/usr/bin/ksba-config"
LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config"
LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config"
NPTH_CONFIG="${ESYSROOT}/usr/bin/npth-config"
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
)
if use prefix && use usb; then
# bug #649598
append-cppflags -I"${ESYSROOT}/usr/include/libusb-1.0"
fi
# bug #663142
if use user-socket; then
myconf+=( --enable-run-gnupg-user-socket )
fi
# glib fails and picks up clang's internal stdint.h causing weird errors
tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h
econf "${myconf[@]}"
}
my_src_compile() {
default
use doc && emake -C doc html
}
my_src_test() {
export TESTFLAGS="--parallel=$(makeopts_jobs)"
default
}
my_src_install() {
emake DESTDIR="${D}" install
use tools && dobin \
tools/{gpg-zip,gpgconf,gpgsplit,gpg-check-pattern} \
tools/make-dns-cert
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
dodir /etc/env.d
echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
use doc && dodoc doc/gnupg.html/*
}
my_src_install_all() {
einstalldocs
use tools && dobin tools/{convert-from-106,mail-signed-keys,lspgpot}
use doc && dodoc doc/*.png
systemd_douserunit doc/examples/systemd-user/*.{service,socket}
}

View File

@ -23,7 +23,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test tofu tools usb user-socket wks-server"
RESTRICT="!test? ( test )"

View File

@ -67,6 +67,9 @@ DOCS=(
PATCHES=(
"${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch
"${FILESDIR}"/${P}-bug923248-insecure-backup.patch
"${FILESDIR}"/${P}-dirmngr-proxy.patch
"${FILESDIR}"/${P}-gpgme-tests.patch
)
src_prepare() {

View File

@ -1,198 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintainers should:
# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
# (find the one for the current release then subscribe to it +
# any subsequent ones linked within so you're covered for a while.)
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
# in-source builds are not supported: https://dev.gnupg.org/T6313#166339
inherit flag-o-matic out-of-source multiprocessing systemd toolchain-funcs verify-sig
MY_P="${P/_/-}"
DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
HOMEPAGE="https://gnupg.org/"
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/gnupg/${P}.tar.bz2.sig )"
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( tofu )"
# Existence of executables is checked during configuration.
# Note: On each bump, update dep bounds on each version from configure.ac!
DEPEND="
>=dev-libs/libassuan-2.5.0
>=dev-libs/libgcrypt-1.9.1:=
>=dev-libs/libgpg-error-1.46
>=dev-libs/libksba-1.6.3
>=dev-libs/npth-1.2
>=net-misc/curl-7.10
sys-libs/zlib
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:0= )
smartcard? ( usb? ( virtual/libusb:1 ) )
tofu? ( >=dev-db/sqlite-3.27 )
tpm? ( >=app-crypt/tpm2-tss-2.4.0:= )
ssl? ( >=net-libs/gnutls-3.0:0= )
"
RDEPEND="
${DEPEND}
nls? ( virtual/libintl )
selinux? ( sec-policy/selinux-gpg )
wks-server? ( virtual/mta )
"
PDEPEND="
app-crypt/pinentry
"
BDEPEND="
virtual/pkgconfig
doc? ( sys-apps/texinfo )
nls? ( sys-devel/gettext )
verify-sig? ( sec-keys/openpgp-keys-gnupg )
"
DOCS=(
ChangeLog NEWS README THANKS TODO VERSION
doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
)
PATCHES=(
"${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch
"${FILESDIR}"/${PN}-2.4.2-fix-emacs.patch
"${FILESDIR}"/${P}-no-ldap.patch
)
src_prepare() {
default
GNUPG_SYSTEMD_UNITS=(
dirmngr.service
dirmngr.socket
gpg-agent-browser.socket
gpg-agent-extra.socket
gpg-agent.service
gpg-agent.socket
gpg-agent-ssh.socket
)
cp "${GNUPG_SYSTEMD_UNITS[@]/#/${FILESDIR}/}" "${T}" || die
# Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
# idea borrowed from libdbus, see
# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
#
# This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
# which in turn requires discovery in Autoconf, something that upstream deeply resents.
sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
-i "${T}"/gpg-agent-ssh.socket || die
}
my_src_configure() {
# Upstream don't support LTO, bug #854222.
filter-lto
local myconf=(
$(use_enable bzip2)
$(use_enable nls)
$(use_enable smartcard scdaemon)
$(use_enable ssl gnutls)
$(use_enable test all-tests)
$(use_enable test tests)
$(use_enable tofu)
$(use_enable tofu keyboxd)
$(use_enable tofu sqlite)
$(usex tpm '--with-tss=intel' '--disable-tpm2d')
$(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver')
$(use_enable wks-server wks-tools)
$(use_with ldap)
$(use_with readline)
# Hardcode mailprog to /usr/libexec/sendmail even if it does not exist.
# As of GnuPG 2.3, the mailprog substitution is used for the binary called
# by wks-client & wks-server; and if it's autodetected but not not exist at
# build time, then then 'gpg-wks-client --send' functionality will not
# work. This has an unwanted side-effect in stage3 builds: there was a
# [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating
# the build where the install guide previously make the user chose the
# logger & mta early in the install.
--with-mailprog=/usr/libexec/sendmail
--disable-ntbtls
--enable-gpgsm
--enable-large-secmem
CC_FOR_BUILD="$(tc-getBUILD_CC)"
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
KSBA_CONFIG="${ESYSROOT}/usr/bin/ksba-config"
LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config"
LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config"
NPTH_CONFIG="${ESYSROOT}/usr/bin/npth-config"
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
)
if use prefix && use usb; then
# bug #649598
append-cppflags -I"${ESYSROOT}/usr/include/libusb-1.0"
fi
# bug #663142
if use user-socket; then
myconf+=( --enable-run-gnupg-user-socket )
fi
# glib fails and picks up clang's internal stdint.h causing weird errors
tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h
econf "${myconf[@]}"
}
my_src_compile() {
default
use doc && emake -C doc html
}
my_src_test() {
export TESTFLAGS="--parallel=$(makeopts_jobs)"
default
}
my_src_install() {
emake DESTDIR="${D}" install
use tools && dobin tools/{gpgconf,gpgsplit,gpg-check-pattern} tools/make-dns-cert
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
dodir /etc/env.d
echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
use doc && dodoc doc/gnupg.html/*
}
my_src_install_all() {
einstalldocs
use tools && dobin tools/{convert-from-106,mail-signed-keys,lspgpot}
use doc && dodoc doc/*.png
# Dropped upstream in https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff;h=eae28f1bd4a5632e8f8e85b7248d1c4d4a10a5ed.
dodoc "${FILESDIR}"/README-systemd
systemd_douserunit "${GNUPG_SYSTEMD_UNITS[@]/#/${T}/}"
}

View File

@ -23,7 +23,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( tofu )"

View File

@ -1,198 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintainers should:
# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
# (find the one for the current release then subscribe to it +
# any subsequent ones linked within so you're covered for a while.)
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
# in-source builds are not supported: https://dev.gnupg.org/T6313#166339
inherit flag-o-matic out-of-source multiprocessing systemd toolchain-funcs verify-sig
MY_P="${P/_/-}"
DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
HOMEPAGE="https://gnupg.org/"
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/gnupg/${P}.tar.bz2.sig )"
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( tofu )"
# Existence of executables is checked during configuration.
# Note: On each bump, update dep bounds on each version from configure.ac!
DEPEND="
>=dev-libs/libassuan-2.5.0
>=dev-libs/libgcrypt-1.9.1:=
>=dev-libs/libgpg-error-1.46
>=dev-libs/libksba-1.6.3
>=dev-libs/npth-1.2
>=net-misc/curl-7.10
sys-libs/zlib
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:0= )
smartcard? ( usb? ( virtual/libusb:1 ) )
tofu? ( >=dev-db/sqlite-3.27 )
tpm? ( >=app-crypt/tpm2-tss-2.4.0:= )
ssl? ( >=net-libs/gnutls-3.2:0= )
"
RDEPEND="
${DEPEND}
nls? ( virtual/libintl )
selinux? ( sec-policy/selinux-gpg )
wks-server? ( virtual/mta )
"
PDEPEND="
app-crypt/pinentry
"
BDEPEND="
virtual/pkgconfig
doc? ( sys-apps/texinfo )
nls? ( sys-devel/gettext )
verify-sig? ( sec-keys/openpgp-keys-gnupg )
"
DOCS=(
ChangeLog NEWS README THANKS TODO VERSION
doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
)
PATCHES=(
"${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch
#"${FILESDIR}"/${PN}-2.4.2-fix-emacs.patch
#"${FILESDIR}"/${PN}-2.4.3-no-ldap.patch
)
src_prepare() {
default
GNUPG_SYSTEMD_UNITS=(
dirmngr.service
dirmngr.socket
gpg-agent-browser.socket
gpg-agent-extra.socket
gpg-agent.service
gpg-agent.socket
gpg-agent-ssh.socket
)
cp "${GNUPG_SYSTEMD_UNITS[@]/#/${FILESDIR}/}" "${T}" || die
# Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
# idea borrowed from libdbus, see
# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
#
# This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
# which in turn requires discovery in Autoconf, something that upstream deeply resents.
sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
-i "${T}"/gpg-agent-ssh.socket || die
}
my_src_configure() {
# Upstream don't support LTO, bug #854222.
filter-lto
local myconf=(
$(use_enable bzip2)
$(use_enable nls)
$(use_enable smartcard scdaemon)
$(use_enable ssl gnutls)
$(use_enable test all-tests)
$(use_enable test tests)
$(use_enable tofu)
$(use_enable tofu keyboxd)
$(use_enable tofu sqlite)
$(usex tpm '--with-tss=intel' '--disable-tpm2d')
$(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver')
$(use_enable wks-server wks-tools)
$(use_with ldap)
$(use_with readline)
# Hardcode mailprog to /usr/libexec/sendmail even if it does not exist.
# As of GnuPG 2.3, the mailprog substitution is used for the binary called
# by wks-client & wks-server; and if it's autodetected but not not exist at
# build time, then then 'gpg-wks-client --send' functionality will not
# work. This has an unwanted side-effect in stage3 builds: there was a
# [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating
# the build where the install guide previously make the user chose the
# logger & mta early in the install.
--with-mailprog=/usr/libexec/sendmail
--disable-ntbtls
--enable-gpgsm
--enable-large-secmem
CC_FOR_BUILD="$(tc-getBUILD_CC)"
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
KSBA_CONFIG="${ESYSROOT}/usr/bin/ksba-config"
LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config"
LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config"
NPTH_CONFIG="${ESYSROOT}/usr/bin/npth-config"
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
)
if use prefix && use usb; then
# bug #649598
append-cppflags -I"${ESYSROOT}/usr/include/libusb-1.0"
fi
# bug #663142
if use user-socket; then
myconf+=( --enable-run-gnupg-user-socket )
fi
# glib fails and picks up clang's internal stdint.h causing weird errors
tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h
econf "${myconf[@]}"
}
my_src_compile() {
default
use doc && emake -C doc html
}
my_src_test() {
export TESTFLAGS="--parallel=$(makeopts_jobs)"
default
}
my_src_install() {
emake DESTDIR="${D}" install
use tools && dobin tools/{gpgconf,gpgsplit,gpg-check-pattern} tools/make-dns-cert
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
dodir /etc/env.d
echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
use doc && dodoc doc/gnupg.html/*
}
my_src_install_all() {
einstalldocs
use tools && dobin tools/{convert-from-106,mail-signed-keys,lspgpot}
use doc && dodoc doc/*.png
# Dropped upstream in https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff;h=eae28f1bd4a5632e8f8e85b7248d1c4d4a10a5ed.
dodoc "${FILESDIR}"/README-systemd
systemd_douserunit "${GNUPG_SYSTEMD_UNITS[@]/#/${T}/}"
}

View File

@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
inherit autotools python-any-r1 systemd toolchain-funcs multilib-minimal
inherit autotools flag-o-matic python-any-r1 systemd toolchain-funcs multilib-minimal
MY_P="${P/mit-}"
P_DIR=$(ver_cut 1-2)
@ -14,7 +14,7 @@ SRC_URI="https://web.mit.edu/kerberos/dist/krb5/${P_DIR}/${MY_P}.tar.gz"
LICENSE="openafs-krb5-a BSD MIT OPENLDAP BSD-2 HPND BSD-4 ISC RSA CC-BY-SA-3.0 || ( BSD-2 GPL-2+ )"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 sparc x86"
IUSE="cpu_flags_x86_aes doc +keyutils lmdb nls openldap +pkinit selinux +threads test xinetd"
RESTRICT="!test? ( test )"
@ -67,6 +67,13 @@ src_prepare() {
eautoreconf
}
src_configure() {
# lto-type-mismatch (bug #854225)
filter-lto
multilib-minimal_src_configure
}
multilib_src_configure() {
ECONF_SOURCE=${S} \
AR="$(tc-getAR)" \

View File

@ -0,0 +1,313 @@
https://bugs.gentoo.org/925557
https://dev.gnupg.org/D566
From 8ab1682e80a2b4185ee9ef66cbb44340245966fc Mon Sep 17 00:00:00 2001
From: Werner Koch <wk@gnupg.org>
Date: Mon, 20 Mar 2023 08:31:04 +0100
Subject: [PATCH] Fix problem with inclusion of wrong memory.h.
* secmem/memory.h: Rename to ...
* secmem/secmem.h: this.
* pinentry/pinentry.h: Include secmem.h. Remove almost all inclusions
of memory.h or replace them by "../secmem/secmem.h".
--
See-also: https://dev.gnupg.org/D566
---
fltk/main.cxx | 1 -
fltk/pinwindow.cxx | 2 +-
gnome3/pinentry-gnome3.c | 2 --
pinentry/password-cache.c | 2 +-
pinentry/pinentry-curses.c | 7 +++----
pinentry/pinentry-emacs.c | 2 +-
pinentry/pinentry.c | 1 -
pinentry/pinentry.h | 2 ++
secmem/Makefile.am | 2 +-
secmem/secmem++.h | 2 +-
secmem/secmem.c | 2 +-
secmem/{memory.h => secmem.h} | 0
tqt/secqstring.h | 2 +-
tty/pinentry-tty.c | 1 -
w32/main.c | 1 -
15 files changed, 12 insertions(+), 17 deletions(-)
rename secmem/{memory.h => secmem.h} (100%)
--- a/fltk/main.cxx 2019-03-05 23:09:48.000000000 -0800
+++ b/fltk/main.cxx 2024-02-26 11:02:47.822134762 -0800
@@ -34,7 +34,6 @@
#include <getopt.h>
#include <assert.h>
-#include "memory.h"
#include <memory>
#include <pinentry.h>
--- a/fltk/pinwindow.cxx 2017-12-03 08:13:05.000000000 -0800
+++ b/fltk/pinwindow.cxx 2024-02-26 11:02:47.822134762 -0800
@@ -32,7 +32,7 @@
#include <FL/Fl_Return_Button.H>
#include <FL/Fl_Pixmap.H>
-#include "memory.h"
+#include "../secmem/secmem.h"
#include "encrypt.xpm"
#include "icon.xpm"
--- a/gnome3/pinentry-gnome3.c 2022-08-24 03:31:59.000000000 -0700
+++ b/gnome3/pinentry-gnome3.c 2024-02-26 11:02:47.822134762 -0800
@@ -30,8 +30,6 @@
#include <assuan.h>
-#include "memory.h"
-
#include "pinentry.h"
#ifdef FALLBACK_CURSES
--- a/pinentry/password-cache.c 2017-12-03 08:13:15.000000000 -0800
+++ b/pinentry/password-cache.c 2024-02-26 11:02:47.822134762 -0800
@@ -31,7 +31,7 @@
#endif
#include "password-cache.h"
-#include "memory.h"
+#include "../secmem/secmem.h"
#ifdef HAVE_LIBSECRET
static const SecretSchema *
--- a/pinentry/pinentry.c 2022-08-24 03:31:59.000000000 -0700
+++ b/pinentry/pinentry.c 2024-02-26 11:02:47.822134762 -0800
@@ -44,7 +44,6 @@
#include <assuan.h>
-#include "memory.h"
#include "secmem-util.h"
#include "argparse.h"
#include "pinentry.h"
--- a/pinentry/pinentry-curses.c 2022-08-24 03:31:59.000000000 -0700
+++ b/pinentry/pinentry-curses.c 2024-02-26 11:02:47.822134762 -0800
@@ -62,8 +62,6 @@
#include <utime.h>
#endif /*HAVE_UTIME_H*/
-#include <memory.h>
-
#ifdef HAVE_WCHAR_H
#include <wchar.h>
#endif /*HAVE_WCHAR_H*/
@@ -1017,10 +1015,11 @@
#ifndef HAVE_DOSISH_SYSTEM
int no_input = 1;
#endif
-
#ifdef HAVE_NCURSESW
char *old_ctype = NULL;
+#endif
+#ifdef HAVE_NCURSESW
if (pinentry->lc_ctype)
{
old_ctype = strdup (setlocale (LC_CTYPE, NULL));
--- a/pinentry/pinentry-emacs.c 2021-08-11 04:16:10.000000000 -0700
+++ b/pinentry/pinentry-emacs.c 2024-02-26 11:02:47.822134762 -0800
@@ -48,7 +48,7 @@
#include <assuan.h>
#include "pinentry-emacs.h"
-#include "memory.h"
+#include "../secmem/secmem.h"
#include "secmem-util.h"
/* The communication mechanism is similar to emacsclient, but there
--- a/pinentry/pinentry.h 2022-08-24 03:31:59.000000000 -0700
+++ b/pinentry/pinentry.h 2024-02-26 11:02:47.822134762 -0800
@@ -21,6 +21,8 @@
#ifndef PINENTRY_H
#define PINENTRY_H
+#include "../secmem/secmem.h"
+
#ifdef __cplusplus
extern "C" {
#if 0
--- a/secmem/Makefile.am 2017-12-03 08:13:05.000000000 -0800
+++ b/secmem/Makefile.am 2024-02-26 11:02:47.822134762 -0800
@@ -22,7 +22,7 @@
noinst_LIBRARIES = libsecmem.a
libsecmem_a_SOURCES = \
- memory.h \
+ secmem.h \
secmem-util.h \
util.h \
secmem.c \
--- a/secmem/memory.h 2017-12-03 08:13:05.000000000 -0800
+++ b/secmem/memory.h 1969-12-31 16:00:00.000000000 -0800
@@ -1,55 +0,0 @@
-/* Quintuple Agent secure memory allocation
- * Copyright (C) 1998,1999 Free Software Foundation, Inc.
- * Copyright (C) 1999,2000 Robert Bihlmeyer <robbe@orcus.priv.at>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <https://www.gnu.org/licenses/>.
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifndef _MEMORY_H
-#define _MEMORY_H
-
-#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#if 0
-}
-#endif
-#endif
-
-
-/* values for flags, hardcoded in secmem.c */
-#define SECMEM_WARN 0
-#define SECMEM_DONT_WARN 1
-#define SECMEM_SUSPEND_WARN 2
-
-void secmem_init( size_t npool );
-void secmem_term( void );
-void *secmem_malloc( size_t size );
-void *secmem_realloc( void *a, size_t newsize );
-void secmem_free( void *a );
-int m_is_secure( const void *p );
-void secmem_dump_stats(void);
-void secmem_set_flags( unsigned flags );
-unsigned secmem_get_flags(void);
-size_t secmem_get_max_size (void);
-
-#if 0
-{
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif /* _MEMORY_H */
--- a/secmem/secmem.c 2022-08-24 03:31:59.000000000 -0700
+++ b/secmem/secmem.c 2024-02-26 11:02:47.822134762 -0800
@@ -34,7 +34,7 @@
#endif
#include <string.h>
-#include "memory.h"
+#include "secmem.h"
#ifdef ORIGINAL_GPG_VERSION
#include "types.h"
--- a/secmem/secmem++.h 2017-12-03 08:13:05.000000000 -0800
+++ b/secmem/secmem++.h 2024-02-26 11:02:47.822134762 -0800
@@ -19,7 +19,7 @@
#ifndef __SECMEM_SECMEMPP_H__
#define __SECMEM_SECMEMPP_H__
-#include "secmem/memory.h"
+#include "../secmem/secmem.h"
#include <cstddef>
namespace secmem {
--- a/secmem/secmem.h 1969-12-31 16:00:00.000000000 -0800
+++ b/secmem/secmem.h 2024-02-26 11:02:47.822134762 -0800
@@ -0,0 +1,55 @@
+/* Quintuple Agent secure memory allocation
+ * Copyright (C) 1998,1999 Free Software Foundation, Inc.
+ * Copyright (C) 1999,2000 Robert Bihlmeyer <robbe@orcus.priv.at>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _MEMORY_H
+#define _MEMORY_H
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+}
+#endif
+#endif
+
+
+/* values for flags, hardcoded in secmem.c */
+#define SECMEM_WARN 0
+#define SECMEM_DONT_WARN 1
+#define SECMEM_SUSPEND_WARN 2
+
+void secmem_init( size_t npool );
+void secmem_term( void );
+void *secmem_malloc( size_t size );
+void *secmem_realloc( void *a, size_t newsize );
+void secmem_free( void *a );
+int m_is_secure( const void *p );
+void secmem_dump_stats(void);
+void secmem_set_flags( unsigned flags );
+unsigned secmem_get_flags(void);
+size_t secmem_get_max_size (void);
+
+#if 0
+{
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif /* _MEMORY_H */
--- a/tqt/secqstring.h 2017-12-03 08:33:12.000000000 -0800
+++ b/tqt/secqstring.h 2024-02-26 11:02:47.822134762 -0800
@@ -65,7 +65,7 @@
extern "C"
{
-#include "memory.h"
+#include "../secmem/secmem.h"
}
/* We need the original qchar and qstring for transparent conversion
--- a/tty/pinentry-tty.c 2021-08-11 04:16:10.000000000 -0700
+++ b/tty/pinentry-tty.c 2024-02-26 11:02:47.822134762 -0800
@@ -41,7 +41,6 @@
#include <gpg-error.h>
#include "pinentry.h"
-#include "memory.h"
#ifndef HAVE_DOSISH_SYSTEM
static int timed_out;
--- a/w32/main.c 2022-08-24 03:31:59.000000000 -0700
+++ b/w32/main.c 2024-02-26 11:02:47.822134762 -0800
@@ -29,7 +29,6 @@
#endif
#include "pinentry.h"
-#include "memory.h"
#include "resource.h"
/* #include "msgcodes.h" */

View File

@ -51,6 +51,7 @@ DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
PATCHES=(
"${FILESDIR}/${PN}-1.0.0-AR.patch"
"${FILESDIR}/${PN}-1.2.1-automagic-capslock.patch" # bug #819939, bug #837719
"${FILESDIR}/${PN}-1.2.1-include-memory.patch"
)
src_prepare() {

View File

@ -1,4 +1,2 @@
DIST eclass-manpages-20230601.tar.xz 423088 BLAKE2B 35ef9f3fad733d6aa363c2808de8e6cc8936f1c965c7181b55cd955c8e3bcc339af7ac070302f220002e77011adf05e9904f38d29f832f7640f3cdc11f4f0a8f SHA512 5ff2dfca210b14a448472d6ea55ae5b321541e09124c74ff43392eea48dab06b22fbad9a7b62b80d5b67f9d07e1055bcca29eb03f77b899be886ada078e2df1f
DIST eclass-manpages-20230624.tar.xz 420244 BLAKE2B 867d215a89f7f92e7b9ed9ce52e70e42609bcd038e98074c9d0e6327e227bc010ea4d4fbd19e21d18635138a668cfc98492b3fdcf66bbe9960252474c14fd193 SHA512 c0df42ab7648337643de4bc9c204212e0a3563cea689ef8f8e507964bd88a69f0703d7f93c0f3e54dc333b7689c9eeba7dd0ea8525161a88b2605a26c8834e77
DIST eclass-manpages-20230919.tar.xz 432712 BLAKE2B d3b478f9c8ae26d9b0cbddb016861d59af58ff57ffed2e6c5abf423523c33317d1b37167b37925893d068838b1c7509514c51b60b98dfbeda631f8ba7641b8bd SHA512 1e07da85179f04172200b94e5cf5a21d04787fce800ceae83322554d5eb37cdc6073099d5ee5f12e04bbf967de40f63b01321dcb5ac4995e3c2503a94407c2d2
DIST eclass-manpages-20240207.tar.xz 446596 BLAKE2B 5d9698a72586a2a33149f02fb70958d44dc20524de104c5c3f3f306d9e3f0f9a027b4365f5426cd261628c5561599a25b325fe2cd63999aaacc19be8c8cb8094 SHA512 a94d0da7110a8cdfbac4e7a469ca304f6ed454513294f573edd52cda5de56dc2e78589aa7458804971ba1a92a4c6ec814ec97b78bc7ded0643cb419478975022
DIST eclass-manpages-20240229.tar.xz 448264 BLAKE2B ce7692c14f9f051b991ae292fd8329de2457cb63c803fec8a16677f92fd2214c695bf077309c16aa0a97318bb99ff83e8ebe2028865b6ac3740e480b00646c8c SHA512 eaa545b2dcbfafef140f8682afde24ae0a225ca666ca353191a432ece64bb85f759955cfcb1b26c665b1e760835963c3c566f1bd899f2e56b139a700d1f3fafb

View File

@ -1,24 +0,0 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Instructions to make a dist tarball:
# git clone https://github.com/projg2/eclass-to-manpage.git
# cd eclass-to-manpage
# make dist ECLASSDIR=~/g/eclass/
DESCRIPTION="Collection of Gentoo eclass manpages"
HOMEPAGE="https://github.com/projg2/eclass-to-manpage"
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
# Keep the keywords stable. No need to change to ~arch.
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
BDEPEND="sys-apps/gawk"
src_install() {
emake install DESTDIR="${D}" PREFIX="${EPREFIX}/usr"
}

View File

@ -1,24 +0,0 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Instructions to make a dist tarball:
# git clone https://github.com/projg2/eclass-to-manpage.git
# cd eclass-to-manpage
# make dist ECLASSDIR=~/g/eclass/
DESCRIPTION="Collection of Gentoo eclass manpages"
HOMEPAGE="https://github.com/projg2/eclass-to-manpage"
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
# Keep the keywords stable. No need to change to ~arch.
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
BDEPEND="sys-apps/gawk"
src_install() {
emake install DESTDIR="${D}" PREFIX="${EPREFIX}/usr"
}

View File

@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8

View File

@ -19,7 +19,7 @@ else
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="GPL-2"

View File

@ -1,10 +1,10 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
BASHCOMP_P=bashcomp-2.0.3
PYTHON_COMPAT=( python3_{9..11} )
PYTHON_COMPAT=( python3_{10..12} )
inherit python-any-r1

View File

@ -1,9 +1,9 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
PYTHON_COMPAT=( python3_{10..12} )
inherit autotools git-r3 python-any-r1

View File

@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>mgorny@gentoo.org</email>
<name>Michał Górny</name>
</maintainer>
<maintainer type="project">
<email>shell-tools@gentoo.org</email>
<name>Gentoo Shell Tools Project</name>

View File

@ -15,7 +15,7 @@ if [[ ${PV} == *9999 ]] ; then
inherit git-r3
else
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="A shared library tool for developers"

View File

@ -1,9 +1,5 @@
DIST meson-1.1.1.tar.gz 2125503 BLAKE2B 295b46d19c8a1d64d326a6c826e2abe11d9768902ed2f8816df18677e7f3f58decc0c660925821825ecd9a4955a65bda8b2aa66a7bb1961810d8f78f92a3fd8a SHA512 c6259d73566d2532b87e8a23951363103f7be2aacdf120e50946273a2fed6b1602104a3ffbfda159138ac8f780d2c3e67a6fe2c8c228b73c1266775491797adb
DIST meson-1.1.1.tar.gz.asc 833 BLAKE2B 165f3a0e8093995e82efcdea78b8cf0d2479505aeec145cf0c4bf3448dd74f0b5d1631e574e7d945d5b5976e11c065043ab0a6efe5646484a5bcd6386050a073 SHA512 004ec7e530ad21b012e461c8d50322295e4ec96a1a3197dbcbeb24b8bd6465a34008541e6fc547e451a50dce53f7ce170ec1bfd8c465ded56a5924e880aa0539
DIST meson-1.2.1.tar.gz 2182126 BLAKE2B b79fa78618cbebfb26ea40e698c495e63d722ba3204d4fed92d087e4a588b49666b476c55916f1435b7ca62f24843c683f1da09751754e928c838c1bf138ce58 SHA512 6221a14a6046aaba2c6eb601a9a5b928308bbd9da813ccec16b8f7578296b27d741e30e9343723770c3c7825c86b53193b41b9672dd17468d06d3b8d743bf52e
DIST meson-1.2.1.tar.gz.asc 833 BLAKE2B e4c1ee16f65631815ce5c1be49df77b7eab91e9f256ffcbf3555d257cf468bbcca49ee79ce6ddb701f35b9be0ce6c315809094b87ccfeff8f4de2d1995dbf6ff SHA512 c41b4a6686016cddc407497b003590939760c4f19d1f4481c315024f76f1ecd055dd6f8c7ba3647549c7ff192ab10097b9d0ad64e449ab83f623ea62d0ae4703
DIST meson-1.2.2.tar.gz 2190455 BLAKE2B b355c8e5ab7508fca51dbe5c95eea68f91b995a670ad20eb9b7e93d3c97ad5363afe3fbd39cd554d1a6953a07166851257d16706acc9db6d5265e6452e40a857 SHA512 8dde3235f31862953e2f4db2527e441dfa9413b5f7545c85949ebc0f3b58819307ca124bf04d481d6f1425d6a4c93051239a659554322af893c97b651379fa86
DIST meson-1.2.2.tar.gz.asc 833 BLAKE2B 21c12a94ea5803b8a608d522988f9da63826bff9ce4a74c8c2cf9721d87504b930135532697e9a18710f732446dde2dc70f1c972f825542d043ae20bb76ed9f5 SHA512 9d4117a09f6852bcad7c91c0084bf6f37c05295b134d297a77b8ca5958edb93f030d05e216206c42cf2739e5a6ccdf680fb612056f3a21da9ec3ee80922236df
DIST meson-1.2.3.tar.gz 2184484 BLAKE2B 7d76c54bddba249ab97ebd5dd0afc448177ff9fa70812a8ca0cc9fe308c9b145b3fbc3ee068acae0fdc73edff42134b7a0b618cd80a05347a424aca7bc8bbef8 SHA512 cdcadc731effc1ffb2de98b795ba37955f934ed9b54b9f7f3ac5fe96ab33268d4de4fce734a4c2ef7d2ecc5051616df127e1f8665e197ff954310bf1483b81fc
DIST meson-1.2.3.tar.gz.asc 833 BLAKE2B 1416c49302aab80b5f647cc1d6cd18c36f6199e79c7d13ea284143b2423267b5823850218578626937c14589ebcdf19069b310394c63bc762ab8f59d7ebe3780 SHA512 852c031ecfe032cb48d284bb270597d114294b7d1be5dd0df6ec2f78a62e1a5ba82711bc14ae410e47ced54f99a639055a1628b0acf7aa07a3a80034fce5ebc9
DIST meson-1.3.0.tar.gz 2222383 BLAKE2B cb9ac8e00fe924df67166938687584a9de35e784e1e52bff281649d787695d37e3044ea3d6d5869181fe1e9676b5136548293dbd5cdbd091a6de0c449b8932f5 SHA512 fbcbdd9551ad12b7be84411b96357e01c7c0c38a8e9933093d2e71ed7e12bd4278245798684d389c332eb75dd50c99310affc9acb01cf8bedd45265335083a32
@ -12,3 +8,5 @@ DIST meson-1.3.1.tar.gz 2222386 BLAKE2B 64d53eddc8cb321a4e2dabaa4b7499798a7b6876
DIST meson-1.3.1.tar.gz.asc 833 BLAKE2B 1db7aabe3b7d491dfcd288a780d10784517a73e07348f2d5b98d1fa347dd08b2afa210511c7f5ff867b10ecd3ce470ea764b5ce6907aa7dcaa4d619f705e339c SHA512 0f652d375fa7700f3048266330d783664593c08da47d4f0d87af0be5d8b5e21113521651fb923c6a1cfe88aef7067ebd85b27946f19e71133d7c9805839fc873
DIST meson-1.3.2.tar.gz 2223798 BLAKE2B 72b061598a0cb22517460de4df25394a9dfbddb536c5b8e75b7267ae21292fe2a6a3ec16d64aa81cde63d33022decebcc051cf2d87d677f9b40eb2f4106a40cd SHA512 6369c6d64f91c769f0f4d3e2445bb3615785998489d41acba2134b44ec89abd04bd97a3d3d17c64779eb40b0bf4808e3419eb47638169446a98824d680f37a7b
DIST meson-1.3.2.tar.gz.asc 833 BLAKE2B b11ae2be4e9cb0278be9cafd304146432e606a5fd23379d08116943676286f240fb8cc1d5f897cbd4c2bacfe298802afb1a847e447d71250f58cee5dec38083b SHA512 0cb9575fb599cba4ae77c1954599a24b1f079c46cf255bb8d581ef434598503db6e08af6a95b7c00bc54c165ec8fd9834310e2d4874afe01c5d44e72cef496b3
DIST meson-1.4.0rc2.tar.gz 2227818 BLAKE2B 8b33fc50c726f8aa712aa8d23da712051d99b72f909e74baec54fef64e559a5562b75947987057e496e0d161ff9c2fa85140bf6fac70ecbc2375a09036e8422d SHA512 e070fa321824e2870371fc869157b469a1d37353706984e52d5f6dbe2730561ce6a0aefe15a697b2c2be4060fea29430a5f2460a4fa25736a8bd72f99bcc9b72
DIST meson-1.4.0rc2.tar.gz.asc 833 BLAKE2B 9ce4649f7c4fff4d8c0f12bb5d309dc5662a133a14b9ceb01c511b6619a59314ff19aca8fab94cd904d5b33abecf3248b9f2c6a3efdbdf91de95aebba1f1ac50 SHA512 400e8e4b3f1910a06b94aa5b23919e9c049c4a91d6612b9792e8e0796f90d01644930f2cd44903c3d4a29bedf989b3aba4cb5c88c1507fafaa277ee0e4db0ba3

View File

@ -1,129 +0,0 @@
# Copyright 2016-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} pypy3 )
DISTUTILS_USE_PEP517=setuptools
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
inherit git-r3
else
inherit verify-sig
MY_PV=${PV/_/}
MY_P=${P/_/}
S=${WORKDIR}/${MY_P}
SRC_URI="
https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz
verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc )
"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
fi
inherit bash-completion-r1 distutils-r1 toolchain-funcs
DESCRIPTION="Open source build system"
HOMEPAGE="https://mesonbuild.com/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]
virtual/pkgconfig
)
"
RDEPEND="
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${P}-python-path.patch
)
python_prepare_all() {
local disable_unittests=(
# ASAN and sandbox both want control over LD_PRELOAD
# https://bugs.gentoo.org/673016
-e 's/test_generate_gir_with_address_sanitizer/_&/'
# ASAN is unsupported on some targets
# https://bugs.gentoo.org/692822
-e 's/test_pch_with_address_sanitizer/_&/'
# https://github.com/mesonbuild/meson/issues/7203
-e 's/test_templates/_&/'
# Broken due to python2 wrapper
-e 's/test_python_module/_&/'
)
sed -i "${disable_unittests[@]}" unittests/*.py || die
# Broken due to python2 script created by python_wrapper_setup
rm -r "test cases/frameworks/1 boost" || die
distutils-r1_python_prepare_all
}
src_test() {
tc-export PKG_CONFIG
if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
else
distutils-r1_src_test
fi
}
python_test() {
(
# test_meson_installed
unset PYTHONDONTWRITEBYTECODE
# https://bugs.gentoo.org/687792
unset PKG_CONFIG
# test_cross_file_system_paths
unset XDG_DATA_HOME
# 'test cases/unit/73 summary' expects 80 columns
export COLUMNS=80
# If JAVA_HOME is not set, meson looks for javac in PATH.
# If javac is in /usr/bin, meson assumes /usr/include is a valid
# JDK include path. Setting JAVA_HOME works around this broken
# autodetection. If no JDK is installed, we should end up with an empty
# value in JAVA_HOME, and the tests should get skipped.
export JAVA_HOME=$(java-config -O 2>/dev/null)
# Call python3 instead of EPYTHON to satisfy test_meson_uninstalled.
python3 run_tests.py
) || die "Testing failed with ${EPYTHON}"
}
python_install_all() {
distutils-r1_python_install_all
insinto /usr/share/vim/vimfiles
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
insinto /usr/share/zsh/site-functions
doins data/shell-completions/zsh/_meson
dobashcomp data/shell-completions/bash/meson
}

View File

@ -1,130 +0,0 @@
# Copyright 2016-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} pypy3 )
DISTUTILS_USE_PEP517=setuptools
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
inherit git-r3
else
inherit verify-sig
MY_PV=${PV/_/}
MY_P=${P/_/}
S=${WORKDIR}/${MY_P}
SRC_URI="
https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz
verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc )
"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
fi
inherit bash-completion-r1 distutils-r1 toolchain-funcs
DESCRIPTION="Open source build system"
HOMEPAGE="https://mesonbuild.com/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]
virtual/pkgconfig
)
"
RDEPEND="
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${P}-python-path.patch
"${FILESDIR}"/${P}-llvm-17.patch
)
python_prepare_all() {
local disable_unittests=(
# ASAN and sandbox both want control over LD_PRELOAD
# https://bugs.gentoo.org/673016
-e 's/test_generate_gir_with_address_sanitizer/_&/'
# ASAN is unsupported on some targets
# https://bugs.gentoo.org/692822
-e 's/test_pch_with_address_sanitizer/_&/'
# https://github.com/mesonbuild/meson/issues/7203
-e 's/test_templates/_&/'
# Broken due to python2 wrapper
-e 's/test_python_module/_&/'
)
sed -i "${disable_unittests[@]}" unittests/*.py || die
# Broken due to python2 script created by python_wrapper_setup
rm -r "test cases/frameworks/1 boost" || die
distutils-r1_python_prepare_all
}
src_test() {
tc-export PKG_CONFIG
if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
else
distutils-r1_src_test
fi
}
python_test() {
(
# test_meson_installed
unset PYTHONDONTWRITEBYTECODE
# https://bugs.gentoo.org/687792
unset PKG_CONFIG
# test_cross_file_system_paths
unset XDG_DATA_HOME
# 'test cases/unit/73 summary' expects 80 columns
export COLUMNS=80
# If JAVA_HOME is not set, meson looks for javac in PATH.
# If javac is in /usr/bin, meson assumes /usr/include is a valid
# JDK include path. Setting JAVA_HOME works around this broken
# autodetection. If no JDK is installed, we should end up with an empty
# value in JAVA_HOME, and the tests should get skipped.
export JAVA_HOME=$(java-config -O 2>/dev/null)
# Call python3 instead of EPYTHON to satisfy test_meson_uninstalled.
python3 run_tests.py
) || die "Testing failed with ${EPYTHON}"
}
python_install_all() {
distutils-r1_python_install_all
insinto /usr/share/vim/vimfiles
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
insinto /usr/share/zsh/site-functions
doins data/shell-completions/zsh/_meson
dobashcomp data/shell-completions/bash/meson
}

View File

@ -1,130 +0,0 @@
# Copyright 2016-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} pypy3 )
DISTUTILS_USE_PEP517=setuptools
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
inherit git-r3
else
inherit verify-sig
MY_PV=${PV/_/}
MY_P=${P/_/}
S=${WORKDIR}/${MY_P}
SRC_URI="
https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz
verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc )
"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
fi
inherit bash-completion-r1 distutils-r1 toolchain-funcs
DESCRIPTION="Open source build system"
HOMEPAGE="https://mesonbuild.com/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]
virtual/pkgconfig
)
"
RDEPEND="
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-1.2.1-python-path.patch
"${FILESDIR}"/1.2.2
)
python_prepare_all() {
local disable_unittests=(
# ASAN and sandbox both want control over LD_PRELOAD
# https://bugs.gentoo.org/673016
-e 's/test_generate_gir_with_address_sanitizer/_&/'
# ASAN is unsupported on some targets
# https://bugs.gentoo.org/692822
-e 's/test_pch_with_address_sanitizer/_&/'
# https://github.com/mesonbuild/meson/issues/7203
-e 's/test_templates/_&/'
# Broken due to python2 wrapper
-e 's/test_python_module/_&/'
)
sed -i "${disable_unittests[@]}" unittests/*.py || die
# Broken due to python2 script created by python_wrapper_setup
rm -r "test cases/frameworks/1 boost" || die
distutils-r1_python_prepare_all
}
src_test() {
tc-export PKG_CONFIG
if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
else
distutils-r1_src_test
fi
}
python_test() {
(
# test_meson_installed
unset PYTHONDONTWRITEBYTECODE
# https://bugs.gentoo.org/687792
unset PKG_CONFIG
# test_cross_file_system_paths
unset XDG_DATA_HOME
# 'test cases/unit/73 summary' expects 80 columns
export COLUMNS=80
# If JAVA_HOME is not set, meson looks for javac in PATH.
# If javac is in /usr/bin, meson assumes /usr/include is a valid
# JDK include path. Setting JAVA_HOME works around this broken
# autodetection. If no JDK is installed, we should end up with an empty
# value in JAVA_HOME, and the tests should get skipped.
export JAVA_HOME=$(java-config -O 2>/dev/null)
# Call python3 instead of EPYTHON to satisfy test_meson_uninstalled.
python3 run_tests.py
) || die "Testing failed with ${EPYTHON}"
}
python_install_all() {
distutils-r1_python_install_all
insinto /usr/share/vim/vimfiles
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
insinto /usr/share/zsh/site-functions
doins data/shell-completions/zsh/_meson
dobashcomp data/shell-completions/bash/meson
}

View File

@ -1,132 +0,0 @@
# Copyright 2016-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} pypy3 )
DISTUTILS_USE_PEP517=setuptools
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
inherit git-r3
else
inherit verify-sig
MY_PV=${PV/_/}
MY_P=${P/_/}
S=${WORKDIR}/${MY_P}
SRC_URI="
https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz
verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc )
"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
fi
inherit bash-completion-r1 distutils-r1 toolchain-funcs
DESCRIPTION="Open source build system"
HOMEPAGE="https://mesonbuild.com/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]
virtual/pkgconfig
)
"
RDEPEND="
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-1.2.1-python-path.patch
# backport fix for broken configure_file()
"${FILESDIR}"/0001-Only-convert-boolean-values-for-cmake-formats.patch
)
python_prepare_all() {
local disable_unittests=(
# ASAN and sandbox both want control over LD_PRELOAD
# https://bugs.gentoo.org/673016
-e 's/test_generate_gir_with_address_sanitizer/_&/'
# ASAN is unsupported on some targets
# https://bugs.gentoo.org/692822
-e 's/test_pch_with_address_sanitizer/_&/'
# https://github.com/mesonbuild/meson/issues/7203
-e 's/test_templates/_&/'
# Broken due to python2 wrapper
-e 's/test_python_module/_&/'
)
sed -i "${disable_unittests[@]}" unittests/*.py || die
# Broken due to python2 script created by python_wrapper_setup
rm -r "test cases/frameworks/1 boost" || die
distutils-r1_python_prepare_all
}
src_test() {
tc-export PKG_CONFIG
if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
else
distutils-r1_src_test
fi
}
python_test() {
(
# test_meson_installed
unset PYTHONDONTWRITEBYTECODE
# https://bugs.gentoo.org/687792
unset PKG_CONFIG
# test_cross_file_system_paths
unset XDG_DATA_HOME
# 'test cases/unit/73 summary' expects 80 columns
export COLUMNS=80
# If JAVA_HOME is not set, meson looks for javac in PATH.
# If javac is in /usr/bin, meson assumes /usr/include is a valid
# JDK include path. Setting JAVA_HOME works around this broken
# autodetection. If no JDK is installed, we should end up with an empty
# value in JAVA_HOME, and the tests should get skipped.
export JAVA_HOME=$(java-config -O 2>/dev/null)
# Call python3 instead of EPYTHON to satisfy test_meson_uninstalled.
python3 run_tests.py
) || die "Testing failed with ${EPYTHON}"
}
python_install_all() {
distutils-r1_python_install_all
insinto /usr/share/vim/vimfiles
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
insinto /usr/share/zsh/site-functions
doins data/shell-completions/zsh/_meson
dobashcomp data/shell-completions/bash/meson
}

View File

@ -24,7 +24,7 @@ else
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
fi

View File

@ -28,7 +28,7 @@ else
fi
fi
inherit bash-completion-r1 distutils-r1 toolchain-funcs
inherit bash-completion-r1 flag-o-matic distutils-r1 toolchain-funcs
DESCRIPTION="Open source build system"
HOMEPAGE="https://mesonbuild.com/"
@ -65,12 +65,6 @@ python_prepare_all() {
# ASAN is unsupported on some targets
# https://bugs.gentoo.org/692822
-e 's/test_pch_with_address_sanitizer/_&/'
# https://github.com/mesonbuild/meson/issues/7203
-e 's/test_templates/_&/'
# Broken due to python2 wrapper
-e 's/test_python_module/_&/'
)
sed -i "${disable_unittests[@]}" unittests/*.py || die
@ -92,6 +86,16 @@ src_test() {
python_test() {
(
# meson has its own tests for LTO support. We don't need to verify that
# all tests work when they happen to use it. And in particular, this
# breaks rust.
filter-lto
# remove unwanted python_wrapper_setup contents
# We actually do want to non-error if python2 is installed and tested.
remove="${T}/${EPYTHON}/bin:"
PATH=${PATH/${remove}/}
# test_meson_installed
unset PYTHONDONTWRITEBYTECODE
@ -111,8 +115,7 @@ python_test() {
# value in JAVA_HOME, and the tests should get skipped.
export JAVA_HOME=$(java-config -O 2>/dev/null)
# Call python3 instead of EPYTHON to satisfy test_meson_uninstalled.
python3 run_tests.py
${EPYTHON} -u run_tests.py
) || die "Testing failed with ${EPYTHON}"
}

View File

@ -0,0 +1,20 @@
# Bug: https://bugs.gentoo.org/924300
# Taken from https://sqlite.org/src/info/803481f25020f3c
--- a/test/fuzzcheck.c
+++ b/test/fuzzcheck.c
@@ -159,12 +159,12 @@
} g;
/*
** Include the external vt02.c and randomjson.c modules.
*/
-extern int sqlite3_vt02_init(sqlite3*,char***,void*);
-extern int sqlite3_randomjson_init(sqlite3*,char***,void*);
+extern int sqlite3_vt02_init(sqlite3*,char**,const sqlite3_api_routines*);
+extern int sqlite3_randomjson_init(sqlite3*,char**,const sqlite3_api_routines*);
/*
** Print an error message and quit.
*/

View File

@ -24,7 +24,7 @@ else
"
S="${WORKDIR}/${PN}-src-${SRC_PV}"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="public-domain"

View File

@ -24,7 +24,7 @@ else
"
S="${WORKDIR}/${PN}-src-${SRC_PV}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="public-domain"
@ -52,6 +52,7 @@ fi
PATCHES=(
"${FILESDIR}"/${PN}-3.45.1-ppc64-ptr.patch
"${FILESDIR}"/${P}-lto.patch
)
_fossil_fetch() {

View File

@ -1,2 +1,3 @@
DIST gdb-13.2.tar.xz 23664644 BLAKE2B bf5216ba2286448a46f9e0a405367c5a678e6d7540204722d355b618018b7b75a2ebc5b51353304c5ded02a3979223a81781d305f5afa5be82516cdc2863d49f SHA512 8185d3e11ab60dafff5860a5016577bfe7dd7547ef01ebc867bc247603d82b74ff74c4f29492c7d2aee57076f52be33e289f4c6b414a4b870d4b3004909f4c34
DIST gdb-14.1.tar.xz 24108624 BLAKE2B 52a07b4745f95561f360a597d6ec1d212dafc8e9134dc415cd7bcfb02c26934a60807c8400b545a756c68392e16e104178cdc1464430c53611973881e921a942 SHA512 575e198105076fc4a88f68591aa114ab9c1196e84386a3f7b9b58fe5f30cdeed33f6a5f957b68f08c47284ec922bb60c964627e238471419673fd913575ce427
DIST gdb-14.2.tar.xz 24111936 BLAKE2B 65765dfd1ed08e19bb881fc7ae98d6ee4914f38a9a2bb0d0ca73bef472669664f807fe9c04e8dffd7025be98e736ac52f88ff5851ceddbb01a361885b18befc8 SHA512 7e07941f1fe661288cc571b4964012ceabc1760624fce20320db2f470c01439b2386f859b5288da13204b758e2e3b22a74c68c012178db93b9529b06f1e22ede

View File

@ -0,0 +1,322 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# See https://sourceware.org/gdb/wiki/DistroAdvice for general packaging
# tips & notes.
PYTHON_COMPAT=( python3_{10..12} )
inherit flag-o-matic python-single-r1 strip-linguas toolchain-funcs
export CTARGET=${CTARGET:-${CHOST}}
if [[ ${CTARGET} == ${CHOST} ]] ; then
if [[ ${CATEGORY} == cross-* ]] ; then
export CTARGET=${CATEGORY#cross-}
fi
fi
is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
case ${PV} in
9999*)
# live git tree
EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
inherit git-r3
SRC_URI=""
;;
*.*.50_p2???????|*.*.90_p2???????)
# Weekly snapshots
MY_PV="${PV/_p/.}"
SRC_URI="
https://sourceware.org/pub/gdb/snapshots/branch/gdb-weekly-${MY_PV}.tar.xz
https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-weekly-${MY_PV}.tar.xz
"
S="${WORKDIR}/${PN}-${MY_PV}"
# e.g. 13.1.90_p20230325 is a snapshot on the stable branch, so it's fine
if [[ ${PV} == *.[123456789].9?_p2??????? ]] ; then
REGULAR_RELEASE=1
fi
;;
*.*.9?)
# Prereleases
MY_PV="${PV/_p/.}"
SRC_URI="
https://sourceware.org/pub/gdb/snapshots/branch/gdb-${MY_PV}.tar.xz
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-${MY_PV}.tar.xz
"
S="${WORKDIR}/${PN}-${MY_PV}"
;;
*)
# Normal upstream release
SRC_URI="
mirror://gnu/gdb/${P}.tar.xz
https://sourceware.org/pub/gdb/releases/${P}.tar.xz
"
REGULAR_RELEASE=1
esac
PATCH_DEV=""
PATCH_VER=""
DESCRIPTION="GNU debugger"
HOMEPAGE="https://sourceware.org/gdb/"
SRC_URI="
${SRC_URI}
${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${P}-patches-${PATCH_VER}.tar.xz}
${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}
"
LICENSE="GPL-3+ LGPL-2.1+"
SLOT="0"
IUSE="cet debuginfod guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd"
if [[ -n ${REGULAR_RELEASE} ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
fi
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
RDEPEND="
dev-libs/mpfr:=
dev-libs/gmp:=
>=sys-libs/ncurses-5.2-r2:=
>=sys-libs/readline-7:=
sys-libs/zlib
elibc_glibc? ( net-libs/libnsl:= )
debuginfod? (
dev-libs/elfutils[debuginfod(-)]
)
lzma? ( app-arch/xz-utils )
python? ( ${PYTHON_DEPS} )
guile? ( >=dev-scheme/guile-2.0 )
xml? ( dev-libs/expat )
source-highlight? (
dev-util/source-highlight
)
xxhash? (
dev-libs/xxhash
)
zstd? ( app-arch/zstd:= )
"
DEPEND="${RDEPEND}"
BDEPEND="
app-arch/xz-utils
sys-apps/texinfo
app-alternatives/yacc
nls? ( sys-devel/gettext )
source-highlight? ( virtual/pkgconfig )
test? ( dev-util/dejagnu )
"
QA_CONFIG_IMPL_DECL_SKIP=(
MIN # gnulib FP (bug #898688)
)
PATCHES=(
"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
)
pkg_setup() {
use python && python-single-r1_pkg_setup
}
src_prepare() {
default
strip-linguas -u bfd/po opcodes/po
# Avoid using ancient termcap from host on Prefix systems
sed -i -e 's/termcap tinfow/tinfow/g' \
gdb/configure{.ac,} || die
if [[ ${CHOST} == *-solaris* ]] ; then
# code relies on C++11, so make sure we get that selected
# due to Python 3.11 pymacro.h doing stuff to work around
# versioning mess based on the C version, while we're compiling
# C++ here, so we need to make it clear we're doing C++11/C11
# because Solaris system headers act on these
sed -i -e 's/-x c++/-std=c++11/' gdb/Makefile.in || die
fi
}
gdb_branding() {
printf "Gentoo ${PV} "
if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then
printf "p${PATCH_VER}"
else
printf "vanilla"
fi
[[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}"
}
src_configure() {
strip-unsupported-flags
# See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
# Avoid really confusing logs from subconfigure spam, makes logs far
# more legible.
MAKEOPTS="--output-sync=line ${MAKEOPTS}"
local myconf=(
# portage's econf() does not detect presence of --d-d-t
# because it greps only top-level ./configure. But not
# libiberty's or gdb's configure.
--disable-dependency-tracking
--disable-silent-rules
--with-pkgversion="$(gdb_branding)"
--with-bugurl='https://bugs.gentoo.org/'
--disable-werror
# Disable modules that are in a combined binutils/gdb tree. bug #490566
--disable-{binutils,etc,gas,gold,gprof,gprofng,ld}
$(use_with debuginfod)
$(use_enable test unit-tests)
# Allow user to opt into CET for host libraries.
# Ideally we would like automagic-or-disabled here.
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
# Helps when cross-compiling. Not to be confused with --with-sysroot.
--with-build-sysroot="${ESYSROOT}"
)
is_cross && myconf+=(
--with-sysroot="\${prefix}/${CTARGET}"
--includedir="\${prefix}/include/${CTARGET}"
--with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
)
# gdbserver only works for native targets (CHOST==CTARGET).
# it also doesn't support all targets, so rather than duplicate
# the target list (which changes between versions), use the
# "auto" value when things are turned on, which is triggered
# whenever no --enable or --disable is given
if is_cross || use !server ; then
myconf+=( --disable-gdbserver )
fi
myconf+=(
--enable-64-bit-bfd
--disable-install-libbfd
--disable-install-libiberty
--enable-obsolete
# This only disables building in the readline subdir.
# For gdb itself, it'll use the system version.
--disable-readline
--with-system-readline
# This only disables building in the zlib subdir.
# For gdb itself, it'll use the system version.
--without-zlib
--with-system-zlib
--with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
$(use_with xml expat)
$(use_with lzma)
$(use_enable nls)
$(use_enable sim)
$(use_enable source-highlight)
$(use multitarget && echo --enable-targets=all)
$(use_with python python "${EPYTHON}")
$(use_with xxhash)
$(use_with guile)
$(use_with zstd)
# Find libraries using the toolchain sysroot rather than the configured
# prefix. Needed when cross-compiling.
#
# Check which libraries to apply this to with:
# "${S}"/gdb/configure --help | grep without-lib | sort
--without-lib{babeltrace,expat,gmp,iconv,ipt,lzma,mpfr,xxhash}-prefix
)
# source-highlight is detected with pkg-config: bug #716558
export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)"
export CC_FOR_BUILD="$(tc-getBUILD_CC)"
# ensure proper compiler is detected for Clang builds: bug #831202
export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}"
econf "${myconf[@]}"
}
src_test() {
# Run the unittests (nabbed invocation from Fedora's spec file) at least
emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"'
# Too many failures
# In fact, gdb's test suite needs some work to get passing.
# See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
# As of 11.2, on amd64: "# of unexpected failures 8600"
# Also, ia64 kernel crashes when gdb testsuite is running.
#emake -k check
}
src_install() {
emake DESTDIR="${D}" install
find "${ED}"/usr -name libiberty.a -delete || die
# Delete translations that conflict with binutils-libs. bug #528088
# Note: Should figure out how to store these in an internal gdb dir.
if use nls ; then
find "${ED}" \
-regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \
-delete || die
fi
# Don't install docs when building a cross-gdb
if [[ ${CTARGET} != ${CHOST} ]] ; then
rm -rf "${ED}"/usr/share/{doc,info,locale} || die
local f
for f in "${ED}"/usr/share/man/*/* ; do
if [[ ${f##*/} != ${CTARGET}-* ]] ; then
mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die
fi
done
return 0
fi
# Install it by hand for now:
# https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
# Only install if it exists due to the twisted behavior (see
# notes in src_configure above).
[[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay
docinto gdb
dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
gdb/NEWS gdb/PROBLEMS
docinto sim
dodoc sim/{MAINTAINERS,README-HACKING}
if use server ; then
docinto gdbserver
dodoc gdbserver/README
fi
# Remove shared info pages
rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info*
if use python ; then
python_optimize "${ED}"/usr/share/gdb/python/gdb
fi
}
pkg_postinst() {
# Portage doesn't unmerge files in /etc
rm -vf "${EROOT}"/etc/skel/.gdbinit
if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
ewarn "gdb is unable to get a mach task port when installed by Prefix"
ewarn "Portage, unprivileged. To make gdb fully functional you'll"
ewarn "have to perform the following steps:"
ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
fi
}

View File

@ -131,6 +131,14 @@ src_prepare() {
# Avoid using ancient termcap from host on Prefix systems
sed -i -e 's/termcap tinfow/tinfow/g' \
gdb/configure{.ac,} || die
if [[ ${CHOST} == *-solaris* ]] ; then
# code relies on C++11, so make sure we get that selected
# due to Python 3.11 pymacro.h doing stuff to work around
# versioning mess based on the C version, while we're compiling
# C++ here, so we need to make it clear we're doing C++11/C11
# because Solaris system headers act on these
sed -i -e 's/-x c++/-std=c++11/' gdb/Makefile.in || die
fi
}
gdb_branding() {

View File

@ -0,0 +1,834 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit alternatives flag-o-matic toolchain-funcs multilib multiprocessing
PATCH_VER=1
CROSS_VER=1.5.2
PATCH_BASE="perl-5.38.0-patches-${PATCH_VER}"
PATCH_DEV=dilfridge
DIST_AUTHOR=PEVANS
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.30.0
else
DIST_VERSION="${PV/_rc/-RC}"
fi
SHORT_PV="${DIST_VERSION%.*}"
# Even numbered major versions are ABI intercompatible
# Odd numbered major versions are not
if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
SUBSLOT="${DIST_VERSION%-RC*}"
else
SUBSLOT="${DIST_VERSION%.*}"
fi
# Used only in tar paths
MY_P="perl-${DIST_VERSION}"
# Used in library paths
MY_PV="${DIST_VERSION%-RC*}"
DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
SRC_URI="
mirror://cpan/src/5.0/${MY_P}.tar.xz
mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
https://github.com/gentoo-perl/perl-patchset/archive/refs/tags/${PATCH_BASE}.tar.gz
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PATCH_BASE}.tar.gz
https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
"
HOMEPAGE="https://www.perl.org/"
LICENSE="|| ( Artistic GPL-1+ )"
SLOT="0/${SUBSLOT}"
if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
IUSE="berkdb debug doc gdbm ithreads minimal quadmath"
RDEPEND="
berkdb? ( sys-libs/db:= )
gdbm? ( >=sys-libs/gdbm-1.8.3:= )
app-arch/bzip2
>=sys-libs/zlib-1.2.12
virtual/libcrypt:=
"
DEPEND="${RDEPEND}"
BDEPEND="${RDEPEND}"
PDEPEND="
>=app-admin/perl-cleaner-2.30
!minimal? (
>=virtual/perl-CPAN-2.290.0
>=virtual/perl-Encode-3.120.0
>=virtual/perl-File-Temp-0.230.400-r2
>=virtual/perl-Data-Dumper-2.154.0
>=virtual/perl-Math-BigInt-1.999.842
virtual/perl-Test-Harness
)
"
# bug 390719, bug 523624
# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
S="${WORKDIR}/${MY_P}"
dual_scripts() {
src_remove_dual perl-core/Archive-Tar 2.400.0 ptar ptardiff ptargrep
src_remove_dual perl-core/CPAN 2.360.0 cpan
src_remove_dual perl-core/Digest-SHA 6.40.0 shasum
src_remove_dual perl-core/Encode 3.190.0 enc2xs piconv
src_remove_dual perl-core/ExtUtils-MakeMaker 7.700.0 instmodsh
src_remove_dual perl-core/ExtUtils-ParseXS 3.510.0 xsubpp
src_remove_dual perl-core/IO-Compress 2.204.0 zipdetails
src_remove_dual perl-core/JSON-PP 4.160.0 json_pp
src_remove_dual perl-core/Module-CoreList 5.202.311.290 corelist
src_remove_dual perl-core/Pod-Checker 1.750.0 podchecker
src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
src_remove_dual perl-core/Pod-Usage 2.30.0 pod2usage
src_remove_dual perl-core/Test-Harness 3.440.0 prove
src_remove_dual perl-core/podlators 5.10.0 pod2man pod2text
src_remove_dual_man perl-core/podlators 5.10.0 /usr/share/man/man1/perlpodstyle.1
}
check_rebuild() {
# Fresh install
if [[ -z "${REPLACING_VERSIONS}" ]]; then
return 0;
# Major Upgrade
# doesn't matter if there's multiple copies, it still needs a rebuild
# if the string is anything other than "5.CURRENTMAJOR"
elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
echo ""
ewarn "UPDATE THE PERL MODULES:"
ewarn "After updating dev-lang/perl the installed Perl modules"
ewarn "have to be re-installed. In most cases, this is done automatically"
ewarn "by the package manager, but subsequent steps are still recommended"
ewarn "to ensure system consistency."
ewarn
ewarn "You should start with a depclean to remove any unused perl dependencies"
ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
ewarn "Recommended: emerge --depclean -va"
ewarn
ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
ewarn "remaining rebuilds portage may have missed."
ewarn "Use: perl-cleaner --all"
return 0;
# Reinstall w/ USE Change
elif
( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
( use quadmath && ! has_version dev-lang/perl[quadmath] ) || \
( ! use quadmath && has_version dev-lang/perl[quadmath] ) || \
( use debug && ! has_version dev-lang/perl[debug] ) || \
( ! use debug && has_version dev-lang/perl[debug] ) ; then
echo ""
ewarn "TOGGLED USE-FLAGS WARNING:"
ewarn "You changed one of the use-flags ithreads, quadmath, or debug."
ewarn "You must rebuild all perl-modules installed."
ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
fi
}
pkg_setup() {
case ${CHOST} in
*-darwin*) osname="darwin" ;;
*-solaris*) osname="solaris" ;;
*) osname="linux" ;;
esac
myarch="${CHOST%%-*}-${osname}"
if use debug ; then
myarch+="-debug"
fi
if use quadmath ; then
myarch+="-quadmath"
fi
if use ithreads ; then
mythreading="-multi"
myarch+="-thread"
fi
PRIV_BASE="/usr/$(get_libdir)/perl5"
SITE_BASE="/usr/local/$(get_libdir)/perl5"
VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
LIBPERL="libperl$(get_libname ${MY_PV} )"
PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
SITE_LIB="${SITE_BASE}/${SUBSLOT}"
SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
dual_scripts
}
src_remove_dual_file() {
local i pkg ver
pkg="$1"
ver="$2"
shift 2
case "${EBUILD_PHASE:-none}" in
postinst|postrm)
for i in "$@" ; do
alternatives_auto_makesym "${i}" "${i}-[0-9]*"
done
;;
setup)
for i in "$@" ; do
if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
break
fi
done
;;
install)
for i in "$@" ; do
if ! [[ -f "${ED}"${i} ]] ; then
ewarn "${i} does not exist!"
continue
fi
mv "${ED}"${i}{,-${ver}-${P}} || die
done
;;
esac
}
src_remove_dual_man() {
local i pkg ver ff
pkg="$1"
ver="$2"
shift 2
case "${EBUILD_PHASE:-none}" in
postinst|postrm)
for i in "$@" ; do
ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
ff=${ff##*${i#${i%.[0-9]}}}
alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
done
;;
install)
for i in "$@" ; do
if ! [[ -f "${ED}"${i} ]] ; then
ewarn "${i} does not exist!"
continue
fi
mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
done
;;
esac
}
src_remove_dual() {
local i pkg ver
pkg="$1"
ver="$2"
shift 2
for i in "$@" ; do
src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
done
}
src_prepare_perlcross() {
cp -a ../perl-cross-${CROSS_VER}/* . || die
# bug 794463, needs further analysis what is exactly wrong here
eapply "${FILESDIR}/perl-5.34.0-crossfit.patch"
# bug 604072
MAKEOPTS+=" -j1"
export MAKEOPTS
}
src_prepare_dynamic() {
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
ln -s ${LIBPERL} libperl$(get_libname ) || die
}
# Copy a patch into the patch series
# add_patch SRC_PATH DEST_NAME ['description'] ['bug'] ['bug']
# - description is optional, but recommended
# - all arguments after descriptions are bug URLs
add_patch() {
local patchdir="${WORKDIR}/patches"
local infodir="${WORKDIR}/patch-info"
local src_name dest_name desc
src_name="$1"
dest_name="$2"
desc="$3"
shift; shift; shift;
einfo "Adding ${dest_name} to patch bundle"
cp "${src_name}" "${patchdir}/${dest_name}" || die "Couldn't copy ${src_name} to ${dest_name}"
if [[ -n "${desc}" ]]; then
printf "%s" "${desc}" > "${infodir}/${dest_name}.desc" || die "Couldn't write ${dest_name}.desc"
fi
if [[ $# -gt 0 ]]; then
# Note: when $@ is more than one element, this emits a
# line for each element
printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
fi
}
# Remove a patch using a glob expr
# eg:
# rm_patch *-darwin-Use-CC*
#
rm_patch() {
local patchdir="${WORKDIR}/patches"
local expr="$1"
local patch="$( cd "${patchdir}"; echo $expr )"
einfo "Removing $patch ($expr) from patch bundle"
if [[ -e "${patchdir}/${patch}" ]]; then
rm -f "${patchdir}/${patch}" || die "Can't remove ${patch} ( $expr )"
else
ewarn "No ${expr} found in ${patchdir} to remove"
fi
}
# Yes, this is a reasonable amount of code for something seemingly simple
# but this is far easier to debug when things go wrong, and things went wrong
# multiple times while I was getting the exact number of slashes right, which
# requires circumnavigating both bash and sed escape mechanisms.
c_escape_string() {
local slash dquote
slash='\'
dquote='"'
re_slash="${slash}${slash}"
re_dquote="${slash}${dquote}"
# Convert \ to \\,
# " to \"
echo "$1" |\
sed "s|${re_slash}|${re_slash}${re_slash}|g" |\
sed "s|${re_dquote}|${re_slash}${re_dquote}|g"
}
c_escape_file() {
c_escape_string "$(cat "$1")"
}
apply_patchdir() {
local patchdir="${WORKDIR}/patches"
local infodir="${WORKDIR}/patch-info"
local patchoutput="patchlevel-gentoo.h"
# Inject Patch-Level info into description for patchlevel.h patch
# to show in -V
local patch_expr="*List-packaged-patches*"
local patch="$( cd "${patchdir}"; echo $patch_expr )";
einfo "Injecting patch-level info into ${patch}.desc ( $patch_expr )"
if [[ -e "${patchdir}/${patch}" ]]; then
printf "List packaged patches for %s(%s) in patchlevel.h" "${PF}" "${PATCH_BASE}"\
>"${infodir}/${patch}.desc" || die "Can't rewrite ${patch}.desc"
else
eerror "No $patch_expr found in ${patchdir}"
fi
# Compute patch list to apply
# different name other than PATCHES to stop default
# reapplying it
# Single depth is currently only supported, as artifacts can reside
# from the old layout being multiple-directories, as well as it grossly
# simplifying the patchlevel_gentoo.h generation.
local PERL_PATCHES=($(
find "${patchdir}" -maxdepth 1 -mindepth 1 -type f -printf "%f\n" |\
grep -E '[.](diff|patch)$' |\
sort -n
))
for patch in "${PERL_PATCHES[@]}"; do
eapply "${WORKDIR}"/patches/${patch}
done
einfo "Generating $patchoutput"
# This code creates a header file, each iteration
# creates one-or-more-lines for each entry found in PERL_PATCHES
# and STDOUT is redirected to the .h file
for patch in "${PERL_PATCHES[@]}"; do
local desc_f="${infodir}/${patch}.desc"
local bugs_f="${infodir}/${patch}.bugs"
printf ',"%s"\n' "${patch}"
if [[ ! -e "${desc_f}" ]]; then
ewarn "No description provided for ${patch} (expected: ${desc_f} )"
else
local desc="$(c_escape_file "${desc_f}")"
printf ',"- %s"\n' "${desc}"
fi
if [[ -e "${bugs_f}" ]]; then
while read -d $'\n' -r line; do
local esc_line="$(c_escape_string "${line}")"
printf ',"- Bug: %s"\n' "${esc_line}"
done <"${bugs_f}"
fi
done > "${S}/${patchoutput}"
printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
}
src_prepare() {
local patchdir="${WORKDIR}/patches"
mv -v "${WORKDIR}/perl-patchset-${PATCH_BASE}/patches" "${WORKDIR}/patches" || die
mv -v "${WORKDIR}/perl-patchset-${PATCH_BASE}/patch-info" "${WORKDIR}/patch-info" || die
# Prepare Patch dir with additional patches / remove unwanted patches
# Inject bug/desc entries for perl -V
# Old example:
# add_patch "${FILESDIR}/${PN}-5.26.2-hppa.patch" "100-5.26.2-hppa.patch"\
# "Fix broken miniperl on hppa"\
# "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
add_patch "${FILESDIR}/${PN}-5.36.0-fix-configure-for-clang.patch" \
"100-5.36.0-fix-configure-for-clang.patch" \
"Fix clang check in configure" \
"https://github.com/Perl/perl5/issues/21099"
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
rm_patch "*-nsl-and-cl*"
fi
apply_patchdir
tc-is-cross-compiler && src_prepare_perlcross
tc-is-static-only || src_prepare_dynamic
if use gdbm; then
sed -i "s:INC => .*:INC => \"-I${EROOT}/usr/include/gdbm\":g" \
ext/NDBM_File/Makefile.PL || die
fi
# Use errno.h from prefix rather than from host system, bug #645804
if use prefix && [[ -e "${EPREFIX}"/usr/include/errno.h ]] ; then
sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# set a soname, fix linking against just built libperl
sed -i -e 's/netbsd\*/netbsd*|solaris*/' Makefile.SH || die
fi
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name (soname) not to reference $D
sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
# fix environ linkage absence (only a real issue on Darwin9)
if [[ ${CHOST##*-darwin} -le 9 ]] ; then
sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
Makefile.SH || die
fi
fi
default
}
myconf() {
# the myconf array is declared in src_configure
myconf=( "${myconf[@]}" "$@" )
}
# Outputs a list of versions which have been seen in any of the
# primary perl @INC prefix paths, such as:
# /usr/lib64/perl5/<NUMBER>
# /usr/local/lib64/perl5/<NUMBER>
# /usr/lib64/perl5/vendor_perl/<NUMBER>
#
# All values of NUMBER must be like "5.x.y" or like "5.x"
#
find_candidate_inc_versions() {
local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
local dirs=(
"${EROOT}${PRIV_BASE}"
"${EROOT}${SITE_BASE}"
"${EROOT}${VENDOR_BASE}"
)
for dir in "${dirs[@]}"; do
if [[ ! -e "${dir}" ]]; then
continue
fi
# Without access to readdir() on these dirs, find will not be able
# to reveal any @INC directories inside them, and will subsequently prune
# them from the built perl's @INC support, breaking our compatiblity options
# entirely.
if [[ ! -r "${dir}" || ! -x "${dir}" ]]; then
eerror "Bad permissions on ${dir}, this will probably break things"
eerror "Ensure ${dir} is +rx for at least uid=$EUID"
eerror "Recommended permission is +rx for all"
eerror "> chmod o+rx ${dir}"
fi
done
einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
}
# Sort versions passed versiony-ly, remove self-version if present
# dedup. Takes each version as an argument
sanitize_inc_versions() {
local vexclude="${SUBSLOT}"
einfo "Normalizing/Sorting candidate list: $*"
einfo " to remove '${vexclude}'"
# Note, general numeric sort has to be used
# for the last component, or unique will convert
# 5.30.0 + 5.30 into just 5.30
printf "%s\n" "$@" |\
grep -vxF "${vexclude}" |\
sort -u -nr -t'.' -k1,1rn -k2,2rn -k3,3rg
}
versions_to_inclist() {
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
for v; do
has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
echo -n "${v}/ ";
done
}
versions_to_gentoolibdirs() {
local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
local root
local v
for v; do
for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
local fullpath="${EROOT}${root}/${v}"
if [[ -e "${fullpath}" ]]; then
has "${v}" ${oldv} && printf "%s:" "${fullpath}/${myarch}${mythreading}";
printf "%s:" "${fullpath}"
fi
done
done
}
src_configure() {
declare -a myconf
export LC_ALL="C"
[[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
# Perl has problems compiling with -Os in your flags with glibc
replace-flags "-Os" "-O2"
# xlocale.h is going away in glibc-2.26, so it's counterproductive
# if we use it and include it in CORE/perl.h ... Perl builds just
# fine with glibc and locale.h only.
# However, the darwin prefix people have no locale.h ...
use elibc_glibc && myconf -Ui_xlocale
# This flag makes compiling crash in interesting ways
filter-flags "-malign-double"
# Generic LTO broken since 5.28, triggers EUMM failures
filter-lto
# On musl we dont want to use largefile *64 types, since 1) normal
# types are 64bit / largefile anyway and 2) the *64 types are going
# away in 1.2.4... bug #911233
use elibc_musl && myconf -Ud_off64_t
use sparc && myconf -Ud_longdbl
# This urgently needs debugging - on m68k, miniperl crashes during
# build otherwise..
use m68k && append-ldflags -Wl,-z,norelro
export BUILD_BZIP2=0
export BZIP2_INCLUDE=${EROOT}/usr/include
export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
export BUILD_ZLIB=False
export ZLIB_INCLUDE=${EROOT}/usr/include
export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
# allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
myndbm='U'
mygdbm='U'
mydb='U'
if use gdbm ; then
mygdbm='D'
if use berkdb ; then
myndbm='D'
fi
fi
if use berkdb ; then
mydb='D'
has_version '=sys-libs/db-1*' && myndbm='D'
fi
myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
myconf -Ui_db -Ui_ndbm
fi
use ithreads && myconf -Dusethreads
use quadmath && myconf -Dusequadmath
if use debug ; then
append-cflags "-g"
myconf -DDEBUGGING
elif [[ ${CFLAGS} == *-g* ]] ; then
myconf -DDEBUGGING=-g
else
myconf -DDEBUGGING=none
fi
# modifying 'optimize' prevents cross configure script from appending required flags
if tc-is-cross-compiler; then
append-cflags "-fwrapv"
# bug #913171
export HOSTCFLAGS="${CFLAGS_FOR_BUILD} -D_GNU_SOURCE"
fi
# bug #877659, bug #821577
append-cflags -fno-strict-aliasing
# Autodiscover all old version directories, some of them will even be newer
# if you downgrade
if [[ -z ${PERL_OLDVERSEN} ]]; then
PERL_OLDVERSEN="$( find_candidate_inc_versions )"
fi
# Fixup versions, removing self match, fixing order and dupes
PERL_OLDVERSEN="$( sanitize_inc_versions ${PERL_OLDVERSEN} )"
# Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
if [[ -n "${PERL_OLDVERSEN// }" ]]; then
local inclist="$( versions_to_inclist ${PERL_OLDVERSEN} )"
einfo "This version of perl may partially support modules previously"
einfo "installed in any of the following paths:"
for incpath in ${inclist}; do
[[ -e "${EROOT}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT}${VENDOR_BASE}/${incpath}"
[[ -e "${EROOT}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROOT}${PRIV_BASE}/${incpath}"
[[ -e "${EROOT}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT}${SITE_BASE}/${incpath}"
done
einfo "This is a temporary measure and you should aim to cleanup these paths"
einfo "via world updates and perl-cleaner"
# myconf -Dinc_version_list="${inclist}"
myconf -Dgentoolibdirs="$( versions_to_gentoolibdirs ${PERL_OLDVERSEN} )"
fi
[[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
# Make sure we can do the final link #523730, need to set deployment
# target to override hardcoded 10.3 which breaks on modern OSX
[[ ${CHOST} == *-darwin* ]] && \
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
# Older macOS with non-Apple GCC chokes on inline in system headers
# using c89 mode as injected by cflags.SH, in addition, we override
# cflags, so we loose PERL_DARWIN which enables compat code that
# apparently on more recent macOS releases is no longer necessary
[[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
append-cflags -Dinline=__inline__ -DPERL_DARWIN
# Prefix: the host system needs not to follow Gentoo multilib stuff, and in
# Prefix itself we don't do multilib either, so make sure perl can find
# something compatible.
if use prefix ; then
# Set a hook to check for each detected library whether it actually works.
export libscheck="
( echo 'main(){}' > '${T}'/conftest.c &&
$(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
) || xxx=/dev/null"
# Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
elif [[ $(get_libdir) != "lib" ]] ; then
# We need to use " and not ', as the written config.sh use ' ...
myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
fi
# don't try building ODBM, bug #354453
disabled_extensions="ODBM_File"
if ! use gdbm ; then
# workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
fi
myconf -Dnoextensions="${disabled_extensions}"
[[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
[[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
# allow fiddling via EXTRA_ECONF, bug 558070
eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
# setting -Dld= to tc-getLD breaks perl and all perl things
# https://github.com/Perl/perl5/issues/17791#issuecomment-630145202
myconf \
-Duseshrplib \
-Darchname="${myarch}" \
-Dcc="$(tc-getCC)" \
-Dar="$(tc-getAR)" \
-Dnm="$(tc-getNM)" \
-Dcpp="$(tc-getCPP)" \
-Dranlib="$(tc-getRANLIB)" \
-Accflags="${CFLAGS} -DNO_PERL_RAND_SEED" \
-Doptimize="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
-Dprefix="${EPREFIX}"'/usr' \
-Dsiteprefix="${EPREFIX}"'/usr/local' \
-Dvendorprefix="${EPREFIX}"'/usr' \
-Dscriptdir="${EPREFIX}"'/usr/bin' \
-Dprivlib="${EPREFIX}${PRIV_LIB}" \
-Darchlib="${EPREFIX}${ARCH_LIB}" \
-Dsitelib="${EPREFIX}${SITE_LIB}" \
-Dsitearch="${EPREFIX}${SITE_ARCH}" \
-Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
-Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
-Dman1dir="${EPREFIX}"/usr/share/man/man1 \
-Dman3dir="${EPREFIX}"/usr/share/man/man3 \
-Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
-Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
-Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
-Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
-Dman1ext='1' \
-Dman3ext='3pm' \
-Dlibperl="${LIBPERL}" \
-Dlocincpth="${EPREFIX}"'/usr/include ' \
-Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
-Duselargefiles \
-Dd_semctl_semun \
-Dcf_by='Gentoo' \
-Dmyhostname='localhost' \
-Dperladmin='root@localhost' \
-Ud_csh \
-Dsh="${EPREFIX}"/bin/sh \
-Dtargetsh="${EPREFIX}"/bin/sh \
-Uusenm \
"${EXTRA_ECONF[@]}"
if tc-is-cross-compiler; then
./configure \
--target="${CHOST}" \
--build="${CBUILD}" \
-Dinstallprefix='' \
-Dinstallusrbinperl='undef' \
-Dusevendorprefix='define' \
"${myconf[@]}" \
|| die "Unable to configure"
else
sh Configure \
-des \
-Dinstallprefix="${EPREFIX}"'/usr' \
-Dinstallusrbinperl='n' \
"${myconf[@]}" \
|| die "Unable to configure"
fi
}
src_test() {
export NO_GENTOO_NETWORK_TESTS=1;
export GENTOO_ASSUME_SANDBOXED="${GENTOO_ASSUME_SANDBOXED:-1}"
export GENTOO_NO_PORTING_TESTS="${GENTOO_NO_PORTING_TESTS:-1}"
if [[ ${EUID} == 0 ]] ; then
ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
return 0
fi
TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
}
src_install() {
local i
local coredir="${ARCH_LIB}/CORE"
emake DESTDIR="${D}" install
rm -f "${ED}/usr/bin/perl${MY_PV}"
ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
if ! tc-is-static-only ; then
dolib.so "${ED}"${coredir}/${LIBPERL}
rm -f "${ED}"${coredir}/${LIBPERL}
ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
fi
rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
# This removes ${D} from Config.pm
for i in $(find "${D}" -iname "Config.pm" ) ; do
einfo "Removing ${D} from ${i}..."
sed -i -e "s:${D}::" "${i}" || die "Sed failed"
done
dodoc Changes* README AUTHORS
if use doc ; then
# HTML Documentation
# We expect errors, warnings, and such with the following.
dodir /usr/share/doc/${PF}/html
LD_LIBRARY_PATH=. ./perl installhtml \
--podroot='.' \
--podpath='lib:ext:pod:vms' \
--recurse \
--htmldir="${ED}/usr/share/doc/${PF}/html"
fi
[[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
dual_scripts
}
pkg_preinst() {
check_rebuild
}
pkg_postinst() {
dual_scripts
if [[ -z "${ROOT}" ]] ; then
local INC DIR file
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
einfo "Removing old .ph files"
for DIR in ${INC} ; do
if [[ -d "${DIR}" ]] ; then
for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
rm -f "${file}"
einfo "<< ${file}"
done
fi
done
# Silently remove the now empty dirs
for DIR in ${INC} ; do
if [[ -d "${DIR}" ]] ; then
find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
fi
done
fi
}
pkg_postrm() {
dual_scripts
}

View File

@ -1,4 +1,4 @@
DIST elfutils-0.189.tar.bz2 9143169 BLAKE2B 30596271e14cf3408326abc38a9775b849b8cb0ee119a5455df9434a7d3b9a57afb15e0236a179a26c7bd400d303749964c9d6350c419f747784fd99d12517e0 SHA512 93a877e34db93e5498581d0ab2d702b08c0d87e4cafd9cec9d6636dfa85a168095c305c11583a5b0fb79374dd93bc8d0e9ce6016e6c172764bcea12861605b71
DIST elfutils-0.189.tar.bz2.sig 310 BLAKE2B d4155de64b15a9ab5c497cd603e73bf918eb1117de36cf28f8ddb50ccb4874fb24cffdf44bcbbc028b2ef3f64562960bf11a431274d861f9db96e3d865b37ec2 SHA512 2016c5f0ccd16f7feb0c825164bb18b2f1afad17dcd39d9f159429360fe4afd645665f612397d48bde191a1e59bb8352e2d065d61d7f649b929c3a7e7bfe8dd0
DIST elfutils-0.190.tar.bz2 9162766 BLAKE2B 9934aff08f1898377708b28595fb52130ef9f80408132ac7d306845b10672ba45cf1ac69783da07b3eea9fd647741d44da45b8b2626c45a768cb2844c6186513 SHA512 9c4f5328097e028286c42f29e39dc3d80914b656cdfbbe05b639e91bc787ae8ae64dd4d69a6e317ce30c01648ded10281b86a51e718295f4c589df1225a48102
DIST elfutils-0.190.tar.bz2.sig 310 BLAKE2B d6a2d490aa6815ed9a7c3624050716ebf7c50465af9907d471d47aa3b57590faf9b9ee03de127c6b3bdffa6948414aab6aa8c784ce29570f76bb03ee2021c062 SHA512 7cd88c19402a959679204a5b01ddd48720e224b84268d0d7452f0f1433150b97dd02288fac204fbd5e2fd6f227473bfe62205b350d5fe2e17addf45fb452eed6
DIST elfutils-0.191.tar.bz2 9310088 BLAKE2B 2a7ad251369eca7ba609ab8644181fd479ad8596ee58dc068398ca22be25a978e96b81a10a92a5555d7574fd1b9227c8d54fb41dceb4025aedfc6ae32870bbca SHA512 e22d85f25317a79b36d370347e50284c9120c86f9830f08791b7b6a7b4ad89b9bf4c7c71129133b8d193a0edffb2a2c17987b7e48428b9670aff5ce918777e04
DIST elfutils-0.191.tar.bz2.sig 310 BLAKE2B 5afee19515a115d4ca6d1e0c4a49eca84bb4b911687492934e939a80ac75b7fcea9b6bf5fc0f2248a4c64ef09bd5af9dfc60c72410cba33b78444c38443ad279 SHA512 ab030739d95d13abb84cf4dc6c5407e51d0bd0bca108e27654a1830371694181a1b6f115fdbb4ae0772390f54f1c4811e5ae26b38fdcfd3275177a3716adfd22

View File

@ -13,7 +13,7 @@ SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="bzip2 debuginfod lzma nls static-libs test +utils zstd"
RESTRICT="!test? ( test )"

View File

@ -4,7 +4,7 @@
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/elfutils.gpg
inherit autotools flag-o-matic multilib-minimal verify-sig
inherit flag-o-matic multilib-minimal verify-sig
DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
HOMEPAGE="https://sourceware.org/elfutils/"
@ -13,7 +13,7 @@ SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="bzip2 debuginfod lzma nls static-libs test +utils zstd"
RESTRICT="!test? ( test )"
@ -45,26 +45,17 @@ BDEPEND="
sys-devel/m4
virtual/pkgconfig
nls? ( sys-devel/gettext )
verify-sig? ( sec-keys/openpgp-keys-elfutils )
verify-sig? ( >=sec-keys/openpgp-keys-elfutils-20240301 )
"
PATCHES=(
"${FILESDIR}"/${PN}-0.189-PaX-support.patch
"${FILESDIR}"/${PN}-0.189-skip-DT_RELR-failing-tests.patch
"${FILESDIR}"/${PN}-0.189-musl-aarch64-regs.patch
"${FILESDIR}"/${PN}-0.189-musl-macros.patch
"${FILESDIR}"/${P}-configure-bashisms.patch
"${FILESDIR}"/${P}-clang16-tests.patch
"${FILESDIR}"/${P}-tests-run-lfs-symbols.sh-needs-gawk.patch
"${FILESDIR}"/${P}-lld-17.patch
)
src_prepare() {
default
# Only here for ${P}-configure-bashisms.patch, delete on next bump!
eautoreconf
if ! use static-libs; then
sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die
fi

View File

@ -1,26 +0,0 @@
Add support for PaX ELF markings
Patch by Kevin F. Quinn <kevquinn@gentoo.org>
http://bugs.gentoo.org/115100
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -722,6 +722,7 @@ typedef struct
#define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
#define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
#define PT_GNU_PROPERTY 0x6474e553 /* GNU property */
+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
#define PT_LOSUNW 0x6ffffffa
#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
#define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -4493,6 +4493,7 @@ only executables, shared objects, and core files can have program headers\n"));
if (phdr->p_type >= PT_NUM && phdr->p_type != PT_GNU_EH_FRAME
&& phdr->p_type != PT_GNU_STACK && phdr->p_type != PT_GNU_RELRO
+ && phdr->p_type != PT_PAX_FLAGS
&& phdr->p_type != PT_GNU_PROPERTY
/* Check for a known machine-specific type. */
&& ebl_segment_type_name (ebl, phdr->p_type, NULL, 0) == NULL)

View File

@ -1,26 +0,0 @@
https://sourceware.org/git/?p=elfutils.git;a=commit;h=51373aa9a77ef53d237edc1af664efcbb49f1bf5
From 51373aa9a77ef53d237edc1af664efcbb49f1bf5 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Sat, 22 Apr 2023 21:37:09 +0200
Subject: [PATCH] testsuite: Avoid C99 compatibility issues in
run-native-test.sh
Include <unistd.h> for the pause function, and add the return type
of main. Avoids an implicit function declaration and implicit int.
Signed-off-by: Florian Weimer <fweimer@redhat.com>
--- a/tests/run-native-test.sh
+++ b/tests/run-native-test.sh
@@ -27,7 +27,8 @@
# in all builds.
tempfiles native.c native
-echo 'main () { while (1) pause (); }' > native.c
+printf '#include <unistd.h>\nint main (void) { while (1) pause (); }\n' \
+ > native.c
native=0
kill_native()
--
2.31.1

View File

@ -1,49 +0,0 @@
https://sourceware.org/git/?p=elfutils.git;a=commit;h=a9834d7df68afde4ee44ee8fef888cf7e799171a
From a9834d7df68afde4ee44ee8fef888cf7e799171a Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sun, 5 Mar 2023 13:09:34 +0100
Subject: [PATCH] configure.ac contains Bashisms
Autoconf scripts are supposed to be written in POSIX-compatible shell
language. elfutils commits 0ffe2874e75d48cb88936e119e5284ff2bf664d9
and 3fa98a6f29b0f370e32549ead7eb897c839af980 introduced Bashisms to
configure.ac that cause errors when /bin/sh is not Bash.
Example error when /bin/sh is Dash:
./configure: 8748: test: xyes: unexpected operator
The cause of the error is the use of a non-existent == operator in
expressions passed to the 'test' built-in command. POSIX shell
specifies only an = operator for testing string equality.
* configure.ac: Replace == by = in use_msan and enable_demangler
comparisons.
https://sourceware.org/bugzilla/show_bug.cgi?id=30196
Reported-by: Matt Whitlock <sourceware@mattwhitlock.name>
Signed-off-by: Mark Wielaard <mark@klomp.org>
--- a/configure.ac
+++ b/configure.ac
@@ -169,7 +169,7 @@ if test "$use_msan" = yes; then
CXXFLAGS="$CXXFLAGS -fsanitize=memory -fsanitize-memory-track-origins -D_FORTIFY_SOURCE=0"
LDFLAGS="-shared"
AC_LINK_IFELSE([AC_LANG_SOURCE([int main (int argc, char **argv) { return 0; }])], use_msan=yes, use_msan=no)
- AS_IF([test "x$use_msan" == xyes],
+ AS_IF([test "x$use_msan" = xyes],
ac_cv_zdefs=no NO_UNDEFINED=,
AC_MSG_WARN([clang memory sanitizer not available])
CFLAGS="$old_CFLAGS" CXXFLAGS="$old_CXXFLAGS")
@@ -493,7 +493,7 @@ AC_ARG_ENABLE([demangler],
AS_HELP_STRING([--disable-demangler],
[Disable libstdc++ demangle support]),
[], [enable_demangler=yes])
-AS_IF([test "x$enable_demangler" == xyes],
+AS_IF([test "x$enable_demangler" = xyes],
AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl
AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])])
AM_CONDITIONAL(DEMANGLE, test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes")
--
2.31.1

View File

@ -1,31 +0,0 @@
https://bugs.gentoo.org/913112
https://sourceware.org/PR30729
https://sourceware.org/git/?p=elfutils.git;a=commit;h=09e61a65953ed814d9e970f7f9ffb9c2d8cda477
From 09e61a65953ed814d9e970f7f9ffb9c2d8cda477 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Mon, 28 Aug 2023 20:23:41 +0200
Subject: [PATCH] libelf: Remove elf_scncnt from libelf.map
elf_scncnt was never implemented. It was probably an old name for
elf_getshnum (which was the deprecated name of the elf_getshdrnum
alias). Just remove it from the map file
* libelf/libelf.map (ELFUTILS_1.0): Remove elf_scncnt.
https://sourceware.org/PR30729
Reported-by: Kostadin Shishmanov <kocelfc@tutanota.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
--- a/libelf/libelf.map
+++ b/libelf/libelf.map
@@ -50,7 +50,6 @@ ELFUTILS_1.0 {
elf_rand;
elf_rawdata;
elf_rawfile;
- elf_scncnt;
elf_strptr;
elf_update;
elf_version;
--
2.39.3

View File

@ -1,39 +0,0 @@
We know these tests fail with DT_RELR (https://sourceware.org/bugzilla/show_bug.cgi?id=28495)
so skip for now.
--- a/tests/run-elflint-self.sh
+++ b/tests/run-elflint-self.sh
@@ -18,5 +18,8 @@
. $srcdir/test-subr.sh
+# XFAIL b/c no DT_RELR support yet (https://sourceware.org/bugzilla/show_bug.cgi?id=28495)
+exit 77
+
testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld
--- a/tests/run-strip-strmerge.sh
+++ b/tests/run-strip-strmerge.sh
@@ -17,6 +17,9 @@
. $srcdir/test-subr.sh
+# XFAIL b/c no DT_RELR support yet (https://sourceware.org/bugzilla/show_bug.cgi?id=28495)
+exit 77
+
# Generate a file with merged .shstrtab/.strtab table.
# strip and unstrip it. Check all files with elflint.
diff --git a/tests/run-reverse-sections-self.sh b/tests/run-reverse-sections-self.sh
index 71afd6a..87de933 100755
--- a/tests/run-reverse-sections-self.sh
+++ b/tests/run-reverse-sections-self.sh
@@ -17,6 +17,9 @@
. $srcdir/test-subr.sh
+# XFAIL b/c no DT_RELR support yet (https://sourceware.org/bugzilla/show_bug.cgi?id=28495)
+exit 77
+
test_reverse_self ()
{
in_file="$1"

View File

@ -1,41 +0,0 @@
https://inbox.sourceware.org/elfutils-devel/20230719231639.1786109-1-sam@gentoo.org/T/#u
From 7f607f9aba5c6fccb3d94776452b1cfa421df1f7 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Thu, 20 Jul 2023 00:15:10 +0100
Subject: [PATCH] tests: run-lfs-symbols.sh needs gawk
With awk=mawk, I get:
```
FAIL: run-lfs-symbols.sh
First sanity-check that LFS detection works.
checking ./testfile-nolfs
awk: line 3: syntax error at or near /
FAIL run-lfs-symbols.sh (exit status: 2)
```
* tests/run-lfs-symbols.sh: Call 'gawk' instead of 'awk'.
Signed-off-by: Sam James <sam@gentoo.org>
--- a/tests/run-lfs-symbols.sh
+++ b/tests/run-lfs-symbols.sh
@@ -42,13 +42,13 @@ LFS_FORMAT='BEGIN {
LFS=$(printf "$LFS_FORMAT" "${abs_srcdir}/lfs-symbols")
makeprint() {
- make print-$1 -C $2 |& awk -F= "/^$1=/{ print \$2 }"
+ make print-$1 -C $2 |& gawk -F= "/^$1=/{ print \$2 }"
}
testrun_lfs() {
echo "checking $1"
if [ -e "$1" ]; then
- bad=$(testrun ${abs_top_builddir}/src/nm -u "$1" | awk "$LFS")
+ bad=$(testrun ${abs_top_builddir}/src/nm -u "$1" | gawk "$LFS")
if [ -n "$bad" ]; then
echo "$1 contains non-lfs symbols:" $bad
exit_status=1
--
2.41.0

View File

@ -1,2 +1,3 @@
DIST expat-2.5.0.tar.xz 460560 BLAKE2B 670298d076ff3b512a0212170d40cb04c601a11d6b152f215a5302ad3238c69c2386393d7a6c70bc284be35ce97bf27d87115c3391f4bc17406e509d739d3e31 SHA512 2da73b991b7c0c54440485c787e5edeb3567230204e31b3cac1c3a6713ec6f9f1554d3afffc0f8336168dfd5df02db4a69bcf21b4d959723d14162d13ab87516
DIST expat-2.6.0.tar.xz 483448 BLAKE2B 2f0117317bde4e03d8662bcac1ff6c2bbb1af694846b21a82ac12d11ccd43032b481af72fa35298c3cb19b7426dba6a67e703904ca7b05663ffd854a42348bd0 SHA512 d6f1c4a1a2ec8ffc04c04d6767cc8dd7dea3d132d10b8a2c45c5bfb405893c75db032b87a56cc88300b61c961dd7f9782b93aa74dddc7e66f25acb0c6c82b1fd
DIST expat-2.6.1.tar.xz 484000 BLAKE2B 21a177ae8d70ca1bf41cae75c299a3021a9fc1b9d5eb01eb2945b16d7b24dcbeabad855379bdd8a14de804e1a1648105ce03b505f68c2beb4096a81020e35848 SHA512 fcd7e04e9411799c48b7d08ea07808a0809d034453a0649d9a79ed09000f1a11e5082a034089fc0c0acd2789e85bdf1deb2a94d8e3e33791bbfed66ce7207bcc

View File

@ -0,0 +1,95 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
AUTOTOOLS_AUTO_DEPEND=no
AT_NOEAUTOHEADER=yes # because expat_config.h.in would need post-processing
inherit autotools multilib-minimal
DESCRIPTION="Stream-oriented XML parser library"
HOMEPAGE="https://libexpat.github.io/"
SRC_URI="https://github.com/libexpat/libexpat/releases/download/R_${PV//\./_}/expat-${PV}.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="examples static-libs test unicode"
RESTRICT="!test? ( test )"
BDEPEND="unicode? ( ${AUTOTOOLS_DEPEND} )"
DOCS=( README.md )
src_prepare() {
default
# fix interpreter to be a recent/good shell
sed -i -e "1s:/bin/sh:${BASH}:" conftools/get-version.sh || die
if use unicode; then
cp -R "${S}" "${S}"w || die
pushd "${S}"w >/dev/null
find -name Makefile.am \
-exec sed \
-e 's,libexpat\.la,libexpatw.la,' \
-e 's,libexpat_la,libexpatw_la,' \
-i {} + || die
eautoreconf
popd >/dev/null
fi
}
multilib_src_configure() {
local myconf="$(use_with test tests) $(use_enable static-libs static) --without-docbook"
mkdir -p "${BUILD_DIR}"w || die
if use unicode; then
pushd "${BUILD_DIR}"w >/dev/null
CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}"w econf ${myconf}
popd >/dev/null
fi
ECONF_SOURCE="${S}" econf ${myconf}
}
multilib_src_compile() {
emake
if use unicode; then
pushd "${BUILD_DIR}"w >/dev/null
emake -C lib
popd >/dev/null
fi
}
multilib_src_install() {
emake install DESTDIR="${D}"
if use unicode; then
pushd "${BUILD_DIR}"w >/dev/null
emake -C lib install DESTDIR="${D}"
popd >/dev/null
pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
cp expat.pc expatw.pc
sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
popd >/dev/null
fi
}
multilib_src_install_all() {
einstalldocs
doman doc/xmlwf.1
# Note: Use of HTML_DOCS would add unwanted "doc" subfolder
docinto html
dodoc doc/*.{css,html}
if use examples; then
docinto examples
dodoc examples/*.c
docompress -x usr/share/doc/${PF}/examples
fi
find "${D}" -name '*.la' -type f -delete || die
}

View File

@ -179,7 +179,7 @@ multilib_src_configure() {
#fi
local emesonargs=(
--buildtype $(usex debug debug plain)
-Dbuildtype=$(usex debug debug plain)
-Ddefault_library=$(usex static-libs both shared)
-Druntime_dir="${EPREFIX}"/run
$(meson_feature selinux)

View File

@ -179,7 +179,7 @@ multilib_src_configure() {
#fi
local emesonargs=(
--buildtype $(usex debug debug plain)
-Dbuildtype=$(usex debug debug plain)
-Ddefault_library=$(usex static-libs both shared)
-Druntime_dir="${EPREFIX}"/run
$(meson_feature selinux)

View File

@ -187,7 +187,7 @@ multilib_src_configure() {
#fi
local emesonargs=(
--buildtype $(usex debug debug plain)
-Dbuildtype=$(usex debug debug plain)
-Ddefault_library=$(usex static-libs both shared)
-Druntime_dir="${EPREFIX}"/run
$(meson_feature selinux)

View File

@ -2,3 +2,5 @@ DIST libbsd-0.11.7.tar.xz 418508 BLAKE2B 2ff0aa951c5b37a58ab101aade52d077d52f369
DIST libbsd-0.11.7.tar.xz.asc 833 BLAKE2B 925cd4f5b68c0dccceb476cb188bb5a8185ad77895b9b458ff6819ae241dbd8cbf1c18dd12d10b90b3a9ea3f9e065b44566d1a908d0c111ecbd435434b922a66 SHA512 bdcce69ee261039900896c5be48659f1b6b809f3a6e8a5220aac30a6687926ac29e478a3ea737727d077d6575ee11b86eed896932568fdd261a9aaeb46d695b6
DIST libbsd-0.11.8.tar.xz 432376 BLAKE2B b2b9496423f177af7cba3c55c071b58a314ad987bd04fee5c93dc1885a501a923048f676d00dcb70c8cfa37de775c6ec64224dfecce1d0eaed50b8c27ec0c001 SHA512 0173fc20e2471f96bc6677500a02fbccef7463e023445f47681843c9a94b1fa9970c5af7d2f87f1a1e7f8a7bb60112988defc073828fd2a0dcd0e66e44e67295
DIST libbsd-0.11.8.tar.xz.asc 931 BLAKE2B 3841b81fa8bcdf0e27a41c769691dbefbb82073a18e3a30580794e0242c903bd0b512d31d6e897f8fa98ef3a3cf0dc08a413040ead00caa63f0b993396e1f2fe SHA512 a24355f9151f1da62e1f4f37280eec57ee7a32205b493d973d59231382c878e4373d4cf83ec41612536ef9361fe43e68331217c96c59b6741e7827272369ff2c
DIST libbsd-0.12.1.tar.xz 444048 BLAKE2B 74af2c1f3254fe1e1527c31c5518a8097e9f3a377c497bdb40df262ae00e2244ae460c8f5df6c6533f83c02eaa08621ef1cfbc2a83b9bb28bd77433ff7c088bd SHA512 c45c7861b63295c118f53ce868437ad73887b6764708d0a348b796f5abe2cefc9adbb0dd3be23f6348d6bf63a9920a13b7f90d065299cac5a05ce0376211073a
DIST libbsd-0.12.1.tar.xz.asc 833 BLAKE2B 962f17396b7c74d8ce30925ed65e9b127b576730f580d9411af258c677f6b723e38060ec0af9a8defa54166385502654b721ae48c69ef1465ecadbfbe8c54f07 SHA512 f6c545317b9fe06ce6cfd34e579a5959524ad40f2b25d13617888dd9b79cd5b483e7d24aead540a0bf30a71cd11cc7ca932f41ae60a797b0e881474de9f30543

View File

@ -13,7 +13,7 @@ SRC_URI+=" verify-sig? ( https://${PN}.freedesktop.org/releases/${P}.tar.xz.asc
LICENSE="BEER-WARE BSD BSD-2 BSD-4 ISC MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="static-libs"
RDEPEND="app-crypt/libmd[${MULTILIB_USEDEP}]"

View File

@ -0,0 +1,48 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/guillemjover.asc
inherit flag-o-matic multilib multilib-minimal verify-sig
DESCRIPTION="Library to provide useful functions commonly found on BSD systems"
HOMEPAGE="https://libbsd.freedesktop.org/wiki/ https://gitlab.freedesktop.org/libbsd/libbsd"
SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz"
SRC_URI+=" verify-sig? ( https://${PN}.freedesktop.org/releases/${P}.tar.xz.asc )"
LICENSE="BEER-WARE BSD BSD-2 BSD-4 ISC MIT"
SLOT="0"
# Unkeyworded until figured out a solution for bug #925663
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="static-libs"
RDEPEND="app-crypt/libmd[${MULTILIB_USEDEP}]"
DEPEND="
${RDEPEND}
>=sys-kernel/linux-headers-3.17
"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-guillemjover )"
multilib_src_configure() {
# bug #911726
filter-flags -fno-semantic-interposition
# The build system will install libbsd-ctor.a despite USE="-static-libs"
# which is correct, see:
# https://gitlab.freedesktop.org/libbsd/libbsd/commit/c5b959028734ca2281250c85773d9b5e1d259bc8
ECONF_SOURCE="${S}" econf $(use_enable static-libs static)
}
multilib_src_install() {
emake DESTDIR="${D}" install
find "${ED}" -type f -name "*.la" -delete || die
# ld scripts on standalone prefix (RAP) systems should have the prefix
# stripped from any paths, as the sysroot is automatically prepended.
local ldscript=${ED}/usr/$(get_libdir)/${PN}$(get_libname)
if use prefix && ! use prefix-guest && grep -qIF "ld script" "${ldscript}" 2>/dev/null; then
sed -i "s|${EPREFIX}/|/|g" "${ldscript}" || die
fi
}

View File

@ -1,9 +1,9 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools multilib-minimal
inherit autotools flag-o-matic multilib-minimal
DESCRIPTION="A high-performance event loop/event model with lots of feature"
HOMEPAGE="http://software.schmorp.de/pkg/libev.html"
@ -27,6 +27,14 @@ src_prepare() {
eautoreconf
}
src_configure() {
# See bug #855869 and its large number of dupes in bundled libev copies.
filter-lto
append-flags -fno-strict-aliasing
multilib-minimal_src_configure
}
multilib_src_configure() {
ECONF_SOURCE="${S}" \
econf \

View File

@ -19,7 +19,7 @@ LICENSE="MIT"
# with FEATURES="-preserved-libs" or another package manager if SONAME
# changes.
SLOT="0/8" # SONAME=libffi.so.8
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="debug exec-static-trampoline pax-kernel static-libs test"
RESTRICT="!test? ( test )"

View File

@ -1,8 +1,4 @@
DIST libgcrypt-1.10.1.tar.bz2 3778457 BLAKE2B 46f30459891183b6d9ec18f1c7907fee0ad156c7dd75044f3db2b4d1c19dc6f30b2dfa6f85bc82adc9243aaba913e40fb6faf77d2226ca5a33897220d032437a SHA512 e5ca7966624fff16c3013795836a2c4377f0193dbb4ac5ad2b79654b1fa8992e17d83816569a402212dc8367a7980d4141f5d6ac282bae6b9f02186365b61f13
DIST libgcrypt-1.10.1.tar.bz2.sig 119 BLAKE2B 5261d7dbfd5d82b2d3fa2ebf864a9ef0c7c978dd66a71c078df7bbb3b63f5d85180e5f909f43a49712fc16c45f7aabaa6bc30ed82a39ffc9a5d483ea6a94d162 SHA512 b156ae05079776698bc95ba5a9e48e95de8f716aa1760ef4b2e7cb8518ccec660337fc7823f865bde870461800d472fd8e458d03a7095b6bb614f6dd96f796d8
DIST libgcrypt-1.10.2.tar.bz2 3795164 BLAKE2B c86b29648664aae3fb694b20ad258828d2cecbb09db2b83df00fbdebd5d74228c92015c50f659c250cb0768ccaef7949294d9b7cdcd47e1387b7dce81d35da19 SHA512 3a850baddfe8ffe8b3e96dc54af3fbb9e1dab204db1f06b9b90b8fbbfb7fb7276260cd1e61ba4dde5a662a2385385007478834e62e95f785d2e3d32652adb29e
DIST libgcrypt-1.10.2.tar.bz2.sig 119 BLAKE2B 3753134a1ed1fd2bfd2c64f175c3745db02791359646b3f0229c80ce4ccedbb147ee889a6b8c4fe4bf7e9067d804ee18a8411cd347026cd1656ad1d4d5686bec SHA512 9350444a0bcfa49217815a831f2286ccea470311673257bd809eb5dedbe97d2a5543b0bc7fb752312df69adeb7ac5f064e433f2545a8bf3e494027986cd8020c
DIST libgcrypt-1.10.3.tar.bz2 3783827 BLAKE2B 1a228e02820e886016eb55dee75936c4422a15fb4f95a2f9bcd1e4faac4015d4321c7c8d23f164eb08ece5d62935ab3b3d3104eabfdd22db997ab3e5689dfa6f SHA512 8a8d4c61a6622d8481ceb9edc88ec43f58da32e316f79f8d4775325a48f8936aaa9eb355923b39e2c267b784e9c390600daeb62e0c94f00e30bbadb0d8c0865d
DIST libgcrypt-1.10.3.tar.bz2.sig 238 BLAKE2B 216baebca91b2e940f60d70a4260b6b6b8221ef88cfb42b020bc7b3743a465ef2cf105316648ed1e689cbbf7d79da421aa9f08b5af21c5b862734cf01f377214 SHA512 73795781a458c334ec6daade1b86ae8b788dd5da0b7198b46b8e54a103c5ec4c65a5dd7e6a9d173d136889f24e7f5721992f59117334f39bd1c8a94e3b55a048
DIST libgcrypt-1.9.4.tar.bz2 3239704 BLAKE2B b8244bc12a68955797b0c2b474ac5c95df1014231f7180a2ffa113e3aacedc98eed60ee1e4b30b032a5fcd6a04855ae07142c223906d5db9c28328a71e014f33 SHA512 d0e117ac73c94d70e9521ee1e6328691498cc8328f8c4e21338096908f5c04c7b838966eb63d59494565f4e19f506c07dab4f4d922150d75610d9f7b57abbf60
DIST libgcrypt-1.9.4.tar.bz2.sig 119 BLAKE2B 4012c22259a9fd56f9da6c87d60077cea0dbfef85d4d4ad1ff6a2375ddefafc4cd03ee9083d18e080c14c95887b495062af886732a9593bcf1b8f187d21073fe SHA512 4aee16449b4b50dac62bd80217e769f32f43fb7cd994402b7d9cffbb1934b2771041c8c0c41a63ced9c8d9408025f9c5608ffc7f00e5e9a9b92a07cb5118a98a

View File

@ -1,50 +0,0 @@
https://bugs.gentoo.org/902765
https://dev.gnupg.org/T6432
https://dev.gnupg.org/rC7edf1abb9a0d892a80cbf7ab42f64b2720671ee9
From 7edf1abb9a0d892a80cbf7ab42f64b2720671ee9 Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Mon, 3 Apr 2023 14:00:15 +0900
Subject: [PATCH] build: Allow build with -Oz.
* cipher/Makefile.am [ENABLE_O_FLAG_MUNGING]: Support -Oz.
* random/Makefile.am [ENABLE_O_FLAG_MUNGING]: Support -Oz.
--
GnuPG-bug-id: 6432
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
---
cipher/Makefile.am | 2 +-
random/Makefile.am | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cipher/Makefile.am b/cipher/Makefile.am
index cf1fbe85..e67b1ee2 100644
--- a/cipher/Makefile.am
+++ b/cipher/Makefile.am
@@ -165,7 +165,7 @@ gost-s-box$(EXEEXT_FOR_BUILD): gost-s-box.c
if ENABLE_O_FLAG_MUNGING
-o_flag_munging = sed -e 's/-O\([2-9sg][2-9sg]*\)/-O1/' -e 's/-Ofast/-O1/g'
+o_flag_munging = sed -e 's/-O\([2-9sgz][2-9sgz]*\)/-O1/' -e 's/-Ofast/-O1/g'
else
o_flag_munging = cat
endif
diff --git a/random/Makefile.am b/random/Makefile.am
index af978570..0c935a05 100644
--- a/random/Makefile.am
+++ b/random/Makefile.am
@@ -56,7 +56,7 @@ jitterentropy-base.c jitterentropy.h jitterentropy-base-user.h
# The rndjent module needs to be compiled without optimization. */
if ENABLE_O_FLAG_MUNGING
-o_flag_munging = sed -e 's/-O\([1-9sg][1-9sg]*\)/-O0/g' -e 's/-Ofast/-O0/g'
+o_flag_munging = sed -e 's/-O\([1-9sgz][1-9sgz]*\)/-O0/g' -e 's/-Ofast/-O0/g'
else
o_flag_munging = cat
endif
--
2.40.0

View File

@ -1,134 +0,0 @@
https://lists.gnupg.org/pipermail/gcrypt-devel/2022-December/005410.html
--- a/configure.ac
+++ b/configure.ac
@@ -1211,7 +1211,8 @@ AC_CACHE_CHECK([whether GCC assembler is compatible for ARM assembly implementat
/* Test if '.type' and '.size' are supported. */
".size asmfunc,.-asmfunc;\n\t"
".type asmfunc,%function;\n\t"
- );]], [ asmfunc(); ] )],
+ );
+ void asmfunc(void);]], [ asmfunc(); ] )],
[gcry_cv_gcc_arm_platform_as_ok=yes])
fi])
if test "$gcry_cv_gcc_arm_platform_as_ok" = "yes" ; then
@@ -1238,7 +1239,8 @@ AC_CACHE_CHECK([whether GCC assembler is compatible for ARMv8/Aarch64 assembly i
"eor x0, x0, x30, ror #12;\n\t"
"add x0, x0, x30, asr #12;\n\t"
"eor v0.16b, v0.16b, v31.16b;\n\t"
- );]], [ asmfunc(); ] )],
+ );
+ void asmfunc(void);]], [ asmfunc(); ] )],
[gcry_cv_gcc_aarch64_platform_as_ok=yes])
fi])
if test "$gcry_cv_gcc_aarch64_platform_as_ok" = "yes" ; then
@@ -1267,7 +1269,8 @@ AC_CACHE_CHECK([whether GCC assembler supports for CFI directives],
".cfi_restore_state\n\t"
".long 0\n\t"
".cfi_endproc\n\t"
- );]])],
+ );
+ void asmfunc(void)]])],
[gcry_cv_gcc_asm_cfi_directives=yes])])
if test "$gcry_cv_gcc_asm_cfi_directives" = "yes" ; then
AC_DEFINE(HAVE_GCC_ASM_CFI_DIRECTIVES,1,
@@ -1666,7 +1669,8 @@ if test $amd64_as_feature_detection = yes; then
[gcry_cv_gcc_as_const_division_ok],
[gcry_cv_gcc_as_const_division_ok=no
AC_LINK_IFELSE([AC_LANG_PROGRAM(
- [[__asm__(".text\n\tfn:\n\t xorl \$(123456789/12345678), %ebp;\n\t");]],
+ [[__asm__(".text\n\tfn:\n\t xorl \$(123456789/12345678), %ebp;\n\t");
+ void fn(void);]],
[fn();])],
[gcry_cv_gcc_as_const_division_ok=yes])])
if test "$gcry_cv_gcc_as_const_division_ok" = "no" ; then
@@ -1679,7 +1683,8 @@ if test $amd64_as_feature_detection = yes; then
[gcry_cv_gcc_as_const_division_with_wadivide_ok],
[gcry_cv_gcc_as_const_division_with_wadivide_ok=no
AC_LINK_IFELSE([AC_LANG_PROGRAM(
- [[__asm__(".text\n\tfn:\n\t xorl \$(123456789/12345678), %ebp;\n\t");]],
+ [[__asm__(".text\n\tfn:\n\t xorl \$(123456789/12345678), %ebp;\n\t");
+ void fn(void);]],
[fn();])],
[gcry_cv_gcc_as_const_division_with_wadivide_ok=yes])])
if test "$gcry_cv_gcc_as_const_division_with_wadivide_ok" = "no" ; then
@@ -1715,7 +1720,8 @@ if test $amd64_as_feature_detection = yes; then
* and "-Wa,--divide" workaround failed, this causes assembly
* to be disable on this machine. */
"xorl \$(123456789/12345678), %ebp;\n\t"
- );]], [ asmfunc(); ])],
+ );
+ void asmfunc(void);]], [ asmfunc(); ])],
[gcry_cv_gcc_amd64_platform_as_ok=yes])
fi])
if test "$gcry_cv_gcc_amd64_platform_as_ok" = "yes" ; then
@@ -1734,7 +1740,8 @@ if test $amd64_as_feature_detection = yes; then
".globl asmfunc\n\t"
"asmfunc:\n\t"
"xorq \$(1234), %rbp;\n\t"
- );]], [ asmfunc(); ])],
+ );
+ void asmfunc(void);]], [ asmfunc(); ])],
[gcry_cv_gcc_win64_platform_as_ok=yes])])
if test "$gcry_cv_gcc_win64_platform_as_ok" = "yes" ; then
AC_DEFINE(HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS,1,
@@ -1767,7 +1774,8 @@ AC_CACHE_CHECK([whether GCC assembler is compatible for Intel syntax assembly im
"sub eax, [esp + 4];\n\t"
"add dword ptr [esp + eax], 0b10101;\n\t"
".att_syntax prefix\n\t"
- );]], [ actest(); ])],
+ );
+ void actest(void);]], [ actest(); ])],
[gcry_cv_gcc_platform_as_ok_for_intel_syntax=yes])
fi])
if test "$gcry_cv_gcc_platform_as_ok_for_intel_syntax" = "yes" ; then
@@ -1832,6 +1840,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports NEON instructions],
"vadd.u64 %q0, %q1;\n\t"
"vadd.s64 %d3, %d2, %d3;\n\t"
);
+ void testfn(void);
]], [ testfn(); ])],
[gcry_cv_gcc_inline_asm_neon=yes])
fi])
@@ -1879,6 +1888,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports AArch32 Crypto Extension i
"vmull.p64 q0, d0, d0;\n\t"
);
+ void testfn(void);
]], [ testfn(); ])],
[gcry_cv_gcc_inline_asm_aarch32_crypto=yes])
fi])
@@ -1907,6 +1917,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports AArch64 NEON instructions]
"dup v0.8b, w0;\n\t"
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b},[x0],\#32;\n\t"
);
+ void testfn(void);
]], [ testfn(); ])],
[gcry_cv_gcc_inline_asm_aarch64_neon=yes])
fi])
@@ -1955,6 +1966,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports AArch64 Crypto Extension i
"pmull v0.1q, v0.1d, v31.1d;\n\t"
"pmull2 v0.1q, v0.2d, v31.2d;\n\t"
);
+ void testfn(void);
]], [ testfn(); ])],
[gcry_cv_gcc_inline_asm_aarch64_crypto=yes])
fi])
@@ -2050,6 +2062,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports PowerPC AltiVec/VSX/crypto
"vshasigmad %v0, %v1, 0, 15;\n"
"vpmsumd %v11, %v11, %v11;\n"
);
+ void testfn(void);
]], [ testfn(); ] )],
[gcry_cv_gcc_inline_asm_ppc_altivec=yes])
fi])
@@ -2075,6 +2088,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports PowerISA 3.00 instructions
"testfn:\n"
"stxvb16x %r1,%v12,%v30;\n"
);
+ void testfn(void);
]], [ testfn(); ])],
[gcry_cv_gcc_inline_asm_ppc_arch_3_00=yes])
fi])

View File

@ -0,0 +1,110 @@
https://bugs.gentoo.org/925284
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=75e9bcccb69a9dea67d90840bd295bbd1749cea3
From 75e9bcccb69a9dea67d90840bd295bbd1749cea3 Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Mon, 4 Mar 2024 09:00:59 +0900
Subject: [PATCH] mpi: Fix ECC computation on hppa.
* mpi/ec-inline.h [__hppa] (ADD4_LIMB32, SUB4_LIMB32): New.
* mpi/longlong.h [__hppa] (add_ssaaaa, sub_ddmmss): Add __CLOBBER_CC.
--
Cherry-pick master commit of:
b757f4130af987bdfc769b754b6e9e27882c349c
GnuPG-bug-id: 7022
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
---
mpi/ec-inline.h | 40 ++++++++++++++++++++++++++++++++++++++++
mpi/longlong.h | 12 ++++++------
2 files changed, 46 insertions(+), 6 deletions(-)
diff --git a/mpi/ec-inline.h b/mpi/ec-inline.h
index 0ffdf8eb..c24d5352 100644
--- a/mpi/ec-inline.h
+++ b/mpi/ec-inline.h
@@ -921,6 +921,46 @@ LIMB64_HILO(mpi_limb_t hi, mpi_limb_t lo)
#endif /* HAVE_COMPATIBLE_GCC_ARM_PLATFORM_AS */
+#if defined (__hppa) && __GNUC__ >= 4
+#define ADD4_LIMB32(A3, A2, A1, A0, B3, B2, B1, B0, C3, C2, C1, C0) \
+ __asm__ ("add %7,%11,%3\n\t" \
+ "addc %6,%10,%2\n\t" \
+ "addc %5,%9,%1\n\t" \
+ "addc %4,%8,%0" \
+ : "=r" (A3), \
+ "=&r" (A2), \
+ "=&r" (A1), \
+ "=&r" (A0) \
+ : "rM" ((mpi_limb_t)(B3)), \
+ "rM" ((mpi_limb_t)(B2)), \
+ "rM" ((mpi_limb_t)(B1)), \
+ "rM" ((mpi_limb_t)(B0)), \
+ "rM" ((mpi_limb_t)(C3)), \
+ "rM" ((mpi_limb_t)(C2)), \
+ "rM" ((mpi_limb_t)(C1)), \
+ "rM" ((mpi_limb_t)(C0)) \
+ : "cc")
+
+#define SUB4_LIMB32(A3, A2, A1, A0, B3, B2, B1, B0, C3, C2, C1, C0) \
+ __asm__ ("sub %7,%11,%3\n\t" \
+ "subb %6,%10,%2\n\t" \
+ "subb %5,%9,%1\n\t" \
+ "subb %4,%8,%0\n\t" \
+ : "=r" (A3), \
+ "=&r" (A2), \
+ "=&r" (A1), \
+ "=&r" (A0) \
+ : "rM" ((mpi_limb_t)(B3)), \
+ "rM" ((mpi_limb_t)(B2)), \
+ "rM" ((mpi_limb_t)(B1)), \
+ "rM" ((mpi_limb_t)(B0)), \
+ "rM" ((mpi_limb_t)(C3)), \
+ "rM" ((mpi_limb_t)(C2)), \
+ "rM" ((mpi_limb_t)(C1)), \
+ "rM" ((mpi_limb_t)(C0)) \
+ : "cc")
+
+#endif /* __hppa */
/* Common 32-bit arch addition/subtraction macros. */
diff --git a/mpi/longlong.h b/mpi/longlong.h
index c299534c..1ab70e7e 100644
--- a/mpi/longlong.h
+++ b/mpi/longlong.h
@@ -394,23 +394,23 @@ extern UDItype __udiv_qrnnd ();
***************************************/
#if defined (__hppa) && W_TYPE_SIZE == 32
# define add_ssaaaa(sh, sl, ah, al, bh, bl) \
- __asm__ (" add %4,%5,%1\n" \
- " addc %2,%3,%0" \
+ __asm__ ("add %4,%5,%1\n\t" \
+ "addc %2,%3,%0" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "%rM" ((USItype)(ah)), \
"rM" ((USItype)(bh)), \
"%rM" ((USItype)(al)), \
- "rM" ((USItype)(bl)))
+ "rM" ((USItype)(bl)) __CLOBBER_CC)
# define sub_ddmmss(sh, sl, ah, al, bh, bl) \
- __asm__ (" sub %4,%5,%1\n" \
- " subb %2,%3,%0" \
+ __asm__ ("sub %4,%5,%1\n\t" \
+ "subb %2,%3,%0" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "rM" ((USItype)(ah)), \
"rM" ((USItype)(bh)), \
"rM" ((USItype)(al)), \
- "rM" ((USItype)(bl)))
+ "rM" ((USItype)(bl)) __CLOBBER_CC)
# if defined (_PA_RISC1_1)
# define umul_ppmm(wh, wl, u, v) \
do { \
--
2.30.2

View File

@ -0,0 +1,428 @@
https://bugs.gentoo.org/915060
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=07f0563d325c6589ca1560525d3b22291feec227
From 07f0563d325c6589ca1560525d3b22291feec227 Mon Sep 17 00:00:00 2001
From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Date: Tue, 19 Dec 2023 20:23:47 +0200
Subject: [PATCH] mpi/ec-inline: refactor i386 assembly to reduce register
usage
* mpi/ec-inline.h [__i386__] (ADD2_LIMB32_CARRY_OUT)
(ADD2_LIMB32_CARRY_IN_OUT, ADD2_LIB32_CARRY_IN, SUB2_LIMB32_CARRY_OUT)
(SUB2_LIMB32_CARRY_IN_OUT, SUB2_LIB32_CARRY_IN, ADD8_LIMB32)
(ADD10_LIMB32, ADD14_LIMB32, SUB8_LIMB32, SUB10_LIMB32)
(SUB14_LIMB32): New.
[__i386__] (ADD4_LIMB32, ADD6_LIMB32, SUB4_LIMB32, SUB6_LIMB32): Rewrite
to use new *_CARRY_* macros.
[BYTES_PER_MPI_LIMB == 4] (ADD4_LIMB64): Use ADD8_LIMB32 if available.
[BYTES_PER_MPI_LIMB == 4] (ADD5_LIMB64): Use ADD10_LIMB32 if available.
[BYTES_PER_MPI_LIMB == 4] (ADD7_LIMB64): Use ADD14_LIMB32 if available.
[BYTES_PER_MPI_LIMB == 4] (SUB4_LIMB64): Use SUB8_LIMB32 if available.
[BYTES_PER_MPI_LIMB == 4] (SUB5_LIMB64): Use SUB10_LIMB32 if available.
[BYTES_PER_MPI_LIMB == 4] (SUB7_LIMB64): Use SUB14_LIMB32 if available.
--
Cherry pick of master commit:
956f1ed4ec6ead59dc56f574f943f1fe25dac723
This commit reduces number register operands and register pressure
at i386 assembly used in `ec-nist.c` NIST-P192, P224, P256, and P384.
Performance stays relatively same, with P192 being ~2% slower
than before and P384 being ~5% faster.
GnuPG-bug-id: T6892
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
---
mpi/ec-inline.h | 327 +++++++++++++++++++++++++++++++++---------------
1 file changed, 229 insertions(+), 98 deletions(-)
diff --git a/mpi/ec-inline.h b/mpi/ec-inline.h
index a07826e3..0ffdf8eb 100644
--- a/mpi/ec-inline.h
+++ b/mpi/ec-inline.h
@@ -641,116 +641,192 @@ LIMB64_HILO(mpi_limb_t hi, mpi_limb_t lo)
/* i386 addition/subtraction helpers. */
#if defined (__i386__) && defined(HAVE_CPU_ARCH_X86) && __GNUC__ >= 4
-#define ADD4_LIMB32(a3, a2, a1, a0, b3, b2, b1, b0, c3, c2, c1, c0) \
- __asm__ ("addl %11, %3\n" \
- "adcl %10, %2\n" \
- "adcl %9, %1\n" \
- "adcl %8, %0\n" \
- : "=r" (a3), \
- "=&r" (a2), \
+#define ADD2_LIMB32_CARRY_OUT(carry, a1, a0, b1, b0, c1, c0) \
+ __asm__ ("addl %7, %2\n" \
+ "adcl %6, %1\n" \
+ "sbbl %0, %0\n" \
+ : "=r" (carry), \
"=&r" (a1), \
"=&r" (a0) \
- : "0" ((mpi_limb_t)(b3)), \
- "1" ((mpi_limb_t)(b2)), \
- "2" ((mpi_limb_t)(b1)), \
- "3" ((mpi_limb_t)(b0)), \
- "g" ((mpi_limb_t)(c3)), \
- "g" ((mpi_limb_t)(c2)), \
- "g" ((mpi_limb_t)(c1)), \
- "g" ((mpi_limb_t)(c0)) \
+ : "0" ((mpi_limb_t)(0)), \
+ "1" ((mpi_limb_t)(b1)), \
+ "2" ((mpi_limb_t)(b0)), \
+ "re" ((mpi_limb_t)(c1)), \
+ "re" ((mpi_limb_t)(c0)) \
: "cc")
+#define ADD2_LIMB32_CARRY_IN_OUT(a1, a0, b1, b0, c1, c0, carry) \
+ __asm__ ("addl $1, %0\n" \
+ "adcl %7, %2\n" \
+ "adcl %6, %1\n" \
+ "sbbl %0, %0\n" \
+ : "=r" (carry), \
+ "=&r" (a1), \
+ "=&r" (a0) \
+ : "0" ((mpi_limb_t)(carry)), \
+ "1" ((mpi_limb_t)(b1)), \
+ "2" ((mpi_limb_t)(b0)), \
+ "re" ((mpi_limb_t)(c1)), \
+ "re" ((mpi_limb_t)(c0)) \
+ : "cc")
+
+#define ADD2_LIMB32_CARRY_IN(a1, a0, b1, b0, c1, c0, carry) \
+ __asm__ ("addl $1, %2\n" \
+ "adcl %7, %1\n" \
+ "adcl %6, %0\n" \
+ : "=r" (a1), \
+ "=&r" (a0), \
+ "=&g" (carry) \
+ : "0" ((mpi_limb_t)(b1)), \
+ "1" ((mpi_limb_t)(b0)), \
+ "2" ((mpi_limb_t)(carry)), \
+ "re" ((mpi_limb_t)(c1)), \
+ "re" ((mpi_limb_t)(c0)) \
+ : "cc")
+
+#define ADD4_LIMB32(a3, a2, a1, a0, b3, b2, b1, b0, c3, c2, c1, c0) do { \
+ mpi_limb_t __carry4_32; \
+ ADD2_LIMB32_CARRY_OUT(__carry4_32, a1, a0, b1, b0, c1, c0); \
+ ADD2_LIMB32_CARRY_IN(a3, a2, b3, b2, c3, c2, __carry4_32); \
+ } while (0)
+
#define ADD6_LIMB32(a5, a4, a3, a2, a1, a0, b5, b4, b3, b2, b1, b0, \
c5, c4, c3, c2, c1, c0) do { \
mpi_limb_t __carry6_32; \
- __asm__ ("addl %10, %3\n" \
- "adcl %9, %2\n" \
- "adcl %8, %1\n" \
- "sbbl %0, %0\n" \
- : "=r" (__carry6_32), \
- "=&r" (a2), \
- "=&r" (a1), \
- "=&r" (a0) \
- : "0" ((mpi_limb_t)(0)), \
- "1" ((mpi_limb_t)(b2)), \
- "2" ((mpi_limb_t)(b1)), \
- "3" ((mpi_limb_t)(b0)), \
- "g" ((mpi_limb_t)(c2)), \
- "g" ((mpi_limb_t)(c1)), \
- "g" ((mpi_limb_t)(c0)) \
- : "cc"); \
- __asm__ ("addl $1, %3\n" \
- "adcl %10, %2\n" \
- "adcl %9, %1\n" \
- "adcl %8, %0\n" \
- : "=r" (a5), \
- "=&r" (a4), \
- "=&r" (a3), \
- "=&r" (__carry6_32) \
- : "0" ((mpi_limb_t)(b5)), \
- "1" ((mpi_limb_t)(b4)), \
- "2" ((mpi_limb_t)(b3)), \
- "3" ((mpi_limb_t)(__carry6_32)), \
- "g" ((mpi_limb_t)(c5)), \
- "g" ((mpi_limb_t)(c4)), \
- "g" ((mpi_limb_t)(c3)) \
- : "cc"); \
+ ADD2_LIMB32_CARRY_OUT(__carry6_32, a1, a0, b1, b0, c1, c0); \
+ ADD2_LIMB32_CARRY_IN_OUT(a3, a2, b3, b2, c3, c2, __carry6_32); \
+ ADD2_LIMB32_CARRY_IN(a5, a4, b5, b4, c5, c4, __carry6_32); \
+ } while (0)
+
+#define ADD8_LIMB32(a7, a6, a5, a4, a3, a2, a1, a0, \
+ b7, b6, b5, b4, b3, b2, b1, b0, \
+ c7, c6, c5, c4, c3, c2, c1, c0) do { \
+ mpi_limb_t __carry8_32; \
+ ADD2_LIMB32_CARRY_OUT(__carry8_32, a1, a0, b1, b0, c1, c0); \
+ ADD2_LIMB32_CARRY_IN_OUT(a3, a2, b3, b2, c3, c2, __carry8_32); \
+ ADD2_LIMB32_CARRY_IN_OUT(a5, a4, b5, b4, c5, c4, __carry8_32); \
+ ADD2_LIMB32_CARRY_IN(a7, a6, b7, b6, c7, c6, __carry8_32); \
} while (0)
-#define SUB4_LIMB32(a3, a2, a1, a0, b3, b2, b1, b0, c3, c2, c1, c0) \
- __asm__ ("subl %11, %3\n" \
- "sbbl %10, %2\n" \
- "sbbl %9, %1\n" \
- "sbbl %8, %0\n" \
- : "=r" (a3), \
- "=&r" (a2), \
+#define ADD10_LIMB32(a9, a8, a7, a6, a5, a4, a3, a2, a1, a0, \
+ b9, b8, b7, b6, b5, b4, b3, b2, b1, b0, \
+ c9, c8, c7, c6, c5, c4, c3, c2, c1, c0) do { \
+ mpi_limb_t __carry10_32; \
+ ADD2_LIMB32_CARRY_OUT(__carry10_32, a1, a0, b1, b0, c1, c0); \
+ ADD2_LIMB32_CARRY_IN_OUT(a3, a2, b3, b2, c3, c2, __carry10_32); \
+ ADD2_LIMB32_CARRY_IN_OUT(a5, a4, b5, b4, c5, c4, __carry10_32); \
+ ADD2_LIMB32_CARRY_IN_OUT(a7, a6, b7, b6, c7, c6, __carry10_32); \
+ ADD2_LIMB32_CARRY_IN(a9, a8, b9, b8, c9, c8, __carry10_32); \
+ } while (0)
+
+#define ADD14_LIMB32(a13, a12, a11, a10, a9, a8, a7, \
+ a6, a5, a4, a3, a2, a1, a0, \
+ b13, b12, b11, b10, b9, b8, b7, \
+ b6, b5, b4, b3, b2, b1, b0, \
+ c13, c12, c11, c10, c9, c8, c7, \
+ c6, c5, c4, c3, c2, c1, c0) do { \
+ mpi_limb_t __carry14_32; \
+ ADD2_LIMB32_CARRY_OUT(__carry14_32, a1, a0, b1, b0, c1, c0); \
+ ADD2_LIMB32_CARRY_IN_OUT(a3, a2, b3, b2, c3, c2, __carry14_32); \
+ ADD2_LIMB32_CARRY_IN_OUT(a5, a4, b5, b4, c5, c4, __carry14_32); \
+ ADD2_LIMB32_CARRY_IN_OUT(a7, a6, b7, b6, c7, c6, __carry14_32); \
+ ADD2_LIMB32_CARRY_IN_OUT(a9, a8, b9, b8, c9, c8, __carry14_32); \
+ ADD2_LIMB32_CARRY_IN_OUT(a11, a10, b11, b10, c11, c10, __carry14_32); \
+ ADD2_LIMB32_CARRY_IN(a13, a12, b13, b12, c13, c12, __carry14_32); \
+ } while (0)
+
+#define SUB2_LIMB32_CARRY_OUT(carry, a1, a0, b1, b0, c1, c0) \
+ __asm__ ("subl %7, %2\n" \
+ "sbbl %6, %1\n" \
+ "sbbl %0, %0\n" \
+ : "=r" (carry), \
"=&r" (a1), \
"=&r" (a0) \
- : "0" ((mpi_limb_t)(b3)), \
- "1" ((mpi_limb_t)(b2)), \
- "2" ((mpi_limb_t)(b1)), \
- "3" ((mpi_limb_t)(b0)), \
- "g" ((mpi_limb_t)(c3)), \
- "g" ((mpi_limb_t)(c2)), \
- "g" ((mpi_limb_t)(c1)), \
- "g" ((mpi_limb_t)(c0)) \
+ : "0" ((mpi_limb_t)(0)), \
+ "1" ((mpi_limb_t)(b1)), \
+ "2" ((mpi_limb_t)(b0)), \
+ "re" ((mpi_limb_t)(c1)), \
+ "re" ((mpi_limb_t)(c0)) \
+ : "cc")
+
+#define SUB2_LIMB32_CARRY_IN_OUT(a1, a0, b1, b0, c1, c0, carry) \
+ __asm__ ("addl $1, %0\n" \
+ "sbbl %7, %2\n" \
+ "sbbl %6, %1\n" \
+ "sbbl %0, %0\n" \
+ : "=r" (carry), \
+ "=&r" (a1), \
+ "=&r" (a0) \
+ : "0" ((mpi_limb_t)(carry)), \
+ "1" ((mpi_limb_t)(b1)), \
+ "2" ((mpi_limb_t)(b0)), \
+ "re" ((mpi_limb_t)(c1)), \
+ "re" ((mpi_limb_t)(c0)) \
+ : "cc")
+
+#define SUB2_LIMB32_CARRY_IN(a1, a0, b1, b0, c1, c0, carry) \
+ __asm__ ("addl $1, %2\n" \
+ "sbbl %7, %1\n" \
+ "sbbl %6, %0\n" \
+ : "=r" (a1), \
+ "=&r" (a0), \
+ "=&g" (carry) \
+ : "0" ((mpi_limb_t)(b1)), \
+ "1" ((mpi_limb_t)(b0)), \
+ "2" ((mpi_limb_t)(carry)), \
+ "re" ((mpi_limb_t)(c1)), \
+ "re" ((mpi_limb_t)(c0)) \
: "cc")
+#define SUB4_LIMB32(a3, a2, a1, a0, b3, b2, b1, b0, c3, c2, c1, c0) do { \
+ mpi_limb_t __carry4_32; \
+ SUB2_LIMB32_CARRY_OUT(__carry4_32, a1, a0, b1, b0, c1, c0); \
+ SUB2_LIMB32_CARRY_IN(a3, a2, b3, b2, c3, c2, __carry4_32); \
+ } while (0)
+
#define SUB6_LIMB32(a5, a4, a3, a2, a1, a0, b5, b4, b3, b2, b1, b0, \
c5, c4, c3, c2, c1, c0) do { \
- mpi_limb_t __borrow6_32; \
- __asm__ ("subl %10, %3\n" \
- "sbbl %9, %2\n" \
- "sbbl %8, %1\n" \
- "sbbl %0, %0\n" \
- : "=r" (__borrow6_32), \
- "=&r" (a2), \
- "=&r" (a1), \
- "=&r" (a0) \
- : "0" ((mpi_limb_t)(0)), \
- "1" ((mpi_limb_t)(b2)), \
- "2" ((mpi_limb_t)(b1)), \
- "3" ((mpi_limb_t)(b0)), \
- "g" ((mpi_limb_t)(c2)), \
- "g" ((mpi_limb_t)(c1)), \
- "g" ((mpi_limb_t)(c0)) \
- : "cc"); \
- __asm__ ("addl $1, %3\n" \
- "sbbl %10, %2\n" \
- "sbbl %9, %1\n" \
- "sbbl %8, %0\n" \
- : "=r" (a5), \
- "=&r" (a4), \
- "=&r" (a3), \
- "=&r" (__borrow6_32) \
- : "0" ((mpi_limb_t)(b5)), \
- "1" ((mpi_limb_t)(b4)), \
- "2" ((mpi_limb_t)(b3)), \
- "3" ((mpi_limb_t)(__borrow6_32)), \
- "g" ((mpi_limb_t)(c5)), \
- "g" ((mpi_limb_t)(c4)), \
- "g" ((mpi_limb_t)(c3)) \
- : "cc"); \
+ mpi_limb_t __carry6_32; \
+ SUB2_LIMB32_CARRY_OUT(__carry6_32, a1, a0, b1, b0, c1, c0); \
+ SUB2_LIMB32_CARRY_IN_OUT(a3, a2, b3, b2, c3, c2, __carry6_32); \
+ SUB2_LIMB32_CARRY_IN(a5, a4, b5, b4, c5, c4, __carry6_32); \
+ } while (0)
+
+#define SUB8_LIMB32(a7, a6, a5, a4, a3, a2, a1, a0, \
+ b7, b6, b5, b4, b3, b2, b1, b0, \
+ c7, c6, c5, c4, c3, c2, c1, c0) do { \
+ mpi_limb_t __carry8_32; \
+ SUB2_LIMB32_CARRY_OUT(__carry8_32, a1, a0, b1, b0, c1, c0); \
+ SUB2_LIMB32_CARRY_IN_OUT(a3, a2, b3, b2, c3, c2, __carry8_32); \
+ SUB2_LIMB32_CARRY_IN_OUT(a5, a4, b5, b4, c5, c4, __carry8_32); \
+ SUB2_LIMB32_CARRY_IN(a7, a6, b7, b6, c7, c6, __carry8_32); \
+ } while (0)
+
+#define SUB10_LIMB32(a9, a8, a7, a6, a5, a4, a3, a2, a1, a0, \
+ b9, b8, b7, b6, b5, b4, b3, b2, b1, b0, \
+ c9, c8, c7, c6, c5, c4, c3, c2, c1, c0) do { \
+ mpi_limb_t __carry10_32; \
+ SUB2_LIMB32_CARRY_OUT(__carry10_32, a1, a0, b1, b0, c1, c0); \
+ SUB2_LIMB32_CARRY_IN_OUT(a3, a2, b3, b2, c3, c2, __carry10_32); \
+ SUB2_LIMB32_CARRY_IN_OUT(a5, a4, b5, b4, c5, c4, __carry10_32); \
+ SUB2_LIMB32_CARRY_IN_OUT(a7, a6, b7, b6, c7, c6, __carry10_32); \
+ SUB2_LIMB32_CARRY_IN(a9, a8, b9, b8, c9, c8, __carry10_32); \
+ } while (0)
+
+#define SUB14_LIMB32(a13, a12, a11, a10, a9, a8, a7, \
+ a6, a5, a4, a3, a2, a1, a0, \
+ b13, b12, b11, b10, b9, b8, b7, \
+ b6, b5, b4, b3, b2, b1, b0, \
+ c13, c12, c11, c10, c9, c8, c7, \
+ c6, c5, c4, c3, c2, c1, c0) do { \
+ mpi_limb_t __carry14_32; \
+ SUB2_LIMB32_CARRY_OUT(__carry14_32, a1, a0, b1, b0, c1, c0); \
+ SUB2_LIMB32_CARRY_IN_OUT(a3, a2, b3, b2, c3, c2, __carry14_32); \
+ SUB2_LIMB32_CARRY_IN_OUT(a5, a4, b5, b4, c5, c4, __carry14_32); \
+ SUB2_LIMB32_CARRY_IN_OUT(a7, a6, b7, b6, c7, c6, __carry14_32); \
+ SUB2_LIMB32_CARRY_IN_OUT(a9, a8, b9, b8, c9, c8, __carry14_32); \
+ SUB2_LIMB32_CARRY_IN_OUT(a11, a10, b11, b10, c11, c10, __carry14_32); \
+ SUB2_LIMB32_CARRY_IN(a13, a12, b13, b12, c13, c12, __carry14_32); \
} while (0)
#endif /* __i386__ */
@@ -820,7 +896,6 @@ LIMB64_HILO(mpi_limb_t hi, mpi_limb_t lo)
"Ir" ((mpi_limb_t)(C0)) \
: "cc")
-
#define SUB6_LIMB32(A5, A4, A3, A2, A1, A0, B5, B4, B3, B2, B1, B0, \
C5, C4, C3, C2, C1, C0) do { \
mpi_limb_t __borrow6_32; \
@@ -875,7 +950,13 @@ LIMB64_HILO(mpi_limb_t hi, mpi_limb_t lo)
C2.hi, C2.lo, C1.hi, C1.lo, C0.hi, C0.lo)
#endif
-#if defined(ADD6_LIMB32)
+#if defined(ADD8_LIMB32)
+/* A[0..3] = B[0..3] + C[0..3] */
+#define ADD4_LIMB64(A3, A2, A1, A0, B3, B2, B1, B0, C3, C2, C1, C0) \
+ ADD8_LIMB32(A3.hi, A3.lo, A2.hi, A2.lo, A1.hi, A1.lo, A0.hi, A0.lo, \
+ B3.hi, B3.lo, B2.hi, B2.lo, B1.hi, B1.lo, B0.hi, B0.lo, \
+ C3.hi, C3.lo, C2.hi, C2.lo, C1.hi, C1.lo, C0.hi, C0.lo)
+#elif defined(ADD6_LIMB32)
/* A[0..3] = B[0..3] + C[0..3] */
#define ADD4_LIMB64(A3, A2, A1, A0, B3, B2, B1, B0, C3, C2, C1, C0) do { \
mpi_limb_t __carry4; \
@@ -888,6 +969,28 @@ LIMB64_HILO(mpi_limb_t hi, mpi_limb_t lo)
} while (0)
#endif
+#if defined(ADD10_LIMB32)
+/* A[0..4] = B[0..4] + C[0..4] */
+#define ADD5_LIMB64(A4, A3, A2, A1, A0, B4, B3, B2, B1, B0, \
+ C4, C3, C2, C1, C0) \
+ ADD10_LIMB32(A4.hi, A4.lo, A3.hi, A3.lo, A2.hi, A2.lo, A1.hi, A1.lo, \
+ A0.hi, A0.lo, B4.hi, B4.lo, B3.hi, B3.lo, B2.hi, B2.lo, \
+ B1.hi, B1.lo, B0.hi, B0.lo, C4.hi, C4.lo, C3.hi, C3.lo, \
+ C2.hi, C2.lo, C1.hi, C1.lo, C0.hi, C0.lo)
+#endif
+
+#if defined(ADD14_LIMB32)
+/* A[0..6] = B[0..6] + C[0..6] */
+#define ADD7_LIMB64(A6, A5, A4, A3, A2, A1, A0, B6, B5, B4, B3, B2, B1, B0, \
+ C6, C5, C4, C3, C2, C1, C0) \
+ ADD14_LIMB32(A6.hi, A6.lo, A5.hi, A5.lo, A4.hi, A4.lo, A3.hi, A3.lo, \
+ A2.hi, A2.lo, A1.hi, A1.lo, A0.hi, A0.lo, B6.hi, B6.lo, \
+ B5.hi, B5.lo, B4.hi, B4.lo, B3.hi, B3.lo, B2.hi, B2.lo, \
+ B1.hi, B1.lo, B0.hi, B0.lo, C6.hi, C6.lo, C5.hi, C5.lo, \
+ C4.hi, C4.lo, C3.hi, C3.lo, C2.hi, C2.lo, C1.hi, C1.lo, \
+ C0.hi, C0.lo)
+#endif
+
#if defined(SUB4_LIMB32)
/* A[0..1] = B[0..1] - C[0..1] */
#define SUB2_LIMB64(A1, A0, B1, B0, C1, C0) \
@@ -914,7 +1017,13 @@ LIMB64_HILO(mpi_limb_t hi, mpi_limb_t lo)
C2.hi, C2.lo, C1.hi, C1.lo, C0.hi, C0.lo)
#endif
-#if defined(SUB6_LIMB32)
+#if defined(SUB8_LIMB32)
+/* A[0..3] = B[0..3] - C[0..3] */
+#define SUB4_LIMB64(A3, A2, A1, A0, B3, B2, B1, B0, C3, C2, C1, C0) \
+ SUB8_LIMB32(A3.hi, A3.lo, A2.hi, A2.lo, A1.hi, A1.lo, A0.hi, A0.lo, \
+ B3.hi, B3.lo, B2.hi, B2.lo, B1.hi, B1.lo, B0.hi, B0.lo, \
+ C3.hi, C3.lo, C2.hi, C2.lo, C1.hi, C1.lo, C0.hi, C0.lo)
+#elif defined(SUB6_LIMB32)
/* A[0..3] = B[0..3] - C[0..3] */
#define SUB4_LIMB64(A3, A2, A1, A0, B3, B2, B1, B0, C3, C2, C1, C0) do { \
mpi_limb_t __borrow4; \
@@ -927,6 +1036,28 @@ LIMB64_HILO(mpi_limb_t hi, mpi_limb_t lo)
} while (0)
#endif
+#if defined(SUB10_LIMB32)
+/* A[0..4] = B[0..4] - C[0..4] */
+#define SUB5_LIMB64(A4, A3, A2, A1, A0, B4, B3, B2, B1, B0, \
+ C4, C3, C2, C1, C0) \
+ SUB10_LIMB32(A4.hi, A4.lo, A3.hi, A3.lo, A2.hi, A2.lo, A1.hi, A1.lo, \
+ A0.hi, A0.lo, B4.hi, B4.lo, B3.hi, B3.lo, B2.hi, B2.lo, \
+ B1.hi, B1.lo, B0.hi, B0.lo, C4.hi, C4.lo, C3.hi, C3.lo, \
+ C2.hi, C2.lo, C1.hi, C1.lo, C0.hi, C0.lo)
+#endif
+
+#if defined(SUB14_LIMB32)
+/* A[0..6] = B[0..6] - C[0..6] */
+#define SUB7_LIMB64(A6, A5, A4, A3, A2, A1, A0, B6, B5, B4, B3, B2, B1, B0, \
+ C6, C5, C4, C3, C2, C1, C0) \
+ SUB14_LIMB32(A6.hi, A6.lo, A5.hi, A5.lo, A4.hi, A4.lo, A3.hi, A3.lo, \
+ A2.hi, A2.lo, A1.hi, A1.lo, A0.hi, A0.lo, B6.hi, B6.lo, \
+ B5.hi, B5.lo, B4.hi, B4.lo, B3.hi, B3.lo, B2.hi, B2.lo, \
+ B1.hi, B1.lo, B0.hi, B0.lo, C6.hi, C6.lo, C5.hi, C5.lo, \
+ C4.hi, C4.lo, C3.hi, C3.lo, C2.hi, C2.lo, C1.hi, C1.lo, \
+ C0.hi, C0.lo)
+#endif
+
#endif /* BYTES_PER_MPI_LIMB == 4 */
--
2.30.2

View File

@ -0,0 +1,94 @@
https://bugs.gentoo.org/915060
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=08b88b4012f7837736b8d29a3689ce3fff2a10c8
From 08b88b4012f7837736b8d29a3689ce3fff2a10c8 Mon Sep 17 00:00:00 2001
From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Date: Sat, 16 Dec 2023 19:50:23 +0200
Subject: [PATCH] mpi/ec-nist: fix for -Og build failure on i386
* mpi/ec-nist.c (_gcry_mpi_ec_nist256_mod)
(_gcry_mpi_ec_nist384_mod): Load p_mult constant with carry offset
to stack.
--
Cherry pick master commit of:
90097bd2f41c217dc5c666570e5680f432cf92d3
Patch fixes compilation error on i386 with -Og optimization level.
In file included from ../../mpi/ec-nist.c:34:
../../mpi/ec-nist.c: In function '_gcry_mpi_ec_nist256_mod':
../../mpi/ec-inline.h:701:3: error: 'asm' operand has impossible constraints
701 | __asm__ ("subl %11, %3\n" \
| ^~~~~~~
../../mpi/ec-inline.h:894:9: note: in expansion of macro 'SUB4_LIMB32'
894 | SUB4_LIMB32(A1.hi, A1.lo, A0.hi, A0.lo, \
| ^~~~~~~~~~~
../../mpi/ec-inline.h:1009:5: note: in expansion of macro 'SUB2_LIMB64'
1009 | SUB2_LIMB64(A4, A3, B4, B3, C4, C3); \
| ^~~~~~~~~~~
../../mpi/ec-nist.c:474:3: note: in expansion of macro 'SUB5_LIMB64'
474 | SUB5_LIMB64 (s[4], s[3], s[2], s[1], s[0],
| ^~~~~~~~~~~
Appears that in problematic function, too many registers end up being
allocated for addressing and there is not enough register left for
asm input/output (4 registers needed for this block). Problem can be
workaround by reducing needed addressing registers by pushing
`p_mult[carry + ...]` values to stack. On other compiler flag levels
and architectures, compiler should be able to optimize away this
extra copying and have not effect on performance.
GnuPG-bug-id: T6892
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
---
mpi/ec-nist.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/mpi/ec-nist.c b/mpi/ec-nist.c
index f792405c..559d02d9 100644
--- a/mpi/ec-nist.c
+++ b/mpi/ec-nist.c
@@ -471,11 +471,15 @@ _gcry_mpi_ec_nist256_mod (gcry_mpi_t w, mpi_ec_t ctx)
carry = LO32_LIMB64(s[4]);
+ /* Load values to stack to ease register pressure on i386. */
+ e[0] = p_mult[carry + 4][0];
+ e[1] = p_mult[carry + 4][1];
+ e[2] = p_mult[carry + 4][2];
+ e[3] = p_mult[carry + 4][3];
+ e[4] = p_mult[carry + 4][4];
SUB5_LIMB64 (s[4], s[3], s[2], s[1], s[0],
s[4], s[3], s[2], s[1], s[0],
- p_mult[carry + 4][4], p_mult[carry + 4][3],
- p_mult[carry + 4][2], p_mult[carry + 4][1],
- p_mult[carry + 4][0]);
+ e[4], e[3], e[2], e[1], e[0]);
/* Add 1*P */
ADD5_LIMB64 (d[4], d[3], d[2], d[1], d[0],
@@ -749,12 +753,17 @@ _gcry_mpi_ec_nist384_mod (gcry_mpi_t w, mpi_ec_t ctx)
carry = LO32_LIMB64(s[6]);
+ /* Load values to stack to ease register pressure on i386. */
+ x[0] = p_mult[carry + 3][0];
+ x[1] = p_mult[carry + 3][1];
+ x[2] = p_mult[carry + 3][2];
+ x[3] = p_mult[carry + 3][3];
+ x[4] = p_mult[carry + 3][4];
+ x[5] = p_mult[carry + 3][5];
+ x[6] = p_mult[carry + 3][6];
SUB7_LIMB64 (s[6], s[5], s[4], s[3], s[2], s[1], s[0],
s[6], s[5], s[4], s[3], s[2], s[1], s[0],
- p_mult[carry + 3][6], p_mult[carry + 3][5],
- p_mult[carry + 3][4], p_mult[carry + 3][3],
- p_mult[carry + 3][2], p_mult[carry + 3][1],
- p_mult[carry + 3][0]);
+ x[6], x[5], x[4], x[3], x[2], x[1], x[0]);
ADD7_LIMB64 (d[6], d[5], d[4], d[3], d[2], d[1], d[0],
s[6], s[5], s[4], s[3], s[2], s[1], s[0],
--
2.30.2

View File

@ -1,44 +0,0 @@
https://lists.gnupg.org/pipermail/gcrypt-devel/2022-January/005224.html
From bc0b82ad8201a4d7bffa3cf0f5504b72c1011cb1 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Tue, 18 Jan 2022 12:44:22 +0000
Subject: [PATCH] cipher/cipher-gcm: fix build failure on ARM NEON
'features' is only defined when relevant CPU features are found, but
one of the uses below its definition checked for GCM_USE_ARM_NEON which
wasn't in the guard above it.
i.e. We used to only define 'features' when:
- GCM_USE_INTEL_PCLMUL
- GCM_USE_ARM_PMULL
- GCM_USE_S390X_CRYPTO
- GCM_USE_PPC_VPMSUM
- GCM_USE_S390X_CRYPTO
- GCM_USE_PPC_VPMSUM
is set.
We were missing GCM_USE_ARM_NEON so when we check for GCM_USE_ARM_NEON
below, it'd fail as features wasn't defined.
Bug: https://bugs.gentoo.org/831397
---
cipher/cipher-gcm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cipher/cipher-gcm.c b/cipher/cipher-gcm.c
index a039c5e9..22834f35 100644
--- a/cipher/cipher-gcm.c
+++ b/cipher/cipher-gcm.c
@@ -583,7 +583,8 @@ static void
setupM (gcry_cipher_hd_t c)
{
#if defined(GCM_USE_INTEL_PCLMUL) || defined(GCM_USE_ARM_PMULL) || \
- defined(GCM_USE_S390X_CRYPTO) || defined(GCM_USE_PPC_VPMSUM)
+ defined(GCM_USE_ARM_NEON) || defined(GCM_USE_S390X_CRYPTO) || \
+ defined(GCM_USE_PPC_VPMSUM)
unsigned int features = _gcry_get_hw_features ();
#endif
--
2.34.1

View File

@ -1,176 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
inherit autotools flag-o-matic linux-info multilib-minimal toolchain-funcs verify-sig
DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
HOMEPAGE="https://www.gnupg.org/"
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
LICENSE="LGPL-2.1+ GPL-2+ MIT"
SLOT="0/20" # subslot = soname major version
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc +getentropy static-libs"
# Build system only has --disable-arm-crypto-support right now
# If changing this, update src_configure logic too.
# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions,
# but this looks like it might change in future. This is just a safety check
# in case people somehow do have a CPU which only supports some. They must
# for now disable them all if that's the case.
REQUIRED_USE="
cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 )
cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 )
cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 )
cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 )
cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec )
"
RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]
getentropy? (
kernel_linux? (
elibc_glibc? ( >=sys-libs/glibc-2.25 )
elibc_musl? ( >=sys-libs/musl-1.1.20 )
)
)"
DEPEND="${RDEPEND}"
BDEPEND="doc? ( virtual/texi2dvi )
verify-sig? ( sec-keys/openpgp-keys-gnupg )"
PATCHES=(
"${FILESDIR}"/${PN}-multilib-syspath.patch
"${FILESDIR}"/${PN}-powerpc-darwin.patch
"${FILESDIR}"/${PN}-1.10.1-fix-no-asm-hppa.patch
"${FILESDIR}"/${PN}-1.9.4-no-fgrep-libgcrypt-config.patch
)
MULTILIB_CHOST_TOOLS=(
/usr/bin/libgcrypt-config
)
pkg_pretend() {
if [[ ${MERGE_TYPE} == buildonly ]]; then
return
fi
if use kernel_linux && use getentropy; then
unset KV_FULL
get_running_version
if [[ -n ${KV_FULL} ]] && kernel_is -lt 3 17; then
eerror "The getentropy function requires the getrandom syscall."
eerror "This was introduced in Linux 3.17."
eerror "Your system is currently running Linux ${KV_FULL}."
eerror "Disable the 'getentropy' USE flag or upgrade your kernel."
die "Kernel is too old for getentropy"
fi
fi
}
pkg_setup() {
:
}
src_prepare() {
default
eautoreconf
}
multilib_src_configure() {
if [[ ${CHOST} == *86*-solaris* ]] ; then
# ASM code uses GNU ELF syntax, divide in particular, we need to
# allow this via ASFLAGS, since we don't have a flag-o-matic
# function for that, we'll have to abuse cflags for this
append-cflags -Wa,--divide
fi
if [[ ${CHOST} == powerpc* ]] ; then
# ./configure does a lot of automagic, prevent that
# generic ppc32+ppc64 altivec
use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec=no
use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec_cflags=no
# power8 vector extension, aka arch 2.07 ISA, also checked below via ppc-crypto-support
use cpu_flags_ppc_vsx2 || local -x gcry_cv_gcc_inline_asm_ppc_altivec=no
# power9 vector extension, aka arch 3.00 ISA
use cpu_flags_ppc_vsx3 || local -x gcry_cv_gcc_inline_asm_ppc_arch_3_00=no
fi
# Workaround for GCC < 11.3 bug
# https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0b399721ce9709ae25f9d2050360c5ab2115ae29
# https://dev.gnupg.org/T5581
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124
if use arm64 && tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
append-flags -fno-tree-loop-vectorize
fi
# ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
# https://github.com/gentoo/gentoo/pull/28355
# mold needs this too but right now tc-ld-is-mold is also not available
if tc-ld-is-lld; then
append-ldflags -Wl,--undefined-version
fi
local myeconfargs=(
CC_FOR_BUILD="$(tc-getBUILD_CC)"
--enable-noexecstack
$(use_enable cpu_flags_arm_neon neon-support)
# See REQUIRED_USE comment above
$(use_enable cpu_flags_arm_aes arm-crypto-support)
$(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support)
$(use_enable cpu_flags_x86_aes aesni-support)
$(use_enable cpu_flags_x86_avx avx-support)
$(use_enable cpu_flags_x86_avx2 avx2-support)
$(use_enable cpu_flags_x86_padlock padlock-support)
$(use_enable cpu_flags_x86_sha shaext-support)
$(use_enable cpu_flags_x86_sse4_1 sse41-support)
# required for sys-power/suspend[crypt], bug 751568
$(use_enable static-libs static)
# disabled due to various applications requiring privileges
# after libgcrypt drops them (bug #468616)
--without-capabilities
# http://trac.videolan.org/vlc/ticket/620
$([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
$(use asm || echo "--disable-asm")
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
)
if use kernel_linux; then
# --enable-random=getentropy requires getentropy/getrandom.
# --enable-random=linux enables legacy code that tries getrandom
# and falls back to reading /dev/random.
myeconfargs+=( --enable-random=$(usex getentropy getentropy linux) )
fi
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
}
multilib_src_compile() {
default
multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
}
multilib_src_test() {
# t-secmem and t-sexp need mlock which requires extra privileges; nspawn
# at least disallows that by default.
local -x GCRYPT_IN_ASAN_TEST=1
default
}
multilib_src_install() {
emake DESTDIR="${D}" install
multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
}
multilib_src_install_all() {
default
find "${ED}" -type f -name '*.la' -delete || die
}

View File

@ -1,179 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
inherit autotools flag-o-matic linux-info multilib-minimal toolchain-funcs verify-sig
DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
HOMEPAGE="https://www.gnupg.org/"
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
LICENSE="LGPL-2.1+ GPL-2+ MIT"
SLOT="0/20" # subslot = soname major version
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc +getentropy static-libs"
# Build system only has --disable-arm-crypto-support right now
# If changing this, update src_configure logic too.
# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions,
# but this looks like it might change in future. This is just a safety check
# in case people somehow do have a CPU which only supports some. They must
# for now disable them all if that's the case.
REQUIRED_USE="
cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 )
cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 )
cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 )
cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 )
cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec )
"
RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]
getentropy? (
kernel_linux? (
elibc_glibc? ( >=sys-libs/glibc-2.25 )
elibc_musl? ( >=sys-libs/musl-1.1.20 )
)
)"
DEPEND="${RDEPEND}"
BDEPEND="doc? ( virtual/texi2dvi )
verify-sig? ( sec-keys/openpgp-keys-gnupg )"
PATCHES=(
"${FILESDIR}"/${PN}-multilib-syspath.patch
"${FILESDIR}"/${PN}-powerpc-darwin.patch
"${FILESDIR}"/${PN}-1.10.1-fix-no-asm-hppa.patch
"${FILESDIR}"/${PN}-1.9.4-no-fgrep-libgcrypt-config.patch
"${FILESDIR}"/${PN}-1.10.1-configure-clang16.patch
"${FILESDIR}"/libgcrypt-1.10-build-Allow-build-with-Oz.patch
)
MULTILIB_CHOST_TOOLS=(
/usr/bin/libgcrypt-config
)
pkg_pretend() {
if [[ ${MERGE_TYPE} == buildonly ]]; then
return
fi
if use kernel_linux && use getentropy; then
unset KV_FULL
get_running_version
if [[ -n ${KV_FULL} ]] && kernel_is -lt 3 17; then
eerror "The getentropy function requires the getrandom syscall."
eerror "This was introduced in Linux 3.17."
eerror "Your system is currently running Linux ${KV_FULL}."
eerror "Disable the 'getentropy' USE flag or upgrade your kernel."
die "Kernel is too old for getentropy"
fi
fi
}
pkg_setup() {
:
}
src_prepare() {
default
eautoreconf
}
multilib_src_configure() {
if [[ ${CHOST} == *86*-solaris* ]] ; then
# ASM code uses GNU ELF syntax, divide in particular, we need to
# allow this via ASFLAGS, since we don't have a flag-o-matic
# function for that, we'll have to abuse cflags for this
append-cflags -Wa,--divide
fi
if [[ ${CHOST} == powerpc* ]] ; then
# ./configure does a lot of automagic, prevent that
# generic ppc32+ppc64 altivec
use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec=no
use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec_cflags=no
# power8 vector extension, aka arch 2.07 ISA, also checked below via ppc-crypto-support
use cpu_flags_ppc_vsx2 || local -x gcry_cv_gcc_inline_asm_ppc_altivec=no
# power9 vector extension, aka arch 3.00 ISA
use cpu_flags_ppc_vsx3 || local -x gcry_cv_gcc_inline_asm_ppc_arch_3_00=no
fi
# Workaround for GCC < 11.3 bug
# https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0b399721ce9709ae25f9d2050360c5ab2115ae29
# https://dev.gnupg.org/T5581
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124
if use arm64 && tc-is-gcc && (($(gcc-major-version) == 11)) &&
(($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
append-flags -fno-tree-loop-vectorize
fi
# ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
# https://github.com/gentoo/gentoo/pull/28355
# mold needs this too but right now tc-ld-is-mold is also not available
if tc-ld-is-lld; then
append-ldflags -Wl,--undefined-version
fi
local myeconfargs=(
CC_FOR_BUILD="$(tc-getBUILD_CC)"
--enable-noexecstack
$(use_enable cpu_flags_arm_neon neon-support)
# See REQUIRED_USE comment above
$(use_enable cpu_flags_arm_aes arm-crypto-support)
$(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support)
$(use_enable cpu_flags_x86_aes aesni-support)
$(use_enable cpu_flags_x86_avx avx-support)
$(use_enable cpu_flags_x86_avx2 avx2-support)
$(use_enable cpu_flags_x86_padlock padlock-support)
$(use_enable cpu_flags_x86_sha shaext-support)
$(use_enable cpu_flags_x86_sse4_1 sse41-support)
# required for sys-power/suspend[crypt], bug 751568
$(use_enable static-libs static)
# disabled due to various applications requiring privileges
# after libgcrypt drops them (bug #468616)
--without-capabilities
# http://trac.videolan.org/vlc/ticket/620
$([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
$(use asm || echo "--disable-asm")
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
)
if use kernel_linux; then
# --enable-random=getentropy requires getentropy/getrandom.
# --enable-random=linux enables legacy code that tries getrandom
# and falls back to reading /dev/random.
myeconfargs+=( --enable-random=$(usex getentropy getentropy linux) )
fi
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
}
multilib_src_compile() {
default
multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
}
multilib_src_test() {
# t-secmem and t-sexp need mlock which requires extra privileges; nspawn
# at least disallows that by default.
local -x GCRYPT_IN_ASAN_TEST=1
default
}
multilib_src_install() {
emake DESTDIR="${D}" install
multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
}
multilib_src_install_all() {
default
find "${ED}" -type f -name '*.la' -delete || die
}

View File

@ -49,6 +49,9 @@ PATCHES=(
"${FILESDIR}"/${PN}-multilib-syspath.patch
"${FILESDIR}"/${PN}-powerpc-darwin.patch
"${FILESDIR}"/${PN}-1.9.4-no-fgrep-libgcrypt-config.patch
"${FILESDIR}"/${PN}-1.10.3-x86.patch
"${FILESDIR}"/${PN}-1.10.3-x86-refactor.patch
"${FILESDIR}"/${PN}-1.10.3-hppa.patch
)
MULTILIB_CHOST_TOOLS=(
@ -109,12 +112,7 @@ multilib_src_configure() {
append-flags -fno-tree-loop-vectorize
fi
# ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
# https://github.com/gentoo/gentoo/pull/28355
# mold needs this too but right now tc-ld-is-mold is also not available
if tc-ld-is-lld; then
append-ldflags -Wl,--undefined-version
fi
append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
local myeconfargs=(
CC_FOR_BUILD="$(tc-getBUILD_CC)"

View File

@ -1,142 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
inherit autotools flag-o-matic multilib-minimal toolchain-funcs verify-sig
DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
HOMEPAGE="https://www.gnupg.org/"
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
LICENSE="LGPL-2.1+ GPL-2+ MIT"
SLOT="0/20" # subslot = soname major version
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc static-libs"
# Build system only has --disable-arm-crypto-support right now
# If changing this, update src_configure logic too.
# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions,
# but this looks like it might change in future. This is just a safety check
# in case people somehow do have a CPU which only supports some. They must
# for now disable them all if that's the case.
REQUIRED_USE="
cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 )
cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 )
cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 )
cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 )
cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec )
"
RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}"
BDEPEND="doc? ( virtual/texi2dvi )
verify-sig? ( sec-keys/openpgp-keys-gnupg )"
PATCHES=(
"${FILESDIR}"/${PN}-multilib-syspath.patch
"${FILESDIR}"/${PN}-powerpc-darwin.patch
"${FILESDIR}"/${PN}-1.9.4-arm-neon-compile-fix.patch
"${FILESDIR}"/${PN}-1.9.4-no-fgrep-libgcrypt-config.patch
)
MULTILIB_CHOST_TOOLS=(
/usr/bin/libgcrypt-config
)
src_prepare() {
default
eautoreconf
}
multilib_src_configure() {
if [[ ${CHOST} == *86*-solaris* ]] ; then
# ASM code uses GNU ELF syntax, divide in particular, we need to
# allow this via ASFLAGS, since we don't have a flag-o-matic
# function for that, we'll have to abuse cflags for this
append-cflags -Wa,--divide
fi
if [[ ${CHOST} == powerpc* ]] ; then
# ./configure does a lot of automagic, prevent that
# generic ppc32+ppc64 altivec
use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec=no
use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec_cflags=no
# power8 vector extension, aka arch 2.07 ISA, also checked below via ppc-crypto-support
use cpu_flags_ppc_vsx2 || local -x gcry_cv_gcc_inline_asm_ppc_altivec=no
# power9 vector extension, aka arch 3.00 ISA
use cpu_flags_ppc_vsx3 || local -x gcry_cv_gcc_inline_asm_ppc_arch_3_00=no
fi
# Workaround for GCC < 11.3 bug
# https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0b399721ce9709ae25f9d2050360c5ab2115ae29
# https://dev.gnupg.org/T5581
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124
if use arm64 && tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
append-flags -fno-tree-loop-vectorize
fi
# ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
# https://github.com/gentoo/gentoo/pull/28355
# mold needs this too but right now tc-ld-is-mold is also not available
if tc-ld-is-lld; then
append-ldflags -Wl,--undefined-version
fi
local myeconfargs=(
CC_FOR_BUILD="$(tc-getBUILD_CC)"
--enable-noexecstack
$(use_enable cpu_flags_arm_neon neon-support)
# See REQUIRED_USE comment above
$(use_enable cpu_flags_arm_aes arm-crypto-support)
$(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support)
$(use_enable cpu_flags_x86_aes aesni-support)
$(use_enable cpu_flags_x86_avx avx-support)
$(use_enable cpu_flags_x86_avx2 avx2-support)
$(use_enable cpu_flags_x86_padlock padlock-support)
$(use_enable cpu_flags_x86_sha shaext-support)
$(use_enable cpu_flags_x86_sse4_1 sse41-support)
# required for sys-power/suspend[crypt], bug 751568
$(use_enable static-libs static)
# disabled due to various applications requiring privileges
# after libgcrypt drops them (bug #468616)
--without-capabilities
# http://trac.videolan.org/vlc/ticket/620
$([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
$(use asm || echo "--disable-asm")
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
}
multilib_src_compile() {
default
multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
}
multilib_src_test() {
# t-secmem and t-sexp need mlock which requires extra privileges; nspawn
# at least disallows that by default.
local -x GCRYPT_IN_ASAN_TEST=1
default
}
multilib_src_install() {
emake DESTDIR="${D}" install
multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
}
multilib_src_install_all() {
default
find "${ED}" -type f -name '*.la' -delete || die
}

View File

@ -1,2 +1,4 @@
DIST libgpg-error-1.47.tar.bz2 1020862 BLAKE2B bc04efa0686b1b7d7cdce045fc080c090c1abec60349b673c2e1ce27900483aea090eb6ebcb3fb49a4eed36f18156a12413d5446f739475632f4ed2a2481ff27 SHA512 bbb4b15dae75856ee5b1253568674b56ad155524ae29a075cb5b0a7e74c4af685131775c3ea2226fff2f84ef80855e77aa661645d002b490a795c7ae57b66a30
DIST libgpg-error-1.47.tar.bz2.sig 119 BLAKE2B d23ea6c38621407c8f9f0c6bde71abd0e50c136d2e5de9a6cef64627f5d398c344a3438995a2405c4ef148ad8638ef7125f34670819957acd7d597370f1630e5 SHA512 09343016eaf7fcc455f8ce533847153a8a9b7c36f375a8ebe71ef5fc2923edf7b70842f834f52c51874e427869487b74a2286ea0112cffad0d72f79cb6d4eceb
DIST libgpg-error-1.48.tar.bz2 1080417 BLAKE2B 4ced63058586558f4d001bcc468f4bd419b8ec29fbd7dbcaa1a21f959d847c9e12c10c548a0038fd4eac0bdfc9907b61e9f6be71c95fc61c964c649e2415dfd7 SHA512 3e9ea99cfb7d706791eb3349a9356b6bc44a53ef8bfa9a4e89afb5203dad5af3f466a039a1764361c0c7f697a6fa668a21d05ceaeb8e44ec5a11d6468998adf2
DIST libgpg-error-1.48.tar.bz2.sig 119 BLAKE2B 36e74c520df1740d48630584cb7093413c7974157038dd0e732cb821d6e3b3386a331be9e94a7f19ea10256bd2902d778d52fe1eeab68065ef9dc2625ac2902c SHA512 302091beddab877acf4355f913fae4bd0a795f0a032f47e0e17c58fe1049833116a743d3470669cff59eab2f6d184b143689763cbb4d0f2f9bcab598e09dc12c

View File

@ -0,0 +1,20 @@
This breaks our multilib builds:
Confirm gpg-error-config works... no
*** Please report to <https://bugs.gnupg.org> with gpg-error-config-test.log
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -318,12 +318,4 @@ gpgrt.h: gpg-error.h
cp gpg-error.h gpgrt.h
gpg-error-config: gpgrt-config gpg-error-config-old gpg-error-config-test.sh
- @echo $(ECHO_N) "Confirm gpg-error-config works... $(ECHO_C)"
- @if ./gpg-error-config-test.sh --old-new; then \
- echo "good"; \
- else \
- echo "no"; \
- echo "*** Please report to <https://bugs.gnupg.org> with gpg-error-config-test.log"; \
- exit 1; \
- fi
cp gpg-error-config-old $@

View File

@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -10,7 +10,7 @@ EAPI=8
# any subsequent ones linked within so you're covered for a while.)
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
inherit autotools multilib-minimal toolchain-funcs prefix verify-sig
inherit autotools multilib-minimal toolchain-funcs verify-sig
DESCRIPTION="Contains error handling functions used by GnuPG software"
HOMEPAGE="https://www.gnupg.org/related_software/libgpg-error"
@ -19,7 +19,7 @@ SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="common-lisp nls static-libs test"
RESTRICT="!test? ( test )"
@ -41,7 +41,7 @@ MULTILIB_CHOST_TOOLS=(
)
PATCHES=(
"${FILESDIR}/${PN}-1.44-remove_broken_check.patch"
"${FILESDIR}/${PN}-1.48-remove_broken_check.patch"
)
src_prepare() {
@ -55,7 +55,7 @@ src_prepare() {
# only necessary for as long as we run eautoreconf, configure.ac
# uses ./autogen.sh to generate PACKAGE_VERSION, but autogen.sh is
# not a pure /bin/sh script, so it fails on some hosts
hprefixify -w 1 autogen.sh
sed -i -e "1s:.*:#\!${BASH}:" autogen.sh || die
eautoreconf
}

View File

@ -1,6 +1,4 @@
DIST libksba-1.6.3.tar.bz2 668287 BLAKE2B a2b474aa5ea8eb387a2d9a459ec1e3daf36bbe7fd9d41a6f4c663ab443f46b98f12064cd6b2f039f5b30e1e2c9cbc4d01b43f8e125d13494c87f5b2d0f973d3b SHA512 188f6d27b4904c10cd54ba949c1132dd6c167f53dd1b77eae39c5b8e3ac8b15e87b2a54cdfddac95ac4ed41ee83c3d4e1b17d95126f245b6c204fade6739a2ce
DIST libksba-1.6.3.tar.bz2.sig 119 BLAKE2B c6ab01889e7d7efa6117b388c8bf8e1916a3d5c174659b01a34a60bcf8e04181aaf60c79ebd8ab423300f19de084a7968db9b9afd8aa5980246d9ce3f91d66d2 SHA512 57081497e32af41abbe84678dfb2379318ae75fdde1f871f3960b7dce7270b952a832b64accbb2a1f19fbef8db9f4d35ac59890ac6cbe45215a65f6971ba43f1
DIST libksba-1.6.4.tar.bz2 668445 BLAKE2B 639be954727e2c3a74e075c52090bc2d9998a149f168ede376520d83a7dfd776212ba2948270096b303803e9f41381747f73c8ec97117a4d743b8df49defef9a SHA512 07bc26584d1901b2975a02012d90084e3c247a7aeab56d7bcc7197ef0210ece0c4ffd5cb468b998ef696deadfcfdc5fa5dc367077863926503e8f7a8d06856a5
DIST libksba-1.6.4.tar.bz2.sig 119 BLAKE2B 5b9edcf65eb7b46182144a8d17a1656ada93a8a7ce3106ea5f525ab3e892b078f9c723544c13702d6d3b40fefd2bff78dc0cfbc3b1a3c156ba18740ecfc42ce6 SHA512 fbf75e03b9e0e771027acfef8cc702744a0d1fe37ef285fcf6475d4a58f7936d3bc890ee3ffe923195152bbcede807ba721ac3fdfdd6d05a1a523416f64ff8c1
DIST libksba-1.6.5.tar.bz2 708400 BLAKE2B 934bde6412de6c1f3062b101930d7b2beac3f6e3f2fbeb5c964a6252b68a3b70c7cb3a48c7eac04b7f1d2ea3c717e1c7e164c1bc6113b46244b9dd130c64b540 SHA512 959312ac0bb2dabcdd22217266daccdf3938d62ff2936c767cade76888757ece1bb6fe79f2c679db03d1baf3919757265d0ded216fee8b8d235e94a70fcf05de
DIST libksba-1.6.5.tar.bz2.sig 119 BLAKE2B 70f290ed44160af2882b5f2543965e3003dd0fd106ab6eaa1f7dfbb878d1f0402c16f3e802af6be589e501e17d0ead82c03afe73c8353b314c8cafb24e7d4a11 SHA512 e70f136edcf29bf931eccaf930e0ae644fd372e0a6f472599898d2fd5e44e64ab2cea63b0be2b1d9a468f73f607881dfdf06adfe6d1fc9ebd66b21e4c245f837
DIST libksba-1.6.6.tar.bz2 708510 BLAKE2B 9985b16e946d6b407b5acbf005610cfb2f01d2a733ddff110e329dec8d95bd248cce6e9936d441676a4b06f031cc9122e26146a0f6d36cb343fb9ec16aef3627 SHA512 3b30bef9452ae0c52b4a52e9145fbd6dc57cf7a2b59302e3af063db6b45384e8ed7af62604efd7939b9e0cb5931e946b15609888e9699fafe4acbb0cbf138087
DIST libksba-1.6.6.tar.bz2.sig 119 BLAKE2B ec4b72d612bb20c280316de7a66ffe697c65caf52e451621b42965d7d5b3e53577fc5b9c41ad5f5c09e42d90654d82afad8462f0baaf757e122fffedcd35d4ce SHA512 5ab4f890819ee3638660fa2ce529223e1798da53508d0cc2db5a9f0b21a242863037f5e81cdf2805e6cafb56e22412005f01cbe7b6344f3eb1a38f7cff98520d

View File

@ -1,61 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintainers should:
# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
# (find the one for the current release then subscribe to it +
# any subsequent ones linked within so you're covered for a while.)
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
inherit toolchain-funcs verify-sig libtool
DESCRIPTION="X.509 and CMS (PKCS#7) library"
HOMEPAGE="https://www.gnupg.org/related_software/libksba"
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
LICENSE="LGPL-3+ GPL-2+ GPL-3"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="static-libs"
RDEPEND=">=dev-libs/libgpg-error-1.8"
DEPEND="${RDEPEND}"
BDEPEND="
app-alternatives/yacc
verify-sig? ( sec-keys/openpgp-keys-gnupg )
"
PATCHES=(
"${FILESDIR}"/${PN}-1.6.0-no-fgrep-ksba-config.patch
)
src_prepare() {
default
elibtoolize # necessary on Solaris for shared lib support
}
src_configure() {
export CC_FOR_BUILD="$(tc-getBUILD_CC)"
local myeconfargs=(
--disable-valgrind-tests
$(use_enable static-libs static)
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config"
)
econf "${myeconfargs[@]}"
}
src_install() {
default
# People need to use ksba-config for --cflags and --libs
find "${ED}" -type f -name '*.la' -delete || die
}

View File

@ -1,61 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintainers should:
# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
# (find the one for the current release then subscribe to it +
# any subsequent ones linked within so you're covered for a while.)
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
inherit toolchain-funcs verify-sig libtool
DESCRIPTION="X.509 and CMS (PKCS#7) library"
HOMEPAGE="https://www.gnupg.org/related_software/libksba"
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
LICENSE="LGPL-3+ GPL-2+ GPL-3"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="static-libs"
RDEPEND=">=dev-libs/libgpg-error-1.33"
DEPEND="${RDEPEND}"
BDEPEND="
app-alternatives/yacc
verify-sig? ( sec-keys/openpgp-keys-gnupg )
"
PATCHES=(
"${FILESDIR}"/${PN}-1.6.0-no-fgrep-ksba-config.patch
)
src_prepare() {
default
elibtoolize # necessary on Solaris for shared lib support
}
src_configure() {
export CC_FOR_BUILD="$(tc-getBUILD_CC)"
local myeconfargs=(
--disable-valgrind-tests
$(use_enable static-libs static)
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config"
)
econf "${myeconfargs[@]}"
}
src_install() {
default
# People need to use ksba-config for --cflags and --libs
find "${ED}" -type f -name '*.la' -delete || die
}

View File

@ -20,7 +20,7 @@ SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
LICENSE="LGPL-3+ GPL-2+ GPL-3"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="static-libs"
RDEPEND=">=dev-libs/libgpg-error-1.33"

View File

@ -23,7 +23,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="BSD"
SLOT="3"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="bzip2 +cxx +jit libedit pcre16 pcre32 +readline static-libs unicode valgrind zlib"
REQUIRED_USE="
readline? ( !libedit )

Some files were not shown because too many files have changed in this diff Show More