All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/3] gpsd: correct explicit nmea 0183 support flag
@ 2015-11-05 18:41 James Knight
  2015-11-05 18:41 ` [Buildroot] [PATCH v2 2/3] gpsd: cleanup udev rule permissions James Knight
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: James Knight @ 2015-11-05 18:41 UTC (permalink / raw)
  To: buildroot

The following handles the GPSd SCons change for the explicit
configuration of the NMEA 0183 protocol. The protocol configuration
change was introduced in 3.12. Developer's who transitioned to
Buildroot's GPSd 3.15 had NMEA 0183 implicitly enabled by default. This
change allows NMEA 0183 to be explicitly disabled again.

See:
 http://git.savannah.gnu.org/cgit/gpsd.git/commit/SConstruct?id=8f20d7b2d1ece8f3205ca038726c77daa5234c0c

Signed-off-by: James Knight <james.knight@rockwellcollins.com>
---
Changes v1 -> v2:
  - None.
---
 package/gpsd/gpsd.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk
index 2199e31..577b43c 100644
--- a/package/gpsd/gpsd.mk
+++ b/package/gpsd/gpsd.mk
@@ -102,7 +102,7 @@ ifneq ($(BR2_PACKAGE_GPSD_MTK3301),y)
 GPSD_SCONS_OPTS += mtk3301=no
 endif
 ifneq ($(BR2_PACKAGE_GPSD_NMEA),y)
-GPSD_SCONS_OPTS += nmea=no
+GPSD_SCONS_OPTS += nmea0183=no
 endif
 ifneq ($(BR2_PACKAGE_GPSD_NTRIP),y)
 GPSD_SCONS_OPTS += ntrip=no
-- 
1.9.5.msysgit.1

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

* [Buildroot] [PATCH v2 2/3] gpsd: cleanup udev rule permissions
  2015-11-05 18:41 [Buildroot] [PATCH v2 1/3] gpsd: correct explicit nmea 0183 support flag James Knight
@ 2015-11-05 18:41 ` James Knight
  2015-11-05 21:37   ` Thomas Petazzoni
  2015-11-05 18:41 ` [Buildroot] [PATCH v2 3/3] gpsd: disable attempt to reload systemd James Knight
  2015-11-05 21:00 ` [Buildroot] [PATCH v2 1/3] gpsd: correct explicit nmea 0183 support flag Thomas Petazzoni
  2 siblings, 1 reply; 7+ messages in thread
From: James Knight @ 2015-11-05 18:41 UTC (permalink / raw)
  To: buildroot

Adjust a generated udev rule file (25-gpsd.rules) to have user write
permissions. This is to prevent rebuild issues when the gpsd package
fails to re-install on a target (since the `cp` of the rule file will
fail due to permissions).

Signed-off-by: James Knight <james.knight@rockwellcollins.com>
---
Changes v1 -> v2:
  - Package change introduced in change set 2.
---
 package/gpsd/gpsd.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk
index 577b43c..5a369b0 100644
--- a/package/gpsd/gpsd.mk
+++ b/package/gpsd/gpsd.mk
@@ -217,6 +217,8 @@ define GPSD_INSTALL_STAGING_CMDS
 		install)
 endef
 
+# When adding udev rules, ensure rules are writable to prevent rebuild
+# issues.
 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 define GPSD_INSTALL_UDEV_RULES
 	(cd $(@D); \
@@ -225,6 +227,8 @@ define GPSD_INSTALL_UDEV_RULES
 		$(SCONS) \
 		$(GPSD_SCONS_OPTS) \
 		udev-install)
+
+	chmod u+w $(TARGET_DIR)/lib/udev/rules.d/25-gpsd.rules
 endef
 
 GPSD_POST_INSTALL_TARGET_HOOKS += GPSD_INSTALL_UDEV_RULES
-- 
1.9.5.msysgit.1

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

* [Buildroot] [PATCH v2 3/3] gpsd: disable attempt to reload systemd
  2015-11-05 18:41 [Buildroot] [PATCH v2 1/3] gpsd: correct explicit nmea 0183 support flag James Knight
  2015-11-05 18:41 ` [Buildroot] [PATCH v2 2/3] gpsd: cleanup udev rule permissions James Knight
