All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/2] gpsd: Let scons install the udev and systemd files
@ 2021-08-24 20:26 Peter Kjellerstedt
  2021-08-24 20:26 ` [meta-oe][PATCH 2/2] gpsd: Move /usr/share/gpsd/doc to the gpsd-doc package Peter Kjellerstedt
  2021-08-28  7:44 ` [oe] [meta-oe][PATCH 1/2] gpsd: Let scons install the udev and systemd files Martin Jansa
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Kjellerstedt @ 2021-08-24 20:26 UTC (permalink / raw)
  To: openembedded-devel

With the update to 3.23 (commit 87f3070f), the recipe was changed to
incorrectly install the gpsd.rules.in file instead of gpsd.rules. It
also missed that a new template string (@RUNDIR@) was introduced in the
systemd files, making them unusable.

Instead of trying to keep up with upstream changes, let scons do the job
and install the udev and systemd files by using the "udev-install"
production instead of "install".

In addition to the correct files being installed,
"/etc/udev/rules.d/gpsd.rules" is now "/lib/udev/rules.d/25-gpsd.rules".

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb | 45 ++++++++------------
 1 file changed, 18 insertions(+), 27 deletions(-)

diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb
index 1d031ee95..350eaaf12 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb
@@ -35,11 +35,13 @@ EXTRA_OESCONS = " \
     nostrip='true' \
     systemd='${SYSTEMD_OESCONS}' \
     libdir='${libdir}' \
+    udevdir='${nonarch_base_libdir}/udev' \
+    unitdir='${systemd_system_unitdir}' \
     manbuild='false' \
     LINK='${CC}' \
     ${PACKAGECONFIG_CONFARGS} \
 "
-# this cannot be used, because then chrpath is not found and only static lib is built
+# This cannot be used, because then chrpath is not found and only static lib is built
 # target=${HOST_SYS}
 
 do_compile:prepend() {
@@ -58,34 +60,24 @@ do_install() {
     export LINKFLAGS="${LDFLAGS}"
 
     export DESTDIR="${D}"
-    # prefix is used for RPATH and DESTDIR/prefix for instalation
-    ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} install ${EXTRA_OESCONS} || \
+    # prefix is used for RPATH and DESTDIR/prefix for installation
+    ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} udev-install ${EXTRA_OESCONS} || \
       bbfatal "scons install execution failed."
 }
 
 do_install:append() {
-    install -d ${D}/${sysconfdir}/init.d
-    install -m 0755 ${WORKDIR}/gpsd.init ${D}/${sysconfdir}/init.d/gpsd
-    install -d ${D}/${sysconfdir}/default
-    install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}/${sysconfdir}/default/gpsd.default
-
-    #support for udev
-    install -d ${D}/${sysconfdir}/udev/rules.d
-    install -m 0644 ${S}/gpsd.rules.in ${D}/${sysconfdir}/udev/rules.d/
-    install -d ${D}${base_libdir}/udev/
-    install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/
-
-    #support for python
-    install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
-    install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
-
-    #support for systemd
-    install -d ${D}${systemd_unitdir}/system/
-    install -m 0644 ${S}/systemd/${BPN}.service.in ${D}${systemd_unitdir}/system/${BPN}.service
-    sed -i -e 's,@SBINDIR@,/usr/sbin,g' ${D}${systemd_unitdir}/system/${BPN}.service
-    install -m 0644 ${S}/systemd/${BPN}ctl@.service.in ${D}${systemd_unitdir}/system/${BPN}ctl@.service
-    sed -i -e 's,@SBINDIR@,/usr/sbin,g' ${D}${systemd_unitdir}/system/${BPN}ctl@.service
-    install -m 0644 ${S}/systemd/${BPN}.socket.in ${D}${systemd_unitdir}/system/${BPN}.socket
+    install -d ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/gpsd.init ${D}${sysconfdir}/init.d/gpsd
+    install -d ${D}${sysconfdir}/default
+    install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}${sysconfdir}/default/gpsd.default
+
+    # Support for udev
+    install -d ${D}${nonarch_base_libdir}/udev
+    install -m 0755 ${S}/gpsd.hotplug ${D}${nonarch_base_libdir}/udev
+
+    # Support for python
+    install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps
+    install -m 755 ${S}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps
 }
 
 PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
