diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-util/scanmem | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-util/scanmem')
-rw-r--r-- | dev-util/scanmem/Manifest | 3 | ||||
-rw-r--r-- | dev-util/scanmem/files/scanmem-0.17-musl-tests.patch | 42 | ||||
-rw-r--r-- | dev-util/scanmem/scanmem-0.17.ebuild | 14 |
3 files changed, 53 insertions, 6 deletions
diff --git a/dev-util/scanmem/Manifest b/dev-util/scanmem/Manifest index 35a9506b2c09..d2287a30886f 100644 --- a/dev-util/scanmem/Manifest +++ b/dev-util/scanmem/Manifest @@ -1,3 +1,4 @@ +AUX scanmem-0.17-musl-tests.patch 1321 BLAKE2B 2ab513443d9cbe62f82c021d7235f8f64912a49e3d24be1a8cb99297a04fffb146b9e71d84f390688b2a76cf9903e65f1c60c47267149e2434da3e0fe41fcdb5 SHA512 78a8571012e95c99326cde10085076afd591bfac1ea2f7a7d2f59f480d5add5e6f992a63aa261dc602efacdc6dd44a0bab05c000d827f72952a3d09e029d36ac DIST scanmem-0.17.tar.gz 220489 BLAKE2B b1ae07f96fd736e9ca6a5d55ad2d6b06b7d0dc4828915e0f2adaa2d58b053d9734ccd7425fb5391289249f838773cf3f9a81dbe76bacd42f41203d27dcffed05 SHA512 6d74f3d1d3492d41cabc342cfd1189815536dcbd57857d8a92e05c5dcaebcb9b1df886aee706c56eaf3344737070ea0fe852eef164ef3fe7907f66c626d8523e -EBUILD scanmem-0.17.ebuild 1079 BLAKE2B a8a0ec3eb1e5e3a1480740e27ae85aa6036d29d7b8898e16bbfa2f94f336696871c65e40c005823a6beff3e7dbc59e8f80de44f166e0f059b8bac64dfcb61fe9 SHA512 1356f396f6a9b2946fee69e1c5074defa3d8fff7dc8831b26534e813b8f10479ac56c1cf1ad6abef633f58b6dff24e8cb7597ecf9cdc130175a3eb38603698c5 +EBUILD scanmem-0.17.ebuild 1130 BLAKE2B 18acd0dd2157a5cd000b77c303266f5e69c5e9ef3e61aeed203ad1556782a0f808defd206f434717ddbdb555d7855640a754391fcd7458ed19af938ed24143fc SHA512 1beddbb319a119171cb1750b6e32dd857cae3b046a746d035bd5875884a76c0438f008a6dbd8231964fddde3c852d03302ccb333381981f5948bdbabbe692ea0 MISC metadata.xml 318 BLAKE2B 081a868e03192346a1d251caa782751d0cdc831607a57bc08b67df34737496152df6477d769da51fcfac1a2d81aa419c2e8588b27cd3f89c5dd91eb84b0f88cc SHA512 eafbe8d2c6d06413368968db5aacd89981ad7963a04b5870601c7defb9ffb515a8398ca9a8182ad10cf23d05f8fd2d7c0f681811391cd2446bd1ccc1bc9fe34d diff --git a/dev-util/scanmem/files/scanmem-0.17-musl-tests.patch b/dev-util/scanmem/files/scanmem-0.17-musl-tests.patch new file mode 100644 index 000000000000..5dcab6dfe54d --- /dev/null +++ b/dev-util/scanmem/files/scanmem-0.17-musl-tests.patch @@ -0,0 +1,42 @@ +https://github.com/scanmem/scanmem/commit/81300d05d7d55bbf8e0f6200bb4c4309a320504f +https://github.com/scanmem/scanmem/pull/396 +https://bugs.gentoo.org/713208 + +From: Andrea Stacchiotti <andreastacchiotti@gmail.com> +Date: Sun, 31 Jan 2021 16:57:44 +0100 +Subject: [PATCH] Use `size_t` instead of `int` for size variables. + +And use strtoul() instead of atoi() because atoi() returns int, even +worse if the value can not be represented, behavior is undefined. + +Patch by @shenada , some tweaks by @12345ieee . + +Closes #396 +--- a/test/memfake.c ++++ b/test/memfake.c +@@ -22,19 +22,21 @@ + #include <stdlib.h> + #include <time.h> + #include <unistd.h> ++#include <assert.h> + + int main(int argc, char **argv) + { +- uint MB_to_allocate = 1; ++ size_t MB_to_allocate = 1; + bool add_randomness = false; + +- if (argc >= 2) MB_to_allocate = atoi(argv[1]); +- if (argc >= 3) add_randomness = atoi(argv[2]); ++ if (argc >= 2) MB_to_allocate = strtoul(argv[1], NULL, 10); ++ if (argc >= 3) add_randomness = strtoul(argv[2], NULL, 10); + if (argc >= 4) return 1; + + size_t array_size = MB_to_allocate * 1024 * 1024 / sizeof(int); + + int* array = calloc(array_size, sizeof(int)); ++ assert(array != NULL); + + // Fill half with random values and leave an half of zeroes, if asked to + if (add_randomness) { + diff --git a/dev-util/scanmem/scanmem-0.17.ebuild b/dev-util/scanmem/scanmem-0.17.ebuild index 0f73625fc11a..35fff207b409 100644 --- a/dev-util/scanmem/scanmem-0.17.ebuild +++ b/dev-util/scanmem/scanmem-0.17.ebuild @@ -1,10 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 - -PYTHON_COMPAT=( python3_{8,9} ) +EAPI=8 +PYTHON_COMPAT=( python3_{8..10} ) inherit autotools python-single-r1 DESCRIPTION="Locate and modify variables in executing processes" @@ -16,7 +15,7 @@ SLOT="0" KEYWORDS="~amd64 ~riscv ~x86" IUSE="gui static-libs" -DEPEND="sys-libs/readline:0=" +DEPEND="sys-libs/readline:=" RDEPEND="${DEPEND} gui? ( ${PYTHON_DEPS} @@ -26,6 +25,10 @@ RDEPEND="${DEPEND} REQUIRED_USE="gui? ( ${PYTHON_REQUIRED_USE} )" +PATCHES=( + "${FILESDIR}"/${P}-musl-tests.patch +) + pkg_setup() { use gui && python-single-r1_pkg_setup } @@ -44,6 +47,7 @@ src_configure() { $(use_enable gui) $(use_enable static-libs static) ) + econf "${myeconfargs[@]}" } |