@ 2015-11-05 18:41 ` James Knight
  2015-11-05 21:39   ` Thomas Petazzoni
  2015-11-05 21:00 ` [Buildroot] [PATCH v2 1/3] gpsd: correct explicit nmea 0183 support flag Thomas Petazzoni
  2 siblings, 1 reply; 7+ messages in thread
From: James Knight @ 2015-11-05 18:41 UTC (permalink / raw)
  To: buildroot

The following disables the attempt to reload the host system's systemd
(`systemctl daemon-reload`; if any) when installing the gpsd package.
In previous attempts, the command would invoke and fail (either by being
non-existent or a system policy kit would timeout) falling back to a
`true` invoke.

Signed-off-by: James Knight <james.knight@rockwellcollins.com>
---
Changes v1 -> v2:
  - Package change introduced in change set 2.
---
 package/gpsd/gpsd.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk
index 5a369b0..40b95f7 100644
--- a/package/gpsd/gpsd.mk
+++ b/package/gpsd/gpsd.mk
@@ -234,4 +234,12 @@ endef
 GPSD_POST_INSTALL_TARGET_HOOKS += GPSD_INSTALL_UDEV_RULES
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+define GPSD_DISABLE_SYSTEMD_DAEMON_RELOAD
+	$(SED) 's/systemctl daemon-reload || //g' $(@D)/SConstruct
+endef
+
+GPSD_POST_PATCH_HOOKS += GPSD_DISABLE_SYSTEMD_DAEMON_RELOAD
+endif
+
 $(eval $(generic-package))
-- 
1.9.5.msysgit.1

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

* [Buildroot] [PATCH v2 1/3] gpsd: correct explicit nmea 0183 support flag
  2015-11-05 18:41 [Buildroot] [PATCH v2 1/3] gpsd: correct explicit nmea 0183 support flag James Knight
  2015-11-05 18:41 ` [Buildroot] [PATCH v2 2/3] gpsd: cleanup udev rule permissions James Knight
  2015-11-05 18:41 ` [Buildroot] [PATCH v2 3/3] gpsd: disable attempt to reload systemd James Knight
@ 2015-11-05 21:00 ` Thomas Petazzoni
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-11-05 21:00 UTC (permalink / raw)
  To: buildroot

Dear James Knight,

On Thu,  5 Nov 2015 13:41:52 -0500, James Knight wrote:
> The following handles the GPSd SCons change for the explicit
> configuration of the NMEA 0183 protocol. The protocol configuration
> change was introduced in 3.12. Developer's who transitioned to
> Buildroot's GPSd 3.15 had NMEA 0183 implicitly enabled by default. This
> change allows NMEA 0183 to be explicitly disabled again.
> 
> See:
>  http://git.savannah.gnu.org/cgit/gpsd.git/commit/SConstruct?id=8f20d7b2d1ece8f3205ca038726c77daa5234c0c
> 
> Signed-off-by: James Knight <james.knight@rockwellcollins.com>
> ---
> Changes v1 -> v2:
>   - None.
> ---
>  package/gpsd/gpsd.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v2 2/3] gpsd: cleanup udev rule permissions
  2015-11-05 18:41 ` [Buildroot] [PATCH v2 2/3] gpsd: cleanup udev rule permissions James Knight
@ 2015-11-05 21:37   ` Thomas Petazzoni
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-11-05 21:37 UTC (permalink / raw)
  To: buildroot

Dear James Knight,

On Thu,  5 Nov 2015 13:41:53 -0500, James Knight wrote:
> Adjust a generated udev rule file (25-gpsd.rules) to have user write
> permissions. This is to prevent rebuild issues when the gpsd package
> fails to re-install on a target (since the `cp` of the rule file will
> fail due to permissions).
> 
> Signed-off-by: James Knight <james.knight@rockwellcollins.com>
> ---
> Changes v1 -> v2:
>   - Package change introduced in change set 2.
> ---
>  package/gpsd/gpsd.mk | 4 ++++
>  1 file changed, 4 insertions(+)

