summaryrefslogtreecommitdiff
path: root/dev-libs/atf
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-01-13 06:41:32 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-01-13 06:41:32 +0000
commit4b1d73e089a436406c89fadc33638314981c44e6 (patch)
tree1777930320566e090b2b462273c045e555b85b86 /dev-libs/atf
parentdc9bfd846ffa3990be92029481684342bc57218e (diff)
gentoo auto-resync : 13:01:2025 - 06:41:32
Diffstat (limited to 'dev-libs/atf')
-rw-r--r--dev-libs/atf/Manifest3
-rw-r--r--dev-libs/atf/atf-0.22-r1.ebuild (renamed from dev-libs/atf/atf-0.22.ebuild)4
-rw-r--r--dev-libs/atf/files/atf-0.22-atf_check-temp.patch43
3 files changed, 48 insertions, 2 deletions
diff --git a/dev-libs/atf/Manifest b/dev-libs/atf/Manifest
index 9a6498bddec4..cc9d8224936d 100644
--- a/dev-libs/atf/Manifest
+++ b/dev-libs/atf/Manifest
@@ -1,6 +1,7 @@
AUX atf-0.21-getopt-solaris.patch 232 BLAKE2B 7ac7189150120d732d5587970d4b39d5bc2cbcf2d173ebd9cf0886dad4ff1dca1780f5488504689e7cf94e879b6895a7132207bdcb1442b6759a0499f85cbf36 SHA512 358973cf61f4196cd5618dd9b4b258b9c454e8f44da2b3b36193d392ff21bf10b04f7f2e410326b61a489e5086caea75d8f7f1e9c25ae60b756b2c5159e1fc7b
+AUX atf-0.22-atf_check-temp.patch 1701 BLAKE2B 5d019812a8e7e20f1c4d4380900aceff38bfacebfbd8da5008ba05ab3535e4a3262555ab3de0eadf86d886faae7dd4204a4ccffcd13386ba2689403bb721cd8c SHA512 39409722f0314648f0f49a81543c882fcb1b5450076b8d17d1ad334898a8def4eb9973b49244d6d555b77ebd7dc8f7c3829addd18b233d8bdc5b1e04210b960d
DIST atf-0.21.tar.gz 567791 BLAKE2B e9449bb61008a91c10050462e84ff65c6fd88124db56ff3f6c149ff47fe8647fe8fe786cd7b1106cbfd62723a57ab613432323f266a93a4c86d8a6ab39bfcc0a SHA512 9b4b67d7d0d1f65cc9571d38c67dfc620b08ff7c0abf57d87bcae54055b4af21f95f3363f2cf8ee9b13b89a5351bc58669b784a0fd8c1beb0664c14933c10ce1
DIST atf-0.22.tar.gz 196918 BLAKE2B 9dcd71d71daeb6a9364382d93972254c303599b61be2ae5126136ee5e00a6af1c8d9e7d5b25964f6a21edff7ce1e2bbad43e9ed5819d7dcfa0b83b55fa664750 SHA512 2bf2e8cb379aae6b435bfe9deb6d235c1641ec4ae9604fcfe9bb90324fd298b0ee7b7be2df3dd80cb140fe777936b239a14bab766b72a5a9862c1a463cea9455
EBUILD atf-0.21-r3.ebuild 923 BLAKE2B 032d87d38a0061d02131f404a54d5ba1a9423e8d286dc15d1f2df7fe23b2d0d228dff6bd2cbf2e52b94f0e7fc3c46369923e9b42232b755407f8982ddf50ca86 SHA512 060f8a8cca21c08b3f0679eacad1cc0415b0cf225d5155e8b676a4a260e828c9ebbbbb94738173dbabc3a1921c86fbd49f0bca7776fa0400d7180f8e225b9185
-EBUILD atf-0.22.ebuild 815 BLAKE2B df4a45de9a9a533eeae1d383e51c00fb7fdefff83587bead09213baab0f4c94a1ed7fc793bf77fd4daa57c023ef3c85c814429cbdd8a4b1f374ca1b72708403c SHA512 3c884b02d3b1b64cd12cba809e227fc6e488ee59155d568d617905fc8ab0e63593933720a29a314ef2c5f4ede176aa2b3d3d828ff827cecd84d7f1fda1a8f225
+EBUILD atf-0.22-r1.ebuild 816 BLAKE2B f1d9bfb6c20c5c630633db62b1578fa8ea1e9cc8688aa4fdd622f1a948e9a840dc43c0b2f1e6171d0cda8fb7d13f049f5c7e9bb90e498dbc1ad8ae40cf109896 SHA512 a95a7c2a3ea3e744f613c029ca2fc8d67a46c5e234e0f32c484e3ff7859645e1aacde042f47de5c63ce958781726fda0868be636b4647d7b45cb27251927a122
MISC metadata.xml 323 BLAKE2B 2f38c262020949a8a288bb08482764ddd78788fdc9125d7786ed75939c9b8063d13c3ebab7a5ad5a6127f75d87aafef0c33ecbd554228ad69678b0577b75228c SHA512 cf1d75098067c39bebbd700c16f167bc0a5dcc245be8734d6ffdad10ec2a92fec71955c7c33b40bc0f85f3031e168bcdd10a69e6ca4bb9f8b72fc3020cfdd699
diff --git a/dev-libs/atf/atf-0.22.ebuild b/dev-libs/atf/atf-0.22-r1.ebuild
index 9bccce2933ff..79e2b1a661d3 100644
--- a/dev-libs/atf/atf-0.22.ebuild
+++ b/dev-libs/atf/atf-0.22-r1.ebuild
@@ -16,7 +16,9 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv
BDEPEND="virtual/pkgconfig"
-PATCHES=( "${FILESDIR}"/atf-0.21-getopt-solaris.patch )
+PATCHES=(
+ "${FILESDIR}"/atf-0.22-atf_check-temp.patch
+)
src_prepare() {
default
diff --git a/dev-libs/atf/files/atf-0.22-atf_check-temp.patch b/dev-libs/atf/files/atf-0.22-atf_check-temp.patch
new file mode 100644
index 000000000000..325a4d86858a
--- /dev/null
+++ b/dev-libs/atf/files/atf-0.22-atf_check-temp.patch
@@ -0,0 +1,43 @@
+https://github.com/freebsd/atf/issues/76
+https://github.com/freebsd/atf/commit/b42c98612cb99fa3f52766a46203263dc1de7187
+
+From b42c98612cb99fa3f52766a46203263dc1de7187 Mon Sep 17 00:00:00 2001
+From: Enji Cooper <ngie@FreeBSD.org>
+Date: Sat, 7 Dec 2024 17:29:17 -0800
+Subject: [PATCH] atf_check: fix std::length_error thrown from temp_file
+
+The previous logic used 2 separate calls to `atf::fs::path::str()` when
+constructing a `std::vector<char>` to pass to `mkstemp(..)`. This in
+turn caused grief with how data copying is done in atf-c(3), etc, as the
+prior code computed the length of the path of an internal buffer in
+`atf_dynstr` structs.
+
+Moreover, the code was manually appending a nul char, which was
+unnecessary when making the valid assumption that `std::string` is a
+nul-terminated string.
+
+The new code convert the path to an `std::string` once, includes the
+existing nul char in the buffer, then passes it to mkstemp(3) instead.
+The code works properly now.
+
+Closes: #76
+Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
+---
+ atf-sh/atf-check.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/atf-sh/atf-check.cpp b/atf-sh/atf-check.cpp
+index 508a9c51..f6ebc7a6 100644
+--- a/atf-sh/atf-check.cpp
++++ b/atf-sh/atf-check.cpp
+@@ -118,8 +118,8 @@ class temp_file : public std::ostream {
+ const atf::fs::path file = atf::fs::path(
+ atf::env::get("TMPDIR", "/tmp")) / pattern;
+
+- std::vector<char> buf(file.str().begin(), file.str().end());
+- buf.push_back('\0');
++ std::string file_s = file.str();
++ std::vector<char> buf(file_s.begin(), file_s.end() + 1);
+
+ m_fd = ::mkstemp(buf.data());
+ if (m_fd == -1)