diff options
author | PPed72 <paolo.pedroni@iol.it> | 2020-11-19 18:09:50 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2021-08-13 15:22:36 +0200 |
commit | c08f36620da95e3f707a57b068bcd4ef5cb8e6e6 (patch) | |
tree | f4bff9df38e5d508e4aca2072c1c57f8771044c6 /sys-apps | |
parent | profiles: stable.{un}mask app-crypt/pinentry[efl] (diff) | |
download | gentoo-c08f36620da95e3f707a57b068bcd4ef5cb8e6e6.tar.gz gentoo-c08f36620da95e3f707a57b068bcd4ef5cb8e6e6.tar.bz2 gentoo-c08f36620da95e3f707a57b068bcd4ef5cb8e6e6.zip |
sys-apps/memtest86+: version bump to 5.31b
Closes: https://bugs.gentoo.org/728766
Signed-off-by: Paolo Pedroni <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 <polynomial-c@gentoo.org>
Diffstat (limited to 'sys-apps')
7 files changed, 201 insertions, 0 deletions
diff --git a/sys-apps/memtest86+/Manifest b/sys-apps/memtest86+/Manifest index 95326fdd945f..48b2ddc7961f 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 000000000000..76c0761512b4 --- /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 000000000000..4ee174478b7b --- /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 000000000000..dbb560e506b9 --- /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 000000000000..9398c4163a4d --- /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 000000000000..f3faf1392b3a --- /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 000000000000..5e14a51127a3 --- /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 +} |