mariadb: Move useradd handling in target side of the recipe

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>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Yoann Congal 2024-02-09 12:18:16 +01:00 committed by Khem Raj
parent 421c315153
commit 065d6496e4
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 7 additions and 5 deletions

View File

@ -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"

View File

@ -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"