From 81b8f20732954c4508baf2f77472b5435e3f851f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 14 Sep 2022 11:10:11 +0100 Subject: gentoo auto-resync : 14:09:2022 - 11:10:10 --- dev-lang/zig-bin/Manifest | 5 ++- .../zig-bin-0.9.1-fix-bad-hostname-segfault.patch | 26 ++++++++++++ .../files/zig-bin-0.9.1-fix-detecting-abi.patch | 19 --------- dev-lang/zig-bin/zig-bin-0.9.1-r1.ebuild | 47 ++++++++++++++++++++++ dev-lang/zig-bin/zig-bin-0.9.1.ebuild | 37 ----------------- 5 files changed, 76 insertions(+), 58 deletions(-) create mode 100644 dev-lang/zig-bin/files/zig-bin-0.9.1-fix-bad-hostname-segfault.patch delete mode 100644 dev-lang/zig-bin/files/zig-bin-0.9.1-fix-detecting-abi.patch create mode 100644 dev-lang/zig-bin/zig-bin-0.9.1-r1.ebuild delete mode 100644 dev-lang/zig-bin/zig-bin-0.9.1.ebuild (limited to 'dev-lang/zig-bin') diff --git a/dev-lang/zig-bin/Manifest b/dev-lang/zig-bin/Manifest index 6e3b461c41a5..fcf53452fe03 100644 --- a/dev-lang/zig-bin/Manifest +++ b/dev-lang/zig-bin/Manifest @@ -1,7 +1,8 @@ -AUX zig-bin-0.9.1-fix-detecting-abi.patch 1008 BLAKE2B b2556e70039cd73720d5f2518930a31baab483ab4a9212ff0edb6573f2c91c377f0912def0fbcadf5193d9eef6c48505035e447e811eea9d562de4ce667c8c62 SHA512 5ebd53548d589a1412d5991118ea1c253a846bb2eebcbeb42e69ca42690dc38a839dd1b2d6902e0a3a1aefdd1dfd5b350193da32b1e48652ba0c523c6b6e5c7c +AUX zig-bin-0.9.1-fix-bad-hostname-segfault.patch 935 BLAKE2B c1c54ccf40b4db9a8f9f68991e1ebafd81c2b996b41bd904ef842f5feed2d4ec19d61960ed1bda95873cb04a9fc58df7daa5d311537c9711f5100fb095eeb6db SHA512 c620da70b632e5a85d3136d6d54e42fe905ce8b5d899ca5ca9423ac7e7eaff036eea1f90a925c244794c0505469bf1320f5fd5d19d465c66505154ca78bcf519 +DIST zig-0.9.1-fix-detecting-abi.patch 22233 BLAKE2B fa523c4c4c23a74c0b4f85c6d2d91ef98b31d25694bb9dbc7988b82db972a16ab273aa9f1883cfa8ca79ef7fc56fca67d0a8656ba248b6db47bc902b7ac64a93 SHA512 259967f88f54c20f556bd9d67189ce3a2cfeb0250f0cee4dffb29020d976d61265a5dd9ae9cfcadfb7b1e152b47ee17f4184eafac2b80495f4ee8f98733cd692 DIST zig-linux-aarch64-0.9.1.tar.xz 37034860 BLAKE2B 3b984198d74ee01570e4e10175dc4471268970cc5bd66d732042f17f1cf31301cec9237df756b7fa589915ed4c4f29dcd9ba61fb8e65ce7e9b579762773fe26d SHA512 ca647f04a67a45ad9e869e335266fad9a4a0f3f377da31d54a6f022727404db6cf2386d33315df20d5da0b6883f59e27bb0d73e18856e571cf4bc8f890565639 DIST zig-linux-armv7a-0.9.1.tar.xz 37974652 BLAKE2B 5d51260d8322d1400719d97c7cac2d12555622272900533128e20d45ea7a1c321b8a3eb9c7c406bbfd459da24d19451c65011bc2cac0b0c29a0372c56ea73a2b SHA512 239c5f02aeb1c85bc2c43374d610e27722c434d23cf3adf43b3923772dfe5800e340d6a6b3672bd307c159c2cccce5137aabb5b6648148c351e29c171de9e333 DIST zig-linux-i386-0.9.1.tar.xz 44969172 BLAKE2B 7051242284f1ceca662a64257adf64b7383b71b475f27abd3377bdaf8335d56d8cbb9a961ebceb6ae26058258216848dcbde2f50f95a74e0b64578a9522f33d5 SHA512 5bdf0ebffe45023b5a28331137458d258048c7974311c8e8090bc610f0ec262dc0004f0a939cff443b1d94a9cca4035de8e6e98dad9d668413888da02b325b6d DIST zig-linux-x86_64-0.9.1.tar.xz 41011464 BLAKE2B 053fc1c3d30e5798b7d30c9a4f9b5609b9b080e9f237dab52ae661b183663fca6582dcc37458e8a51dd7eb4fbd1d3a9946f7c67cb756b69460f0e23b03cc96eb SHA512 0e5f5971dc9e586911f98122a410c98d8aaef2795d2d68488a1e9468ea45135479dac7f92708c973db4f8efce78cb0c6b3759cf239fba6237052434a2120d4d3 -EBUILD zig-bin-0.9.1.ebuild 915 BLAKE2B c4b465f7342216ef2cbd9485bc821f4e3611d26861f1dde99b8f7f54ba7e8796f798e2f457fc10b47b6a8e2fd3a0e7fd7f4ee276ef60ba99a7f18fd2cfd8c5e4 SHA512 45e65d01e738e87b7a5f4c2cd892cc10eb723e17dfcb551f96990050f77ef14d6f144bc81207e5d30ee473af593c02c9df589f7f775d4012a04186af89378418 +EBUILD zig-bin-0.9.1-r1.ebuild 1482 BLAKE2B 1feaede767f5be72609d75c748d17d0b6df948014937887cb07f96381af9715a3dae9a192c4133501348a264bc19fee032eeaf1b33b657b819fe6bc849749117 SHA512 116e69284f2c65e7e7f75c609a742bbb858cb8e308d14563c159a62cb6e9778cdaba34e5c120bb876d2c693a3739250ff70d6dd0ce1788ec7bf1e07c5a8f4cd1 MISC metadata.xml 541 BLAKE2B 6f5c7fbf759f0430f69073a17a0dae4b8bebf335b54c3b43da6b24104dc3de05a3b686cddbbd31e4dae1fc31695a2f08d000d22437ed6f1847de8fa95e3b1952 SHA512 d49cf0a8ad76ac9a6f6fb091effddbbcd812b56f91df6d3c782e15197cb4ff4423fb1076671a232aabcb9833af19ef8c820ad6df312a1e4d72e665680314c083 diff --git a/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-bad-hostname-segfault.patch b/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-bad-hostname-segfault.patch new file mode 100644 index 000000000000..2e87ecc6d6ee --- /dev/null +++ b/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-bad-hostname-segfault.patch @@ -0,0 +1,26 @@ +https://github.com/ziglang/zig/commit/601d8f721d6dc90ac390bf5ecc7d8bafdd6a30d8 +Bug https://bugs.gentoo.org/829959 + +From 601d8f721d6dc90ac390bf5ecc7d8bafdd6a30d8 Mon Sep 17 00:00:00 2001 +From: Veikka Touminen +Date: Sun, 10 Jul 2022 04:27:23 -0600 +Subject: [PATCH] std.net.getAddressList: fix segfault on bad hostname + +Fixes #12065 +--- + lib/std/net.zig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/std/net.zig b/lib/std/net.zig +index 235ad8496a1..c381df9bce7 100644 +--- a/lib/std/net.zig ++++ b/lib/std/net.zig +@@ -731,7 +731,7 @@ pub fn getAddressList(allocator: mem.Allocator, name: []const u8, port: u16) !*A + break :blk result; + }; + const arena = result.arena.allocator(); +- errdefer result.arena.deinit(); ++ errdefer result.deinit(); + + if (builtin.target.os.tag == .windows or builtin.link_libc) { + const name_c = try std.cstr.addNullByte(allocator, name); diff --git a/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-detecting-abi.patch b/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-detecting-abi.patch deleted file mode 100644 index 6aa2f49b379a..000000000000 --- a/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-detecting-abi.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Eric Joldasov - -Upstream parses /usr/bin/env ELF file for detecting C ABI and the dynamic linker. -However, if sys-apps/coreutils was merged with "multicall" USE flag, it would be a script and not a ELF file. -This will raise error.UnexpectedEndOfFile, and Zig will fallback to default dynamic linker (i.e. musl), -which breaks building programs with Zig on glibc systems. This patch changes file from -/usr/bin/env to /bin/bash, because it is more reliable on Gentoo systems. - ---- a/lib/std/zig/system/NativeTargetInfo.zig -+++ b/lib/std/zig/system/NativeTargetInfo.zig -@@ -355,7 +355,7 @@ fn detectAbiAndDynamicLinker( - return result; - } - -- const env_file = std.fs.openFileAbsoluteZ("/usr/bin/env", .{}) catch |err| switch (err) { -+ const env_file = std.fs.openFileAbsoluteZ("/bin/bash", .{}) catch |err| switch (err) { - error.NoSpaceLeft => unreachable, - error.NameTooLong => unreachable, - error.PathAlreadyExists => unreachable, diff --git a/dev-lang/zig-bin/zig-bin-0.9.1-r1.ebuild b/dev-lang/zig-bin/zig-bin-0.9.1-r1.ebuild new file mode 100644 index 000000000000..b731f0d2c5d7 --- /dev/null +++ b/dev-lang/zig-bin/zig-bin-0.9.1-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="A robust, optimal, and maintainable programming language" +HOMEPAGE="https://ziglang.org/" +SRC_URI=" + amd64? ( https://ziglang.org/download/${PV}/zig-linux-x86_64-${PV}.tar.xz ) + arm? ( https://ziglang.org/download/${PV}/zig-linux-armv7a-${PV}.tar.xz ) + arm64? ( https://ziglang.org/download/${PV}/zig-linux-aarch64-${PV}.tar.xz ) + x86? ( https://ziglang.org/download/${PV}/zig-linux-i386-${PV}.tar.xz )" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~arm64 ~x86" + +RDEPEND="!dev-lang/zig" + +SRC_URI+=" https://codeberg.org/BratishkaErik/distfiles/media/branch/master/zig-0.9.1-fix-detecting-abi.patch" + +# Zig provides its standard library in source form "/opt/zig-bin-{PV}/lib/", +# and all other Zig libraries are meant to be consumed in source form, +# because they can use compile-time mechanics (and it is easier for distributions to patch them) +# Here we use this feature for fixing programs that use standard library +# Note: Zig build system is also part of standard library, so we can fix it too +PATCHES=( + "${FILESDIR}/${P}-fix-bad-hostname-segfault.patch" + "${DISTDIR}/zig-0.9.1-fix-detecting-abi.patch" +) + +QA_PREBUILT="opt/${P}/zig" + +src_unpack() { + unpack ${A} + + mv "${WORKDIR}/"* "${S}" +} + +src_install() { + insinto /opt/ + doins -r "${S}" + + dosym -r /opt/${P}/doc/ /usr/share/doc/${PF} + dosym -r /opt/${P}/zig /usr/bin/zig + fperms 0755 /usr/bin/zig +} diff --git a/dev-lang/zig-bin/zig-bin-0.9.1.ebuild b/dev-lang/zig-bin/zig-bin-0.9.1.ebuild deleted file mode 100644 index 7aa14d86a3ea..000000000000 --- a/dev-lang/zig-bin/zig-bin-0.9.1.ebuild +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DESCRIPTION="A robust, optimal, and maintainable programming language" -HOMEPAGE="https://ziglang.org/" -SRC_URI=" - amd64? ( https://ziglang.org/download/${PV}/zig-linux-x86_64-${PV}.tar.xz ) - arm? ( https://ziglang.org/download/${PV}/zig-linux-armv7a-${PV}.tar.xz ) - arm64? ( https://ziglang.org/download/${PV}/zig-linux-aarch64-${PV}.tar.xz ) - x86? ( https://ziglang.org/download/${PV}/zig-linux-i386-${PV}.tar.xz )" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="-* ~amd64 ~arm ~arm64 ~x86" - -RDEPEND="!dev-lang/zig" - -PATCHES=( "${FILESDIR}/${P}-fix-detecting-abi.patch" ) - -QA_PREBUILT="opt/${P}/zig" - -src_unpack() { - unpack ${A} - - mv "${WORKDIR}/"* "${S}" -} - -src_install() { - insinto /opt/ - doins -r "${S}" - - dosym -r /opt/${P}/doc/ /usr/share/doc/${PF} - dosym -r /opt/${P}/zig /usr/bin/zig - fperms 0755 /usr/bin/zig -} -- cgit v1.2.3