All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-arago][kirkstone][PATCH] matrix-gui: move script from /etc/init.d to data dir.
@ 2023-10-22 13:09 Sai Sree Kartheek Adivi
  2023-10-23 18:09 ` Denys Dmytriyenko
  0 siblings, 1 reply; 3+ messages in thread
From: Sai Sree Kartheek Adivi @ 2023-10-22 13:09 UTC (permalink / raw)
  To: meta-arago, praneeth, denis, reatmon, c-shilwant, a-limaye
  Cc: g-gupta, khasim, p-bhagat

since sysvinit is deprecated, avoid installing scripts in sysvinit.
Use data dir to install scripts which need to be called by the systemd services.

Signed-off-by: Sai Sree Kartheek Adivi <s-adivi@ti.com>
---
 .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service      | 2 +-
 meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb         | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service b/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
index 40a8f0f9..84e9195b 100644
--- a/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
+++ b/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
@@ -12,7 +12,7 @@ IgnoreSIGPIPE=no
 KillMode=process
 GuessMainPID=no
 RemainAfterExit=yes
-ExecStart=/etc/init.d/matrix-gui-2.0 start
+ExecStart=/usr/share/matrix-gui-2.0/matrix-gui-2.0 start
 
 [Install]
 WantedBy=multi-user.target
diff --git a/meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb b/meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb
index 9299a929..18ccc0c9 100644
--- a/meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb
+++ b/meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb
@@ -50,8 +50,7 @@ do_install(){
 	sed -i -e "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/" ${WORKDIR}/${MATRIX_INITSCRIPT}
 
 	# Install the script
-	install -d ${D}${sysconfdir}/init.d
-	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT} ${D}${sysconfdir}/init.d/matrix-gui-2.0
+	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT} ${D}${MATRIX_BASE_DIR}/matrix-gui-2.0
 
 	# Install the systemd unit file
 	install -d ${D}${systemd_system_unitdir}
-- 
2.34.1



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

* Re: [meta-arago][kirkstone][PATCH] matrix-gui: move script from /etc/init.d to data dir.
  2023-10-22 13:09 [meta-arago][kirkstone][PATCH] matrix-gui: move script from /etc/init.d to data dir Sai Sree Kartheek Adivi
@ 2023-10-23 18:09 ` Denys Dmytriyenko
  2023-10-23 19:36   ` Jon Cormier
  0 siblings, 1 reply; 3+ messages in thread
From: Denys Dmytriyenko @ 2023-10-23 18:09 UTC (permalink / raw)
  To: Sai Sree Kartheek Adivi
  Cc: meta-arago, praneeth, reatmon, c-shilwant, a-limaye, g-gupta,
	khasim, p-bhagat

On Sun, Oct 22, 2023 at 06:39:05PM +0530, Sai Sree Kartheek Adivi wrote:
> since sysvinit is deprecated, avoid installing scripts in sysvinit.
> Use data dir to install scripts which need to be called by the systemd services.

Well, sysvinit is not deprecated - it's still an option. With this change 
nobody would be able to use Matrix with sysvinit-enabled distro anymore?

A better approach would be to have a dedicated and independent systemd unit 
file that doesn't call the sysvinit counterpart. And then make the install 
steps below conditional on INIT_MANAGER variable or corresponding flag in the 
DISTRO_FEATURES lsit...


> Signed-off-by: Sai Sree Kartheek Adivi <s-adivi@ti.com>
> ---
>  .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service      | 2 +-
>  meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb         | 3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service b/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
> index 40a8f0f9..84e9195b 100644
> --- a/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
> +++ b/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
> @@ -12,7 +12,7 @@ IgnoreSIGPIPE=no
>  KillMode=process
>  GuessMainPID=no
>  RemainAfterExit=yes
> -ExecStart=/etc/init.d/matrix-gui-2.0 start
> +ExecStart=/usr/share/matrix-gui-2.0/matrix-gui-2.0 start
>  
>  [Install]
>  WantedBy=multi-user.target
> diff --git a/meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb b/meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb
> index 9299a929..18ccc0c9 100644
> --- a/meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb
> +++ b/meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb
> @@ -50,8 +50,7 @@ do_install(){
>  	sed -i -e "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/" ${WORKDIR}/${MATRIX_INITSCRIPT}
>  
>  	# Install the script
> -	install -d ${D}${sysconfdir}/init.d
> -	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT} ${D}${sysconfdir}/init.d/matrix-gui-2.0
> +	install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT} ${D}${MATRIX_BASE_DIR}/matrix-gui-2.0
>  
>  	# Install the systemd unit file
>  	install -d ${D}${systemd_system_unitdir}
> -- 
> 2.34.1
> 


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

* Re: [meta-arago][kirkstone][PATCH] matrix-gui: move script from /etc/init.d to data dir.
  2023-10-23 18:09 ` Denys Dmytriyenko
