Project import
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..107fe00 --- /dev/null +++ b/Makefile
@@ -0,0 +1,99 @@ +# +# Copyright (c) 2010-2011 Nest, Inc. +# All rights reserved. +# +# This document is the property of Nest. It is considered +# confidential and proprietary information. +# +# This document may not be reproduced or transmitted in any form, +# in whole or in part, without the express written permission of +# Nest. +# +# Description: +# This file is the make file for memtester, a portable userspace +# utility for testing the memory subsystem for faults. +# + +BuildConfigSpecialized := No +BuildProductSpecialized := No + +include pre.mak + +PackageName := memtester + +PackageExtension := tar.gz +PackageSeparator := - + +PackagePatchArgs := + +PackageArchive := $(PackageName).$(PackageExtension) +PackageSourceDir := $(PackageName)$(PackageSeparator)$(PackageVersion) + +PackageBuildMakefile = $(call GenerateBuildPaths,Makefile) + +CleanPaths += $(PackageLicenseFile) + +all: $(PackageDefaultGoal) + +# Generate the package license contents. + +$(PackageSourceDir)/COPYING: source + +$(PackageLicenseFile): $(PackageSourceDir)/COPYING + $(copy-result) + +# Extract the source from the archive and apply patches, if any. + +$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths) + $(expand-and-patch-package) + +# Prepare the sources. + +.PHONY: source +source: | $(PackageSourceDir) + +# Patch the sources, if necessary. + +.PHONY: patch +patch: source + +# Generate the package build makefile. + +$(PackageBuildMakefile): | $(PackageSourceDir) $(BuildDirectory) + $(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory)) + +# Configure the source for building. + +.PHONY: configure +configure: source $(PackageBuildMakefile) + +# Build the source. +# +# We have to unset MAKEFLAGS since they confuse the package build otherwise. + +.PHONY: build +build: configure | $(BuildDirectory) + $(Verbose)unset MAKEFLAGS && \ + $(MAKE) $(JOBSFLAG) -C $(BuildDirectory) \ + CC="$(CC)" AR=$(AR) RANLIB=$(RANLIB) STRIP=$(STRIP) \ + INSTALL="$(INSTALL) $(INSTALLFLAGS)" \ + all + +# Stage the build to a temporary installation area. +# +# We have to unset MAKEFLAGS since they confuse the package build otherwise. + +.PHONY: stage +stage: build | $(ResultDirectory) + $(Verbose)unset MAKEFLAGS && \ + $(MAKE) $(JOBSFLAG) -C $(BuildDirectory) \ + INSTALL="$(INSTALL) $(INSTALLFLAGS)" \ + INSTALLPATH=$(ResultDirectory) \ + install + +clean: + $(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir) + $(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory) + $(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory) + +include post.mak
diff --git a/memtester.patches/memtester-50.description b/memtester.patches/memtester-50.description new file mode 100644 index 0000000..4a1b4fb --- /dev/null +++ b/memtester.patches/memtester-50.description
@@ -0,0 +1 @@ +This patch simplifies the build of memtester by eliminating all of its compiler and linker indirection scripts that completely prevent building memtester in a cross-compiled environment.
diff --git a/memtester.patches/memtester-50.patch b/memtester.patches/memtester-50.patch new file mode 100644 index 0000000..aa14a36 --- /dev/null +++ b/memtester.patches/memtester-50.patch
@@ -0,0 +1,35 @@ +diff -aruN a/Makefile b/Makefile +--- a/Makefile 2010-10-03 12:56:13.000000000 -0700 ++++ b/Makefile 2010-11-02 17:21:36.093700129 -0700 +@@ -7,11 +7,8 @@ + # COPYING for details. + # + +-# You don't need to edit these; change the contents of the conf-cc and conf-ld +-# files if you need to change the compile/link commands. See the README for +-# more information. +-CC = $(shell head -n 1 conf-cc) +-LD = $(shell head -n 1 conf-ld) ++compile = $(CC) -O2 -DPOSIX -D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64 -DTEST_NARROW_WRITES -c ++link = $(CC) -o + + SOURCES = memtester.c tests.c + OBJECTS = $(SOURCES:.c=.o) +@@ -74,11 +71,11 @@ + rm -f memtester $(TARGETS) $(OBJECTS) core + + memtester: \ +-$(OBJECTS) memtester.c tests.h tests.c tests.h conf-cc Makefile load extra-libs +- ./load memtester tests.o `cat extra-libs` ++$(OBJECTS) memtester.c tests.h tests.c tests.h Makefile ++ $(link) memtester memtester.o tests.o + +-memtester.o: memtester.c tests.h conf-cc Makefile compile +- ./compile memtester.c ++memtester.o: memtester.c tests.h Makefile ++ $(compile) memtester.c + +-tests.o: tests.c tests.h conf-cc Makefile compile +- ./compile tests.c ++tests.o: tests.c tests.h Makefile ++ $(compile) tests.c
diff --git a/memtester.patches/memtester-51.description b/memtester.patches/memtester-51.description new file mode 100644 index 0000000..ad9e531 --- /dev/null +++ b/memtester.patches/memtester-51.description
@@ -0,0 +1 @@ +This patch addresses an issue in which, on Ubuntu 11 and later, sh is not an alias of bash. Consequently, bashisms such as file interpolation do not work correctly.
diff --git a/memtester.patches/memtester-51.patch b/memtester.patches/memtester-51.patch new file mode 100644 index 0000000..77e5bd7 --- /dev/null +++ b/memtester.patches/memtester-51.patch
@@ -0,0 +1,13 @@ +diff -aruN a/Makefile b/Makefile +--- a/Makefile 2012-09-10 15:51:24.061610646 -0700 ++++ b/Makefile 2012-09-10 15:51:02.872463701 -0700 +@@ -22,7 +22,8 @@ + all: memtester + + install: all +- mkdir -m 755 -p $(INSTALLPATH)/{bin,man/man8} ++ mkdir -m 755 -p $(INSTALLPATH)/bin ++ mkdir -m 755 -p $(INSTALLPATH)/man/man8 + install -m 755 memtester $(INSTALLPATH)/bin/ + gzip -c memtester.8 >memtester.8.gz ; install -m 644 memtester.8.gz $(INSTALLPATH)/man/man8/ +
diff --git a/memtester.tar.gz b/memtester.tar.gz new file mode 100644 index 0000000..ca21e55 --- /dev/null +++ b/memtester.tar.gz Binary files differ
diff --git a/memtester.url b/memtester.url new file mode 100644 index 0000000..333eb54 --- /dev/null +++ b/memtester.url
@@ -0,0 +1 @@ +http://pyropus.ca/software/memtester/old-versions/memtester-4.2.1.tar.gz
diff --git a/memtester.version b/memtester.version new file mode 100644 index 0000000..fae6e3d --- /dev/null +++ b/memtester.version
@@ -0,0 +1 @@ +4.2.1