From b8c7370a682e4e29cda623222d17a790c01c3642 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 7 Aug 2024 12:37:21 +0100 Subject: gentoo auto-resync : 07:08:2024 - 12:37:20 --- sys-block/nbd/Manifest | 2 + .../files/nbd-3.25-fix-build-on-musl-gcc14.patch | 34 +++++++++ sys-block/nbd/nbd-3.25-r1.ebuild | 86 ++++++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 sys-block/nbd/files/nbd-3.25-fix-build-on-musl-gcc14.patch create mode 100644 sys-block/nbd/nbd-3.25-r1.ebuild (limited to 'sys-block/nbd') diff --git a/sys-block/nbd/Manifest b/sys-block/nbd/Manifest index 93733d711340..25eefab37e90 100644 --- a/sys-block/nbd/Manifest +++ b/sys-block/nbd/Manifest @@ -1,4 +1,6 @@ +AUX nbd-3.25-fix-build-on-musl-gcc14.patch 1511 BLAKE2B f87b1c1a3885305e70c7bfdaa620ec7382da015777fc93476617cb6c28ccc9d27bb0d9cca5d35214ec7df8b355382ba74e9f7f83059921d77c8c8b2247743118 SHA512 f974042e310e90927a94b2a9e6a6d85066c47179c5731f63c72ef47e44e59ef3d5615d82556ef879e523122d15cde0eda192819254db0768214452fc5968ac6b DIST nbd-3.25.tar.xz 566360 BLAKE2B dce56fb91f6358955b0173b589df19ce2682e3cd6810b0bd74eeb973c24e52307ed55e197c13dcb9c2a62ac92e0dddb046fd1f4348862c7f7dc17bc479ba8cad SHA512 e8b83475a698b5c3718331b55a2c28fd10ca031e347aac7c439f1653d78a405fefa5cb2618e60f73b2f170a8c93d68e79a2cd5875e5c6a970cb1ef9d8e08ebda +EBUILD nbd-3.25-r1.ebuild 1725 BLAKE2B f52517e2c5c2c2331c7d2f78ed19265c43891c4c176116a71bdd2df60ebdf0d3ab57b7d97038f87bbb6e1af154d9c105f3909729534046b228301e32d72beea6 SHA512 fb1306395c3a50a042ee251a0ebe040e32e1b8380c1aea7a6c00817f7dc391192a5e4dc86f8f95a5871c6ab8cf81b69e6adcdc5f76c4405ec6f0ba889722e4f7 EBUILD nbd-3.25.ebuild 1651 BLAKE2B fd65808ca76d49d873ee721392550e652acd3c6952e94fa552e2ff577202095f2753b59d34c85bd82d031cecf1ddbf94a842144271f2ce3e27827779e3a03ff9 SHA512 a9c421936302dae5c225e7ca09f5db6af3ef22d5f113c3d2ec31b882f1dbdb445534a0860e02c48cc39597ae1e4b1bee232d80f72868901882eaa0fe1e90c9df EBUILD nbd-9999.ebuild 1649 BLAKE2B 771fc8d4df921ade7212e3efa6732cab71fe67a90a77f4d1644052ac666a1de446b6a70acbafb41f8879f04dca79b86f14fbc2bf3d602758a35ed317dfc44324 SHA512 da88e0e172d1cc0fdc7aa3a7b698d4c0ac18b2a01d6ad17bba0d43176874c23a1bfc57e5c3eadfb3f14b4a192208fe64020ec754fbc3e2f1a3ac2cc880a2e6a6 MISC metadata.xml 490 BLAKE2B b6fff304d62aee96038650fd12b2f4f9d82f7a8be72214766699437563da6f4d305effe58c0beba58ad1c537d8d3ec9ee4d3a698480977be6020317f3279335b SHA512 3e495bb823aae9aa2ce314b31cfe49dc40721e01f45b0d2179f18701b18fef89732d831cd1c0ebbdf1dcef1044a0b507262c586f81897e594ef1394a41211665 diff --git a/sys-block/nbd/files/nbd-3.25-fix-build-on-musl-gcc14.patch b/sys-block/nbd/files/nbd-3.25-fix-build-on-musl-gcc14.patch new file mode 100644 index 000000000000..91828c159d76 --- /dev/null +++ b/sys-block/nbd/files/nbd-3.25-fix-build-on-musl-gcc14.patch @@ -0,0 +1,34 @@ +https://github.com/NetworkBlockDevice/nbd/commit/4664b8dd3bc124c27b160720113339c1da97c2c4.patch +From: Khem Raj +Date: Mon, 20 May 2024 17:50:51 -0700 +Subject: [PATCH] nbd-client: Fix build on musl + gcc14 + +GCC-14 has promoted incompatible-pointer-types warning into error which is +now flagged especially with when building on musl + +Fixes following error + +| ../nbd-3.26.1/nbd-client.c: In function 'openunix': +| ../nbd-3.26.1/nbd-client.c:345:27: error: passing argument 2 of 'connect' from incompatible pointer type [-Wincompatible-pointer-types] +| 345 | if (connect(sock, &un_addr, sizeof(un_addr)) == -1) { +| | ^~~~~~~~ +| | | +| | struct sockaddr_un * +| In file included from ../nbd-3.26.1/nbd-client.c:25: +| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/nbd/3.26.1/recipe-sysroot/usr/include/sys/socket.h:386:19: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *' +| 386 | int connect (int, const struct sockaddr *, socklen_t); +| | ^~~~~~~~~~~~~~~~~~~~~~~ + +Signed-off-by: Khem Raj +--- a/nbd-client.c ++++ b/nbd-client.c +@@ -342,7 +342,7 @@ int openunix(const char *path) { + return -1; + }; + +- if (connect(sock, &un_addr, sizeof(un_addr)) == -1) { ++ if (connect(sock, (struct sockaddr*)&un_addr, sizeof(un_addr)) == -1) { + err_nonfatal("CONNECT failed"); + close(sock); + return -1; + diff --git a/sys-block/nbd/nbd-3.25-r1.ebuild b/sys-block/nbd/nbd-3.25-r1.ebuild new file mode 100644 index 000000000000..731fdfff88c4 --- /dev/null +++ b/sys-block/nbd/nbd-3.25-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd + +DESCRIPTION="Userland client/server for kernel network block device" +HOMEPAGE="https://nbd.sourceforge.io/" + +if [[ ${PV} == 9999 ]] ; then + inherit autotools git-r3 + EGIT_REPO_URI="https://github.com/NetworkBlockDevice/nbd.git" +else + SRC_URI="https://github.com/NetworkBlockDevice/nbd/releases/download/${P}/${P}.tar.xz" + SRC_URI+=" https://downloads.sourceforge.net/nbd/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~sparc ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="debug gnutls netlink zlib" + +RDEPEND=" + >=dev-libs/glib-2.32.0 + gnutls? ( >=net-libs/gnutls-2.12.0 ) + netlink? ( >=dev-libs/libnl-3.1 ) + zlib? ( sys-libs/zlib ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/bison + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-3.25-fix-build-on-musl-gcc14.patch" +) + +if [[ ${PV} == 9999 ]] ; then + BDEPEND+=" + app-text/docbook-sgml-dtd:4.5 + app-text/docbook-sgml-utils + dev-build/autoconf-archive + " +fi + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + emake -C man -f mans.mk \ + nbd-server.1.sh.in \ + nbd-server.5.sh.in \ + nbd-client.8.sh.in \ + nbd-trdump.1.sh.in \ + nbd-trplay.1.sh.in \ + nbdtab.5.sh.in + + emake -C systemd -f Makefile.am nbd@.service.sh.in + + eautoreconf + fi +} + +src_configure() { + # Needs Bison + unset YACC + + local myeconfargs=( + --enable-lfs + # https://github.com/NetworkBlockDevice/nbd/issues/149 + --disable-gznbd + $(use_enable !debug syslog) + $(use_enable debug) + $(use_with gnutls) + $(use_with netlink libnl) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + systemd_dounit systemd/nbd@.service +} -- cgit v1.2.3