Skip to contentSkip to conversation

sysbench: upgrade to 1.0.20

PATCH In review Nicolas Dechesne 2 participants 4 messages May 19, 2021 – May 25, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sysbench: upgrade to 1.0.20

* Upstream moved to Github, let's use it for SRC_URI
* COPYING file was changed, but with no impact on license
* sysbench includes a copy of luajit project and it's compiled by default. However the internal copy of luajit won't cross compile properly, without patching it (it uses 'gcc'). So instead use the 'system' luajit, e.g. the one package from OE (which is what most distro do anyways)
* Does not compile with different built folder. Lua generated files have things like that:
unsigned char __/__/__/__/sysbench-1_0_20/src/lua/internal/sysbench_lua[] =

---
 ...{sysbench_0.4.12.bb => sysbench_1.0.20.bb} | 21 ++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
 rename meta-oe/recipes-benchmark/sysbench/{sysbench_0.4.12.bb => sysbench_1.0.20.bb} (56%)
meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb renamed from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb +14 -7
similarity index 56%
rename from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb
rename to meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb
index 708c71f4f..555477ab0 100644
@@ -2,16 +2,17 @@ SUMMARY = "System performance benchmark"
 HOMEPAGE = "http://github.com/akopytov/sysbench"
 SECTION = "console/tests"
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-inherit autotools
+DEPENDS = "luajit"
 
-# The project has moved from Sourceforge to Launchpad, to Github. Use the source tarball from
-# Launchpad until the next release is available from Github.
-SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+files/${BPN}_${PV}.orig.tar.gz"
+inherit autotools pkgconfig
 
-SRC_URI[md5sum] = "3a6d54fdd3fe002328e4458206392b9d"
-SRC_URI[sha256sum] = "83fa7464193e012c91254e595a89894d8e35b4a38324b52a5974777e3823ea9e"
+SRC_URI = "git://github.com/akopytov/${BPN}.git"
+
+SRCREV = "ebf1c90da05dea94648165e4f149abc20c979557"
+
+S = "${WORKDIR}/git"
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'largefile', d)}"
 PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
@@ -21,6 +22,12 @@ PACKAGECONFIG[mysql] = "--with-mysql \
                         --with-mysql-libs=${STAGING_LIBDIR}, \
                         --without-mysql,mysql5"
 
+# the internal luajit won't cross compile
+EXTRA_OECONF += "--with-system-luajit"
+
+# lua.h generated files are bogus when using B != S
+B = "${S}"
+
 do_configure_prepend() {
     touch ${S}/NEWS ${S}/AUTHORS
 }
Signature · 1 line
2.29.2
#1 lore raw

seeing this failure

https://errors.yoctoproject.org/Errors/Details/584952/

Quoted 69 lines · Nicolas Dechesne

* Upstream moved to Github, let's use it for SRC_URI
* COPYING file was changed, but with no impact on license
* sysbench includes a copy of luajit project and it's compiled by default. However the internal copy of luajit won't cross compile properly, without patching it (it uses 'gcc'). So instead use the 'system' luajit, e.g. the one package from OE (which is what most distro do anyways)
* Does not compile with different built folder. Lua generated files have things like that:
unsigned char __/__/__/__/sysbench-1_0_20/src/lua/internal/sysbench_lua[] =

---
 ...{sysbench_0.4.12.bb => sysbench_1.0.20.bb} | 21 ++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
 rename meta-oe/recipes-benchmark/sysbench/{sysbench_0.4.12.bb => sysbench_1.0.20.bb} (56%)
meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb renamed from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb +14 -8
similarity index 56%
rename from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb
rename to meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb
index 708c71f4f..555477ab0 100644
@@ -2,16 +2,17 @@ SUMMARY = "System performance benchmark"
 HOMEPAGE = "http://github.com/akopytov/sysbench"
 SECTION = "console/tests"
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-inherit autotools
+DEPENDS = "luajit"
 
-# The project has moved from Sourceforge to Launchpad, to Github. Use the source tarball from
-# Launchpad until the next release is available from Github.
-SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+files/${BPN}_${PV}.orig.tar.gz"
+inherit autotools pkgconfig
 
