Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
5019e49032
!13 【轻量级 PR】:fix bogus date
From: @zhangshaoning_uniontech 
Reviewed-by: @myeuler 
Signed-off-by: @myeuler
2022-11-30 12:13:53 +00:00
zhangshaoning
6830ece24d
fix bogus date
fix bogus date
2022-06-14 03:41:22 +00:00
openeuler-ci-bot
6f919cea1a !12 fix strip problem
From: @MementoMoriCheng
Reviewed-by: @myeuler
Signed-off-by: @myeuler
2021-09-12 16:00:30 +00:00
MementoMori
72291ee565 fix strip problem 2021-09-10 14:37:55 +08:00
openeuler-ci-bot
ef65fed2de !11 增加SP安全编译选项
From: @stevending1st
Reviewed-by: @overweight
Signed-off-by: @overweight
2021-07-31 01:48:04 +00:00
stevending1st
87953e1343 Add SP security compiler option. 2021-07-12 22:10:00 +08:00
openeuler-ci-bot
f123e920af !2 Fix rpc.h error.Rpc code moved from glibc to libtirpc
Merge pull request !2 from wang_yue111/master
2020-07-15 18:04:31 +08:00
wang_yue111
8a86d2316c fix pc code moved from glibc to libtirpc 2020-07-15 10:50:21 +08:00
openeuler-ci-bot
573e25f2a7 !1 init package
Merge pull request !1 from myeuler/master
2020-06-03 18:51:41 +08:00
myeuler
f775d06a35 init package 2020-05-15 23:52:00 +08:00
7 changed files with 184 additions and 0 deletions

View File

@ -0,0 +1,42 @@
From f13f0ffeb2f8901e3efa29072ac7935213ae72a6 Mon Sep 17 00:00:00 2001
Date: Wed, 15 Jul 2020 10:14:33 +0800
Subject: [PATCH] fix rpc.h error.Rpc code moved from glibc to libtirpc
---
src/Makefile | 3 +++
src/bench.h | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index 5737228..07004f3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -58,6 +58,9 @@ SAMPLES=lmbench/Results/aix/rs6000 lmbench/Results/hpux/snake \
lmbench/Results/irix/indigo2 lmbench/Results/linux/pentium \
lmbench/Results/osf1/alpha lmbench/Results/solaris/ss20*
+CFLAGS += -I/usr/include/tirpc
+LDFLAGS += -ltirpc
+CPPFLAGS += -I/usr/include/tirpc
COMPILE=$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
INCS = bench.h lib_mem.h lib_tcp.h lib_udp.h stats.h timing.h
diff --git a/src/bench.h b/src/bench.h
index 8166408..69ed17b 100644
--- a/src/bench.h
+++ b/src/bench.h
@@ -35,9 +35,9 @@ typedef unsigned char bool_t;
#include <sys/un.h>
#include <sys/resource.h>
#define PORTMAP
-#include <rpc/rpc.h>
+#include <tirpc/rpc/rpc.h>
#endif
-#include <rpc/types.h>
+#include <tirpc/rpc/types.h>
#include <stdarg.h>
#ifndef HAVE_uint
--
2.23.0

74
lmbench.spec Normal file
View File

