Bug#801886: xbmc: systemd support

2015-10-16 Thread Ritesh Raj Sarraf
Control: reassign -1 kodi


Hello Felipe,

On Thu, 2015-10-15 at 13:53 -0300, Felipe Sateler wrote:
> Source: xbmc
> 
> I think this should have been kodi ?
> 

Yes. Thanks for noticing that.

> > 
> 
> > [Unit]
> > Description = Starts instance of Kodi
> 
> Please don't use spaces around the = separator. Although systemd
> currently parses that ok, dh-systemd doesn't and it is not part of
> the
> official spec so it may break in the future.
> 

Thanks

> > After = systemd-user-sessions.service network.target sound.target
> > mysqld.service
> > 
> > [Service]
> > User = kodi
> > Type = simple
> > ExecStart = /usr/bin/kodi-standalone
> 
> Does kodi-standalone signal that it is ready somehow? If it has an
> option to daemonize itself, you should use that + Type=forking
> instead.
> 

Balint will be in a better position to answer those. But on the RPi,
kodi-standalone runs on Frame Buffer. There is no X server.

kodi-standalone is just a shell script, doing some housekeeping. Here's
the main snippet on how it fires up kodi.

PS: This is just for the sake of conversation here. I don't know if the
same is used in Debian.


while [ $(( $LOOP )) = "1" ]
do
  $APP
  RET=$?
  NOW=$(date +%s)
  if [ $(( ($RET >= 64 && $RET <=66) || $RET == 0 )) = "1" ]; then #
clean exit
LOOP=0
  else # crash
DIFF=$((NOW-LASTSUCCESSFULSTART))
if [ $(($DIFF > 60 )) = "1" ]; then # Not on startup, ignore
  LASTSUCESSFULSTART=$NOW
  CRASHCOUNT=0
else # at startup, look sharp
  CRASHCOUNT=$((CRASHCOUNT+1))
  if [ $(($CRASHCOUNT >= 3)) = "1" ]; then # Too many, bail out
LOOP=0
echo "${APP} has exited uncleanly 3 times in the last ${DIFF}
seconds."
echo "Something is probably wrong"
  fi
fi
  fi
done



-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System


signature.asc
Description: This is a digitally signed message part
___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Processed: Re: Bug#801886: xbmc: systemd support

2015-10-16 Thread Debian Bug Tracking System
Processing control commands:

> reassign -1 kodi
Bug #801886 [src:xbmc] xbmc: systemd support
Bug reassigned from package 'src:xbmc' to 'kodi'.
Ignoring request to alter found versions of bug #801886 to the same values 
previously set
Ignoring request to alter fixed versions of bug #801886 to the same values 
previously set

-- 
801886: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801886
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#801886: xbmc: systemd support

2015-10-15 Thread Felipe Sateler
Control: user pkg-systemd-maintain...@lists.alioth.debian.org
Control: usertags -1 systemd-units

Hi Ritesh

On 15 October 2015 at 13:38, Ritesh Raj Sarraf  wrote:
> Source: xbmc

I think this should have been kodi ?

> Severity: wishlist
>
> Hello Balint,
>
> As much as I wished to move back to Debian with my RPi 2, I
> unfortunately cannot because the graphics driver is not well free.
>
> Until then, I'll send you patches. Attached is my small adaptation of
> systemd .service to work on my Raspbian Jessie image.



> [Unit]
> Description = Starts instance of Kodi

Please don't use spaces around the = separator. Although systemd
currently parses that ok, dh-systemd doesn't and it is not part of the
official spec so it may break in the future.

> After = systemd-user-sessions.service network.target sound.target 
> mysqld.service
>
> [Service]
> User = kodi
> Type = simple
> ExecStart = /usr/bin/kodi-standalone

Does kodi-standalone signal that it is ready somehow? If it has an
option to daemonize itself, you should use that + Type=forking
instead.

> Restart = on-abort
>
> [Install]
> WantedBy = multi-user.target



-- 

Saludos,
Felipe Sateler

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#801886: xbmc: systemd support

2015-10-15 Thread Ritesh Raj Sarraf
Source: xbmc
Severity: wishlist

Hello Balint,

As much as I wished to move back to Debian with my RPi 2, I
unfortunately cannot because the graphics driver is not well free.

Until then, I'll send you patches. Attached is my small adaptation of
systemd .service to work on my Raspbian Jessie image.

On RPi, the X is not run. So you may have to adapt it to be more
generic.


@Michael Gorven: Thank you for maintaining XBMC for RPi. I use your
build. Since with Jessie, we have systemd, perhaps you may want to add
support for it. BTW, I did not really have to do all the stuff you've
done in the SysV init script. The systemd .service is very simple and
basic, and it works perfect.


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.2.3+ (SMP w/4 CPU cores)
Locale: LANG=en_IN.utf8, LC_CTYPE=en_IN.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
[Unit]
Description = Starts instance of Kodi
After = systemd-user-sessions.service network.target sound.target mysqld.service

[Service]
User = kodi
Type = simple
ExecStart = /usr/bin/kodi-standalone
Restart = on-abort

[Install]
WantedBy = multi-user.target
___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers