mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/2] cog: add option to control cog via D-Bus system bus
@ 2021-04-15 10:29 Bastian Krause
  2021-04-15 10:29 ` [ptxdist] [PATCH 2/2] cog: add option to install cogctl Bastian Krause
  2021-04-23 13:47 ` [ptxdist] [APPLIED] cog: add option to control cog via D-Bus system bus Michael Olbrich
  0 siblings, 2 replies; 4+ messages in thread
From: Bastian Krause @ 2021-04-15 10:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Bastian Krause

This allows remote control of cog via D-Bus, e.g. open an URL, reload,
navigate in page view history.

Signed-off-by: Bastian Krause <bst@pengutronix.de>
---
 ...Bus-policy-configuration-to-CMAKE_IN.patch | 31 +++++++++++++++++++
 patches/cog-0.8.1/series                      |  4 +++
 rules/cog.in                                  | 13 ++++++--
 rules/cog.make                                |  7 ++++-
 4 files changed, 52 insertions(+), 3 deletions(-)
 create mode 100644 patches/cog-0.8.1/0001-CMake-install-D-Bus-policy-configuration-to-CMAKE_IN.patch
 create mode 100644 patches/cog-0.8.1/series

diff --git a/patches/cog-0.8.1/0001-CMake-install-D-Bus-policy-configuration-to-CMAKE_IN.patch b/patches/cog-0.8.1/0001-CMake-install-D-Bus-policy-configuration-to-CMAKE_IN.patch
new file mode 100644
index 000000000..9f2a19009
--- /dev/null
+++ b/patches/cog-0.8.1/0001-CMake-install-D-Bus-policy-configuration-to-CMAKE_IN.patch
@@ -0,0 +1,31 @@
+From: Bastian Krause <bst@pengutronix.de>
+Date: Wed, 14 Apr 2021 17:36:24 +0200
+Subject: [PATCH] CMake: install D-Bus policy configuration to
+ CMAKE_INSTALL_DATADIR
+
+The D-BUS system bus policy config should reside in
+CMAKE_INSTALL_DATADIR rather than in CMAKE_INSTALL_SYSCONFDIR.
+
+See:
+
+  https://gitlab.freedesktop.org/dbus/dbus/-/blob/ef55a3db0d8f17848f8a579092fb05900cc076f5/bus/CMakeLists.txt#L117
+
+Forwarded: https://github.com/Igalia/cog/pull/296
+Signed-off-by: Bastian Krause <bst@pengutronix.de>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cb51087359fc..2fcd63845212 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -157,7 +157,7 @@ if (COG_DBUS_SYSTEM_BUS)
+     configure_file(dbus/policy.conf.in ${COG_DEFAULT_APPID}.conf @ONLY)
+     install(
+         FILES ${CMAKE_CURRENT_BINARY_DIR}/${COG_DEFAULT_APPID}.conf
+-        DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d
++        DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/system.d
+         COMPONENT "runtime"
+     )
+ 
diff --git a/patches/cog-0.8.1/series b/patches/cog-0.8.1/series
new file mode 100644
index 000000000..14639312e
--- /dev/null
+++ b/patches/cog-0.8.1/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-CMake-install-D-Bus-policy-configuration-to-CMAKE_IN.patch
+# a7cfa1be71dd856d687d8a3863e5a56f  - git-ptx-patches magic
diff --git a/rules/cog.in b/rules/cog.in
index 23b9de3cd..ccc736295 100644
--- a/rules/cog.in
+++ b/rules/cog.in
@@ -1,12 +1,21 @@
 ## SECTION=applications
 
-config COG
+menuconfig COG
 	tristate
-	prompt "cog"
+	prompt "cog                           "
 	select HOST_CMAKE
 	select HOST_NINJA
 	select WAYLAND_PROTOCOLS
 	select WPEWEBKIT
 	select WPEBACKEND_FDO
+	select DBUS			if COG_REMOTE_DBUS_SYSTEM_BUS
 	help
 	  Cog launcher and webapp container.
