init uperf package
This commit is contained in:
parent
eba37bc889
commit
2a21b72dd6
BIN
1.0.7.tar.gz
Normal file
BIN
1.0.7.tar.gz
Normal file
Binary file not shown.
38
uperf-1.0.6-ssl-crash.patch
Normal file
38
uperf-1.0.6-ssl-crash.patch
Normal file
@ -0,0 +1,38 @@
|
||||
diff --git a/src/ssl.c b/src/ssl.c
|
||||
index 1352434..6507f26 100644
|
||||
--- a/src/ssl.c
|
||||
+++ b/src/ssl.c
|
||||
@@ -25,6 +25,8 @@
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
+#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/socket.h> /* basic socket definitions */
|
||||
#include <netdb.h>
|
||||
@@ -152,11 +154,11 @@ ssl_init(void *arg)
|
||||
int i;
|
||||
|
||||
if (IS_MASTER(options)) {
|
||||
- if (file_present("server.pem") == 0)
|
||||
- ctx = initialize_ctx("server.pem", PASS, NULL);
|
||||
+ if (file_present("/usr/share/uperf/server.pem") == 0)
|
||||
+ ctx = initialize_ctx("/usr/share/uperf/server.pem", PASS, NULL);
|
||||
} else {
|
||||
- if (file_present("client.pem") == 0)
|
||||
- ctx = initialize_ctx("client.pem", PASS, NULL);
|
||||
+ if (file_present("/usr/share/uperf/client.pem") == 0)
|
||||
+ ctx = initialize_ctx("/usr/share/uperf/client.pem", PASS, NULL);
|
||||
}
|
||||
if (ctx == NULL)
|
||||
return (1);
|
||||
@@ -394,7 +396,7 @@ initialize_ctx(char *keyfile, char *password, const char *method)
|
||||
#else
|
||||
SSL_METHOD *meth;
|
||||
#endif
|
||||
- SSL_CTX *ctx;
|
||||
+ SSL_CTX *ctx = NULL;
|
||||
|
||||
SSL_library_init();
|
||||
|
||||
48
uperf.spec
Normal file
48
uperf.spec
Normal file
@ -0,0 +1,48 @@
|
||||
Summary: Network performance tool with modelling and replay support
|
||||
Name: uperf
|
||||
Version: 1.0.7
|
||||
Release: 1
|
||||
License: GPLv3
|
||||
URL: http://www.uperf.org/
|
||||
Source0: https://github.com/uperf/uperf/archive/%{version}.tar.gz
|
||||
Patch1: uperf-1.0.6-ssl-crash.patch
|
||||
BuildRequires: gdb-headless gcc automake lksctp-tools-devel openssl-devel
|
||||
|
||||
%description
|
||||
Network performance tool that supports modelling and replay of various
|
||||
networking patterns.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch1 -p1
|
||||
find src -type f -print0 | xargs --null chmod 0644
|
||||
find workloads -type f -print0 | xargs --null chmod 0644
|
||||
chmod 0644 AUTHORS ChangeLog COPYING README
|
||||
|
||||
%build
|
||||
%configure \
|
||||
--enable-cpc \
|
||||
--enable-netstat \
|
||||
--enable-udp \
|
||||
--enable-sctp \
|
||||
--enable-ssl
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
# Move stuff to own subdir
|
||||
install -d -m 0755 %{buildroot}%{_datadir}/%{name}
|
||||
install -p -m 0644 %{buildroot}%{_datadir}/*.xml %{buildroot}%{_datadir}/%{name}
|
||||
install -p -m 0644 {server,client}.pem %{buildroot}%{_datadir}/%{name}
|
||||
rm -rf %{buildroot}%{_datadir}/*.xml %{buildroot}%{_datadir}/doc
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc AUTHORS ChangeLog README
|
||||
%{_bindir}/uperf
|
||||
%{_datadir}/uperf
|
||||
|
||||
%changelog
|
||||
* Thu Oct 15 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.0.7-1
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user