From 92718c344630c856789d6e53e62ea6dd96e9fa7978501b076ec7d773a717707f Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Fri, 6 Nov 2015 13:33:32 +0000 Subject: [PATCH 1/2] Accepting request 342704 from home:favogt:branches:Base:System - Add zero_filesize_segment.patch to fix testcase on s390x - Fixes bnc#919680 - Latest version from git next branch OBS-URL: https://build.opensuse.org/request/show/342704 OBS-URL: https://build.opensuse.org/package/show/Base:System/libhugetlbfs?expand=0&rev=44 --- _service | 14 ++++ ...xtrasz_always_returning_0_on_ppc64le.patch | 39 ---------- ...bfs-2.18-restrict-is-a-reserved-word.patch | 22 ------ libhugetlbfs-2.18.99.tar.xz | 3 + libhugetlbfs-2.18.tar.gz | 3 - libhugetlbfs.changes | 11 +++ libhugetlbfs.spec | 77 +++++++++---------- zero_filesize_segment.patch | 38 +++++++++ 8 files changed, 104 insertions(+), 103 deletions(-) create mode 100644 _service delete mode 100644 fix_plt_extrasz_always_returning_0_on_ppc64le.patch delete mode 100644 libhugetlbfs-2.18-restrict-is-a-reserved-word.patch create mode 100644 libhugetlbfs-2.18.99.tar.xz delete mode 100644 libhugetlbfs-2.18.tar.gz create mode 100644 zero_filesize_segment.patch diff --git a/_service b/_service new file mode 100644 index 0000000..704731e --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + git://github.com/libhugetlbfs/libhugetlbfs.git + git + libhugetlbfs + 2.18.99 + next + + + *.tar + xz + + + diff --git a/fix_plt_extrasz_always_returning_0_on_ppc64le.patch b/fix_plt_extrasz_always_returning_0_on_ppc64le.patch deleted file mode 100644 index 85ac772..0000000 --- a/fix_plt_extrasz_always_returning_0_on_ppc64le.patch +++ /dev/null @@ -1,39 +0,0 @@ -Subject: fix plt_extrasz() always returning 0 on ppc64le -From: Signed-off-by: Jan Stancek - -libhugetlbfs.so is not linked with elf64lppc.o on ppc64le, -which makes plt_extrasz() always return 0. - -This is causing failures (SIGSEGV) in these tests: - HUGETLB_ELFMAP=W linkhuge_rw (16M: 64): - HUGETLB_ELFMAP=RW linkhuge_rw (16M: 64): - HUGETLB_SHARE=0 HUGETLB_ELFMAP=W linkhuge_rw (16M: 64): - HUGETLB_SHARE=1 HUGETLB_ELFMAP=W linkhuge_rw (16M: 64): - HUGETLB_SHARE=0 HUGETLB_ELFMAP=RW linkhuge_rw (16M: 64): - HUGETLB_SHARE=1 HUGETLB_ELFMAP=RW linkhuge_rw (16M: 64): -as they miss some already initialized data when performing -"minimal copy" in get_extracopy(). - -This patch links also elf64lppc.o, which defines powerpc -specific version of plt_extrasz(). - -Signed-off-by: Jan Stancek ---- - Makefile | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/Makefile b/Makefile -index b24bd0f..8cf469f 100644 ---- a/Makefile -+++ b/Makefile -@@ -142,6 +142,9 @@ endif - ifeq ($(ELF64),elf64ppc) - LIBOBJS64 += obj64/$(ELF64).o - endif -+ifeq ($(ELF64),elf64lppc) -+LIBOBJS64 += obj64/$(ELF64).o -+endif - LIBOBJS32 += $(LIBOBJS:%=obj32/%) - LIBOBJS64 += $(LIBOBJS:%=obj64/%) - --- 1.7.1 diff --git a/libhugetlbfs-2.18-restrict-is-a-reserved-word.patch b/libhugetlbfs-2.18-restrict-is-a-reserved-word.patch deleted file mode 100644 index d92be9a..0000000 --- a/libhugetlbfs-2.18-restrict-is-a-reserved-word.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up libhugetlbfs-2.18/hugeutils.c.orig libhugetlbfs-2.18/hugeutils.c ---- libhugetlbfs-2.18/hugeutils.c.orig 2015-06-24 00:23:09.374535669 +0200 -+++ libhugetlbfs-2.18/hugeutils.c 2015-06-24 00:23:45.536534148 +0200 -@@ -301,14 +301,14 @@ void hugetlbfs_setup_env() - - env = getenv("HUGETLB_RESTRICT_EXE"); - if (env) { -- char *p, *tok, *exe, buf[MAX_EXE+1], restrict[MAX_EXE]; -+ char *p, *tok, *exe, buf[MAX_EXE+1], restriction[MAX_EXE]; - int found = 0; - - exe = get_exe_name(buf, sizeof buf); - DEBUG("Found HUGETLB_RESTRICT_EXE, this exe is \"%s\"\n", exe); -- strncpy(restrict, env, sizeof restrict); -- restrict[sizeof(restrict)-1] = 0; -- for (p = restrict; (tok = strtok(p, ":")) != NULL; p = NULL) { -+ strncpy(restriction, env, sizeof restriction); -+ restriction[sizeof(restriction)-1] = 0; -+ for (p = restriction; (tok = strtok(p, ":")) != NULL; p = NULL) { - DEBUG(" ...check exe match for \"%s\"\n", tok); - if (strcmp(tok, exe) == 0) { - found = 1; diff --git a/libhugetlbfs-2.18.99.tar.xz b/libhugetlbfs-2.18.99.tar.xz new file mode 100644 index 0000000..2f33d47 --- /dev/null +++ b/libhugetlbfs-2.18.99.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb9f56779d9af2aade386146b26fc76eede22a58fe6009d9ae936108564e88a6 +size 143708 diff --git a/libhugetlbfs-2.18.tar.gz b/libhugetlbfs-2.18.tar.gz deleted file mode 100644 index 00c0df4..0000000 --- a/libhugetlbfs-2.18.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c6ed5e884988e0c879a3705455ece153cf805f69cb9c710334e2711acbb6a06 -size 181275 diff --git a/libhugetlbfs.changes b/libhugetlbfs.changes index 290a573..379c1b8 100644 --- a/libhugetlbfs.changes +++ b/libhugetlbfs.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Nov 6 13:10:03 UTC 2015 - fvogt@suse.com + +- Add zero_filesize_segment.patch to fix testcase on s390x +- Fixes bnc#919680 + +------------------------------------------------------------------- +Fri Nov 6 12:01:55 UTC 2015 - fvogt@suse.com + +- Latest version from git next branch + ------------------------------------------------------------------- Tue Jun 23 22:35:32 UTC 2015 - antoine.belvire@laposte.net diff --git a/libhugetlbfs.spec b/libhugetlbfs.spec index 33547f4..83fc52d 100644 --- a/libhugetlbfs.spec +++ b/libhugetlbfs.spec @@ -1,7 +1,7 @@ # # spec file for package libhugetlbfs # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,27 +16,15 @@ # +%define my_make_flags V=1 CFLAGS="%{optflags} -fPIC" BUILDTYPE=NATIVEONLY PREFIX=%{_prefix} LIBDIR32=%{_libdir} DESTDIR=%{buildroot} Name: libhugetlbfs - -%if 0%{?suse_version} > 1140 -BuildRequires: glibc-devel-static -%endif -BuildRequires: doxygen - +Version: 2.18.99 +Release: 0 Summary: Hugetlbfs helper library License: LGPL-2.1+ Group: Development/Libraries/Other -# bug437293 -%ifarch ppc64 -Obsoletes: libhugetlbfs-64bit -%endif -# -Version: 2.18 -Release: 0 -Url: http://libhugetlbfs.sourceforge.net/ -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%define my_make_flags V=1 CFLAGS="$RPM_OPT_FLAGS -fPIC" BUILDTYPE=NATIVEONLY PREFIX=/usr LIBDIR32=%{_libdir} DESTDIR=$RPM_BUILD_ROOT -Source0: http://downloads.sourceforge.net/project/libhugetlbfs/libhugetlbfs/%{version}/libhugetlbfs-%{version}.tar.gz +Url: https://github.com/libhugetlbfs/libhugetlbfs +Source0: %{name}-%{version}.tar.xz Source1: baselibs.conf Patch2: libhugetlbfs.s390.patch Patch4: libhugetlbfs.tests-malloc.patch @@ -44,22 +32,34 @@ Patch7: libhugetlbfs_ia64_fix_missing_test.patch Patch8: libhugetlbfs_fix_tests.patch Patch13: ignore-perl-modules.diff Patch14: disable-rw-on-non-ldscripts.diff -Patch15: fix_plt_extrasz_always_returning_0_on_ppc64le.patch -# PATCH-FIX-UPSTREAM libhugetlbfs-2.18-restrict-is-a-reserved-word.patch -- Fix compilation with GCC 5 (and C99/C11 in general) -Patch16: libhugetlbfs-2.18-restrict-is-a-reserved-word.patch +Patch15: zero_filesize_segment.patch +BuildRequires: doxygen +BuildRequires: glibc-devel-static +BuildRoot: %{_tmppath}/%{name}-%{version}-build +# bug437293 +%ifarch ppc64 +Obsoletes: libhugetlbfs-64bit +%endif %description The libhugetlbfs package interacts with the Linux hugetlbfs to make large pages available to applications in a transparent manner. -%package libhugetlb-devel +%package devel Summary: Devel package for libhugetlb Group: Development/Libraries/Other Requires: libhugetlbfs -%description libhugetlb-devel +%description devel Devel package, header and static library, of libhugetlb +%package tests +Summary: Tests for package libhugetlb +Group: Development/Libraries/Other + +%description tests +The testsuite for libhugetlb. Binaries can be found in %{_libdir}/libhugetlbfs/tests + %prep %setup -q %patch2 -p1 @@ -69,37 +69,36 @@ Devel package, header and static library, of libhugetlb %patch13 %patch14 %patch15 -p1 -%patch16 -p1 %build +echo %{version} > version make %{my_make_flags} %install make %{my_make_flags} install -make \ -%ifarch sparc sparcv9 - CC32="gcc" CC64="" NATIVEONLY=1 \ -%endif - %{my_make_flags} install -mkdir -p $RPM_BUILD_ROOT/usr/include -cp -avL hugetlbfs.h $RPM_BUILD_ROOT/usr/include -chmod 644 $RPM_BUILD_ROOT%{_libdir}/*.a - -%clean -rm -rf $RPM_BUILD_ROOT +make %{my_make_flags} install-tests +mkdir -p %{buildroot}%{_prefix}/include +cp -avL hugetlbfs.h %{buildroot}%{_prefix}/include +chmod 644 %{buildroot}%{_libdir}/*.a +[ ! -f %{buildroot}%{_libdir}/libhugetlbfs/tests/obj64/dummy.ldscript ] || chmod -f a-x %{buildroot}%{_libdir}/libhugetlbfs/tests/obj64/dummy.ldscript %files %defattr(-, root, root) %doc LGPL-2.1 HOWTO README NEWS -/usr/share/libhugetlbfs -/usr/bin/* +%{_datadir}/libhugetlbfs +%{_bindir}/* %{_mandir}/man*/*.gz %{_libdir}/libhugetlbfs_privutils.so %{_libdir}/libhugetlbfs.so -%files libhugetlb-devel +%files devel %defattr(-, root, root) -/usr/include/hugetlbfs.h +%{_includedir}/hugetlbfs.h %{_libdir}/libhugetlbfs.a +%files tests +%defattr(-,root,root) +%dir %{_libdir}/libhugetlbfs +%{_libdir}/libhugetlbfs/* + %changelog diff --git a/zero_filesize_segment.patch b/zero_filesize_segment.patch new file mode 100644 index 0000000..4375fbb --- /dev/null +++ b/zero_filesize_segment.patch @@ -0,0 +1,38 @@ +diff --git a/tests/Makefile b/tests/Makefile +index e2e1156..4daa5d1 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -39,6 +39,11 @@ LDLIBS = $(STATIC_LDLIBS) -ldl -lhugetlbfs_privutils + LDFLAGS32 = -L../obj32 + LDFLAGS64 = -L../obj64 + INSTALL = install ++ifeq ($(ARCH),s390x) ++ARCH_SUFFIX = .s390x ++else ++ARCH_SUFFIX = ++endif + + TESTS = $(LIB_TESTS) $(NOLIB_TESTS) $(STRESS_TESTS) dummy.ldscript + ifdef ELF32 +@@ -181,7 +186,7 @@ $(LDSCRIPT_TESTS:%=obj32/%): obj32/%: %.ld obj32/%.o obj32/testutils.o + @$(VECHO) LD32 "(preload test)" $@ + $(CC32) $(LDFLAGS) $(LDFLAGS32) -o $@ -Lobj32 $^ $(LDLIBS) || cp $(BADTOOLCHAIN) $@ + +-$(LDSCRIPT_TESTS:%=obj64/%): obj64/%: %.ld obj64/%.o obj64/testutils.o ++$(LDSCRIPT_TESTS:%=obj64/%): obj64/%: %$(ARCH_SUFFIX).ld obj64/%.o obj64/testutils.o + @$(VECHO) LD64 "(preload test)" $@ + $(CC64) $(LDFLAGS) $(LDFLAGS64) -o $@ -Lobj64 $^ $(LDLIBS) || cp $(BADTOOLCHAIN) $@ + +diff --git a/tests/zero_filesize_segment.s390x.ld b/tests/zero_filesize_segment.s390x.ld +new file mode 100644 +index 0000000..813a92f +--- /dev/null ++++ b/tests/zero_filesize_segment.s390x.ld +@@ -0,0 +1,7 @@ ++SECTIONS ++{ ++ .empty (0x90000000) : { ++ __empty_segment = .; ++ . = . + 4; ++ } ++} From 19d4993e30748bd0b5233924b84ed82d7aaf24d1b32b167332b090035b91faaa Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Fri, 6 Nov 2015 13:43:01 +0000 Subject: [PATCH 2/2] - Patches already included mainline and now deleted: D libhugetlbfs-2.18-restrict-is-a-reserved-word.patch D fix_plt_extrasz_always_returning_0_on_ppc64le.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/libhugetlbfs?expand=0&rev=45 --- libhugetlbfs.changes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libhugetlbfs.changes b/libhugetlbfs.changes index 379c1b8..5141ae0 100644 --- a/libhugetlbfs.changes +++ b/libhugetlbfs.changes @@ -3,6 +3,9 @@ Fri Nov 6 13:10:03 UTC 2015 - fvogt@suse.com - Add zero_filesize_segment.patch to fix testcase on s390x - Fixes bnc#919680 +- Patches already included mainline and now deleted: +D libhugetlbfs-2.18-restrict-is-a-reserved-word.patch +D fix_plt_extrasz_always_returning_0_on_ppc64le.patch ------------------------------------------------------------------- Fri Nov 6 12:01:55 UTC 2015 - fvogt@suse.com