www.cendio.com

Bug 5594

Summary: install_initd broken on debian
Product: ThinLinc Reporter: Pierre Ossman <ossman@cendio.se>
Component: Server OSAssignee: Peter Åstrand <astrand@cendio.se>
Status: ASSIGNED QA Contact: Bugzilla mail exporter <bugzilla-qa@cendio.se>
Severity: Normal    
Priority: P2 CC: harty@ironwolve.com, hean01@cendio.se
Version: pre-1.0Keywords: upstream
Target Milestone: MediumPrio   
Hardware: PC   
OS: Unknown   
Acceptance Criteria:

Description From cendio 2015-07-14 11:20:21
Continuation of bug 5162.

The bug is still present on Debian 8 (and later?) as far as we know. The
upstream bug is closed and there is no note of the bug still being present in
later versions of debian, despite this vague comment on our previous bug:

(In reply to comment #7)
> > If you have further comments please address them to 743903@bugs.debian.org,
> > and the maintainer will reopen the bug report if appropriate.
> 
> Done.

We need to make sure Debian is aware of this and fixes is so that ThinLinc can
work without people having to read our platform specific notes and apply manual
hacks.
------- Comment #1 From cendio 2015-12-22 08:39:58 -------
*** Bug 5761 has been marked as a duplicate of this bug. ***
------- Comment #2 From cendio 2015-12-22 08:43:34 -------
(In reply to comment #0)
> We need to make sure Debian is aware of this and fixes is so that ThinLinc can
> work without people having to read our platform specific notes and apply manual
> hacks.

In the mean time, here's a link to a workaround, documented in our Platform
Specific Notes.

 https://www.cendio.com/thinlinc/docs/platforms/ubuntu
------- Comment #3 From cendio 2015-12-22 08:44:53 -------
This is the error you'll see in tlsetup.log when you've encountered this
problem:

> 2015-12-21 14:15:58,862: Output (stderr):
> 2015-12-21 14:15:58,862:     Traceback (most recent call last):
> 2015-12-21 14:15:58,862:       File "/usr/lib/lsb/install_initd", line 46, in <module>
> 2015-12-21 14:15:58,862:         headers = initdutils.scan_initfile(initfile)
> 2015-12-21 14:15:58,862:       File "/usr/lib/lsb/initdutils.py", line 79, in scan_initfile
> 2015-12-21 14:15:58,862:         inheaders = RFC822Parser(strob=headerlines)
> 2015-12-21 14:15:58,862:       File "/usr/lib/lsb/initdutils.py", line 24, in __init__
> 2015-12-21 14:15:58,862:         fileob = StringIO(strob)
> 2015-12-21 14:15:58,862:     TypeError: initial_value must be unicode or None, not str
> 2015-12-21 14:15:58,862: Failed to install service 'vsmserver'
> 2015-12-21 14:16:13,081: tl-setup aborted by user
------- Comment #4 From cendio 2016-01-28 13:19:06 -------
Verified that problem still exists on Debian 8 with all updates installed:

# /usr/lib/lsb/install_initd /etc/init.d/cups
Traceback (most recent call last):
  File "/usr/lib/lsb/install_initd", line 46, in <module>
    headers = initdutils.scan_initfile(initfile)
  File "/usr/lib/lsb/initdutils.py", line 79, in scan_initfile
    inheaders = RFC822Parser(strob=headerlines)
  File "/usr/lib/lsb/initdutils.py", line 24, in __init__
    fileob = StringIO(strob)
TypeError: initial_value must be unicode or None, not str

Sent an email to 743903@bugs.debian.org in order to reopen this bug.
------- Comment #5 From cendio 2016-02-01 10:31:04 -------
Works with warnings on Ubuntu 15.10:

# /usr/lib/lsb/install_initd /etc/init.d/cups
Missing should-start facility avahi-daemon (ignored)
Missing should-start facility slapd (ignored)
Missing should-start facility nslcd (ignored)
/etc/init.d/cups: $syslog $remote_fs <_io.TextIOWrapper
name='/var/lib/lsb/depends' mode='w' encoding='UTF-8'>
update-rc.d: warning: start and stop actions are no longer supported; falling
back to defaults

Note that Debian and Ubuntu runs very different versions:

Debian:
lsb-core 4.1+Debian13+nmu1 
install_initd uses Python2. 

Ubuntu 15.10:
lsb-core 4.1+Debian11ubuntu8
install_initd used Python3.
------- Comment #6 From cendio 2016-02-01 11:23:23 -------
Ubuntu 15.04 works:

# /usr/lib/lsb/install_initd /etc/init.d/cups
Missing should-start facility avahi-daemon (ignored)
Missing should-start facility slapd (ignored)
Missing should-start facility nslcd (ignored)
/etc/init.d/cups: $syslog $remote_fs <_io.TextIOWrapper
name='/var/lib/lsb/depends' mode='w' encoding='UTF-8'>
update-rc.d: warning: start and stop actions are no longer supported; falling
back to defaults

lsb-core 4.1+Debian11ubuntu8


Ubuntu 14.10:
Unable to test, since the repositories are gone. No longer supported. 


Ubuntu 14.04 LTS works:

# /usr/lib/lsb/install_initd /etc/init.d/cups
Missing should-start facility avahi-daemon (ignored)
Missing should-start facility slapd (ignored)
Missing should-start facility nslcd (ignored)
/etc/init.d/cups: $syslog $remote_fs <_io.TextIOWrapper
name='/var/lib/lsb/depends' mode='w' encoding='UTF-8'>
 Adding system startup for /etc/init.d/cups ...
   /etc/rc1.d/K19cups -> ../init.d/cups
   /etc/rc2.d/S20cups -> ../init.d/cups
   /etc/rc3.d/S20cups -> ../init.d/cups
   /etc/rc4.d/S20cups -> ../init.d/cups
   /etc/rc5.d/S20cups -> ../init.d/cups

lsb-core 4.1+Debian11ubuntu6

My conclusion is that Ubuntu is fine.
------- Comment #7 From cendio 2016-02-01 12:37:21 -------
The upstream bug report:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743903

...is open now. That's all for now.
------- Comment #8 From cendio 2016-02-01 14:46:25 -------
Looks good. Noteworthy is also that they've made a more proper attempt at
switching to Python 3 in testing and unstable. Hopefully that means at least
future versions of Debian will work.