← Back to team overview

mythbuntu-bugs team mailing list archive

Re: [Bug 708643] Re: /etc/init/mythtv-backend needs to source /etc/default/mythtv-backend

 

On Thu, 2011-01-27 at 17:40 +0000, Mario Limonciello wrote: 
> 
> The change was made because people were mistakingly making changes in
> /etc/default/mythtv-backend that they would have expected to be benign and
> having a difficult time debugging it.

So the answer to people messing around where they should not be is to
disallow those that know what they are doing and need the file from
having it?  That sounds like the baby going out with the bathwater.

> Upstart jobs are quite simple,
> there's no need to add that complexity when the upstart job is the only
> thing sourcing the file.

Yes, that's true, but the goal should be upgrades which don't require
any interaction and merging files is the worst of interaction.

> The reason that files were placed in /etc/default
> in the first place is two fold:
> 
> 1) Administrators have difficult merging local changes to complex init
> scripts with those in packaging updates
> This is not the case with the mythtv job anymore.
> 
> 2) Multiple files need to source files from /etc/default.
> No other application or file needs to source this file.

3) Provide a place where site local environment changes can be made to
avoid making changes to files that will need merging on upgrades.

> Well that doesn't make much sense.  The last change was in November.
> 
> ------------------------------------------------------------
> revno: 373
> fixes bug(s): https://launchpad.net/bugs/542627
> committer: Mario Limonciello
> branch nick: mythtv-fixes
> timestamp: Wed 2010-11-24 16:29:46 -0600
> message:
>   Stop on runlevels [016] rather than on the start of shutdown job. (LP:
> #542627)

Yup, that difference was there in addition to my
". /etc/default/mythtv-backend".  And yes, before you chastise me for
not having upgraded since the end of November: "if it ain't broke, don't
fix it".

The moral of the story is that for people who do stretch out their
upgrades so as not to introduce instability where there is currently
none, they are more likely going to have to merge on every upgrade.
This counts for people who may never upgrade except from one Ubuntu
release to another.  Every upgrade will include /etc/init/ merges --
that would be unnecessary if /etc/default/ were used.

I want to point out at this point that on my current Maverick
workstation, 18 scripts in /etc/init are using /etc/default.  So it's
nowhere near a standard that users are expected to maintain their
environmental differences in the upstart scripts directly.  IMHO, 18
other packages are doing it right and mythtv-backend is doing it wrong.

> Not when you consider how many people may have that file sitting around with
> local changes to it that cause problems.  You're not allowed to remove it in
> a maintainer script if someone has made local changes, making the problem
> worse.

No, I would certainly not advocate *removing* it.  Displaying a warning
about it or renaming it, etc. seem like more reasonable alternatives.

It seems like (some subset of, at least) 18 other packages seemed to
manage maintaining /etc/default/* files across the transition from
sysvinit to upstart.  I wonder why they didn't run into the kinds of
problems you say Mythbuntu has run into.

-- 
You received this bug notification because you are a member of Mythbuntu
Bug Team, which is subscribed to Mythbuntu.
https://bugs.launchpad.net/bugs/708643

Title:
  /etc/init/mythtv-backend needs to source /etc/default/mythtv-backend

Status in Mythbuntu, Ubuntu derivative focused upon MythTV:
  Won't Fix

Bug description:
  I thought I had reported this once before but I could not find any
  sign of it.  Perhaps I just discussed it in IRC or something.

  In any case, the backend initscript needs to source /etc/default
  /mythtv-backend as it did previously when it was an /etc/init.d/
  initscript.

  The reason is that some people might need to set some environment that
  will affect the backend process, such as, for example:

  # need to set the proxy for mythfilldatabase
  export http_proxy=http://proxy:3128/

  It's a simple one line change:

  --- /etc/init/mythtv-backend.conf.new	2010-12-30 19:00:10.000000000 -0500
  +++ /etc/init/mythtv-backend.conf	2010-11-17 07:29:58.000000000 -0500
  @@ -19,6 +19,7 @@
   end script
   
   script
  +	. /etc/default/mythtv-backend
   	test -f /etc/default/locale && . /etc/default/locale || true
   	LANG=$LANG /usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log --user mythtv
   end script

  In the case of people who have no need for it, the above change is
  benign, but for people who do need it, it's very useful, so there
  really should be no reason to resist it.





References