-SRC_URI[md5sum] = "3a6d54fdd3fe002328e4458206392b9d"
-SRC_URI[sha256sum] = "83fa7464193e012c91254e595a89894d8e35b4a38324b52a5974777e3823ea9e"
+SRC_URI = "git://github.com/akopytov/${BPN}.git"
+
+SRCREV = "ebf1c90da05dea94648165e4f149abc20c979557"
+
+S = "${WORKDIR}/git"
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'largefile', d)}"
 PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
@@ -21,6 +22,12 @@ PACKAGECONFIG[mysql] = "--with-mysql \
                         --with-mysql-libs=${STAGING_LIBDIR}, \
                         --without-mysql,mysql5"
 
+# the internal luajit won't cross compile
+EXTRA_OECONF += "--with-system-luajit"
+
+# lua.h generated files are bogus when using B != S
+B = "${S}"
+
 do_configure_prepend() {
     touch ${S}/NEWS ${S}/AUTHORS
 }
--

2.29.2

#2 lore raw
Quoted 3 lines · Khem Raj

seeing this failure

https://errors.yoctoproject.org/Errors/Details/584952/

hmm. Sorry about the delay.. Looks like I am not able to reproduce the error, it builds for me with oe-core only and with:

Build Configuration:

BB_VERSION           = "1.51.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "debian-10"
TARGET_SYS           = "arm-oe-linux-gnueabi"
MACHINE              = "qemuarm"
DISTRO               = "nodistro"
DISTRO_VERSION       = "nodistro.0"
TUNE_FEATURES        = "arm armv7ve vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"

Do you have any idea why it would work for me, and not for you?

Quoted 84 lines
Quoted 11 lines · Nicolas Dechesne

* Upstream moved to Github, let's use it for SRC_URI
* COPYING file was changed, but with no impact on license
* sysbench includes a copy of luajit project and it's compiled by default. However the internal copy of luajit won't cross compile properly, without patching it (it uses 'gcc'). So instead use the 'system' luajit, e.g. the one package from OE (which is what most distro do anyways)
* Does not compile with different built folder. Lua generated files have things like that:
unsigned char

__/__/__/__/sysbench-1_0_20/src/lua/internal/sysbench_lua[] =

Quoted 6 lines
---
 ...{sysbench_0.4.12.bb => sysbench_1.0.20.bb} | 21 ++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
 rename meta-oe/recipes-benchmark/sysbench/{sysbench_0.4.12.bb =>

sysbench_1.0.20.bb} (56%)

Review

Quoted 2 lines
(quoted diff) +0 -0

b/meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb

Quoted 7 lines

similarity index 56%
rename from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb rename to meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb index 708c71f4f..555477ab0 100644

meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb SUMMARY = "System performance benchmark" · line 9

Quoted 10 lines
meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb renamed from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb +2 -3
@@ -2,16 +2,17 @@ SUMMARY = "System performance benchmark"
 HOMEPAGE = "http://github.com/akopytov/sysbench"
 SECTION = "console/tests"
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-inherit autotools
+DEPENDS = "luajit"
 
-# The project has moved from Sourceforge to Launchpad, to Github. Use

the source tarball from

meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb SUMMARY = "System performance benchmark" · line 11

Quoted 2 lines
meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb renamed from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb +0 -2
-# Launchpad until the next release is available from Github.
-SRC_URI = "

https://launchpad.net/ubuntu/+archive/primary/+files/${BPN}_${PV}.orig.tar.gz
<https://launchpad.net/ubuntu/+archive/primary/+files/$%7BBPN%7D_$%7BPV%7D.orig.tar.gz>
"

meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb SUMMARY = "System performance benchmark"

Quoted 4 lines
meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb renamed from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb +1 -2
+inherit autotools pkgconfig
 
-SRC_URI[md5sum] = "3a6d54fdd3fe002328e4458206392b9d"
-SRC_URI[sha256sum] =

"83fa7464193e012c91254e595a89894d8e35b4a38324b52a5974777e3823ea9e"

meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb SUMMARY = "System performance benchmark" · line 11

Quoted 1 line
meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb renamed from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb +1 -0
+SRC_URI = "git://github.com/akopytov/${BPN}.git

<http://github.com/akopytov/$%7BBPN%7D.git>"

meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb SUMMARY = "System performance benchmark"

