public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/zig-bin/, dev-lang/zig-bin/files/
Date: Sun, 11 Sep 2022 18:13:32 +0000 (UTC)	[thread overview]
Message-ID: <1662920002.8ca3ca21d4b52133714be53407b18b04305f6358.sam@gentoo> (raw)

commit:     8ca3ca21d4b52133714be53407b18b04305f6358
Author:     Eric Joldasov <bratishkaerik <AT> getgoogleoff <DOT> me>
AuthorDate: Thu Aug 25 03:39:22 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 11 18:13:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ca3ca21

dev-lang/zig-bin: add patches for 0.9.1

Closes: https://bugs.gentoo.org/780612
Closes: https://bugs.gentoo.org/829959
Closes: https://bugs.gentoo.org/866374
Signed-off-by: Eric Joldasov <bratishkaerik <AT> getgoogleoff.me>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/zig-bin/Manifest                          |  1 +
 .../zig-bin-0.9.1-fix-bad-hostname-segfault.patch  | 26 ++++++++++++++++++++++
 .../files/zig-bin-0.9.1-fix-detecting-abi.patch    | 19 ----------------
 ...ig-bin-0.9.1.ebuild => zig-bin-0.9.1-r1.ebuild} |  7 +++++-
 4 files changed, 33 insertions(+), 20 deletions(-)

diff --git a/dev-lang/zig-bin/Manifest b/dev-lang/zig-bin/Manifest
index 65078bba09fa..c85903697075 100644
--- a/dev-lang/zig-bin/Manifest
+++ b/dev-lang/zig-bin/Manifest
@@ -1,3 +1,4 @@
+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

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 <git@vexu.eu>
+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 <bratishkaerik@getgoogleoff.me>
-
-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.ebuild b/dev-lang/zig-bin/zig-bin-0.9.1-r1.ebuild
similarity index 79%
rename from dev-lang/zig-bin/zig-bin-0.9.1.ebuild
rename to dev-lang/zig-bin/zig-bin-0.9.1-r1.ebuild
index 7aa14d86a3ea..9ed2987939d1 100644
--- a/dev-lang/zig-bin/zig-bin-0.9.1.ebuild
+++ b/dev-lang/zig-bin/zig-bin-0.9.1-r1.ebuild
@@ -17,7 +17,12 @@ KEYWORDS="-* ~amd64 ~arm ~arm64 ~x86"
 
 RDEPEND="!dev-lang/zig"
 
-PATCHES=( "${FILESDIR}/${P}-fix-detecting-abi.patch" )
+SRC_URI+=" https://codeberg.org/BratishkaErik/distfiles/media/branch/master/zig-0.9.1-fix-detecting-abi.patch"
+
+PATCHES=(
+	"${FILESDIR}/${P}-fix-bad-hostname-segfault.patch"
+	"${DISTDIR}/zig-0.9.1-fix-detecting-abi.patch"
+)
 
 QA_PREBUILT="opt/${P}/zig"
 


             reply	other threads:[~2022-09-11 18:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-11 18:13 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-23  2:08 [gentoo-commits] repo/gentoo:master commit in: dev-lang/zig-bin/, dev-lang/zig-bin/files/ Eli Schwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1662920002.8ca3ca21d4b52133714be53407b18b04305f6358.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox