From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 74BFB139360 for ; Fri, 13 Aug 2021 13:22:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BCFD4E082B; Fri, 13 Aug 2021 13:22:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 93E15E082B for ; Fri, 13 Aug 2021 13:22:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3A07B342AC6 for ; Fri, 13 Aug 2021 13:22:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8567C7B4 for ; Fri, 13 Aug 2021 13:22:54 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1628860956.c08f36620da95e3f707a57b068bcd4ef5cb8e6e6.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/files/, sys-apps/memtest86+/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/memtest86+/Manifest sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch sys-apps/memtest86+/memtest86+-5.31b.ebuild X-VCS-Directories: sys-apps/memtest86+/ sys-apps/memtest86+/files/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: c08f36620da95e3f707a57b068bcd4ef5cb8e6e6 X-VCS-Branch: master Date: Fri, 13 Aug 2021 13:22:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f1498c13-b095-40c3-a0bb-fa0919c23047 X-Archives-Hash: 53d45e1ce9ad4280296af7d94c2eaea3 commit: c08f36620da95e3f707a57b068bcd4ef5cb8e6e6 Author: PPed72 iol it> AuthorDate: Thu Nov 19 17:09:50 2020 +0000 Commit: Lars Wendler gentoo org> CommitDate: Fri Aug 13 13:22:36 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c08f3662 sys-apps/memtest86+: version bump to 5.31b Closes: https://bugs.gentoo.org/728766 Signed-off-by: Paolo Pedroni iol.it> Package-Manager: Portage-3.0.9, Repoman-3.0.2 Closes: https://github.com/gentoo/gentoo/pull/18324 Signed-off-by: Lars Wendler gentoo.org> sys-apps/memtest86+/Manifest | 1 + .../files/memtest86+-5.31b-gcc-473.patch | 13 +++ .../files/memtest86+-5.31b-hardcoded_cc.patch | 16 +++ .../files/memtest86+-5.31b-no-clean.patch | 19 ++++ .../files/memtest86+-5.31b-objcopy.patch | 21 ++++ .../memtest86+-5.31b-test-random-cflags.patch | 17 +++ sys-apps/memtest86+/memtest86+-5.31b.ebuild | 114 +++++++++++++++++++++ 7 files changed, 201 insertions(+) diff --git a/sys-apps/memtest86+/Manifest b/sys-apps/memtest86+/Manifest index 95326fdd945..48b2ddc7961 100644 --- a/sys-apps/memtest86+/Manifest +++ b/sys-apps/memtest86+/Manifest @@ -1 +1,2 @@ DIST memtest86+-5.01.tar.gz 214877 BLAKE2B ef63eaabaf6d3d27b85c73618c692dd61cce52f3670a57958d181623888bdc3aa538855da9a82ec2ab70b180938e3df99f0b06f606b2d6f64e8aabbe781b3050 SHA512 d872db35ef733ec8f49094251f2bf6b98cc80eb06d04044be3aecf28d534f24ba293a08b9979b112dbd07cf27368148939a33a32c7010fc9581a3a5b150c94d7 +DIST memtest86+-5.31b.tar.gz 227779 BLAKE2B 14aced912bb84115278a3aff7650a3571918b823335aaf7d09880ef10374c320f64878765d93d2ee5a75e2b33ef6c9c4886a9a168955bd77c668f06f5c86a6ca SHA512 ad5891fd0c430ce7a5d0cde2d10dee20b66ad8060d47c3e70e038461d9cde3a78dfc13442b5b09da7c662741945a670353c72dbc08fd5ee8bae82256001a9541 diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch new file mode 100644 index 00000000000..76c0761512b --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch @@ -0,0 +1,13 @@ +http://forum.canardpc.com/threads/110950-fix-controller-loop-error + +--- a/Makefile ++++ b/Makefile +@@ -12,7 +12,7 @@ FDISK=/dev/fd0 + AS=as -32 + CC=gcc + +-CFLAGS= -Wall -Werror -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \ ++CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \ + -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector + + SELF_TEST_CFLAGS = -Wall -Werror -march=i486 -m32 -O1 -g diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch new file mode 100644 index 00000000000..4ee174478b7 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch @@ -0,0 +1,16 @@ +--- a/Makefile ++++ b/Makefile +@@ -9,11 +9,10 @@ + # + FDISK=/dev/fd0 + +-AS=as -32 +-CC=gcc +- + CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \ + -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector ++CPPFLAGS= -m32 ++ASFLAGS= -32 + + SELF_TEST_CFLAGS = -Wall -Werror -march=i486 -m32 -O1 -g + diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch new file mode 100644 index 00000000000..dbb560e506b --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch @@ -0,0 +1,19 @@ +http://forum.canardpc.com/threads/110954-PATCH-fix-parallel-build-issues + + +don't run the clean target when building all as we run into parallel races: + - memtest kicks off building of a bunch of .o files + - clean runs in parallel which runs `rm` and deletes some of the new .o + - memtest goes to link and fails because objects are missing + +--- a/Makefile ++++ b/Makefile +@@ -22,7 +22,7 @@ + + SELF_TEST_OBJS = test.o self_test.o cpuid.o random.o + +-all: clean memtest.bin memtest ++all: memtest.bin memtest + + run_self_test : self_test + ./self_test && touch run_self_test diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch new file mode 100644 index 00000000000..9398c4163a4 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch @@ -0,0 +1,21 @@ +Allow 'objcopy' override with user's OBJCOPY. + +--- a/Makefile ++++ b/Makefile +@@ -8,6 +8,7 @@ + # Path for the floppy disk device + # + FDISK=/dev/fd0 ++OBJCOPY=objcopy + + CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \ + -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector +@@ -36,7 +37,7 @@ + $(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS) + + memtest_shared.bin: memtest_shared +- objcopy -O binary $< memtest_shared.bin ++ $(OBJCOPY) -O binary $< memtest_shared.bin + + memtest: memtest_shared.bin memtest.lds + $(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@ diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch new file mode 100644 index 00000000000..f3faf1392b3 --- /dev/null +++ b/sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch @@ -0,0 +1,17 @@ +make sure we re-use the existing CFLAGS settings so that we get all the right +flags (like -fno-stack-protector). just append the few changes we want (the +optimization levels). + +https://bugs.gentoo.org/590974 + +--- a/Makefile ++++ b/Makefile +@@ -65,7 +65,7 @@ + $(CC) -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector -c -o memsize.o memsize.c + + random.o: random.c +- $(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding random.c ++random.o: CFLAGS += -O3 -fno-PIC + + clean: + rm -f *.o *.s *.iso memtest.bin memtest memtest_shared \ diff --git a/sys-apps/memtest86+/memtest86+-5.31b.ebuild b/sys-apps/memtest86+/memtest86+-5.31b.ebuild new file mode 100644 index 00000000000..5e14a51127a --- /dev/null +++ b/sys-apps/memtest86+/memtest86+-5.31b.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit mount-boot eutils toolchain-funcs + +DESCRIPTION="Memory tester based on memtest86" +HOMEPAGE="http://www.memtest.org/" +SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="+boot floppy iso serial" + +BOOTDIR="/boot/memtest86plus" +QA_PRESTRIPPED="${BOOTDIR}/memtest /usr/share/${PN}/memtest" +QA_FLAGS_IGNORED="${BOOTDIR}/memtest /usr/share/${PN}/memtest" + +RDEPEND="floppy? ( sys-fs/mtools )" +DEPEND="iso? ( app-cdr/cdrtools )" + +PATCHES=( + "${FILESDIR}/${P}-gcc-473.patch" + "${FILESDIR}/${P}-hardcoded_cc.patch" + "${FILESDIR}/${P}-no-clean.patch" #557890 + "${FILESDIR}/${P}-objcopy.patch" + "${FILESDIR}/${P}-test-random-cflags.patch" #590974 +) + +pkg_pretend() { + use boot && mount-boot_pkg_pretend +} + +src_prepare() { + sed -i -e 's,0x10000,0x100000,' memtest.lds || die + sed -i 's:genisoimage:mkisofs:' makeiso.sh || die + + if use serial ; then + sed -i \ + -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \ + config.h \ + || die "sed failed" + fi + default +} + +src_configure() { + tc-ld-disable-gold #580212 + tc-export AS CC LD +} + +src_compile() { + emake OBJCOPY="$(tc-getOBJCOPY)" + if use iso ; then + ./makeiso.sh || die + fi +} + +src_test() { :; } + +src_install() { + if use boot; then + insinto "${BOOTDIR}" + doins memtest memtest.bin + fi + + insinto /usr/share/${PN} + use iso && newins mt*.iso memtest.iso + doins memtest memtest.bin + + exeinto /etc/grub.d + newexe "${FILESDIR}"/39_${PN}-r1 39_${PN} + + dodoc README README.build-process FAQ changelog + + if use floppy ; then + dobin "${FILESDIR}"/make-memtest86+-boot-floppy + doman "${FILESDIR}"/make-memtest86+-boot-floppy.1 + fi +} + +pkg_preinst() { + use boot && mount-boot_pkg_preinst +} + +pkg_postinst() { + if use boot; then + mount-boot_pkg_postinst + + elog "memtest86+ has been installed in ${BOOTDIR}/" + elog "You may wish to update your bootloader configs by adding these lines:" + elog " - For grub2 just run grub-mkconfig, a configuration file is installed" + elog " as /etc/grub.d/39_${PN}" + elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)" + elog " > title=${PN}" + elog " > root (hd?,?)" + elog " > kernel ${BOOTDIR}/memtest.bin" + elog " - For lilo:" + elog " > image = ${BOOTDIR}/memtest.bin" + elog " > label = ${PN}" + elog "" + elog "Note: For older configs, you might have to change from 'memtest' to 'memtest.bin'." + fi +} + +pkg_prerm() { + use boot && mount-boot_pkg_prerm +} + +pkg_postrm() { + use boot && mount-boot_pkg_postrm +}