diff options
author | Yoann Congal <yoann.congal@smile.fr> | 2024-02-09 12:18:16 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-02-09 09:52:17 -0800 |
commit | 065d6496e4af178e5b1f8e4e3c5f17ac587717a6 (patch) | |
tree | 034a83e711a81104cddeb4f72017511b6611f959 /meta-oe/recipes-dbs | |
parent | 421c31515307f67e921059ff59d9b1ed5cebca6d (diff) | |
download | meta-openembedded-065d6496e4af178e5b1f8e4e3c5f17ac587717a6.tar.gz |
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>
Diffstat (limited to 'meta-oe/recipes-dbs')
-rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb.inc | 6 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb_10.11.6.bb | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc index 7e6ef42bc3..25dc15b466 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc | |||
@@ -33,7 +33,7 @@ S = "${WORKDIR}/mariadb-${PV}" | |||
33 | 33 | ||
34 | BINCONFIG_GLOB = "mysql_config" | 34 | BINCONFIG_GLOB = "mysql_config" |
35 | 35 | ||
36 | inherit cmake gettext binconfig update-rc.d useradd systemd multilib_script pkgconfig | 36 | inherit cmake gettext binconfig update-rc.d systemd multilib_script pkgconfig |
37 | 37 | ||
38 | MULTILIB_SCRIPTS = "${PN}-server:${bindir}/mariadbd-safe \ | 38 | MULTILIB_SCRIPTS = "${PN}-server:${bindir}/mariadbd-safe \ |
39 | ${PN}-setupdb:${bindir}/mariadb-install-db" | 39 | ${PN}-setupdb:${bindir}/mariadb-install-db" |
@@ -42,10 +42,6 @@ INITSCRIPT_PACKAGES = "${PN}-server ${PN}-setupdb" | |||
42 | INITSCRIPT_NAME:${PN}-server = "mysqld" | 42 | INITSCRIPT_NAME:${PN}-server = "mysqld" |
43 | INITSCRIPT_PARAMS:${PN}-server ?= "start 45 5 . stop 45 0 6 1 ." | 43 | INITSCRIPT_PARAMS:${PN}-server ?= "start 45 5 . stop 45 0 6 1 ." |
44 | 44 | ||
45 | USERADD_PACKAGES = "${PN}-setupdb" | ||
46 | USERADD_PARAM:${PN}-setupdb = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql" | ||
47 | GROUPADD_PARAM:${PN}-setupdb = "--system mysql" | ||
48 | |||
49 | INITSCRIPT_NAME:${PN}-setupdb = "install_db" | 45 | INITSCRIPT_NAME:${PN}-setupdb = "install_db" |
50 | INITSCRIPT_PARAMS:${PN}-setupdb ?= "defaults 44 44" | 46 | INITSCRIPT_PARAMS:${PN}-setupdb ?= "defaults 44 44" |
51 | 47 | ||
diff --git a/meta-oe/recipes-dbs/mysql/mariadb_10.11.6.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.11.6.bb index a4498fa44e..b1d1355e2b 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb_10.11.6.bb +++ b/meta-oe/recipes-dbs/mysql/mariadb_10.11.6.bb | |||
@@ -1,6 +1,8 @@ | |||
1 | require mariadb.inc | 1 | require mariadb.inc |
2 | 2 | ||
3 | inherit ptest | 3 | inherit ptest |
4 | inherit useradd | ||
5 | |||
4 | SRC_URI += "${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)}" | 6 | SRC_URI += "${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)}" |
5 | DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)}" | 7 | DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)}" |
6 | RDEPENDS:${PN}-ptest += "cmake sed perl-module-test-more" | 8 | RDEPENDS:${PN}-ptest += "cmake sed perl-module-test-more" |
@@ -36,6 +38,10 @@ DEPENDS += "mariadb-native bison-native boost libpcre2 curl ncurses \ | |||
36 | 38 | ||
37 | PROVIDES += "mysql5 libmysqlclient" | 39 | PROVIDES += "mysql5 libmysqlclient" |
38 | 40 | ||
41 | USERADD_PACKAGES = "${PN}-setupdb" | ||
42 | USERADD_PARAM:${PN}-setupdb = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql" | ||
43 | GROUPADD_PARAM:${PN}-setupdb = "--system mysql" | ||
44 | |||
39 | RPROVIDES:${PN} += "mysql5" | 45 | RPROVIDES:${PN} += "mysql5" |
40 | RREPLACES:${PN} += "mysql5" | 46 | RREPLACES:${PN} += "mysql5" |
41 | RCONFLICTS:${PN} += "mysql5" | 47 | RCONFLICTS:${PN} += "mysql5" |