diff mbox series

[meta-oe] blueman: fix installation paths

Message ID 20240819115442.3212142-1-martin.jansa@gmail.com
State Accepted
Headers show
Series [meta-oe] blueman: fix installation paths | expand

Commit Message

Martin Jansa Aug. 19, 2024, 11:54 a.m. UTC
* pass systemdsystemunitdir and systemduserunitdir to set correct directories
  instead of using libdir from:
  meson.build:systemd_base_path = join_paths(libdir, 'systemd')
  which is wrong e.g. with multilib where libdir might be /usr/lib64 instead of
  usr/lib used in ${nonarch_base_libdir} which is used by systemd_* variables:

  export systemd_system_unitdir="/usr/lib/systemd/system"
  export systemd_user_unitdir="/usr/lib/systemd/user"

  fixes:
  ERROR: Didn't find service unit 'blueman-mechanism.service', specified in SYSTEMD_SERVICE:blueman.

* inherit python3targetconfig to install into right python site-packages
  without this it installs into
  /usr/lib/python3.12/site-packages/
  instead of /usr/lib64/python3.12/site-packages set in PYTHON_SITEPACKAGES_DIR
  variable used in FILES, causing
  blueman: 295 installed and not shipped files. [installed-vs-shipped]

  # $PYTHON_SITEPACKAGES_DIR
  #   set oe-core/meta/classes-recipe/python3-dir.bbclass:11
  #     "${libdir}/${PYTHON_DIR}/site-packages"
  PYTHON_SITEPACKAGES_DIR="/usr/lib64/python3.12/site-packages"

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
 .../recipes-connectivity/blueman/blueman_2.4.3.bb        | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Khem Raj Aug. 19, 2024, 5:52 p.m. UTC | #1
On Mon, Aug 19, 2024 at 4:54 AM Martin Jansa via
lists.openembedded.org <martin.jansa=gmail.com@lists.openembedded.org>
wrote:
>
> * pass systemdsystemunitdir and systemduserunitdir to set correct directories
>   instead of using libdir from:
>   meson.build:systemd_base_path = join_paths(libdir, 'systemd')
>   which is wrong e.g. with multilib where libdir might be /usr/lib64 instead of
>   usr/lib used in ${nonarch_base_libdir} which is used by systemd_* variables:
>
>   export systemd_system_unitdir="/usr/lib/systemd/system"
>   export systemd_user_unitdir="/usr/lib/systemd/user"
>
>   fixes:
>   ERROR: Didn't find service unit 'blueman-mechanism.service', specified in SYSTEMD_SERVICE:blueman.
>
> * inherit python3targetconfig to install into right python site-packages
>   without this it installs into
>   /usr/lib/python3.12/site-packages/
>   instead of /usr/lib64/python3.12/site-packages set in PYTHON_SITEPACKAGES_DIR
>   variable used in FILES, causing
>   blueman: 295 installed and not shipped files. [installed-vs-shipped]
>
>   # $PYTHON_SITEPACKAGES_DIR
>   #   set oe-core/meta/classes-recipe/python3-dir.bbclass:11
>   #     "${libdir}/${PYTHON_DIR}/site-packages"
>   PYTHON_SITEPACKAGES_DIR="/usr/lib64/python3.12/site-packages"
>

This is a more comprehensive fix thanks for doing it.

> Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> ---
>  .../recipes-connectivity/blueman/blueman_2.4.3.bb        | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb b/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb
> index c2bb4d24c6..42e20cc9ed 100644
> --- a/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb
> +++ b/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb
> @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
>
>  DEPENDS = "gtk+3 glib-2.0 bluez5 python3-pygobject python3-cython-native"
>
> -inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache useradd features_check
> +inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache useradd features_check python3targetconfig
>
>  REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
>
> @@ -13,7 +13,10 @@ SRC_URI = "git://github.com/blueman-project/blueman.git;protocol=https;branch=2-
>  S = "${WORKDIR}/git"
>  SRCREV = "7bcf919ad6ac0ee9a8c66b18b0ca98af877d4c8f"
>
> -EXTRA_OEMESON = "-Druntime_deps_check=false"
> +EXTRA_OEMESON = "-Druntime_deps_check=false \
> +    -Dsystemdsystemunitdir=${systemd_system_unitdir} \
> +    -Dsystemduserunitdir=${systemd_user_unitdir} \
> +"
>
>  SYSTEMD_SERVICE:${PN} = "${BPN}-mechanism.service"
>  SYSTEMD_AUTO_ENABLE:${PN} = "disable"
> @@ -40,8 +43,8 @@ PACKAGECONFIG[polkit] = "-Dpolicykit=true,-Dpolicykit=false"
>  FILES:${PN} += " \
>      ${datadir} \
>      ${systemd_user_unitdir} \
> +    ${systemd_system_unitdir} \
>      ${PYTHON_SITEPACKAGES_DIR} \
> -    ${prefix}${systemd_system_unitdir} \
>  "
>
>  # In code, path to python is a variable that is replaced with path to native version of it
> --
> 2.46.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#111849): https://lists.openembedded.org/g/openembedded-devel/message/111849
> Mute This Topic: https://lists.openembedded.org/mt/107978850/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb b/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb
index c2bb4d24c6..42e20cc9ed 100644
--- a/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb
+++ b/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb
@@ -4,7 +4,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
 DEPENDS = "gtk+3 glib-2.0 bluez5 python3-pygobject python3-cython-native"
 
-inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache useradd features_check
+inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache useradd features_check python3targetconfig
 
 REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
 
@@ -13,7 +13,10 @@  SRC_URI = "git://github.com/blueman-project/blueman.git;protocol=https;branch=2-
 S = "${WORKDIR}/git"
 SRCREV = "7bcf919ad6ac0ee9a8c66b18b0ca98af877d4c8f"
 
-EXTRA_OEMESON = "-Druntime_deps_check=false"
+EXTRA_OEMESON = "-Druntime_deps_check=false \
+    -Dsystemdsystemunitdir=${systemd_system_unitdir} \
+    -Dsystemduserunitdir=${systemd_user_unitdir} \
+"
 
 SYSTEMD_SERVICE:${PN} = "${BPN}-mechanism.service"
 SYSTEMD_AUTO_ENABLE:${PN} = "disable"
@@ -40,8 +43,8 @@  PACKAGECONFIG[polkit] = "-Dpolicykit=true,-Dpolicykit=false"
 FILES:${PN} += " \
     ${datadir} \
     ${systemd_user_unitdir} \
+    ${systemd_system_unitdir} \
     ${PYTHON_SITEPACKAGES_DIR} \
-    ${prefix}${systemd_system_unitdir} \
 "
 
 # In code, path to python is a variable that is replaced with path to native version of it