@@ -33,7 +33,7 @@ S = "${WORKDIR}/mariadb-${PV}"
BINCONFIG_GLOB = "mysql_config"
-inherit cmake gettext binconfig update-rc.d useradd systemd multilib_script pkgconfig
+inherit cmake gettext binconfig update-rc.d systemd multilib_script pkgconfig
MULTILIB_SCRIPTS = "${PN}-server:${bindir}/mariadbd-safe \
${PN}-setupdb:${bindir}/mariadb-install-db"
@@ -42,10 +42,6 @@ INITSCRIPT_PACKAGES = "${PN}-server ${PN}-setupdb"
INITSCRIPT_NAME:${PN}-server = "mysqld"
INITSCRIPT_PARAMS:${PN}-server ?= "start 45 5 . stop 45 0 6 1 ."
-USERADD_PACKAGES = "${PN}-setupdb"
-USERADD_PARAM:${PN}-setupdb = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql"
-GROUPADD_PARAM:${PN}-setupdb = "--system mysql"
-
INITSCRIPT_NAME:${PN}-setupdb = "install_db"
INITSCRIPT_PARAMS:${PN}-setupdb ?= "defaults 44 44"
@@ -1,6 +1,8 @@
require mariadb.inc
inherit ptest
+inherit useradd
+
SRC_URI += "${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)}"
DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)}"
RDEPENDS:${PN}-ptest += "cmake sed perl-module-test-more"
@@ -36,6 +38,10 @@ DEPENDS += "mariadb-native bison-native boost libpcre2 curl ncurses \
PROVIDES += "mysql5 libmysqlclient"
+USERADD_PACKAGES = "${PN}-setupdb"
+USERADD_PARAM:${PN}-setupdb = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql"
+GROUPADD_PARAM:${PN}-setupdb = "--system mysql"
+
RPROVIDES:${PN} += "mysql5"
RREPLACES:${PN} += "mysql5"
RCONFLICTS:${PN} += "mysql5"
Having useradd class inherited for the -native recipe makes no sense and emit this kind of warning during reproducibility test: stdio: WARNING: QA Issue: mariadb-native: native/nativesdk class is not inherited last, this can result in unexpected behaviour. Classes inherited after native/nativesdk: useradd-staticids.bbclass [native-last] So, move the useradd inherit and associated variables to the target side of the recipe. Signed-off-by: Yoann Congal <yoann.congal@smile.fr> --- Tested target ptest OK but could not find a -native test. --- meta-oe/recipes-dbs/mysql/mariadb.inc | 6 +----- meta-oe/recipes-dbs/mysql/mariadb_10.11.6.bb | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-)