All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/tvheadend: change configuration directory
Date: Wed, 30 Nov 2016 23:10:53 +0100	[thread overview]
Message-ID: <20161130221053.GA3619@free.fr> (raw)
In-Reply-To: <20161128094512.27804-1-damjan.marion@gmail.com>

Damjan, All,

On 2016-11-28 10:45 +0100, Damjan Marion spake thusly:
> Currently tvheadend configuration is stored in
> /home/tvheadend/.hts/tvheadend. This patch changes this location
> to /etc/tvheadend which seems to be more appropriate place.

I disagree. This location is not only about "configuration" but also
about "state". It contains user-specified settings, recordings, DVB scan
status...

For example, accesscontrol can be updated from the WebUI to add/remopve
users or change their rights. I don't remember the full set of stuff
that gets in there, but there's almost no "configuration", but mostly
"settings" than can be updated a lot; the most ovious being records (not
the media streams, but the settings like channel, start and end times...)

Besides, /etc can be read-only, and we need a writable location. And
/etc is not a correct location to expect to be writable. /home is most
probably writable by users (although we do not provide that guarantee in
Buildroot, it is still much better than /etc).

So, it does not belong to /etc.

What was your rationale for moving it, besides "it seems more appropriate" ?

Regards,
Yann E. MORIN.

> Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
> ---
>  package/tvheadend/S99tvheadend | 4 ++--
>  package/tvheadend/tvheadend.mk | 5 +++--
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/package/tvheadend/S99tvheadend b/package/tvheadend/S99tvheadend
> index 65669ce..98167bf 100644
> --- a/package/tvheadend/S99tvheadend
> +++ b/package/tvheadend/S99tvheadend
> @@ -13,7 +13,7 @@ PIDFILE=/var/run/$NAME.pid
>  # Read configuration variable file if it is present
>  [ -r "/etc/default/${NAME}" ] && . "/etc/default/${NAME}"
>  
> -ARGS="-f"
> +ARGS="-f -c /etc/tvheadend"
>  [ -z "${TVH_USER}"      ] || ARGS="${ARGS} -u ${TVH_USER}"
>  [ -z "${TVH_GROUP}"     ] || ARGS="${ARGS} -g ${TVH_GROUP}"
>  [ -z "${TVH_ADAPTERS}"  ] || ARGS="${ARGS} -a ${TVH_ADAPTERS}"
> @@ -22,7 +22,7 @@ ARGS="-f"
>  [ "${TVH_DEBUG}" = "1"  ] && ARGS="${ARGS} -s"
>  
>  # If first run, start in wizard mode
> -if [ -z "$(ls -1 /home/tvheadend/.hts/tvheadend/accesscontrol/ 2>/dev/null)" ]; then
> +if [ -z "$(ls -1 /etc/tvheadend/accesscontrol/ 2>/dev/null)" ]; then
>      ARGS="${ARGS} -C"
>  fi
>  
> diff --git a/package/tvheadend/tvheadend.mk b/package/tvheadend/tvheadend.mk
> index a3afec8..11e56b6 100644
> --- a/package/tvheadend/tvheadend.mk
> +++ b/package/tvheadend/tvheadend.mk
> @@ -93,6 +93,7 @@ endef
>  
>  define TVHEADEND_INSTALL_TARGET_CMDS
>  	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
> +	mkdir -p $(TARGET_DIR)/etc/tvheadend
>  endef
>  
>  # Remove documentation and source files that are not needed because we
> @@ -116,10 +117,10 @@ define TVHEADEND_INSTALL_INIT_SYSV
>  endef
>  
>  define TVHEADEND_USERS
> -	tvheadend -1 tvheadend -1 * /home/tvheadend - video TVHeadend daemon
> +	tvheadend -1 tvheadend -1 * - - video TVHeadend daemon
>  endef
>  define TVHEADEND_PERMISSIONS
> -	/home/tvheadend r 0700 tvheadend tvheadend - - - - -
> +	/etc/tvheadend r 0700 tvheadend tvheadend - - - - -
>  endef
>  
>  $(eval $(generic-package))
> -- 
> 2.9.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  parent reply	other threads:[~2016-11-30 22:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28  9:45 [Buildroot] [PATCH] package/tvheadend: change configuration directory Damjan Marion
2016-11-28 20:56 ` Thomas Petazzoni
2016-11-30 22:10 ` Yann E. MORIN [this message]
2016-11-30 22:27   ` Thomas Petazzoni
2016-11-30 22:28     ` Damjan Marion
2016-11-30 22:46       ` Thomas Petazzoni
2016-11-30 22:52         ` Damjan Marion
2016-12-01  8:19           ` Thomas Petazzoni
2016-12-01  9:04             ` Damjan Marion
2016-11-30 22:27   ` Damjan Marion

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161130221053.GA3619@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.