Applied after doing some minor tweaks to the commit title and the
comment in the code.

Could you report this issue to upstream gpsd? It is not normal IMO that
a projects doesn't support "make install; make install".

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v2 3/3] gpsd: disable attempt to reload systemd
  2015-11-05 18:41 ` [Buildroot] [PATCH v2 3/3] gpsd: disable attempt to reload systemd James Knight
@ 2015-11-05 21:39   ` Thomas Petazzoni
  2015-11-06 16:07     ` James Knight
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2015-11-05 21:39 UTC (permalink / raw)
  To: buildroot

Dear James Knight,

On Thu,  5 Nov 2015 13:41:54 -0500, James Knight wrote:
> The following disables the attempt to reload the host system's systemd
> (`systemctl daemon-reload`; if any) when installing the gpsd package.
> In previous attempts, the command would invoke and fail (either by being
> non-existent or a system policy kit would timeout) falling back to a
> `true` invoke.
> 
> Signed-off-by: James Knight <james.knight@rockwellcollins.com>
> ---
> Changes v1 -> v2:
>   - Package change introduced in change set 2.
> ---
>  package/gpsd/gpsd.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk
> index 5a369b0..40b95f7 100644
> --- a/package/gpsd/gpsd.mk
> +++ b/package/gpsd/gpsd.mk
> @@ -234,4 +234,12 @@ endef
>  GPSD_POST_INSTALL_TARGET_HOOKS += GPSD_INSTALL_UDEV_RULES
>  endif
>  
> +ifeq ($(BR2_PACKAGE_SYSTEMD),y)
> +define GPSD_DISABLE_SYSTEMD_DAEMON_RELOAD
> +	$(SED) 's/systemctl daemon-reload || //g' $(@D)/SConstruct
> +endef
> +
> +GPSD_POST_PATCH_HOOKS += GPSD_DISABLE_SYSTEMD_DAEMON_RELOAD
> +endif

I see the problem, but rather than this $(SED) expression, could you
create a proper patch against the gpsd sources ? The risk with the
$(SED) expression is that we might forget about it when updating gpsd
in the future.

Also, can you raise the issue with the upstream gpsd developers? Maybe
they could introduce some SConstruct command line option to explicitly
disable restarting the systemd service. Or maybe the SConstruct already
has a way of knowing that it is cross-compiling, in which case doing
this systemctl call is silly.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v2 3/3] gpsd: disable attempt to reload systemd
  2015-11-05 21:39   ` Thomas Petazzoni
@ 2015-11-06 16:07     ` James Knight
  0 siblings, 0 replies; 7+ messages in thread
From: James Knight @ 2015-11-06 16:07 UTC (permalink / raw)
  To: buildroot

Thomas,

On Thu, Nov 5, 2015 at 4:39 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> rather than this $(SED) expression, could you
> create a proper patch against the gpsd sources ?

Gah! I was going to make a patch but figured the SED option would be
preferred. Oops.

I take at look trying to get these changes (this and the other patch
related to gpsd udev) upstream.

As always, thanks for the commits/comments.

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

end of thread, other threads:[~2015-11-06 16:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-05 18:41 [Buildroot] [PATCH v2 1/3] gpsd: correct explicit nmea 0183 support flag James Knight
2015-11-05 18:41 ` [Buildroot] [PATCH v2 2/3] gpsd: cleanup udev rule permissions James Knight
2015-11-05 21:37   ` Thomas Petazzoni
2015-11-05 18:41 ` [Buildroot] [PATCH v2 3/3] gpsd: disable attempt to reload systemd James Knight
2015-11-05 21:39   ` Thomas Petazzoni
2015-11-06 16:07     ` James Knight
2015-11-05 21:00 ` [Buildroot] [PATCH v2 1/3] gpsd: correct explicit nmea 0183 support flag Thomas Petazzoni

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.