+
+if COG
+
+config COG_REMOTE_DBUS_SYSTEM_BUS
+	bool
+	prompt "Expose remote control interface on system bus"
+
+endif
diff --git a/rules/cog.make b/rules/cog.make
index 758b4f7f4..445c76617 100644
--- a/rules/cog.make
+++ b/rules/cog.make
@@ -38,7 +38,7 @@ COG_CONF_OPT	:= \
 	-DCOG_APPID= \
 	-DCOG_BUILD_PROGRAMS=ON \
 	-DCOG_DBUS_OWN_USER= \
-	-DCOG_DBUS_SYSTEM_BUS=OFF \
+	-DCOG_DBUS_SYSTEM_BUS=$(call ptx/onoff,PTXCONF_COG_REMOTE_DBUS_SYSTEM_BUS) \
 	-DCOG_HOME_URI=https://ptxdist.org/ \
 	-DCOG_PLATFORM_DRM=OFF \
 	-DCOG_PLATFORM_FDO=ON \
@@ -64,6 +64,11 @@ $(STATEDIR)/cog.targetinstall:
 	@$(call install_lib, cog, 0, 0, 0644, libcogplatform-fdo)
 	@$(call install_lib, cog, 0, 0, 0644, libcogcore)
 
+ifdef PTXCONF_COG_REMOTE_DBUS_SYSTEM_BUS
+	@$(call install_copy, cog, 0, 0, 0644, -, \
+		/usr/share/dbus-1/system.d/com.igalia.Cog.conf)
+endif
+
 	@$(call install_finish, cog)
 
 	@$(call touch)
-- 
2.29.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* [ptxdist] [PATCH 2/2] cog: add option to install cogctl
  2021-04-15 10:29 [ptxdist] [PATCH 1/2] cog: add option to control cog via D-Bus system bus Bastian Krause
@ 2021-04-15 10:29 ` Bastian Krause
  2021-04-23 13:47   ` [ptxdist] [APPLIED] " Michael Olbrich
  2021-04-23 13:47 ` [ptxdist] [APPLIED] cog: add option to control cog via D-Bus system bus Michael Olbrich
  1 sibling, 1 reply; 4+ messages in thread
From: Bastian Krause @ 2021-04-15 10:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Bastian Krause

cogctl is a commandline tool to control a running cog instance via
D-Bus.

Signed-off-by: Bastian Krause <bst@pengutronix.de>
---
 rules/cog.in   | 5 +++++
 rules/cog.make | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/rules/cog.in b/rules/cog.in
index ccc736295..81313c636 100644
--- a/rules/cog.in
+++ b/rules/cog.in
@@ -18,4 +18,9 @@ config COG_REMOTE_DBUS_SYSTEM_BUS
 	bool
 	prompt "Expose remote control interface on system bus"
 
+config COG_COGCTL
+	bool
+	select COG_REMOTE_DBUS_SYSTEM_BUS
+	prompt "Install cogctl"
+
 endif
diff --git a/rules/cog.make b/rules/cog.make
index 445c76617..3fd9f929a 100644
--- a/rules/cog.make
+++ b/rules/cog.make
@@ -69,6 +69,10 @@ ifdef PTXCONF_COG_REMOTE_DBUS_SYSTEM_BUS
 		/usr/share/dbus-1/system.d/com.igalia.Cog.conf)
 endif
 
+ifdef PTXCONF_COG_COGCTL
+	@$(call install_copy, cog, 0, 0, 0755, -, /usr/bin/cogctl)
+endif
+
 	@$(call install_finish, cog)
 
 	@$(call touch)
-- 
2.29.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [APPLIED] cog: add option to control cog via D-Bus system bus
  2021-04-15 10:29 [ptxdist] [PATCH 1/2] cog: add option to control cog via D-Bus system bus Bastian Krause
  2021-04-15 10:29 ` [ptxdist] [PATCH 2/2] cog: add option to install cogctl Bastian Krause
