[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/files/, profiles/, sys-libs/libhugetlbfs/

2024-04-13 Thread Michał Górny
commit: cde90da0c3dbcad0d05466f1499b8991913f4850
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Apr 13 14:31:49 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Apr 13 14:32:55 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cde90da0

sys-libs/libhugetlbfs: Remove last-rited pkg

Bug: https://bugs.gentoo.org/806079
Signed-off-by: Michał Górny  gentoo.org>

 profiles/package.mask  |   6 -
 sys-libs/libhugetlbfs/Manifest |   1 -
 ...fs-2.23-allow-building-against-glibc-2.34.patch | 258 -
 .../files/libhugetlbfs-2.23-musl-ino_t-fix.patch   |  13 --
 .../files/libhugetlbfs-2.23-musl-nonnull-fix.patch |  31 ---
 .../libhugetlbfs-2.23-musl-path-max-fix.patch  |  22 --
 .../libhugetlbfs-2.23-musl-sc-level2-fix.patch |  45 
 .../libhugetlbfs-2.23-uncompressed-man-pages.patch |  34 ---
 .../files/libhugetlbfs-2.6-fixup-testsuite.patch   |  31 ---
 sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild | 175 --
 sys-libs/libhugetlbfs/metadata.xml |  12 -
 11 files changed, 628 deletions(-)

diff --git a/profiles/package.mask b/profiles/package.mask
index bf8b22e2d9d0..d1d21c35d120 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -745,12 +745,6 @@ sci-chemistry/mdtraj
 # Test failure in watchpoints.dem, undefined function FresnelC.
 ~sci-visualization/gnuplot-6.0.0
 
-# Michał Górny  (2024-02-07)
-# Does not build anymore.  Carries a large stack of patches already.
-# Last upstream activity in late 2020.  No reverse dependencies left.
-# Removal on 2024-03-08.  Bug #806079.
-sys-libs/libhugetlbfs
-
 # Andrew Ammerlaan  (2024-01-24)
 # app-misc/ddcutil-2.1.0 causes core-dump crashes in
 # kde-plasma/powerdevil[brightness-control].

diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
deleted file mode 100644
index ffd498e94ecf..
--- a/sys-libs/libhugetlbfs/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libhugetlbfs-2.23.tar.gz 175459 BLAKE2B 
f469ff9a65364e9f0e04c11c8010c958855ebd4d50e1dd719576cda7c280586623404304be64a794907a5fb1d97bd9c0620a91d7a2492577e04fa40ff432b4c7
 SHA512 
fc9a7d59bcda9d3ca9c9e43a3a348f989c9cbdbbb77f21a43a06e71eacd05bbe5a7b2b51e20ae9ea00da9f1c4d1130da529bbfb702e8c9d11cab6efadd3dc168

diff --git 
a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch
 
b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch
deleted file mode 100644
index 68e121e240ab..
--- 
a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch
+++ /dev/null
@@ -1,258 +0,0 @@
-From 959d74fd0fbbff310943096e15024a84e8f5cba4 Mon Sep 17 00:00:00 2001
-From: Matheus Castanho 
-Date: Thu, 12 Aug 2021 16:38:46 -0300
-Subject: [PATCH] Disable hugepage-backed malloc if __morecore is not available
-
-Starting with glibc 2.32, __morecore hook has been marked as deprecated, and 
was
-completely removed on glibc 2.34, which causes an undefined symbol error during
-the build of libhugetlbfs.
-
-Greater changes are needed in order to keep providing the same functionality
-with future versions of glibc (see issue #52). Meanwhile, we can disable
-hugepage-backed malloc setup if __morecore is not available so users can at
-least keep using the other features provided by the library.  Related tests are
-also conditionally disabled, and will show as SKIPPED if __morecore is not
-available.
-
-Tested on powerpc64le and x86_64 with glibc 2.34 and olders.
-
-Signed-off-by: Matheus Castanho 

- Makefile   |  6 +
- morecore.c |  8 ++
- tests/run_tests.py | 67 +++---
- 3 files changed, 71 insertions(+), 10 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 8b73523..35e53e7 100644
 a/Makefile
-+++ b/Makefile
-@@ -192,6 +192,12 @@ endif
- endif
- endif
- 
-+# glibc 2.34 removed __morecore, so it may not be available with recent 
versions
-+HAS_MORECORE := $(shell /bin/echo -e '\#include \nvoid * 
morecore_exists() { return &__morecore; }' | $(CC) -c -xc -o /dev/null - &> 
/dev/null && /bin/echo yes || /bin/echo no)
-+ifeq ($(HAS_MORECORE),yes)
-+CFLAGS += -DHAS_MORECORE
-+endif
-+
- HEADERDIR = $(PREFIX)/include
- LIBDIR32 = $(PREFIX)/$(LIB32)
- LIBDIR64 = $(PREFIX)/$(LIB64)
-diff --git a/morecore.c b/morecore.c
-index 6563bbd..405c566 100644
 a/morecore.c
-+++ b/morecore.c
-@@ -33,6 +33,13 @@
- 
- #include "libhugetlbfs_internal.h"
- 
-+#ifndef HAS_MORECORE
-+void hugetlbfs_setup_morecore(void)
-+{
-+  INFO("Not setting up morecore because it's not available (see issue 
#52).\n");
-+}
-+#else
-+
- static int heap_fd;
- 
- static void *heapbase;
-@@ -381,3 +388,4 @@ void hugetlbfs_setup_morecore(void)
-* to mmap() if we run out of hugepages. */
-   mallopt(M_MMAP_MAX, 0);
- }
-+#endif /* HAS_MORECORE */
-diff --git a/tests/run_tests.py 

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/files/, sys-libs/libhugetlbfs/

2022-08-31 Thread Sam James
commit: dbabd1516a53fa57ae0204216ae78741bd4928c9
Author: brahmajit das  protonmail  com>
AuthorDate: Sat Jul 23 18:47:48 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Sep  1 02:04:23 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbabd151

sys-libs/libhugetlbfs: fix musl build errors

Fix _SC_LEVEL2_CACHE_LINESIZE undeclared and misc issues.

Patches for musl that mainly closes bug 828830, plus some other patches
for errors that come along 828830.

Closes: https://bugs.gentoo.org/828830
Closes: https://bugs.gentoo.org/832980
Signed-off-by: brahmajit das  protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26539
Signed-off-by: Sam James  gentoo.org>

 .../files/libhugetlbfs-2.23-musl-ino_t-fix.patch   | 13 +++
 .../files/libhugetlbfs-2.23-musl-nonnull-fix.patch | 31 +++
 .../libhugetlbfs-2.23-musl-path-max-fix.patch  | 22 +++
 .../libhugetlbfs-2.23-musl-sc-level2-fix.patch | 45 ++
 sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild |  4 ++
 5 files changed, 115 insertions(+)

diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-ino_t-fix.patch 
b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-ino_t-fix.patch
new file mode 100644
index ..f408f9fd6ac0
--- /dev/null
+++ b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-ino_t-fix.patch
@@ -0,0 +1,13 @@
+# Include dirent.h for ino_t
+# Fixes error: unknown typename 'ino_t'
+# Closes: https://bugs.gentoo.org/828830
+--- a/tests/hugetests.h
 b/tests/hugetests.h
+@@ -22,6 +22,7 @@
+
+ #include 
+ #include 
++#include 
+ #include 
+
+ #include "libhugetlbfs_privutils.h"

diff --git 
a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-nonnull-fix.patch 
b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-nonnull-fix.patch
new file mode 100644
index ..5e3532e50877
--- /dev/null
+++ b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-nonnull-fix.patch
@@ -0,0 +1,31 @@
+# Use __nonnull only on glibc system
+# Closes: https://bugs.gentoo.org/832980
+--- a/shm.c
 b/shm.c
+@@ -35,6 +35,12 @@
+ #endif
+
+ #ifdef HAVE_SHMGET_SYSCALL
++
++/* define __THROW to avoid build issue when it's not available from the libc 
*/
++#ifndef __THROW
++#define __THROW
++#endif
++
+ /*
+  * The calls to dlsym() and dlerror() in the shmget() wrapper below force
+  * a dependency on libdl.so.  This does not work for static executables
+@@ -48,8 +54,13 @@
+  * system shmget() may be performed without worry as there is no dynamic
+  * call chain.
+  */
++#ifdef __GLIBC__
+ extern void *dlsym (void *__restrict __handle, __const char *__restrict 
__name)
+   __attribute__((weak)) __THROW __nonnull ((2));
++#else
++extern void *dlsym (void *__restrict __handle, __const char *__restrict 
__name)
++  __attribute__((weak)) __THROW __attribute__((nonnull((2;
++#endif // __GLIBC__
+ extern char *dlerror (void) __attribute__((weak)) __THROW;
+
+

diff --git 
a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-path-max-fix.patch 
b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-path-max-fix.patch
new file mode 100644
index ..883bb3e98fc7
--- /dev/null
+++ b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-path-max-fix.patch
@@ -0,0 +1,22 @@
+# Include limits.h for PATH_MAX
+# Closes: https://bugs.gentoo.org/828830
+--- a/hugeadm.c
 b/hugeadm.c
+@@ -33,6 +33,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+
+ #include 
+ #include 
+--- a/tests/gethugepagesizes.c
 b/tests/gethugepagesizes.c
+@@ -27,6 +27,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+

diff --git 
a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-sc-level2-fix.patch 
b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-sc-level2-fix.patch
new file mode 100644
index ..c42e017abec1
--- /dev/null
+++ b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-sc-level2-fix.patch
@@ -0,0 +1,45 @@
+# _SC_LEVEL2_CACHE_LINESIZE is most probably Glibc specific define. Hence we
+# cannot use it with other libc's. Check if _SC_LEVEL2_CACHE_LINESIZE is
+# available or use custom function to get CPU cache size
+# Original patch was found here [1]
+# [1]: 
https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch
+# Closes: https://bugs.gentoo.org/828830
+--- a/alloc.c
 b/alloc.c
+@@ -245,6 +245,24 @@ void free_huge_pages(void *ptr)
+   __free_huge_pages(ptr, 1);
+ }
+
++/*
++ * Avoid sysconf(_SC_LEVEL2_CACHE_LINESIZE) on linux
++ * Taken from the folling patch [1]
++ *
++ * [1]: 
https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch
++ */
++#if !defined(_SC_LEVEL2_CACHE_LINESIZE)
++static size_t get_cacheline_size() {
++  FILE * fp = 

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2022-08-27 Thread Sam James
commit: 578071144ba3fa8d1c463abb8cede2daac0379a4
Author: Sam James  gentoo  org>
AuthorDate: Sat Aug 27 11:23:16 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Aug 27 11:23:16 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57807114

sys-libs/libhugetlbfs: fix bash test

Signed-off-by: Sam James  gentoo.org>

 sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
index f31724207108..7702cc3283c3 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
@@ -38,7 +38,7 @@ src_prepare() {
-e 's@^\(ARCH\) ?=@\1 =@' \
Makefile || die "sed failed"
 
-   if [ "$(get_libdir)" == "lib64" ]; then
+   if [[ "$(get_libdir)" == "lib64" ]]; then
sed -i \
-e "/^LIB\(32\)/s:=.*:= lib32:" \
Makefile



[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2022-05-07 Thread Sam James
commit: de0e5cd60d93c76c320f93747ec4fb0ea61b380b
Author: Sam James  gentoo  org>
AuthorDate: Sat May  7 06:31:46 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sat May  7 07:16:56 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de0e5cd6

sys-libs/libhugetlbfs: enable py3.10 and disable py3.7

Signed-off-by: Sam James  gentoo.org>

 sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
index b20145724f82..f31724207108 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{8..10} )
 
 inherit toolchain-funcs python-any-r1
 
@@ -49,17 +49,6 @@ src_prepare() {
[[ -f version ]] || echo "${PV}" > version
 }
 
-src_compile() {
-   tc-export AR
-   emake CC="$(tc-getCC)" libs tools
-}
-
-src_install() {
-   default
-
-   use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
-}
-
 src_test_alloc_one() {
hugeadm="${1}"
sign="${2}"
@@ -169,3 +158,14 @@ src_test() {
 
return ${rc}
 }
+
+src_compile() {
+   tc-export AR
+   emake CC="$(tc-getCC)" libs tools
+}
+
+src_install() {
+   default
+
+   use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
+}



[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2022-04-14 Thread Yixun Lan
commit: 4a7d0d5524082d14f78666836552dd1a91eab24b
Author: Yixun Lan  gentoo  org>
AuthorDate: Wed Apr 13 11:37:28 2022 +
Commit: Yixun Lan  gentoo  org>
CommitDate: Thu Apr 14 08:22:25 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a7d0d55

sys-libs/libhugetlbfs: keyword 2.23 for ~riscv

Signed-off-by: Yixun Lan  gentoo.org>

 sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
index c091b4a8c00b..b20145724f82 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -13,7 +13,7 @@ 
SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> ${
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~s390 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~s390 ~x86"
 IUSE="static-libs test"
 RESTRICT="!test? ( test )"
 



[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/files/, sys-libs/libhugetlbfs/

2021-11-18 Thread Thomas Deutschmann
commit: ed5576e429fac992d5c039e5f2290cc2d5d8d6f4
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Thu Nov 18 13:59:38 2021 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Thu Nov 18 13:59:48 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed5576e4

sys-libs/libhugetlbfs: allow building against glibc-2.34

Bug: https://bugs.gentoo.org/806079
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann  gentoo.org>

 ...fs-2.23-allow-building-against-glibc-2.34.patch | 258 +
 sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild |   1 +
 2 files changed, 259 insertions(+)

diff --git 
a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch
 
b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch
new file mode 100644
index ..68e121e240ab
--- /dev/null
+++ 
b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch
@@ -0,0 +1,258 @@
+From 959d74fd0fbbff310943096e15024a84e8f5cba4 Mon Sep 17 00:00:00 2001
+From: Matheus Castanho 
+Date: Thu, 12 Aug 2021 16:38:46 -0300
+Subject: [PATCH] Disable hugepage-backed malloc if __morecore is not available
+
+Starting with glibc 2.32, __morecore hook has been marked as deprecated, and 
was
+completely removed on glibc 2.34, which causes an undefined symbol error during
+the build of libhugetlbfs.
+
+Greater changes are needed in order to keep providing the same functionality
+with future versions of glibc (see issue #52). Meanwhile, we can disable
+hugepage-backed malloc setup if __morecore is not available so users can at
+least keep using the other features provided by the library.  Related tests are
+also conditionally disabled, and will show as SKIPPED if __morecore is not
+available.
+
+Tested on powerpc64le and x86_64 with glibc 2.34 and olders.
+
+Signed-off-by: Matheus Castanho 
+---
+ Makefile   |  6 +
+ morecore.c |  8 ++
+ tests/run_tests.py | 67 +++---
+ 3 files changed, 71 insertions(+), 10 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8b73523..35e53e7 100644
+--- a/Makefile
 b/Makefile
+@@ -192,6 +192,12 @@ endif
+ endif
+ endif
+ 
++# glibc 2.34 removed __morecore, so it may not be available with recent 
versions
++HAS_MORECORE := $(shell /bin/echo -e '\#include \nvoid * 
morecore_exists() { return &__morecore; }' | $(CC) -c -xc -o /dev/null - &> 
/dev/null && /bin/echo yes || /bin/echo no)
++ifeq ($(HAS_MORECORE),yes)
++CFLAGS += -DHAS_MORECORE
++endif
++
+ HEADERDIR = $(PREFIX)/include
+ LIBDIR32 = $(PREFIX)/$(LIB32)
+ LIBDIR64 = $(PREFIX)/$(LIB64)
+diff --git a/morecore.c b/morecore.c
+index 6563bbd..405c566 100644
+--- a/morecore.c
 b/morecore.c
+@@ -33,6 +33,13 @@
+ 
+ #include "libhugetlbfs_internal.h"
+ 
++#ifndef HAS_MORECORE
++void hugetlbfs_setup_morecore(void)
++{
++  INFO("Not setting up morecore because it's not available (see issue 
#52).\n");
++}
++#else
++
+ static int heap_fd;
+ 
+ static void *heapbase;
+@@ -381,3 +388,4 @@ void hugetlbfs_setup_morecore(void)
+* to mmap() if we run out of hugepages. */
+   mallopt(M_MMAP_MAX, 0);
+ }
++#endif /* HAS_MORECORE */
+diff --git a/tests/run_tests.py b/tests/run_tests.py
+index 018264d..871d04d 100755
+--- a/tests/run_tests.py
 b/tests/run_tests.py
+@@ -60,7 +60,7 @@ def snapshot_pool_state():
+ l.append((d, tuple(substate)))
+ return tuple(l)
+ 
+-def run_test_prog(bits, pagesize, cmd, **env):
++def run_test_prog(bits, pagesize, cmd, output='stdout', **env):
+ if paranoid_pool_check:
+ beforepool = snapshot_pool_state()
+ print("Pool state: %s" % str(beforepool))
+@@ -73,15 +73,17 @@ def run_test_prog(bits, pagesize, cmd, **env):
+ % (bits, bits, local_env.get("LD_LIBRARY_PATH", ""))
+ local_env["HUGETLB_DEFAULT_PAGE_SIZE"] = repr(pagesize)
+ 
++popen_args = {'env' : local_env, output : subprocess.PIPE}
++
+ try:
+-p = subprocess.Popen(cmd, env=local_env, stdout=subprocess.PIPE)
++p = subprocess.Popen(cmd, **popen_args)
+ rc = p.wait()
+ except KeyboardInterrupt:
+ # Abort and mark this a strange test result
+ return (None, "")
+ except OSError as e:
+ return (-e.errno, "")
+-out = p.stdout.read().decode().strip()
++out = getattr(p, output).read().decode().strip()
+ 
+ if paranoid_pool_check:
+ afterpool = snapshot_pool_state()
+@@ -309,6 +311,33 @@ def check_linkhuge_tests():
+ okbits.add(bits)
+ return okbits
+ 
++def check_morecore_disabled():
++"""
++Check if support for morecore is available.
++
++Newer glibc versions (>= 2.34) removed the __morecore malloc hook, so 
tests
++relying on that functionality will not work as expected, and should be
++disabled.
++"""
++global morecore_disabled, wordsizes, pagesizes
++
++# Quick 

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2021-05-14 Thread David Seifert
commit: 44480ce932a771ca1fcb2af51d803294e81e5ef2
Author: David Seifert  gentoo  org>
AuthorDate: Fri May 14 22:13:44 2021 +
Commit: David Seifert  gentoo  org>
CommitDate: Fri May 14 22:13:44 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44480ce9

sys-libs/libhugetlbfs: drop 2.22

Signed-off-by: David Seifert  gentoo.org>

 sys-libs/libhugetlbfs/Manifest |   1 -
 sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild | 165 -
 2 files changed, 166 deletions(-)

diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
index a5167aec9e3..ffd498e94ec 100644
--- a/sys-libs/libhugetlbfs/Manifest
+++ b/sys-libs/libhugetlbfs/Manifest
@@ -1,2 +1 @@
-DIST libhugetlbfs-2.22.tar.gz 175099 BLAKE2B 
e67a6a678065b10492d510b733b7c6e2926f4f01dd741d49f6e76cedde002fa81d7dad6a6fd8922443c6aacd527c9b3df35f84b8da7332c04e3fcf8c52e23084
 SHA512 
7f38f9fa576841f36c7cd5192a9ee3f79b275b7b64d7e2a838a43636489cf88627bdba3a045d6b3302a4a509cf64627972b569b4c2c3c4fe05d5aa4ae1d66fd8
 DIST libhugetlbfs-2.23.tar.gz 175459 BLAKE2B 
f469ff9a65364e9f0e04c11c8010c958855ebd4d50e1dd719576cda7c280586623404304be64a794907a5fb1d97bd9c0620a91d7a2492577e04fa40ff432b4c7
 SHA512 
fc9a7d59bcda9d3ca9c9e43a3a348f989c9cbdbbb77f21a43a06e71eacd05bbe5a7b2b51e20ae9ea00da9f1c4d1130da529bbfb702e8c9d11cab6efadd3dc168

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild
deleted file mode 100644
index 8b11ae28651..000
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-
-inherit toolchain-funcs python-any-r1
-
-DESCRIPTION="Easy hugepage access"
-HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs;
-SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> 
${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~s390 ~x86"
-IUSE="static-libs test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="test? ( ${PYTHON_DEPS} )"
-
-PATCHES=(
-   "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
-)
-
-src_prepare() {
-   default
-   sed -i \
-   -e '/^PREFIX/s:/local::' \
-   -e '1iBUILDTYPE = NATIVEONLY' \
-   -e '1iV = 1' \
-   -e '/gzip.*MANDIR/d' \
-   -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
-   -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
-   -e 's@^\(ARCH\) ?=@\1 =@' \
-   Makefile || die "sed failed"
-   if [ "$(get_libdir)" == "lib64" ]; then
-   sed -i \
-   -e "/^LIB\(32\)/s:=.*:= lib32:" \
-   Makefile
-   fi
-
-   # Tarballs from github don't have the version set.
-   # https://github.com/libhugetlbfs/libhugetlbfs/issues/7
-   [[ -f version ]] || echo "${PV}" > version
-}
-
-src_compile() {
-   tc-export AR
-   emake CC="$(tc-getCC)" libs tools
-}
-
-src_install() {
-   default
-   use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
-}
-
-src_test_alloc_one() {
-   hugeadm="${1}"
-   sign="${2}"
-   pagesize="${3}"
-   pagecount="${4}"
-   ${hugeadm} \
-   --pool-pages-max ${pagesize}:${sign}${pagecount} \
-   && \
-   ${hugeadm} \
-   --pool-pages-min ${pagesize}:${sign}${pagecount}
-   return $?
-}
-
-# die is NOT allowed in this src_test block after the marked point, so that we
-# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
-src_test() {
-   [[ ${UID} -eq 0 ]] || die "Need FEATURES=-userpriv to run this 
testsuite"
-   einfo "Building testsuite"
-   emake -j1 tests
-
-   local hugeadm='obj/hugeadm'
-   local allocated=''
-   local rc=0
-   # the testcases need 64MiB per pagesize.
-   local MIN_HUGEPAGE_RAM=$((64*1024*1024))
-
-   einfo "Planning allocation"
-   local PAGESIZES="$(${hugeadm} --page-sizes-all)"
-
-   # Need to do this before we can create the mountpoints.
-   local pagesize pagecount
-   for pagesize in ${PAGESIZES} ; do
-   # The kernel depends on the location :-(
-   mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
-   addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
-   done
-
-   addwrite /proc/sys/vm/
-   addwrite /proc/sys/kernel/shmall
-   addwrite /proc/sys/kernel/shmmax
-   addwrite /proc/sys/kernel/shmmni
-
-   einfo "Checking HugeTLB mountpoints"
-   ${hugeadm} --create-mounts || die "Failed to set up hugetlb 
mountpoints."
-
-   # -
-   # - die is unsafe after this point. ---
-   # -
-
-   einfo "Starting allocation"
-

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2020-09-09 Thread Thomas Deutschmann
commit: 39fc2ebd4d6f9a7f866485735704745e2c1e88a9
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Wed Sep  9 21:31:51 2020 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Wed Sep  9 21:43:09 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39fc2ebd

sys-libs/libhugetlbfs: bump to v2.23

Package-Manager: Portage-3.0.6, Repoman-3.0.1
Signed-off-by: Thomas Deutschmann  gentoo.org>

 sys-libs/libhugetlbfs/Manifest |   1 +
 sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild | 159 +
 2 files changed, 160 insertions(+)

diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
index 64af61835b8..a5167aec9e3 100644
--- a/sys-libs/libhugetlbfs/Manifest
+++ b/sys-libs/libhugetlbfs/Manifest
@@ -1 +1,2 @@
 DIST libhugetlbfs-2.22.tar.gz 175099 BLAKE2B 
e67a6a678065b10492d510b733b7c6e2926f4f01dd741d49f6e76cedde002fa81d7dad6a6fd8922443c6aacd527c9b3df35f84b8da7332c04e3fcf8c52e23084
 SHA512 
7f38f9fa576841f36c7cd5192a9ee3f79b275b7b64d7e2a838a43636489cf88627bdba3a045d6b3302a4a509cf64627972b569b4c2c3c4fe05d5aa4ae1d66fd8
+DIST libhugetlbfs-2.23.tar.gz 175459 BLAKE2B 
f469ff9a65364e9f0e04c11c8010c958855ebd4d50e1dd719576cda7c280586623404304be64a794907a5fb1d97bd9c0620a91d7a2492577e04fa40ff432b4c7
 SHA512 
fc9a7d59bcda9d3ca9c9e43a3a348f989c9cbdbbb77f21a43a06e71eacd05bbe5a7b2b51e20ae9ea00da9f1c4d1130da529bbfb702e8c9d11cab6efadd3dc168

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
new file mode 100644
index 000..255bcb160f2
--- /dev/null
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8,9} )
+
+inherit multilib toolchain-funcs python-any-r1
+
+DESCRIPTION="easy hugepage access"
+HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs;
+SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~s390 ~x86"
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+
+DEPEND="test? ( ${PYTHON_DEPS} )"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
+)
+
+src_prepare() {
+   default
+   sed -i \
+   -e '/^PREFIX/s:/local::' \
+   -e '1iBUILDTYPE = NATIVEONLY' \
+   -e '1iV = 1' \
+   -e '/gzip.*MANDIR/d' \
+   -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
+   -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
+   -e 's@^\(ARCH\) ?=@\1 =@' \
+   Makefile || die "sed failed"
+   if [ "$(get_libdir)" == "lib64" ]; then
+   sed -i \
+   -e "/^LIB\(32\)/s:=.*:= lib32:" \
+   Makefile
+   fi
+
+   # Tarballs from github don't have the version set.
+   # https://github.com/libhugetlbfs/libhugetlbfs/issues/7
+   [[ -f version ]] || echo "${PV}" > version
+}
+
+src_compile() {
+   tc-export AR
+   emake CC="$(tc-getCC)" libs tools
+}
+
+src_install() {
+   default
+   use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
+}
+
+src_test_alloc_one() {
+   hugeadm="$1"
+   sign="$2"
+   pagesize="$3"
+   pagecount="$4"
+   ${hugeadm} \
+   --pool-pages-max ${pagesize}:${sign}${pagecount} \
+   && \
+   ${hugeadm} \
+   --pool-pages-min ${pagesize}:${sign}${pagecount}
+   return $?
+}
+
+# die is NOT allowed in this src_test block after the marked point, so that we
+# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
+src_test() {
+   [[ $UID -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
+   einfo "Building testsuite"
+   emake -j1 tests
+
+   local hugeadm='obj/hugeadm'
+   local allocated=''
+   local rc=0
+   # the testcases need 64MiB per pagesize.
+   local MIN_HUGEPAGE_RAM=$((64*1024*1024))
+
+   einfo "Planning allocation"
+   local PAGESIZES="$(${hugeadm} --page-sizes-all)"
+
+   # Need to do this before we can create the mountpoints.
+   local pagesize pagecount
+   for pagesize in ${PAGESIZES} ; do
+   # The kernel depends on the location :-(
+   mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
+   addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
+   done
+   addwrite /proc/sys/vm/
+   addwrite /proc/sys/kernel/shmall
+   addwrite /proc/sys/kernel/shmmax
+   addwrite /proc/sys/kernel/shmmni
+
+   einfo "Checking HugeTLB mountpoints"
+   ${hugeadm} --create-mounts || die "Failed to set up hugetlb 
mountpoints."
+
+   # -
+   # - die is unsafe after this point. ---
+   # 

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/, sys-libs/libhugetlbfs/files/

2020-09-09 Thread Thomas Deutschmann
commit: 33212addfeda3946e488ea711a667a61adde96d2
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Wed Sep  9 21:42:40 2020 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Wed Sep  9 21:43:09 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33212add

sys-libs/libhugetlbfs: install uncompressed man pages

Closes: https://bugs.gentoo.org/704326
Package-Manager: Portage-3.0.6, Repoman-3.0.1
Signed-off-by: Thomas Deutschmann  gentoo.org>

 .../libhugetlbfs-2.23-uncompressed-man-pages.patch | 34 ++
 sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild |  1 +
 2 files changed, 35 insertions(+)

diff --git 
a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-uncompressed-man-pages.patch 
b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-uncompressed-man-pages.patch
new file mode 100644
index 000..c0ca6a398e7
--- /dev/null
+++ b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-uncompressed-man-pages.patch
@@ -0,0 +1,34 @@
+--- a/Makefile
 b/Makefile
+@@ -436,27 +436,19 @@ install-man:
+   $(INSTALL) -d $(DESTDIR)$(MANDIR8)
+   for x in $(INSTALL_MAN1); do \
+   $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR1); \
+-  gzip -f $(DESTDIR)$(MANDIR1)/$$x; \
+   done
+   for x in $(INSTALL_MAN3); do \
+   $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR3); \
+-  gzip -f $(DESTDIR)$(MANDIR3)/$$x; \
+   done
+-  rm -f $(DESTDIR)$(MANDIR3)/free_huge_pages.3.gz
+-  rm -f $(DESTDIR)$(MANDIR3)/free_hugepage_region.3.gz
+-  rm -f $(DESTDIR)$(MANDIR3)/hugetlbfs_unlinked_fd_for_size.3.gz
+-  rm -f $(DESTDIR)$(MANDIR3)/hugetlbfs_find_path_for_size.3.gz
+-  ln -s get_huge_pages.3.gz $(DESTDIR)$(MANDIR3)/free_huge_pages.3.gz
+-  ln -s get_hugepage_region.3.gz 
$(DESTDIR)$(MANDIR3)/free_hugepage_region.3.gz
+-  ln -s hugetlbfs_unlinked_fd.3.gz 
$(DESTDIR)$(MANDIR3)/hugetlbfs_unlinked_fd_for_size.3.gz
+-  ln -s hugetlbfs_find_path.3.gz 
$(DESTDIR)$(MANDIR3)/hugetlbfs_find_path_for_size.3.gz
++  ln -s get_huge_pages.3 $(DESTDIR)$(MANDIR3)/free_huge_pages.3
++  ln -s get_hugepage_region.3 $(DESTDIR)$(MANDIR3)/free_hugepage_region.3
++  ln -s hugetlbfs_unlinked_fd.3 
$(DESTDIR)$(MANDIR3)/hugetlbfs_unlinked_fd_for_size.3
++  ln -s hugetlbfs_find_path.3 
$(DESTDIR)$(MANDIR3)/hugetlbfs_find_path_for_size.3
+   for x in $(INSTALL_MAN7); do \
+   $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR7); \
+-  gzip -f $(DESTDIR)$(MANDIR7)/$$x; \
+   done
+   for x in $(INSTALL_MAN8); do \
+   $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR8); \
+-  gzip -f $(DESTDIR)$(MANDIR8)/$$x; \
+   done
+ 
+ install-bin:

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
index 255bcb160f2..509763949e6 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
@@ -21,6 +21,7 @@ DEPEND="test? ( ${PYTHON_DEPS} )"
 
 PATCHES=(
"${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
+   "${FILESDIR}"/${PN}-2.23-uncompressed-man-pages.patch
 )
 
 src_prepare() {



[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2020-09-02 Thread Thomas Deutschmann
commit: bbacf6e60493b302911e52c21621b6a134a2ca6e
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Wed Sep  2 16:19:48 2020 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Wed Sep  2 16:19:48 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbacf6e6

sys-libs/libhugetlbfs: drop old

Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Thomas Deutschmann  gentoo.org>

 sys-libs/libhugetlbfs/Manifest |   1 -
 sys-libs/libhugetlbfs/libhugetlbfs-2.21.ebuild | 158 -
 2 files changed, 159 deletions(-)

diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
index 4ded3f0740b..64af61835b8 100644
--- a/sys-libs/libhugetlbfs/Manifest
+++ b/sys-libs/libhugetlbfs/Manifest
@@ -1,2 +1 @@
-DIST libhugetlbfs-2.21.tar.gz 173052 BLAKE2B 
a65fdeee3ed9ad8cb69f772847646befbf5deef0b82d6cb7338e5ff448d5c2461ceb1e381b9515e79f4243482589bb0203874cc52e5c8c6d98667df4eacffa8b
 SHA512 
87fd95a826bedc2c53b1aa440f5db7ff3ece482d520545b597d4d1231cf84276103c312899b812166872444331bc7b6f1692f0d3b7cbff691efdcf9c2e99b1d0
 DIST libhugetlbfs-2.22.tar.gz 175099 BLAKE2B 
e67a6a678065b10492d510b733b7c6e2926f4f01dd741d49f6e76cedde002fa81d7dad6a6fd8922443c6aacd527c9b3df35f84b8da7332c04e3fcf8c52e23084
 SHA512 
7f38f9fa576841f36c7cd5192a9ee3f79b275b7b64d7e2a838a43636489cf88627bdba3a045d6b3302a4a509cf64627972b569b4c2c3c4fe05d5aa4ae1d66fd8

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.21.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.21.ebuild
deleted file mode 100644
index 8afaeb6120b..000
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.21.ebuild
+++ /dev/null
@@ -1,158 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit multilib toolchain-funcs python-any-r1
-
-DESCRIPTION="easy hugepage access"
-HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs;
-SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> 
${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~s390 ~x86"
-IUSE="static-libs test"
-RESTRICT="!test? ( test )"
-
-DEPEND="test? ( ${PYTHON_DEPS} )"
-
-PATCHES=(
-   "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
-)
-
-src_prepare() {
-   default
-   sed -i \
-   -e '/^PREFIX/s:/local::' \
-   -e '1iBUILDTYPE = NATIVEONLY' \
-   -e '1iV = 1' \
-   -e '/gzip.*MANDIR/d' \
-   -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
-   -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
-   -e 's@^\(ARCH\) ?=@\1 =@' \
-   Makefile || die "sed failed"
-   if [ "$(get_libdir)" == "lib64" ]; then
-   sed -i \
-   -e "/^LIB\(32\)/s:=.*:= lib32:" \
-   Makefile
-   fi
-
-   # Tarballs from github don't have the version set.
-   # https://github.com/libhugetlbfs/libhugetlbfs/issues/7
-   [[ -f version ]] || echo "${PV}" > version
-}
-
-src_compile() {
-   tc-export AR
-   emake CC="$(tc-getCC)" libs tools
-}
-
-src_install() {
-   default
-   use static-libs || rm -f "${ED%/}"/usr/$(get_libdir)/*.a
-}
-
-src_test_alloc_one() {
-   hugeadm="$1"
-   sign="$2"
-   pagesize="$3"
-   pagecount="$4"
-   ${hugeadm} \
-   --pool-pages-max ${pagesize}:${sign}${pagecount} \
-   && \
-   ${hugeadm} \
-   --pool-pages-min ${pagesize}:${sign}${pagecount}
-   return $?
-}
-
-# die is NOT allowed in this src_test block after the marked point, so that we
-# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
-src_test() {
-   [[ $UID -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
-   einfo "Building testsuite"
-   emake -j1 tests
-
-   hugeadm='obj/hugeadm'
-   allocated=''
-   rc=0
-   # the testcases need 64MiB per pagesize.
-   MIN_HUGEPAGE_RAM=$((64*1024*1024))
-
-   einfo "Planning allocation"
-   PAGESIZES="$(${hugeadm} --page-sizes-all)"
-
-   # Need to do this before we can create the mountpoints.
-   for pagesize in ${PAGESIZES} ; do
-   # The kernel depends on the location :-(
-   mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
-   addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
-   done
-   addwrite /proc/sys/vm/
-   addwrite /proc/sys/kernel/shmall
-   addwrite /proc/sys/kernel/shmmax
-   addwrite /proc/sys/kernel/shmmni
-
-   einfo "Checking HugeTLB mountpoints"
-   ${hugeadm} --create-mounts || die "Failed to set up hugetlb 
mountpoints."
-
-   # -
-   # - die is unsafe after this point. ---
-   # -
-
-   einfo "Starting allocation"
-   for 

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2020-09-02 Thread Thomas Deutschmann
commit: df20f3d0292d2beada0f74ca23edf57adf6d6e6a
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Wed Sep  2 16:19:24 2020 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Wed Sep  2 16:19:24 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df20f3d0

sys-libs/libhugetlbfs: add Python 3.8+ support

Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Thomas Deutschmann  gentoo.org>

 sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild
index d0f6b415a62..255bcb160f2 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{6,7} )
+PYTHON_COMPAT=( python3_{6,7,8,9} )
 
 inherit multilib toolchain-funcs python-any-r1
 



[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/files/

2019-11-18 Thread Aaron Bauman
commit: 2d58b63f8b08a94af2d27e0f447914355db3fefb
Author: Michael Mair-Keimberger  gmail  com>
AuthorDate: Thu Nov 14 15:16:27 2019 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Mon Nov 18 22:16:36 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d58b63f

sys-libs/libhugetlbfs: remove unused patches

Signed-off-by: Michael Mair-Keimberger  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/13652
Signed-off-by: Aaron Bauman  gentoo.org>

 .../files/libhugetlbfs-2.20-noexec-stack.patch | 135 -
 .../files/libhugetlbfs-2.9-build.patch |  31 -
 2 files changed, 166 deletions(-)

diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.20-noexec-stack.patch 
b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.20-noexec-stack.patch
deleted file mode 100644
index 04c8baee37b..000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.20-noexec-stack.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-https://github.com/libhugetlbfs/libhugetlbfs/pull/9
-
-From 1c41d751d57a598919c40ab9c27514a98da93273 Mon Sep 17 00:00:00 2001
-From: "Robin H. Johnson" 
-Date: Sat, 31 Oct 2009 07:59:57 +
-Subject: [PATCH] set noexec markers in the asm file directly
-
-Using -Wl,-z,noexecstack can hide real exec stack issues coming from other
-files, and is a bit unportable.  Instead, set proper section markers in the
-assembly files directly.  It also means people using the static libraries
-won't have to use -Wl,-z,noexecstack when they link their code.

- Makefile| 2 +-
- sys-aarch64elf.S| 4 
- sys-armelf_linux_eabi.S | 4 
- sys-elf32ppclinux.S | 4 
- sys-elf64_s390.S| 4 
- sys-elf64ppc.S  | 4 
- sys-elf_i386.S  | 4 
- sys-elf_s390.S  | 4 
- sys-elf_x86_64.S| 4 
- 9 files changed, 33 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 73ebad7..ca987d9 100644
 a/Makefile
-+++ b/Makefile
-@@ -27,7 +27,7 @@ NODEPTARGETS= 
- 
- INSTALL = install
- 
--LDFLAGS += -Wl,-z,noexecstack -ldl
-+LDFLAGS += -ldl
- CFLAGS ?= -O2 -g
- CFLAGS += -Wall -fPIC
- CPPFLAGS += -D__LIBHUGETLBFS__
-diff --git a/sys-aarch64elf.S b/sys-aarch64elf.S
-index 54799d3..210558b 100644
 a/sys-aarch64elf.S
-+++ b/sys-aarch64elf.S
-@@ -32,3 +32,7 @@ direct_syscall:
-   mov x6, x7
-   svc 0x0
-   ret
-+
-+#if defined(__linux__) && defined(__ELF__)
-+  .section .note.GNU-stack,"",%progbits
-+#endif
-diff --git a/sys-armelf_linux_eabi.S b/sys-armelf_linux_eabi.S
-index dfa7407..265b75d 100644
 a/sys-armelf_linux_eabi.S
-+++ b/sys-armelf_linux_eabi.S
-@@ -31,3 +31,7 @@ direct_syscall:
-   swi 0x0
-   ldmfd   sp!, {r4, r5, r6, r7}
-   bx  lr
-+
-+#if defined(__linux__) && defined(__ELF__)
-+  .section .note.GNU-stack,"",%progbits
-+#endif
-diff --git a/sys-elf32ppclinux.S b/sys-elf32ppclinux.S
-index 65d8b3f..6ba3f22 100644
 a/sys-elf32ppclinux.S
-+++ b/sys-elf32ppclinux.S
-@@ -32,3 +32,7 @@ direct_syscall:
-   mr  8,9
-   sc
-   blr
-+
-+#if defined(__linux__) && defined(__ELF__)
-+  .section .note.GNU-stack,"",%progbits
-+#endif
-diff --git a/sys-elf64_s390.S b/sys-elf64_s390.S
-index 425a387..5c31899 100644
 a/sys-elf64_s390.S
-+++ b/sys-elf64_s390.S
-@@ -20,3 +20,7 @@ direct_syscall:
-   lgr %r5,%r6
-   svc 0
-   br  %r14
-+
-+#if defined(__linux__) && defined(__ELF__)
-+  .section .note.GNU-stack,"",%progbits
-+#endif
-diff --git a/sys-elf64ppc.S b/sys-elf64ppc.S
-index d50f4a6..b57a345 100644
 a/sys-elf64ppc.S
-+++ b/sys-elf64ppc.S
-@@ -46,3 +46,7 @@ direct_syscall:
-   mr  8,9
-   sc
-   blr
-+
-+#if defined(__linux__) && defined(__ELF__)
-+  .section .note.GNU-stack,"",%progbits
-+#endif
-diff --git a/sys-elf_i386.S b/sys-elf_i386.S
-index ab30c8d..6182b3d 100644
 a/sys-elf_i386.S
-+++ b/sys-elf_i386.S
-@@ -40,3 +40,7 @@ direct_syscall:
-   pop %edi
-   pop %ebp
-   ret
-+
-+#if defined(__linux__) && defined(__ELF__)
-+  .section .note.GNU-stack,"",%progbits
-+#endif
-diff --git a/sys-elf_s390.S b/sys-elf_s390.S
-index 40630d1..e6a9a96 100644
 a/sys-elf_s390.S
-+++ b/sys-elf_s390.S
-@@ -20,3 +20,7 @@ direct_syscall:
-   lr  %r5,%r6
-   svc 0
-   br  %r14
-+
-+#if defined(__linux__) && defined(__ELF__)
-+  .section .note.GNU-stack,"",%progbits
-+#endif
-diff --git a/sys-elf_x86_64.S b/sys-elf_x86_64.S
-index 6af06ad..561f49b 100644
 a/sys-elf_x86_64.S
-+++ b/sys-elf_x86_64.S
-@@ -32,3 +32,7 @@ direct_syscall:
-   mov 0x8(%rsp),%r9
-   syscall
-   retq
-+
-+#if defined(__linux__) && defined(__ELF__)
-+  .section .note.GNU-stack,"",%progbits
-+#endif
--- 
-2.6.2
-

diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.9-build.patch 
b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.9-build.patch
deleted file mode 100644
index 827e2a58d10..000

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2019-09-09 Thread Lars Wendler
commit: 38c667434702d2e43e30c0f928603c9517062d07
Author: Lars Wendler  gentoo  org>
AuthorDate: Mon Sep  9 06:04:33 2019 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Mon Sep  9 06:04:51 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38c66743

sys-libs/libhugetlbfs: Tests require python3 now

Closes: https://bugs.gentoo.org/693848
Package-Manager: Portage-2.3.75, Repoman-2.3.17
Signed-off-by: Lars Wendler  gentoo.org>

 sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild
index 44b5ca12b77..34b969c3fe3 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python3_{5,6,7} )
 
 inherit multilib toolchain-funcs python-any-r1
 



[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2019-09-08 Thread Lars Wendler
commit: de74eb029856a362e0de63a96f9148999bab8e5e
Author: Lars Wendler  gentoo  org>
AuthorDate: Sun Sep  8 10:41:06 2019 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Sun Sep  8 10:44:56 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de74eb02

sys-libs/libhugetlbfs: Bump to version 2.22

Package-Manager: Portage-2.3.75, Repoman-2.3.17
Signed-off-by: Lars Wendler  gentoo.org>

 sys-libs/libhugetlbfs/Manifest |   1 +
 sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild | 158 +
 2 files changed, 159 insertions(+)

diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
index 580068e6d38..24a91fd064f 100644
--- a/sys-libs/libhugetlbfs/Manifest
+++ b/sys-libs/libhugetlbfs/Manifest
@@ -1,2 +1,3 @@
 DIST libhugetlbfs-2.20.tar.gz 186750 BLAKE2B 
758482a41254d6d14795efdfb2959248af2ff00bc6cafbae9b2002b7eaa50921a72ef928910bc0d2061a414e9c73346848eead108af077c96429870c734495aa
 SHA512 
817fca3f8e3b127b9b877e0a03d0a94bf0c3ec481d3becf995986ce6ae0532629c5460100eb9f2ef3452ed59a3b9d3ac8362df8f87b387803c36d35ab7af0902
 DIST libhugetlbfs-2.21.tar.gz 173052 BLAKE2B 
a65fdeee3ed9ad8cb69f772847646befbf5deef0b82d6cb7338e5ff448d5c2461ceb1e381b9515e79f4243482589bb0203874cc52e5c8c6d98667df4eacffa8b
 SHA512 
87fd95a826bedc2c53b1aa440f5db7ff3ece482d520545b597d4d1231cf84276103c312899b812166872444331bc7b6f1692f0d3b7cbff691efdcf9c2e99b1d0
+DIST libhugetlbfs-2.22.tar.gz 175099 BLAKE2B 
e67a6a678065b10492d510b733b7c6e2926f4f01dd741d49f6e76cedde002fa81d7dad6a6fd8922443c6aacd527c9b3df35f84b8da7332c04e3fcf8c52e23084
 SHA512 
7f38f9fa576841f36c7cd5192a9ee3f79b275b7b64d7e2a838a43636489cf88627bdba3a045d6b3302a4a509cf64627972b569b4c2c3c4fe05d5aa4ae1d66fd8

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild
new file mode 100644
index 000..44b5ca12b77
--- /dev/null
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.22.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit multilib toolchain-funcs python-any-r1
+
+DESCRIPTION="easy hugepage access"
+HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs;
+SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~s390 ~x86"
+IUSE="static-libs test"
+
+DEPEND="test? ( ${PYTHON_DEPS} )"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
+)
+
+src_prepare() {
+   default
+   sed -i \
+   -e '/^PREFIX/s:/local::' \
+   -e '1iBUILDTYPE = NATIVEONLY' \
+   -e '1iV = 1' \
+   -e '/gzip.*MANDIR/d' \
+   -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
+   -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
+   -e 's@^\(ARCH\) ?=@\1 =@' \
+   Makefile || die "sed failed"
+   if [ "$(get_libdir)" == "lib64" ]; then
+   sed -i \
+   -e "/^LIB\(32\)/s:=.*:= lib32:" \
+   Makefile
+   fi
+
+   # Tarballs from github don't have the version set.
+   # https://github.com/libhugetlbfs/libhugetlbfs/issues/7
+   [[ -f version ]] || echo "${PV}" > version
+}
+
+src_compile() {
+   tc-export AR
+   emake CC="$(tc-getCC)" libs tools
+}
+
+src_install() {
+   default
+   use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
+}
+
+src_test_alloc_one() {
+   hugeadm="$1"
+   sign="$2"
+   pagesize="$3"
+   pagecount="$4"
+   ${hugeadm} \
+   --pool-pages-max ${pagesize}:${sign}${pagecount} \
+   && \
+   ${hugeadm} \
+   --pool-pages-min ${pagesize}:${sign}${pagecount}
+   return $?
+}
+
+# die is NOT allowed in this src_test block after the marked point, so that we
+# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
+src_test() {
+   [[ $UID -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
+   einfo "Building testsuite"
+   emake -j1 tests || die "Failed to build tests"
+
+   local hugeadm='obj/hugeadm'
+   local allocated=''
+   local rc=0
+   # the testcases need 64MiB per pagesize.
+   local MIN_HUGEPAGE_RAM=$((64*1024*1024))
+
+   einfo "Planning allocation"
+   local PAGESIZES="$(${hugeadm} --page-sizes-all)"
+
+   # Need to do this before we can create the mountpoints.
+   local pagesize pagecount
+   for pagesize in ${PAGESIZES} ; do
+   # The kernel depends on the location :-(
+   mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
+   addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
+   done
+   addwrite /proc/sys/vm/
+   addwrite /proc/sys/kernel/shmall
+   addwrite /proc/sys/kernel/shmmax
+   addwrite /proc/sys/kernel/shmmni
+
+   

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2019-09-08 Thread Lars Wendler
commit: 9ef2760a90d3676be2a47c98eed32f555924c044
Author: Lars Wendler  gentoo  org>
AuthorDate: Sun Sep  8 10:44:42 2019 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Sun Sep  8 10:44:57 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ef2760a

sys-libs/libhugetlbfs: Removed old

Package-Manager: Portage-2.3.75, Repoman-2.3.17
Signed-off-by: Lars Wendler  gentoo.org>

 sys-libs/libhugetlbfs/Manifest |   1 -
 sys-libs/libhugetlbfs/libhugetlbfs-2.20.ebuild | 166 -
 sys-libs/libhugetlbfs/metadata.xml |   3 -
 3 files changed, 170 deletions(-)

diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
index 24a91fd064f..4ded3f0740b 100644
--- a/sys-libs/libhugetlbfs/Manifest
+++ b/sys-libs/libhugetlbfs/Manifest
@@ -1,3 +1,2 @@
-DIST libhugetlbfs-2.20.tar.gz 186750 BLAKE2B 
758482a41254d6d14795efdfb2959248af2ff00bc6cafbae9b2002b7eaa50921a72ef928910bc0d2061a414e9c73346848eead108af077c96429870c734495aa
 SHA512 
817fca3f8e3b127b9b877e0a03d0a94bf0c3ec481d3becf995986ce6ae0532629c5460100eb9f2ef3452ed59a3b9d3ac8362df8f87b387803c36d35ab7af0902
 DIST libhugetlbfs-2.21.tar.gz 173052 BLAKE2B 
a65fdeee3ed9ad8cb69f772847646befbf5deef0b82d6cb7338e5ff448d5c2461ceb1e381b9515e79f4243482589bb0203874cc52e5c8c6d98667df4eacffa8b
 SHA512 
87fd95a826bedc2c53b1aa440f5db7ff3ece482d520545b597d4d1231cf84276103c312899b812166872444331bc7b6f1692f0d3b7cbff691efdcf9c2e99b1d0
 DIST libhugetlbfs-2.22.tar.gz 175099 BLAKE2B 
e67a6a678065b10492d510b733b7c6e2926f4f01dd741d49f6e76cedde002fa81d7dad6a6fd8922443c6aacd527c9b3df35f84b8da7332c04e3fcf8c52e23084
 SHA512 
7f38f9fa576841f36c7cd5192a9ee3f79b275b7b64d7e2a838a43636489cf88627bdba3a045d6b3302a4a509cf64627972b569b4c2c3c4fe05d5aa4ae1d66fd8

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.20.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.20.ebuild
deleted file mode 100644
index c3c800361c4..000
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.20.ebuild
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils multilib toolchain-funcs perl-functions python-any-r1
-
-DESCRIPTION="easy hugepage access"
-HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs;
-SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> 
${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~s390 ~x86"
-IUSE="perl static-libs test"
-
-DEPEND="test? ( ${PYTHON_DEPS} )"
-RDEPEND="perl? ( dev-lang/perl:= )"
-
-src_prepare() {
-   perl_set_version
-
-   epatch "${FILESDIR}"/${PN}-2.9-build.patch #332517
-   epatch "${FILESDIR}"/${PN}-2.20-noexec-stack.patch
-   epatch "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
-   sed -i \
-   -e '/^PREFIX/s:/local::' \
-   -e '1iBUILDTYPE = NATIVEONLY' \
-   -e '1iV = 1' \
-   -e '/gzip.*MANDIR/d' \
-   -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
-   -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
-   -e "/^PMDIR = .*\/perl5\/TLBC/s::PMDIR = ${VENDOR_LIB}\/TLBC:" \
-   Makefile || die "sed failed"
-   if [ "$(get_libdir)" == "lib64" ]; then
-   sed -i \
-   -e "/^LIB\(32\)/s:=.*:= lib32:" \
-   Makefile
-   fi
-
-   # Tarballs from github don't have the version set.
-   # https://github.com/libhugetlbfs/libhugetlbfs/issues/7
-   [[ -f version ]] || echo "${PV}" > version
-}
-
-src_compile() {
-   tc-export AR
-   emake CC="$(tc-getCC)" libs tools
-}
-
-src_install() {
-   default
-   use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
-   rm "${ED}"/usr/bin/oprofile* || die
-   if ! use perl ; then
-   rm -r \
-   "${ED}"/usr/bin/cpupcstat \
-   "${ED}"/usr/share/man/man8/cpupcstat.8 \
-   "${ED}/${VENDOR_LIB}" \
-   || die
-   fi
-}
-
-src_test_alloc_one() {
-   hugeadm="$1"
-   sign="$2"
-   pagesize="$3"
-   pagecount="$4"
-   ${hugeadm} \
-   --pool-pages-max ${pagesize}:${sign}${pagecount} \
-   && \
-   ${hugeadm} \
-   --pool-pages-min ${pagesize}:${sign}${pagecount}
-   return $?
-}
-
-# die is NOT allowed in this src_test block after the marked point, so that we
-# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
-src_test() {
-   [[ $UID -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
-   einfo "Building testsuite"
-   emake -j1 tests || die "Failed to build tests"
-
-   hugeadm='obj/hugeadm'
-   allocated=''
-   rc=0
-   # the testcases need 64MiB per pagesize.
-   MIN_HUGEPAGE_RAM=$((64*1024*1024))
-
-   einfo "Planning allocation"
- 

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2018-09-19 Thread Lars Wendler
commit: 6df00c69826babb358006a8ca5f6936385ca8a1c
Author: Lars Wendler  gentoo  org>
AuthorDate: Wed Sep 19 09:35:50 2018 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Wed Sep 19 09:35:50 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6df00c69

sys-libs/libhugetlbfs: Bump to version 2.21

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 sys-libs/libhugetlbfs/Manifest |   1 +
 sys-libs/libhugetlbfs/libhugetlbfs-2.21.ebuild | 157 +
 2 files changed, 158 insertions(+)

diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
index 7184c0e8ae9..2d7527a8693 100644
--- a/sys-libs/libhugetlbfs/Manifest
+++ b/sys-libs/libhugetlbfs/Manifest
@@ -1,3 +1,4 @@
 DIST libhugetlbfs-2.18.tar.gz 181275 BLAKE2B 
1f0ca8d73d9bdf05eb08706be4854f110b8cbe5b0c7554fdddb437fc9644e69d0bc42d9d8bedf23bf2dda4901977f093d0f46ed039304f8b5184b2fcac157d47
 SHA512 
6dcdbf571d6a723a40c15e10b24533f16d65f67fe149aa2d25bee48a034d003419d4cf4b6e55fcd385e1214fc4f6b4dda72ba429b9eea9b38be9b1a393528746
 DIST libhugetlbfs-2.19.tar.gz 181504 BLAKE2B 
27d5e5729e48b82311d6f4317f8c0bb5a04054242bca6fd9745265e2590f18ec49de6a9cdfa7ea28be47f794e91e70c5fcecdb418bf8e8cb0cb5b78d0948e563
 SHA512 
d21781fe68736eb3bbafeb8f36f4f34d30f290f2f6744b52c1a40161caf2e28b823cd8e9b9c74ec4e6d11f7d398d909f80eb736cc39a64ecc7bf571018bfec7c
 DIST libhugetlbfs-2.20.tar.gz 186750 BLAKE2B 
758482a41254d6d14795efdfb2959248af2ff00bc6cafbae9b2002b7eaa50921a72ef928910bc0d2061a414e9c73346848eead108af077c96429870c734495aa
 SHA512 
817fca3f8e3b127b9b877e0a03d0a94bf0c3ec481d3becf995986ce6ae0532629c5460100eb9f2ef3452ed59a3b9d3ac8362df8f87b387803c36d35ab7af0902
+DIST libhugetlbfs-2.21.tar.gz 173052 BLAKE2B 
a65fdeee3ed9ad8cb69f772847646befbf5deef0b82d6cb7338e5ff448d5c2461ceb1e381b9515e79f4243482589bb0203874cc52e5c8c6d98667df4eacffa8b
 SHA512 
87fd95a826bedc2c53b1aa440f5db7ff3ece482d520545b597d4d1231cf84276103c312899b812166872444331bc7b6f1692f0d3b7cbff691efdcf9c2e99b1d0

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.21.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.21.ebuild
new file mode 100644
index 000..e7aae65f605
--- /dev/null
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.21.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit multilib toolchain-funcs python-any-r1
+
+DESCRIPTION="easy hugepage access"
+HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs;
+SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~s390 ~x86"
+IUSE="static-libs test"
+
+DEPEND="test? ( ${PYTHON_DEPS} )"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
+)
+
+src_prepare() {
+   default
+   sed -i \
+   -e '/^PREFIX/s:/local::' \
+   -e '1iBUILDTYPE = NATIVEONLY' \
+   -e '1iV = 1' \
+   -e '/gzip.*MANDIR/d' \
+   -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
+   -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
+   -e 's@^\(ARCH\) ?=@\1 =@' \
+   Makefile || die "sed failed"
+   if [ "$(get_libdir)" == "lib64" ]; then
+   sed -i \
+   -e "/^LIB\(32\)/s:=.*:= lib32:" \
+   Makefile
+   fi
+
+   # Tarballs from github don't have the version set.
+   # https://github.com/libhugetlbfs/libhugetlbfs/issues/7
+   [[ -f version ]] || echo "${PV}" > version
+}
+
+src_compile() {
+   tc-export AR
+   emake CC="$(tc-getCC)" libs tools
+}
+
+src_install() {
+   default
+   use static-libs || rm -f "${ED%/}"/usr/$(get_libdir)/*.a
+}
+
+src_test_alloc_one() {
+   hugeadm="$1"
+   sign="$2"
+   pagesize="$3"
+   pagecount="$4"
+   ${hugeadm} \
+   --pool-pages-max ${pagesize}:${sign}${pagecount} \
+   && \
+   ${hugeadm} \
+   --pool-pages-min ${pagesize}:${sign}${pagecount}
+   return $?
+}
+
+# die is NOT allowed in this src_test block after the marked point, so that we
+# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
+src_test() {
+   [[ $UID -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
+   einfo "Building testsuite"
+   emake -j1 tests || die "Failed to build tests"
+
+   hugeadm='obj/hugeadm'
+   allocated=''
+   rc=0
+   # the testcases need 64MiB per pagesize.
+   MIN_HUGEPAGE_RAM=$((64*1024*1024))
+
+   einfo "Planning allocation"
+   PAGESIZES="$(${hugeadm} --page-sizes-all)"
+
+   # Need to do this before we can create the mountpoints.
+   for pagesize in ${PAGESIZES} ; do
+   # The kernel depends on the location :-(
+   mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
+   

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/files/, sys-libs/libhugetlbfs/

2018-09-19 Thread Lars Wendler
commit: c2625f810fa8b7c7ec3b51792a19c0608f5ef9b6
Author: Lars Wendler  gentoo  org>
AuthorDate: Wed Sep 19 09:36:50 2018 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Wed Sep 19 09:36:50 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2625f81

sys-libs/libhugetlbfs: Removed old.

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 sys-libs/libhugetlbfs/Manifest |   2 -
 .../files/libhugetlbfs-2.6-noexec-stack.patch  |  44 --
 sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild | 146 --
 sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild  | 164 -
 sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild | 148 ---
 5 files changed, 504 deletions(-)

diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
index 2d7527a8693..580068e6d38 100644
--- a/sys-libs/libhugetlbfs/Manifest
+++ b/sys-libs/libhugetlbfs/Manifest
@@ -1,4 +1,2 @@
-DIST libhugetlbfs-2.18.tar.gz 181275 BLAKE2B 
1f0ca8d73d9bdf05eb08706be4854f110b8cbe5b0c7554fdddb437fc9644e69d0bc42d9d8bedf23bf2dda4901977f093d0f46ed039304f8b5184b2fcac157d47
 SHA512 
6dcdbf571d6a723a40c15e10b24533f16d65f67fe149aa2d25bee48a034d003419d4cf4b6e55fcd385e1214fc4f6b4dda72ba429b9eea9b38be9b1a393528746
-DIST libhugetlbfs-2.19.tar.gz 181504 BLAKE2B 
27d5e5729e48b82311d6f4317f8c0bb5a04054242bca6fd9745265e2590f18ec49de6a9cdfa7ea28be47f794e91e70c5fcecdb418bf8e8cb0cb5b78d0948e563
 SHA512 
d21781fe68736eb3bbafeb8f36f4f34d30f290f2f6744b52c1a40161caf2e28b823cd8e9b9c74ec4e6d11f7d398d909f80eb736cc39a64ecc7bf571018bfec7c
 DIST libhugetlbfs-2.20.tar.gz 186750 BLAKE2B 
758482a41254d6d14795efdfb2959248af2ff00bc6cafbae9b2002b7eaa50921a72ef928910bc0d2061a414e9c73346848eead108af077c96429870c734495aa
 SHA512 
817fca3f8e3b127b9b877e0a03d0a94bf0c3ec481d3becf995986ce6ae0532629c5460100eb9f2ef3452ed59a3b9d3ac8362df8f87b387803c36d35ab7af0902
 DIST libhugetlbfs-2.21.tar.gz 173052 BLAKE2B 
a65fdeee3ed9ad8cb69f772847646befbf5deef0b82d6cb7338e5ff448d5c2461ceb1e381b9515e79f4243482589bb0203874cc52e5c8c6d98667df4eacffa8b
 SHA512 
87fd95a826bedc2c53b1aa440f5db7ff3ece482d520545b597d4d1231cf84276103c312899b812166872444331bc7b6f1692f0d3b7cbff691efdcf9c2e99b1d0

diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch 
b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch
deleted file mode 100644
index bf964cda7a6..000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -Nuar libhugetlbfs-2.6.orig/sys-elf32ppclinux.S 
libhugetlbfs-2.6/sys-elf32ppclinux.S
 libhugetlbfs-2.6.orig/sys-elf32ppclinux.S  2009-08-24 12:56:07.0 
+
-+++ libhugetlbfs-2.6/sys-elf32ppclinux.S   2009-10-31 06:43:49.040319417 
+
-@@ -32,3 +32,7 @@
-   mr  8,9
-   sc
-   blr
-+
-+#if defined(__linux__) && defined(__ELF__)
-+  .section .note.GNU-stack,"",%progbits
-+#endif
-diff -Nuar libhugetlbfs-2.6.orig/sys-elf64ppc.S libhugetlbfs-2.6/sys-elf64ppc.S
 libhugetlbfs-2.6.orig/sys-elf64ppc.S   2009-08-24 12:56:07.0 
+
-+++ libhugetlbfs-2.6/sys-elf64ppc.S2009-10-31 06:43:54.303652251 +
-@@ -41,3 +41,7 @@
-   mr  8,9
-   sc
-   blr
-+
-+#if defined(__linux__) && defined(__ELF__)
-+  .section .note.GNU-stack,"",%progbits
-+#endif
-diff -Nuar libhugetlbfs-2.6.orig/sys-elf_i386.S libhugetlbfs-2.6/sys-elf_i386.S
 libhugetlbfs-2.6.orig/sys-elf_i386.S   2009-08-24 12:56:07.0 
+
-+++ libhugetlbfs-2.6/sys-elf_i386.S2009-10-31 06:43:57.536975670 +
-@@ -40,3 +40,7 @@
-   pop %edi
-   pop %ebp
-   ret
-+
-+#if defined(__linux__) && defined(__ELF__)
-+  .section .note.GNU-stack,"",%progbits
-+#endif
-diff -Nuar libhugetlbfs-2.6.orig/sys-elf_x86_64.S 
libhugetlbfs-2.6/sys-elf_x86_64.S
 libhugetlbfs-2.6.orig/sys-elf_x86_64.S 2009-08-24 12:56:07.0 
+
-+++ libhugetlbfs-2.6/sys-elf_x86_64.S  2009-10-31 06:44:26.943648847 +
-@@ -32,3 +32,7 @@
-   mov 0x8(%rsp),%r9
-   syscall
-   retq
-+
-+#if defined(__linux__) && defined(__ELF__)
-+  .section .note.GNU-stack,"",%progbits
-+#endif

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild
deleted file mode 100644
index 3725a9c4975..000
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit eutils multilib toolchain-funcs
-
-DESCRIPTION="easy hugepage access"
-HOMEPAGE="http://libhugetlbfs.sourceforge.net/;
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE="static-libs"
-
-src_prepare() {
-   epatch "${FILESDIR}"/${PN}-2.9-build.patch #332517
-   epatch "${FILESDIR}"/${PN}-2.6-noexec-stack.patch
-   

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2015-12-14 Thread Mike Frysinger
commit: 937878643ffaff8e7ef11169caf0c16a774973fe
Author: Mike Frysinger  gentoo  org>
AuthorDate: Mon Dec 14 19:06:21 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Mon Dec 14 19:22:04 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93787864

sys-libs/libhugetlbfs: do not gzip manpages

We'll handle compressing of files ourselves, so don't waste time on it.

 sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
index f6644a5..4cdb5d4 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
@@ -28,6 +28,7 @@ src_prepare() {
-e '/^PREFIX/s:/local::' \
-e '1iBUILDTYPE = NATIVEONLY' \
-e '1iV = 1' \
+   -e '/gzip.*MANDIR/d' \
-e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
-e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
-e "/^PMDIR = .*\/perl5\/TLBC/s::PMDIR = ${VENDOR_LIB}\/TLBC:" \



[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2015-12-14 Thread Mike Frysinger
commit: 90476cb6e896c07ad7867c564cde969f8616ea8c
Author: Mike Frysinger  gentoo  org>
AuthorDate: Mon Dec 14 19:12:31 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Mon Dec 14 19:22:04 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90476cb6

sys-libs/libhugetlbfs: fix D-vs-ED handling

 sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
index 4847854..4eebe01 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
@@ -51,8 +51,8 @@ src_compile() {
 
 src_install() {
default
-   use static-libs || rm -f "${D}"/usr/$(get_libdir)/*.a
-   rm "${D}"/usr/bin/oprofile* || die
+   use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
+   rm "${ED}"/usr/bin/oprofile* || die
 }
 
 src_test_alloc_one() {



[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2015-12-14 Thread Mike Frysinger
commit: 2e5ed736019cf2fd7e9db25189d1ac6b070337c4
Author: Thomas D  whissi  de>
AuthorDate: Mon Dec 14 19:10:38 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Mon Dec 14 19:22:04 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e5ed736

sys-libs/libhugetlbfs: control python usage during testing

The test code uses python, and only supports py2, so make sure the
ebuild expresses those requirements when the default is py3.

 sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
index 4cdb5d4..4847854 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
@@ -2,9 +2,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
+EAPI="5"
 
-inherit eutils multilib toolchain-funcs perl-functions
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils multilib toolchain-funcs perl-functions python-any-r1
 
 DESCRIPTION="easy hugepage access"
 HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs;
@@ -15,7 +17,9 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE="static-libs"
+IUSE="static-libs test"
+
+DEPEND="test? ( ${PYTHON_DEPS} )"
 RDEPEND="dev-lang/perl:="
 
 src_prepare() {



[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/, sys-libs/libhugetlbfs/files/

2015-12-14 Thread Mike Frysinger
commit: 8f3aa6dadf4c787c54fabb212d7079c9fa5327a8
Author: Mike Frysinger  gentoo  org>
AuthorDate: Mon Dec 14 19:24:44 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Mon Dec 14 19:25:40 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f3aa6da

sys-libs/libhugetlbfs: version bump to 2.20

 sys-libs/libhugetlbfs/Manifest |   1 +
 .../files/libhugetlbfs-2.20-noexec-stack.patch | 135 +
 sys-libs/libhugetlbfs/libhugetlbfs-2.20.ebuild | 167 +
 3 files changed, 303 insertions(+)

diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
index 5a7e936..e91b029 100644
--- a/sys-libs/libhugetlbfs/Manifest
+++ b/sys-libs/libhugetlbfs/Manifest
@@ -1,2 +1,3 @@
 DIST libhugetlbfs-2.18.tar.gz 181275 SHA256 
8c6ed5e884988e0c879a3705455ece153cf805f69cb9c710334e2711acbb6a06 SHA512 
6dcdbf571d6a723a40c15e10b24533f16d65f67fe149aa2d25bee48a034d003419d4cf4b6e55fcd385e1214fc4f6b4dda72ba429b9eea9b38be9b1a393528746
 WHIRLPOOL 
da0b17ca4d2a61be919ea47733b3da485714ce29cdc5e854e143ef0e9c0e45517a37649cb056eeeb74efe8c538f566267152aaad5d53ff837a3a15a9e11070cd
 DIST libhugetlbfs-2.19.tar.gz 181504 SHA256 
a5ecb6e925ab2e491bcaa4049fbd6484740950da47d474e7af06dfc6bd1f690b SHA512 
d21781fe68736eb3bbafeb8f36f4f34d30f290f2f6744b52c1a40161caf2e28b823cd8e9b9c74ec4e6d11f7d398d909f80eb736cc39a64ecc7bf571018bfec7c
 WHIRLPOOL 
bd76e6334acd11e55dec790170781aa418a74e4b1bd0007a15c0b65f5c0f4fd977d02eb89d6b16d48b4e4c7fd980ed2bd7ac9a8246179c0480874afe901da851
+DIST libhugetlbfs-2.20.tar.gz 186750 SHA256 
feb51a17456e6ec9806e78720d4ae17a1211a5db8c9bb4ae654b7251a3f76166 SHA512 
817fca3f8e3b127b9b877e0a03d0a94bf0c3ec481d3becf995986ce6ae0532629c5460100eb9f2ef3452ed59a3b9d3ac8362df8f87b387803c36d35ab7af0902
 WHIRLPOOL 
e6c0244d47cee5966f1a51d7f39ea1cd0f26a7b1698b4471c6813ed9b2f194bc72d4087f62f72f5c2e5d99fcf00226b72b783a993ec39016625106f8ed17baca

diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.20-noexec-stack.patch 
b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.20-noexec-stack.patch
new file mode 100644
index 000..04c8bae
--- /dev/null
+++ b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.20-noexec-stack.patch
@@ -0,0 +1,135 @@
+https://github.com/libhugetlbfs/libhugetlbfs/pull/9
+
+From 1c41d751d57a598919c40ab9c27514a98da93273 Mon Sep 17 00:00:00 2001
+From: "Robin H. Johnson" 
+Date: Sat, 31 Oct 2009 07:59:57 +
+Subject: [PATCH] set noexec markers in the asm file directly
+
+Using -Wl,-z,noexecstack can hide real exec stack issues coming from other
+files, and is a bit unportable.  Instead, set proper section markers in the
+assembly files directly.  It also means people using the static libraries
+won't have to use -Wl,-z,noexecstack when they link their code.
+---
+ Makefile| 2 +-
+ sys-aarch64elf.S| 4 
+ sys-armelf_linux_eabi.S | 4 
+ sys-elf32ppclinux.S | 4 
+ sys-elf64_s390.S| 4 
+ sys-elf64ppc.S  | 4 
+ sys-elf_i386.S  | 4 
+ sys-elf_s390.S  | 4 
+ sys-elf_x86_64.S| 4 
+ 9 files changed, 33 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 73ebad7..ca987d9 100644
+--- a/Makefile
 b/Makefile
+@@ -27,7 +27,7 @@ NODEPTARGETS= 
+ 
+ INSTALL = install
+ 
+-LDFLAGS += -Wl,-z,noexecstack -ldl
++LDFLAGS += -ldl
+ CFLAGS ?= -O2 -g
+ CFLAGS += -Wall -fPIC
+ CPPFLAGS += -D__LIBHUGETLBFS__
+diff --git a/sys-aarch64elf.S b/sys-aarch64elf.S
+index 54799d3..210558b 100644
+--- a/sys-aarch64elf.S
 b/sys-aarch64elf.S
+@@ -32,3 +32,7 @@ direct_syscall:
+   mov x6, x7
+   svc 0x0
+   ret
++
++#if defined(__linux__) && defined(__ELF__)
++  .section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/sys-armelf_linux_eabi.S b/sys-armelf_linux_eabi.S
+index dfa7407..265b75d 100644
+--- a/sys-armelf_linux_eabi.S
 b/sys-armelf_linux_eabi.S
+@@ -31,3 +31,7 @@ direct_syscall:
+   swi 0x0
+   ldmfd   sp!, {r4, r5, r6, r7}
+   bx  lr
++
++#if defined(__linux__) && defined(__ELF__)
++  .section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/sys-elf32ppclinux.S b/sys-elf32ppclinux.S
+index 65d8b3f..6ba3f22 100644
+--- a/sys-elf32ppclinux.S
 b/sys-elf32ppclinux.S
+@@ -32,3 +32,7 @@ direct_syscall:
+   mr  8,9
+   sc
+   blr
++
++#if defined(__linux__) && defined(__ELF__)
++  .section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/sys-elf64_s390.S b/sys-elf64_s390.S
+index 425a387..5c31899 100644
+--- a/sys-elf64_s390.S
 b/sys-elf64_s390.S
+@@ -20,3 +20,7 @@ direct_syscall:
+   lgr %r5,%r6
+   svc 0
+   br  %r14
++
++#if defined(__linux__) && defined(__ELF__)
++  .section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/sys-elf64ppc.S b/sys-elf64ppc.S
+index d50f4a6..b57a345 100644
+--- a/sys-elf64ppc.S
 b/sys-elf64ppc.S
+@@ -46,3 +46,7 @@ direct_syscall:
+   mr  

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2015-12-14 Thread Mike Frysinger
commit: eafb5bff4795e5a83122ebcbfc37b86607119115
Author: Mike Frysinger  gentoo  org>
AuthorDate: Mon Dec 14 19:19:48 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Mon Dec 14 19:22:04 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eafb5bff

sys-libs/libhugetlbfs: make perl support optional #554688

 sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild | 11 +--
 sys-libs/libhugetlbfs/metadata.xml|  3 +++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
index 4eebe01..960ad68 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
@@ -17,10 +17,10 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE="static-libs test"
+IUSE="perl static-libs test"
 
 DEPEND="test? ( ${PYTHON_DEPS} )"
-RDEPEND="dev-lang/perl:="
+RDEPEND="perl? ( dev-lang/perl:= )"
 
 src_prepare() {
perl_set_version
@@ -53,6 +53,13 @@ src_install() {
default
use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
rm "${ED}"/usr/bin/oprofile* || die
+   if ! use perl ; then
+   rm -r \
+   "${ED}"/usr/bin/cpupcstat \
+   "${ED}"/usr/share/man/man8/cpupcstat.8 \
+   "${ED}/${VENDOR_LIB}" \
+   || die
+   fi
 }
 
 src_test_alloc_one() {

diff --git a/sys-libs/libhugetlbfs/metadata.xml 
b/sys-libs/libhugetlbfs/metadata.xml
index d1332ae..63e8fba 100644
--- a/sys-libs/libhugetlbfs/metadata.xml
+++ b/sys-libs/libhugetlbfs/metadata.xml
@@ -2,6 +2,9 @@
 http://www.gentoo.org/dtd/metadata.dtd'>
 
 base-system
+
+   Install the cpupcstat tool and some perl 
modules
+
 
libhugetlbfs/libhugetlbfs
libhugetlbfs



[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2015-12-12 Thread Andreas Hüttel
commit: 217aee29fde28b255463e46db02e03bfc3fea186
Author: Andreas K. Hüttel  gentoo  org>
AuthorDate: Sat Dec 12 12:44:28 2015 +
Commit: Andreas Hüttel  gentoo  org>
CommitDate: Sat Dec 12 12:44:45 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=217aee29

sys-libs/libhugetlbfs: Fix perl module installation paths and perl dependency, 
see bug 554688 comment 7. Needs EAPI=5 bump.

Package-Manager: portage-2.2.26

 sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild | 153 ++
 1 file changed, 153 insertions(+)

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
new file mode 100644
index 000..f6644a5
--- /dev/null
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs perl-functions
+
+DESCRIPTION="easy hugepage access"
+HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs;
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+# Switch to github tarball w/next release.
+#SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="static-libs"
+RDEPEND="dev-lang/perl:="
+
+src_prepare() {
+   perl_set_version
+
+   epatch "${FILESDIR}"/${PN}-2.9-build.patch #332517
+   epatch "${FILESDIR}"/${PN}-2.6-noexec-stack.patch
+   epatch "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
+   sed -i \
+   -e '/^PREFIX/s:/local::' \
+   -e '1iBUILDTYPE = NATIVEONLY' \
+   -e '1iV = 1' \
+   -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
+   -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
+   -e "/^PMDIR = .*\/perl5\/TLBC/s::PMDIR = ${VENDOR_LIB}\/TLBC:" \
+   Makefile || die "sed failed"
+   if [ "$(get_libdir)" == "lib64" ]; then
+   sed -i \
+   -e "/^LIB\(32\)/s:=.*:= lib32:" \
+   Makefile
+   fi
+}
+
+src_compile() {
+   tc-export AR
+   emake CC="$(tc-getCC)" libs tools
+}
+
+src_install() {
+   default
+   use static-libs || rm -f "${D}"/usr/$(get_libdir)/*.a
+   rm "${D}"/usr/bin/oprofile* || die
+}
+
+src_test_alloc_one() {
+   hugeadm="$1"
+   sign="$2"
+   pagesize="$3"
+   pagecount="$4"
+   ${hugeadm} \
+   --pool-pages-max ${pagesize}:${sign}${pagecount} \
+   && \
+   ${hugeadm} \
+   --pool-pages-min ${pagesize}:${sign}${pagecount}
+   return $?
+}
+
+# die is NOT allowed in this src_test block after the marked point, so that we
+# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
+src_test() {
+   [[ $UID -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
+   einfo "Building testsuite"
+   emake -j1 tests || die "Failed to build tests"
+
+   hugeadm='obj/hugeadm'
+   allocated=''
+   rc=0
+   # the testcases need 64MiB per pagesize.
+   MIN_HUGEPAGE_RAM=$((64*1024*1024))
+
+   einfo "Planning allocation"
+   PAGESIZES="$(${hugeadm} --page-sizes-all)"
+
+   # Need to do this before we can create the mountpoints.
+   for pagesize in ${PAGESIZES} ; do
+   # The kernel depends on the location :-(
+   mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
+   addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
+   done
+   addwrite /proc/sys/vm/
+   addwrite /proc/sys/kernel/shmall
+   addwrite /proc/sys/kernel/shmmax
+   addwrite /proc/sys/kernel/shmmni
+
+   einfo "Checking HugeTLB mountpoints"
+   ${hugeadm} --create-mounts || die "Failed to set up hugetlb 
mountpoints."
+
+   # -
+   # - die is unsafe after this point. ---
+   # -
+
+   einfo "Starting allocation"
+   for pagesize in ${PAGESIZES} ; do
+   pagecount=$((${MIN_HUGEPAGE_RAM}/${pagesize}))
+   einfo "  ${pagecount} @ ${pagesize}"
+   addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
+   src_test_alloc_one "$hugeadm" "+" "${pagesize}" "${pagecount}"
+   rc=$?
+   if [[ $rc -eq 0 ]]; then
+   allocated="${allocated} ${pagesize}:${pagecount}"
+   else
+   eerror "Failed to add ${pagecount} pages of size 
${pagesize}"
+   fi
+   done
+
+   einfo "Allocation status"
+   ${hugeadm} --pool-list
+
+   if [[ -n "${allocated}" ]]; then
+   # All our allocations worked, so time to run.
+   einfo "Starting tests"
+   cd "${S}"/tests
+   TESTOPTS="-t 

[gentoo-commits] repo/gentoo:master commit in: sys-libs/libhugetlbfs/

2015-09-26 Thread Mike Frysinger
commit: c027340b6037cda863580de3d2520b57a9c49dea
Author: Thomas D  whissi  de>
AuthorDate: Sat Sep 26 08:17:36 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Sat Sep 26 08:21:48 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c027340b

sys-libs/libhugetlbfs: update upstream to github #554688

 sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild | 4 +++-
 sys-libs/libhugetlbfs/metadata.xml | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild 
b/sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild
index 84d9e34..1ed1f4f 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild
@@ -7,8 +7,10 @@ EAPI="4"
 inherit eutils multilib toolchain-funcs
 
 DESCRIPTION="easy hugepage access"
-HOMEPAGE="http://libhugetlbfs.sourceforge.net/;
+HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs;
 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+# Switch to github tarball w/next release.
+#SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> 
${P}.tar.gz"
 
 LICENSE="GPL-2"
 SLOT="0"

diff --git a/sys-libs/libhugetlbfs/metadata.xml 
b/sys-libs/libhugetlbfs/metadata.xml
index f981d9d..bbc214e 100644
--- a/sys-libs/libhugetlbfs/metadata.xml
+++ b/sys-libs/libhugetlbfs/metadata.xml
@@ -3,6 +3,6 @@
 
base-system

-   libhugetlbfs
+   libhugetlbfs/libhugetlbfs