diff --git a/1.0.7.tar.gz b/1.0.7.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..bf7d5560302ee7135686d24f4362bccb3a70380c Binary files /dev/null and b/1.0.7.tar.gz differ diff --git a/uperf-1.0.6-ssl-crash.patch b/uperf-1.0.6-ssl-crash.patch new file mode 100644 index 0000000000000000000000000000000000000000..034983f6030b40a2e03b9377a2b68daf370e8cb7 --- /dev/null +++ b/uperf-1.0.6-ssl-crash.patch @@ -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 ++#include ++#include + #include + #include /* basic socket definitions */ + #include +@@ -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(); + diff --git a/uperf.spec b/uperf.spec new file mode 100644 index 0000000000000000000000000000000000000000..caa21d053594cf844e9494eaa0c09248727d7e2f --- /dev/null +++ b/uperf.spec @@ -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 - 1.0.7-1 +- Package init