@ 2021-04-23 13:47 ` Michael Olbrich
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2021-04-23 13:47 UTC (permalink / raw)
  To: ptxdist; +Cc: Bastian Krause

Thanks, applied as 7a23508e15b14bd9a977d8b9308932cfb03ef8ca.

Michael

[sent from post-receive hook]

On Fri, 23 Apr 2021 15:47:34 +0200, Bastian Krause <bst@pengutronix.de> wrote:
> This allows remote control of cog via D-Bus, e.g. open an URL, reload,
> navigate in page view history.
> 
> Signed-off-by: Bastian Krause <bst@pengutronix.de>
> Message-Id: <20210415102923.21134-1-bst@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/patches/cog-0.8.1/0001-CMake-install-D-Bus-policy-configuration-to-CMAKE_IN.patch b/patches/cog-0.8.1/0001-CMake-install-D-Bus-policy-configuration-to-CMAKE_IN.patch
> new file mode 100644
> index 000000000000..9f2a1900981f
> --- /dev/null
> +++ b/patches/cog-0.8.1/0001-CMake-install-D-Bus-policy-configuration-to-CMAKE_IN.patch
> @@ -0,0 +1,31 @@
> +From: Bastian Krause <bst@pengutronix.de>
> +Date: Wed, 14 Apr 2021 17:36:24 +0200
> +Subject: [PATCH] CMake: install D-Bus policy configuration to
> + CMAKE_INSTALL_DATADIR
> +
> +The D-BUS system bus policy config should reside in
> +CMAKE_INSTALL_DATADIR rather than in CMAKE_INSTALL_SYSCONFDIR.
> +
> +See:
> +
> +  https://gitlab.freedesktop.org/dbus/dbus/-/blob/ef55a3db0d8f17848f8a579092fb05900cc076f5/bus/CMakeLists.txt#L117
> +
> +Forwarded: https://github.com/Igalia/cog/pull/296
> +Signed-off-by: Bastian Krause <bst@pengutronix.de>
> +---
> + CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index cb51087359fc..2fcd63845212 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -157,7 +157,7 @@ if (COG_DBUS_SYSTEM_BUS)
> +     configure_file(dbus/policy.conf.in ${COG_DEFAULT_APPID}.conf @ONLY)
> +     install(
> +         FILES ${CMAKE_CURRENT_BINARY_DIR}/${COG_DEFAULT_APPID}.conf
> +-        DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d
> ++        DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/system.d
> +         COMPONENT "runtime"
> +     )
> + 
> diff --git a/patches/cog-0.8.1/series b/patches/cog-0.8.1/series
> new file mode 100644
> index 000000000000..14639312eb47
> --- /dev/null
> +++ b/patches/cog-0.8.1/series
> @@ -0,0 +1,4 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-CMake-install-D-Bus-policy-configuration-to-CMAKE_IN.patch
> +# a7cfa1be71dd856d687d8a3863e5a56f  - git-ptx-patches magic
> diff --git a/rules/cog.in b/rules/cog.in
> index 23b9de3cd931..ccc7362950c2 100644
> --- a/rules/cog.in
> +++ b/rules/cog.in
> @@ -1,12 +1,21 @@
>  ## SECTION=applications
>  
> -config COG
> +menuconfig COG
>  	tristate
> -	prompt "cog"
> +	prompt "cog                           "
>  	select HOST_CMAKE
>  	select HOST_NINJA
>  	select WAYLAND_PROTOCOLS
>  	select WPEWEBKIT
>  	select WPEBACKEND_FDO
> +	select DBUS			if COG_REMOTE_DBUS_SYSTEM_BUS
>  	help
>  	  Cog launcher and webapp container.
> +
> +if COG
> +
> +config COG_REMOTE_DBUS_SYSTEM_BUS
> +	bool
> +	prompt "Expose remote control interface on system bus"
> +
> +endif
> diff --git a/rules/cog.make b/rules/cog.make
> index 758b4f7f4a84..445c76617246 100644
> --- a/rules/cog.make
> +++ b/rules/cog.make
> @@ -38,7 +38,7 @@ COG_CONF_OPT	:= \
>  	-DCOG_APPID= \
>  	-DCOG_BUILD_PROGRAMS=ON \
>  	-DCOG_DBUS_OWN_USER= \
> -	-DCOG_DBUS_SYSTEM_BUS=OFF \
> +	-DCOG_DBUS_SYSTEM_BUS=$(call ptx/onoff,PTXCONF_COG_REMOTE_DBUS_SYSTEM_BUS) \
>  	-DCOG_HOME_URI=https://ptxdist.org/ \
>  	-DCOG_PLATFORM_DRM=OFF \
>  	-DCOG_PLATFORM_FDO=ON \
> @@ -64,6 +64,11 @@ $(STATEDIR)/cog.targetinstall:
>  	@$(call install_lib, cog, 0, 0, 0644, libcogplatform-fdo)
>  	@$(call install_lib, cog, 0, 0, 0644, libcogcore)
>  
> +ifdef PTXCONF_COG_REMOTE_DBUS_SYSTEM_BUS
> +	@$(call install_copy, cog, 0, 0, 0644, -, \
> +		/usr/share/dbus-1/system.d/com.igalia.Cog.conf)
> +endif
> +
>  	@$(call install_finish, cog)
>  
>  	@$(call touch)

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [APPLIED] cog: add option to install cogctl
  2021-04-15 10:29 ` [ptxdist] [PATCH 2/2] cog: add option to install cogctl Bastian Krause
