commit:     9db2d23d177238c1e948044762fd3eb020d9c747
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 14 19:24:50 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 14 19:24:50 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9db2d23d

dev-util/ostree: fix build w/ lld, drop obsolete musl patch

And new revision given underlinking affects the installed products.

Closes: https://bugs.gentoo.org/905623
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...stree-2023.3-libgpg-error-underlinked-lld.patch |  27 +++++
 dev-util/ostree/ostree-2023.3-r1.ebuild            | 118 +++++++++++++++++++++
 2 files changed, 145 insertions(+)

diff --git 
a/dev-util/ostree/files/ostree-2023.3-libgpg-error-underlinked-lld.patch 
b/dev-util/ostree/files/ostree-2023.3-libgpg-error-underlinked-lld.patch
new file mode 100644
index 000000000000..f96cb83a1e74
--- /dev/null
+++ b/dev-util/ostree/files/ostree-2023.3-libgpg-error-underlinked-lld.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/905623
+https://github.com/ostreedev/ostree/pull/2880
+
+From c3bd439d3e9c8cfad40a8080d35c5d6b29041039 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 12 Jun 2023 14:04:44 -0700
+Subject: [PATCH] libostree: Link with libgpg-error for gpg_strerror_r API
+
+With f461c02bb55bf2853a3b81ed5c8618040ab54e98 use of gpg_strerror_r
+was added this symbol comes from libgpg-error however, therefore its
+needed to add -lgpg-error to cmdline to resolve this symbol especially
+with gold and lld linker. Fixes
+
+aarch64-yoe-linux-ld.lld: error: undefined reference due to 
--no-allow-shlib-undefined: gpg_strerror_r
+>>> referenced by ./.libs/libostree-1.so
+--- a/configure.ac
++++ b/configure.ac
+@@ -243,8 +243,7 @@ AC_ARG_WITH(gpgme,
+           [], [with_gpgme=yes])
+ AS_IF([test x$with_gpgme != xno], [
+     have_gpgme=yes
+-    PKG_CHECK_MODULES([OT_DEP_GPGME], gpgme >= $LIBGPGME_DEPENDENCY, [], 
have_gpgme=no)
+-    PKG_CHECK_MODULES([OT_DEP_GPG_ERROR], [gpg-error], [], have_gpgme=no)
++    PKG_CHECK_MODULES([OT_DEP_GPGME], [gpgme >= $LIBGPGME_DEPENDENCY 
gpg-error], [have_gpgme=yes], [have_gpgme=no])
+     ]
+ )
+ AS_IF([test x$with_gpgme != xno && test x$have_gpgme != xyes], [

diff --git a/dev-util/ostree/ostree-2023.3-r1.ebuild 
b/dev-util/ostree/ostree-2023.3-r1.ebuild
new file mode 100644
index 000000000000..ce6f430cb40f
--- /dev/null
+++ b/dev-util/ostree/ostree-2023.3-r1.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2023 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}"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+LICENSE="LGPL-2+"
+SLOT="0"
+
+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/libassuan
+       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:2.4 )
+       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-xsl-stylesheets
+       dev-libs/libxslt
+       doc? ( dev-util/gtk-doc )
+"
+BDEPEND="
+       dev-util/glib-utils
+       sys-devel/flex
+       sys-devel/bison
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${FILESDIR}"/ostree-2023.3-libgpg-error-underlinked-lld.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)
+               $(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
+}

Reply via email to