Quoted 6 lines
meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb renamed from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb +4 -0
+
+SRCREV = "ebf1c90da05dea94648165e4f149abc20c979557"
+
+S = "${WORKDIR}/git"
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'largefile',

d)}"

Quoted 20 lines
meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb renamed from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb +6 -1
 PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
@@ -21,6 +22,12 @@ PACKAGECONFIG[mysql] = "--with-mysql \
                         --with-mysql-libs=${STAGING_LIBDIR}, \
                         --without-mysql,mysql5"
 
+# the internal luajit won't cross compile
+EXTRA_OECONF += "--with-system-luajit"
+
+# lua.h generated files are bogus when using B != S
+B = "${S}"
+
 do_configure_prepend() {
     touch ${S}/NEWS ${S}/AUTHORS
 }
--

2.29.2

#3 lore raw
Quoted 23 lines · Nicolas Dechesne
Quoted 4 lines · Khem Raj

seeing this failure

https://errors.yoctoproject.org/Errors/Details/584952/

hmm. Sorry about the delay.. Looks like I am not able to reproduce the error, it builds for me with oe-core only and with:

Build Configuration:

BB_VERSION           = "1.51.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "debian-10"
TARGET_SYS           = "arm-oe-linux-gnueabi"
MACHINE              = "qemuarm"
DISTRO               = "nodistro"
DISTRO_VERSION       = "nodistro.0"
TUNE_FEATURES        = "arm armv7ve vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
Quoted 1 line

Do you have any idea why it would work for me, and not for you?

you need really old compiler which does not implement -fmacro-prefix-map cmdline option e.g. gcc 7 on ubuntu 18.04 build host.
perhaps this package should ensure these options are not used in BUILD_CFLAGS

Quoted 75 lines
Quoted 75 lines
Quoted 69 lines · Nicolas Dechesne

* Upstream moved to Github, let's use it for SRC_URI
* COPYING file was changed, but with no impact on license
* sysbench includes a copy of luajit project and it's compiled by default. However the internal copy of luajit won't cross compile properly, without patching it (it uses 'gcc'). So instead use the 'system' luajit, e.g. the one package from OE (which is what most distro do anyways)
* Does not compile with different built folder. Lua generated files have things like that:
unsigned char __/__/__/__/sysbench-1_0_20/src/lua/internal/sysbench_lua[] =

---
 ...{sysbench_0.4.12.bb => sysbench_1.0.20.bb} | 21 ++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
 rename meta-oe/recipes-benchmark/sysbench/{sysbench_0.4.12.bb => sysbench_1.0.20.bb} (56%)
meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb renamed from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb +14 -8
similarity index 56%
rename from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb
rename to meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb
index 708c71f4f..555477ab0 100644
@@ -2,16 +2,17 @@ SUMMARY = "System performance benchmark"
 HOMEPAGE = "http://github.com/akopytov/sysbench"
 SECTION = "console/tests"
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-inherit autotools
+DEPENDS = "luajit"
 
-# The project has moved from Sourceforge to Launchpad, to Github. Use the source tarball from
-# Launchpad until the next release is available from Github.
-SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+files/${BPN}_${PV}.orig.tar.gz"
+inherit autotools pkgconfig
 
-SRC_URI[md5sum] = "3a6d54fdd3fe002328e4458206392b9d"
-SRC_URI[sha256sum] = "83fa7464193e012c91254e595a89894d8e35b4a38324b52a5974777e3823ea9e"
+SRC_URI = "git://github.com/akopytov/${BPN}.git"
+
+SRCREV = "ebf1c90da05dea94648165e4f149abc20c979557"
+
+S = "${WORKDIR}/git"
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'largefile', d)}"
 PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
@@ -21,6 +22,12 @@ PACKAGECONFIG[mysql] = "--with-mysql \
                         --with-mysql-libs=${STAGING_LIBDIR}, \
                         --without-mysql,mysql5"
 
+# the internal luajit won't cross compile
+EXTRA_OECONF += "--with-system-luajit"
+
+# lua.h generated files are bogus when using B != S
+B = "${S}"
+
 do_configure_prepend() {
     touch ${S}/NEWS ${S}/AUTHORS
 }
--

2.29.2