All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] Fix gpsd Yocto pyro build for read only rootfs
@ 2017-10-08 19:05 Dan Walkes
  2017-10-16 21:50 ` akuster808
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Walkes @ 2017-10-08 19:05 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Dan Walkes

Attempting to include gpsd on Yocto pyro with IMAGE_FEATURES including
read-only-rootfs results in an error:
"The following packages could not be configured offline and rootfs is
read-only"

This stems from a failure during the do_rootfs steps where the /etc/init.d/gpsd
file is missing during the call to update-rc.d.

This happens because the /etc/init.d/gpsd file is installed during
package install for gpsd-conf instead of gpsd, and the default value for
INITSCRIPT_PACKAGES is PN.  To resolve, specify INITSCRIPT_PACKAGES as
gpsd-conf instead.

Also, as suggested on the Yocto mailing list, refactor to inherit
update-alternatives and use this to replace the postinst and postrm
steps.

Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
---
 meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb
index 27a600f..f8e6a2b 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb
@@ -19,8 +19,9 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
 SRC_URI[md5sum] = "68691b5de4c94f82ec4062b042b5eb63"
 SRC_URI[sha256sum] = "03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029"
 
-inherit scons update-rc.d python-dir pythonnative systemd bluetooth
+inherit scons update-rc.d python-dir pythonnative systemd bluetooth update-alternatives
 
+INITSCRIPT_PACKAGES = "gpsd-conf"
 INITSCRIPT_NAME = "gpsd"
 INITSCRIPT_PARAMS = "defaults 35"
 
@@ -86,14 +87,6 @@ do_install_append() {
     install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket
 }
 
-pkg_postinst_${PN}-conf() {
-    update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10
-}
-
-pkg_postrm_${PN}-conf() {
-    update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default
-}
-
 PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
 
 FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \
@@ -133,3 +126,9 @@ RPROVIDES_${PN} += "${PN}-systemd"
 RREPLACES_${PN} += "${PN}-systemd"
 RCONFLICTS_${PN} += "${PN}-systemd"
 SYSTEMD_SERVICE_${PN} = "${PN}.socket"
+
+
+ALTERNATIVE_${PN} = "gpsd-defaults"
+ALTERNATIVE_PATH = "${sysconfdir}/default/gpsd.default"
+ALTERNATIVE_LINK = "${sysconfdir}/default/gpsd"
+ALTERNATIVE_TARGET = "${sysconfdir}/default/gpsd.default"
-- 
2.7.4



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

* Re: [meta-oe][PATCH] Fix gpsd Yocto pyro build for read only rootfs
  2017-10-08 19:05 [meta-oe][PATCH] Fix gpsd Yocto pyro build for read only rootfs Dan Walkes
@ 2017-10-16 21:50 ` akuster808
  2017-10-17 23:02   ` Dan Walkes
  0 siblings, 1 reply; 3+ messages in thread
From: akuster808 @ 2017-10-16 21:50 UTC (permalink / raw)
  To: Dan Walkes, openembedded-devel

Dan,


On 10/08/2017 12:05 PM, Dan Walkes wrote:
> Attempting to include gpsd on Yocto pyro with IMAGE_FEATURES including
> read-only-rootfs results in an error:

The subject has "pyro" in it. Is this meat for the stable branch "Pyro"
too. It is in Rocko now.

BTW, 3.16 is not in Pyro. looking for clarification.

- armin
> "The following packages could not be configured offline and rootfs is
> read-only"
>
> This stems from a failure during the do_rootfs steps where the /etc/init.d/gpsd
> file is missing during the call to update-rc.d.
>
> This happens because the /etc/init.d/gpsd file is installed during
> package install for gpsd-conf instead of gpsd, and the default value for
> INITSCRIPT_PACKAGES is PN.  To resolve, specify INITSCRIPT_PACKAGES as
> gpsd-conf instead.
>
> Also, as suggested on the Yocto mailing list, refactor to inherit
> update-alternatives and use this to replace the postinst and postrm
> steps.
>
> Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
> ---
>  meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb
> index 27a600f..f8e6a2b 100644
> --- a/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb
> +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb
> @@ -19,8 +19,9 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
>  SRC_URI[md5sum] = "68691b5de4c94f82ec4062b042b5eb63"
>  SRC_URI[sha256sum] = "03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029"
>  
> -inherit scons update-rc.d python-dir pythonnative systemd bluetooth
> +inherit scons update-rc.d python-dir pythonnative systemd bluetooth update-alternatives
>  
> +INITSCRIPT_PACKAGES = "gpsd-conf"
>  INITSCRIPT_NAME = "gpsd"
>  INITSCRIPT_PARAMS = "defaults 35"
>  
> @@ -86,14 +87,6 @@ do_install_append() {
>      install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket
>  }
>  
> -pkg_postinst_${PN}-conf() {
> -    update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10
> -}
> -
> -pkg_postrm_${PN}-conf() {
> -    update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default
> -}
> -
>  PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
>  
>  FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \
> @@ -133,3 +126,9 @@ RPROVIDES_${PN} += "${PN}-systemd"
>  RREPLACES_${PN} += "${PN}-systemd"
>  RCONFLICTS_${PN} += "${PN}-systemd"
>  SYSTEMD_SERVICE_${PN} = "${PN}.socket"
> +
> +
> +ALTERNATIVE_${PN} = "gpsd-defaults"
> +ALTERNATIVE_PATH = "${sysconfdir}/default/gpsd.default"
> +ALTERNATIVE_LINK = "${sysconfdir}/default/gpsd"
> +ALTERNATIVE_TARGET = "${sysconfdir}/default/gpsd.default"



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

* Re: [meta-oe][PATCH] Fix gpsd Yocto pyro build for read only rootfs
  2017-10-16 21:50 ` akuster808
@ 2017-10-17 23:02   ` Dan Walkes
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Walkes @ 2017-10-17 23:02 UTC (permalink / raw)
  To: akuster808; +Cc: openembedded-devel

On Mon, Oct 16, 2017 at 3:50 PM, akuster808 <akuster808@gmail.com> wrote:
> Dan,
>
>
> On 10/08/2017 12:05 PM, Dan Walkes wrote:
>> Attempting to include gpsd on Yocto pyro with IMAGE_FEATURES including
>> read-only-rootfs results in an error:
>
> The subject has "pyro" in it. Is this meat for the stable branch "Pyro"
> too. It is in Rocko now.
>
> BTW, 3.16 is not in Pyro. looking for clarification.
>
Hi Armin,
I noticed this problem originally on pyro and noticed the same issues
with the .bb file on the master branch.  I haven't actually tried to
build on Rocko and I'm not currently setup to build the current
project on rocko, only on pyro, apologies if I submitted this for the
wrong branch.  Please let me know what I should do to fix.

Thanks
Dan


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

end of thread, other threads:[~2017-10-17 23:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-08 19:05 [meta-oe][PATCH] Fix gpsd Yocto pyro build for read only rootfs Dan Walkes
2017-10-16 21:50 ` akuster808
2017-10-17 23:02   ` Dan Walkes

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.