@ -0,0 +1,74 @@
Name: lmbench
Version: 3
Release: 4
Summary: Tools for Performance Analysis
License: GPLv2
URL: http://www.bitmover.com/lmbench/
Source0: http://www.bitmover.com/lmbench/%{name}%{version}.tar.gz
Patch0: lmbench3-fix-llseek-and-remove-bk-in-Makefile.patch
Patch1: lmbench3-add-HOWTO-to-indicate-howto-use-this-package.patch
Patch2: Rpc-code-moved-from-glibc-to-libtirpc.patch
Patch3: lmbench3-add-sp-security-compiler-option.patch
Patch4: lmbench3-need-debug.patch
BuildRequires: gcc libtirpc-devel
%description
A userspace utility for testing the memory subsystem for faults. It's portable and should compile and work on any 32- or 64-bit Unix-like system. (Yes, even weird, proprietary Unices, and even Mac OS X.) For hardware developers, memtester can be told to test memory starting at a particular physical address as of memtester version 4.1.0.
%prep
%setup -q -n %{name}%{version}/
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
%make_build
%install
mkdir -p %{buildroot}/opt/%{name}/{bin,doc,scripts,results,src}
find bin/ -name *.o | xargs rm -rf
find bin/ -name *.a | xargs rm -rf
cp -r bin/* %{buildroot}/opt/%{name}/bin/
install -m 0644 src/* %{buildroot}/opt/%{name}/src
install -m 0755 scripts/* %{buildroot}/opt/%{name}/scripts/
install -m 0644 scripts/Makefile %{buildroot}/opt/%{name}/scripts/
install -m 0644 scripts/README %{buildroot}/opt/%{name}/scripts/
install -m 0644 doc/* %{buildroot}/opt/%{name}/doc/
install -m 0644 Makefile %{buildroot}/opt/%{name}/
install -m 0644 results/Makefile %{buildroot}/opt/%{name}/results
%pre
%preun
%post
%postun
%check
%files
%license COPYING COPYING-2
%doc README HOWTO
/opt/%{name}/*
%changelog
* Thu Sep 9 2021 Shaowei Cheng <chenshaowei3@huawei.com> - 3-4
- need debug
* Mon Jul 12 2021 stevending1st <stevending1st@163.com> - 3-3
- Add SP security compiler option.
* Wed Jul 15 2020 wangyue <wangyue92@huawei.com> - 3-2
- Fix rpc.h error.Rpc code moved from glibc to libtirpc.
* Sun Mar 29 2020 Wei Xiong <myeuler@163.com>
- Package init

View File

@ -0,0 +1,11 @@
diff -urN lmbench3/HOWTO lmbench3-bak/HOWTO
--- lmbench3/HOWTO 1970-01-01 08:00:00.000000000 +0800
+++ lmbench3-bak/HOWTO 2020-05-03 14:25:32.662989266 +0800
@@ -0,0 +1,7 @@
+For the reason that lmbench is not a packaging frindly software.
+Put lmbench on /opt/lmbench dir which including all the contents.
+
+if try to use it. just create a new dir and copy everything in the new dir
+and rum make.
+
+This is a stupid way, but anyway, this is a way

View File

@ -0,0 +1,9 @@
diff -Nur lmbench3/scripts/build lmbench3_new/scripts/build
--- lmbench3/scripts/build 2005-08-23 08:19:54.000000000 +0800
+++ lmbench3_new/scripts/build 2021-07-12 22:02:33.651649157 +0800
@@ -249,4 +249,4 @@
if [ ! -d ${BINDIR} ]; then mkdir -p ${BINDIR}; fi
# now go ahead and build everything!
-${MAKE} OS="${OS}" CC="${CC}" CFLAGS="${CFLAGS}" LDLIBS="${LDLIBS}" O="${BINDIR}" $*
+${MAKE} OS="${OS}" CC="${CC}" CFLAGS="${CFLAGS} -fstack-protector-strong" LDLIBS="${LDLIBS}" O="${BINDIR}" $*

View File

@ -0,0 +1,26 @@
diff -urN lmbench3/src/disk.c lmbench3-bak/src/disk.c
--- lmbench3/src/disk.c 2005-08-23 08:19:54.000000000 +0800
+++ lmbench3-bak/src/disk.c 2020-05-03 12:33:37.837715349 +0800
@@ -289,9 +289,7 @@
seekto(int fd, uint64 off)
{
#ifdef __linux__
- extern loff_t llseek(int, loff_t, int);
-
- if (llseek(fd, (loff_t)off, SEEK_SET) == (loff_t)-1) {
+ if (lseek(fd, (loff_t)off, SEEK_SET) == (loff_t)-1) {
return(-1);
}
return (0);
diff -urN lmbench3/src/Makefile lmbench3-bak/src/Makefile
--- lmbench3/src/Makefile 2005-08-23 08:19:54.000000000 +0800
+++ lmbench3-bak/src/Makefile 2020-05-03 12:33:32.148802834 +0800
@@ -228,7 +228,7 @@
install install-target dist get edit get-e clean clobber \
share depend testmake
-$O/lmbench : ../scripts/lmbench bk.ver
+$O/lmbench : ../scripts/lmbench
rm -f $O/lmbench
sed -e "s/<version>/`cat bk.ver`/g" < ../scripts/lmbench > $O/lmbench
chmod +x $O/lmbench

22
lmbench3-need-debug.patch Normal file
View File

@ -0,0 +1,22 @@
From 8a9ba9910e58fb4d837eff51e18abd91dbc99488 Mon Sep 17 00:00:00 2001
From: si-gui <245140120@qq.com>
Date: Fri, 10 Sep 2021 23:42:26 +0800
Subject: [PATCH] need debug
---
scripts/build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/build b/scripts/build
index 200d58e..7be068d 100755
--- a/scripts/build
+++ b/scripts/build
@@ -249,4 +249,4 @@ rm -f ${BASE}$$ ${BASE}$$.o ${BASE}$$.c
if [ ! -d ${BINDIR} ]; then mkdir -p ${BINDIR}; fi
# now go ahead and build everything!
-${MAKE} OS="${OS}" CC="${CC}" CFLAGS="${CFLAGS} -fstack-protector-strong" LDLIBS="${LDLIBS}" O="${BINDIR}" $*
+${MAKE} OS="${OS}" CC="${CC}" CFLAGS="${CFLAGS} -fstack-protector-strong -g" LDLIBS="${LDLIBS}" O="${BINDIR}" $*
--
2.30.0

BIN
lmbench3.tar.gz Normal file

Binary file not shown.