From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2496F158083 for ; Fri, 20 Sep 2024 06:15:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1DFE5E29AA; Fri, 20 Sep 2024 06:15:49 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 01023E29AA for ; Fri, 20 Sep 2024 06:15:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3714833DF47 for ; Fri, 20 Sep 2024 06:15:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 71B4D1E6E for ; Fri, 20 Sep 2024 06:15:46 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1726812913.c1a6000b2ca54c0f9ab0e8c943e0fa329dcf856d.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/ostree/, dev-util/ostree/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/ostree/files/ostree-2024.3-curl.patch dev-util/ostree/ostree-2024.3-r1.ebuild X-VCS-Directories: dev-util/ostree/files/ dev-util/ostree/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: c1a6000b2ca54c0f9ab0e8c943e0fa329dcf856d X-VCS-Branch: master Date: Fri, 20 Sep 2024 06:15:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 29e2b994-aca4-4b35-8159-067c33f64b57 X-Archives-Hash: 9745ed20373ba9d8980753b71c3ef562 commit: c1a6000b2ca54c0f9ab0e8c943e0fa329dcf856d Author: Sam James gentoo org> AuthorDate: Fri Sep 20 06:14:30 2024 +0000 Commit: Sam James gentoo org> CommitDate: Fri Sep 20 06:15:13 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1a6000b dev-util/ostree: fix crash w/ net-misc/curl-8.10.1 I'll leave the bump to maintainers. Closes: https://bugs.gentoo.org/939813 Signed-off-by: Sam James gentoo.org> dev-util/ostree/files/ostree-2024.3-curl.patch | 58 ++++++++++++ dev-util/ostree/ostree-2024.3-r1.ebuild | 122 +++++++++++++++++++++++++ 2 files changed, 180 insertions(+) diff --git a/dev-util/ostree/files/ostree-2024.3-curl.patch b/dev-util/ostree/files/ostree-2024.3-curl.patch new file mode 100644 index 000000000000..7e7a3a44d1f7 --- /dev/null +++ b/dev-util/ostree/files/ostree-2024.3-curl.patch @@ -0,0 +1,58 @@ +https://bugs.gentoo.org/939813 +https://github.com/ostreedev/ostree/pull/3307 + +From 4d755a85225ea0a02d4580d088bb8a97138cb040 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Wed, 18 Sep 2024 13:41:59 -0400 +Subject: [PATCH] curl: Make socket callback during cleanup into no-op + +Because curl_multi_cleanup may invoke callbacks, we effectively have +some circular references going on here. See discussion in + +https://github.com/curl/curl/issues/14860 + +Basically what we do is the socket callback libcurl may invoke into a no-op when +we detect we're finalizing. The data structures are owned by this object and +not by the callbacks, and will be destroyed below. Note that +e.g. g_hash_table_unref() may itself invoke callbacks, which is where +some data is cleaned up. + +Signed-off-by: Colin Walters +--- a/src/libostree/ostree-fetcher-curl.c ++++ b/src/libostree/ostree-fetcher-curl.c +@@ -78,6 +78,7 @@ struct OstreeFetcher + struct curl_slist *extra_headers; + int tmpdir_dfd; + bool force_anonymous; ++ bool finalizing; // Set if we're in the process of teardown + char *custom_user_agent; + guint32 opt_low_speed_limit; + guint32 opt_low_speed_time; +@@ -180,6 +181,15 @@ _ostree_fetcher_finalize (GObject *object) + { + OstreeFetcher *self = OSTREE_FETCHER (object); + ++ // Because curl_multi_cleanup may invoke callbacks, we effectively have ++ // some circular references going on here. See discussion in ++ // https://github.com/curl/curl/issues/14860 ++ // Basically what we do is make most callbacks libcurl may invoke into no-ops when ++ // we detect we're finalizing. The data structures are owned by this object and ++ // not by the callbacks, and will be destroyed below. Note that ++ // e.g. g_hash_table_unref() may itself invoke callbacks, which is where ++ // some data is cleaned up. ++ self->finalizing = true; + curl_multi_cleanup (self->multi); + g_free (self->remote_name); + g_free (self->tls_ca_db_path); +@@ -528,6 +538,10 @@ sock_cb (CURL *easy, curl_socket_t s, int what, void *cbp, void *sockp) + OstreeFetcher *fetcher = cbp; + SockInfo *fdp = (SockInfo *)sockp; + ++ // We do nothing if we're in the process of teardown; see below. ++ if (fetcher->finalizing) ++ return 0; ++ + if (what == CURL_POLL_REMOVE) + { + if (!g_hash_table_remove (fetcher->sockets, fdp)) + diff --git a/dev-util/ostree/ostree-2024.3-r1.ebuild b/dev-util/ostree/ostree-2024.3-r1.ebuild new file mode 100644 index 000000000000..05bac56034ba --- /dev/null +++ b/dev-util/ostree/ostree-2024.3-r1.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools systemd tmpfiles + +DESCRIPTION="Operating system and container binary deployment and upgrades" +HOMEPAGE="https://ostreedev.github.io/ostree/" +SRC_URI=" + https://github.com/ostreedev/ostree/releases/download/v${PV}/lib${P}.tar.xz + -> ${P}.tar.xz +" +S="${WORKDIR}/lib${P}" + +LICENSE="LGPL-2+" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv x86" +IUSE="archive +curl doc dracut gnutls +gpg grub +http2 httpd introspection libmount selinux sodium ssl +soup systemd zeroconf" +RESTRICT="test" +REQUIRED_USE=" + dracut? ( systemd ) + http2? ( curl ) + httpd? ( || ( curl soup ) ) +" + +RDEPEND=" + app-arch/xz-utils + dev-libs/glib:2 + sys-fs/fuse:3 + sys-libs/zlib + archive? ( app-arch/libarchive:= ) + curl? ( net-misc/curl ) + dracut? ( sys-kernel/dracut ) + gpg? ( + app-crypt/gpgme:= + dev-libs/libgpg-error + ) + grub? ( sys-boot/grub:2= ) + introspection? ( dev-libs/gobject-introspection ) + libmount? ( sys-apps/util-linux ) + selinux? ( sys-libs/libselinux ) + sodium? ( >=dev-libs/libsodium-1.0.14:= ) + soup? ( net-libs/libsoup:3.0 ) + ssl? ( + gnutls? ( net-libs/gnutls:= ) + !gnutls? ( + dev-libs/openssl:0= + ) + ) + systemd? ( sys-apps/systemd:0= ) + zeroconf? ( net-dns/avahi[dbus] ) +" +DEPEND="${RDEPEND} + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xsl-stylesheets + doc? ( + dev-util/gtk-doc + app-text/docbook-xml-dtd:4.3 + ) +" +BDEPEND=" + dev-libs/libxslt + dev-util/glib-utils + sys-devel/flex + sys-devel/bison + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/ostree-2023.3-dont-force-clang-introspection.patch + "${FILESDIR}"/${P}-curl.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # Needs Bison (bug #884289) + unset YACC + + local econfargs=( + --enable-man + --enable-shared + --with-grub2-mkconfig-path=grub-mkconfig + --with-modern-grub + $(use_with archive libarchive) + $(use_with curl) + $(use_with dracut dracut yesbutnoconf) #816867 + $(use_enable doc gtk-doc) + $(usex introspection --enable-introspection={,} yes no) + $(use_with gpg gpgme) + $(use_enable http2) + $(use_enable httpd trivial-httpd-cmdline) + $(use_with selinux ) + $(use_with soup soup3) + --without-soup # libsoup:2.4 + $(use_with libmount) + $(use ssl && { use gnutls && echo --with-crypto=gnutls || echo --with-crypto=openssl; }) + $(use_with sodium ed25519-libsodium) + $(use_with systemd libsystemd) + $(use_with zeroconf avahi) + ) + + if use systemd; then + econfargs+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" ) + fi + + unset ${!XDG_*} #657346 g-ir-scanner sandbox violation + econf "${econfargs[@]}" +} + +src_install() { + default + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + tmpfiles_process ostree-tmpfiles.conf +}