@ 2023-10-23 19:36   ` Jon Cormier
  0 siblings, 0 replies; 3+ messages in thread
From: Jon Cormier @ 2023-10-23 19:36 UTC (permalink / raw)
  To: Denys Dmytriyenko
  Cc: Sai Sree Kartheek Adivi, meta-arago, praneeth, reatmon,
	c-shilwant, a-limaye, g-gupta, khasim, p-bhagat

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

On Mon, Oct 23, 2023 at 2:10 PM Denys Dmytriyenko <denis@denix.org> wrote:

> On Sun, Oct 22, 2023 at 06:39:05PM +0530, Sai Sree Kartheek Adivi wrote:
> > since sysvinit is deprecated, avoid installing scripts in sysvinit.
> > Use data dir to install scripts which need to be called by the systemd
> services.
>
> Well, sysvinit is not deprecated - it's still an option. With this change
> nobody would be able to use Matrix with sysvinit-enabled distro anymore?
>
> A better approach would be to have a dedicated and independent systemd
> unit
> file that doesn't call the sysvinit counterpart. And then make the install
> steps below conditional on INIT_MANAGER variable or corresponding flag in
> the
> DISTRO_FEATURES lsit...
>
Agreed.

Also while you're working on the systemd service file.  It needs to depend
on lighttpd.service, otherwise it's possible for the matrix browser to
launch before the webserver is ready, and you get a 404.
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1246859/am3358-sdk-08_02_00_24-matrix-gui-2-0-service-loads-with-a-404-error

>
>
> > Signed-off-by: Sai Sree Kartheek Adivi <s-adivi@ti.com>
> > ---
> >  .../recipes-core/matrix/matrix-gui/matrix-gui-2.0.service      | 2 +-
> >  meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb         | 3 +--
> >  2 files changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git
> a/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
> b/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
> > index 40a8f0f9..84e9195b 100644
> > ---
> a/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
> > +++
> b/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service
> > @@ -12,7 +12,7 @@ IgnoreSIGPIPE=no
> >  KillMode=process
> >  GuessMainPID=no
> >  RemainAfterExit=yes
> > -ExecStart=/etc/init.d/matrix-gui-2.0 start
> > +ExecStart=/usr/share/matrix-gui-2.0/matrix-gui-2.0 start
> >
> >  [Install]
> >  WantedBy=multi-user.target
> > diff --git a/meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb
> b/meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb
> > index 9299a929..18ccc0c9 100644
> > --- a/meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb
> > +++ b/meta-arago-demos/recipes-core/matrix/matrix-gui_2.0.bb
> > @@ -50,8 +50,7 @@ do_install(){
> >       sed -i -e "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/"
> ${WORKDIR}/${MATRIX_INITSCRIPT}
> >
> >       # Install the script
> > -     install -d ${D}${sysconfdir}/init.d
> > -     install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT}
> ${D}${sysconfdir}/init.d/matrix-gui-2.0
> > +     install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT}
> ${D}${MATRIX_BASE_DIR}/matrix-gui-2.0
> >
> >       # Install the systemd unit file
> >       install -d ${D}${systemd_system_unitdir}
> > --
> > 2.34.1
> >
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#14967):
> https://lists.yoctoproject.org/g/meta-arago/message/14967
> Mute This Topic: https://lists.yoctoproject.org/mt/102115715/7902621
> Group Owner: meta-arago+owner@lists.yoctoproject.org
> Unsubscribe:
> https://lists.yoctoproject.org/g/meta-arago/leave/12684784/7902621/525442147/xyzzy
> [jcormier@criticallink.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
>

-- 
Jonathan Cormier
Software Engineer

Voice:  315.425.4045 x222



http://www.CriticalLink.com <http://www.criticallink.com/>
6712 Brooklawn Parkway, Syracuse, NY 13211

<https://www.linkedin.com/company/critical-link-llc>
<https://twitter.com/Critical_Link>

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

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

end of thread, other threads:[~2023-10-23 19:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-22 13:09 [meta-arago][kirkstone][PATCH] matrix-gui: move script from /etc/init.d to data dir Sai Sree Kartheek Adivi
2023-10-23 18:09 ` Denys Dmytriyenko
2023-10-23 19:36   ` Jon Cormier

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.