diff --git a/.github/workflows/portage-stable-packages-list b/.github/workflows/portage-stable-packages-list index 689cffbccc..af91764a9e 100644 --- a/.github/workflows/portage-stable-packages-list +++ b/.github/workflows/portage-stable-packages-list @@ -115,8 +115,8 @@ app-misc/mime-types app-misc/pax-utils app-portage/elt-patches -app-portage/portage-utils app-portage/gentoolkit +app-portage/portage-utils app-shells/bash app-shells/bash-completion @@ -129,8 +129,6 @@ app-text/docbook-xsl-stylesheets app-text/manpager app-text/sgml-common -sec-keys/openpgp-keys-gentoo-release - dev-cpp/gtest dev-db/sqlite @@ -146,6 +144,7 @@ dev-lang/yasm dev-libs/cJSON dev-libs/cyrus-sasl +dev-libs/ding-libs dev-libs/elfutils dev-libs/expat dev-libs/glib @@ -153,26 +152,41 @@ dev-libs/gmp dev-libs/gobject-introspection dev-libs/gobject-introspection-common dev-libs/inih +dev-libs/jansson +dev-libs/json-c dev-libs/jsoncpp dev-libs/libaio dev-libs/libassuan dev-libs/libbsd dev-libs/libdnet +dev-libs/libev +dev-libs/libevent +dev-libs/libffi dev-libs/libgcrypt dev-libs/libgpg-error dev-libs/libksba +dev-libs/liblinear dev-libs/libltdl dev-libs/libmspack dev-libs/libnl dev-libs/libpcre dev-libs/libpcre2 dev-libs/libpipeline +dev-libs/libsodium dev-libs/libtasn1 +dev-libs/libunistring dev-libs/libusb dev-libs/libuv +dev-libs/libverto dev-libs/libxml2 dev-libs/libxslt +dev-libs/libyaml +dev-libs/lzo +dev-libs/mpc +dev-libs/mpfr dev-libs/nettle +dev-libs/npth +dev-libs/nspr dev-libs/oniguruma dev-libs/popt dev-libs/protobuf @@ -355,6 +369,7 @@ net-misc/curl net-misc/ethertypes net-misc/iperf net-misc/iputils +net-misc/ntp net-misc/rsync net-misc/socat net-misc/wget @@ -373,6 +388,8 @@ profiles # # scripts +sec-keys/openpgp-keys-gentoo-release + sec-policy/selinux-base sec-policy/selinux-base-policy sec-policy/selinux-container @@ -380,7 +397,6 @@ sec-policy/selinux-dbus sec-policy/selinux-sssd sec-policy/selinux-unconfined - sys-apps/acl sys-apps/attr sys-apps/bubblewrap diff --git a/changelog/updates/2023-11-14-dev-libs-automation.md b/changelog/updates/2023-11-14-dev-libs-automation.md new file mode 100644 index 0000000000..38f7fec95b --- /dev/null +++ b/changelog/updates/2023-11-14-dev-libs-automation.md @@ -0,0 +1,10 @@ +- ding-libs ([0.6.2](https://github.com/SSSD/ding-libs/releases/tag/0.6.2)) +- json-c ([0.17](https://github.com/json-c/json-c/blob/json-c-0.17-20230812/ChangeLog)) +- libffi ([3.4.4](https://github.com/libffi/libffi/releases/tag/v3.4.4) (includes [3.4.2](https://github.com/libffi/libffi/releases/tag/v3.4.2) and [3.4.3](https://github.com/libffi/libffi/releases/tag/v3.4.3))) +- liblinear (246) +- libsodium ([1.0.19](https://github.com/jedisct1/libsodium/releases/tag/1.0.19-RELEASE)) +- libunistring ([1.1](https://git.savannah.gnu.org/gitweb/?p=libunistring.git;a=blob;f=NEWS;h=5a43ddd7011d62a952733f6c0b7ad52aa4f385c7;hb=8006860b710aae2e8442088c3ddc7d819dfa8ac7)) +- mpc ([1.3.1](https://sympa.inria.fr/sympa/arc/mpc-discuss/2022-12/msg00049.html) (includes [1.3.0](https://sympa.inria.fr/sympa/arc/mpc-discuss/2022-12/msg00028.html)) +- mpfr ([4.2.1](https://gitlab.inria.fr/mpfr/mpfr/-/blob/4.2.1/NEWS)) +- nspr ([4.35](https://hg.mozilla.org/projects/nspr/log/b563bfc16c887c48b038b7b441fcc4e40a126d3b)) +- ntp ([4.2.8p17](https://www.ntp.org/support/securitynotice/4_2_8p17-release-announcement/)) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/ntp-environment.conf b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/ntp-environment.conf new file mode 100644 index 0000000000..f2947d94d1 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/ntp-environment.conf @@ -0,0 +1,2 @@ +[Service] +Environment="SERVER=0.flatcar.pool.ntp.org 1.flatcar.pool.ntp.org 2.flatcar.pool.ntp.org 3.flatcar.pool.ntp.org" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/ntp.conf b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/ntp.conf new file mode 100644 index 0000000000..9ed4dc176f --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/ntp.conf @@ -0,0 +1,60 @@ +# NOTES: +# DHCP clients can append or replace NTP configuration files. +# You should consult your DHCP client documentation about its +# default behaviour and how to change it. + +# Name of the servers ntpd should sync with +# Please respect the access policy as stated by the responsible person. +#server ntp.example.tld iburst + +# Common pool for random people +#server pool.ntp.org + +# Pools for Flatcar users +server 0.flatcar.pool.ntp.org +server 1.flatcar.pool.ntp.org +server 2.flatcar.pool.ntp.org +server 3.flatcar.pool.ntp.org + +## +# A list of available servers can be found here: +# http://www.pool.ntp.org/ +# http://www.pool.ntp.org/#use +# A good way to get servers for your machine is: +# netselect -s 3 pool.ntp.org +## + +# you should not need to modify the following paths +driftfile /var/lib/ntp/ntp.drift + +#server ntplocal.example.com prefer +#server timeserver.example.org + +# Warning: Using default NTP settings will leave your NTP +# server accessible to all hosts on the Internet. + +# If you want to deny all machines (including your own) +# from accessing the NTP server, uncomment: +#restrict default ignore + + +# Default configuration: +# - Allow only time queries, at a limited rate, sending KoD when in excess. +# - Allow all local queries (IPv4, IPv6) +# From commit da515112395ea7ce0da7cba7103de65d53fc93c9: +# +# net-misc/ntp: add notrap to default restrict config +# +# It's a common security hardening option and doesn't seem likely to +# affect any actual usage. +restrict default nomodify nopeer noquery notrap limited kod +restrict 127.0.0.1 +restrict [::1] + + +# To allow machines within your network to synchronize +# their clocks with your server, but ensure they are +# not allowed to configure the server or used as peers +# to synchronize against, uncomment this line. +# +#restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/ntpd-always-restart.conf b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/ntpd-always-restart.conf new file mode 100644 index 0000000000..a73e63da66 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/ntpd-always-restart.conf @@ -0,0 +1,14 @@ +[Service] +# From commit 5e5abb4d7ea48a9238b9baa22941fda6a6bbda8c: +# +# ntpd: always restart, required to handle large time jumps. +# +# Some VM platforms suspend machines by simply stopping them instead of +# gracefully suspending them like real hardware would. This means that +# when the system is resumed the kernel's time will be completely wrong +# and it doesn't have a way to fix it. Additionally ntp will abort if the +# clock offset is greater than 1000 seconds (conveniently without logging +# any error messages). We can tune that in ntp.conf but ntpd has so many +# knobs related to how it skews the clock and other update strategies that +# the easiest option is to just restart. +Restart=always diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/misc-files-0-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/misc-files-0-r3.ebuild similarity index 84% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/misc-files-0-r2.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/misc-files-0-r3.ebuild index ce1111ac7f..79aae29e95 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/misc-files-0-r2.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/misc-files-0-r3.ebuild @@ -12,7 +12,7 @@ HOMEPAGE='https://www.flatcar.org/' LICENSE='Apache-2.0' SLOT='0' KEYWORDS='amd64 arm64' -IUSE="openssh" +IUSE="openssh ntp" # No source directory. S="${WORKDIR}" @@ -31,6 +31,7 @@ DEPEND=" RDEPEND=" ${DEPEND} >=app-shells/bash-5.2_p15-r2 + ntp? ( >=net-misc/ntp-4.2.8_p17 ) " declare -A CORE_BASH_SYMLINKS @@ -57,6 +58,24 @@ src_compile() { LC_ALL=C sort "${config_tmp}" >"${config}" } +misc_files_install_dropin() { + local unit conf + unit=${1}; shift + conf=${1}; shift + + [[ -n ${unit} ]] || die "No unit specified" + [[ -n ${conf} ]] || die "No conf file specified" + [[ ${conf} = *.conf ]] || die "Conf file must have .conf suffix" + + local override_dir + override_dir="$(systemd_get_systemunitdir)/${unit}.d" + ( + insopts -m 0644 + insinto "${override_dir}" + doins "${conf}" + ) +} + src_install() { # Use absolute paths to be clear about what locations are used. The # dosym below will make relative paths out of them. @@ -85,6 +104,11 @@ src_install() { ['/usr/share/ssh/sshd_config']='/usr/share/flatcar/etc/ssh/sshd_config.d/50-flatcar-sshd.conf' ) fi + if use ntp; then + compat_symlinks+=( + ['/usr/share/ntp/ntp.conf']='/usr/share/flatcar/etc/ntp.conf' + ) + fi local link target for link in "${!compat_symlinks[@]}"; do @@ -133,16 +157,20 @@ src_install() { # Install our socket drop-in file that disables the rate # limiting on the sshd socket. - local override_dir - override_dir="$(systemd_get_systemunitdir)/sshd.socket.d" - dodir "${override_dir}" - insinto "${override_dir}" - doins "${FILESDIR}/no-trigger-limit-burst.conf" + misc_files_install_dropin sshd.socket "${FILESDIR}/no-trigger-limit-burst.conf" # Enable some sockets that aren't enabled by their own ebuilds. systemd_enable_service sockets.target sshd.socket fi + if use ntp; then + insinto /etc + doins "${FILESDIR}/ntp.conf" + misc_files_install_dropin ntpd.service "${FILESDIR}/ntpd-always-restart.conf" + misc_files_install_dropin ntpdate.service "${FILESDIR}/ntp-environment.conf" + misc_files_install_dropin sntp.service "${FILESDIR}/ntp-environment.conf" + fi + # Create a symlink for Kubernetes to redirect writes from /usr/libexec/... to /var/kubernetes/... # (The below keepdir will result in a tmpfiles entry in base_image_var.conf) keepdir /var/kubernetes/kubelet-plugins/volume/exec diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/net-misc/ntp b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/net-misc/ntp new file mode 100644 index 0000000000..da0f2cd580 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/net-misc/ntp @@ -0,0 +1,9 @@ +# Do not install ntpdate or sntp systemd files in /etc. +INSTALL_MASK+=" /etc/systemd" +# Do not install the default ntp.conf, we provide our own in +# coreos-base/misc-files. +INSTALL_MASK+=" /etc/ntp.conf" +# Do not install perl scripts to /usr/bin. +INSTALL_MASK+=" /usr/bin/calc_tickadj /usr/bin/ntp-wait /usr/bin/ntptrace /usr/bin/update-leap" +# Do not install perl package to /usr/share/ntp. +INSTALL_MASK+=" /usr/share/ntp" diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch deleted file mode 100644 index 1b532c6d89..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch +++ /dev/null @@ -1,39 +0,0 @@ -Fix building with libressl or without SSL. - -Origin: http://bugs.ntp.org/attachment.cgi?id=1481 - -LibreSSL fix from Joe Kappus (https://bugs.gentoo.org/show_bug.cgi?id=600668#c2) - ---- a/include/libssl_compat.h -+++ b/include/libssl_compat.h -@@ -37,7 +37,7 @@ - #endif - - /* ----------------------------------------------------------------- */ --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) - /* ----------------------------------------------------------------- */ - - # include ---- a/libntp/libssl_compat.c -+++ b/libntp/libssl_compat.c -@@ -26,7 +26,7 @@ - /* ----------------------------------------------------------------- */ - - /* ----------------------------------------------------------------- */ --#if defined(OPENSSL) && OPENSSL_VERSION_NUMBER < 0x10100000L -+#if defined(OPENSSL) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)) - /* ----------------------------------------------------------------- */ - - #include "libssl_compat.h" ---- a/libntp/ssl_init.c -+++ b/libntp/ssl_init.c -@@ -21,7 +21,7 @@ - - int ssl_init_done; - --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) - - static void - atexit_ssl_cleanup(void) diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8_p12-libressl-2.8.patch b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8_p12-libressl-2.8.patch deleted file mode 100644 index 182fcefe88..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8_p12-libressl-2.8.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- ntp-4.2.8p12.orig/include/libssl_compat.h 2018-12-08 01:14:58.434733497 +0000 -+++ ntp-4.2.8p12/include/libssl_compat.h 2018-12-08 01:42:04.479474757 +0000 -@@ -107,10 +107,13 @@ - - #define OpenSSL_version_num SSLeay - #define OpenSSL_version SSLeay_version -+ -+# if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x20800000L - #define X509_get0_notBefore X509_get_notBefore - #define X509_getm_notBefore X509_get_notBefore - #define X509_get0_notAfter X509_get_notAfter - #define X509_getm_notAfter X509_get_notAfter -+#endif /* !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x20800000L */ - - /* ----------------------------------------------------------------- */ - #endif /* OPENSSL_VERSION_NUMBER < v1.1.0 */ diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp.conf b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp.conf deleted file mode 100644 index c0cd2271f9..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp.conf +++ /dev/null @@ -1,19 +0,0 @@ -# Common pool -server 0.flatcar.pool.ntp.org -server 1.flatcar.pool.ntp.org -server 2.flatcar.pool.ntp.org -server 3.flatcar.pool.ntp.org - -# Warning: Using default NTP settings will leave your NTP -# server accessible to all hosts on the Internet. - -# If you want to deny all machines (including your own) -# from accessing the NTP server, uncomment: -#restrict default ignore - -# Default configuration: -# - Allow only time queries, at a limited rate, sending KoD when in excess. -# - Allow all local queries (IPv4, IPv6) -restrict default nomodify nopeer noquery notrap limited kod -restrict 127.0.0.1 -restrict [::1] diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp.tmpfiles b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp.tmpfiles deleted file mode 100644 index ac582aaeab..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp.tmpfiles +++ /dev/null @@ -1,2 +0,0 @@ -d /var/lib/ntp 0755 ntp ntp - - -L /etc/ntp.conf - - - - /usr/share/ntp/ntp.conf diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords index ac5ab3c27e..eb2afe693d 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords @@ -51,9 +51,11 @@ =dev-lang/yasm-1.3.0-r1 ~arm64 # Keep versions on both arches in sync. -=dev-libs/ding-libs-0.6.1-r1 ~arm64 +=dev-libs/ding-libs-0.6.2-r1 ~arm64 =dev-libs/libdnet-1.16.2 ~arm64 =dev-libs/libgcrypt-1.10.2 ~arm64 +=dev-libs/libsodium-1.0.19-r1 ~arm64 +=dev-libs/libunistring-1.1-r1 ~arm64 =dev-util/bpftool-6.3 ~arm64 =net-firewall/conntrack-tools-1.4.6-r1 ~arm64 diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.use b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.use index eac7fcf10e..037aef1cc4 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.use +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.use @@ -7,8 +7,8 @@ app-editors/vim minimal -crypt # minimal: Don't pull app-vim/gentoo-syntax app-editors/vim-core minimal -# Install our modifications and compatibility symlinks for ssh -coreos-base/misc-files openssh +# Install our modifications and compatibility symlinks for ssh and ntp +coreos-base/misc-files openssh ntp dev-lang/python gdbm dev-libs/dbus-glib tools diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/Manifest index 88f8db9149..bed4d6c291 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/Manifest @@ -1 +1 @@ -DIST ding-libs-0.6.1.tar.gz 904092 BLAKE2B 72eda10dfe002f27bb2d096bd96f6a6ee60dc246492fb1cc3581661184d050827aad6a5897aadf9b06db9b6dbd18da756637bd27bcc02742c6318c8cc7e68298 SHA512 335a0925bfa7cc113e86c91ad3f2c8aac12711879d5c9b62660140a4b749335a74024c987fcd2304dd78176362997b3e0ebd745193aaffab7a368e2873118628 +DIST ding-libs-0.6.2.tar.gz 957577 BLAKE2B 7236706b0892e5b56506e89f67305cac54da648b2bd6f21dcf3c330d848e1bc556134c8e7d2efd0a9c8234ea41212d6bd2250ff7feaf84df12ff8ee6b56e0602 SHA512 566172e0addb0ee6e0ebd12874d3b72f2fa6bcb1ecc628c0c529984193290fae554efc40f52d2cec675bffab32a36183e47ec629db25e83ed2995f1049c64703 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/ding-libs-0.6.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/ding-libs-0.6.1-r1.ebuild deleted file mode 100644 index 1445f869fe..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/ding-libs-0.6.1-r1.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit multilib-minimal - -DESCRIPTION="set of utility libraries (mostly used by sssd)" -HOMEPAGE="https://pagure.io/SSSD/ding-libs" -SRC_URI="https://releases.pagure.org/SSSD/${PN}/${P}.tar.gz" - -LICENSE="LGPL-3 GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux" -IUSE="test" -RESTRICT="!test? ( test )" - -DEPEND="test? ( dev-libs/check )" -BDEPEND="virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}"/0000-INI-Fix-detection-of-error-messages.patch - "${FILESDIR}"/0001-path_utils_ut-allow-single-as-well.patch - "${FILESDIR}"/0002-validators_ut_check-Fix-fail-with-new-glibc.patch -) - -multilib_src_configure() { - ECONF_SOURCE="${S}" econf --disable-static -} - -multilib_src_install_all() { - einstalldocs - - # no static archives - find "${ED}" -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/ding-libs-0.6.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/ding-libs-0.6.1.ebuild deleted file mode 100644 index f64be15bf4..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/ding-libs-0.6.1.ebuild +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit multilib-minimal - -DESCRIPTION="set of utility libraries (mostly used by sssd)" -HOMEPAGE="https://pagure.io/SSSD/ding-libs" -SRC_URI="https://releases.pagure.org/SSSD/${PN}/${P}.tar.gz" - -LICENSE="LGPL-3 GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux" -IUSE="test static-libs" -RESTRICT="!test? ( test )" - -RDEPEND="" -DEPEND="${RDEPEND} - virtual/pkgconfig - test? ( dev-libs/check )" - -PATCHES=( - "${FILESDIR}"/0000-INI-Fix-detection-of-error-messages.patch - "${FILESDIR}"/0001-path_utils_ut-allow-single-as-well.patch - "${FILESDIR}"/0002-validators_ut_check-Fix-fail-with-new-glibc.patch -) - -multilib_src_configure() { - ECONF_SOURCE="${S}" econf -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/ding-libs-0.6.2-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/ding-libs-0.6.2-r1.ebuild new file mode 100644 index 0000000000..ccd6a03cf4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/ding-libs-0.6.2-r1.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Set of utility libraries (mostly used by sssd)" +HOMEPAGE="https://github.com/SSSD/ding-libs" +SRC_URI="https://github.com/SSSD/ding-libs/releases/download/${PV}/${P}.tar.gz" + +LICENSE="LGPL-3 GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND="test? ( dev-libs/check )" +BDEPEND="virtual/pkgconfig" + +src_install() { + default + + # No static archives + find "${ED}" -name '*.la' -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/files/0000-INI-Fix-detection-of-error-messages.patch b/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/files/0000-INI-Fix-detection-of-error-messages.patch deleted file mode 100644 index 62e436c7c9..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/files/0000-INI-Fix-detection-of-error-messages.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 72c19bd018b107ecf5a80963b433e9922f7243fd Mon Sep 17 00:00:00 2001 -From: Lukas Slebodnik -Date: Wed, 3 Jan 2018 18:03:44 +0100 -Subject: [PATCH] INI: Fix detection of error messages -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -libc on BSD returns different error messages. - -Reviewed-by: Michal Židek ---- - ini/ini_validators_ut_check.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/ini/ini_validators_ut_check.c b/ini/ini_validators_ut_check.c -index fa7105a..9ecde75 100644 ---- a/ini/ini_validators_ut_check.c -+++ b/ini/ini_validators_ut_check.c -@@ -607,6 +607,12 @@ START_TEST(test_ini_allowed_options_wrong_regex) - "[rule/options_for_foo]: Cannot compile regular expression " - "from option 'section_re'. " - "Error: 'Unmatched [ or [^'"); -+ if (ret != 0) { -+ ret = strcmp(errmsg, -+ "[rule/options_for_foo]: Cannot compile regular expression " -+ "from option 'section_re'. " -+ "Error: 'brackets ([ ]) not balanced'"); -+ } - fail_unless(ret == 0, "Got msg: [%s]", errmsg); - ini_errobj_next(errobj); - -@@ -1028,6 +1034,11 @@ START_TEST(test_ini_allowed_sections_wrong_regex) - ret = strcmp(errmsg, - "[rule/section_list]: Validator failed to use regex " - "[^foo\\(*$]:[Unmatched ( or \\(]"); -+ if (ret !=0) { -+ ret = strcmp(errmsg, -+ "[rule/section_list]: Validator failed to use regex " -+ "[^foo\\(*$]:[parentheses not balanced]"); -+ } - fail_unless(ret == 0, "Got msg: [%s]", errmsg); - ini_errobj_next(errobj); - --- -2.21.0 - diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch b/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch deleted file mode 100644 index a9ca8e9edc..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 4236e323e8ab4f13770e1ac9e94666b304b693fb Mon Sep 17 00:00:00 2001 -From: Henrik Riomar -Date: Tue, 24 Jul 2018 21:59:36 +0000 -Subject: [PATCH 1/2] path_utils_ut: allow single / as well -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_266 - Multiple successive slashes are considered to be the same as one slash. - -When running the tests on a musl libc system - get_dirname(p, PATH_MAX, "//foo//") -actually results in a / and not // - -Reviewed-by: Michal Židek ---- - path_utils/path_utils_ut.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/path_utils/path_utils_ut.c b/path_utils/path_utils_ut.c -index 27c99b6..061abfb 100644 ---- a/path_utils/path_utils_ut.c -+++ b/path_utils/path_utils_ut.c -@@ -62,7 +62,7 @@ START_TEST(test_dirname) - fail_unless_str_equal(p, "//foo"); - - fail_unless(get_dirname(p, PATH_MAX, "//foo//") == SUCCESS); -- fail_unless_str_equal(p, "//"); -+ fail_unless(!strcmp(p, "/") || !strcmp(p, "//")); - - fail_unless(get_dirname(p, PATH_MAX, "foo//bar") == SUCCESS); - fail_unless_str_equal(p, "foo"); --- -2.21.0 - diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/files/0002-validators_ut_check-Fix-fail-with-new-glibc.patch b/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/files/0002-validators_ut_check-Fix-fail-with-new-glibc.patch deleted file mode 100644 index 0524a128d6..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/files/0002-validators_ut_check-Fix-fail-with-new-glibc.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 9f9a3ded23cc2bb917468939b745cc498cec523a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michal=20=C5=BDidek?= -Date: Wed, 1 Aug 2018 17:48:10 +0200 -Subject: [PATCH 2/2] validators_ut_check: Fix fail with new glibc - -Error message was slightly change from previous version -of glibc which caused fails in validators unit tests. - -Reviewed-by: Jakub Hrozek ---- - ini/ini_validators_ut_check.c | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -diff --git a/ini/ini_validators_ut_check.c b/ini/ini_validators_ut_check.c -index 9ecde75..3af8551 100644 ---- a/ini/ini_validators_ut_check.c -+++ b/ini/ini_validators_ut_check.c -@@ -602,6 +602,8 @@ START_TEST(test_ini_allowed_options_wrong_regex) - fail_unless(ret == 0, "Got msg: [%s]", errmsg); - ini_errobj_next(errobj); - -+ /* Different versions of libc produce slightly different error strings -+ * in this case. For simplicity compare against all of them. */ - errmsg = ini_errobj_get_msg(errobj); - ret = strcmp(errmsg, - "[rule/options_for_foo]: Cannot compile regular expression " -@@ -609,10 +611,17 @@ START_TEST(test_ini_allowed_options_wrong_regex) - "Error: 'Unmatched [ or [^'"); - if (ret != 0) { - ret = strcmp(errmsg, -- "[rule/options_for_foo]: Cannot compile regular expression " -- "from option 'section_re'. " -+ "[rule/options_for_foo]: Cannot compile regular " -+ "expression from option 'section_re'. " - "Error: 'brackets ([ ]) not balanced'"); - } -+ -+ if (ret != 0) { -+ ret = strcmp(errmsg, -+ "[rule/options_for_foo]: Cannot compile regular " -+ "expression from option 'section_re'. " -+ "Error: 'Unmatched [, [^, [:, [., or [='"); -+ } - fail_unless(ret == 0, "Got msg: [%s]", errmsg); - ini_errobj_next(errobj); - --- -2.21.0 - diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/metadata.xml index 85e4ed814f..a5ebe852b9 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/ding-libs/metadata.xml @@ -1,5 +1,8 @@ - + + + SSSD/ding-libs + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/Manifest index 8d590df3b2..8a5efd23fb 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/Manifest @@ -1,2 +1 @@ -DIST jansson-2.13.1.tar.gz 531924 BLAKE2B e627bd2ba69bf01b053ff13dee903056db86999f774d6863517e67cef7dc9ddcaa747f2edca9de86bd83f37940a394ac9907f7d58069607ee529af08d8514d57 SHA512 e32be6665e41cf1763608c2f1ac4ce0824d4d7ffa5f4a5824cefde279250fdd399d49ba93d8894e16a473731f629b846554654347f027ca9a0a96ed047f10192 DIST jansson-2.14.tar.gz 535618 BLAKE2B eb514ff222444d4c0d1ef6b99150e3e43bd4d7a1bec3d66e5ece8bc59ac19a0898d9eb061cacad52afda7fe172ec6df46b5a90952707422f56daae53f82c9427 SHA512 5a592776c7ba8c0b1f5efaf813f77948bbc4bda168a72d221d176af0cf61038e26c1f30795433be10e2fc5069d5763d11852a8574774906a9f8ad261ac30109c diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/files/jansson-2.13.1-sphinx3.patch b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/files/jansson-2.13.1-sphinx3.patch deleted file mode 100644 index e611896e9c..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/files/jansson-2.13.1-sphinx3.patch +++ /dev/null @@ -1,269 +0,0 @@ -Rebase pull request #543 onto v2.13.1 - -Allows jansson documentation to compile with Sphinx-3.0 - -Squashed commit messages below: - - -pick 798d40c doc: convert refcounting directive to a class - -Directive functions are no longer supported in Sphinx-3.0 -but directive classes have been supported since early 1.x - - -pick 9431889 doc: do not use references for standard C types or file names - -Use double-backtick quoting instead. It has the same effect -(because these links had nowhere to link to) but it does not -result in loud warnings about broken references by default with Sphinx-3.x. - - -pick c329fd7 doc: add return types for function-like macros - -The Sphinx-3.0 c:function:: directive requires the return type. - -Sphinx-3.0 also adds function-like macro support to the c:macro:: -directive, which Sphinx-1.x and Sphinx-2.x do not support, but it -is probably a good idea to keep compatibility with slightly older -Sphinx for now. - -diff --git a/CHANGES b/CHANGES -index a374a86..256fde1 100644 ---- a/CHANGES -+++ b/CHANGES -@@ -8,7 +8,7 @@ Released 2020-05-07 - - Include `jansson_version_str()` and `jansson_version_cmp()` in - shared library. (#534) - -- - Include `scripts/` in tarball. (#535) -+ - Include ``scripts/`` in tarball. (#535) - - - Version 2.13 -@@ -127,7 +127,7 @@ Released 2018-02-09 - - - Work around gcc's -Wimplicit-fallthrough. - -- - Fix CMake detection of `sys/types.h` header (#375). -+ - Fix CMake detection of ``sys/types.h`` header (#375). - - - Fix `jansson.pc` generated by CMake to be more consistent with the one - generated using GNU Autotools (#368). -diff --git a/doc/apiref.rst b/doc/apiref.rst -index c3a814f..94c5726 100644 ---- a/doc/apiref.rst -+++ b/doc/apiref.rst -@@ -145,33 +145,33 @@ Type - .. function:: int json_typeof(const json_t *json) - - Return the type of the JSON value (a :type:`json_type` cast to -- :type:`int`). *json* MUST NOT be *NULL*. This function is actually -+ ``int``). *json* MUST NOT be *NULL*. This function is actually - implemented as a macro for speed. - --.. function:: json_is_object(const json_t *json) -- json_is_array(const json_t *json) -- json_is_string(const json_t *json) -- json_is_integer(const json_t *json) -- json_is_real(const json_t *json) -- json_is_true(const json_t *json) -- json_is_false(const json_t *json) -- json_is_null(const json_t *json) -+.. function:: int json_is_object(const json_t *json) -+ int json_is_array(const json_t *json) -+ int json_is_string(const json_t *json) -+ int json_is_integer(const json_t *json) -+ int json_is_real(const json_t *json) -+ int json_is_true(const json_t *json) -+ int json_is_false(const json_t *json) -+ int json_is_null(const json_t *json) - - These functions (actually macros) return true (non-zero) for values - of the given type, and false (zero) for values of other types and - for *NULL*. - --.. function:: json_is_number(const json_t *json) -+.. function:: int json_is_number(const json_t *json) - - Returns true for values of types ``JSON_INTEGER`` and - ``JSON_REAL``, and false for other types and for *NULL*. - --.. function:: json_is_boolean(const json_t *json) -+.. function:: int json_is_boolean(const json_t *json) - - Returns true for types ``JSON_TRUE`` and ``JSON_FALSE``, and false - for values of other types and for *NULL*. - --.. function:: json_boolean_value(const json_t *json) -+.. function:: int json_boolean_value(const json_t *json) - - Alias of :func:`json_is_true()`, i.e. returns 1 for ``JSON_TRUE`` - and 0 otherwise. -@@ -594,7 +594,7 @@ A JSON array is an ordered collection of other JSON values. - Appends all elements in *other_array* to the end of *array*. - Returns 0 on success and -1 on error. - --.. function:: json_array_foreach(array, index, value) -+.. function:: void json_array_foreach(array, index, value) - - Iterate over every element of ``array``, running the block - of code that follows each time with the proper values set to -@@ -732,11 +732,11 @@ allowed in object keys. - recursively merged with the corresponding values in *object* if they are also - objects, instead of overwriting them. Returns 0 on success or -1 on error. - --.. function:: json_object_foreach(object, key, value) -+.. function:: void json_object_foreach(object, key, value) - - Iterate over every key-value pair of ``object``, running the block - of code that follows each time with the proper values set to -- variables ``key`` and ``value``, of types :type:`const char *` and -+ variables ``key`` and ``value``, of types ``const char *`` and - :type:`json_t *` respectively. Example:: - - /* obj is a JSON object */ -@@ -764,7 +764,7 @@ allowed in object keys. - .. versionadded:: 2.3 - - --.. function:: json_object_foreach_safe(object, tmp, key, value) -+.. function:: void json_object_foreach_safe(object, tmp, key, value) - - Like :func:`json_object_foreach()`, but it's safe to call - ``json_object_del(object, key)`` during iteration. You need to pass -@@ -1488,17 +1488,17 @@ arguments. - Output a JSON null value. No argument is consumed. - - ``b`` (boolean) [int] -- Convert a C :type:`int` to JSON boolean value. Zero is converted -+ Convert a C ``int`` to JSON boolean value. Zero is converted - to ``false`` and non-zero to ``true``. - - ``i`` (integer) [int] -- Convert a C :type:`int` to JSON integer. -+ Convert a C ``int`` to JSON integer. - - ``I`` (integer) [json_int_t] - Convert a C :type:`json_int_t` to JSON integer. - - ``f`` (real) [double] -- Convert a C :type:`double` to JSON real. -+ Convert a C ``double`` to JSON real. - - ``o`` (any value) [json_t \*] - Output any given JSON value as-is. If the value is added to an -@@ -1625,20 +1625,20 @@ type whose address should be passed. - Expect a JSON null value. Nothing is extracted. - - ``b`` (boolean) [int] -- Convert a JSON boolean value to a C :type:`int`, so that ``true`` -+ Convert a JSON boolean value to a C ``int``, so that ``true`` - is converted to 1 and ``false`` to 0. - - ``i`` (integer) [int] -- Convert a JSON integer to C :type:`int`. -+ Convert a JSON integer to C ``int``. - - ``I`` (integer) [json_int_t] - Convert a JSON integer to C :type:`json_int_t`. - - ``f`` (real) [double] -- Convert a JSON real to C :type:`double`. -+ Convert a JSON real to C ``double``. - - ``F`` (integer or real) [double] -- Convert a JSON number (integer or real) to C :type:`double`. -+ Convert a JSON number (integer or real) to C ``double``. - - ``o`` (any value) [json_t \*] - Store a JSON value with no conversion to a :type:`json_t` pointer. -diff --git a/doc/ext/refcounting.py b/doc/ext/refcounting.py -index bba2684..e72c481 100644 ---- a/doc/ext/refcounting.py -+++ b/doc/ext/refcounting.py -@@ -24,8 +24,8 @@ - """ - - from docutils import nodes -+from docutils.parsers.rst import Directive - --class refcounting(nodes.emphasis): pass - - def visit(self, node): - self.visit_emphasis(node) -@@ -40,16 +40,25 @@ def html_depart(self, node): - self.body.append('') - - --def refcounting_directive(name, arguments, options, content, lineno, -- content_offset, block_text, state, state_machine): -- if arguments[0] == 'borrow': -- text = 'Return value: Borrowed reference.' -- elif arguments[0] == 'new': -- text = 'Return value: New reference.' -- else: -- raise Error('Valid arguments: new, borrow') -+class refcounting(nodes.emphasis): -+ pass -+ -+class refcounting_directive(Directive): -+ has_content = False -+ required_arguments = 1 -+ optional_arguments = 0 -+ final_argument_whitespace = False -+ -+ def run(self): -+ if self.arguments[0] == 'borrow': -+ text = 'Return value: Borrowed reference.' -+ elif self.arguments[0] == 'new': -+ text = 'Return value: New reference.' -+ else: -+ raise Error('Valid arguments: new, borrow') -+ -+ return [refcounting(text, text)] - -- return [refcounting(text, text)] - - def setup(app): - app.add_node(refcounting, -@@ -57,4 +66,4 @@ def setup(app): - latex=(visit, depart), - text=(visit, depart), - man=(visit, depart)) -- app.add_directive('refcounting', refcounting_directive, 0, (1, 0, 0)) -+ app.add_directive('refcounting', refcounting_directive) -diff --git a/doc/upgrading.rst b/doc/upgrading.rst -index 9b49046..94ff7de 100644 ---- a/doc/upgrading.rst -+++ b/doc/upgrading.rst -@@ -47,13 +47,13 @@ List of Incompatible Changes - - **Underlying type of JSON integers** - The underlying C type of JSON integers has been changed from -- :type:`int` to the widest available signed integer type, i.e. -- :type:`long long` or :type:`long`, depending on whether -- :type:`long long` is supported on your system or not. This makes -+ ``int`` to the widest available signed integer type, i.e. -+ ``long long`` or ``long``, depending on whether -+ ``long long`` is supported on your system or not. This makes - the whole 64-bit integer range available on most modern systems. - - ``jansson.h`` has a typedef :type:`json_int_t` to the underlying -- integer type. :type:`int` should still be used in most cases when -+ integer type. ``int`` should still be used in most cases when - dealing with smallish JSON integers, as the compiler handles - implicit type coercion. Only when the full 64-bit range is needed, - :type:`json_int_t` should be explicitly used. -@@ -69,8 +69,8 @@ List of Incompatible Changes - - **Unsigned integers in API functions** - Version 2.0 unifies unsigned integer usage in the API. All uses of -- :type:`unsigned int` and :type:`unsigned long` have been replaced -- with :type:`size_t`. This includes flags, container sizes, etc. -+ ``unsigned int`` and ``unsigned long`` have been replaced -+ with ``size_t``. This includes flags, container sizes, etc. - This should not require source code changes, as both -- :type:`unsigned int` and :type:`unsigned long` are usually -- compatible with :type:`size_t`. -+ ``unsigned int`` and ``unsigned long`` are usually -+ compatible with ``size_t``. diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/files/jansson-2.14-default-symver-test.patch b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/files/jansson-2.14-default-symver-test.patch new file mode 100644 index 0000000000..0da70dc5af --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/files/jansson-2.14-default-symver-test.patch @@ -0,0 +1,55 @@ +From https://github.com/akheron/jansson/pull/666/commits/1e2ac681e5f39fc7a7e8b8deb2162a93976d4622 Mon Sep 17 00:00:00 2001 +From: Violet Purcell +Date: Wed, 11 Oct 2023 20:51:57 -0400 +Subject: [PATCH] Port check for --default-symver to autoconf + +This commit ports the configure check for -Wl,--default-symver that is +present in CMake to autoconf. This fixes building Jansson via autoconf +with non-bfd linkers on glibc systems. + +Signed-off-by: Violet Purcell +--- a/configure.ac ++++ b/configure.ac +@@ -25,6 +25,9 @@ AC_TYPE_UINT16_T + AC_TYPE_UINT8_T + AC_TYPE_LONG_LONG_INT + ++jansson_soversion="4" ++AC_SUBST([jansson_soversion]) ++ + AC_C_INLINE + case $ac_cv_c_inline in + yes) json_inline=inline;; +@@ -138,8 +141,12 @@ AS_IF([test "x$with_Bsymbolic" = "xyes"], [JSON_BSYMBOLIC_LDFLAGS=-Wl[,]-Bsymbol + AC_SUBST(JSON_BSYMBOLIC_LDFLAGS) + + # Enable symbol versioning on GNU libc ++m4_pattern_forbid([^AX_CHECK_LINK_FLAG$]) + JSON_SYMVER_LDFLAGS= +-AC_CHECK_DECL([__GLIBC__], [JSON_SYMVER_LDFLAGS=-Wl,--default-symver]) ++AC_CHECK_DECL([__GLIBC__], ++ [AX_CHECK_LINK_FLAG([-Wl,--default-symver], ++ [JSON_SYMVER_LDFLAGS=-Wl,--default-symver], ++ [JSON_SYMVER_LDFLAGS=-Wl,--version-script,$ac_abs_confdir/jansson.sym])]) + AC_SUBST([JSON_SYMVER_LDFLAGS]) + + AC_ARG_ENABLE([ossfuzzers], +@@ -168,6 +175,7 @@ AC_SUBST([AM_CFLAGS]) + + AC_CONFIG_FILES([ + jansson.pc ++ jansson.sym + Makefile + doc/Makefile + src/Makefile +--- /dev/null ++++ b/jansson.sym.in +@@ -0,0 +1,5 @@ ++JANSSON_@jansson_soversion@ { ++ global: ++ *; ++}; ++ +-- +2.42.0 + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/jansson-2.13.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/jansson-2.13.1-r1.ebuild deleted file mode 100644 index 0ea1a8080f..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/jansson-2.13.1-r1.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit multilib-minimal - -DESCRIPTION="C library for encoding, decoding and manipulating JSON data" -HOMEPAGE="https://www.digip.org/jansson/" -SRC_URI="https://www.digip.org/jansson/releases/${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos" -IUSE="doc static-libs" - -BDEPEND="doc? ( dev-python/sphinx )" - -PATCHES=( - # dev-libs/jansson-2.13.1[doc]: fails to build with >=sphinx-3.0, #731668 - "${FILESDIR}/${P}-sphinx3.patch" -) - -multilib_src_configure() { - ECONF_SOURCE="${S}" econf $(use_enable static-libs static) -} - -multilib_src_compile() { - default - - if multilib_is_native_abi && use doc ; then - emake html - HTML_DOCS=( "${BUILD_DIR}"/doc/_build/html/. ) - fi -} - -multilib_src_install() { - default - - find "${D}" -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/jansson-2.14-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/jansson-2.14-r1.ebuild new file mode 100644 index 0000000000..1d11fe6ed7 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/jansson-2.14-r1.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="C library for encoding, decoding and manipulating JSON data" +HOMEPAGE="https://www.digip.org/jansson/" +SRC_URI="https://github.com/akheron/jansson/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/4" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos" +IUSE="doc static-libs" + +BDEPEND=" + sys-devel/binutils + doc? ( dev-python/sphinx )" + +PATCHES=( "${FILESDIR}/${P}-test-symbols.patch" ) + +src_configure() { + tc-ld-force-bfd + + econf $(use_enable static-libs static) +} + +src_compile() { + default + + if use doc ; then + emake html + HTML_DOCS=( doc/_build/html/. ) + fi +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/jansson-2.14-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/jansson-2.14-r2.ebuild new file mode 100644 index 0000000000..8f8601ce90 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/jansson-2.14-r2.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="C library for encoding, decoding and manipulating JSON data" +HOMEPAGE="https://www.digip.org/jansson/" +SRC_URI="https://github.com/akheron/jansson/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/4" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" +IUSE="doc static-libs" + +BDEPEND=" + sys-devel/autoconf-archive + doc? ( dev-python/sphinx ) +" + +PATCHES=( + "${FILESDIR}/${P}-default-symver-test.patch" + "${FILESDIR}/${P}-test-symbols.patch" +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf $(use_enable static-libs static) +} + +src_compile() { + default + + if use doc ; then + emake html + HTML_DOCS=( doc/_build/html/. ) + fi +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/jansson-2.14.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/jansson-2.14.ebuild deleted file mode 100644 index 42760f3115..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/jansson-2.14.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib-minimal toolchain-funcs - -DESCRIPTION="C library for encoding, decoding and manipulating JSON data" -HOMEPAGE="https://www.digip.org/jansson/" -SRC_URI="https://github.com/akheron/jansson/releases/download/v${PV}/${P}.tar.gz" - -LICENSE="MIT" -SLOT="0/4" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos" -IUSE="doc static-libs" - -BDEPEND="doc? ( dev-python/sphinx )" - -PATCHES=( "${FILESDIR}/${P}-test-symbols.patch" ) - -multilib_src_configure() { - tc-ld-force-bfd - - ECONF_SOURCE="${S}" econf $(use_enable static-libs static) -} - -multilib_src_compile() { - default - - if multilib_is_native_abi && use doc ; then - emake html - HTML_DOCS=( "${BUILD_DIR}"/doc/_build/html/. ) - fi -} - -multilib_src_install() { - default - - find "${D}" -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/metadata.xml index eef0308f67..bbfcf37ef5 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/jansson/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/jansson/metadata.xml @@ -9,4 +9,7 @@ proxy-maint@gentoo.org Proxy Maintainers + + akheron/jansson + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/json-c/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/json-c/Manifest index 99ea09eff2..e421914e90 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/json-c/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/json-c/Manifest @@ -1 +1,2 @@ -DIST json-c-0.15.tar.gz 361488 BLAKE2B ae34f6dd45ebee55e6413ecb234e48fa5ae1c17e6fa12462aaaa04e8801457060e176abe90d76d04ad0ee9b903ff467bc3b8ed5816792da175aad8862b9d168e SHA512 dc01298bcc78f0f31a34f5fcfe45c0feebfd88518e97fb4f96f1a652f71ccdd303415a4c7bf5b573bdcbcca80428281f0dfccefc6545ea3a7f18dbb819332f34 +DIST json-c-0.16.tar.gz 351916 BLAKE2B 11457fa39330338c85bfdfb0dd38fc703ad6942e730ba090c9fe017dfb81ef905d7b1bb1c768b9b51f6445a8cf3cf4007d7740be3a9878f8062edc62ba554c66 SHA512 255cff99033340b2c2678255d41dae7808f83ed0c102e693d2d9e186bd1f21dd1385fcaa360c0fc087a00965a9567fbda733370e6b518a9be2f1bb0a80439151 +DIST json-c-0.17.tar.gz 390045 BLAKE2B 26be25141447f2b652fa09d7096141a8bf7992469bcc53b275c1bc0108fc36a8898a8185c381218d3146d00fa03bdd0b837be073410fc93af943b5f083dbaa69 SHA512 4cbedd559502bf9014cfcd1d0bb8bb80d2abac4e969d95d4170123cd9cbafb0756b913fdbb83f666d14f674d6539a60ed1c5d0eb03c36b8037a2e00dc1636e19 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-0.15.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-0.16-r1.ebuild similarity index 75% rename from sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-0.15.ebuild rename to sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-0.16-r1.ebuild index 70e366eb88..0b8f70b084 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-0.15.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-0.16-r1.ebuild @@ -1,9 +1,8 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -CMAKE_ECLASS=cmake inherit cmake-multilib DESCRIPTION="A JSON implementation in C" @@ -12,7 +11,7 @@ SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz" LICENSE="MIT" SLOT="0/5" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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" IUSE="cpu_flags_x86_rdrand doc static-libs threads" BDEPEND="doc? ( >=app-doc/doxygen-1.8.13 )" @@ -21,13 +20,10 @@ MULTILIB_WRAPPED_HEADERS=( /usr/include/json-c/config.h ) -src_prepare() { - cmake_src_prepare -} - multilib_src_configure() { local mycmakeargs=( -DBUILD_STATIC_LIBS=$(usex static-libs) + -DDISABLE_EXTRA_LIBS=ON -DDISABLE_WERROR=ON -DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand) -DENABLE_THREADING=$(usex threads) @@ -36,10 +32,6 @@ multilib_src_configure() { cmake_src_configure } -multilib_src_compile() { - cmake_src_compile -} - multilib_src_test() { multilib_is_native_abi && cmake_src_test } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-0.17.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-0.17.ebuild new file mode 100644 index 0000000000..5799133131 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-0.17.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib + +DESCRIPTION="A JSON implementation in C" +HOMEPAGE="https://github.com/json-c/json-c/wiki" +SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/5" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ~ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="cpu_flags_x86_rdrand static-libs threads" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/json-c/config.h +) + +multilib_src_configure() { + local mycmakeargs=( + # apps are not installed, so disable unconditionally. + # https://github.com/json-c/json-c/blob/json-c-0.17-20230812/apps/CMakeLists.txt#L119...L121 + -DBUILD_APPS=OFF + -DBUILD_STATIC_LIBS=$(usex static-libs) + -DDISABLE_EXTRA_LIBS=ON + -DDISABLE_WERROR=ON + -DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand) + -DENABLE_THREADING=$(usex threads) + ) + + cmake_src_configure +} + +multilib_src_test() { + multilib_is_native_abi && cmake_src_test +} + +multilib_src_install_all() { + HTML_DOCS=( "${S}"/doc/html/. ) + einstalldocs +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-9999.ebuild index effac5b4d6..57cba100cf 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/json-c/json-c-9999.ebuild @@ -1,10 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=8 -CMAKE_ECLASS=cmake -inherit cmake-multilib git-r3 +inherit cmake-multilib git-r3 multibuild DESCRIPTION="A JSON implementation in C" HOMEPAGE="https://github.com/json-c/json-c/wiki" @@ -20,16 +19,16 @@ MULTILIB_WRAPPED_HEADERS=( /usr/include/json-c/config.h ) -src_prepare() { - cmake_src_prepare -} - multilib_src_configure() { local mycmakeargs=( - -DDISABLE_WERROR=ON - -DENABLE_THREADING=$(usex threads) - -DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand) + # apps are not installed, so disable unconditionally. + # https://github.com/json-c/json-c/blob/json-c-0.17-20230812/apps/CMakeLists.txt#L119...L121 + -DBUILD_APPS=OFF -DBUILD_STATIC_LIBS=$(usex static-libs) + -DDISABLE_EXTRA_LIBS=ON + -DDISABLE_WERROR=ON + -DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand) + -DENABLE_THREADING=$(usex threads) ) cmake_src_configure @@ -37,14 +36,18 @@ multilib_src_configure() { multilib_src_compile() { cmake_src_compile - use doc && doxygen doc/Doxyfile + if use doc && multilib_is_native_abi; then + cmake_build doc + fi } multilib_src_test() { multilib_is_native_abi && cmake_src_test } -multilib_src_install_all() { - use doc && HTML_DOCS=( "${BUILD_DIR}-abi_x86_64.amd64"/doc/html/. ) - einstalldocs +multilib_src_install() { + if multilib_is_native_abi; then + use doc && HTML_DOCS=( "${BUILD_DIR}"/doc/html/. ) + einstalldocs + fi } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libev/libev-4.33.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libev/libev-4.33.ebuild index 4b9fb143c7..127618dc6d 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libev/libev-4.33.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libev/libev-4.33.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -12,7 +12,7 @@ SRC_URI="http://dist.schmorp.de/libev/${P}.tar.gz LICENSE="|| ( BSD GPL-2 )" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" IUSE="static-libs" DOCS=( Changes README ) diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libev/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/libev/metadata.xml index 3398ef8b26..5b78add3e6 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libev/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libev/metadata.xml @@ -1,5 +1,5 @@ - + dlan@gentoo.org diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/Manifest index f1f1c08b55..cfc3c56e4c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/Manifest @@ -1,2 +1,4 @@ -DIST libevent-2.1.11.tar.gz 1082234 BLAKE2B c6721589834bff027a8149ee0076e1877fba000d1712a405e20030192d9c81b892d0930bc1a4774650bef4cb08c60ac81b5928dc17346492ae7e4ded2125579a SHA512 9d0517b117f128f4f196b19a810524814bab75fa967d533063aaa619d3cf2dca97b443edd5805b764da2993d8e37caa536dce39f68ffcc2a88d32a89204c2de3 -DIST libevent-2.1.12.tar.gz 1100847 BLAKE2B bc1ace15f639ecef2e6b3f95976b8830c1d86f1d06606dd949e2978611fdf9859ed4eb9292d13e6e90e3835063edb94aae64a15c518d5dabe680f37d5a7f5290 SHA512 88d8944cd75cbe78bc4e56a6741ca67c017a3686d5349100f1c74f8a68ac0b6410ce64dff160be4a4ba0696ee29540dfed59aaf3c9a02f0c164b00307fcfe84f +DIST libevent-2.1.12-stable.tar.gz 1100847 BLAKE2B bc1ace15f639ecef2e6b3f95976b8830c1d86f1d06606dd949e2978611fdf9859ed4eb9292d13e6e90e3835063edb94aae64a15c518d5dabe680f37d5a7f5290 SHA512 88d8944cd75cbe78bc4e56a6741ca67c017a3686d5349100f1c74f8a68ac0b6410ce64dff160be4a4ba0696ee29540dfed59aaf3c9a02f0c164b00307fcfe84f +DIST libevent-2.1.12-stable.tar.gz.asc 488 BLAKE2B 629109913fe57110d0d78f5a7f18f36a7556b6b438ca65d9ce7c8f1d46e04cb9af4df8d7504d31165b510869154ea3a546e55a83bd7b1247bcfdf7c7d9509312 SHA512 841b57a0f6ba645b1871f257b9929093b11b7d6fd03332e6339adceddda233e78f6190faa2339e2b67b26dc2a56ddd7ce622792820b582168b31a2d1d1854f1f +DIST libevent-2.2.1-alpha-dev.tar.gz 1166550 BLAKE2B 4ab460a521aab90852ade14c937c06a21f8e5649a1a1dc4114f978a99272deb77b4e05923861e979f4ee5f50e04149d7b8f8e38294279757f27779597f407d79 SHA512 3e0ef283979a30cce11065c3b9a1078f3f006dbab86e8b49f75dc3aac2384085cb74477d95e5bc4e88c0d81ee2359fcd1cf292107d4791de87191019f2fcdfa5 +DIST libevent-2.2.1-alpha-dev.tar.gz.asc 488 BLAKE2B d3e2b2782edd3bcabe42183b5b6647b6e55cd52292813901015a96c6eeec40e1ce57e9be731b2bd027c787f22b8ac5a587b7bed1dff95993bedde8b88fc1e89c SHA512 af720bce0829e806fb8bbb043eaf973fa6765ee17f059367b72344ce111a68f878b7a2fe361e4a3db61c7b4724c7dff19f960636b98e4208e7e27a2a077b8848 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/files/libevent-2.1.12-clang16.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/files/libevent-2.1.12-clang16.patch new file mode 100644 index 0000000000..2ecf247207 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/files/libevent-2.1.12-clang16.patch @@ -0,0 +1,105 @@ +https://bugs.gentoo.org/880381 +https://github.com/libevent/libevent/commit/35375101e741d78bf49642c6929c1eb69a7c3d79 + +From 35375101e741d78bf49642c6929c1eb69a7c3d79 Mon Sep 17 00:00:00 2001 +From: Azat Khuzhin +Date: Fri, 27 Jan 2023 08:57:33 +0100 +Subject: [PATCH] Fixes some new warnings under clang-15 + +- -Wdeprecated-non-prototype + + /src/le/libevent/strlcpy.c:48:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] + event_strlcpy_(dst, src, siz) + +- -Wstrict-prototypes + + /src/le/libevent/evthread.c:82:70: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] + struct evthread_condition_callbacks *evthread_get_condition_callbacks() + +- -Wunused-but-set-variable + + /src/le/libevent/test/regress_buffer.c:130:6: warning: variable 'n' set but not used [-Wunused-but-set-variable] + int n = 0; + ^ +--- + evthread.c | 4 ++-- + strlcpy.c | 6 +----- + test/regress_buffer.c | 5 ----- + 3 files changed, 3 insertions(+), 12 deletions(-) + +diff --git a/evthread.c b/evthread.c +index 3eac594d64..c2da914da1 100644 +--- a/evthread.c ++++ b/evthread.c +@@ -74,12 +74,12 @@ evthread_set_id_callback(unsigned long (*id_fn)(void)) + evthread_id_fn_ = id_fn; + } + +-struct evthread_lock_callbacks *evthread_get_lock_callbacks() ++struct evthread_lock_callbacks *evthread_get_lock_callbacks(void) + { + return evthread_lock_debugging_enabled_ + ? &original_lock_fns_ : &evthread_lock_fns_; + } +-struct evthread_condition_callbacks *evthread_get_condition_callbacks() ++struct evthread_condition_callbacks *evthread_get_condition_callbacks(void) + { + return evthread_lock_debugging_enabled_ + ? &original_cond_fns_ : &evthread_cond_fns_; +diff --git a/strlcpy.c b/strlcpy.c +index 3876475f5a..04c74298dc 100644 +--- a/strlcpy.c ++++ b/strlcpy.c +@@ -44,11 +44,7 @@ static char *rcsid = "$OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp + * will be copied. Always NUL terminates (unless siz == 0). + * Returns strlen(src); if retval >= siz, truncation occurred. + */ +-size_t +-event_strlcpy_(dst, src, siz) +- char *dst; +- const char *src; +- size_t siz; ++size_t event_strlcpy_(char *dst, const char *src, size_t siz) + { + register char *d = dst; + register const char *s = src; +diff --git a/test/regress_buffer.c b/test/regress_buffer.c +index 5683810e26..b0a9e0c162 100644 +--- a/test/regress_buffer.c ++++ b/test/regress_buffer.c +@@ -127,19 +127,16 @@ evbuffer_get_waste(struct evbuffer *buf, size_t *allocatedp, size_t *wastedp, si + { + struct evbuffer_chain *chain; + size_t a, w, u; +- int n = 0; + u = a = w = 0; + + chain = buf->first; + /* skip empty at start */ + while (chain && chain->off==0) { +- ++n; + a += chain->buffer_len; + chain = chain->next; + } + /* first nonempty chain: stuff at the end only is wasted. */ + if (chain) { +- ++n; + a += chain->buffer_len; + u += chain->off; + if (chain->next && chain->next->off) +@@ -148,7 +145,6 @@ evbuffer_get_waste(struct evbuffer *buf, size_t *allocatedp, size_t *wastedp, si + } + /* subsequent nonempty chains */ + while (chain && chain->off) { +- ++n; + a += chain->buffer_len; + w += (size_t)chain->misalign; + u += chain->off; +@@ -158,7 +154,6 @@ evbuffer_get_waste(struct evbuffer *buf, size_t *allocatedp, size_t *wastedp, si + } + /* subsequent empty chains */ + while (chain) { +- ++n; + a += chain->buffer_len; + } + *allocatedp = a; diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/files/libevent-2.1.12-libressl.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/files/libevent-2.1.12-libressl.patch new file mode 100644 index 0000000000..4c809aface --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/files/libevent-2.1.12-libressl.patch @@ -0,0 +1,30 @@ +https://bugs.gentoo.org/903001 +https://github.com/libevent/libevent/issues/1277 +https://github.com/libevent/libevent/pull/1227 +https://github.com/libevent/libevent/commit/883630f76cbf512003b81de25cd96cb75c6cf0f9 + +From 883630f76cbf512003b81de25cd96cb75c6cf0f9 Mon Sep 17 00:00:00 2001 +From: Theo Buehler +Date: Sun, 21 Nov 2021 21:38:20 +0100 +Subject: [PATCH] Don't define BIO_get_init() for LibreSSL 3.5+ + +BIO_get_init() is available in LibreSSL 3.5 and later. The BIO type +will become opaque, so the existing macro will break the build. +--- + openssl-compat.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/openssl-compat.h b/openssl-compat.h +index a23e34251b..f5de25539f 100644 +--- a/openssl-compat.h ++++ b/openssl-compat.h +@@ -40,7 +40,8 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name) + #endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */ + +-#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L ++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L && \ ++ LIBRESSL_VERSION_NUMBER < 0x30500000L + #define BIO_get_init(b) (b)->init + #endif + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/files/libevent-2.2.1-disable-signalfd.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/files/libevent-2.2.1-disable-signalfd.patch new file mode 100644 index 0000000000..6dfce3db34 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/files/libevent-2.2.1-disable-signalfd.patch @@ -0,0 +1,152 @@ +From 594ab34f1dfc73db85e8f95ec51892cadecaa76c Mon Sep 17 00:00:00 2001 +From: Azat Khuzhin +Date: Mon, 10 Jul 2023 10:40:49 +0200 +Subject: [PATCH] Disable signalfd by default + +signalfd may behave differently to sigaction/signal, so to avoid +breaking libevent users (like [1], [2]) disable it by default. + + [1]: https://github.com/tmux/tmux/pull/3621 + [2]: https://github.com/tmux/tmux/pull/3626 + +Also signalfd is not that perfect: +- you need to SIG_BLOCK the signal before + - blocked signals are not reset on exec + - blocked signals are allowed to coalesce - so in case of multiple + signals sent you may get the signal only once (ok for most of the + signals, but may be a problem for SIGCHLD, though you may call + waitpid() in a loop or use pidfd) +- and also one implementation problem - + sigprocmask is unspecified in a multithreaded process + +Refs: +- https://lwn.net/Articles/415684/ +- https://ldpreload.com/blog/signalfd-is-useless + +Refs: https://github.com/libevent/libevent/issues/1460 +Refs: #1342 (cc @dmantipov) +--- + CMakeLists.txt | 1 + + include/event2/event.h | 6 ++++-- + signalfd.c | 4 ++-- + test/include.am | 2 ++ + test/test.sh | 11 +++++++++-- + 5 files changed, 18 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cd41d16e57..9c402ec0c1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1509,6 +1509,7 @@ if (NOT EVENT__DISABLE_TESTS) + else() + add_backend_test(${BACKEND} "${BACKEND_ENV_VARS}") + endif() ++ add_backend_test(signalfd_${BACKEND} "${BACKEND_ENV_VARS};EVENT_USE_SIGNALFD=1") + endforeach() + + # +diff --git a/include/event2/event.h b/include/event2/event.h +index 384a84178b..9b971edf1d 100644 +--- a/include/event2/event.h ++++ b/include/event2/event.h +@@ -599,9 +599,11 @@ enum event_base_config_flag { + */ + EVENT_BASE_FLAG_EPOLL_DISALLOW_TIMERFD = 0x40, + +- /** Do not use signalfd(2) to handle signals even if supported. ++ /** Use signalfd(2) to handle signals over sigaction/signal. ++ * ++ * But note, that in some edge cases signalfd() may works differently. + */ +- EVENT_BASE_FLAG_DISALLOW_SIGNALFD = 0x80, ++ EVENT_BASE_FLAG_USE_SIGNALFD = 0x80, + }; + + /** +diff --git a/signalfd.c b/signalfd.c +index 376a04d539..ed31014e5f 100644 +--- a/signalfd.c ++++ b/signalfd.c +@@ -205,8 +205,8 @@ sigfd_del(struct event_base *base, int signo, short old, short events, void *p) + int sigfd_init_(struct event_base *base) + { + EVUTIL_ASSERT(base != NULL); +- if ((base->flags & EVENT_BASE_FLAG_DISALLOW_SIGNALFD) || +- getenv("EVENT_DISALLOW_SIGNALFD")) ++ if (!(base->flags & EVENT_BASE_FLAG_USE_SIGNALFD) && ++ !getenv("EVENT_USE_SIGNALFD")) + return -1; + base->evsigsel = &sigfdops; + return 0; +diff --git a/test/include.am b/test/include.am +index e061c937b7..9b50759da7 100644 +--- a/test/include.am ++++ b/test/include.am +@@ -80,6 +80,8 @@ test_runner_changelist: $(top_srcdir)/test/test.sh + $(top_srcdir)/test/test.sh -b "" -c + test_runner_timerfd_changelist: $(top_srcdir)/test/test.sh + $(top_srcdir)/test/test.sh -b "" -T ++test_runner_timerfd_changelist: $(top_srcdir)/test/test.sh ++ $(top_srcdir)/test/test.sh -b "" -S + + DISTCLEANFILES += test/regress.gen.c test/regress.gen.h + +diff --git a/test/test.sh b/test/test.sh +index dfdd2bf098..79362888c5 100755 +--- a/test/test.sh ++++ b/test/test.sh +@@ -50,6 +50,7 @@ setup () { + done + unset EVENT_EPOLL_USE_CHANGELIST + unset EVENT_PRECISE_TIMER ++ unset EVENT_USE_SIGNALFD + } + + announce () { +@@ -138,10 +139,12 @@ do_test() { + EVENT_EPOLL_USE_CHANGELIST=yes; export EVENT_EPOLL_USE_CHANGELIST + elif test "$2" = "(timerfd)" ; then + EVENT_PRECISE_TIMER=1; export EVENT_PRECISE_TIMER ++ elif test "$2" = "(signalfd)" ; then ++ EVENT_USE_SIGNALFD=1; export EVENT_USE_SIGNALFD + elif test "$2" = "(timerfd+changelist)" ; then + EVENT_EPOLL_USE_CHANGELIST=yes; export EVENT_EPOLL_USE_CHANGELIST + EVENT_PRECISE_TIMER=1; export EVENT_PRECISE_TIMER +- fi ++ fi + + run_tests + } +@@ -153,6 +156,7 @@ usage() + -t - run timerfd test + -c - run changelist test + -T - run timerfd+changelist test ++ -S - run signalfd test + EOL + } + main() +@@ -161,13 +165,15 @@ main() + timerfd=0 + changelist=0 + timerfd_changelist=0 ++ signalfd=0 + +- while getopts "b:tcT" c; do ++ while getopts "b:tcTS" c; do + case "$c" in + b) backends="$OPTARG";; + t) timerfd=1;; + c) changelist=1;; + T) timerfd_changelist=1;; ++ S) signalfd=1;; + ?*) usage && exit 1;; + esac + done +@@ -179,6 +185,7 @@ main() + [ $timerfd_changelist -eq 0 ] || do_test EPOLL "(timerfd+changelist)" + for i in $backends; do + do_test $i ++ [ $signalfd -eq 0 ] || do_test $i "(signalfd)" + done + + if test "$FAILED" = "yes"; then diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.1.11.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.1.11.ebuild deleted file mode 100644 index 17b310f4c5..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.1.11.ebuild +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit multilib-minimal - -DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor" -HOMEPAGE=" - https://libevent.org/ - https://github.com/libevent/libevent/ -" -SRC_URI=" - https://github.com/${PN}/${PN}/releases/download/release-${PV/_/-}-stable/${P/_/-}-stable.tar.gz -> ${P}.tar.gz -" -LICENSE="BSD" - -SLOT="0/2.1-7" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" -IUSE="debug +ssl static-libs test +threads" -RESTRICT="!test? ( test )" - -DEPEND=" - ssl? ( - >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] - ) -" -RDEPEND=" - ${DEPEND} - !<=dev-libs/9libs-1.0 -" -MULTILIB_WRAPPED_HEADERS=( - /usr/include/event2/event-config.h -) -S=${WORKDIR}/${P/_/-}-stable - -multilib_src_configure() { - # fix out-of-source builds - mkdir -p test || die - - ECONF_SOURCE="${S}" \ - econf \ - --disable-samples \ - $(use_enable debug debug-mode) \ - $(use_enable debug malloc-replacement) \ - $(use_enable ssl openssl) \ - $(use_enable static-libs static) \ - $(use_enable test libevent-regress) \ - $(use_enable threads thread-support) -} - -src_test() { - # The test suite doesn't quite work (see bug #406801 for the latest - # installment in a riveting series of reports). - : - # emake -C test check | tee "${T}"/tests -} - -DOCS=( ChangeLog{,-1.4,-2.0} ) - -multilib_src_install_all() { - einstalldocs - find "${ED}" -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.1.12.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.1.12-r1.ebuild similarity index 66% rename from sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.1.12.ebuild rename to sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.1.12-r1.ebuild index b25c5ebe45..89c1bf1ab7 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.1.12.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.1.12-r1.ebuild @@ -1,25 +1,31 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit autotools multilib-minimal +inherit libtool multilib-minimal verify-sig +MY_P="${P}-stable" DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor" HOMEPAGE=" https://libevent.org/ https://github.com/libevent/libevent/ " +BASE_URI="https://github.com/libevent/libevent/releases/download/release-${MY_P#*-}" SRC_URI=" - https://github.com/${PN}/${PN}/releases/download/release-${PV/_/-}-stable/${P/_/-}-stable.tar.gz -> ${P}.tar.gz + ${BASE_URI}/${MY_P}.tar.gz + verify-sig? ( + ${BASE_URI}/${MY_P}.tar.gz.asc + ) " -LICENSE="BSD" +S=${WORKDIR}/${MY_P} +LICENSE="BSD" SLOT="0/2.1-7" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-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=" +clock-gettime debug malloc-replacement +ssl static-libs test - +threads verbose-debug + verbose-debug " RESTRICT="!test? ( test )" @@ -32,10 +38,20 @@ RDEPEND=" ${DEPEND} !<=dev-libs/9libs-1.0 " +BDEPEND=" + verify-sig? ( + sec-keys/openpgp-keys-libevent + ) +" + MULTILIB_WRAPPED_HEADERS=( /usr/include/event2/event-config.h ) -S=${WORKDIR}/${P/_/-}-stable +PATCHES=( + "${FILESDIR}"/${P}-clang16.patch #880381 + "${FILESDIR}"/${P}-libressl.patch #903001 +) +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libevent.asc src_prepare() { default @@ -55,7 +71,6 @@ multilib_src_configure() { $(use_enable ssl openssl) \ $(use_enable static-libs static) \ $(use_enable test libevent-regress) \ - $(use_enable threads thread-support) \ $(use_enable verbose-debug) \ --disable-samples } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.1.9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.1.9999.ebuild deleted file mode 100644 index 842a86badc..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.1.9999.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit autotools git-r3 multilib-minimal - -DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor" -EGIT_BRANCH="patches-$(ver_cut 1-2)" -EGIT_REPO_URI="https://github.com/libevent/libevent" -HOMEPAGE=" - https://libevent.org/ - https://github.com/libevent/libevent -" - -LICENSE="BSD" -# libevent-2.1.so.6 -SLOT="0/2.1-7" -KEYWORDS="" -IUSE=" - +clock-gettime debug malloc-replacement +ssl static-libs test - +threads verbose-debug -" -RESTRICT="test" - -DEPEND=" - ssl? ( - >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] - ) -" -RDEPEND=" - ${DEPEND} - !<=dev-libs/9libs-1.0 -" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/event2/event-config.h -) -DOCS=( - ChangeLog{,-1.4,-2.0} -) - -src_prepare() { - default - eautoreconf -} - -multilib_src_configure() { - # fix out-of-source builds - mkdir -p test || die - - ECONF_SOURCE="${S}" \ - econf \ - $(use_enable clock-gettime) \ - $(use_enable debug debug-mode) \ - $(use_enable malloc-replacement malloc-replacement) \ - $(use_enable ssl openssl) \ - $(use_enable static-libs static) \ - $(use_enable test libevent-regress) \ - $(use_enable threads thread-support) \ - $(use_enable verbose-debug) \ - --disable-samples -} - -multilib_src_install_all() { - einstalldocs - find "${ED}" -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.2.1-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.2.1-r2.ebuild new file mode 100644 index 0000000000..64aa2bd59b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.2.1-r2.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal verify-sig + +MY_P="${P}-alpha-dev" +DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor" +HOMEPAGE=" + https://libevent.org/ + https://github.com/libevent/libevent/ +" +BASE_URI="https://github.com/libevent/libevent/releases/download/release-${PV}-alpha" +SRC_URI=" + ${BASE_URI}/${MY_P}.tar.gz + verify-sig? ( + ${BASE_URI}/${MY_P}.tar.gz.asc + ) +" +S=${WORKDIR}/${MY_P} + +LICENSE="BSD" +SLOT="0/2.2.1-r2" +KEYWORDS="" +IUSE=" + +clock-gettime debug malloc-replacement mbedtls +ssl static-libs + test verbose-debug +" +# TODO: hangs +RESTRICT="test" + +DEPEND=" + mbedtls? ( net-libs/mbedtls:=[${MULTILIB_USEDEP}] ) + ssl? ( >=dev-libs/openssl-1.0.1h-r2:=[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + verify-sig? ( + sec-keys/openpgp-keys-libevent + ) +" + +DOCS=( README.md ChangeLog{,-1.4,-2.0} whatsnew-2.{0,1}.txt ) +MULTILIB_WRAPPED_HEADERS=( + /usr/include/event2/event-config.h +) +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libevent.asc + +PATCHES=( + # signalfd-by-default breaks at least app-misc/tmux + # https://github.com/libevent/libevent/pull/1486 + "${FILESDIR}/${P}-disable-signalfd.patch" +) + +multilib_src_configure() { + # fix out-of-source builds + mkdir -p test || die + + local ECONF_SOURCE="${S}" + local myconf=( + $(use_enable clock-gettime) + $(use_enable debug debug-mode) + $(use_enable malloc-replacement malloc-replacement) + $(use_enable mbedtls) + $(use_enable ssl openssl) + $(use_enable static-libs static) + $(use_enable test libevent-regress) + $(use_enable verbose-debug) + --disable-samples + ) + econf "${myconf[@]}" + + # workaround https://github.com/libevent/libevent/issues/1459 + sed -i -e 's:@CMAKE_DEBUG_POSTFIX@::' *.pc || die +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -name '*.la' -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-9999.ebuild index c9777c12da..471fb8418b 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-9999.ebuild @@ -1,42 +1,39 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 + inherit autotools git-r3 multilib-minimal DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor" -EGIT_REPO_URI="https://github.com/libevent/libevent" HOMEPAGE=" https://libevent.org/ - https://github.com/libevent/libevent + https://github.com/libevent/libevent/ " +EGIT_REPO_URI="https://github.com/libevent/libevent.git" LICENSE="BSD" -SLOT="0" +SLOT="0/2.2" KEYWORDS="" IUSE=" +clock-gettime debug malloc-replacement mbedtls +ssl static-libs - test +threads verbose-debug + test verbose-debug " +# TODO: hangs RESTRICT="test" DEPEND=" - mbedtls? ( net-libs/mbedtls ) - ssl? ( - >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] - ) + mbedtls? ( net-libs/mbedtls:=[${MULTILIB_USEDEP}] ) + ssl? ( >=dev-libs/openssl-1.0.1h-r2:=[${MULTILIB_USEDEP}] ) " RDEPEND=" ${DEPEND} - !<=dev-libs/9libs-1.0 " +DOCS=( README.md ChangeLog{,-1.4,-2.0} whatsnew-2.{0,1}.txt ) MULTILIB_WRAPPED_HEADERS=( /usr/include/event2/event-config.h ) -DOCS=( - ChangeLog{,-1.4,-2.0} -) src_prepare() { default @@ -47,18 +44,19 @@ multilib_src_configure() { # fix out-of-source builds mkdir -p test || die - ECONF_SOURCE="${S}" \ - econf \ - $(use_enable clock-gettime) \ - $(use_enable debug debug-mode) \ - $(use_enable malloc-replacement malloc-replacement) \ - $(use_enable mbedtls) \ - $(use_enable ssl openssl) \ - $(use_enable static-libs static) \ - $(use_enable test libevent-regress) \ - $(use_enable threads thread-support) \ - $(use_enable verbose-debug) \ + local ECONF_SOURCE="${S}" + local myconf=( + $(use_enable clock-gettime) + $(use_enable debug debug-mode) + $(use_enable malloc-replacement malloc-replacement) + $(use_enable mbedtls) + $(use_enable ssl openssl) + $(use_enable static-libs static) + $(use_enable test libevent-regress) + $(use_enable verbose-debug) --disable-samples + ) + econf "${myconf[@]}" } multilib_src_install_all() { diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/Manifest index 6351b7c81d..85514adcd0 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/Manifest @@ -1,2 +1 @@ -DIST libffi-3.3.tar.gz 1305466 BLAKE2B cddc40729a30a9bd34d675809f51f8d1b4ccaffa54bc6dd6f7e965f4e260edd34754719f9f6247c8957aeb7cf154d56ce1fe16a54c3f1ad39afbebdf41d23caa SHA512 61513801a156f11420f541d325de697131846487122d6bdcf5491b18b4da788589f5c0bb07e88e396495d3be5830d74e9135595e2b8ddbfe95c448d8597fbd6f -DIST libffi-3.4.2.tar.gz 1351355 BLAKE2B a8137bc895b819f949fd7705e405be627219c6d1fdef280253330f7407d4a548bb057d7bb0e9225d1767d42f9bf5f0ab3c455db1c3470d7cc876bb7b7d55d308 SHA512 31bad35251bf5c0adb998c88ff065085ca6105cf22071b9bd4b5d5d69db4fadf16cadeec9baca944c4bb97b619b035bb8279de8794b922531fddeb0779eb7fb1 +DIST libffi-3.4.4.tar.gz 1362394 BLAKE2B 189fe1ffe9507f204581b0ab09995dc7e7b761bb4eac7e338e9f5ff81431aebcef6c182c1839c9f9acb2706697a260c67e6d1351cf7e2aed7c4eb5d694f6f8fd SHA512 88680aeb0fa0dc0319e5cd2ba45b4b5a340bc9b4bcf20b1e0613b39cd898f177a3863aa94034d8e23a7f6f44d858a53dcd36d1bb8dee13b751ef814224061889 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.2.1-o-tmpfile-eacces.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.2.1-o-tmpfile-eacces.patch deleted file mode 100644 index 92a733cbe8..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.2.1-o-tmpfile-eacces.patch +++ /dev/null @@ -1,17 +0,0 @@ -https://bugs.gentoo.org/529044 - -deploy this workaround until newer versions of the kernel/C library/libsandbox -are rolled out into general circulation - ---- a/src/closures.c -+++ b/src/closures.c -@@ -301,7 +301,8 @@ open_temp_exec_file_dir (const char *dir) - #ifdef O_TMPFILE - fd = open (dir, flags | O_RDWR | O_EXCL | O_TMPFILE, 0700); - /* If the running system does not support the O_TMPFILE flag then retry without it. */ -- if (fd != -1 || (errno != EINVAL && errno != EISDIR && errno != EOPNOTSUPP)) { -+ if (fd != -1 || (errno != EINVAL && errno != EISDIR && errno != EOPNOTSUPP && -+ errno != EACCES)) { - return fd; - } else { - errno = 0; diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-compiler-vendor-quote.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-compiler-vendor-quote.patch deleted file mode 100644 index db5b69ce2d..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-compiler-vendor-quote.patch +++ /dev/null @@ -1,33 +0,0 @@ -https://bugs.gentoo.org/753299 ---- a/testsuite/lib/libffi.exp -+++ b/testsuite/lib/libffi.exp -@@ -287,9 +287,6 @@ proc libffi-init { args } { - verbose "libffi $blddirffi" - - # Which compiler are we building with? -- set tmp [grep "$blddirffi/config.log" "^ax_cv_c_compiler_vendor.*$"] -- regexp -- {^[^=]*=(.*)$} $tmp nil compiler_vendor -- - if { [string match $compiler_vendor "gnu"] } { - set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a] - if {$gccdir != ""} { ---- a/configure.ac -+++ b/configure.ac -@@ -59,6 +59,7 @@ fi - cat > local.exp < local.exp < -Date: Fri, 29 Nov 2019 07:00:35 -0500 -Subject: [PATCH] Address platforms with no __int128. - ---- - src/powerpc/ffi_linux64.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c -index de0d033..7364770 100644 ---- a/src/powerpc/ffi_linux64.c -+++ b/src/powerpc/ffi_linux64.c -@@ -547,9 +547,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack) - if (next_arg.ul == gpr_end.ul) - next_arg.ul = rest.ul; - if (vecarg_count < NUM_VEC_ARG_REGISTERS64 && i < nfixedargs) -- *vec_base.f128++ = **p_argv.f128; -+ memcpy (vec_base.f128++, *p_argv.f128, sizeof (float128)); - else -- *next_arg.f128 = **p_argv.f128; -+ memcpy (next_arg.f128, *p_argv.f128, sizeof (float128)); - if (++next_arg.f128 == gpr_end.f128) - next_arg.f128 = rest.f128; - vecarg_count++; --- -2.26.0 - diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-power7-memcpy.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-power7-memcpy.patch deleted file mode 100644 index 91f9a6f60f..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-power7-memcpy.patch +++ /dev/null @@ -1,42 +0,0 @@ -From e50b9ef8b910fa642ef158f6642e60d54d7ad740 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 7 Dec 2019 02:34:14 -0800 -Subject: [PATCH] powerpc64: Use memcpy to help platforms with no __int128. - (#534) - -Signed-off-by: Khem Raj ---- - src/powerpc/ffi_linux64.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c -index 7364770..4d50878 100644 ---- a/src/powerpc/ffi_linux64.c -+++ b/src/powerpc/ffi_linux64.c -@@ -680,9 +680,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack) - { - if (vecarg_count < NUM_VEC_ARG_REGISTERS64 - && i < nfixedargs) -- *vec_base.f128++ = *arg.f128++; -+ memcpy (vec_base.f128++, arg.f128, sizeof (float128)); - else -- *next_arg.f128 = *arg.f128++; -+ memcpy (next_arg.f128, arg.f128++, sizeof (float128)); - if (++next_arg.f128 == gpr_end.f128) - next_arg.f128 = rest.f128; - vecarg_count++; -@@ -986,9 +986,9 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif, - do - { - if (pvec < end_pvec && i < nfixedargs) -- *to.f128 = *pvec++; -+ memcpy (to.f128, pvec++, sizeof (float128)); - else -- *to.f128 = *from.f128; -+ memcpy (to.f128, from.f128, sizeof (float128)); - to.f128++; - from.f128++; - } --- -2.26.0 - diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-power7.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-power7.patch deleted file mode 100644 index 83f518f4c2..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-power7.patch +++ /dev/null @@ -1,39 +0,0 @@ -https://bugs.gentoo.org/701128 - -From 2138adb2a5b6a0bc2fe3518e0645eacc89b6f392 Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Thu, 28 Nov 2019 00:02:42 +0000 -Subject: [PATCH] powerpc: fix build failure on power7 and older - -Build failure looks as: -``` -libtool: compile: powerpc-unknown-linux-gnu-gcc \ - -O2 -mcpu=powerpc -mtune=powerpc -pipe ... -c src/powerpc/ffi.c ... -In file included from src/powerpc/ffi.c:33: -src/powerpc/ffi_powerpc.h:65:9: error: '__int128' is not supported on this target - 65 | typedef __int128 float128; - | ^~~~~~~~ -``` - -The fix avoids using __int128 in favour of aligned char[16]. - -Closes: https://github.com/libffi/libffi/issues/531 -Signed-off-by: Sergei Trofimovich ---- - src/powerpc/ffi_powerpc.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/powerpc/ffi_powerpc.h -+++ b/src/powerpc/ffi_powerpc.h -@@ -62,7 +62,7 @@ typedef _Float128 float128; - #elif defined(__FLOAT128__) - typedef __float128 float128; - #else --typedef __int128 float128; -+typedef char float128[16] __attribute__((aligned(16))); - #endif - - void FFI_HIDDEN ffi_closure_SYSV (void); --- -2.24.0 - diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-ppc-int128.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-ppc-int128.patch deleted file mode 100644 index ed53ae9990..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-ppc-int128.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 4f9e20ac51ce13d46fed3c869e1deb6d9bb89444 Mon Sep 17 00:00:00 2001 -From: Andrew Geissler -Date: Fri, 1 May 2020 06:58:30 -0500 -Subject: [PATCH] ffi_powerpc.h: fix build failure with powerpc7 (#561) - -This is a patch pulled down from the following: -https://github.com/buildroot/buildroot/blob/78926f610b1411b03464152472fd430012deb9ac/package/libffi/0004-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch - -This issue is being hit on OpenBMC code when pulling the latest -libffi tag and building on a P8 ppc64le machine. I verified this -patch fixes the issue we are seeing. - -Below is the original commit message: - -Sicne commit 73dd43afc8a447ba98ea02e9aad4c6898dc77fb0, build on powerpc7 -fails on: - -In file included from ../src/powerpc/ffi.c:33:0: -../src/powerpc/ffi_powerpc.h:61:9: error: '_Float128' is not supported on this target - typedef _Float128 float128; - ^~~~~~~~~ - -Fix this build failure by checking for __HAVE_FLOAT128 before using -_Float128, as _Float128 is enabled only on specific conditions, see -output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/floatn.h: - - /* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this glibc - includes corresponding *f128 interfaces for it. */ - #if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \ - && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH - # define __HAVE_FLOAT128 1 - #else - # define __HAVE_FLOAT128 0 - #endif - -Fixes: - - http://autobuild.buildroot.org/results/5c9dd8fb3b6a128882b6250f197c80232d8a3b53 - -Signed-off-by: Fabrice Fontaine -Signed-off-by: Andrew Geissler - -Co-authored-by: Fabrice Fontaine ---- - src/powerpc/ffi_powerpc.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h -index 8e2f2f0..960a5c4 100644 ---- a/src/powerpc/ffi_powerpc.h -+++ b/src/powerpc/ffi_powerpc.h -@@ -57,7 +57,7 @@ typedef union - double d; - } ffi_dblfl; - --#if defined(__FLOAT128_TYPE__) -+#if defined(__FLOAT128_TYPE__) && defined(__HAVE_FLOAT128) - typedef _Float128 float128; - #elif defined(__FLOAT128__) - typedef __float128 float128; --- -2.27.0 - diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-ppc-vector-offset.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-ppc-vector-offset.patch deleted file mode 100644 index 4bcd27e4f1..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3-ppc-vector-offset.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 4d6d2866ae43e55325e8ee96561221804602cd7a Mon Sep 17 00:00:00 2001 -From: Samuel Holland -Date: Fri, 21 Feb 2020 21:06:15 -0600 -Subject: [PATCH] Update powerpc sysv assembly for ffi_powerpc.h changes (#541) - -Some of the flag bits were moved when adding powerpc64 vector support. - -Fixes #536 ---- - src/powerpc/sysv.S | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) - -diff --git a/src/powerpc/sysv.S b/src/powerpc/sysv.S -index 1474ce7..df97734 100644 ---- a/src/powerpc/sysv.S -+++ b/src/powerpc/sysv.S -@@ -104,17 +104,16 @@ ENTRY(ffi_call_SYSV) - bctrl - - /* Now, deal with the return value. */ -- mtcrf 0x01,%r31 /* cr7 */ -+ mtcrf 0x03,%r31 /* cr6-cr7 */ - bt- 31,L(small_struct_return_value) - bt- 30,L(done_return_value) - #ifndef __NO_FPRS__ - bt- 29,L(fp_return_value) - #endif - stw %r3,0(%r30) -- bf+ 28,L(done_return_value) -+ bf+ 27,L(done_return_value) - stw %r4,4(%r30) -- mtcrf 0x02,%r31 /* cr6 */ -- bf 27,L(done_return_value) -+ bf 26,L(done_return_value) - stw %r5,8(%r30) - stw %r6,12(%r30) - /* Fall through... */ -@@ -145,10 +144,9 @@ L(done_return_value): - #ifndef __NO_FPRS__ - L(fp_return_value): - .cfi_restore_state -- bf 28,L(float_return_value) -+ bf 27,L(float_return_value) - stfd %f1,0(%r30) -- mtcrf 0x02,%r31 /* cr6 */ -- bf 27,L(done_return_value) -+ bf 26,L(done_return_value) - stfd %f2,8(%r30) - b L(done_return_value) - L(float_return_value): --- -2.27.0 - diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3_rc0-ppc-macos-go.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3_rc0-ppc-macos-go.patch deleted file mode 100644 index 88f9b45576..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.3_rc0-ppc-macos-go.patch +++ /dev/null @@ -1,79 +0,0 @@ -ffi_darwin: use FFI_GO_CLOSURES guard to avoid unsolvable dependencies - -The go calls depend on compilation and link-time signatures and symbols -which are missing because they aren't build due to FFO_GO_CLOSURES not -being set. - -Signed-off-by: Fabian Groffen - ---- a/src/powerpc/ffi_darwin.c 2018-04-02 14:21:51.000000000 +0200 -+++ b/src/powerpc/ffi_darwin.c 2018-12-10 13:57:26.000000000 +0100 -@@ -909,8 +909,10 @@ - extern void ffi_call_AIX(extended_cif *, long, unsigned, unsigned *, - void (*fn)(void), void (*fn2)(void)); - -+#if FFI_GO_CLOSURES - extern void ffi_call_go_AIX(extended_cif *, long, unsigned, unsigned *, - void (*fn)(void), void (*fn2)(void), void *closure); -+#endif - - extern void ffi_call_DARWIN(extended_cif *, long, unsigned, unsigned *, - void (*fn)(void), void (*fn2)(void), ffi_type*); -@@ -950,6 +952,7 @@ - } - } - -+#if FFI_GO_CLOSURES - void - ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue, - void *closure) -@@ -981,6 +984,7 @@ - break; - } - } -+#endif - - static void flush_icache(char *); - static void flush_range(char *, int); -@@ -1110,6 +1114,7 @@ - return FFI_OK; - } - -+#if FFI_GO_CLOSURES - ffi_status - ffi_prep_go_closure (ffi_go_closure* closure, - ffi_cif* cif, -@@ -1133,6 +1138,7 @@ - } - return FFI_OK; - } -+#endif - - static void - flush_icache(char *addr) -@@ -1168,9 +1174,11 @@ - ffi_closure_helper_DARWIN (ffi_closure *, void *, - unsigned long *, ffi_dblfl *); - -+#if FFI_GO_CLOSURES - ffi_type * - ffi_go_closure_helper_DARWIN (ffi_go_closure*, void *, - unsigned long *, ffi_dblfl *); -+#endif - - /* Basically the trampoline invokes ffi_closure_ASM, and on - entry, r11 holds the address of the closure. -@@ -1430,6 +1438,7 @@ - closure->user_data, rvalue, pgr, pfr); - } - -+#if FFI_GO_CLOSURES - ffi_type * - ffi_go_closure_helper_DARWIN (ffi_go_closure *closure, void *rvalue, - unsigned long *pgr, ffi_dblfl *pfr) -@@ -1437,4 +1446,5 @@ - return ffi_closure_helper_common (closure->cif, closure->fun, - closure, rvalue, pgr, pfr); - } -+#endif - diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.4-hppa-closure-function-ptrs.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.4-hppa-closure-function-ptrs.patch new file mode 100644 index 0000000000..065f35e7c4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.4-hppa-closure-function-ptrs.patch @@ -0,0 +1,170 @@ +https://github.com/libffi/libffi/commit/e58e22b22386ed0e0a95e97eb8eed016e3f01b02 + +From e58e22b22386ed0e0a95e97eb8eed016e3f01b02 Mon Sep 17 00:00:00 2001 +From: Anthony Green +Date: Thu, 2 Feb 2023 07:02:53 -0500 +Subject: [PATCH] From Dave Anglin: + +A couple of years ago the 32-bit hppa targets were converted from using a trampoline executed on the stack to the function descriptor technique used by ia64. This is more efficient and avoids having to have an executable stack. However, function pointers on 32-bit need the PLABEL bit set in the pointer. It distinguishes between pointers that point directly to the executable code and pointer that point to a function descriptor. We need the later for libffi. But as a result, it is not possible to convert using casts data pointers to function pointers. + +The solution at the time was to set the PLABEL bit in hppa closure pointers using FFI_CLOSURE_PTR. However, I realized recently that this was a bad choice. Packages like python-cffi allocate their own closure pointers, so this isn't going to work well there. + +A better solution is to leave closure pointers unchanged and only set the PLABEL bit in pointers used to point to executable code. + +The attached patch drops the FFI_CLOSURE_PTR and FFI_RESTORE_PTR defines. This allows some cleanup in the hppa closure routines. The FFI_FN define is now used to set the PLABEL bit on hppa. ffi_closure_alloc is modified to set the PLABEL bit in the value set in *code. + +I also added a FFI_CL define to convert a function pointer to a closure pointer. It is only used in one test case. +--- a/include/ffi.h.in ++++ b/include/ffi.h.in +@@ -361,14 +361,6 @@ typedef struct { + FFI_API void *ffi_closure_alloc (size_t size, void **code); + FFI_API void ffi_closure_free (void *); + +-#if defined(PA_LINUX) || defined(PA_HPUX) +-#define FFI_CLOSURE_PTR(X) ((void *)((unsigned int)(X) | 2)) +-#define FFI_RESTORE_PTR(X) ((void *)((unsigned int)(X) & ~3)) +-#else +-#define FFI_CLOSURE_PTR(X) (X) +-#define FFI_RESTORE_PTR(X) (X) +-#endif +- + FFI_API ffi_status + ffi_prep_closure (ffi_closure*, + ffi_cif *, +@@ -515,8 +507,14 @@ FFI_API + ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type, + size_t *offsets); + +-/* Useful for eliminating compiler warnings. */ ++/* Convert between closure and function pointers. */ ++#if defined(PA_LINUX) || defined(PA_HPUX) ++#define FFI_FN(f) ((void (*)(void))((unsigned int)(f) | 2)) ++#define FFI_CL(f) ((void *)((unsigned int)(f) & ~3)) ++#else + #define FFI_FN(f) ((void (*)(void))f) ++#define FFI_CL(f) ((void *)(f)) ++#endif + + /* ---- Definitions shared with assembly code ---------------------------- */ + +--- a/src/closures.c ++++ b/src/closures.c +@@ -993,23 +993,23 @@ ffi_closure_alloc (size_t size, void **code) + if (!code) + return NULL; + +- ptr = FFI_CLOSURE_PTR (dlmalloc (size)); ++ ptr = dlmalloc (size); + + if (ptr) + { + msegmentptr seg = segment_holding (gm, ptr); + +- *code = add_segment_exec_offset (ptr, seg); ++ *code = FFI_FN (add_segment_exec_offset (ptr, seg)); + if (!ffi_tramp_is_supported ()) + return ptr; + + ftramp = ffi_tramp_alloc (0); + if (ftramp == NULL) + { +- dlfree (FFI_RESTORE_PTR (ptr)); ++ dlfree (ptr); + return NULL; + } +- *code = ffi_tramp_get_addr (ftramp); ++ *code = FFI_FN (ffi_tramp_get_addr (ftramp)); + ((ffi_closure *) ptr)->ftramp = ftramp; + } + +@@ -1050,7 +1050,7 @@ ffi_closure_free (void *ptr) + if (ffi_tramp_is_supported ()) + ffi_tramp_free (((ffi_closure *) ptr)->ftramp); + +- dlfree (FFI_RESTORE_PTR (ptr)); ++ dlfree (ptr); + } + + int +@@ -1070,16 +1070,20 @@ ffi_tramp_is_present (void *ptr) + void * + ffi_closure_alloc (size_t size, void **code) + { ++ void *c; ++ + if (!code) + return NULL; + +- return *code = FFI_CLOSURE_PTR (malloc (size)); ++ c = malloc (size); ++ *code = FFI_FN (c); ++ return c; + } + + void + ffi_closure_free (void *ptr) + { +- free (FFI_RESTORE_PTR (ptr)); ++ free (ptr); + } + + void * +--- a/src/pa/ffi.c ++++ b/src/pa/ffi.c +@@ -445,7 +445,6 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack) + int i, avn; + unsigned int slot = FIRST_ARG_SLOT; + register UINT32 r28 asm("r28"); +- ffi_closure *c = (ffi_closure *)FFI_RESTORE_PTR (closure); + + cif = closure->cif; + +@@ -548,7 +547,7 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack) + } + + /* Invoke the closure. */ +- (c->fun) (cif, rvalue, avalue, c->user_data); ++ (closure->fun) (cif, rvalue, avalue, closure->user_data); + + debug(3, "after calling function, ret[0] = %08x, ret[1] = %08x\n", u.ret[0], + u.ret[1]); +@@ -649,8 +648,6 @@ ffi_prep_closure_loc (ffi_closure* closure, + void *user_data, + void *codeloc) + { +- ffi_closure *c = (ffi_closure *)FFI_RESTORE_PTR (closure); +- + /* The layout of a function descriptor. A function pointer with the PLABEL + bit set points to a function descriptor. */ + struct pa32_fd +@@ -676,14 +673,14 @@ ffi_prep_closure_loc (ffi_closure* closure, + fd = (struct pa32_fd *)((UINT32)ffi_closure_pa32 & ~3); + + /* Setup trampoline. */ +- tramp = (struct ffi_pa32_trampoline_struct *)c->tramp; ++ tramp = (struct ffi_pa32_trampoline_struct *)closure->tramp; + tramp->code_pointer = fd->code_pointer; + tramp->fake_gp = (UINT32)codeloc & ~3; + tramp->real_gp = fd->gp; + +- c->cif = cif; +- c->user_data = user_data; +- c->fun = fun; ++ closure->cif = cif; ++ closure->user_data = user_data; ++ closure->fun = fun; + + return FFI_OK; + } +--- a/testsuite/libffi.closures/closure_loc_fn0.c ++++ b/testsuite/libffi.closures/closure_loc_fn0.c +@@ -85,7 +85,7 @@ int main (void) + + #ifndef FFI_EXEC_STATIC_TRAMP + /* With static trampolines, the codeloc does not point to closure */ +- CHECK(memcmp(pcl, codeloc, sizeof(*pcl)) == 0); ++ CHECK(memcmp(pcl, FFI_CL(codeloc), sizeof(*pcl)) == 0); + #endif + + res = (*((closure_loc_test_type0)codeloc)) + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.4-hppa-jump-table.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.4-hppa-jump-table.patch new file mode 100644 index 0000000000..822a7eb893 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.4-hppa-jump-table.patch @@ -0,0 +1,289 @@ +https://github.com/libffi/libffi/commit/222abd0c65babe2174b21753217145f5031a8b91 + +From 222abd0c65babe2174b21753217145f5031a8b91 Mon Sep 17 00:00:00 2001 +From: Anthony Green +Date: Thu, 2 Feb 2023 07:04:55 -0500 +Subject: [PATCH] From Dave Anglin: + +This patch is derived from the work done in implementing libffi for 64-bit hppa64-hpux target. Currently, the 32-bit hppa targets do a linear search for the return type of an ffi_call. This is slow and inefficient. A jump table can used to jump directly to the code used to process the return value. In most common cases, the return value can be processed in the jump table itself. + +The patch also fixes return handling for FFI_TYPE_UINT8, FFI_TYPE_SINT8, FFI_TYPE_UINT16 and FFI_TYPE_SINT16. +--- a/src/pa/ffi.c ++++ b/src/pa/ffi.c +@@ -56,27 +56,12 @@ static inline int ffi_struct_type(ffi_type *t) + size_t sz = t->size; + + /* Small structure results are passed in registers, +- larger ones are passed by pointer. Note that +- small structures of size 2, 4 and 8 differ from +- the corresponding integer types in that they have +- different alignment requirements. */ +- +- if (sz <= 1) +- return FFI_TYPE_UINT8; +- else if (sz == 2) +- return FFI_TYPE_SMALL_STRUCT2; +- else if (sz == 3) +- return FFI_TYPE_SMALL_STRUCT3; +- else if (sz == 4) +- return FFI_TYPE_SMALL_STRUCT4; +- else if (sz == 5) +- return FFI_TYPE_SMALL_STRUCT5; +- else if (sz == 6) +- return FFI_TYPE_SMALL_STRUCT6; +- else if (sz == 7) +- return FFI_TYPE_SMALL_STRUCT7; +- else if (sz <= 8) +- return FFI_TYPE_SMALL_STRUCT8; ++ larger ones are passed by pointer. Note that small ++ structures differ from the corresponding integer ++ types in that they have different alignment requirements. */ ++ ++ if (sz <= 8) ++ return -sz; + else + return FFI_TYPE_STRUCT; /* else, we pass it by pointer. */ + } +@@ -556,16 +541,16 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack) + switch (cif->flags) + { + case FFI_TYPE_UINT8: +- *(stack - FIRST_ARG_SLOT) = (UINT8)(u.ret[0] >> 24); ++ *(stack - FIRST_ARG_SLOT) = (UINT8)u.ret[0]; + break; + case FFI_TYPE_SINT8: +- *(stack - FIRST_ARG_SLOT) = (SINT8)(u.ret[0] >> 24); ++ *(stack - FIRST_ARG_SLOT) = (SINT8)u.ret[0]; + break; + case FFI_TYPE_UINT16: +- *(stack - FIRST_ARG_SLOT) = (UINT16)(u.ret[0] >> 16); ++ *(stack - FIRST_ARG_SLOT) = (UINT16)u.ret[0]; + break; + case FFI_TYPE_SINT16: +- *(stack - FIRST_ARG_SLOT) = (SINT16)(u.ret[0] >> 16); ++ *(stack - FIRST_ARG_SLOT) = (SINT16)u.ret[0]; + break; + case FFI_TYPE_INT: + case FFI_TYPE_SINT32: +@@ -590,6 +575,7 @@ ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack) + /* Don't need a return value, done by caller. */ + break; + ++ case FFI_TYPE_SMALL_STRUCT1: + case FFI_TYPE_SMALL_STRUCT2: + case FFI_TYPE_SMALL_STRUCT3: + case FFI_TYPE_SMALL_STRUCT4: +--- a/src/pa/ffitarget.h ++++ b/src/pa/ffitarget.h +@@ -73,11 +73,22 @@ typedef enum ffi_abi { + #define FFI_TRAMPOLINE_SIZE 12 + #endif + +-#define FFI_TYPE_SMALL_STRUCT2 -1 +-#define FFI_TYPE_SMALL_STRUCT3 -2 +-#define FFI_TYPE_SMALL_STRUCT4 -3 +-#define FFI_TYPE_SMALL_STRUCT5 -4 +-#define FFI_TYPE_SMALL_STRUCT6 -5 +-#define FFI_TYPE_SMALL_STRUCT7 -6 +-#define FFI_TYPE_SMALL_STRUCT8 -7 ++#define FFI_TYPE_SMALL_STRUCT1 -1 ++#define FFI_TYPE_SMALL_STRUCT2 -2 ++#define FFI_TYPE_SMALL_STRUCT3 -3 ++#define FFI_TYPE_SMALL_STRUCT4 -4 ++#define FFI_TYPE_SMALL_STRUCT5 -5 ++#define FFI_TYPE_SMALL_STRUCT6 -6 ++#define FFI_TYPE_SMALL_STRUCT7 -7 ++#define FFI_TYPE_SMALL_STRUCT8 -8 ++ ++/* linux.S and hpux32.S expect FFI_TYPE_COMPLEX is the last generic type. */ ++#define FFI_PA_TYPE_LAST FFI_TYPE_COMPLEX ++ ++/* If new generic types are added, the jump tables in linux.S and hpux32.S ++ likely need updating. */ ++#if FFI_TYPE_LAST != FFI_PA_TYPE_LAST ++# error "You likely have broken jump tables" ++#endif ++ + #endif + +--- a/src/pa/linux.S ++++ b/src/pa/linux.S +@@ -103,51 +103,103 @@ ffi_call_pa32: + + /* Prepare to store the result; we need to recover flags and rvalue. */ + ldw -48(%r3), %r21 /* r21 <- flags */ +- ldw -52(%r3), %r20 /* r20 <- rvalue */ + +- /* Store the result according to the return type. */ ++ /* Adjust flags range from [-8, 15] to [0, 23]. */ ++ addi 8, %r21, %r21 + +-.Lcheckint: +- comib,<>,n FFI_TYPE_INT, %r21, .Lcheckint8 +- b .Ldone +- stw %ret0, 0(%r20) ++ blr %r21, %r0 ++ ldw -52(%r3), %r20 /* r20 <- rvalue */ + +-.Lcheckint8: +- comib,<>,n FFI_TYPE_UINT8, %r21, .Lcheckint16 ++ /* Giant jump table */ ++ /* 8-byte small struct */ ++ b,n .Lsmst8 ++ nop ++ /* 7-byte small struct */ ++ b,n .Lsmst7 ++ nop ++ /* 6-byte small struct */ ++ b,n .Lsmst6 ++ nop ++ /* 5-byte small struct */ ++ b,n .Lsmst5 ++ nop ++ /* 4-byte small struct */ ++ b,n .Lsmst4 ++ nop ++ /* 3-byte small struct */ ++ b,n .Lsmst3 ++ nop ++ /* 2-byte small struct */ ++ b,n .Lsmst2 ++ nop ++ /* 1-byte small struct */ + b .Ldone + stb %ret0, 0(%r20) +- +-.Lcheckint16: +- comib,<>,n FFI_TYPE_UINT16, %r21, .Lcheckdbl ++ /* void */ ++ b,n .Ldone ++ nop ++ /* int */ + b .Ldone +- sth %ret0, 0(%r20) +- +-.Lcheckdbl: +- comib,<>,n FFI_TYPE_DOUBLE, %r21, .Lcheckfloat ++ stw %ret0, 0(%r20) ++ /* float */ ++ b .Ldone ++ fstw %fr4L,0(%r20) ++ /* double */ + b .Ldone + fstd %fr4,0(%r20) +- +-.Lcheckfloat: +- comib,<>,n FFI_TYPE_FLOAT, %r21, .Lcheckll ++ /* long double */ + b .Ldone +- fstw %fr4L,0(%r20) ++ fstd %fr4,0(%r20) ++ /* unsigned int8 */ ++ b .Ldone ++ stw %ret0, 0(%r20) ++ /* sint8 */ ++ b .Ldone ++ stw %ret0, 0(%r20) ++ /* unsigned int16 */ ++ b .Ldone ++ stw %ret0, 0(%r20) ++ /* sint16 */ ++ b .Ldone ++ stw %ret0, 0(%r20) ++ /* unsigned int32 */ ++ b .Ldone ++ stw %ret0, 0(%r20) ++ /* sint32 */ ++ b .Ldone ++ stw %ret0, 0(%r20) ++ /* unsigned int64 */ ++ b,n .Luint64 ++ nop ++ /* signed int64 */ ++ b,n .Lsint64 ++ nop ++ /* large struct */ ++ b,n .Ldone ++ nop ++ /* pointer */ ++ b .Ldone ++ stw %ret0, 0(%r20) ++ /* complex */ ++ b,n .Ldone ++ nop ++ ++ /* Store the result according to the return type. */ + +-.Lcheckll: +- comib,<>,n FFI_TYPE_UINT64, %r21, .Lchecksmst2 ++.Luint64: ++.Lsint64: + stw %ret0, 0(%r20) + b .Ldone + stw %ret1, 4(%r20) + +-.Lchecksmst2: +- comib,<>,n FFI_TYPE_SMALL_STRUCT2, %r21, .Lchecksmst3 ++.Lsmst2: + /* 2-byte structs are returned in ret0 as ????xxyy. */ + extru %ret0, 23, 8, %r22 + stbs,ma %r22, 1(%r20) + b .Ldone + stb %ret0, 0(%r20) + +-.Lchecksmst3: +- comib,<>,n FFI_TYPE_SMALL_STRUCT3, %r21, .Lchecksmst4 ++.Lsmst3: + /* 3-byte structs are returned in ret0 as ??xxyyzz. */ + extru %ret0, 15, 8, %r22 + stbs,ma %r22, 1(%r20) +@@ -156,8 +208,7 @@ ffi_call_pa32: + b .Ldone + stb %ret0, 0(%r20) + +-.Lchecksmst4: +- comib,<>,n FFI_TYPE_SMALL_STRUCT4, %r21, .Lchecksmst5 ++.Lsmst4: + /* 4-byte structs are returned in ret0 as wwxxyyzz. */ + extru %ret0, 7, 8, %r22 + stbs,ma %r22, 1(%r20) +@@ -168,8 +219,7 @@ ffi_call_pa32: + b .Ldone + stb %ret0, 0(%r20) + +-.Lchecksmst5: +- comib,<>,n FFI_TYPE_SMALL_STRUCT5, %r21, .Lchecksmst6 ++.Lsmst5: + /* 5 byte values are returned right justified: + ret0 ret1 + 5: ??????aa bbccddee */ +@@ -183,8 +233,7 @@ ffi_call_pa32: + b .Ldone + stb %ret1, 0(%r20) + +-.Lchecksmst6: +- comib,<>,n FFI_TYPE_SMALL_STRUCT6, %r21, .Lchecksmst7 ++.Lsmst6: + /* 6 byte values are returned right justified: + ret0 ret1 + 6: ????aabb ccddeeff */ +@@ -200,8 +249,7 @@ ffi_call_pa32: + b .Ldone + stb %ret1, 0(%r20) + +-.Lchecksmst7: +- comib,<>,n FFI_TYPE_SMALL_STRUCT7, %r21, .Lchecksmst8 ++.Lsmst7: + /* 7 byte values are returned right justified: + ret0 ret1 + 7: ??aabbcc ddeeffgg */ +@@ -219,8 +267,7 @@ ffi_call_pa32: + b .Ldone + stb %ret1, 0(%r20) + +-.Lchecksmst8: +- comib,<>,n FFI_TYPE_SMALL_STRUCT8, %r21, .Ldone ++.Lsmst8: + /* 8 byte values are returned right justified: + ret0 ret1 + 8: aabbccdd eeffgghh */ diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.4-hppa-large-struct.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.4-hppa-large-struct.patch new file mode 100644 index 0000000000..aaf4af3684 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.4-hppa-large-struct.patch @@ -0,0 +1,36 @@ +https://github.com/libffi/libffi/commit/c50c16d0bcb58952840184aa83e62c6d912bf779 + +From c50c16d0bcb58952840184aa83e62c6d912bf779 Mon Sep 17 00:00:00 2001 +From: Anthony Green +Date: Sun, 20 Nov 2022 12:20:40 -0500 +Subject: [PATCH] Fix large struct passing on PA-RISC + +--- a/src/pa/ffi.c ++++ b/src/pa/ffi.c +@@ -376,10 +376,26 @@ extern void ffi_call_pa32(void (*)(UINT32 *, extended_cif *, unsigned), + void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) + { + extended_cif ecif; ++ size_t i, nargs = cif->nargs; ++ ffi_type **arg_types = cif->arg_types; + + ecif.cif = cif; + ecif.avalue = avalue; + ++ /* If we have any large structure arguments, make a copy so we are passing ++ by value. */ ++ for (i = 0; i < nargs; i++) ++ { ++ ffi_type *at = arg_types[i]; ++ int size = at->size; ++ if (at->type == FFI_TYPE_STRUCT && size > 8) ++ { ++ char *argcopy = alloca (size); ++ memcpy (argcopy, avalue[i], size); ++ avalue[i] = argcopy; ++ } ++ } ++ + /* If the return value is a struct and we don't have a return + value address then we need to make one. */ + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.4-sparc-float-typo.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.4-sparc-float-typo.patch new file mode 100644 index 0000000000..3768df62df --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/files/libffi-3.4.4-sparc-float-typo.patch @@ -0,0 +1,28 @@ +https://github.com/libffi/libffi/issues/778 +https://bugs.gentoo.org/882071 + +Fix incorrect type for passing floats. Thanks to Petr Sumbera and Richard Henderson +for figuring it out on the upstream bug. +--- a/src/sparc/ffi64.c ++++ b/src/sparc/ffi64.c +@@ -382,13 +382,19 @@ ffi_prep_args_v9(ffi_cif *cif, unsigned long *argp, void *rvalue, void **avalue) + *argp++ = *(SINT32 *)a; + break; + case FFI_TYPE_UINT32: +- case FFI_TYPE_FLOAT: + *argp++ = *(UINT32 *)a; + break; + case FFI_TYPE_SINT64: + case FFI_TYPE_UINT64: + case FFI_TYPE_POINTER: ++ *argp++ = *(UINT64 *)a; ++ break; ++ case FFI_TYPE_FLOAT: ++ flags |= SPARC_FLAG_FP_ARGS; ++ *argp++ = *(UINT32 *)a; ++ break; + case FFI_TYPE_DOUBLE: ++ flags |= SPARC_FLAG_FP_ARGS; + *argp++ = *(UINT64 *)a; + break; + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.3-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.4-r1.ebuild similarity index 60% rename from sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.3-r2.ebuild rename to sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.4-r1.ebuild index 3d1f2530f8..cf7d47ca43 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.3-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.4-r1.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit multilib-minimal + +inherit multilib-minimal preserve-libs MY_PV=${PV/_rc/-rc} MY_P=${PN}-${MY_PV} @@ -10,37 +11,29 @@ MY_P=${PN}-${MY_PV} DESCRIPTION="a portable, high level programming interface to various calling conventions" HOMEPAGE="https://sourceware.org/libffi/" SRC_URI="https://github.com/libffi/libffi/releases/download/v${MY_PV}/${MY_P}.tar.gz" +S="${WORKDIR}"/${MY_P} LICENSE="MIT" -SLOT="0/7" # SONAME=libffi.so.7 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="debug pax-kernel static-libs test" +# This is a core package which is depended on by e.g. Python +# Please use preserve-libs.eclass in pkg_{pre,post}inst to cover users +# 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" +IUSE="debug exec-static-trampoline pax-kernel static-libs test" RESTRICT="!test? ( test )" - -RDEPEND="" -DEPEND="" BDEPEND="test? ( dev-util/dejagnu )" -DOCS="ChangeLog* README.md" - PATCHES=( - "${FILESDIR}"/${PN}-3.2.1-o-tmpfile-eacces.patch #529044 - "${FILESDIR}"/${PN}-3.3_rc0-ppc-macos-go.patch - "${FILESDIR}"/${PN}-3.3-power7.patch - "${FILESDIR}"/${PN}-3.3-power7-memcpy.patch - "${FILESDIR}"/${PN}-3.3-power7-memcpy-2.patch - "${FILESDIR}"/${PN}-3.3-ppc-int128.patch - "${FILESDIR}"/${PN}-3.3-ppc-vector-offset.patch - "${FILESDIR}"/${PN}-3.3-compiler-vendor-quote.patch + "${FILESDIR}"/${P}-hppa-large-struct.patch + "${FILESDIR}"/${P}-hppa-closure-function-ptrs.patch + "${FILESDIR}"/${P}-hppa-jump-table.patch ) -S=${WORKDIR}/${MY_P} - -ECONF_SOURCE=${S} - src_prepare() { default + if [[ ${CHOST} == arm64-*-darwin* ]] ; then # ensure we use aarch64 asm, not x86 on arm64 sed -i -e 's/aarch64\*-\*-\*/arm64*-*-*|&/' \ @@ -60,15 +53,24 @@ multilib_src_configure() { # 2. have ${ABI}-specific location as ffi.h is target-dependent. # # We use /usr/$(get_libdir)/... to have ABI identifier. - econf \ + ECONF_SOURCE="${S}" econf \ --includedir="${EPREFIX}"/usr/$(get_libdir)/${PN}/include \ --disable-multi-os-directory \ $(use_enable static-libs static) \ + $(use_enable exec-static-trampoline exec-static-tramp) \ $(use_enable pax-kernel pax_emutramp) \ $(use_enable debug) } multilib_src_install_all() { - find "${ED}" -name "*.la" -delete || die einstalldocs + find "${ED}" -name "*.la" -delete || die +} + +pkg_preinst() { + preserve_old_lib /usr/$(get_libdir)/libffi.so.7 +} + +pkg_postinst() { + preserve_old_lib_notify /usr/$(get_libdir)/libffi.so.7 } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.4-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.4-r2.ebuild new file mode 100644 index 0000000000..63367bd2fe --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.4-r2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal preserve-libs + +MY_PV=${PV/_rc/-rc} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="Portable, high level programming interface to various calling conventions" +HOMEPAGE="https://sourceware.org/libffi/" +SRC_URI="https://github.com/libffi/libffi/releases/download/v${MY_PV}/${MY_P}.tar.gz" +S="${WORKDIR}"/${MY_P} + +LICENSE="MIT" +# This is a core package which is depended on by e.g. Python +# Please use preserve-libs.eclass in pkg_{pre,post}inst to cover users +# 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" +IUSE="debug exec-static-trampoline pax-kernel static-libs test" + +RESTRICT="!test? ( test )" +BDEPEND="test? ( dev-util/dejagnu )" + +PATCHES=( + "${FILESDIR}"/${P}-hppa-large-struct.patch + "${FILESDIR}"/${P}-hppa-closure-function-ptrs.patch + "${FILESDIR}"/${P}-hppa-jump-table.patch + "${FILESDIR}"/${PN}-3.4.4-sparc-float-typo.patch +) + +src_prepare() { + default + + if [[ ${CHOST} == arm64-*-darwin* ]] ; then + # ensure we use aarch64 asm, not x86 on arm64 + sed -i -e 's/aarch64\*-\*-\*/arm64*-*-*|&/' \ + configure configure.host || die + fi +} + +multilib_src_configure() { + # --includedir= path maintains a few properties: + # 1. have stable name across libffi versions: some packages like + # dev-lang/ghc or kde-frameworks/networkmanager-qt embed + # ${includedir} at build-time. Don't require those to be + # rebuilt unless SONAME changes. bug #695788 + # + # We use /usr/.../${PN} (instead of former /usr/.../${P}). + # + # 2. have ${ABI}-specific location as ffi.h is target-dependent. + # + # We use /usr/$(get_libdir)/... to have ABI identifier. + ECONF_SOURCE="${S}" econf \ + --includedir="${EPREFIX}"/usr/$(get_libdir)/${PN}/include \ + --disable-multi-os-directory \ + $(use_enable static-libs static) \ + $(use_enable exec-static-trampoline exec-static-tramp) \ + $(use_enable pax-kernel pax_emutramp) \ + $(use_enable debug) +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -name "*.la" -delete || die +} + +pkg_preinst() { + preserve_old_lib /usr/$(get_libdir)/libffi.so.7 +} + +pkg_postinst() { + preserve_old_lib_notify /usr/$(get_libdir)/libffi.so.7 +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.2-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.4.ebuild similarity index 86% rename from sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.2-r1.ebuild rename to sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.4.ebuild index 492d9b34c6..5401d0f8a9 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.2-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -19,18 +19,15 @@ 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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-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 )" BDEPEND="test? ( dev-util/dejagnu )" -DOCS="ChangeLog* README.md" - -ECONF_SOURCE=${S} - src_prepare() { default + if [[ ${CHOST} == arm64-*-darwin* ]] ; then # ensure we use aarch64 asm, not x86 on arm64 sed -i -e 's/aarch64\*-\*-\*/arm64*-*-*|&/' \ @@ -50,7 +47,7 @@ multilib_src_configure() { # 2. have ${ABI}-specific location as ffi.h is target-dependent. # # We use /usr/$(get_libdir)/... to have ABI identifier. - econf \ + ECONF_SOURCE="${S}" econf \ --includedir="${EPREFIX}"/usr/$(get_libdir)/${PN}/include \ --disable-multi-os-directory \ $(use_enable static-libs static) \ @@ -60,8 +57,8 @@ multilib_src_configure() { } multilib_src_install_all() { - find "${ED}" -name "*.la" -delete || die einstalldocs + find "${ED}" -name "*.la" -delete || die } pkg_preinst() { diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/metadata.xml index 53754327cd..aa5aa78f43 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/metadata.xml @@ -39,5 +39,6 @@ cpe:/a:libffi_project:libffi + libffi/libffi diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/liblinear/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/liblinear/Manifest index 202d311a74..51d7295908 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/liblinear/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/liblinear/Manifest @@ -1 +1,2 @@ +DIST liblinear-2.46.tar.gz 569001 BLAKE2B d1f9019717b47414c11611a253ca9185d80cb5860e53462f9b4a6f95c99b0d39502ba91827d8afca6e98d279b50ce44cdcfde9a3629f2c5d4773eeb93e17de76 SHA512 94b892a51f85246cad36562f1e4870a22e73c0c6bf237dfcdc50467e93212a6e88a8f7ba36cfd691c031d8ced9ad663f592ef94e309df764d56095cfff7835ce DIST liblinear-243.tar.gz 565437 BLAKE2B 6367cfbdc040b9183c4993f5340a4d74a8dde48da04ef07f725dc5735073e1b9a7440bad325e9f7527ad76d675dbf3bb47d1d43fc323e1e42ef360d679e816ff SHA512 a0cfa9803285cdfda54752e7addfb210a9ba8f7056cfc8aca13987db7f0bef5fe02d6179eadc829cb243670414da061e6c4cf3d50d682ce392778a0e8cb9e753 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/liblinear/liblinear-246.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/liblinear/liblinear-246.ebuild new file mode 100644 index 0000000000..c19c43ca5f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/liblinear/liblinear-246.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib toolchain-funcs + +MY_PV="${PV:0:1}.${PV:1}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="A Library for Large Linear Classification" +HOMEPAGE="https://www.csie.ntu.edu.tw/~cjlin/liblinear/ https://github.com/cjlin1/liblinear" +SRC_URI="https://www.csie.ntu.edu.tw/~cjlin/liblinear/${MY_P}.tar.gz" +S="${WORKDIR}"/${MY_P} + +LICENSE="BSD" +SLOT="0/5" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos" + +src_prepare() { + default + + sed -i \ + -e '/^CFLAGS/d;/^CXXFLAGS/d' \ + blas/Makefile || die + sed -i \ + -e 's|make|$(MAKE)|g' \ + -e '/$(LIBS)/s|$(CFLAGS)|& $(LDFLAGS)|g' \ + -e '/^CFLAGS/d;/^CXXFLAGS/d' \ + -e 's|$(SHARED_LIB_FLAG)|& $(LDFLAGS)|g' \ + Makefile || die + + # fix install_name on Darwin + sed -i \ + -e '/install_name/s:liblinear.so.$(SHVER):'"${EPREFIX}"'/usr/lib/liblinear.$(SHVER).dylib:' \ + -e '/LDFLAGS/s:liblinear.so.$(SHVER):liblinear'"$(get_libname '$(SHVER)')"':' \ + Makefile || die +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + CFLAGS="${CFLAGS} -fPIC" \ + CXXFLAGS="${CXXFLAGS} -fPIC" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" \ + lib all +} + +src_install() { + dolib.so ${PN}$(get_libname ${SLOT#*/}) + dosym ${PN}$(get_libname ${SLOT#*/}) /usr/$(get_libdir)/${PN}$(get_libname) + + newbin predict ${PN}-predict + newbin train ${PN}-train + + doheader linear.h + + dodoc README +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/Manifest index ba4f46480c..35b788ea8c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/Manifest @@ -1,6 +1,4 @@ -DIST libsodium-1.0.18.tar.gz 1919817 BLAKE2B a42d898fe77f232dcbb75728e776b88f006e89f734c4d335e75e01d37b1034cc024df2e89d4350ecbe713d3e4b32c08bec537922c81cc63b0e87ee7fd89b2940 SHA512 17e8638e46d8f6f7d024fe5559eccf2b8baf23e143fadd472a7d29d228b186d86686a5e6920385fe2020729119a5f12f989c3a782afbd05a8db4819bb18666ef -DIST libsodium-1.0.18.tar.gz.sig 566 BLAKE2B bb892901e2228c93018d79a5c8e70e0ea458513b0fdf99e8f6c015132b618fd0fefbe6a18ed514c20fbe1e56719dd6dd3762bc4bb6348a439146fdaa951090c0 SHA512 ba69d372263e63126d6ce24f67fe85d83f74e558db81391ddcd7eacb6787dcdd5209a149eebca897e9806f295e78f5a8ababa0ab884b85d9a8dd1a54507a8b0c -DIST libsodium-1.0.18_p20210421.tar.gz 1855069 BLAKE2B f9b5843998b0045f97a303589de42b38a7586b4a35571eec9a0b0afd1df101467cb8f82e9a32dbdb9a25058d827a5565ad8d49ad2216d2b6af5b101612a94080 SHA512 ddb77c0608a7e6cacf1923a3d0f5950975511c46d53f6f9c23f80dd99eab84dde2a1292c1e35555f7f1659f25a1b80668516558b83c42effb921fff06c0fb559 -DIST libsodium-1.0.18_p20210421.tar.gz.minisig 311 BLAKE2B 12d00384a2acd9c9ac5cfc2ce984c2254a69be93f9cb891513c2f575fbc0cd2c03c2f323aa4b363f54fd7e1bf6b73887c0919e919142f759f0f7baa8680cdba5 SHA512 80fe3a5d41a5550b310e1fce86eed142288c70bab46c761a21206cd0c441b9355d455df49916b3eca134af60444307baa8c5566f1ea369e79f7326a6fac822bf -DIST libsodium-1.0.18_p20210617.tar.gz 1854880 BLAKE2B 5b421c7efacca5b2a2b5a99a04719d708c217bc6f0b344f08d566bde85c4f758862c0ad61924346eac508542c2d9c6313cb1e3e421743e424f396dd1972e8195 SHA512 d7cd64101fed11ce33c4865dec253f1058acab376c3a6097422508087f4449b2f7fd1b38835915843106f620bf86694d846695e0c8a35f921e4f190dea3164bc -DIST libsodium-1.0.18_p20210617.tar.gz.minisig 311 BLAKE2B c54b76a9e29f49bccca80466a5aaa77fb8341e8164041331003710de8f9b173fd25de4812157377645d97ba8a97470076a7f5e037501ba8376b285a06461efa9 SHA512 2180beb872716ad6b728a455981b548003b18594c3f28435c5ddc9803ab2a0f8f1945b6c77de5928b948bbb803b4fa7527cc2e72059931364343a2fdf51ca1be +DIST libsodium-1.0.18_p20220618.tar.gz 1869858 BLAKE2B 60d46f722c4e5c9896226e3e03c31768a2183bae80a535234b23ac5bc9a2c3632d6c891ce72cbc1d6dc633a15b539111e322c2d210f993f99d6e5bd32f8a8b63 SHA512 14d1c6109de2ac02ba6cb5541746275f6deb25302b60cb3f65a7922b34d2c3bd5f17a4d730acf77a53d5837be00228c68fa06c6a2e9095ea97f6d8c4b782ab6b +DIST libsodium-1.0.18_p20220618.tar.gz.minisig 318 BLAKE2B a2cba3c62ca5a84e7897373cdfe4033c636c652c848bf9beff15765d359f1dd2a8834dc3a4d4443d0b9418a59a94309cf9c5c917ae9c8965778411e21f98e4e6 SHA512 ca1ac892b41c5cb6dd1ba9d4bbde8e75987e66023d29cfc81839bbb3b99efa215f7db1ef903c375dd9d2d5a76f6064b3c7eab833081d21983693b7db87175160 +DIST libsodium-1.0.19.tar.gz 1945523 BLAKE2B de43520150b55760142d186404cc3e49471c6e911a7a590c7ae08bc61e928c063c459555f49cd88155238fb0008ef3924b6d7c14ba9cff2f90f1e96201e1259c SHA512 8e9b6d796f6330e00921ce37f1b43545966094250938626ae227deef5fd1279f2fc18b5cd55e23484732a27df4d919cf0d2f07b9c2f1aa0c0ef689e668b0d439 +DIST libsodium-1.0.19.tar.gz.minisig 318 BLAKE2B e86e653107478d9e9281894632baafda57358229f2d56fcaf55591098e38d6be72ed2f599a7f2c16d5b9978d2cbfe8e07db4e772b053a832a61fd325fc1efae4 SHA512 8b5993bd7e541a5913ea1659c1009c4edefd9b5907e0a7c9090fa604c23d77006ad9d9a897d66243162742d63ce9bc1f2c81091d50a584f1495dd3bd87d4451e diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.18.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.18.ebuild deleted file mode 100644 index e7131e1f44..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.18.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/jedisct1.asc -inherit autotools multilib-minimal verify-sig - -DESCRIPTION="A portable fork of NaCl, a higher-level cryptographic library" -HOMEPAGE="https://libsodium.org" -SRC_URI="https://download.libsodium.org/${PN}/releases/${P}.tar.gz" -SRC_URI+=" verify-sig? ( https://download.libsodium.org/${PN}/releases/${P}.tar.gz.sig )" - -LICENSE="ISC" -SLOT="0/23" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux" -IUSE="+asm minimal static-libs +urandom cpu_flags_x86_sse4_1 cpu_flags_x86_aes" - -BDEPEND="verify-sig? ( app-crypt/openpgp-keys-jedisct1 )" - -PATCHES=( - "${FILESDIR}"/${PN}-1.0.10-cpuflags.patch -) - -src_prepare() { - default - eautoreconf -} - -multilib_src_configure() { - local myeconfargs=( - $(use_enable asm) - $(use_enable minimal) - $(use_enable !urandom blocking-random) - $(use_enable static-libs static) - $(use_enable cpu_flags_x86_sse4_1 sse4_1) - $(use_enable cpu_flags_x86_aes aesni) - ) - - # --disable-pie is needed on x86, see bug #512734 - if [[ "${MULTILIB_ABI_FLAG}" == "abi_x86_32" ]] ; then - myeconfargs+=( --disable-pie ) - - # --disable-ssp is needed on musl x86 - # TODO: Check if still needed? bug #747346 - if use elibc_musl ; then - myeconfargs+=( --disable-ssp ) - fi - fi - - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -multilib_src_install_all() { - einstalldocs - find "${ED}" -type f -name "*.la" -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.18_p20210421.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.18_p20210421.ebuild deleted file mode 100644 index 86dba664b6..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.18_p20210421.ebuild +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools multilib-minimal - -DESCRIPTION="A portable fork of NaCl, a higher-level cryptographic library" -HOMEPAGE="https://libsodium.org" - -if [[ ${PV} == *_p* ]] ; then - MY_P=${PN}-$(ver_cut 1-3)-stable-$(ver_cut 5-) - MINISIGN_KEY="RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3" - - # We use _pN to represent 'stable releases' - # These are backports from upstream to the last release branch - # See https://download.libsodium.org/libsodium/releases/README.html - SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_P}.tar.gz -> ${P}.tar.gz" - - # TODO: Could verify-sig.eclass support minisig? bug #783066 - SRC_URI+=" verify-sig? ( https://dev.gentoo.org/~sam/distfiles/dev-libs/libsodium/${MY_P}.tar.gz.minisig -> ${P}.tar.gz.minisig )" - - S="${WORKDIR}/${PN}-stable" -else - VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/jedisct1.asc - inherit verify-sig - - SRC_URI="https://download.libsodium.org/${PN}/releases/${P}.tar.gz" - SRC_URI+=" verify-sig? ( https://download.libsodium.org/${PN}/releases/${P}.tar.gz.sig )" -fi - -LICENSE="ISC" -SLOT="0/23" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" -IUSE="+asm minimal static-libs +urandom" - -CPU_USE=( cpu_flags_x86_{aes,sse4_1} ) -IUSE+=" ${CPU_USE[@]}" - -if [[ ${PV} == *_p* ]] ; then - IUSE+=" verify-sig" - - BDEPEND+=" verify-sig? ( app-crypt/minisign )" -fi - -PATCHES=( - "${FILESDIR}"/${PN}-1.0.10-cpuflags.patch -) - -src_unpack() { - if [[ ${PV} == *_p* ]] ; then - if use verify-sig ; then - elog "Verifying signature using app-crypt/minisign" - minisign -V \ - -P ${MINISIGN_KEY} \ - -x "${DISTDIR}"/${P}.tar.gz.minisig \ - -m "${DISTDIR}"/${P}.tar.gz || die "Failed to verify distfile using minisign!" - fi - - default - else - verify-sig_src_unpack - fi -} - -src_prepare() { - default - eautoreconf -} - -multilib_src_configure() { - local myeconfargs=( - $(use_enable asm) - $(use_enable cpu_flags_x86_aes aesni) - $(use_enable cpu_flags_x86_sse4_1 sse4_1) - $(use_enable minimal) - $(use_enable static-libs static) - $(use_enable !urandom blocking-random) - ) - - # --disable-pie is needed on x86, see bug #512734 - if [[ "${MULTILIB_ABI_FLAG}" == "abi_x86_32" ]] ; then - myeconfargs+=( --disable-pie ) - - # --disable-ssp is needed on musl x86 - # TODO: Check if still needed? bug #747346 - if use elibc_musl ; then - myeconfargs+=( --disable-ssp ) - fi - fi - - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -multilib_src_install_all() { - default - find "${ED}" -type f -name "*.la" -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.18_p20210617.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.18_p20210617.ebuild deleted file mode 100644 index 959d0c871f..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.18_p20210617.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools multilib-minimal - -DESCRIPTION="A portable fork of NaCl, a higher-level cryptographic library" -HOMEPAGE="https://libsodium.org" - -if [[ ${PV} == *_p* ]] ; then - MY_P=${PN}-$(ver_cut 1-3)-stable-$(ver_cut 5-) - MINISIGN_KEY="RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3" - - # We use _pN to represent 'stable releases' - # These are backports from upstream to the last release branch - # See https://download.libsodium.org/libsodium/releases/README.html - SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_P}.tar.gz -> ${P}.tar.gz" - - # TODO: Could verify-sig.eclass support minisig? bug #783066 - SRC_URI+=" verify-sig? ( https://dev.gentoo.org/~sam/distfiles/dev-libs/libsodium/${MY_P}.tar.gz.minisig -> ${P}.tar.gz.minisig )" - - S="${WORKDIR}/${PN}-stable" -else - VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/jedisct1.asc - inherit verify-sig - - SRC_URI="https://download.libsodium.org/${PN}/releases/${P}.tar.gz" - SRC_URI+=" verify-sig? ( https://download.libsodium.org/${PN}/releases/${P}.tar.gz.sig )" -fi - -LICENSE="ISC" -SLOT="0/23" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="+asm minimal static-libs +urandom" - -CPU_USE=( cpu_flags_x86_{aes,sse4_1} ) -IUSE+=" ${CPU_USE[@]}" - -if [[ ${PV} == *_p* ]] ; then - IUSE+=" verify-sig" - - BDEPEND+=" verify-sig? ( app-crypt/minisign )" -fi - -PATCHES=( - "${FILESDIR}"/${PN}-1.0.10-cpuflags.patch -) - -src_unpack() { - if [[ ${PV} == *_p* ]] ; then - if use verify-sig ; then - elog "Verifying signature using app-crypt/minisign" - minisign -V \ - -P ${MINISIGN_KEY} \ - -x "${DISTDIR}"/${P}.tar.gz.minisig \ - -m "${DISTDIR}"/${P}.tar.gz || die "Failed to verify distfile using minisign!" - fi - - default - else - verify-sig_src_unpack - fi -} - -src_prepare() { - default - eautoreconf -} - -multilib_src_configure() { - local myeconfargs=( - $(use_enable asm) - $(use_enable cpu_flags_x86_aes aesni) - $(use_enable cpu_flags_x86_sse4_1 sse4_1) - $(use_enable minimal) - $(use_enable static-libs static) - $(use_enable !urandom blocking-random) - ) - - # --disable-pie is needed on x86, see bug #512734 - # TODO: Check if still needed? - if [[ "${MULTILIB_ABI_FLAG}" == "abi_x86_32" ]] ; then - myeconfargs+=( --disable-pie ) - fi - - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -multilib_src_install_all() { - default - find "${ED}" -type f -name "*.la" -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.18_p20220618.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.18_p20220618.ebuild new file mode 100644 index 0000000000..bcd05ad21e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.18_p20220618.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libsodium.minisig +VERIFY_SIG_METHOD=minisig +inherit autotools multilib-minimal verify-sig + +DESCRIPTION="Portable fork of NaCl, a higher-level cryptographic library" +HOMEPAGE="https://libsodium.org" + +if [[ ${PV} == *_p* ]] ; then + MY_P=${PN}-$(ver_cut 1-3)-stable-$(ver_cut 5-) + + # We use _pN to represent 'stable releases' + # These are backports from upstream to the last release branch + # See https://download.libsodium.org/libsodium/releases/README.html + SRC_URI=" + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_P}.tar.gz -> ${P}.tar.gz + verify-sig? ( https://dev.gentoo.org/~sam/distfiles/dev-libs/libsodium/${MY_P}.tar.gz.minisig -> ${P}.tar.gz.minisig ) + " +else + SRC_URI=" + https://download.libsodium.org/${PN}/releases/${P}.tar.gz + verify-sig? ( https://download.libsodium.org/${PN}/releases/${P}.tar.gz.minisig ) + " +fi + +S="${WORKDIR}"/${PN}-stable + +LICENSE="ISC" +SLOT="0/23" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos" +IUSE="+asm minimal static-libs +urandom" + +CPU_USE=( cpu_flags_x86_{aes,sse4_1} ) +IUSE+=" ${CPU_USE[@]}" + +BDEPEND=" verify-sig? ( sec-keys/minisig-keys-libsodium )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.0.10-cpuflags.patch +) + +src_prepare() { + default + + eautoreconf +} + +multilib_src_configure() { + local myeconfargs=( + $(use_enable asm) + $(use_enable cpu_flags_x86_aes aesni) + $(use_enable cpu_flags_x86_sse4_1 sse4_1) + $(use_enable minimal) + $(use_enable static-libs static) + $(use_enable !urandom blocking-random) + ) + + # --disable-pie is needed on x86, see bug #512734 + # TODO: Check if still needed? + if [[ ${ABI} == x86 ]] ; then + myeconfargs+=( --disable-pie ) + fi + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_install_all() { + default + find "${ED}" -type f -name "*.la" -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.19-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.19-r1.ebuild new file mode 100644 index 0000000000..79f1225f20 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libsodium/libsodium-1.0.19-r1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libsodium.minisig +VERIFY_SIG_METHOD=minisig +inherit autotools multilib-minimal verify-sig + +DESCRIPTION="Portable fork of NaCl, a higher-level cryptographic library" +HOMEPAGE="https://libsodium.org" + +if [[ ${PV} == *_p* ]] ; then + MY_P=${PN}-$(ver_cut 1-3)-stable-$(ver_cut 5-) + + # We use _pN to represent 'stable releases' + # These are backports from upstream to the last release branch + # See https://download.libsodium.org/libsodium/releases/README.html + SRC_URI=" + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_P}.tar.gz -> ${P}.tar.gz + verify-sig? ( https://dev.gentoo.org/~sam/distfiles/dev-libs/libsodium/${MY_P}.tar.gz.minisig -> ${P}.tar.gz.minisig ) + " +else + SRC_URI=" + https://download.libsodium.org/${PN}/releases/${P}.tar.gz + verify-sig? ( https://download.libsodium.org/${PN}/releases/${P}.tar.gz.minisig ) + " +fi + +S="${WORKDIR}"/${PN}-stable + +LICENSE="ISC" +SLOT="0/26" +KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos" +IUSE="+asm minimal static-libs +urandom" + +CPU_USE=( cpu_flags_x86_{aes,sse4_1} ) +IUSE+=" ${CPU_USE[@]}" + +BDEPEND=" verify-sig? ( sec-keys/minisig-keys-libsodium )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.0.10-cpuflags.patch +) + +src_prepare() { + default + + eautoreconf +} + +multilib_src_configure() { + local myeconfargs=( + $(use_enable asm) + $(use_enable cpu_flags_x86_aes aesni) + $(use_enable cpu_flags_x86_sse4_1 sse4_1) + $(use_enable minimal) + $(use_enable static-libs static) + $(use_enable !urandom blocking-random) + ) + + # --disable-pie is needed on x86, see bug #512734 + # TODO: Check if still needed? + if [[ ${ABI} == x86 ]] ; then + myeconfargs+=( --disable-pie ) + fi + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_install_all() { + default + find "${ED}" -type f -name "*.la" -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/Manifest index dc9a220687..810c567f1d 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/Manifest @@ -1,2 +1,3 @@ -DIST libunistring-0.9.10.tar.gz 3744814 BLAKE2B 3ddc55b8021c0f4822beb83b807bb21dbbf10bbb866747f64e060df3ab822a4143528855e1ce6a13144630bc8daa14f1fa830db77fb605e57cae21d46de804d6 SHA512 690082732fbbd47ab4ffbd6f21d85afece0f8e2ded24982f949f4ae52bf0a981b75ea9bc14ab289e0954cde07f31a7a4c2bb65615a8eb5b2bfa65720310b6fc9 -DIST libunistring-1.0.tar.gz 4214306 BLAKE2B 177f21d9fb6d81ea6bb2fd05f9ca31cd6cecb5a16be273de8817a8fb6ffac997421ebf108acebcb3392b8df423b7e3e150f24a731e0909e2ba171b4bae2fb53d SHA512 6125e3911d15bea8fea5c0b97864f928eab8c8476f1a24c7349b0552e2d11d9b73c1fa0fcb354917e42407d4e5adea55d0c8012121fa0a53c60faa7b0911aef3 +DIST libunistring-0.9.10.tar.xz 2051320 BLAKE2B 25d162d9d510cc35ad4209acceb9b06bcc0553b8ce56e94f8df12c4df64d91abfc4a9e15b50b5c8d5b9672939305a394a7e83f1892258defb7ae5ac2ccf79dfb SHA512 01dcab6e05ea4c33572bf96cc0558bcffbfc0e62fc86410cef06c1597a0073d5750525fe2dee4fdb39c9bd704557fcbab864f9645958108a2e07950bc539fe54 +DIST libunistring-1.0.tar.xz 2367800 BLAKE2B 8208fe33d4ac2f015b0efb56b0c7dd87afc4bb1c6ca4eb3ded86d7e2101d7b7f68bfd8991af4b6dd408282ec73f134ee0b884e761ff6d52e8a1e398326aec420 SHA512 70d5ad82722844dbeacdfcb4d7593358e4a00a9222a98537add4b7f0bf4a2bb503dfb3cd627e52e2a5ca1d3da9e5daf38a6bd521197f92002e11e715fb1662d1 +DIST libunistring-1.1.tar.xz 2397676 BLAKE2B 721adc90884006480055b95d0fa06cd862417aa02b467f1e14688292ad9c11f1e33520b14ed5dc2d2724c6df8713d3af1e8032014259d8355156cb72edfcb983 SHA512 01a4267bbd301ea5c389b17ee918ae5b7d645da8b2c6c6f0f004ff2dead9f8e50cda2c6047358890a5fceadc8820ffc5154879193b9bb8970f3fb1fea1f411d6 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-0.9.10-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-0.9.10-r1.ebuild index d1ebd58075..6a6a1774ca 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-0.9.10-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-0.9.10-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -7,11 +7,11 @@ inherit multilib-minimal libtool DESCRIPTION="Library for manipulating Unicode and C strings according to Unicode standard" HOMEPAGE="https://www.gnu.org/software/libunistring/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" LICENSE="|| ( LGPL-3+ GPL-2+ ) || ( FDL-1.2 GPL-3+ )" SLOT="0/2" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-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="doc static-libs" PATCHES=( diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-1.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-1.0.ebuild index 2f294b42e0..564d1b08ff 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-1.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-1.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -7,11 +7,11 @@ inherit multilib-minimal libtool DESCRIPTION="Library for manipulating Unicode and C strings according to Unicode standard" HOMEPAGE="https://www.gnu.org/software/libunistring/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" LICENSE="|| ( LGPL-3+ GPL-2+ ) || ( FDL-1.2 GPL-3+ )" SLOT="0/2" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-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="doc static-libs" PATCHES=( diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-1.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-1.1-r1.ebuild new file mode 100644 index 0000000000..071630a8c0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/libunistring-1.1-r1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal libtool + +DESCRIPTION="Library for manipulating Unicode and C strings according to Unicode standard" +HOMEPAGE="https://www.gnu.org/software/libunistring/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="|| ( LGPL-3+ GPL-2+ ) || ( FDL-1.2 GPL-3+ )" +# Check regularly even on "minor" bumps +SLOT="0/5" +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="doc static-libs" + +PATCHES=( + "${FILESDIR}"/${PN}-nodocs.patch +) + +src_prepare() { + default + elibtoolize # for Solaris shared libraries +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf $(use_enable static-libs static) +} + +multilib_src_install_all() { + default + + if use doc ; then + docinto html + dodoc doc/*.html + doinfo doc/*.info + fi + + find "${ED}" -name '*.la' -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/metadata.xml index f757bba21c..a4f0312398 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libunistring/metadata.xml @@ -1,6 +1,5 @@ - scheme@gentoo.org @@ -17,4 +16,8 @@ This library provides functions for manipulating Unicode strings and for manipulating C strings according to the Unicode standard. + + cpe:/a:gnu:libunistring + libunistring + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libverto/libverto-0.3.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libverto/libverto-0.3.2.ebuild index d6bf244ff0..4326fa0e32 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libverto/libverto-0.3.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libverto/libverto-0.3.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,7 +11,7 @@ SRC_URI="https://github.com/latchset/libverto/releases/download/${PV}/${P}.tar.g LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" IUSE="glib +libev libevent +threads" REQUIRED_USE="|| ( glib libev libevent )" @@ -45,5 +45,5 @@ multilib_src_configure() { multilib_src_install_all() { default - find "${ED}" -name '*.la' -delete + find "${ED}" -name '*.la' -delete || die } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libverto/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/libverto/metadata.xml index 24304b1cca..8e90132b39 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libverto/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libverto/metadata.xml @@ -1,5 +1,5 @@ - + Many applications and libraries are unable to write asynchronous code because they are unable to pick an event loop. This is particularly true of libraries who want to be useful to many applications who use loops that do not integrate with one another or which use home-grown loops. libverto provides a loop-neutral async api which allows the library to expose asynchronous interfaces and offload the choice of the main loop to the application. diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libyaml/libyaml-0.2.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libyaml/libyaml-0.2.2.ebuild index 98fc658a8d..931407e826 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libyaml/libyaml-0.2.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libyaml/libyaml-0.2.2.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://github.com/yaml/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" IUSE="doc static-libs test" RESTRICT="!test? ( test )" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libyaml/libyaml-0.2.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libyaml/libyaml-0.2.5.ebuild index 98fc658a8d..966371f62b 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libyaml/libyaml-0.2.5.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libyaml/libyaml-0.2.5.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,7 +11,7 @@ SRC_URI="https://github.com/yaml/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-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="doc static-libs test" RESTRICT="!test? ( test )" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libyaml/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/libyaml/metadata.xml index bd6443d4a3..026624f02c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libyaml/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libyaml/metadata.xml @@ -5,4 +5,7 @@ chutzpah@gentoo.org Patrick McLean + + yaml/libyaml + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/lzo/lzo-2.10.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/lzo/lzo-2.10.ebuild index d21765fe4f..8ad80605d2 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/lzo/lzo-2.10.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/lzo/lzo-2.10.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,7 +11,7 @@ SRC_URI="https://www.oberhumer.com/opensource/lzo/download/${P}.tar.gz" LICENSE="GPL-2+" SLOT="2" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-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="examples static-libs" multilib_src_configure() { diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/mpc/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/mpc/Manifest index 9c5ed85f34..0b2e2d8ce9 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/mpc/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/mpc/Manifest @@ -1 +1 @@ -DIST mpc-1.2.1.tar.gz 838731 BLAKE2B 9cd03c6a71839e4cdb3c1f18d718cc4d3097c3f8ec307a5c756bd5df27c68aa013755156b3b156efee1acabfee2269602c6a3a358092ef0d522271c9c56c133d SHA512 3279f813ab37f47fdcc800e4ac5f306417d07f539593ca715876e43e04896e1d5bceccfb288ef2908a3f24b760747d0dbd0392a24b9b341bc3e12082e5c836ee +DIST mpc-1.3.1.tar.gz 773573 BLAKE2B 76434e6f8830af3571836d51576bfebbc9701e9bbb5c4686f134081cd96cd90ae02f7ff42bf9e3957c7a7ba92b6b2d9cdabe18f0269271147521cd7f6a2d551c SHA512 4bab4ef6076f8c5dfdc99d810b51108ced61ea2942ba0c1c932d624360a5473df20d32b300fc76f2ba4aa2a97e1f275c9fd494a1ba9f07c4cb2ad7ceaeb1ae97 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/mpc/mpc-1.2.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/mpc/mpc-1.2.1.ebuild deleted file mode 100644 index f2b23959fc..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/mpc/mpc-1.2.1.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit multilib-minimal - -DESCRIPTION="A library for multiprecision complex arithmetic with exact rounding" -HOMEPAGE="http://mpc.multiprecision.org/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" - -LICENSE="LGPL-2.1" -SLOT="0/3" # libmpc.so.3 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="static-libs" - -DEPEND=">=dev-libs/gmp-5.0.0:0=[${MULTILIB_USEDEP},static-libs?] - >=dev-libs/mpfr-4.1.0:0=[${MULTILIB_USEDEP},static-libs?]" -RDEPEND="${DEPEND}" - -multilib_src_configure() { - ECONF_SOURCE=${S} econf $(use_enable static-libs static) -} - -multilib_src_install_all() { - einstalldocs - find "${D}" -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/mpc/mpc-1.3.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/mpc/mpc-1.3.1.ebuild new file mode 100644 index 0000000000..0b1308164f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/mpc/mpc-1.3.1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal + +DESCRIPTION="A library for multiprecision complex arithmetic with exact rounding" +HOMEPAGE="https://www.multiprecision.org/mpc/ https://gitlab.inria.fr/mpc/mpc" + +if [[ ${PV} == *_rc* ]] ; then + SRC_URI="https://www.multiprecision.org/downloads/${P/_}.tar.gz" + S="${WORKDIR}"/${PN}-$(ver_cut 1-3) +else + SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + + 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="LGPL-3+ FDL-1.3+" +SLOT="0/3" # libmpc.so.3 +IUSE="static-libs" + +DEPEND=" + >=dev-libs/gmp-5.0.0:=[${MULTILIB_USEDEP},static-libs?] + >=dev-libs/mpfr-4.1.0:=[${MULTILIB_USEDEP},static-libs?] +" +RDEPEND="${DEPEND}" + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf $(use_enable static-libs static) +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -name '*.la' -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/Manifest index 77f8d18385..150f6c7e44 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/Manifest @@ -1 +1,16 @@ -DIST mpfr-4.1.0.tar.xz 1525476 BLAKE2B 41d1be0c4b557760f12a4525ad3a84b6e2cd6f0927c935fcfba577ac0490e582d1ae4b581dce58e21e705cf9d7c88373054d7fb7a94bb32c69b339f99a25dc68 SHA512 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273 +DIST mpfr-4.2.0-patch01.patch 2927 BLAKE2B 15f2003b9b423065ea8e7db9191fd56d9832263a87290652b906c0360e1599017659c5650635410825a1ed66eb9ec4c93aefa746dd2505984e07c6ff8b06312c SHA512 a97791ba106cd843e279b913a776f2e1221462978c27ba2e97afa4d3b1763ef87cec991cf337f98897100c5554dd47d7a6342cb51878d351fcc516d951a5cf6b +DIST mpfr-4.2.0-patch02.patch 8009 BLAKE2B 094ece68c41e4945d3713a919b39cd3d9a574efe2a84202fceaa5067e74ace109e342732a2221165e2e911796e386e47d3360688fc07bb57eb2a1ed90a93b4be SHA512 b5c3f885c086fe13f91fdc411dc4cdcbba93a140563932d46a98e1bbf0714d3c98cc97468eb48cff917527b2c69ac756ad30e4bbec9f4a974f257141741cb1c7 +DIST mpfr-4.2.0-patch03.patch 4678 BLAKE2B 356f4c2dc522dc44deab4f92b27590be8bca38e17c98db07348aae8959ae3314fd5dfe8c08dcfa30c31fddb1b90ec55499ce9fb4853e8b7ecc3aab314ac7a251 SHA512 cc646867498279530e1c593e129361d7f56e81736b2c2f7563c18c53c139698fbff88b48ae5c8f6856ac1abb47fe39e0148cecf8a41771c962b005d2a239835f +DIST mpfr-4.2.0-patch04.patch 2622 BLAKE2B 42fe01ce698d335070469518c42f8f3d4bbff9b69cb2a6bd9a3e504d4970be562a504cfc7495b5a2bfcc9fea2a35ccd4fa39db829e63b016f627140349b0ca31 SHA512 73b03be27abacf3b845405aca58b5f77a243f2adf3994e5d8eba74c926132b62d2aa55931c4ed70752aaf45fcfa3676c5c597b723d919306aad40675d5ea51b8 +DIST mpfr-4.2.0-patch05.patch 3144 BLAKE2B c5a7320f5c9bf48a00ada82289f0caf903aa1a9a7848fdeb407b91c1cba11a9d85bb802d3d5d3f313a90710da1519a03dd6d2284127a39fda9632dd956335f60 SHA512 fbbeed7e04bb5459144d424502a0a3b94f50b56dff9b9014e222a3b562549ed1382a513dd16c56c143cd04a5ac7f9d697311d9d52a24991e73f558eefbe2c7e7 +DIST mpfr-4.2.0-patch06.patch 13872 BLAKE2B 29f16d7aedf126ea3456e3108bb7d901dd4a8c1072a576c1b3f9eb90c1b243eaa6b9b3453d950513cb205d0f5f74a8fac2bd5cda2b78f2ecca957f6993f6003a SHA512 2f953661d91b36b1a30689d5a4393e02263d82ba07fe91e44857312719cfc1bd59595589c57700541d75bd23b4c8e9e611ee7049e5fdab634808818eb35c8a22 +DIST mpfr-4.2.0-patch07.patch 11610 BLAKE2B 08f91b611505ae7c96c34668343b026b19af4d5d49ef78706faf2329840fe3f1a3cd22af139e82e11e9fc8628d2ec17a04c46b21f6e4562d2c39ec54437afd38 SHA512 889ea03a885807d168e574c41749f86bad162f3c075b76a9e0d62e7a4f4d10af3173a24f179673aadd1bd57af67b2352bf06dc5f80c8e59cdd1a99e8d170eef0 +DIST mpfr-4.2.0-patch08.patch 24051 BLAKE2B 5b4dcfa695e914606113541318630227819052811ef72d519507c2c3dfee5168801060f22aba42ccdf874ea7bd3994eaceb5a93268ab82051eecb8a8aa12c5af SHA512 d0b0212f12f9b7cf55398bd1d1c4d9bb3b368269d280903f8ce42e00c901c9cf10015835b83ab9655c66029070f554fc0e4b461602675495e2dcedea64bdc185 +DIST mpfr-4.2.0-patch09.patch 3854 BLAKE2B b307d5f140069e7b76cdecd09ce86b8e20cb16ca7789716a614e78f9922f677421b055a36faa3552fc5b38925f56c4eed5f27b25240237f0ef75a5d8db00ebb8 SHA512 f0f54208f1fed94f876d3eff35058c54a0f75bb3928b942aab5debf8e7ca0eced5becd6c6ffbe1c6581bf4fb6ceda7693e8d0b22dd7352a1cfb3ddb2c83a9d57 +DIST mpfr-4.2.0-patch10.patch 1830 BLAKE2B 6baf5c7880747175ad5d109b39f54c239cfc7c08989d41b41eb79cf4f6fe5fc49c417c75953a509443fcccdd8115e6402657f2490abe2b1952abdddb5d3aa7ca SHA512 eba8dc76db260b06dc2c18261ba29b89ab6af0fe08e74bc493af56e540b592b734047a735027821491ec0f2a85d00094e751164bb77603c96c4436593f48126c +DIST mpfr-4.2.0-patch11.patch 2179 BLAKE2B c902fc9f1e29712d415cf859b616b3c038d13ef17f657d4d06859cb4ead8280d69f83fd9eaffc9cacf22c338ee8e45fef0be962933ca2fc9aa78d30668854ffc SHA512 71c8b5243cb598d16816638ceea2147e6d3ac27cb6233b69bcad98f459561e6517248cb0bf22d5e8c4ff74f68e0fd6cb1f7c4cdca00d9dc4df5a6dd79e0692c9 +DIST mpfr-4.2.0-patch12.patch 1809 BLAKE2B 1796b4e539e25e22a22ad9862fd1f641f9d88ee64e7234a9cbc1ef442fc8ba4876b3e6523704c6400ebb2a98f762454f3bf10403913b110011887561cc6d6914 SHA512 81ae9c0a4df9632b5bd3bd60f71a900725dc50773ac0fff6264b18bca2b4560c148fea71806dfe8bd35624aba673effc9dc72fb0448bfd6146bad08e03482445 +DIST mpfr-4.2.0.tar.xz 1477532 BLAKE2B dd88ae3a6a910ad8faeb791b49c3b1085de5d0d4c49c637c124bf4d9bc79fb621d0d1d69e07d0642b9b678f6d355a5830d083dfd189e1e91d0e04c970c10bd64 SHA512 58e843125884ca58837ae5159cd4092af09e8f21931a2efd19c15de057c9d1dc0753ae95c592e2ce59a727fbc491af776db8b00a055320413cdcf2033b90505c +DIST mpfr-4.2.0.tar.xz.asc 228 BLAKE2B b281a11528a69418739b0122b4130d9cf212569f9ded8def685b31afe700ea776dd40ac0de7aa6de1bbd5d03a1dc9726ed4278cc6cccfacd1147681a6de27f70 SHA512 ce64346cce89bc38fee161a5e01c349c97c69b626547e54a522b741949cb27bba1668d123143fd03b015f9bdd692bcba08c7b85cf4d4cea9f7834383e04d4bbc +DIST mpfr-4.2.1.tar.xz 1493608 BLAKE2B ad69f53bc910294647523e7613b18a683f1d0f3dd994168ab2a46b66d0371ffa9b8e7cb59495f898470aea69d343e83fc722f11babe4af7b3a12665a1e65860c SHA512 bc68c0d755d5446403644833ecbb07e37360beca45f474297b5d5c40926df1efc3e2067eecffdf253f946288bcca39ca89b0613f545d46a9e767d1d4cf358475 +DIST mpfr-4.2.1.tar.xz.asc 228 BLAKE2B a50ccf4136c3b460b15540364a49dec05da266a77bce6220832262581fa57cc1e70b7739ea4fdf2e8ad4fd3318151b8c420b09597942493d95e6276f380debfd SHA512 2f409f2a93726fba086882de3ad26d0bcb5d78afc687e44550bf55a98b940ff0d355a655aa18da78bfa2581ef37d72cb630d7642de7ec70590ec80044b3dbe38 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/metadata.xml index 5a1e1dee65..27009fac67 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/metadata.xml @@ -1,8 +1,11 @@ - - toolchain@gentoo.org - Gentoo Toolchain Project - + + toolchain@gentoo.org + Gentoo Toolchain Project + + + cpe:/a:mpfr:gnu_mpfr + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/mpfr-4.1.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/mpfr-4.1.0-r1.ebuild deleted file mode 100644 index 986919466d..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/mpfr-4.1.0-r1.ebuild +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit multilib-minimal - -DESCRIPTION="Library for multiple-precision floating-point computations with exact rounding" -HOMEPAGE="https://www.mpfr.org/" -SRC_URI="https://www.mpfr.org/mpfr-${PV}/${P}.tar.xz" - -LICENSE="LGPL-2.1" -SLOT="0/6" # libmpfr.so version -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="static-libs" - -RDEPEND=">=dev-libs/gmp-5.0.0:=[${MULTILIB_USEDEP},static-libs?]" -DEPEND="${RDEPEND}" - -HTML_DOCS=( doc/FAQ.html ) - -multilib_src_configure() { - # Make sure mpfr doesn't go probing toolchains it shouldn't #476336#19 - ECONF_SOURCE=${S} \ - user_redefine_cc=yes \ - econf $(use_enable static-libs static) -} - -multilib_src_install_all() { - rm "${ED}"/usr/share/doc/"${P}"/COPYING* - use static-libs || find "${ED}"/usr -name '*.la' -delete -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/mpfr-4.2.0_p12.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/mpfr-4.2.0_p12.ebuild new file mode 100644 index 0000000000..33153eb470 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/mpfr-4.2.0_p12.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/vincentlefevre.asc +inherit multilib-minimal verify-sig + +# Upstream distribute patches before a new release is made +# See https://www.mpfr.org/mpfr-current/#bugs for the latest version (and patches) + +# Check whether any patches touch e.g. manuals! +# https://archives.gentoo.org/gentoo-releng-autobuilds/message/c2dd39fc4ebc849db6bb0f551739e2ed +MY_PV=${PV%%_p*} +MY_PATCH=$(ver_cut 5-) +MY_PATCHES=() +MY_P=${PN}-${MY_PV/_/-} + +DESCRIPTION="Library for multiple-precision floating-point computations with exact rounding" +HOMEPAGE="https://www.mpfr.org/ https://gitlab.inria.fr/mpfr" +SRC_URI="https://www.mpfr.org/${PN}-$(ver_cut 1-3)/${MY_P}.tar.xz" +SRC_URI+=" verify-sig? ( https://www.mpfr.org/${PN}-$(ver_cut 1-3)/${MY_P}.tar.xz.asc )" + +if [[ ${PV} == *_p* ]] ; then + # If this is a patch release, we have to download each of the patches: + # -_pN = N patches + # - patch file names are like: patch01, patch02, ..., patch10, patch12, .. + # + # => name the ebuild _pN where N is the number of patches on the 'bugs' page. + patch_url_base="https://www.mpfr.org/${MY_P}" + my_patch_index= + + for ((my_patch_index=1; my_patch_index <= MY_PATCH ; my_patch_index++)) ; do + printf -v mangled_patch_ver "patch%02d" "${my_patch_index}" + + SRC_URI+=" ${patch_url_base}/${mangled_patch_ver} -> ${MY_P}-${mangled_patch_ver}.patch" + + MY_PATCHES+=( "${DISTDIR}"/${MY_P}-${mangled_patch_ver}.patch ) + done + + unset patch_url_base my_patch_index mangled_patch_ver +fi + +S="${WORKDIR}/${MY_P}" + +LICENSE="LGPL-3+" +# This is a critical package; if SONAME changes, bump subslot but also add +# preserve-libs.eclass usage to pkg_*inst! See e.g. the readline ebuild. +SLOT="0/6" # libmpfr.so version +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 +IUSE="static-libs" + +RDEPEND=">=dev-libs/gmp-5.0.0:=[${MULTILIB_USEDEP},static-libs?]" +DEPEND="${RDEPEND}" +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-vincentlefevre )" + +PATCHES=( + # Apply the upstream patches released out-of-band; generated above + "${MY_PATCHES[@]}" + + # Additional patches +) + +HTML_DOCS=( doc/FAQ.html ) + +src_unpack() { + use verify-sig && verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + + # Avoid src_unpack noise from patches + unpack ${MY_P}.tar.xz +} + +src_prepare() { + default + + # 4.1.0_p13's patch10 patches a .texi file *and* the corresponding + # info file. We need to make sure the info file is newer, so the + # build doesn't try to run makeinfo. Won't be needed on next release. + #touch "${S}/doc/mpfr.info" || die +} + +multilib_src_configure() { + # bug #476336#19 + # Make sure mpfr doesn't go probing toolchains it shouldn't + ECONF_SOURCE="${S}" \ + user_redefine_cc=yes \ + econf $(use_enable static-libs static) +} + +multilib_src_install_all() { + rm "${ED}"/usr/share/doc/${PF}/COPYING* || die + + if ! use static-libs ; then + find "${ED}"/usr -name '*.la' -delete || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/mpfr-4.2.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/mpfr-4.2.1.ebuild new file mode 100644 index 0000000000..655c0a0f50 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/mpfr/mpfr-4.2.1.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/vincentlefevre.asc +inherit multilib-minimal verify-sig + +# Upstream distribute patches before a new release is made +# See https://www.mpfr.org/mpfr-current/#bugs for the latest version (and patches) + +# Check whether any patches touch e.g. manuals! +# https://archives.gentoo.org/gentoo-releng-autobuilds/message/c2dd39fc4ebc849db6bb0f551739e2ed +MY_PV=${PV%%_p*} +MY_PATCH=$(ver_cut 5-) +MY_PATCHES=() +MY_P=${PN}-${MY_PV/_/-} + +DESCRIPTION="Library for multiple-precision floating-point computations with exact rounding" +HOMEPAGE="https://www.mpfr.org/ https://gitlab.inria.fr/mpfr" +SRC_URI="https://www.mpfr.org/${PN}-$(ver_cut 1-3)/${MY_P}.tar.xz" +SRC_URI+=" verify-sig? ( https://www.mpfr.org/${PN}-$(ver_cut 1-3)/${MY_P}.tar.xz.asc )" + +if [[ ${PV} == *_p* ]] ; then + # If this is a patch release, we have to download each of the patches: + # -_pN = N patches + # - patch file names are like: patch01, patch02, ..., patch10, patch12, .. + # + # => name the ebuild _pN where N is the number of patches on the 'bugs' page. + patch_url_base="https://www.mpfr.org/${MY_P}" + my_patch_index= + + for ((my_patch_index=1; my_patch_index <= MY_PATCH ; my_patch_index++)) ; do + printf -v mangled_patch_ver "patch%02d" "${my_patch_index}" + + SRC_URI+=" ${patch_url_base}/${mangled_patch_ver} -> ${MY_P}-${mangled_patch_ver}.patch" + + MY_PATCHES+=( "${DISTDIR}"/${MY_P}-${mangled_patch_ver}.patch ) + done + + unset patch_url_base my_patch_index mangled_patch_ver +fi + +S="${WORKDIR}/${MY_P}" + +LICENSE="LGPL-3+" +# This is a critical package; if SONAME changes, bump subslot but also add +# preserve-libs.eclass usage to pkg_*inst! See e.g. the readline ebuild. +SLOT="0/6" # libmpfr.so version +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 +IUSE="static-libs" + +RDEPEND=">=dev-libs/gmp-5.0.0:=[${MULTILIB_USEDEP},static-libs?]" +DEPEND="${RDEPEND}" +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-vincentlefevre )" + +PATCHES=( + # Apply the upstream patches released out-of-band; generated above + "${MY_PATCHES[@]}" + + # Additional patches +) + +HTML_DOCS=( doc/FAQ.html ) + +src_unpack() { + use verify-sig && verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + + # Avoid src_unpack noise from patches + unpack ${MY_P}.tar.xz +} + +src_prepare() { + default + + # 4.1.0_p13's patch10 patches a .texi file *and* the corresponding + # info file. We need to make sure the info file is newer, so the + # build doesn't try to run makeinfo. Won't be needed on next release. + #touch "${S}/doc/mpfr.info" || die +} + +multilib_src_configure() { + # bug #476336#19 + # Make sure mpfr doesn't go probing toolchains it shouldn't + ECONF_SOURCE="${S}" \ + user_redefine_cc=yes \ + econf $(use_enable static-libs static) +} + +multilib_src_install_all() { + rm "${ED}"/usr/share/doc/${PF}/COPYING* || die + + if ! use static-libs ; then + find "${ED}"/usr -name '*.la' -delete || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/npth/npth-1.6-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/npth/npth-1.6-r1.ebuild index 0036887417..6e83a94655 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/npth/npth-1.6-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/npth/npth-1.6-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit autotools +inherit autotools flag-o-matic toolchain-funcs DESCRIPTION="New GNU Portable Threads Library" HOMEPAGE="https://git.gnupg.org/cgi-bin/gitweb.cgi?p=npth.git" @@ -11,7 +11,9 @@ SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" LICENSE="LGPL-2.1+" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-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="test" +RESTRICT="!test? ( test )" src_prepare() { default @@ -19,7 +21,16 @@ src_prepare() { } src_configure() { - econf --disable-static + # 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 + + econf \ + --disable-static \ + $(use_enable test tests) } src_install() { diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/nspr/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/nspr/Manifest index 658056250b..3c544ab050 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/nspr/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/nspr/Manifest @@ -1 +1 @@ -DIST nspr-4.33.tar.gz 1078948 BLAKE2B b46e1c02ab7e5c442288a2cba2868166adb9461950d35fcd76074e3340734057f2b1bbeb3c700f38edf3710323ffd34576dd644814c379033de2a380c54d4fe3 SHA512 8064f826c977f1302a341ca7a7aaf7977b5d10102062c030b1d42b856638e3408ab262447e8c7cfd5a98879b9b1043d17ceae66fbb1e5ed86d6bc3531f26667e +DIST nspr-4.35.tar.gz 1096974 BLAKE2B c80402d7be9e69ab6d1e768a18d271a8d28900f4cae7df2709d1ab26e100d908f508762bb771d4042aa7152934ce83d495e2102e894c56574187be8040d65629 SHA512 502815833116e25f79ddf71d1526484908aa92fbc55f8a892729cb404a4daafcc0470a89854cd080d2d20299fdb7d9662507c5362c7ae661cbacf308ac56ef7f diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/nspr/files/nspr-4.21-ipv6-musl-support.patch b/sdk_container/src/third_party/portage-stable/dev-libs/nspr/files/nspr-4.21-ipv6-musl-support.patch index 2c8ebd4ccb..72393ca5f4 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/nspr/files/nspr-4.21-ipv6-musl-support.patch +++ b/sdk_container/src/third_party/portage-stable/dev-libs/nspr/files/nspr-4.21-ipv6-musl-support.patch @@ -1,19 +1,11 @@ -From 8c57451f44d7ceb37bfb4ae6e457fc70b1f58d0a Mon Sep 17 00:00:00 2001 -From: Moritz Kick -Date: Wed, 20 Mar 2019 13:36:06 -0500 +From 2e6a43c751707b6983760669988ba4d2826ffd5b Mon Sep 17 00:00:00 2001 +From: Violet Purcell +Date: Sat, 10 Jun 2023 04:37:55 +0000 Subject: [PATCH] Added IPv6 compatibility for musl libc -Signed-off-by: Moritz Kick -Signed-off-by: Jory Pratt ---- - pr/include/md/_linux.h | 13 +------------ - 1 file changed, 1 insertion(+), 12 deletions(-) - -diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h -index 2370ab8..612184c 100644 --- a/pr/include/md/_linux.h +++ b/pr/include/md/_linux.h -@@ -289,33 +289,22 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv) +@@ -315,33 +315,19 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv) #endif /* __arm__ */ #define USE_SETJMP @@ -22,17 +14,17 @@ index 2370ab8..612184c 100644 -#endif #undef _PR_USE_POLL #define _PR_STAT_HAS_ONLY_ST_ATIME - #if defined(__alpha) || defined(__ia64__) +-#if defined(__alpha) || defined(__ia64__) #define _PR_HAVE_LARGE_OFF_T -#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \ - || defined(ANDROID) -#define _PR_HAVE_OFF64_T - #else +-#else -#define _PR_NO_LARGE_FILES -+#define _PR_HAVE_OFF64_T - #endif +-#endif -#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \ - || defined(ANDROID) ++#define _FILE_OFFSET_BITS 64 #define _PR_INET6 #define _PR_HAVE_INET_NTOP #define _PR_HAVE_GETHOSTBYNAME2 @@ -49,5 +41,5 @@ index 2370ab8..612184c 100644 #define _PR_HAVE_GETHOST_R_INT #endif -- -2.21.0 +2.41.0 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/nspr/files/nspr-4.35-bgo-905998-lfs64-musl.patch b/sdk_container/src/third_party/portage-stable/dev-libs/nspr/files/nspr-4.35-bgo-905998-lfs64-musl.patch new file mode 100644 index 0000000000..1ec17cd301 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/nspr/files/nspr-4.35-bgo-905998-lfs64-musl.patch @@ -0,0 +1,15 @@ +needed since https://github.com/bminor/musl/commit/25e6fee27f4a293728dd15b659170e7b9c7db9bc +-- +diff --git a/pr/include/md/_unixos.h b/pr/include/md/_unixos.h +index 7d444cd..0099d2c 100644 +--- a/pr/include/md/_unixos.h ++++ b/pr/include/md/_unixos.h +@@ -589,7 +589,7 @@ typedef off64_t _MDOff64_t; + + #elif defined(_PR_HAVE_OFF64_T) + typedef struct stat64 _MDStat64; +-typedef off64_t _MDOff64_t; ++typedef off_t _MDOff64_t; + #elif defined(_PR_HAVE_LARGE_OFF_T) + typedef struct stat _MDStat64; + typedef off_t _MDOff64_t; diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/nspr/nspr-4.33.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/nspr/nspr-4.35-r2.ebuild similarity index 67% rename from sdk_container/src/third_party/portage-stable/dev-libs/nspr/nspr-4.33.ebuild rename to sdk_container/src/third_party/portage-stable/dev-libs/nspr/nspr-4.35-r2.ebuild index 7be0ae41e4..efca76733c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/nspr/nspr-4.33.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/nspr/nspr-4.35-r2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit autotools toolchain-funcs multilib-minimal +inherit autotools flag-o-matic toolchain-funcs multilib-minimal MIN_PV="$(ver_cut 2)" @@ -13,7 +13,7 @@ SRC_URI="https://archive.mozilla.org/pub/nspr/releases/v${PV}/src/${P}.tar.gz" LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" IUSE="debug" MULTILIB_CHOST_TOOLS=( @@ -21,21 +21,26 @@ MULTILIB_CHOST_TOOLS=( ) PATCHES=( + "${FILESDIR}"/${PN}-4.10.6-solaris.patch "${FILESDIR}"/${PN}-4.23-prtime.patch "${FILESDIR}"/${PN}-4.7.1-solaris.patch - "${FILESDIR}"/${PN}-4.10.6-solaris.patch "${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch "${FILESDIR}"/${PN}-4.8.9-link-flags.patch # We do not need to pass -L$libdir via nspr-config --libs "${FILESDIR}"/${PN}-4.9.5_nspr_config.patch ) +QA_CONFIGURE_OPTIONS="--disable-static" + src_prepare() { cd "${S}"/nspr || die default - use elibc_musl && eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch + if use elibc_musl; then + eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch + eapply "${FILESDIR}"/nspr-4.35-bgo-905998-lfs64-musl.patch + fi # rename configure.in to configure.ac for new autotools compatibility if [[ -e "${S}"/nspr/configure.in ]] ; then @@ -57,6 +62,9 @@ src_prepare() { } multilib_src_configure() { + # The build system overrides user optimization level based on a configure flag. #886987 + local my_optlvl=$(get-flag '-O*') + # We use the standard BUILD_xxx but nspr uses HOST_xxx tc-export_build_env BUILD_CC export HOST_CC=${BUILD_CC} HOST_CFLAGS=${BUILD_CFLAGS} HOST_LDFLAGS=${BUILD_LDFLAGS} @@ -65,11 +73,15 @@ multilib_src_configure() { && export CROSS_COMPILE=1 \ || unset CROSS_COMPILE - local myconf=( - --libdir="${EPREFIX}/usr/$(get_libdir)" - $(use_enable debug) - $(use_enable !debug optimize) - ) + local myconf=( --libdir="${EPREFIX}/usr/$(get_libdir)" ) + + # Optimization is disabled when debug is enabled. + if use debug; then + myconf+=( --enable-debug ) + else + myconf+=( --disable-debug ) + myconf+=( --enable-optimize="${my_optlvl}" ) + fi # The configure has some fancy --enable-{{n,x}32,64bit} switches # that trigger some code conditional to platform & arch. This really @@ -102,6 +114,37 @@ multilib_src_configure() { econf "${myconf[@]}" } +multilib_src_test() { + # https://firefox-source-docs.mozilla.org/nspr/running_nspr_tests.html + cd "${BUILD_DIR}/pr/tests" || die + einfo "Building tests" + emake + + einfo "Running test suite" + ../../../${P}/${PN}/pr/tests/runtests.pl | tee "${T}"/${ABI}-tests.log + + # Needed to check if runtests.pl itself or the tee (somehow) failed + # (can't use die with pipes to check each component) + [[ ${PIPESTATUS[@]} == "0 0" ]] || die "Tests failed to run!" + + local known_failures=( + # network-sandbox related? + cltsrv + # network-sandbox related? + gethost + ) + + local known_failure + for known_failure in "${known_failures[@]}" ; do + sed -i -e "/${known_failure}.*FAILED/d" "${T}"/${ABI}-tests.log || die + done + + # But to actually check the test results, we examine the log. + if grep -q "FAILED" "${T}"/${ABI}-tests.log ; then + die "Test failure for ${ABI}!" + fi +} + multilib_src_install() { # Their build system is royally confusing, as usual MINOR_VERSION=${MIN_PV} # Used for .so version diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/Manifest b/sdk_container/src/third_party/portage-stable/net-misc/ntp/Manifest similarity index 66% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/Manifest rename to sdk_container/src/third_party/portage-stable/net-misc/ntp/Manifest index c61825354c..8fb940e466 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/Manifest +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/Manifest @@ -1,2 +1,3 @@ DIST ntp-4.2.8p15-manpages.tar.xz 25700 BLAKE2B 6a225bc19dcebee31cb8e0d621963863d567a882655b57be8b65a16f9d3dd138787c7c6b9ff08853306f2e9b11d65cb76e3215cc5b2262a91c411d437974fc18 SHA512 21721550864b4e7e91bf20ca894109253439b737799dfc803e1496b3454199f34646f40e0156c08a39d5914e5a92f35908cec0245e1e2627c75c0e64939ba028 DIST ntp-4.2.8p15.tar.gz 7015970 BLAKE2B 5697d6623d79686f9ca9ad907172bf942383067d1e9817117d20db042e9f7410644f236f1a0d77ab6bf6ec468476e12ea65b494a28f0dd8674bf08fc8875cfef SHA512 f5ad765e45fc302263dd40e94c287698fd235b94f3684e49f1d5d09d7d8bdd6b8c0fb96ecdabffea3d233e1e79b3c9687b76dc204ba76bad3f554682f4a97794 +DIST ntp-4.2.8p17.tar.gz 7120469 BLAKE2B 5c0e90a234cdeab76e7443b42dfd5a0c3c78693a11bdb0fa21c8def91adbdf9b9871498df9d211509632812a9107501da3470104122e9621577541ffd6cd1ab6 SHA512 e003bfe6f46065890663bc6791b02277f64318b692e49d8d678b76c23b245f357834eb483b0a44f1f47783166e5504686b36494af77f6eebe6f844cd3f2b6a8c diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/man-pages/genmans.sh b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/man-pages/genmans.sh similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/man-pages/genmans.sh rename to sdk_container/src/third_party/portage-stable/net-misc/ntp/files/man-pages/genmans.sh diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/man-pages/ntp.conf.5.patch b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/man-pages/ntp.conf.5.patch similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/man-pages/ntp.conf.5.patch rename to sdk_container/src/third_party/portage-stable/net-misc/ntp/files/man-pages/ntp.conf.5.patch diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/man-pages/ntp.xsl b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/man-pages/ntp.xsl similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/man-pages/ntp.xsl rename to sdk_container/src/third_party/portage-stable/net-misc/ntp/files/man-pages/ntp.xsl diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch rename to sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-sntp-test-pthreads.patch b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8-sntp-test-pthreads.patch similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-sntp-test-pthreads.patch rename to sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8-sntp-test-pthreads.patch diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8_p14-add_cap_ipc_lock.patch b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8_p14-add_cap_ipc_lock.patch similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8_p14-add_cap_ipc_lock.patch rename to sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8_p14-add_cap_ipc_lock.patch diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8_p15-configure-clang16.patch b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8_p15-configure-clang16.patch new file mode 100644 index 0000000000..4b52248bde --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8_p15-configure-clang16.patch @@ -0,0 +1,610 @@ +Sync with OpenLDAP. Uses Arsen's patch from https://bugs.gentoo.org/871288. + +https://bugs.gentoo.org/871372 +--- a/sntp/m4/openldap-thread-check.m4 ++++ b/sntp/m4/openldap-thread-check.m4 +@@ -262,10 +262,8 @@ pthread_rwlock_t rwlock; + dnl save the flags + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include +-#ifndef NULL +-#define NULL (void*)0 +-#endif +-]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no]) ++pthread_t thread; ++]], [[pthread_detach(thread);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no]) + ]) + + if test $ol_cv_func_pthread_detach = no ; then +--- a/sntp/m4/openldap.m4 ++++ b/sntp/m4/openldap.m4 +@@ -1,16 +1,16 @@ + dnl OpenLDAP Autoconf Macros +-dnl $OpenLDAP: pkg/ldap/build/openldap.m4,v 1.157.2.10 2010/04/13 20:22:21 kurt Exp $ ++dnl $OpenLDAP$ + dnl This work is part of OpenLDAP Software . + dnl +-dnl Copyright 1998-2010 The OpenLDAP Foundation. ++dnl Copyright 1998-2022 The OpenLDAP Foundation. + dnl All rights reserved. + dnl + dnl Redistribution and use in source and binary forms, with or without + dnl modification, are permitted only as authorized by the OpenLDAP + dnl Public License. + dnl +-dnl A copy of this license is available in the file LICENSE-OPENLDAP in +-dnl this directory of the distribution or, alternatively, at ++dnl A copy of this license is available in the file LICENSE in the ++dnl top-level directory of the distribution or, alternatively, at + dnl . + dnl + dnl -------------------------------------------------------------------- +@@ -154,6 +154,7 @@ fi + if test $ol_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include ++#include + #ifndef HAVE_EBCDIC + # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') + # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +@@ -170,7 +171,7 @@ exit (0); } + ]])],[],[ol_cv_header_stdc=no],[:]) + fi]) + if test $ol_cv_header_stdc = yes; then +- AC_DEFINE([STDC_HEADERS], [1], [is standard C provided?]) ++ AC_DEFINE(STDC_HEADERS) + fi + ac_cv_header_stdc=disable + ]) +@@ -242,313 +243,40 @@ AC_DEFUN([OL_RESOLVER_LINK], + OL_RESOLVER_TRY(ol_cv_resolver_none) + OL_RESOLVER_TRY(ol_cv_resolver_resolv,[-lresolv]) + OL_RESOLVER_TRY(ol_cv_resolver_bind,[-lbind]) +-]) +-dnl +-dnl ==================================================================== +-dnl International Components for Unicode (ICU) +-AC_DEFUN([OL_ICU], +-[ol_icu=no +-AC_CHECK_HEADERS( unicode/utypes.h ) +-if test $ac_cv_header_unicode_utypes_h = yes ; then +- dnl OL_ICULIBS="-licui18n -licuuc -licudata" +- OL_ICULIBS="-licuuc -licudata" +- +- AC_CACHE_CHECK([for ICU libraries], [ol_cv_lib_icu], [ +- ol_LIBS="$LIBS" +- LIBS="$OL_ICULIBS $LIBS" +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +-#include +-]], [[ +-(void) u_errorName(0); +-]])],[ol_cv_lib_icu=yes],[ol_cv_lib_icu=no]) +- LIBS="$ol_LIBS" +-]) +- +- if test $ol_cv_lib_icu != no ; then +- ol_icu="$OL_ICULIBS" +- AC_DEFINE([HAVE_ICU], [1], [define if you actually have ICU]) +- fi +-fi +-]) +-dnl +-dnl ==================================================================== +-dnl Berkeley DB macros +-dnl +-dnl -------------------------------------------------------------------- +-dnl Try to link +-AC_DEFUN([OL_BERKELEY_DB_TRY], +-[if test $ol_cv_lib_db = no ; then +- AC_CACHE_CHECK([for Berkeley DB link (]ifelse($2,,default,$2)[)],[$1], +-[ +- ol_DB_LIB=ifelse($2,,,$2) +- ol_LIBS=$LIBS +- LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS" +- +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +-#ifdef HAVE_DB_185_H +-# include +-#else +-# include +-#endif +- +-#ifndef DB_VERSION_MAJOR +-# define DB_VERSION_MAJOR 1 +-#endif +- +-#ifndef NULL +-#define NULL ((void*)0) +-#endif +-]], [[ +-#if DB_VERSION_MAJOR > 2 +- db_env_create( NULL, 0 ); +-#elif DB_VERSION_MAJOR > 1 +- db_appexit( NULL ); +-#else +- (void) dbopen( NULL, 0, 0, 0, NULL); +-#endif +-]])],[$1=yes],[$1=no]) +- +- LIBS="$ol_LIBS" +-]) +- +- if test $$1 = yes ; then +- ol_cv_lib_db=ifelse($2,,yes,$2) +- fi +-fi +-]) +-dnl +-dnl -------------------------------------------------------------------- +-dnl Get major and minor version from +-AC_DEFUN([OL_BDB_HEADER_VERSION], +-[AC_CACHE_CHECK([for Berkeley DB major version in db.h], [ol_cv_bdb_major],[ +- AC_LANG_CONFTEST([ +-#include +-#ifndef DB_VERSION_MAJOR +-# define DB_VERSION_MAJOR 1 +-#endif +-__db_version DB_VERSION_MAJOR +-]) +- set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none +- ol_cv_bdb_major=${3} +-]) +-case $ol_cv_bdb_major in [[1-9]]*) : ;; *) +- AC_MSG_ERROR([Unknown Berkeley DB major version in db.h]) ;; +-esac +- +-dnl Determine minor version +-AC_CACHE_CHECK([for Berkeley DB minor version in db.h], [ol_cv_bdb_minor],[ +- AC_LANG_CONFTEST([ +-#include +-#ifndef DB_VERSION_MINOR +-# define DB_VERSION_MINOR 0 +-#endif +-__db_version DB_VERSION_MINOR +-]) +- set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none +- ol_cv_bdb_minor=${3} +-]) +-case $ol_cv_bdb_minor in [[0-9]]*) : ;; *) +- AC_MSG_ERROR([Unknown Berkeley DB minor version in db.h]) ;; +-esac +-]) +-dnl +-dnl -------------------------------------------------------------------- +-dnl Try to locate appropriate library +-AC_DEFUN([OL_BERKELEY_DB_LINK], +-[ol_cv_lib_db=no +- +-if test $ol_cv_bdb_major = 4 ; then +- OL_BERKELEY_DB_TRY(ol_cv_db_db_4_dot_m,[-ldb-4.$ol_cv_bdb_minor]) +- OL_BERKELEY_DB_TRY(ol_cv_db_db4m,[-ldb4$ol_cv_bdb_minor]) +- OL_BERKELEY_DB_TRY(ol_cv_db_db_4m,[-ldb-4$ol_cv_bdb_minor]) +- OL_BERKELEY_DB_TRY(ol_cv_db_db_4_m,[-ldb-4-$ol_cv_bdb_minor]) +- OL_BERKELEY_DB_TRY(ol_cv_db_db_4,[-ldb-4]) +- OL_BERKELEY_DB_TRY(ol_cv_db_db4,[-ldb4]) +- OL_BERKELEY_DB_TRY(ol_cv_db_db,[-ldb]) +-fi +-OL_BERKELEY_DB_TRY(ol_cv_db_none) +-]) +-dnl +-dnl -------------------------------------------------------------------- +-dnl Check if Berkeley DB version +-AC_DEFUN([OL_BERKELEY_DB_VERSION], +-[AC_CACHE_CHECK([for Berkeley DB library and header version match], [ol_cv_berkeley_db_version], [ +- ol_LIBS="$LIBS" +- LIBS="$LTHREAD_LIBS $LIBS" +- if test $ol_cv_lib_db != yes ; then +- LIBS="$ol_cv_lib_db $LIBS" +- fi +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([[ +-#ifdef HAVE_DB_185_H +- choke me; +-#else +-#include +-#endif +-#ifndef DB_VERSION_MAJOR +-# define DB_VERSION_MAJOR 1 +-#endif +-#ifndef NULL +-#define NULL ((void *)0) +-#endif +-main() +-{ +-#if DB_VERSION_MAJOR > 1 +- char *version; +- int major, minor, patch; +- +- version = db_version( &major, &minor, &patch ); +- +- if( major != DB_VERSION_MAJOR || +- minor != DB_VERSION_MINOR || +- patch != DB_VERSION_PATCH ) +- { +- printf("Berkeley DB version mismatch\n" +- "\theader: %s\n\tlibrary: %s\n", +- DB_VERSION_STRING, version); +- return 1; +- } +-#endif +- +- return 0; +-}]])],[ol_cv_berkeley_db_version=yes],[ol_cv_berkeley_db_version=no],[ol_cv_berkeley_db_version=cross]) +- +- LIBS="$ol_LIBS" + ]) + +- if test $ol_cv_berkeley_db_version = no ; then +- AC_MSG_ERROR([Berkeley DB version mismatch]) +- fi +-])dnl +-dnl + dnl -------------------------------------------------------------------- +-dnl Check if Berkeley DB supports DB_THREAD +-AC_DEFUN([OL_BERKELEY_DB_THREAD], +-[AC_CACHE_CHECK([for Berkeley DB thread support], [ol_cv_berkeley_db_thread], [ +- ol_LIBS="$LIBS" +- LIBS="$LTHREAD_LIBS $LIBS" +- if test $ol_cv_lib_db != yes ; then +- LIBS="$ol_cv_lib_db $LIBS" +- fi +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([[ +-#ifdef HAVE_DB_185_H +- choke me; +-#else +-#include +-#endif +-#ifndef NULL +-#define NULL ((void *)0) +-#endif +-main() +-{ +- int rc; +- u_int32_t flags = DB_CREATE | +-#ifdef DB_PRIVATE +- DB_PRIVATE | +-#endif +- DB_THREAD; +- +-#if DB_VERSION_MAJOR > 2 +- DB_ENV *env = NULL; +- +- rc = db_env_create( &env, 0 ); ++dnl Check for version compatility with back-mdb ++AC_DEFUN([OL_MDB_COMPAT], ++[AC_CACHE_CHECK([if LMDB version supported by MDB backends], [ol_cv_mdb_compat],[ ++ AC_EGREP_CPP(__mdb_version_compat,[ ++#include + +- flags |= DB_INIT_MPOOL; +-#ifdef DB_MPOOL_PRIVATE +- flags |= DB_MPOOL_PRIVATE; ++/* require 0.9.18 or later */ ++#if MDB_VERSION_FULL >= 0x000000090012 ++ __mdb_version_compat + #endif +- +- if( rc ) { +- printf("BerkeleyDB: %s\n", db_strerror(rc) ); +- return rc; +- } +- +-#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) +- rc = (env->open)( env, NULL, flags, 0 ); +-#else +- rc = (env->open)( env, NULL, NULL, flags, 0 ); +-#endif +- +- if ( rc == 0 ) { +- rc = env->close( env, 0 ); +- } +- +- if( rc ) { +- printf("BerkeleyDB: %s\n", db_strerror(rc) ); +- return rc; +- } +- +-#else +- DB_ENV env; +- memset( &env, '\0', sizeof(env) ); +- +- rc = db_appinit( NULL, NULL, &env, flags ); +- +- if( rc == 0 ) { +- db_appexit( &env ); +- } +- +- unlink("__db_mpool.share"); +- unlink("__db_lock.share"); +-#endif +- +- return rc; +-}]])],[ol_cv_berkeley_db_thread=yes],[ol_cv_berkeley_db_thread=no],[ol_cv_berkeley_db_thread=cross]) +- +- LIBS="$ol_LIBS" ++ ], [ol_cv_mdb_compat=yes], [ol_cv_mdb_compat=no])]) + ]) + +- if test $ol_cv_berkeley_db_thread != no ; then +- AC_DEFINE([HAVE_BERKELEY_DB_THREAD], [1], +- [define if Berkeley DB has DB_THREAD support]) +- fi +-])dnl + dnl + dnl -------------------------------------------------------------------- +-dnl Find any DB +-AC_DEFUN([OL_BERKELEY_DB], +-[ol_cv_berkeley_db=no +-AC_CHECK_HEADERS(db.h) +-if test $ac_cv_header_db_h = yes; then +- OL_BDB_HEADER_VERSION +- OL_BDB_COMPAT +- +- if test $ol_cv_bdb_compat != yes ; then +- AC_MSG_ERROR([BerkeleyDB version incompatible with BDB/HDB backends]) ++dnl Find any MDB ++AC_DEFUN([OL_MDB], ++[ol_cv_mdb=no ++AC_CHECK_HEADERS(lmdb.h) ++if test $ac_cv_header_lmdb_h = yes; then ++ OL_MDB_COMPAT ++ ++ if test $ol_cv_mdb_compat != yes ; then ++ AC_MSG_ERROR([LMDB version incompatible with MDB backends]) + fi + +- OL_BERKELEY_DB_LINK +- if test "$ol_cv_lib_db" != no ; then +- ol_cv_berkeley_db=yes +- OL_BERKELEY_DB_VERSION +- OL_BERKELEY_DB_THREAD +- fi ++ ol_cv_lib_mdb=-llmdb ++ ol_cv_mdb=yes + fi + ]) +-dnl -------------------------------------------------------------------- +-dnl Check for version compatility with back-bdb +-AC_DEFUN([OL_BDB_COMPAT], +-[AC_CACHE_CHECK([if Berkeley DB version supported by BDB/HDB backends], [ol_cv_bdb_compat],[ +- AC_EGREP_CPP(__db_version_compat,[ +-#include +- +- /* this check could be improved */ +-#ifndef DB_VERSION_MAJOR +-# define DB_VERSION_MAJOR 1 +-#endif +-#ifndef DB_VERSION_MINOR +-# define DB_VERSION_MINOR 0 +-#endif +- +-#define DB_VERSION_MM ((DB_VERSION_MAJOR<<8)|DB_VERSION_MINOR) + +-/* require 4.4 or later */ +-#if DB_VERSION_MM >= 0x0404 +- __db_version_compat +-#endif +- ], [ol_cv_bdb_compat=yes], [ol_cv_bdb_compat=no])]) +-]) + + dnl + dnl ==================================================================== +@@ -664,12 +392,10 @@ AC_DEFUN([OL_PTHREAD_TEST_FUNCTION],[[ + return 0; + ]]) + +-AC_DEFUN([OL_PTHREAD_TEST_PROGRAM], [ +-AC_LANG_SOURCE([OL_PTHREAD_TEST_INCLUDES ++AC_DEFUN([OL_PTHREAD_TEST_PROGRAM], ++[AC_LANG_SOURCE([OL_PTHREAD_TEST_INCLUDES + +-int main(argc, argv) +- int argc; +- char **argv; ++int main(int argc, char **argv) + { + OL_PTHREAD_TEST_FUNCTION + } +@@ -706,7 +432,7 @@ dnl Check GNU Pth pthread Header + dnl + dnl defines ol_cv_header linux_threads to 'yes' or 'no' + dnl 'no' implies pthreads.h is not LinuxThreads or pthreads.h +-dnl doesn't exists. Existance of pthread.h should separately ++dnl doesn't exist. Existence of pthread.h should separately + dnl checked. + dnl + AC_DEFUN([OL_HEADER_GNU_PTH_PTHREAD_H], [ +@@ -728,7 +454,7 @@ AC_DEFUN([OL_NT_THREADS], [ + AC_CHECK_FUNC(_beginthread) + + if test $ac_cv_func__beginthread = yes ; then +- AC_DEFINE([HAVE_NT_THREADS], [1], [if you have NT Threads]) ++ AC_DEFINE(HAVE_NT_THREADS,1,[if you have NT Threads]) + ol_cv_nt_threads=yes + fi + ]) +@@ -737,7 +463,7 @@ dnl Check LinuxThreads Header + dnl + dnl defines ol_cv_header linux_threads to 'yes' or 'no' + dnl 'no' implies pthreads.h is not LinuxThreads or pthreads.h +-dnl doesn't exists. Existance of pthread.h should separately ++dnl doesn't exist. Existence of pthread.h should separately + dnl checked. + dnl + AC_DEFUN([OL_HEADER_LINUX_THREADS], [ +@@ -749,7 +475,7 @@ AC_DEFUN([OL_HEADER_LINUX_THREADS], [ + [ol_cv_header_linux_threads=no]) + ]) + if test $ol_cv_header_linux_threads = yes; then +- AC_DEFINE([HAVE_LINUX_THREADS], [1], [if you have LinuxThreads]) ++ AC_DEFINE(HAVE_LINUX_THREADS,1,[if you have LinuxThreads]) + fi + ])dnl + dnl -------------------------------------------------------------------- +@@ -791,7 +517,7 @@ AC_CACHE_CHECK([for compatible POSIX regex],ol_cv_c_posix_regex,[ + #include + #include + static char *pattern, *string; +-main() ++int main(void) + { + int rc; + regex_t re; +@@ -818,7 +544,8 @@ AC_DEFUN([OL_C_UPPER_LOWER], + [AC_CACHE_CHECK([if toupper() requires islower()],ol_cv_c_upper_lower,[ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include +-main() ++#include ++int main(void) + { + if ('C' == toupper('C')) + exit(0); +@@ -826,7 +553,7 @@ main() + exit(1); + }]])],[ol_cv_c_upper_lower=no],[ol_cv_c_upper_lower=yes],[ol_cv_c_upper_lower=safe])]) + if test $ol_cv_c_upper_lower != no ; then +- AC_DEFINE([C_UPPER_LOWER], [1], [define if toupper() requires islower()]) ++ AC_DEFINE(C_UPPER_LOWER,1, [define if toupper() requires islower()]) + fi + ]) + dnl +@@ -837,29 +564,32 @@ dnl Check for declaration of sys_errlist in one of stdio.h and errno.h. + dnl Declaration of sys_errlist on BSD4.4 interferes with our declaration. + dnl Reported by Keith Bostic. + AC_DEFUN([OL_SYS_ERRLIST], +-[AC_CACHE_CHECK([declaration of sys_errlist],ol_cv_dcl_sys_errlist,[ +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++[AC_CACHE_CHECK([existence of sys_errlist],ol_cv_have_sys_errlist,[ ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[char *c = (char *) *sys_errlist]])],[ol_cv_have_sys_errlist=yes],[ol_cv_have_sys_errlist=no])]) ++if test $ol_cv_have_sys_errlist = yes ; then ++ AC_DEFINE(HAVE_SYS_ERRLIST,1, ++ [define if you actually have sys_errlist in your libs]) ++ AC_CACHE_CHECK([declaration of sys_errlist],ol_cv_dcl_sys_errlist,[ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include + #include + #ifdef _WIN32 + #include +-#endif ]], [[char *c = (char *) *sys_errlist]])],[ol_cv_dcl_sys_errlist=yes +- ol_cv_have_sys_errlist=yes],[ol_cv_dcl_sys_errlist=no])]) ++#endif ]], [[char *c = (char *) *sys_errlist]])],[ol_cv_dcl_sys_errlist=yes], ++ [ol_cv_dcl_sys_errlist=no])]) + # +-# It's possible (for near-UNIX clones) that sys_errlist doesn't exist +-if test $ol_cv_dcl_sys_errlist = no ; then +- AC_DEFINE([DECL_SYS_ERRLIST], [1], +- [define if sys_errlist is not declared in stdio.h or errno.h]) +- +- AC_CACHE_CHECK([existence of sys_errlist],ol_cv_have_sys_errlist,[ +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[char *c = (char *) *sys_errlist]])],[ol_cv_have_sys_errlist=yes],[ol_cv_have_sys_errlist=no])]) +-fi +-if test $ol_cv_have_sys_errlist = yes ; then +- AC_DEFINE([HAVE_SYS_ERRLIST], [1], +- [define if you actually have sys_errlist in your libs]) ++ # It's possible (for near-UNIX clones) that sys_errlist doesn't exist ++ if test $ol_cv_dcl_sys_errlist = no ; then ++ AC_DEFINE(DECL_SYS_ERRLIST,1, ++ [define if sys_errlist is not declared in stdio.h or errno.h]) ++ fi + fi + ])dnl ++dnl ++dnl ==================================================================== ++dnl glibc supplies a non-standard strerror_r if _GNU_SOURCE is defined. ++dnl It's actually preferable to the POSIX version, if available. + AC_DEFUN([OL_NONPOSIX_STRERROR_R], + [AC_CACHE_CHECK([non-posix strerror_r],ol_cv_nonposix_strerror_r,[ + AC_EGREP_CPP(strerror_r,[#include ], +@@ -873,24 +603,23 @@ AC_DEFUN([OL_NONPOSIX_STRERROR_R], + ]])],[ol_cv_nonposix_strerror_r=yes],[ol_cv_nonposix_strerror_r=no]) + else + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +- main() { ++ int main(void) { + char buf[100]; + buf[0] = 0; + strerror_r( 1, buf, sizeof buf ); + exit( buf[0] == 0 ); + } +- ]])],[ol_cv_nonposix_strerror_r=yes],[ol_cv_nonposix_strerror=no],[ol_cv_nonposix_strerror=no]) ++ ]])],[ol_cv_nonposix_strerror_r=yes],[ol_cv_nonposix_strerror_r=no],[ol_cv_nonposix_strerror_r=no]) + fi + ]) + if test $ol_cv_nonposix_strerror_r = yes ; then +- AC_DEFINE([HAVE_NONPOSIX_STRERROR_R], [1], ++ AC_DEFINE(HAVE_NONPOSIX_STRERROR_R,1, + [define if strerror_r returns char* instead of int]) + fi + ])dnl + dnl + AC_DEFUN([OL_STRERROR], +-[OL_SYS_ERRLIST dnl TEMPORARY +-AC_CHECK_FUNCS(strerror strerror_r) ++[AC_CHECK_FUNCS(strerror strerror_r) + ol_cv_func_strerror_r=no + if test "${ac_cv_func_strerror_r}" = yes ; then + OL_NONPOSIX_STRERROR_R +@@ -910,7 +639,7 @@ AC_DEFUN([OL_C_VOLATILE], + if test $ol_cv_c_volatile = yes; then + : + else +- AC_DEFINE([volatile], [], [define as empty if volatile is not supported]) ++ AC_DEFINE(volatile,,[define as empty if volatile is not supported]) + fi + ])dnl + dnl +@@ -918,7 +647,7 @@ dnl ==================================================================== + dnl Look for fetch(3) + AC_DEFUN([OL_LIB_FETCH], + [ol_LIBS=$LIBS +-LIBS="-lfetch -lcom_err $LIBS" ++LIBS="-lfetch $LIBS" + AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #ifdef HAVE_SYS_PARAM_H +@@ -928,8 +657,8 @@ AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[ + #include ]], [[struct url *u = fetchParseURL("file:///"); ]])],[ol_cv_lib_fetch=yes],[ol_cv_lib_fetch=no])]) + LIBS=$ol_LIBS + if test $ol_cv_lib_fetch != no ; then +- ol_link_fetch="-lfetch -lcom_err" +- AC_DEFINE([HAVE_FETCH], [1], ++ ol_link_fetch="-lfetch" ++ AC_DEFINE(HAVE_FETCH,1, + [define if you actually have FreeBSD fetch(3)]) + fi + ])dnl +@@ -1094,7 +823,7 @@ AC_DEFUN([OL_FUNC_GETHOSTBYADDR_R_NARGS], + ])dnl + dnl + dnl -------------------------------------------------------------------- +-dnl Check for Cyrus SASL version compatility ++dnl Check for Cyrus SASL version compatibility + AC_DEFUN([OL_SASL_COMPAT], + [AC_CACHE_CHECK([Cyrus SASL library version], [ol_cv_sasl_compat],[ + AC_EGREP_CPP(__sasl_compat,[ +@@ -1113,19 +842,3 @@ AC_DEFUN([OL_SASL_COMPAT], + #endif + ], [ol_cv_sasl_compat=yes], [ol_cv_sasl_compat=no])]) + ]) +-dnl ==================================================================== +-dnl check for SSL compatibility +-AC_DEFUN([OL_SSL_COMPAT], +-[AC_CACHE_CHECK([OpenSSL library version (CRL checking capability)], +- [ol_cv_ssl_crl_compat],[ +- AC_EGREP_CPP(__ssl_compat,[ +-#ifdef HAVE_OPENSSL_SSL_H +-#include +-#endif +- +-/* Require 0.9.7d+ */ +-#if OPENSSL_VERSION_NUMBER >= 0x0090704fL +- char *__ssl_compat = "0.9.7d"; +-#endif +- ], [ol_cv_ssl_crl_compat=yes], [ol_cv_ssl_crl_compat=no])]) +-]) +-- +2.38.1 + diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch new file mode 100644 index 0000000000..619ea07558 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch @@ -0,0 +1,75 @@ + +Source: +https://bugs.ntp.org/show_bug.cgi?id=3688 + +Juergen Perlinger 2020-12-24 07:10:49 UTC +Created attachment 1760 [details] +ultimate patch, v00 + +--- a/sntp/log.c 2020-12-24 08:02:05.206004072 +0100 ++++ a/sntp/log.c 2020-12-24 08:02:05.206004072 +0100 +@@ -2,7 +2,7 @@ + + #include "log.h" + +-const char *progname; /* for msyslog use too */ ++extern const char *progname; /* for msyslog use too */ + + static int counter = 0; + +--- a/sntp/main.c 2020-12-24 08:02:05.210003956 +0100 ++++ a/sntp/main.c 2020-12-24 08:02:05.210003956 +0100 +@@ -20,7 +20,6 @@ + #include "log.h" + #include "libntp.h" + +- + int shutting_down; + int time_derived; + int time_adjusted; +--- a/sntp/main.h 2020-12-24 08:02:05.210003956 +0100 ++++ a/sntp/main.h 2020-12-24 08:02:05.210003956 +0100 +@@ -16,6 +16,14 @@ + + #include "crypto.h" + ++/* !Attention! 'progname' must de instantiated in any program that wants ++ * to use this library. Putting it into the library breaks a lot of ++ * things, since many programs define it itself and then the symbol ++ * might end up twice in the linker. ++ */ ++extern const char * progname; ++ ++ + void set_li_vn_mode(struct pkt *spkt, char leap, char version, char mode); + extern int sntp_main(int argc, char **argv, const char *); + int generate_pkt(struct pkt *x_pkt, const struct timeval *tv_xmt, +--- a/sntp/sntp.c 2020-12-24 08:02:05.210003956 +0100 ++++ a/sntp/sntp.c 2020-12-24 08:02:05.210003956 +0100 +@@ -2,6 +2,8 @@ + + #include "main.h" + ++const char * progname; ++ + int + main ( + int argc, +--- a/sntp/tests/t-log.c 2020-12-24 08:02:05.210003956 +0100 ++++ a/sntp/tests/t-log.c 2020-12-24 08:02:05.210003956 +0100 +@@ -3,7 +3,6 @@ + #include "ntp_types.h" + + +-//#include "log.h" + #include "log.c" + + void setUp(void); +--- a/tests/libntp/test-libntp.h 2020-12-24 08:02:05.210003956 +0100 ++++ a/tests/libntp/test-libntp.h 2020-12-24 08:02:05.210003956 +0100 +@@ -5,4 +5,4 @@ + + time_t timefunc(time_t *ptr); + void settime(int y, int m, int d, int H, int M, int S); +-time_t nowtime; ++extern time_t nowtime; diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8_p15-glibc-2.34.patch b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8_p15-glibc-2.34.patch new file mode 100644 index 0000000000..a32f3adabd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-4.2.8_p15-glibc-2.34.patch @@ -0,0 +1,28 @@ +https://bugs.gentoo.org/806358 +https://patchwork.openembedded.org/patch/180019/ + +From: Khem Raj +Date: Sat, 31 Jul 2021 10:51:41 -0700 +Subject: [PATCH] libntp: Do not use PTHREAD_STACK_MIN on glibc + +In glibc 2.34+ PTHREAD_STACK_MIN is not a compile-time constant which +could mean different stack sizes at runtime on different architectures +and it also causes compile failure. Default glibc thread stack size +or 64Kb set by ntp should be good in glibc these days. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- a/libntp/work_thread.c ++++ b/libntp/work_thread.c +@@ -41,7 +41,7 @@ + #ifndef THREAD_MINSTACKSIZE + # define THREAD_MINSTACKSIZE (64U * 1024) + #endif +-#ifndef __sun ++#if !defined(__sun) && !defined(__GLIBC__) + #if defined(PTHREAD_STACK_MIN) && THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN + # undef THREAD_MINSTACKSIZE + # define THREAD_MINSTACKSIZE PTHREAD_STACK_MIN +-- +2.32.0 + diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-client.confd b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-client.confd new file mode 100644 index 0000000000..786004da83 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-client.confd @@ -0,0 +1,21 @@ +# /etc/conf.d/ntp-client + +# Command to run to set the clock initially +# Most people should just leave this line alone ... +# however, if you know what you're doing, and you +# want to use ntpd to set the clock, change this to 'ntpd' +NTPCLIENT_CMD="ntpdate" + +# Options to pass to the above command +# This default setting should work fine but you should +# change the default 'pool.ntp.org' to something closer +# to your machine. See http://www.pool.ntp.org/ or +# try running `netselect -s 3 pool.ntp.org`. +NTPCLIENT_OPTS="-s -b -u \ + 0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org \ + 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" + +# If you use hostnames above, then you should depend on dns +# being up & running before we try to run. Otherwise, you +# can disable this. +rc_use="dns" diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-client.rc b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-client.rc new file mode 100644 index 0000000000..5b5d594473 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp-client.rc @@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + before cron portmap + after net + use dns logger +} + +checkconfig() { + if ! type "${NTPCLIENT_CMD}" >/dev/null 2>&1 ; then + eerror "Please edit /etc/conf.d/ntp-client" + eerror "Unable to locate the client command ${NTPCLIENT_CMD}!" + return 1 + fi + if [ -z "${NTPCLIENT_OPTS}" ] ; then + eerror "Please edit /etc/conf.d/ntp-client" + eerror "I need to know what server/options to use!" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + + ebegin "Setting clock via the NTP client '${NTPCLIENT_CMD}'" + "${NTPCLIENT_CMD}" ${NTPCLIENT_OPTS} + eend $? "Failed to set clock" +} diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp.conf b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp.conf new file mode 100644 index 0000000000..97bed8dd13 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp.conf @@ -0,0 +1,54 @@ +# NOTES: +# DHCP clients can append or replace NTP configuration files. +# You should consult your DHCP client documentation about its +# default behaviour and how to change it. + +# Name of the servers ntpd should sync with +# Please respect the access policy as stated by the responsible person. +#server ntp.example.tld iburst + +# Common pool for random people +#server pool.ntp.org + +# Pools for Gentoo users +server 0.gentoo.pool.ntp.org +server 1.gentoo.pool.ntp.org +server 2.gentoo.pool.ntp.org +server 3.gentoo.pool.ntp.org + +## +# A list of available servers can be found here: +# http://www.pool.ntp.org/ +# http://www.pool.ntp.org/#use +# A good way to get servers for your machine is: +# netselect -s 3 pool.ntp.org +## + +# you should not need to modify the following paths +driftfile /var/lib/ntp/ntp.drift + +#server ntplocal.example.com prefer +#server timeserver.example.org + +# Warning: Using default NTP settings will leave your NTP +# server accessible to all hosts on the Internet. + +# If you want to deny all machines (including your own) +# from accessing the NTP server, uncomment: +#restrict default ignore + + +# Default configuration: +# - Allow only time queries, at a limited rate, sending KoD when in excess. +# - Allow all local queries (IPv4, IPv6) +restrict default nomodify nopeer noquery limited kod +restrict 127.0.0.1 +restrict [::1] + + +# To allow machines within your network to synchronize +# their clocks with your server, but ensure they are +# not allowed to configure the server or used as peers +# to synchronize against, uncomment this line. +# +#restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp.tmpfiles b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp.tmpfiles new file mode 100644 index 0000000000..49b0b066e3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntp.tmpfiles @@ -0,0 +1 @@ +d /var/lib/ntp 0755 ntp ntp diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpd.confd b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpd.confd new file mode 100644 index 0000000000..2b74282c57 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpd.confd @@ -0,0 +1,6 @@ +# /etc/conf.d/ntpd + +# Options to pass to the ntpd process +# Most people should leave this line alone ... +# however, if you know what you're doing, feel free to tweak +NTPD_OPTS="-g -u ntp:ntp" diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpd.rc-r2 b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpd.rc-r2 new file mode 100644 index 0000000000..e2a1b54913 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpd.rc-r2 @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="ntpd - the network time protocol daemon" +pidfile="/var/run/ntpd.pid" +command="/usr/sbin/ntpd" +command_args="${NTPD_OPTS}" +command_args_background="-p ${pidfile}" +command_args_foreground="-n" + +depend() { + use net dns logger + after ntp-client +} + +start_pre() { + if [ ! -f /etc/ntp.conf ] ; then + eerror "Please create /etc/ntp.conf" + return 1 + fi + return 0 +} diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntpd.service b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpd.service-r2 similarity index 70% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntpd.service rename to sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpd.service-r2 index 65c109b243..5f11b27e92 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntpd.service +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpd.service-r2 @@ -4,9 +4,8 @@ After=ntpdate.service sntp.service Conflicts=systemd-timesyncd.service [Service] -ExecStart=/usr/sbin/ntpd -g -n -f /var/lib/ntp/ntp.drift +ExecStart=/usr/sbin/ntpd -g -n PrivateTmp=true -Restart=always [Install] WantedBy=multi-user.target diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntpdate.service b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpdate.service-r2 similarity index 67% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntpdate.service rename to sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpdate.service-r2 index 4ba6cf249c..7ad294eccd 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntpdate.service +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpdate.service-r2 @@ -2,12 +2,11 @@ Description=Set time via NTP using ntpdate After=network-online.target nss-lookup.target Before=time-sync.target -Wants=time-sync.target +Wants=network-online.target time-sync.target Conflicts=systemd-timesyncd.service [Service] Type=oneshot -Environment="SERVER=0.flatcar.pool.ntp.org 1.flatcar.pool.ntp.org 2.flatcar.pool.ntp.org 3.flatcar.pool.ntp.org" ExecStart=/usr/sbin/ntpdate -b -u $SERVER RemainAfterExit=yes diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpdate.service.conf b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpdate.service.conf new file mode 100644 index 0000000000..75e4f41b41 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/ntpdate.service.conf @@ -0,0 +1,2 @@ +[Service] +Environment="SERVER=0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/sntp.confd b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/sntp.confd new file mode 100644 index 0000000000..d11983a3fb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/sntp.confd @@ -0,0 +1,4 @@ +# /etc/conf.d/sntp + +# Options to pass to sntp +SNTP_OPTS="-s 0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/sntp.rc b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/sntp.rc new file mode 100644 index 0000000000..4ed56ae2bf --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/sntp.rc @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/sntp" + +depend() { + before cron portmap + after net + use dns logger +} + +start_pre() { + if [ -z "${SNTP_OPTS}" ] ; then + eerror "Please edit /etc/conf.d/sntp" + eerror "I need to know what server/options to use!" + return 1 + fi + return 0 +} + +start() { + ebegin "Setting clock via SNTP" + ${command} ${SNTP_OPTS} + eend $? "Failed to set clock" +} diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/sntp.service b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/sntp.service-r3 similarity index 50% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/sntp.service rename to sdk_container/src/third_party/portage-stable/net-misc/ntp/files/sntp.service-r3 index 60a5784d50..2ab722f2c6 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/sntp.service +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/sntp.service-r3 @@ -1,13 +1,12 @@ [Unit] Description=Set time via SNTP -After=network.target NetworkManager-wait-online.service nss-lookup.target +After=network.target network-online.target nss-lookup.target Before=time-sync.target -Wants=time-sync.target +Wants=network-online.target time-sync.target Conflicts=systemd-timesyncd.service [Service] Type=oneshot -Environment="SERVER=0.flatcar.pool.ntp.org 1.flatcar.pool.ntp.org 2.flatcar.pool.ntp.org 3.flatcar.pool.ntp.org" ExecStart=/usr/bin/sntp -s $SERVER RemainAfterExit=yes diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/sntp.service.conf b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/sntp.service.conf new file mode 100644 index 0000000000..75e4f41b41 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/files/sntp.service.conf @@ -0,0 +1,2 @@ +[Service] +Environment="SERVER=0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/metadata.xml b/sdk_container/src/third_party/portage-stable/net-misc/ntp/metadata.xml similarity index 56% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/metadata.xml rename to sdk_container/src/third_party/portage-stable/net-misc/ntp/metadata.xml index 88e81f1ab2..921f0c46b5 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/metadata.xml @@ -1,17 +1,17 @@ - + base-system@gentoo.org Gentoo Base System -NTP is a protocol designed to synchronize the clocks of computers over a network. NTP -version 3 is an internet draft standard, formalized in RFC 1305. NTP version 4 is a -significant revision of the NTP standard, and is the current development version, but -has not been formalized in an RFC. Simple NTP (SNTP) version 4 is described in RFC -2030. - + NTP is a protocol designed to synchronize the clocks of computers over a network. NTP + version 3 is an internet draft standard, formalized in RFC 1305. NTP version 4 is a + significant revision of the NTP standard, and is the current development version, but + has not been formalized in an RFC. Simple NTP (SNTP) version 4 is described in RFC + 2030. + Allow ntp to be installed alongside openntpd Add support for PARSE clocks diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8_p15.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/ntp/ntp-4.2.8_p15-r6.ebuild similarity index 58% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8_p15.ebuild rename to sdk_container/src/third_party/portage-stable/net-misc/ntp/ntp-4.2.8_p15-r6.ebuild index 591c3f1cdf..28b0d78691 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8_p15.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/ntp-4.2.8_p15-r6.ebuild @@ -1,10 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -TMPFILES_OPTIONAL=1 -inherit autotools toolchain-funcs flag-o-matic systemd tmpfiles +inherit autotools flag-o-matic systemd tmpfiles MY_P=${P/_p/p} DESCRIPTION="Network Time Protocol suite/programs" @@ -14,17 +13,16 @@ SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar LICENSE="HPND BSD ISC" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~m68k-mint" -IUSE="caps debug ipv6 libressl openntpd parse-clocks perl readline samba selinux snmp ssl threads vim-syntax zeroconf" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +IUSE="caps debug ipv6 openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf" COMMON_DEPEND="readline? ( >=sys-libs/readline-4.1:0= ) - >=dev-libs/libevent-2.0.9:=[threads?] + >=dev-libs/libevent-2.0.9:=[threads(+)?] kernel_linux? ( caps? ( sys-libs/libcap ) ) zeroconf? ( net-dns/avahi[mdnsresponder-compat] ) snmp? ( net-analyzer/net-snmp ) ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) + dev-libs/openssl:0= ) parse-clocks? ( net-misc/pps-tools )" BDEPEND="virtual/pkgconfig @@ -46,14 +44,14 @@ S="${WORKDIR}/${MY_P}" PATCHES=( "${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966 "${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922 - "${FILESDIR}"/${PN}-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch - "${FILESDIR}"/${PN}-4.2.8_p12-libressl-2.8.patch "${FILESDIR}"/${PN}-4.2.8_p14-add_cap_ipc_lock.patch #711530 + "${FILESDIR}"/${PN}-4.2.8_p15-gcc10.patch #759409 + "${FILESDIR}"/${PN}-4.2.8_p15-glibc-2.34.patch + "${FILESDIR}"/${PN}-4.2.8_p15-configure-clang16.patch ) src_prepare() { default - use perl || sed -i -e '/^SUBDIRS *=/,/[^\\]$/{/scripts/d;}' Makefile.am || die append-cppflags -D_GNU_SOURCE #264109 # Make sure every build uses the same install layout. #539092 find sntp/loc/ -type f '!' -name legacy -delete || die @@ -69,11 +67,14 @@ src_configure() { # blah, no real configure options #176333 export ac_cv_header_dns_sd_h=$(usex zeroconf) export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h} - # Increase the default memlimit from 32MiB to 128MiB. #533232 + # Unity builds, we don't really need support for it, bug #804109 + export PATH_RUBY=/bin/false + local myeconfargs=( --with-lineeditlibs=readline,edit,editline --with-yielding-select --disable-local-libevent + # Increase the default memlimit from 32MiB to 128MiB. #533232 --with-memlock=256 $(use_enable caps linuxcaps) $(use_enable parse-clocks) @@ -97,21 +98,28 @@ src_install() { dodoc INSTALL WHERE-TO-START doman "${WORKDIR}"/man/*.[58] - insinto /usr/share/ntp + insinto /etc doins "${FILESDIR}"/ntp.conf - use ipv6 || sed -i '/^restrict .*::1/d' "${ED%/}"/usr/share/ntp/ntp.conf #524726 - newtmpfiles "${FILESDIR}"/ntp.tmpfiles ntp.conf - - keepdir /var/lib/ntp - use prefix || fowners ntp:ntp /var/lib/ntp + use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf #524726 + newinitd "${FILESDIR}"/ntpd.rc-r2 ntpd + newconfd "${FILESDIR}"/ntpd.confd ntpd + newinitd "${FILESDIR}"/ntp-client.rc ntp-client + newconfd "${FILESDIR}"/ntp-client.confd ntp-client + newinitd "${FILESDIR}"/sntp.rc sntp + newconfd "${FILESDIR}"/sntp.confd sntp + if ! use caps ; then + sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die + fi + sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die if use openntpd ; then cd "${ED}" || die rm usr/sbin/ntpd || die - rm -r var/lib || die + rm etc/{conf,init}.d/ntpd || die rm usr/share/man/*/ntpd.8 || die else - systemd_dounit "${FILESDIR}"/ntpd.service + newtmpfiles "${FILESDIR}"/ntp.tmpfiles ntp.conf + systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service if use caps ; then sed -i '/ExecStart/ s|$| -u ntp:ntp|' \ "${D}$(systemd_get_systemunitdir)"/ntpd.service \ @@ -120,6 +128,20 @@ src_install() { systemd_enable_ntpunit 60-ntpd ntpd.service fi - systemd_dounit "${FILESDIR}"/ntpdate.service - systemd_dounit "${FILESDIR}"/sntp.service + systemd_newunit "${FILESDIR}"/ntpdate.service-r2 ntpdate.service + systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf + systemd_newunit "${FILESDIR}"/sntp.service-r3 sntp.service + systemd_install_serviced "${FILESDIR}"/sntp.service.conf +} + +pkg_postinst() { + if ! use openntpd; then + tmpfiles_process ntp.conf + fi + if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then + eerror "The notrust option was found in your /etc/ntp.conf!" + ewarn "If your ntpd starts sending out weird responses," + ewarn "then make sure you have keys properly setup and see" + ewarn "https://bugs.gentoo.org/41827" + fi } diff --git a/sdk_container/src/third_party/portage-stable/net-misc/ntp/ntp-4.2.8_p17.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/ntp/ntp-4.2.8_p17.ebuild new file mode 100644 index 0000000000..2a5ebf974b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/ntp/ntp-4.2.8_p17.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic systemd tmpfiles + +MY_P=${P/_p/p} +DESCRIPTION="Network Time Protocol suite/programs" +HOMEPAGE="https://www.ntp.org/" +SRC_URI="https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="HPND BSD ISC" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux" +IUSE="caps debug ipv6 openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf" + +DEPEND=" + >=dev-libs/libevent-2.0.9:=[threads(+)?] + readline? ( >=sys-libs/readline-4.1:= ) + kernel_linux? ( caps? ( sys-libs/libcap ) ) + zeroconf? ( net-dns/avahi[mdnsresponder-compat] ) + snmp? ( net-analyzer/net-snmp ) + ssl? ( dev-libs/openssl:= ) + parse-clocks? ( net-misc/pps-tools ) +" +RDEPEND=" + ${DEPEND} + acct-group/ntp + acct-user/ntp + selinux? ( sec-policy/selinux-ntp ) + vim-syntax? ( app-vim/ntp-syntax ) + !net-misc/ntpsec + !openntpd? ( !net-misc/openntpd ) +" +BDEPEND=" + acct-group/ntp + acct-user/ntp + virtual/pkgconfig +" +PDEPEND="openntpd? ( net-misc/openntpd )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch # bug #533966 + "${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch # bug #563922 + "${FILESDIR}"/${PN}-4.2.8_p14-add_cap_ipc_lock.patch # bug #711530 + "${FILESDIR}"/${PN}-4.2.8_p15-configure-clang16.patch +) + +src_prepare() { + default + + # Make sure every build uses the same install layout, bug #539092 + find sntp/loc/ -type f '!' -name legacy -delete || die + + # bug #622754 + eautoreconf + + # Disable pointless checks. + touch .checkChangeLog .gcc-warning FRC.html html/.datecheck || die +} + +src_configure() { + # bug #264109 + append-cppflags -D_GNU_SOURCE + + # avoid libmd5/libelf + export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no + export ac_cv_lib_elf_nlist=no + # blah, no real configure options #176333 + export ac_cv_header_dns_sd_h=$(usex zeroconf) + export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h} + # Unity builds, we don't really need support for it, bug #804109 + export PATH_RUBY=/bin/false + + local myeconfargs=( + --with-lineeditlibs=readline,edit,editline + --with-yielding-select + --disable-local-libevent + + # Increase the default memlimit from 32MiB to 128MiB, bug #533232 + --with-memlock=256 + + # Avoid overriding the user's toolchain settings, bug #895802 + --with-hardenfile=/dev/null + + $(use_enable caps linuxcaps) + $(use_enable parse-clocks) + $(use_enable ipv6) + $(use_enable debug debugging) + $(use_with readline lineeditlibs readline) + $(use_enable samba ntp-signd) + $(use_with snmp ntpsnmpd) + $(use_with ssl crypto) + $(use_enable threads thread-support) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + # Move ntpd/ntpdate to sbin, bug #66671 + dodir /usr/sbin + mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin" + + dodoc INSTALL WHERE-TO-START + + insinto /etc + doins "${FILESDIR}"/ntp.conf + + #bug #524726 + use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf + + newinitd "${FILESDIR}"/ntpd.rc-r2 ntpd + newconfd "${FILESDIR}"/ntpd.confd ntpd + newinitd "${FILESDIR}"/ntp-client.rc ntp-client + newconfd "${FILESDIR}"/ntp-client.confd ntp-client + newinitd "${FILESDIR}"/sntp.rc sntp + newconfd "${FILESDIR}"/sntp.confd sntp + if ! use caps ; then + sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die + fi + sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die + + if use openntpd ; then + cd "${ED}" || die + rm usr/sbin/ntpd || die + rm etc/{conf,init}.d/ntpd || die + rm usr/share/man/man1/ntpd.1 || die + else + newtmpfiles "${FILESDIR}"/ntp.tmpfiles ntp.conf + systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service + if use caps ; then + sed -i '/ExecStart/ s|$| -u ntp:ntp|' \ + "${D}$(systemd_get_systemunitdir)"/ntpd.service \ + || die + fi + systemd_enable_ntpunit 60-ntpd ntpd.service + fi + + systemd_newunit "${FILESDIR}"/ntpdate.service-r2 ntpdate.service + systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf + systemd_newunit "${FILESDIR}"/sntp.service-r3 sntp.service + systemd_install_serviced "${FILESDIR}"/sntp.service.conf +} + +pkg_postinst() { + if ! use openntpd; then + tmpfiles_process ntp.conf + fi + + if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then + eerror "The notrust option was found in your /etc/ntp.conf!" + ewarn "If your ntpd starts sending out weird responses," + ewarn "then make sure you have keys properly setup and see" + ewarn "https://bugs.gentoo.org/41827" + fi +}