@ 2021-04-23 13:47   ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2021-04-23 13:47 UTC (permalink / raw)
  To: ptxdist; +Cc: Bastian Krause

Thanks, applied as 7eeb6bb6f1334706e8d35f592dc8b3953d2cebda.

Michael

[sent from post-receive hook]

On Fri, 23 Apr 2021 15:47:35 +0200, Bastian Krause <bst@pengutronix.de> wrote:
> cogctl is a commandline tool to control a running cog instance via
> D-Bus.
> 
> Signed-off-by: Bastian Krause <bst@pengutronix.de>
> Message-Id: <20210415102923.21134-2-bst@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/cog.in b/rules/cog.in
> index ccc7362950c2..81313c636dba 100644
> --- a/rules/cog.in
> +++ b/rules/cog.in
> @@ -18,4 +18,9 @@ config COG_REMOTE_DBUS_SYSTEM_BUS
>  	bool
>  	prompt "Expose remote control interface on system bus"
>  
> +config COG_COGCTL
> +	bool
> +	select COG_REMOTE_DBUS_SYSTEM_BUS
> +	prompt "Install cogctl"
> +
>  endif
> diff --git a/rules/cog.make b/rules/cog.make
> index 445c76617246..3fd9f929a83f 100644
> --- a/rules/cog.make
> +++ b/rules/cog.make
> @@ -69,6 +69,10 @@ ifdef PTXCONF_COG_REMOTE_DBUS_SYSTEM_BUS
>  		/usr/share/dbus-1/system.d/com.igalia.Cog.conf)
>  endif
>  
> +ifdef PTXCONF_COG_COGCTL
> +	@$(call install_copy, cog, 0, 0, 0755, -, /usr/bin/cogctl)
> +endif
> +
>  	@$(call install_finish, cog)
>  
>  	@$(call touch)

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

end of thread, other threads:[~2021-04-23 13:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 10:29 [ptxdist] [PATCH 1/2] cog: add option to control cog via D-Bus system bus Bastian Krause
2021-04-15 10:29 ` [ptxdist] [PATCH 2/2] cog: add option to install cogctl Bastian Krause
2021-04-23 13:47   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-04-23 13:47 ` [ptxdist] [APPLIED] cog: add option to control cog via D-Bus system bus Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox