]> git.pld-linux.org Git - packages/sysbench.git/commitdiff
Up to 1.0.20 master auto/th/sysbench-1.0.20-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 25 Mar 2024 09:12:19 +0000 (10:12 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 25 Mar 2024 09:12:19 +0000 (10:12 +0100)
no-mysqlclient_r.patch [deleted file]
sysbench-1.0.20-fix_deprecated_egrep_call.patch [new file with mode: 0644]
sysbench-1.0.20-python3.patch [new file with mode: 0644]
sysbench.spec

diff --git a/no-mysqlclient_r.patch b/no-mysqlclient_r.patch
deleted file mode 100644 (file)
index f01c04b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
---- sysbench-0.4.12/acinclude.m4~      2009-03-14 14:35:36.000000000 +0100
-+++ sysbench-0.4.12/acinclude.m4       2018-03-10 23:19:19.161781346 +0100
-@@ -1,9 +1,7 @@
- dnl ---------------------------------------------------------------------------
- dnl Macro: AC_CHECK_MYSQLR
- dnl First check for custom MySQL paths in --with-mysql-* options.
--dnl If some paths are missing,  check if mysql_config exists. 
--dnl Then check for the libraries and replace -lmysqlclient with 
--dnl -lmysqlclient_r, to enable threaded client library.
-+dnl If some paths are missing,  check if mysql_config exists.
- dnl ---------------------------------------------------------------------------
- AC_DEFUN([AC_CHECK_MYSQLR],[
-@@ -51,7 +49,7 @@
-     ac_cv_mysql_libs=`echo ${ac_cv_mysql_libs} | sed -e 's/.libs$//' \
-                       -e 's+.libs/$++'`
-     AC_CACHE_CHECK([MySQL libraries], [ac_cv_mysql_libs], [ac_cv_mysql_libs=""])
--    MYSQL_LIBS="-L$ac_cv_mysql_libs -lmysqlclient_r"
-+    MYSQL_LIBS="-L$ac_cv_mysql_libs -lmysqlclient"
- fi
- # If some path is missing, try to autodetermine with mysql_config
-@@ -82,8 +80,7 @@
-         if test [ -z "$ac_cv_mysql_libs" ]
-         then
-             AC_MSG_CHECKING(MySQL linker flags)
--            MYSQL_LIBS=`${mysqlconfig} --libs | sed -e \
--            's/-lmysqlclient /-lmysqlclient_r /' -e 's/-lmysqlclient$/-lmysqlclient_r/'`
-+            MYSQL_LIBS=`${mysqlconfig} --libs`
-             AC_MSG_RESULT($MYSQL_LIBS)
-         fi
-     fi
diff --git a/sysbench-1.0.20-fix_deprecated_egrep_call.patch b/sysbench-1.0.20-fix_deprecated_egrep_call.patch
new file mode 100644 (file)
index 0000000..428f440
--- /dev/null
@@ -0,0 +1,11 @@
+--- sysbench-1.0.20/tests/t/opt_report_checkpoints.t.orig      2020-04-24 17:51:47.000000000 +0200
++++ sysbench-1.0.20/tests/t/opt_report_checkpoints.t   2023-03-03 22:15:43.654998914 +0100
+@@ -7,7 +7,7 @@
+   >   exit 80
+   > fi
+-  $ sysbench ${SBTEST_SCRIPTDIR}/oltp_read_write.lua --db-driver=mysql --mysql-dry-run --time=3 --events=0 --report-checkpoints=1,2 run | egrep '(Checkpoint report|SQL statistics)'
++  $ sysbench ${SBTEST_SCRIPTDIR}/oltp_read_write.lua --db-driver=mysql --mysql-dry-run --time=3 --events=0 --report-checkpoints=1,2 run | grep -E '(Checkpoint report|SQL statistics)'
+   [ 1s ] Checkpoint report:
+   SQL statistics:
+   [ 2s ] Checkpoint report:
diff --git a/sysbench-1.0.20-python3.patch b/sysbench-1.0.20-python3.patch
new file mode 100644 (file)
index 0000000..1f7dd41
--- /dev/null
@@ -0,0 +1,15 @@
+diff -urN sysbench-1.0.20.org/tests/test_run.sh sysbench-1.0.20/tests/test_run.sh
+--- sysbench-1.0.20.org/tests/test_run.sh      2020-04-24 17:51:47.000000000 +0200
++++ sysbench-1.0.20/tests/test_run.sh  2024-03-25 10:01:10.059965966 +0100
+@@ -83,7 +83,10 @@
+ . $SBTEST_CONFIG
+-if $(command -v python >/dev/null 2>&1)
++if $(command -v python3 >/dev/null 2>&1)
++then
++    PYTHON=python3
++elif $(command -v python >/dev/null 2>&1)
+ then
+     PYTHON=python
+ elif $(command -v python2 >/dev/null 2>&1)
index b40bba28eccb6ab322b2e6f124b57d395234a326..399ac0813d65719e2cdb34a87fc2c176abf4bc74 100644 (file)
@@ -1,16 +1,21 @@
+%bcond_without tests
 Summary:       a system performance benchmark
 Name:          sysbench
-Version:       0.4.12
-Release:       4
-License:       GPL
+Version:       1.0.20
+Release:       1
+License:       GPL v2+
 Group:         Applications/System
-Source0:       http://downloads.sourceforge.net/sysbench/%{name}-%{version}.tar.gz
-# Source0-md5: 3a6d54fdd3fe002328e4458206392b9d
-Patch0:                no-mysqlclient_r.patch
-URL:           http://sysbench.sourceforge.net/
+Source0:       https://github.com/akopytov/sysbench/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 756381c6fc4e16af1e0831b5e6a3dcb3
+Patch0:                %{name}-1.0.20-fix_deprecated_egrep_call.patch
+Patch1:                %{name}-1.0.20-python3.patch
+URL:           https://github.com/akopytov/sysbench/
 BuildRequires: autoconf
 BuildRequires: automake
+BuildRequires: libaio-devel
 BuildRequires: libtool
+BuildRequires: libxslt-progs
+BuildRequires: luajit-devel
 BuildRequires: mysql-devel
 BuildRequires: postgresql-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -37,6 +42,33 @@ benchmarks and third-party plug-in modules.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+bash(\s|$),#!/bin/bash\1,' \
+      tests/include/drv_common.sh \
+      tests/include/script_bulk_insert_common.sh \
+      tests/include/script_oltp_common.sh \
+      tests/include/script_oltp_legacy_common.sh \
+      tests/include/script_select_random_common.sh \
+      tests/include/script_select_random_legacy_common.sh \
+      tests/test_run.sh
+
+%{__sed} -E -i -e '1s,#!\s*%{_bindir}/env\s+sysbench(\s|$),#!%{_bindir}/sysbench\1,' \
+       src/lua/bulk_insert.lua \
+       src/lua/oltp_delete.lua \
+       src/lua/oltp_insert.lua \
+       src/lua/oltp_point_select.lua \
+       src/lua/oltp_read_only.lua \
+       src/lua/oltp_read_write.lua \
+       src/lua/oltp_update_index.lua \
+       src/lua/oltp_update_non_index.lua \
+       src/lua/oltp_write_only.lua \
+       src/lua/select_random_points.lua \
+       src/lua/select_random_ranges.lua
+
+rm -r third_party/luajit/luajit/
+#rm -r third_party/concurrency_kit/ck/
+#rm -r third_party/cram/
 
 %build
 %{__libtoolize}
@@ -46,19 +78,32 @@ benchmarks and third-party plug-in modules.
 %{__automake}
 %configure \
        --with-mysql \
-       --with-pgsql
+       --with-pgsql \
+       --with-system-luajit \
+       --without-gcc-arch \
+       --disable-silent-rules
+# --with-system-ck
 %{__make}
 
+%if %{with tests}
+cd tests
+./test_run.sh
+cd ..
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+rm $RPM_BUILD_ROOT%{_docdir}/sysbench/manual.html
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc ChangeLog README TODO doc/manual.html
+%doc ChangeLog README.md doc/manual.html
 %attr(755,root,root) %{_bindir}/%{name}
+%{_datadir}/sysbench
This page took 0.085903 seconds and 4 git commands to generate.