@@ -99,7 +91,7 @@ RDEPENDS:${PN} = "gpsd-gpsctl"
 RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"
 
 SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging"
-FILES:gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*"
+FILES:gpsd-udev = "${nonarch_base_libdir}/udev"
 RDEPENDS:gpsd-udev += "udev gpsd-conf"
 
 SUMMARY:libgpsd = "C service library used for communicating with gpsd"
@@ -135,7 +127,6 @@ RREPLACES:${PN} += "${PN}-systemd"
 RCONFLICTS:${PN} += "${PN}-systemd"
 SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service"
 
-
 ALTERNATIVE:${PN} = "gpsd-defaults"
 ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
 ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default"

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [meta-oe][PATCH 2/2] gpsd: Move /usr/share/gpsd/doc to the gpsd-doc package
  2021-08-24 20:26 [meta-oe][PATCH 1/2] gpsd: Let scons install the udev and systemd files Peter Kjellerstedt
@ 2021-08-24 20:26 ` Peter Kjellerstedt
  2021-08-28  7:44 ` [oe] [meta-oe][PATCH 1/2] gpsd: Let scons install the udev and systemd files Martin Jansa
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Kjellerstedt @ 2021-08-24 20:26 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb
index 350eaaf12..bf5e0efed 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb
@@ -87,6 +87,8 @@ RPROVIDES:${PN}-dbg += "python-pygps-dbg"
 FILES:${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \
                     ${libdir}/libQgpsmm.prl"
 
+FILES:${PN}-doc += "${datadir}/${BPN}/doc"
+
 RDEPENDS:${PN} = "gpsd-gpsctl"
 RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [oe] [meta-oe][PATCH 1/2] gpsd: Let scons install the udev and systemd files
  2021-08-24 20:26 [meta-oe][PATCH 1/2] gpsd: Let scons install the udev and systemd files Peter Kjellerstedt
  2021-08-24 20:26 ` [meta-oe][PATCH 2/2] gpsd: Move /usr/share/gpsd/doc to the gpsd-doc package Peter Kjellerstedt
@ 2021-08-28  7:44 ` Martin Jansa
  2021-08-28 13:17   ` Peter Kjellerstedt
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Jansa @ 2021-08-28  7:44 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 6460 bytes --]

This breaks the build without systemd enabled.

mkdir -p
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/image/usr/lib/udev/rules.d
cp
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/gpsd-3.23/gpsd-3.23/gpsd.rules
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/image/usr/lib/udev/rules.d/25-gpsd.rules
cp
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/gpsd-3.23/gpsd-3.23/gpsd.hotplug
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/image/usr/lib/udev
cp: cannot stat
'/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/gpsd-3.23/gpsd-3.23/gpsd.hotplug':
No such file or directory
scons: *** [gpsd-3.23/udev-install] Error 1

scons fails to install gpsd.hotplug with:

if env['systemd']:
...
    hotplug_wrapper_install = []
else:
    hotplug_wrapper_install = [
        'cp $SRCDIR/gpsd.hotplug ' + DESTDIR + env['udevdir'],
        'chmod a+x ' + DESTDIR + env['udevdir'] + '/gpsd.hotplug'
    ]

because SRCDIR is set to cwd as
gpsd/3.23-r0/gpsd-3.23/gpsd-3.23/
but the gpsd.hotplug is only in source directory one level above as:
gpsd/3.23-r0/gpsd-3.23/gpsd.hotplug

It's also not clear why do_install:append installs gpsd.hotplug _again_ for
sysvinit after scons did (once it's fixed) or if it's needed for systemd as
Sconscript explicitly doesn't install hotplug when systemd is enabled.

On Tue, Aug 24, 2021 at 10:26 PM Peter Kjellerstedt <
peter.kjellerstedt@axis.com> wrote:

> With the update to 3.23 (commit 87f3070f), the recipe was changed to
> incorrectly install the gpsd.rules.in file instead of gpsd.rules. It
> also missed that a new template string (@RUNDIR@) was introduced in the
> systemd files, making them unusable.
>
> Instead of trying to keep up with upstream changes, let scons do the job
> and install the udev and systemd files by using the "udev-install"
> production instead of "install".
>
> In addition to the correct files being installed,
> "/etc/udev/rules.d/gpsd.rules" is now "/lib/udev/rules.d/25-gpsd.rules".
>
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
>  meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb | 45 ++++++++------------
>  1 file changed, 18 insertions(+), 27 deletions(-)
>
> diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb
> b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb
> index 1d031ee95..350eaaf12 100644
> --- a/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb
> +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb
> @@ -35,11 +35,13 @@ EXTRA_OESCONS = " \
>      nostrip='true' \
>      systemd='${SYSTEMD_OESCONS}' \
>      libdir='${libdir}' \
> +    udevdir='${nonarch_base_libdir}/udev' \
> +    unitdir='${systemd_system_unitdir}' \
>      manbuild='false' \
>      LINK='${CC}' \
>      ${PACKAGECONFIG_CONFARGS} \
>  "
> -# this cannot be used, because then chrpath is not found and only static
> lib is built
> +# This cannot be used, because then chrpath is not found and only static
> lib is built
>  # target=${HOST_SYS}
>
>  do_compile:prepend() {
> @@ -58,34 +60,24 @@ do_install() {
>      export LINKFLAGS="${LDFLAGS}"
>
>      export DESTDIR="${D}"
> -    # prefix is used for RPATH and DESTDIR/prefix for instalation
> -    ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix}
> python_libdir=${libdir} install ${EXTRA_OESCONS} || \
> +    # prefix is used for RPATH and DESTDIR/prefix for installation
> +    ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix}
> python_libdir=${libdir} udev-install ${EXTRA_OESCONS} || \
>        bbfatal "scons install execution failed."
>  }
>
>  do_install:append() {
> -    install -d ${D}/${sysconfdir}/init.d
> -    install -m 0755 ${WORKDIR}/gpsd.init ${D}/${sysconfdir}/init.d/gpsd
> -    install -d ${D}/${sysconfdir}/default
> -    install -m 0644 ${S}/packaging/deb/etc_default_gpsd
> ${D}/${sysconfdir}/default/gpsd.default
> -
> -    #support for udev
> -    install -d ${D}/${sysconfdir}/udev/rules.d
> -    install -m 0644 ${S}/gpsd.rules.in ${D}/${sysconfdir}/udev/rules.d/
> -    install -d ${D}${base_libdir}/udev/
> -    install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/
> -
> -    #support for python
> -    install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
> -    install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
> -
> -    #support for systemd
> -    install -d ${D}${systemd_unitdir}/system/
> -    install -m 0644 ${S}/systemd/${BPN}.service.in
> ${D}${systemd_unitdir}/system/${BPN}.service
> -    sed -i -e 's,@SBINDIR@,/usr/sbin,g'
> ${D}${systemd_unitdir}/system/${BPN}.service
> -    install -m 0644 ${S}/systemd/${BPN}ctl@.service.in
> ${D}${systemd_unitdir}/system/${BPN}ctl@.service
> -    sed -i -e 's,@SBINDIR@,/usr/sbin,g'
> ${D}${systemd_unitdir}/system/${BPN}ctl@.service
> -    install -m 0644 ${S}/systemd/${BPN}.socket.in
> ${D}${systemd_unitdir}/system/${BPN}.socket
> +    install -d ${D}${sysconfdir}/init.d
> +    install -m 0755 ${WORKDIR}/gpsd.init ${D}${sysconfdir}/init.d/gpsd
> +    install -d ${D}${sysconfdir}/default
> +    install -m 0644 ${S}/packaging/deb/etc_default_gpsd
> ${D}${sysconfdir}/default/gpsd.default
> +
> +    # Support for udev
> +    install -d ${D}${nonarch_base_libdir}/udev
> +    install -m 0755 ${S}/gpsd.hotplug ${D}${nonarch_base_libdir}/udev
> +
> +    # Support for python
> +    install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps
> +    install -m 755 ${S}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps
>  }
>
>  PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl
> gps-utils"
> @@ -99,7 +91,7 @@ RDEPENDS:${PN} = "gpsd-gpsctl"
>  RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"
>
>  SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging"
> -FILES:gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*"
> +FILES:gpsd-udev = "${nonarch_base_libdir}/udev"
>  RDEPENDS:gpsd-udev += "udev gpsd-conf"
>
>  SUMMARY:libgpsd = "C service library used for communicating with gpsd"
> @@ -135,7 +127,6 @@ RREPLACES:${PN} += "${PN}-systemd"
>  RCONFLICTS:${PN} += "${PN}-systemd"
>  SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service"
>
> -
>  ALTERNATIVE:${PN} = "gpsd-defaults"
>  ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
>  ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default"
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 8318 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [oe] [meta-oe][PATCH 1/2] gpsd: Let scons install the udev and systemd files
  2021-08-28  7:44 ` [oe] [meta-oe][PATCH 1/2] gpsd: Let scons install the udev and systemd files Martin Jansa
@ 2021-08-28 13:17   ` Peter Kjellerstedt
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Kjellerstedt @ 2021-08-28 13:17 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 7429 bytes --]

Interesting. The installation of the gpsd.hotplug file seems to have been broken in the SConscript file like forever without anyone noticing, so I guess it is not actually being used very much… Anyway, I have sent a patch upstream to correct the installation, and I will send patches for it and also a patch to drop the unconditional installation of gpsd.hotplug from the recipe as it should only be needed if systemd is not used, in which case scons will install it.

//Peter

From: Martin Jansa <martin.jansa@gmail.com>
Sent: den 28 augusti 2021 09:45
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: openembedded-devel <openembedded-devel@lists.openembedded.org>
Subject: Re: [oe] [meta-oe][PATCH 1/2] gpsd: Let scons install the udev and systemd files

This breaks the build without systemd enabled.

mkdir -p /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/image/usr/lib/udev/rules.d
cp /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/gpsd-3.23/gpsd-3.23/gpsd.rules /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/image/usr/lib/udev/rules.d/25-gpsd.rules
cp /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/gpsd-3.23/gpsd-3.23/gpsd.hotplug /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/image/usr/lib/udev
cp: cannot stat '/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/gpsd/3.23-r0/gpsd-3.23/gpsd-3.23/gpsd.hotplug': No such file or directory
scons: *** [gpsd-3.23/udev-install] Error 1

scons fails to install gpsd.hotplug with:

if env['systemd']:
...
    hotplug_wrapper_install = []
else:
    hotplug_wrapper_install = [
        'cp $SRCDIR/gpsd.hotplug ' + DESTDIR + env['udevdir'],
        'chmod a+x ' + DESTDIR + env['udevdir'] + '/gpsd.hotplug'
    ]

because SRCDIR is set to cwd as
gpsd/3.23-r0/gpsd-3.23/gpsd-3.23/
but the gpsd.hotplug is only in source directory one level above as:
gpsd/3.23-r0/gpsd-3.23/gpsd.hotplug

It's also not clear why do_install:append installs gpsd.hotplug _again_ for sysvinit after scons did (once it's fixed) or if it's needed for systemd as Sconscript explicitly doesn't install hotplug when systemd is enabled.

On Tue, Aug 24, 2021 at 10:26 PM Peter Kjellerstedt <peter.kjellerstedt@axis.com<mailto:peter.kjellerstedt@axis.com>> wrote:
With the update to 3.23 (commit 87f3070f), the recipe was changed to
incorrectly install the gpsd.rules.in<http://gpsd.rules.in> file instead of gpsd.rules. It
also missed that a new template string (@RUNDIR@) was introduced in the
systemd files, making them unusable.

Instead of trying to keep up with upstream changes, let scons do the job
and install the udev and systemd files by using the "udev-install"
production instead of "install".

In addition to the correct files being installed,
"/etc/udev/rules.d/gpsd.rules" is now "/lib/udev/rules.d/25-gpsd.rules".

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com<mailto:peter.kjellerstedt@axis.com>>
---
 meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb<http://gpsd_3.23.bb> | 45 ++++++++------------
 1 file changed, 18 insertions(+), 27 deletions(-)

diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb<http://gpsd_3.23.bb> b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb<http://gpsd_3.23.bb>
index 1d031ee95..350eaaf12 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb<http://gpsd_3.23.bb>
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb<http://gpsd_3.23.bb>
@@ -35,11 +35,13 @@ EXTRA_OESCONS = " \
     nostrip='true' \
     systemd='${SYSTEMD_OESCONS}' \
     libdir='${libdir}' \
+    udevdir='${nonarch_base_libdir}/udev' \
+    unitdir='${systemd_system_unitdir}' \
     manbuild='false' \
     LINK='${CC}' \
     ${PACKAGECONFIG_CONFARGS} \
 "
-# this cannot be used, because then chrpath is not found and only static lib is built
+# This cannot be used, because then chrpath is not found and only static lib is built
 # target=${HOST_SYS}

 do_compile:prepend() {
@@ -58,34 +60,24 @@ do_install() {
     export LINKFLAGS="${LDFLAGS}"

     export DESTDIR="${D}"
-    # prefix is used for RPATH and DESTDIR/prefix for instalation
-    ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} install ${EXTRA_OESCONS} || \
+    # prefix is used for RPATH and DESTDIR/prefix for installation
+    ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} udev-install ${EXTRA_OESCONS} || \
       bbfatal "scons install execution failed."
 }

 do_install:append() {
-    install -d ${D}/${sysconfdir}/init.d
-    install -m 0755 ${WORKDIR}/gpsd.init ${D}/${sysconfdir}/init.d/gpsd
-    install -d ${D}/${sysconfdir}/default
-    install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}/${sysconfdir}/default/gpsd.default
-
-    #support for udev
-    install -d ${D}/${sysconfdir}/udev/rules.d
-    install -m 0644 ${S}/gpsd.rules.in<http://gpsd.rules.in> ${D}/${sysconfdir}/udev/rules.d/
-    install -d ${D}${base_libdir}/udev/
-    install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/
-
-    #support for python
-    install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
-    install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
-
-    #support for systemd
-    install -d ${D}${systemd_unitdir}/system/
-    install -m 0644 ${S}/systemd/${BPN}.service.in<http://service.in> ${D}${systemd_unitdir}/system/${BPN}.service
-    sed -i -e 's,@SBINDIR@,/usr/sbin,g' ${D}${systemd_unitdir}/system/${BPN}.service
-    install -m 0644 ${S}/systemd/${BPN}ctl@.service.in<http://service.in> ${D}${systemd_unitdir}/system/${BPN}ctl@.service<mailto:$%7bD%7d$%7bsystemd_unitdir%7d/system/$%7bBPN%7dctl@.service>
-    sed -i -e 's,@SBINDIR@,/usr/sbin,g' ${D}${systemd_unitdir}/system/${BPN}ctl@.service<mailto:$%7bD%7d$%7bsystemd_unitdir%7d/system/$%7bBPN%7dctl@.service>
-    install -m 0644 ${S}/systemd/${BPN}.socket.in<http://socket.in> ${D}${systemd_unitdir}/system/${BPN}.socket
+    install -d ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/gpsd.init ${D}${sysconfdir}/init.d/gpsd
+    install -d ${D}${sysconfdir}/default
+    install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}${sysconfdir}/default/gpsd.default
+
+    # Support for udev
+    install -d ${D}${nonarch_base_libdir}/udev
+    install -m 0755 ${S}/gpsd.hotplug ${D}${nonarch_base_libdir}/udev
+
+    # Support for python
+    install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps
+    install -m 755 ${S}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps
 }

 PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
@@ -99,7 +91,7 @@ RDEPENDS:${PN} = "gpsd-gpsctl"
 RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"

 SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging"
-FILES:gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*"
+FILES:gpsd-udev = "${nonarch_base_libdir}/udev"
 RDEPENDS:gpsd-udev += "udev gpsd-conf"

 SUMMARY:libgpsd = "C service library used for communicating with gpsd"
@@ -135,7 +127,6 @@ RREPLACES:${PN} += "${PN}-systemd"
 RCONFLICTS:${PN} += "${PN}-systemd"
 SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service<mailto:$%7bBPN%7dctl@.service>"

-
 ALTERNATIVE:${PN} = "gpsd-defaults"
 ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
 ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default"



[-- Attachment #2: Type: text/html, Size: 12807 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-28 13:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 20:26 [meta-oe][PATCH 1/2] gpsd: Let scons install the udev and systemd files Peter Kjellerstedt
2021-08-24 20:26 ` [meta-oe][PATCH 2/2] gpsd: Move /usr/share/gpsd/doc to the gpsd-doc package Peter Kjellerstedt
2021-08-28  7:44 ` [oe] [meta-oe][PATCH 1/2] gpsd: Let scons install the udev and systemd files Martin Jansa
2021-08-28 13:17   ` Peter Kjellerstedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.