All of lore.kernel.org
 help / color / mirror / Atom feed
* [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service
@ 2018-11-20 21:33 Hongmei Gou
  2018-11-20 21:42 ` Denys Dmytriyenko
  0 siblings, 1 reply; 11+ messages in thread
From: Hongmei Gou @ 2018-11-20 21:33 UTC (permalink / raw)
  To: meta-arago; +Cc: Hongmei Gou

Signed-off-by: Hongmei Gou <a0271529@ti.com>
---
 .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service | 10 ++++++++++
 meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb   | 15 +++++++++------
 2 files changed, 19 insertions(+), 6 deletions(-)
 create mode 100644 meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service

diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
new file mode 100644
index 0000000..3ce1024
--- /dev/null
+++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Matrix GUI
+After=weston.service
+
+[Service]
+Type=forking
+ExecStart=/etc/init.d/matrix-gui-2.0 start
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
index d8aa00b..c79f13e 100644
--- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
+++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
@@ -6,14 +6,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
 
 SECTION = "multimedia"
 
-PR = "r35"
+PR = "r36"
 
-INITSCRIPT_NAME = "matrix-gui-2.0"
-INITSCRIPT_PARAMS = "defaults 97"
+SYSTEMD_SERVICE_${PN} = "matrix-gui-2.0.service"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-inherit update-rc.d
+inherit systemd
 
 BRANCH ?= "master"
 SRCREV = "9a2d12590102fefc5c29fc9e8d346ce6b0198468"
@@ -23,6 +22,7 @@ MATRIX_INITSCRIPT = "${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains
 SRC_URI = "git://git.ti.com/matrix-gui-v2/matrix-gui-v2.git;protocol=git;branch=${BRANCH} \
            file://${MATRIX_INITSCRIPT} \
            file://php.ini \
+           file://matrix-gui-2.0.service \
            ${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'file://0001-execute_command-Stop-matrix-when-running-a-GUI-demo.patch', d), '', d)} \
            ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'file://0001-execute_command-workaround-for-GUI-apps-with-weston.patch', '', d)} \
 "
@@ -46,10 +46,13 @@ do_install(){
 	sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/" ${WORKDIR}/${MATRIX_INITSCRIPT}
 	sed -i -e "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/" ${WORKDIR}/${MATRIX_INITSCRIPT}
 
-	# Install the init script
-	# TODO: replace init script with systemd files
+	# Install the script
 	install -d ${D}${sysconfdir}/init.d
 	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT} ${D}${sysconfdir}/init.d/matrix-gui-2.0
+
+	# Install the systemd unit file
+	install -d ${D}${systemd_system_unitdir}
+	install -m 0644 ${WORKDIR}/matrix-gui-2.0.service ${D}${systemd_system_unitdir}
 }
 
 GUIDEPS = "matrix-gui-browser refresh-screen"
-- 
1.9.1



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

* Re: [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service
  2018-11-20 21:33 [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service Hongmei Gou
@ 2018-11-20 21:42 ` Denys Dmytriyenko
  2018-11-20 21:51   ` Gou, Hongmei
  0 siblings, 1 reply; 11+ messages in thread
From: Denys Dmytriyenko @ 2018-11-20 21:42 UTC (permalink / raw)
  To: Hongmei Gou; +Cc: meta-arago

On Tue, Nov 20, 2018 at 04:33:55PM -0500, Hongmei Gou wrote:
> Signed-off-by: Hongmei Gou <a0271529@ti.com>
> ---
>  .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service | 10 ++++++++++
>  meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb   | 15 +++++++++------
>  2 files changed, 19 insertions(+), 6 deletions(-)
>  create mode 100644 meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
> 
> diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
> new file mode 100644
> index 0000000..3ce1024
> --- /dev/null
> +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
> @@ -0,0 +1,10 @@
> +[Unit]
> +Description=Matrix GUI
> +After=weston.service
> +
> +[Service]
> +Type=forking
> +ExecStart=/etc/init.d/matrix-gui-2.0 start

Looks like it's still calling a legacy initscript - any particular reason?


> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> index d8aa00b..c79f13e 100644
> --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> @@ -6,14 +6,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
>  
>  SECTION = "multimedia"
>  
> -PR = "r35"
> +PR = "r36"
>  
> -INITSCRIPT_NAME = "matrix-gui-2.0"
> -INITSCRIPT_PARAMS = "defaults 97"
> +SYSTEMD_SERVICE_${PN} = "matrix-gui-2.0.service"
>  
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>  
> -inherit update-rc.d
> +inherit systemd
>  
>  BRANCH ?= "master"
>  SRCREV = "9a2d12590102fefc5c29fc9e8d346ce6b0198468"
> @@ -23,6 +22,7 @@ MATRIX_INITSCRIPT = "${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains
>  SRC_URI = "git://git.ti.com/matrix-gui-v2/matrix-gui-v2.git;protocol=git;branch=${BRANCH} \
>             file://${MATRIX_INITSCRIPT} \
>             file://php.ini \
> +           file://matrix-gui-2.0.service \
>             ${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'file://0001-execute_command-Stop-matrix-when-running-a-GUI-demo.patch', d), '', d)} \
>             ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'file://0001-execute_command-workaround-for-GUI-apps-with-weston.patch', '', d)} \
>  "
> @@ -46,10 +46,13 @@ do_install(){
>  	sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/" ${WORKDIR}/${MATRIX_INITSCRIPT}
>  	sed -i -e "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/" ${WORKDIR}/${MATRIX_INITSCRIPT}
>  
> -	# Install the init script
> -	# TODO: replace init script with systemd files
> +	# Install the script
>  	install -d ${D}${sysconfdir}/init.d
>  	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT} ${D}${sysconfdir}/init.d/matrix-gui-2.0
> +
> +	# Install the systemd unit file
> +	install -d ${D}${systemd_system_unitdir}
> +	install -m 0644 ${WORKDIR}/matrix-gui-2.0.service ${D}${systemd_system_unitdir}
>  }
>  
>  GUIDEPS = "matrix-gui-browser refresh-screen"
> -- 
> 1.9.1
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


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

* Re: [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service
  2018-11-20 21:42 ` Denys Dmytriyenko
@ 2018-11-20 21:51   ` Gou, Hongmei
  2018-11-20 21:54     ` Denys Dmytriyenko
  0 siblings, 1 reply; 11+ messages in thread
From: Gou, Hongmei @ 2018-11-20 21:51 UTC (permalink / raw)
  To: Dmytriyenko, Denys; +Cc: meta-arago

> -----Original Message-----
> From: Dmytriyenko, Denys
> Sent: Tuesday, November 20, 2018 4:43 PM
> To: Gou, Hongmei
> Cc: meta-arago@arago-project.org
> Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> SysVinit with systemd service
> 
> On Tue, Nov 20, 2018 at 04:33:55PM -0500, Hongmei Gou wrote:
> > Signed-off-by: Hongmei Gou <a0271529@ti.com>
> > ---
> >  .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service | 10 ++++++++++
> >  meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb   | 15
> +++++++++------
> >  2 files changed, 19 insertions(+), 6 deletions(-)
> >  create mode 100644 meta-arago-extras/recipes-core/matrix/matrix-
> gui/matrix-gui-2.0.service
> >
> > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-
> 2.0.service b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-
> 2.0.service
> > new file mode 100644
> > index 0000000..3ce1024
> > --- /dev/null
> > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-
> 2.0.service
> > @@ -0,0 +1,10 @@
> > +[Unit]
> > +Description=Matrix GUI
> > +After=weston.service
> > +
> > +[Service]
> > +Type=forking
> > +ExecStart=/etc/init.d/matrix-gui-2.0 start
> 
> Looks like it's still calling a legacy initscript - any particular reason?

Yes, we would like to keep the original scripts, as they are also used for stopping/starting matrix GUI when running GUI based demos (/usr/share/matrix-gui-2.0/execute_command.sh):

if [ $program_type == gui ]
then
  /etc/init.d/matrix-gui-2.0 stop
..

if [ $program_type == gui ]
then
...
  /etc/init.d/matrix-gui-2.0 start
fi

> 
> 
> > +
> > +[Install]
> > +WantedBy=multi-user.target
> > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > index d8aa00b..c79f13e 100644
> > --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > @@ -6,14 +6,13 @@ LIC_FILES_CHKSUM =
> "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
> >
> >  SECTION = "multimedia"
> >
> > -PR = "r35"
> > +PR = "r36"
> >
> > -INITSCRIPT_NAME = "matrix-gui-2.0"
> > -INITSCRIPT_PARAMS = "defaults 97"
> > +SYSTEMD_SERVICE_${PN} = "matrix-gui-2.0.service"
> >
> >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> >
> > -inherit update-rc.d
> > +inherit systemd
> >
> >  BRANCH ?= "master"
> >  SRCREV = "9a2d12590102fefc5c29fc9e8d346ce6b0198468"
> > @@ -23,6 +22,7 @@ MATRIX_INITSCRIPT =
> "${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains
> >  SRC_URI = "git://git.ti.com/matrix-gui-v2/matrix-gui-
> v2.git;protocol=git;branch=${BRANCH} \
> >             file://${MATRIX_INITSCRIPT} \
> >             file://php.ini \
> > +           file://matrix-gui-2.0.service \
> >             ${@base_conditional('QT_PROVIDER', 'qt5',
> bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'file://0001-
> execute_command-Stop-matrix-when-running-a-GUI-demo.patch', d), '', d)}
> \
> >             ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'file://0001-
> execute_command-workaround-for-GUI-apps-with-weston.patch', '', d)} \
> >  "
> > @@ -46,10 +46,13 @@ do_install(){
> >  	sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/"
> ${WORKDIR}/${MATRIX_INITSCRIPT}
> >  	sed -i -e
> "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/"
> ${WORKDIR}/${MATRIX_INITSCRIPT}
> >
> > -	# Install the init script
> > -	# TODO: replace init script with systemd files
> > +	# Install the script
> >  	install -d ${D}${sysconfdir}/init.d
> >  	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT}
> ${D}${sysconfdir}/init.d/matrix-gui-2.0
> > +
> > +	# Install the systemd unit file
> > +	install -d ${D}${systemd_system_unitdir}
> > +	install -m 0644 ${WORKDIR}/matrix-gui-2.0.service
> ${D}${systemd_system_unitdir}
> >  }
> >
> >  GUIDEPS = "matrix-gui-browser refresh-screen"
> > --
> > 1.9.1
> >
> > _______________________________________________
> > meta-arago mailing list
> > meta-arago@arago-project.org
> > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


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

* Re: [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service
  2018-11-20 21:51   ` Gou, Hongmei
@ 2018-11-20 21:54     ` Denys Dmytriyenko
  2018-11-20 22:12       ` Gou, Hongmei
  0 siblings, 1 reply; 11+ messages in thread
From: Denys Dmytriyenko @ 2018-11-20 21:54 UTC (permalink / raw)
  To: Gou, Hongmei; +Cc: meta-arago

On Tue, Nov 20, 2018 at 04:51:51PM -0500, Gou, Hongmei wrote:
> > -----Original Message-----
> > From: Dmytriyenko, Denys
> > Sent: Tuesday, November 20, 2018 4:43 PM
> > To: Gou, Hongmei
> > Cc: meta-arago@arago-project.org
> > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > SysVinit with systemd service
> > 
> > On Tue, Nov 20, 2018 at 04:33:55PM -0500, Hongmei Gou wrote:
> > > Signed-off-by: Hongmei Gou <a0271529@ti.com>
> > > ---
> > >  .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service | 10 ++++++++++
> > >  meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb   | 15
> > +++++++++------
> > >  2 files changed, 19 insertions(+), 6 deletions(-)
> > >  create mode 100644 meta-arago-extras/recipes-core/matrix/matrix-
> > gui/matrix-gui-2.0.service
> > >
> > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-
> > 2.0.service b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-
> > 2.0.service
> > > new file mode 100644
> > > index 0000000..3ce1024
> > > --- /dev/null
> > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-
> > 2.0.service
> > > @@ -0,0 +1,10 @@
> > > +[Unit]
> > > +Description=Matrix GUI
> > > +After=weston.service
> > > +
> > > +[Service]
> > > +Type=forking
> > > +ExecStart=/etc/init.d/matrix-gui-2.0 start
> > 
> > Looks like it's still calling a legacy initscript - any particular reason?
> 
> Yes, we would like to keep the original scripts, as they are also used for stopping/starting matrix GUI when running GUI based demos (/usr/share/matrix-gui-2.0/execute_command.sh):
> 
> if [ $program_type == gui ]
> then
>   /etc/init.d/matrix-gui-2.0 stop
> ..
> 
> if [ $program_type == gui ]
> then
> ...
>   /etc/init.d/matrix-gui-2.0 start
> fi

Any plans to completely moving to systemd and calling systemctl start/stop?


> > > +
> > > +[Install]
> > > +WantedBy=multi-user.target
> > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > index d8aa00b..c79f13e 100644
> > > --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > @@ -6,14 +6,13 @@ LIC_FILES_CHKSUM =
> > "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
> > >
> > >  SECTION = "multimedia"
> > >
> > > -PR = "r35"
> > > +PR = "r36"
> > >
> > > -INITSCRIPT_NAME = "matrix-gui-2.0"
> > > -INITSCRIPT_PARAMS = "defaults 97"
> > > +SYSTEMD_SERVICE_${PN} = "matrix-gui-2.0.service"
> > >
> > >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> > >
> > > -inherit update-rc.d
> > > +inherit systemd
> > >
> > >  BRANCH ?= "master"
> > >  SRCREV = "9a2d12590102fefc5c29fc9e8d346ce6b0198468"
> > > @@ -23,6 +22,7 @@ MATRIX_INITSCRIPT =
> > "${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains
> > >  SRC_URI = "git://git.ti.com/matrix-gui-v2/matrix-gui-
> > v2.git;protocol=git;branch=${BRANCH} \
> > >             file://${MATRIX_INITSCRIPT} \
> > >             file://php.ini \
> > > +           file://matrix-gui-2.0.service \
> > >             ${@base_conditional('QT_PROVIDER', 'qt5',
> > bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'file://0001-
> > execute_command-Stop-matrix-when-running-a-GUI-demo.patch', d), '', d)}
> > \
> > >             ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'file://0001-
> > execute_command-workaround-for-GUI-apps-with-weston.patch', '', d)} \
> > >  "
> > > @@ -46,10 +46,13 @@ do_install(){
> > >  	sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/"
> > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > >  	sed -i -e
> > "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/"
> > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > >
> > > -	# Install the init script
> > > -	# TODO: replace init script with systemd files
> > > +	# Install the script
> > >  	install -d ${D}${sysconfdir}/init.d
> > >  	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT}
> > ${D}${sysconfdir}/init.d/matrix-gui-2.0
> > > +
> > > +	# Install the systemd unit file
> > > +	install -d ${D}${systemd_system_unitdir}
> > > +	install -m 0644 ${WORKDIR}/matrix-gui-2.0.service
> > ${D}${systemd_system_unitdir}
> > >  }
> > >
> > >  GUIDEPS = "matrix-gui-browser refresh-screen"
> > > --
> > > 1.9.1
> > >
> > > _______________________________________________
> > > meta-arago mailing list
> > > meta-arago@arago-project.org
> > > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


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

* Re: [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service
  2018-11-20 21:54     ` Denys Dmytriyenko
@ 2018-11-20 22:12       ` Gou, Hongmei
  2018-11-20 22:37         ` Denys Dmytriyenko
  0 siblings, 1 reply; 11+ messages in thread
From: Gou, Hongmei @ 2018-11-20 22:12 UTC (permalink / raw)
  To: Dmytriyenko, Denys; +Cc: meta-arago

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

> -----Original Message-----
> From: Dmytriyenko, Denys
> Sent: Tuesday, November 20, 2018 4:54 PM
> To: Gou, Hongmei
> Cc: meta-arago@arago-project.org
> Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> SysVinit with systemd service
> 
> On Tue, Nov 20, 2018 at 04:51:51PM -0500, Gou, Hongmei wrote:
> > > -----Original Message-----
> > > From: Dmytriyenko, Denys
> > > Sent: Tuesday, November 20, 2018 4:43 PM
> > > To: Gou, Hongmei
> > > Cc: meta-arago@arago-project.org
> > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > > SysVinit with systemd service
> > >
> > > On Tue, Nov 20, 2018 at 04:33:55PM -0500, Hongmei Gou wrote:
> > > > Signed-off-by: Hongmei Gou <a0271529@ti.com>
> > > > ---
> > > >  .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service | 10
> ++++++++++
> > > >  meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb   | 15
> > > +++++++++------
> > > >  2 files changed, 19 insertions(+), 6 deletions(-)
> > > >  create mode 100644 meta-arago-extras/recipes-core/matrix/matrix-
> > > gui/matrix-gui-2.0.service
> > > >
> > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-
> gui-
> > > 2.0.service b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-
> gui-
> > > 2.0.service
> > > > new file mode 100644
> > > > index 0000000..3ce1024
> > > > --- /dev/null
> > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-
> > > 2.0.service
> > > > @@ -0,0 +1,10 @@
> > > > +[Unit]
> > > > +Description=Matrix GUI
> > > > +After=weston.service
> > > > +
> > > > +[Service]
> > > > +Type=forking
> > > > +ExecStart=/etc/init.d/matrix-gui-2.0 start
> > >
> > > Looks like it's still calling a legacy initscript - any particular reason?
> >
> > Yes, we would like to keep the original scripts, as they are also used for
> stopping/starting matrix GUI when running GUI based demos
> (/usr/share/matrix-gui-2.0/execute_command.sh):
> >
> > if [ $program_type == gui ]
> > then
> >   /etc/init.d/matrix-gui-2.0 stop
> > ..
> >
> > if [ $program_type == gui ]
> > then
> > ...
> >   /etc/init.d/matrix-gui-2.0 start
> > fi
> 
> Any plans to completely moving to systemd and calling systemctl start/stop?

With the current patch, "systemctl start/stop matrix-gui-2.0 " can start/stop matrix successfully. 
execute_command.sh can be updated to use systemctl start/stop.

As for /etc/init.d/matrix-gui-2.0 (attached), I am not seeing anything specific to init. 
We can install it to /usr/bin instead of /etc/init.d, and then modify the path in matrix-gui-2.0.service, if this is preferable. 

> 
> 
> > > > +
> > > > +[Install]
> > > > +WantedBy=multi-user.target
> > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > index d8aa00b..c79f13e 100644
> > > > --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > @@ -6,14 +6,13 @@ LIC_FILES_CHKSUM =
> > > "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
> > > >
> > > >  SECTION = "multimedia"
> > > >
> > > > -PR = "r35"
> > > > +PR = "r36"
> > > >
> > > > -INITSCRIPT_NAME = "matrix-gui-2.0"
> > > > -INITSCRIPT_PARAMS = "defaults 97"
> > > > +SYSTEMD_SERVICE_${PN} = "matrix-gui-2.0.service"
> > > >
> > > >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> > > >
> > > > -inherit update-rc.d
> > > > +inherit systemd
> > > >
> > > >  BRANCH ?= "master"
> > > >  SRCREV = "9a2d12590102fefc5c29fc9e8d346ce6b0198468"
> > > > @@ -23,6 +22,7 @@ MATRIX_INITSCRIPT =
> > > "${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains
> > > >  SRC_URI = "git://git.ti.com/matrix-gui-v2/matrix-gui-
> > > v2.git;protocol=git;branch=${BRANCH} \
> > > >             file://${MATRIX_INITSCRIPT} \
> > > >             file://php.ini \
> > > > +           file://matrix-gui-2.0.service \
> > > >             ${@base_conditional('QT_PROVIDER', 'qt5',
> > > bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'file://0001-
> > > execute_command-Stop-matrix-when-running-a-GUI-demo.patch', d), '',
> d)}
> > > \
> > > >             ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'file://0001-
> > > execute_command-workaround-for-GUI-apps-with-weston.patch', '', d)}
> \
> > > >  "
> > > > @@ -46,10 +46,13 @@ do_install(){
> > > >  	sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/"
> > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > >  	sed -i -e
> > > "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/"
> > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > >
> > > > -	# Install the init script
> > > > -	# TODO: replace init script with systemd files
> > > > +	# Install the script
> > > >  	install -d ${D}${sysconfdir}/init.d
> > > >  	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > ${D}${sysconfdir}/init.d/matrix-gui-2.0
> > > > +
> > > > +	# Install the systemd unit file
> > > > +	install -d ${D}${systemd_system_unitdir}
> > > > +	install -m 0644 ${WORKDIR}/matrix-gui-2.0.service
> > > ${D}${systemd_system_unitdir}
> > > >  }
> > > >
> > > >  GUIDEPS = "matrix-gui-browser refresh-screen"
> > > > --
> > > > 1.9.1
> > > >
> > > > _______________________________________________
> > > > meta-arago mailing list
> > > > meta-arago@arago-project.org
> > > > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

[-- Attachment #2: matrix-gui-2.0 --]
[-- Type: application/octet-stream, Size: 1101 bytes --]

#! /bin/sh

matrixgui="/usr/bin/matrix_browser"
GUI_OPTS="http://localhost:80/ """
PIDFILE="/var/run/matrix-gui-2.0.pid"

# Important System Environment Variables
for sh in /etc/profile.d/*.sh ; do
    [ -r "$sh" ] && . "$sh"
done

test -x "$matrixgui" || exit 0

case "$1" in
  start)
    

    #Clear out the the tmp and lock directory
    cd /usr/share/matrix-gui-2.0
    rm -rf tmp/*
    rm -rf lock/*
    cd -

	if [ -e $PIDFILE ]; then
      PIDDIR=/proc/$(cat $PIDFILE)
      if [ -d ${PIDDIR} -a  "$(readlink -f ${PIDDIR}/exe)" = "${matrixgui}" ]; then
        echo "$DESC already started; not starting."
      else
        echo "Removing stale PID file $PIDFILE."
        rm -f $PIDFILE
      fi
    fi

    echo -n "Starting Matrix GUI application"
    start-stop-daemon --start --quiet --background -m --pidfile $PIDFILE --exec $matrixgui -- $GUI_OPTS
    echo "."
    ;;

  stop)
    echo -n "Stopping Matrix GUI application"
    start-stop-daemon --stop --quiet --pidfile $PIDFILE
    echo "."
    ;;
  *)
    echo "Usage: /etc/init.d/matrix-gui-2.0 {start|stop}"
    exit 1
esac

exit 0

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

* Re: [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service
  2018-11-20 22:12       ` Gou, Hongmei
@ 2018-11-20 22:37         ` Denys Dmytriyenko
  2018-11-20 22:43           ` Gou, Hongmei
  0 siblings, 1 reply; 11+ messages in thread
From: Denys Dmytriyenko @ 2018-11-20 22:37 UTC (permalink / raw)
  To: Gou, Hongmei; +Cc: meta-arago

On Tue, Nov 20, 2018 at 05:12:52PM -0500, Gou, Hongmei wrote:
> > -----Original Message-----
> > From: Dmytriyenko, Denys
> > Sent: Tuesday, November 20, 2018 4:54 PM
> > To: Gou, Hongmei
> > Cc: meta-arago@arago-project.org
> > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > SysVinit with systemd service
> > 
> > On Tue, Nov 20, 2018 at 04:51:51PM -0500, Gou, Hongmei wrote:
> > > > -----Original Message-----
> > > > From: Dmytriyenko, Denys
> > > > Sent: Tuesday, November 20, 2018 4:43 PM
> > > > To: Gou, Hongmei
> > > > Cc: meta-arago@arago-project.org
> > > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > > > SysVinit with systemd service
> > > >
> > > > On Tue, Nov 20, 2018 at 04:33:55PM -0500, Hongmei Gou wrote:
> > > > > Signed-off-by: Hongmei Gou <a0271529@ti.com>
> > > > > ---
> > > > >  .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service | 10
> > ++++++++++
> > > > >  meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb   | 15
> > > > +++++++++------
> > > > >  2 files changed, 19 insertions(+), 6 deletions(-)
> > > > >  create mode 100644 meta-arago-extras/recipes-core/matrix/matrix-
> > > > gui/matrix-gui-2.0.service
> > > > >
> > > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-
> > gui-
> > > > 2.0.service b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-
> > gui-
> > > > 2.0.service
> > > > > new file mode 100644
> > > > > index 0000000..3ce1024
> > > > > --- /dev/null
> > > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-gui-
> > > > 2.0.service
> > > > > @@ -0,0 +1,10 @@
> > > > > +[Unit]
> > > > > +Description=Matrix GUI
> > > > > +After=weston.service
> > > > > +
> > > > > +[Service]
> > > > > +Type=forking
> > > > > +ExecStart=/etc/init.d/matrix-gui-2.0 start
> > > >
> > > > Looks like it's still calling a legacy initscript - any particular reason?
> > >
> > > Yes, we would like to keep the original scripts, as they are also used for
> > stopping/starting matrix GUI when running GUI based demos
> > (/usr/share/matrix-gui-2.0/execute_command.sh):
> > >
> > > if [ $program_type == gui ]
> > > then
> > >   /etc/init.d/matrix-gui-2.0 stop
> > > ..
> > >
> > > if [ $program_type == gui ]
> > > then
> > > ...
> > >   /etc/init.d/matrix-gui-2.0 start
> > > fi
> > 
> > Any plans to completely moving to systemd and calling systemctl start/stop?
> 
> With the current patch, "systemctl start/stop matrix-gui-2.0 " can 
> start/stop matrix successfully.
> execute_command.sh can be updated to use systemctl start/stop.
> 
> As for /etc/init.d/matrix-gui-2.0 (attached), I am not seeing anything 
> specific to init.
> We can install it to /usr/bin instead of /etc/init.d, and then modify the 
> path in matrix-gui-2.0.service, if this is preferable.

If you keep it in /etc/initd.d, wouldn't systemd try to automatically convert 
it and potentially conflict with your own native unit file?


> > > > > +
> > > > > +[Install]
> > > > > +WantedBy=multi-user.target
> > > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > index d8aa00b..c79f13e 100644
> > > > > --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > @@ -6,14 +6,13 @@ LIC_FILES_CHKSUM =
> > > > "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
> > > > >
> > > > >  SECTION = "multimedia"
> > > > >
> > > > > -PR = "r35"
> > > > > +PR = "r36"
> > > > >
> > > > > -INITSCRIPT_NAME = "matrix-gui-2.0"
> > > > > -INITSCRIPT_PARAMS = "defaults 97"
> > > > > +SYSTEMD_SERVICE_${PN} = "matrix-gui-2.0.service"
> > > > >
> > > > >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> > > > >
> > > > > -inherit update-rc.d
> > > > > +inherit systemd
> > > > >
> > > > >  BRANCH ?= "master"
> > > > >  SRCREV = "9a2d12590102fefc5c29fc9e8d346ce6b0198468"
> > > > > @@ -23,6 +22,7 @@ MATRIX_INITSCRIPT =
> > > > "${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains
> > > > >  SRC_URI = "git://git.ti.com/matrix-gui-v2/matrix-gui-
> > > > v2.git;protocol=git;branch=${BRANCH} \
> > > > >             file://${MATRIX_INITSCRIPT} \
> > > > >             file://php.ini \
> > > > > +           file://matrix-gui-2.0.service \
> > > > >             ${@base_conditional('QT_PROVIDER', 'qt5',
> > > > bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'file://0001-
> > > > execute_command-Stop-matrix-when-running-a-GUI-demo.patch', d), '',
> > d)}
> > > > \
> > > > >             ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'file://0001-
> > > > execute_command-workaround-for-GUI-apps-with-weston.patch', '', d)}
> > \
> > > > >  "
> > > > > @@ -46,10 +46,13 @@ do_install(){
> > > > >  	sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/"
> > > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > >  	sed -i -e
> > > > "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/"
> > > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > >
> > > > > -	# Install the init script
> > > > > -	# TODO: replace init script with systemd files
> > > > > +	# Install the script
> > > > >  	install -d ${D}${sysconfdir}/init.d
> > > > >  	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > ${D}${sysconfdir}/init.d/matrix-gui-2.0
> > > > > +
> > > > > +	# Install the systemd unit file
> > > > > +	install -d ${D}${systemd_system_unitdir}
> > > > > +	install -m 0644 ${WORKDIR}/matrix-gui-2.0.service
> > > > ${D}${systemd_system_unitdir}
> > > > >  }
> > > > >
> > > > >  GUIDEPS = "matrix-gui-browser refresh-screen"
> > > > > --
> > > > > 1.9.1
> > > > >
> > > > > _______________________________________________
> > > > > meta-arago mailing list
> > > > > meta-arago@arago-project.org
> > > > > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago




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

* Re: [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service
  2018-11-20 22:37         ` Denys Dmytriyenko
@ 2018-11-20 22:43           ` Gou, Hongmei
  2018-11-20 22:55             ` [EXTERNAL] " Gou, Hongmei
  2018-11-20 23:14             ` Denys Dmytriyenko
  0 siblings, 2 replies; 11+ messages in thread
From: Gou, Hongmei @ 2018-11-20 22:43 UTC (permalink / raw)
  To: Dmytriyenko, Denys; +Cc: meta-arago

> -----Original Message-----
> From: Dmytriyenko, Denys
> Sent: Tuesday, November 20, 2018 5:37 PM
> To: Gou, Hongmei
> Cc: meta-arago@arago-project.org
> Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> SysVinit with systemd service
> 
> On Tue, Nov 20, 2018 at 05:12:52PM -0500, Gou, Hongmei wrote:
> > > -----Original Message-----
> > > From: Dmytriyenko, Denys
> > > Sent: Tuesday, November 20, 2018 4:54 PM
> > > To: Gou, Hongmei
> > > Cc: meta-arago@arago-project.org
> > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > > SysVinit with systemd service
> > >
> > > On Tue, Nov 20, 2018 at 04:51:51PM -0500, Gou, Hongmei wrote:
> > > > > -----Original Message-----
> > > > > From: Dmytriyenko, Denys
> > > > > Sent: Tuesday, November 20, 2018 4:43 PM
> > > > > To: Gou, Hongmei
> > > > > Cc: meta-arago@arago-project.org
> > > > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > > > > SysVinit with systemd service
> > > > >
> > > > > On Tue, Nov 20, 2018 at 04:33:55PM -0500, Hongmei Gou wrote:
> > > > > > Signed-off-by: Hongmei Gou <a0271529@ti.com>
> > > > > > ---
> > > > > >  .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service | 10
> > > ++++++++++
> > > > > >  meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb   | 15
> > > > > +++++++++------
> > > > > >  2 files changed, 19 insertions(+), 6 deletions(-)
> > > > > >  create mode 100644 meta-arago-extras/recipes-
> core/matrix/matrix-
> > > > > gui/matrix-gui-2.0.service
> > > > > >
> > > > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-
> gui/matrix-
> > > gui-
> > > > > 2.0.service b/meta-arago-extras/recipes-core/matrix/matrix-
> gui/matrix-
> > > gui-
> > > > > 2.0.service
> > > > > > new file mode 100644
> > > > > > index 0000000..3ce1024
> > > > > > --- /dev/null
> > > > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-
> gui-
> > > > > 2.0.service
> > > > > > @@ -0,0 +1,10 @@
> > > > > > +[Unit]
> > > > > > +Description=Matrix GUI
> > > > > > +After=weston.service
> > > > > > +
> > > > > > +[Service]
> > > > > > +Type=forking
> > > > > > +ExecStart=/etc/init.d/matrix-gui-2.0 start
> > > > >
> > > > > Looks like it's still calling a legacy initscript - any particular reason?
> > > >
> > > > Yes, we would like to keep the original scripts, as they are also used for
> > > stopping/starting matrix GUI when running GUI based demos
> > > (/usr/share/matrix-gui-2.0/execute_command.sh):
> > > >
> > > > if [ $program_type == gui ]
> > > > then
> > > >   /etc/init.d/matrix-gui-2.0 stop
> > > > ..
> > > >
> > > > if [ $program_type == gui ]
> > > > then
> > > > ...
> > > >   /etc/init.d/matrix-gui-2.0 start
> > > > fi
> > >
> > > Any plans to completely moving to systemd and calling systemctl
> start/stop?
> >
> > With the current patch, "systemctl start/stop matrix-gui-2.0 " can
> > start/stop matrix successfully.
> > execute_command.sh can be updated to use systemctl start/stop.
> >
> > As for /etc/init.d/matrix-gui-2.0 (attached), I am not seeing anything
> > specific to init.
> > We can install it to /usr/bin instead of /etc/init.d, and then modify the
> > path in matrix-gui-2.0.service, if this is preferable.
> 
> If you keep it in /etc/initd.d, wouldn't systemd try to automatically convert
> it and potentially conflict with your own native unit file?

systemd is not doing the conversion automatically.

Output of "systemctl cat matrix-gui-2.0.service" with the current patch:
[[0;1;34m# /lib/systemd/system/matrix-gui-2.0.service[[0m
[Unit]
Description=Matrix GUI
After=weston.service

[Service]
Type=forking
ExecStart=/etc/init.d/matrix-gui-2.0 start

[Install]
WantedBy=multi-user.target

Output of "systemctl cat matrix-gui-2.0.service" before the patch:
[[0;1;34m# /run/systemd/generator.late/matrix-gui-2.0.service[[0m
# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/matrix-gui-2.0
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=thermal-zone-init.service
After=thttpd.service
After=umountnfs.service
After=rng-tools.service
After=redis-server.service
After=dropbear.service
After=telnetd.service
After=gdbserverproxy.service
After=weston.service
After=rc.pvr.service
After=uim-sysfs.service


[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/etc/init.d/matrix-gui-2.0 start
ExecStop=/etc/init.d/matrix-gui-2.0 stop

> 
> 
> > > > > > +
> > > > > > +[Install]
> > > > > > +WantedBy=multi-user.target
> > > > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-
> gui_2.0.bb
> > > > > b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > index d8aa00b..c79f13e 100644
> > > > > > --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > @@ -6,14 +6,13 @@ LIC_FILES_CHKSUM =
> > > > > "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
> > > > > >
> > > > > >  SECTION = "multimedia"
> > > > > >
> > > > > > -PR = "r35"
> > > > > > +PR = "r36"
> > > > > >
> > > > > > -INITSCRIPT_NAME = "matrix-gui-2.0"
> > > > > > -INITSCRIPT_PARAMS = "defaults 97"
> > > > > > +SYSTEMD_SERVICE_${PN} = "matrix-gui-2.0.service"
> > > > > >
> > > > > >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> > > > > >
> > > > > > -inherit update-rc.d
> > > > > > +inherit systemd
> > > > > >
> > > > > >  BRANCH ?= "master"
> > > > > >  SRCREV = "9a2d12590102fefc5c29fc9e8d346ce6b0198468"
> > > > > > @@ -23,6 +22,7 @@ MATRIX_INITSCRIPT =
> > > > > "${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains
> > > > > >  SRC_URI = "git://git.ti.com/matrix-gui-v2/matrix-gui-
> > > > > v2.git;protocol=git;branch=${BRANCH} \
> > > > > >             file://${MATRIX_INITSCRIPT} \
> > > > > >             file://php.ini \
> > > > > > +           file://matrix-gui-2.0.service \
> > > > > >             ${@base_conditional('QT_PROVIDER', 'qt5',
> > > > > bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'file://0001-
> > > > > execute_command-Stop-matrix-when-running-a-GUI-demo.patch',
> d), '',
> > > d)}
> > > > > \
> > > > > >             ${@bb.utils.contains('DISTRO_FEATURES', 'wayland',
> 'file://0001-
> > > > > execute_command-workaround-for-GUI-apps-with-weston.patch', '',
> d)}
> > > \
> > > > > >  "
> > > > > > @@ -46,10 +46,13 @@ do_install(){
> > > > > >  	sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/"
> > > > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > >  	sed -i -e
> > > > > "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/"
> > > > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > >
> > > > > > -	# Install the init script
> > > > > > -	# TODO: replace init script with systemd files
> > > > > > +	# Install the script
> > > > > >  	install -d ${D}${sysconfdir}/init.d
> > > > > >  	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > ${D}${sysconfdir}/init.d/matrix-gui-2.0
> > > > > > +
> > > > > > +	# Install the systemd unit file
> > > > > > +	install -d ${D}${systemd_system_unitdir}
> > > > > > +	install -m 0644 ${WORKDIR}/matrix-gui-2.0.service
> > > > > ${D}${systemd_system_unitdir}
> > > > > >  }
> > > > > >
> > > > > >  GUIDEPS = "matrix-gui-browser refresh-screen"
> > > > > > --
> > > > > > 1.9.1
> > > > > >
> > > > > > _______________________________________________
> > > > > > meta-arago mailing list
> > > > > > meta-arago@arago-project.org
> > > > > > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> 



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

* Re: [EXTERNAL] Re: [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service
  2018-11-20 22:43           ` Gou, Hongmei
@ 2018-11-20 22:55             ` Gou, Hongmei
  2018-11-20 23:15               ` Denys Dmytriyenko
  2018-11-20 23:14             ` Denys Dmytriyenko
  1 sibling, 1 reply; 11+ messages in thread
From: Gou, Hongmei @ 2018-11-20 22:55 UTC (permalink / raw)
  To: Dmytriyenko, Denys; +Cc: meta-arago

> -----Original Message-----
> From: meta-arago-bounces@arago-project.org [mailto:meta-arago-
> bounces@arago-project.org] On Behalf Of Gou, Hongmei
> Sent: Tuesday, November 20, 2018 5:43 PM
> To: Dmytriyenko, Denys
> Cc: meta-arago@arago-project.org
> Subject: [EXTERNAL] Re: [meta-arago] [rocko/master] [PATCH] matrix-gui:
> replace SysVinit with systemd service
> 
> > -----Original Message-----
> > From: Dmytriyenko, Denys
> > Sent: Tuesday, November 20, 2018 5:37 PM
> > To: Gou, Hongmei
> > Cc: meta-arago@arago-project.org
> > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > SysVinit with systemd service
> >
> > On Tue, Nov 20, 2018 at 05:12:52PM -0500, Gou, Hongmei wrote:
> > > > -----Original Message-----
> > > > From: Dmytriyenko, Denys
> > > > Sent: Tuesday, November 20, 2018 4:54 PM
> > > > To: Gou, Hongmei
> > > > Cc: meta-arago@arago-project.org
> > > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > > > SysVinit with systemd service
> > > >
> > > > On Tue, Nov 20, 2018 at 04:51:51PM -0500, Gou, Hongmei wrote:
> > > > > > -----Original Message-----
> > > > > > From: Dmytriyenko, Denys
> > > > > > Sent: Tuesday, November 20, 2018 4:43 PM
> > > > > > To: Gou, Hongmei
> > > > > > Cc: meta-arago@arago-project.org
> > > > > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui:
> replace
> > > > > > SysVinit with systemd service
> > > > > >
> > > > > > On Tue, Nov 20, 2018 at 04:33:55PM -0500, Hongmei Gou wrote:
> > > > > > > Signed-off-by: Hongmei Gou <a0271529@ti.com>
> > > > > > > ---
> > > > > > >  .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service | 10
> > > > ++++++++++
> > > > > > >  meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb   | 15
> > > > > > +++++++++------
> > > > > > >  2 files changed, 19 insertions(+), 6 deletions(-)
> > > > > > >  create mode 100644 meta-arago-extras/recipes-
> > core/matrix/matrix-
> > > > > > gui/matrix-gui-2.0.service
> > > > > > >
> > > > > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-
> > gui/matrix-
> > > > gui-
> > > > > > 2.0.service b/meta-arago-extras/recipes-core/matrix/matrix-
> > gui/matrix-
> > > > gui-
> > > > > > 2.0.service
> > > > > > > new file mode 100644
> > > > > > > index 0000000..3ce1024
> > > > > > > --- /dev/null
> > > > > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-
> > gui-
> > > > > > 2.0.service
> > > > > > > @@ -0,0 +1,10 @@
> > > > > > > +[Unit]
> > > > > > > +Description=Matrix GUI
> > > > > > > +After=weston.service
> > > > > > > +
> > > > > > > +[Service]
> > > > > > > +Type=forking
> > > > > > > +ExecStart=/etc/init.d/matrix-gui-2.0 start
> > > > > >
> > > > > > Looks like it's still calling a legacy initscript - any particular reason?
> > > > >
> > > > > Yes, we would like to keep the original scripts, as they are also used
> for
> > > > stopping/starting matrix GUI when running GUI based demos
> > > > (/usr/share/matrix-gui-2.0/execute_command.sh):
> > > > >
> > > > > if [ $program_type == gui ]
> > > > > then
> > > > >   /etc/init.d/matrix-gui-2.0 stop
> > > > > ..
> > > > >
> > > > > if [ $program_type == gui ]
> > > > > then
> > > > > ...
> > > > >   /etc/init.d/matrix-gui-2.0 start
> > > > > fi
> > > >
> > > > Any plans to completely moving to systemd and calling systemctl
> > start/stop?
> > >
> > > With the current patch, "systemctl start/stop matrix-gui-2.0 " can
> > > start/stop matrix successfully.
> > > execute_command.sh can be updated to use systemctl start/stop.
> > >
> > > As for /etc/init.d/matrix-gui-2.0 (attached), I am not seeing anything
> > > specific to init.
> > > We can install it to /usr/bin instead of /etc/init.d, and then modify the
> > > path in matrix-gui-2.0.service, if this is preferable.
> >
> > If you keep it in /etc/initd.d, wouldn't systemd try to automatically convert
> > it and potentially conflict with your own native unit file?
> 
> systemd is not doing the conversion automatically.

Please note that /etc/rc5.d no longer has "S97matrix-gui-2.0 -> ../init.d/matrix-gui-2.0" with the current patch.
If I understand it correctly, no automatic conversion is done for matrix-gui-2.0 because of this.

> 
> Output of "systemctl cat matrix-gui-2.0.service" with the current patch:
> [[0;1;34m# /lib/systemd/system/matrix-gui-2.0.service[[0m
> [Unit]
> Description=Matrix GUI
> After=weston.service
> 
> [Service]
> Type=forking
> ExecStart=/etc/init.d/matrix-gui-2.0 start
> 
> [Install]
> WantedBy=multi-user.target
> 
> Output of "systemctl cat matrix-gui-2.0.service" before the patch:
> [[0;1;34m# /run/systemd/generator.late/matrix-gui-2.0.service[[0m
> # Automatically generated by systemd-sysv-generator
> 
> [Unit]
> Documentation=man:systemd-sysv-generator(8)
> SourcePath=/etc/init.d/matrix-gui-2.0
> Before=multi-user.target
> Before=multi-user.target
> Before=multi-user.target
> Before=thermal-zone-init.service
> After=thttpd.service
> After=umountnfs.service
> After=rng-tools.service
> After=redis-server.service
> After=dropbear.service
> After=telnetd.service
> After=gdbserverproxy.service
> After=weston.service
> After=rc.pvr.service
> After=uim-sysfs.service
> 
> 
> [Service]
> Type=forking
> Restart=no
> TimeoutSec=5min
> IgnoreSIGPIPE=no
> KillMode=process
> GuessMainPID=no
> RemainAfterExit=yes
> ExecStart=/etc/init.d/matrix-gui-2.0 start
> ExecStop=/etc/init.d/matrix-gui-2.0 stop
> 
> >
> >
> > > > > > > +
> > > > > > > +[Install]
> > > > > > > +WantedBy=multi-user.target
> > > > > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-
> > gui_2.0.bb
> > > > > > b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > > index d8aa00b..c79f13e 100644
> > > > > > > --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > > @@ -6,14 +6,13 @@ LIC_FILES_CHKSUM =
> > > > > > "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
> > > > > > >
> > > > > > >  SECTION = "multimedia"
> > > > > > >
> > > > > > > -PR = "r35"
> > > > > > > +PR = "r36"
> > > > > > >
> > > > > > > -INITSCRIPT_NAME = "matrix-gui-2.0"
> > > > > > > -INITSCRIPT_PARAMS = "defaults 97"
> > > > > > > +SYSTEMD_SERVICE_${PN} = "matrix-gui-2.0.service"
> > > > > > >
> > > > > > >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> > > > > > >
> > > > > > > -inherit update-rc.d
> > > > > > > +inherit systemd
> > > > > > >
> > > > > > >  BRANCH ?= "master"
> > > > > > >  SRCREV = "9a2d12590102fefc5c29fc9e8d346ce6b0198468"
> > > > > > > @@ -23,6 +22,7 @@ MATRIX_INITSCRIPT =
> > > > > > "${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains
> > > > > > >  SRC_URI = "git://git.ti.com/matrix-gui-v2/matrix-gui-
> > > > > > v2.git;protocol=git;branch=${BRANCH} \
> > > > > > >             file://${MATRIX_INITSCRIPT} \
> > > > > > >             file://php.ini \
> > > > > > > +           file://matrix-gui-2.0.service \
> > > > > > >             ${@base_conditional('QT_PROVIDER', 'qt5',
> > > > > > bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'file://0001-
> > > > > > execute_command-Stop-matrix-when-running-a-GUI-demo.patch',
> > d), '',
> > > > d)}
> > > > > > \
> > > > > > >             ${@bb.utils.contains('DISTRO_FEATURES', 'wayland',
> > 'file://0001-
> > > > > > execute_command-workaround-for-GUI-apps-with-weston.patch',
> '',
> > d)}
> > > > \
> > > > > > >  "
> > > > > > > @@ -46,10 +46,13 @@ do_install(){
> > > > > > >  	sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/"
> > > > > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > > >  	sed -i -e
> > > > > >
> "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/"
> > > > > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > > >
> > > > > > > -	# Install the init script
> > > > > > > -	# TODO: replace init script with systemd files
> > > > > > > +	# Install the script
> > > > > > >  	install -d ${D}${sysconfdir}/init.d
> > > > > > >  	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > > ${D}${sysconfdir}/init.d/matrix-gui-2.0
> > > > > > > +
> > > > > > > +	# Install the systemd unit file
> > > > > > > +	install -d ${D}${systemd_system_unitdir}
> > > > > > > +	install -m 0644 ${WORKDIR}/matrix-gui-2.0.service
> > > > > > ${D}${systemd_system_unitdir}
> > > > > > >  }
> > > > > > >
> > > > > > >  GUIDEPS = "matrix-gui-browser refresh-screen"
> > > > > > > --
> > > > > > > 1.9.1
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > meta-arago mailing list
> > > > > > > meta-arago@arago-project.org
> > > > > > > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> >
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


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

* Re: [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service
  2018-11-20 22:43           ` Gou, Hongmei
  2018-11-20 22:55             ` [EXTERNAL] " Gou, Hongmei
@ 2018-11-20 23:14             ` Denys Dmytriyenko
  2018-11-21 15:19               ` Gou, Hongmei
  1 sibling, 1 reply; 11+ messages in thread
From: Denys Dmytriyenko @ 2018-11-20 23:14 UTC (permalink / raw)
  To: Gou, Hongmei; +Cc: meta-arago

On Tue, Nov 20, 2018 at 05:43:09PM -0500, Gou, Hongmei wrote:
> > -----Original Message-----
> > From: Dmytriyenko, Denys
> > Sent: Tuesday, November 20, 2018 5:37 PM
> > To: Gou, Hongmei
> > Cc: meta-arago@arago-project.org
> > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > SysVinit with systemd service
> > 
> > On Tue, Nov 20, 2018 at 05:12:52PM -0500, Gou, Hongmei wrote:
> > > > -----Original Message-----
> > > > From: Dmytriyenko, Denys
> > > > Sent: Tuesday, November 20, 2018 4:54 PM
> > > > To: Gou, Hongmei
> > > > Cc: meta-arago@arago-project.org
> > > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > > > SysVinit with systemd service
> > > >
> > > > On Tue, Nov 20, 2018 at 04:51:51PM -0500, Gou, Hongmei wrote:
> > > > > > -----Original Message-----
> > > > > > From: Dmytriyenko, Denys
> > > > > > Sent: Tuesday, November 20, 2018 4:43 PM
> > > > > > To: Gou, Hongmei
> > > > > > Cc: meta-arago@arago-project.org
> > > > > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > > > > > SysVinit with systemd service
> > > > > >
> > > > > > On Tue, Nov 20, 2018 at 04:33:55PM -0500, Hongmei Gou wrote:
> > > > > > > Signed-off-by: Hongmei Gou <a0271529@ti.com>
> > > > > > > ---
> > > > > > >  .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service | 10
> > > > ++++++++++
> > > > > > >  meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb   | 15
> > > > > > +++++++++------
> > > > > > >  2 files changed, 19 insertions(+), 6 deletions(-)
> > > > > > >  create mode 100644 meta-arago-extras/recipes-
> > core/matrix/matrix-
> > > > > > gui/matrix-gui-2.0.service
> > > > > > >
> > > > > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-
> > gui/matrix-
> > > > gui-
> > > > > > 2.0.service b/meta-arago-extras/recipes-core/matrix/matrix-
> > gui/matrix-
> > > > gui-
> > > > > > 2.0.service
> > > > > > > new file mode 100644
> > > > > > > index 0000000..3ce1024
> > > > > > > --- /dev/null
> > > > > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-
> > gui-
> > > > > > 2.0.service
> > > > > > > @@ -0,0 +1,10 @@
> > > > > > > +[Unit]
> > > > > > > +Description=Matrix GUI
> > > > > > > +After=weston.service
> > > > > > > +
> > > > > > > +[Service]
> > > > > > > +Type=forking
> > > > > > > +ExecStart=/etc/init.d/matrix-gui-2.0 start
> > > > > >
> > > > > > Looks like it's still calling a legacy initscript - any particular reason?
> > > > >
> > > > > Yes, we would like to keep the original scripts, as they are also used for
> > > > stopping/starting matrix GUI when running GUI based demos
> > > > (/usr/share/matrix-gui-2.0/execute_command.sh):
> > > > >
> > > > > if [ $program_type == gui ]
> > > > > then
> > > > >   /etc/init.d/matrix-gui-2.0 stop
> > > > > ..
> > > > >
> > > > > if [ $program_type == gui ]
> > > > > then
> > > > > ...
> > > > >   /etc/init.d/matrix-gui-2.0 start
> > > > > fi
> > > >
> > > > Any plans to completely moving to systemd and calling systemctl
> > start/stop?
> > >
> > > With the current patch, "systemctl start/stop matrix-gui-2.0 " can
> > > start/stop matrix successfully.
> > > execute_command.sh can be updated to use systemctl start/stop.
> > >
> > > As for /etc/init.d/matrix-gui-2.0 (attached), I am not seeing anything
> > > specific to init.
> > > We can install it to /usr/bin instead of /etc/init.d, and then modify the
> > > path in matrix-gui-2.0.service, if this is preferable.
> > 
> > If you keep it in /etc/initd.d, wouldn't systemd try to automatically convert
> > it and potentially conflict with your own native unit file?
> 
> systemd is not doing the conversion automatically.
> 
> Output of "systemctl cat matrix-gui-2.0.service" with the current patch:
> [[0;1;34m# /lib/systemd/system/matrix-gui-2.0.service[[0m
> [Unit]
> Description=Matrix GUI
> After=weston.service
> 
> [Service]
> Type=forking
> ExecStart=/etc/init.d/matrix-gui-2.0 start
> 
> [Install]
> WantedBy=multi-user.target
> 
> Output of "systemctl cat matrix-gui-2.0.service" before the patch:
> [[0;1;34m# /run/systemd/generator.late/matrix-gui-2.0.service[[0m

Does this file also exist with the patch?


> # Automatically generated by systemd-sysv-generator
> 
> [Unit]
> Documentation=man:systemd-sysv-generator(8)
> SourcePath=/etc/init.d/matrix-gui-2.0
> Before=multi-user.target
> Before=multi-user.target
> Before=multi-user.target
> Before=thermal-zone-init.service
> After=thttpd.service
> After=umountnfs.service
> After=rng-tools.service
> After=redis-server.service
> After=dropbear.service
> After=telnetd.service
> After=gdbserverproxy.service
> After=weston.service
> After=rc.pvr.service
> After=uim-sysfs.service
> 
> 
> [Service]
> Type=forking
> Restart=no
> TimeoutSec=5min
> IgnoreSIGPIPE=no
> KillMode=process
> GuessMainPID=no
> RemainAfterExit=yes
> ExecStart=/etc/init.d/matrix-gui-2.0 start
> ExecStop=/etc/init.d/matrix-gui-2.0 stop
> 
> > 
> > 
> > > > > > > +
> > > > > > > +[Install]
> > > > > > > +WantedBy=multi-user.target
> > > > > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-
> > gui_2.0.bb
> > > > > > b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > > index d8aa00b..c79f13e 100644
> > > > > > > --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > > @@ -6,14 +6,13 @@ LIC_FILES_CHKSUM =
> > > > > > "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
> > > > > > >
> > > > > > >  SECTION = "multimedia"
> > > > > > >
> > > > > > > -PR = "r35"
> > > > > > > +PR = "r36"
> > > > > > >
> > > > > > > -INITSCRIPT_NAME = "matrix-gui-2.0"
> > > > > > > -INITSCRIPT_PARAMS = "defaults 97"
> > > > > > > +SYSTEMD_SERVICE_${PN} = "matrix-gui-2.0.service"
> > > > > > >
> > > > > > >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> > > > > > >
> > > > > > > -inherit update-rc.d
> > > > > > > +inherit systemd
> > > > > > >
> > > > > > >  BRANCH ?= "master"
> > > > > > >  SRCREV = "9a2d12590102fefc5c29fc9e8d346ce6b0198468"
> > > > > > > @@ -23,6 +22,7 @@ MATRIX_INITSCRIPT =
> > > > > > "${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains
> > > > > > >  SRC_URI = "git://git.ti.com/matrix-gui-v2/matrix-gui-
> > > > > > v2.git;protocol=git;branch=${BRANCH} \
> > > > > > >             file://${MATRIX_INITSCRIPT} \
> > > > > > >             file://php.ini \
> > > > > > > +           file://matrix-gui-2.0.service \
> > > > > > >             ${@base_conditional('QT_PROVIDER', 'qt5',
> > > > > > bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'file://0001-
> > > > > > execute_command-Stop-matrix-when-running-a-GUI-demo.patch',
> > d), '',
> > > > d)}
> > > > > > \
> > > > > > >             ${@bb.utils.contains('DISTRO_FEATURES', 'wayland',
> > 'file://0001-
> > > > > > execute_command-workaround-for-GUI-apps-with-weston.patch', '',
> > d)}
> > > > \
> > > > > > >  "
> > > > > > > @@ -46,10 +46,13 @@ do_install(){
> > > > > > >  	sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/"
> > > > > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > > >  	sed -i -e
> > > > > > "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/"
> > > > > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > > >
> > > > > > > -	# Install the init script
> > > > > > > -	# TODO: replace init script with systemd files
> > > > > > > +	# Install the script
> > > > > > >  	install -d ${D}${sysconfdir}/init.d
> > > > > > >  	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > > ${D}${sysconfdir}/init.d/matrix-gui-2.0
> > > > > > > +
> > > > > > > +	# Install the systemd unit file
> > > > > > > +	install -d ${D}${systemd_system_unitdir}
> > > > > > > +	install -m 0644 ${WORKDIR}/matrix-gui-2.0.service
> > > > > > ${D}${systemd_system_unitdir}
> > > > > > >  }
> > > > > > >
> > > > > > >  GUIDEPS = "matrix-gui-browser refresh-screen"
> > > > > > > --
> > > > > > > 1.9.1
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > meta-arago mailing list
> > > > > > > meta-arago@arago-project.org
> > > > > > > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> > 
> 


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

* Re: [EXTERNAL] Re: [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service
  2018-11-20 22:55             ` [EXTERNAL] " Gou, Hongmei
@ 2018-11-20 23:15               ` Denys Dmytriyenko
  0 siblings, 0 replies; 11+ messages in thread
From: Denys Dmytriyenko @ 2018-11-20 23:15 UTC (permalink / raw)
  To: Gou, Hongmei; +Cc: meta-arago

On Tue, Nov 20, 2018 at 05:55:32PM -0500, Gou, Hongmei wrote:
> > -----Original Message-----
> > From: meta-arago-bounces@arago-project.org [mailto:meta-arago-
> > bounces@arago-project.org] On Behalf Of Gou, Hongmei
> > Sent: Tuesday, November 20, 2018 5:43 PM
> > To: Dmytriyenko, Denys
> > Cc: meta-arago@arago-project.org
> > Subject: [EXTERNAL] Re: [meta-arago] [rocko/master] [PATCH] matrix-gui:
> > replace SysVinit with systemd service
> > 
> > > -----Original Message-----
> > > From: Dmytriyenko, Denys
> > > Sent: Tuesday, November 20, 2018 5:37 PM
> > > To: Gou, Hongmei
> > > Cc: meta-arago@arago-project.org
> > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > > SysVinit with systemd service
> > >
> > > On Tue, Nov 20, 2018 at 05:12:52PM -0500, Gou, Hongmei wrote:
> > > > > -----Original Message-----
> > > > > From: Dmytriyenko, Denys
> > > > > Sent: Tuesday, November 20, 2018 4:54 PM
> > > > > To: Gou, Hongmei
> > > > > Cc: meta-arago@arago-project.org
> > > > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > > > > SysVinit with systemd service
> > > > >
> > > > > On Tue, Nov 20, 2018 at 04:51:51PM -0500, Gou, Hongmei wrote:
> > > > > > > -----Original Message-----
> > > > > > > From: Dmytriyenko, Denys
> > > > > > > Sent: Tuesday, November 20, 2018 4:43 PM
> > > > > > > To: Gou, Hongmei
> > > > > > > Cc: meta-arago@arago-project.org
> > > > > > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui:
> > replace
> > > > > > > SysVinit with systemd service
> > > > > > >
> > > > > > > On Tue, Nov 20, 2018 at 04:33:55PM -0500, Hongmei Gou wrote:
> > > > > > > > Signed-off-by: Hongmei Gou <a0271529@ti.com>
> > > > > > > > ---
> > > > > > > >  .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service | 10
> > > > > ++++++++++
> > > > > > > >  meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb   | 15
> > > > > > > +++++++++------
> > > > > > > >  2 files changed, 19 insertions(+), 6 deletions(-)
> > > > > > > >  create mode 100644 meta-arago-extras/recipes-
> > > core/matrix/matrix-
> > > > > > > gui/matrix-gui-2.0.service
> > > > > > > >
> > > > > > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-
> > > gui/matrix-
> > > > > gui-
> > > > > > > 2.0.service b/meta-arago-extras/recipes-core/matrix/matrix-
> > > gui/matrix-
> > > > > gui-
> > > > > > > 2.0.service
> > > > > > > > new file mode 100644
> > > > > > > > index 0000000..3ce1024
> > > > > > > > --- /dev/null
> > > > > > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/matrix-
> > > gui-
> > > > > > > 2.0.service
> > > > > > > > @@ -0,0 +1,10 @@
> > > > > > > > +[Unit]
> > > > > > > > +Description=Matrix GUI
> > > > > > > > +After=weston.service
> > > > > > > > +
> > > > > > > > +[Service]
> > > > > > > > +Type=forking
> > > > > > > > +ExecStart=/etc/init.d/matrix-gui-2.0 start
> > > > > > >
> > > > > > > Looks like it's still calling a legacy initscript - any particular reason?
> > > > > >
> > > > > > Yes, we would like to keep the original scripts, as they are also used
> > for
> > > > > stopping/starting matrix GUI when running GUI based demos
> > > > > (/usr/share/matrix-gui-2.0/execute_command.sh):
> > > > > >
> > > > > > if [ $program_type == gui ]
> > > > > > then
> > > > > >   /etc/init.d/matrix-gui-2.0 stop
> > > > > > ..
> > > > > >
> > > > > > if [ $program_type == gui ]
> > > > > > then
> > > > > > ...
> > > > > >   /etc/init.d/matrix-gui-2.0 start
> > > > > > fi
> > > > >
> > > > > Any plans to completely moving to systemd and calling systemctl
> > > start/stop?
> > > >
> > > > With the current patch, "systemctl start/stop matrix-gui-2.0 " can
> > > > start/stop matrix successfully.
> > > > execute_command.sh can be updated to use systemctl start/stop.
> > > >
> > > > As for /etc/init.d/matrix-gui-2.0 (attached), I am not seeing anything
> > > > specific to init.
> > > > We can install it to /usr/bin instead of /etc/init.d, and then modify the
> > > > path in matrix-gui-2.0.service, if this is preferable.
> > >
> > > If you keep it in /etc/initd.d, wouldn't systemd try to automatically convert
> > > it and potentially conflict with your own native unit file?
> > 
> > systemd is not doing the conversion automatically.
> 
> Please note that /etc/rc5.d no longer has "S97matrix-gui-2.0 -> ../init.d/matrix-gui-2.0" with the current patch.
> If I understand it correctly, no automatic conversion is done for matrix-gui-2.0 because of this.

Ah, good point - you removed update-rc.d


> > Output of "systemctl cat matrix-gui-2.0.service" with the current patch:
> > [[0;1;34m# /lib/systemd/system/matrix-gui-2.0.service[[0m
> > [Unit]
> > Description=Matrix GUI
> > After=weston.service
> > 
> > [Service]
> > Type=forking
> > ExecStart=/etc/init.d/matrix-gui-2.0 start
> > 
> > [Install]
> > WantedBy=multi-user.target
> > 
> > Output of "systemctl cat matrix-gui-2.0.service" before the patch:
> > [[0;1;34m# /run/systemd/generator.late/matrix-gui-2.0.service[[0m
> > # Automatically generated by systemd-sysv-generator
> > 
> > [Unit]
> > Documentation=man:systemd-sysv-generator(8)
> > SourcePath=/etc/init.d/matrix-gui-2.0
> > Before=multi-user.target
> > Before=multi-user.target
> > Before=multi-user.target
> > Before=thermal-zone-init.service
> > After=thttpd.service
> > After=umountnfs.service
> > After=rng-tools.service
> > After=redis-server.service
> > After=dropbear.service
> > After=telnetd.service
> > After=gdbserverproxy.service
> > After=weston.service
> > After=rc.pvr.service
> > After=uim-sysfs.service
> > 
> > 
> > [Service]
> > Type=forking
> > Restart=no
> > TimeoutSec=5min
> > IgnoreSIGPIPE=no
> > KillMode=process
> > GuessMainPID=no
> > RemainAfterExit=yes
> > ExecStart=/etc/init.d/matrix-gui-2.0 start
> > ExecStop=/etc/init.d/matrix-gui-2.0 stop
> > 
> > >
> > >
> > > > > > > > +
> > > > > > > > +[Install]
> > > > > > > > +WantedBy=multi-user.target
> > > > > > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-
> > > gui_2.0.bb
> > > > > > > b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > > > index d8aa00b..c79f13e 100644
> > > > > > > > --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > > > @@ -6,14 +6,13 @@ LIC_FILES_CHKSUM =
> > > > > > > "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
> > > > > > > >
> > > > > > > >  SECTION = "multimedia"
> > > > > > > >
> > > > > > > > -PR = "r35"
> > > > > > > > +PR = "r36"
> > > > > > > >
> > > > > > > > -INITSCRIPT_NAME = "matrix-gui-2.0"
> > > > > > > > -INITSCRIPT_PARAMS = "defaults 97"
> > > > > > > > +SYSTEMD_SERVICE_${PN} = "matrix-gui-2.0.service"
> > > > > > > >
> > > > > > > >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> > > > > > > >
> > > > > > > > -inherit update-rc.d
> > > > > > > > +inherit systemd
> > > > > > > >
> > > > > > > >  BRANCH ?= "master"
> > > > > > > >  SRCREV = "9a2d12590102fefc5c29fc9e8d346ce6b0198468"
> > > > > > > > @@ -23,6 +22,7 @@ MATRIX_INITSCRIPT =
> > > > > > > "${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains
> > > > > > > >  SRC_URI = "git://git.ti.com/matrix-gui-v2/matrix-gui-
> > > > > > > v2.git;protocol=git;branch=${BRANCH} \
> > > > > > > >             file://${MATRIX_INITSCRIPT} \
> > > > > > > >             file://php.ini \
> > > > > > > > +           file://matrix-gui-2.0.service \
> > > > > > > >             ${@base_conditional('QT_PROVIDER', 'qt5',
> > > > > > > bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'file://0001-
> > > > > > > execute_command-Stop-matrix-when-running-a-GUI-demo.patch',
> > > d), '',
> > > > > d)}
> > > > > > > \
> > > > > > > >             ${@bb.utils.contains('DISTRO_FEATURES', 'wayland',
> > > 'file://0001-
> > > > > > > execute_command-workaround-for-GUI-apps-with-weston.patch',
> > '',
> > > d)}
> > > > > \
> > > > > > > >  "
> > > > > > > > @@ -46,10 +46,13 @@ do_install(){
> > > > > > > >  	sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/"
> > > > > > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > > > >  	sed -i -e
> > > > > > >
> > "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/"
> > > > > > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > > > >
> > > > > > > > -	# Install the init script
> > > > > > > > -	# TODO: replace init script with systemd files
> > > > > > > > +	# Install the script
> > > > > > > >  	install -d ${D}${sysconfdir}/init.d
> > > > > > > >  	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > > > ${D}${sysconfdir}/init.d/matrix-gui-2.0
> > > > > > > > +
> > > > > > > > +	# Install the systemd unit file
> > > > > > > > +	install -d ${D}${systemd_system_unitdir}
> > > > > > > > +	install -m 0644 ${WORKDIR}/matrix-gui-2.0.service
> > > > > > > ${D}${systemd_system_unitdir}
> > > > > > > >  }
> > > > > > > >
> > > > > > > >  GUIDEPS = "matrix-gui-browser refresh-screen"
> > > > > > > > --
> > > > > > > > 1.9.1
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > meta-arago mailing list
> > > > > > > > meta-arago@arago-project.org
> > > > > > > > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> > >
> > 
> > _______________________________________________
> > meta-arago mailing list
> > meta-arago@arago-project.org
> > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


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

* Re: [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service
  2018-11-20 23:14             ` Denys Dmytriyenko
@ 2018-11-21 15:19               ` Gou, Hongmei
  0 siblings, 0 replies; 11+ messages in thread
From: Gou, Hongmei @ 2018-11-21 15:19 UTC (permalink / raw)
  To: Dmytriyenko, Denys; +Cc: meta-arago

> -----Original Message-----
> From: Dmytriyenko, Denys
> Sent: Tuesday, November 20, 2018 6:14 PM
> To: Gou, Hongmei
> Cc: meta-arago@arago-project.org
> Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> SysVinit with systemd service
> 
> On Tue, Nov 20, 2018 at 05:43:09PM -0500, Gou, Hongmei wrote:
> > > -----Original Message-----
> > > From: Dmytriyenko, Denys
> > > Sent: Tuesday, November 20, 2018 5:37 PM
> > > To: Gou, Hongmei
> > > Cc: meta-arago@arago-project.org
> > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > > SysVinit with systemd service
> > >
> > > On Tue, Nov 20, 2018 at 05:12:52PM -0500, Gou, Hongmei wrote:
> > > > > -----Original Message-----
> > > > > From: Dmytriyenko, Denys
> > > > > Sent: Tuesday, November 20, 2018 4:54 PM
> > > > > To: Gou, Hongmei
> > > > > Cc: meta-arago@arago-project.org
> > > > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui: replace
> > > > > SysVinit with systemd service
> > > > >
> > > > > On Tue, Nov 20, 2018 at 04:51:51PM -0500, Gou, Hongmei wrote:
> > > > > > > -----Original Message-----
> > > > > > > From: Dmytriyenko, Denys
> > > > > > > Sent: Tuesday, November 20, 2018 4:43 PM
> > > > > > > To: Gou, Hongmei
> > > > > > > Cc: meta-arago@arago-project.org
> > > > > > > Subject: Re: [meta-arago] [rocko/master] [PATCH] matrix-gui:
> replace
> > > > > > > SysVinit with systemd service
> > > > > > >
> > > > > > > On Tue, Nov 20, 2018 at 04:33:55PM -0500, Hongmei Gou wrote:
> > > > > > > > Signed-off-by: Hongmei Gou <a0271529@ti.com>
> > > > > > > > ---
> > > > > > > >  .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service | 10
> > > > > ++++++++++
> > > > > > > >  meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb   | 15
> > > > > > > +++++++++------
> > > > > > > >  2 files changed, 19 insertions(+), 6 deletions(-)
> > > > > > > >  create mode 100644 meta-arago-extras/recipes-
> > > core/matrix/matrix-
> > > > > > > gui/matrix-gui-2.0.service
> > > > > > > >
> > > > > > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-
> > > gui/matrix-
> > > > > gui-
> > > > > > > 2.0.service b/meta-arago-extras/recipes-core/matrix/matrix-
> > > gui/matrix-
> > > > > gui-
> > > > > > > 2.0.service
> > > > > > > > new file mode 100644
> > > > > > > > index 0000000..3ce1024
> > > > > > > > --- /dev/null
> > > > > > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-
> gui/matrix-
> > > gui-
> > > > > > > 2.0.service
> > > > > > > > @@ -0,0 +1,10 @@
> > > > > > > > +[Unit]
> > > > > > > > +Description=Matrix GUI
> > > > > > > > +After=weston.service
> > > > > > > > +
> > > > > > > > +[Service]
> > > > > > > > +Type=forking
> > > > > > > > +ExecStart=/etc/init.d/matrix-gui-2.0 start
> > > > > > >
> > > > > > > Looks like it's still calling a legacy initscript - any particular reason?
> > > > > >
> > > > > > Yes, we would like to keep the original scripts, as they are also used
> for
> > > > > stopping/starting matrix GUI when running GUI based demos
> > > > > (/usr/share/matrix-gui-2.0/execute_command.sh):
> > > > > >
> > > > > > if [ $program_type == gui ]
> > > > > > then
> > > > > >   /etc/init.d/matrix-gui-2.0 stop
> > > > > > ..
> > > > > >
> > > > > > if [ $program_type == gui ]
> > > > > > then
> > > > > > ...
> > > > > >   /etc/init.d/matrix-gui-2.0 start
> > > > > > fi
> > > > >
> > > > > Any plans to completely moving to systemd and calling systemctl
> > > start/stop?
> > > >
> > > > With the current patch, "systemctl start/stop matrix-gui-2.0 " can
> > > > start/stop matrix successfully.
> > > > execute_command.sh can be updated to use systemctl start/stop.
> > > >
> > > > As for /etc/init.d/matrix-gui-2.0 (attached), I am not seeing anything
> > > > specific to init.
> > > > We can install it to /usr/bin instead of /etc/init.d, and then modify the
> > > > path in matrix-gui-2.0.service, if this is preferable.
> > >
> > > If you keep it in /etc/initd.d, wouldn't systemd try to automatically
> convert
> > > it and potentially conflict with your own native unit file?
> >
> > systemd is not doing the conversion automatically.
> >
> > Output of "systemctl cat matrix-gui-2.0.service" with the current patch:
> > [[0;1;34m# /lib/systemd/system/matrix-gui-2.0.service[[0m
> > [Unit]
> > Description=Matrix GUI
> > After=weston.service
> >
> > [Service]
> > Type=forking
> > ExecStart=/etc/init.d/matrix-gui-2.0 start
> >
> > [Install]
> > WantedBy=multi-user.target
> >
> > Output of "systemctl cat matrix-gui-2.0.service" before the patch:
> > [[0;1;34m# /run/systemd/generator.late/matrix-gui-2.0.service[[0m
> 
> Does this file also exist with the patch?

No, /run/systemd/generator.late/matrix-gui-2.0.service does not exist with the patch.

With the information so far, would the current patch be fine to use?

> 
> 
> > # Automatically generated by systemd-sysv-generator
> >
> > [Unit]
> > Documentation=man:systemd-sysv-generator(8)
> > SourcePath=/etc/init.d/matrix-gui-2.0
> > Before=multi-user.target
> > Before=multi-user.target
> > Before=multi-user.target
> > Before=thermal-zone-init.service
> > After=thttpd.service
> > After=umountnfs.service
> > After=rng-tools.service
> > After=redis-server.service
> > After=dropbear.service
> > After=telnetd.service
> > After=gdbserverproxy.service
> > After=weston.service
> > After=rc.pvr.service
> > After=uim-sysfs.service
> >
> >
> > [Service]
> > Type=forking
> > Restart=no
> > TimeoutSec=5min
> > IgnoreSIGPIPE=no
> > KillMode=process
> > GuessMainPID=no
> > RemainAfterExit=yes
> > ExecStart=/etc/init.d/matrix-gui-2.0 start
> > ExecStop=/etc/init.d/matrix-gui-2.0 stop
> >
> > >
> > >
> > > > > > > > +
> > > > > > > > +[Install]
> > > > > > > > +WantedBy=multi-user.target
> > > > > > > > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-
> > > gui_2.0.bb
> > > > > > > b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > > > index d8aa00b..c79f13e 100644
> > > > > > > > --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > > > > > > > +++ b/meta-arago-extras/recipes-core/matrix/matrix-
> gui_2.0.bb
> > > > > > > > @@ -6,14 +6,13 @@ LIC_FILES_CHKSUM =
> > > > > > > "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
> > > > > > > >
> > > > > > > >  SECTION = "multimedia"
> > > > > > > >
> > > > > > > > -PR = "r35"
> > > > > > > > +PR = "r36"
> > > > > > > >
> > > > > > > > -INITSCRIPT_NAME = "matrix-gui-2.0"
> > > > > > > > -INITSCRIPT_PARAMS = "defaults 97"
> > > > > > > > +SYSTEMD_SERVICE_${PN} = "matrix-gui-2.0.service"
> > > > > > > >
> > > > > > > >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> > > > > > > >
> > > > > > > > -inherit update-rc.d
> > > > > > > > +inherit systemd
> > > > > > > >
> > > > > > > >  BRANCH ?= "master"
> > > > > > > >  SRCREV = "9a2d12590102fefc5c29fc9e8d346ce6b0198468"
> > > > > > > > @@ -23,6 +22,7 @@ MATRIX_INITSCRIPT =
> > > > > > > "${@base_conditional('QT_PROVIDER', 'qt5', bb.utils.contains
> > > > > > > >  SRC_URI = "git://git.ti.com/matrix-gui-v2/matrix-gui-
> > > > > > > v2.git;protocol=git;branch=${BRANCH} \
> > > > > > > >             file://${MATRIX_INITSCRIPT} \
> > > > > > > >             file://php.ini \
> > > > > > > > +           file://matrix-gui-2.0.service \
> > > > > > > >             ${@base_conditional('QT_PROVIDER', 'qt5',
> > > > > > > bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'file://0001-
> > > > > > > execute_command-Stop-matrix-when-running-a-GUI-
> demo.patch',
> > > d), '',
> > > > > d)}
> > > > > > > \
> > > > > > > >             ${@bb.utils.contains('DISTRO_FEATURES', 'wayland',
> > > 'file://0001-
> > > > > > > execute_command-workaround-for-GUI-apps-with-
> weston.patch', '',
> > > d)}
> > > > > \
> > > > > > > >  "
> > > > > > > > @@ -46,10 +46,13 @@ do_install(){
> > > > > > > >  	sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/"
> > > > > > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > > > >  	sed -i -e
> > > > > > >
> "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/"
> > > > > > > ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > > > >
> > > > > > > > -	# Install the init script
> > > > > > > > -	# TODO: replace init script with systemd files
> > > > > > > > +	# Install the script
> > > > > > > >  	install -d ${D}${sysconfdir}/init.d
> > > > > > > >  	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT}
> > > > > > > ${D}${sysconfdir}/init.d/matrix-gui-2.0
> > > > > > > > +
> > > > > > > > +	# Install the systemd unit file
> > > > > > > > +	install -d ${D}${systemd_system_unitdir}
> > > > > > > > +	install -m 0644 ${WORKDIR}/matrix-gui-2.0.service
> > > > > > > ${D}${systemd_system_unitdir}
> > > > > > > >  }
> > > > > > > >
> > > > > > > >  GUIDEPS = "matrix-gui-browser refresh-screen"
> > > > > > > > --
> > > > > > > > 1.9.1
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > meta-arago mailing list
> > > > > > > > meta-arago@arago-project.org
> > > > > > > > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> > >
> >


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

end of thread, other threads:[~2018-11-21 15:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-20 21:33 [rocko/master] [PATCH] matrix-gui: replace SysVinit with systemd service Hongmei Gou
2018-11-20 21:42 ` Denys Dmytriyenko
2018-11-20 21:51   ` Gou, Hongmei
2018-11-20 21:54     ` Denys Dmytriyenko
2018-11-20 22:12       ` Gou, Hongmei
2018-11-20 22:37         ` Denys Dmytriyenko
2018-11-20 22:43           ` Gou, Hongmei
2018-11-20 22:55             ` [EXTERNAL] " Gou, Hongmei
2018-11-20 23:15               ` Denys Dmytriyenko
2018-11-20 23:14             ` Denys Dmytriyenko
2018-11-21 15:19               ` Gou, Hongmei

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.