Hi Reinhard,

On Sat, Nov 05, 2011 at 11:15:54AM +0100, Reinhard Tartler wrote:
> On Sa, Nov 05, 2011 at 10:34:49 (CET), jet-gu...@users.alioth.debian.org 
> wrote:
> 
> > The following commit has been merged in the master branch:
> > commit a91aeff97b9c3a8e543a3f738bd52e0f952861ed
> > Author: Andriy Beregovenko <j...@jet.kiev.ua>
> > Date:   Sat Nov 5 11:34:37 2011 +0200
> >
> >     Add portinstall script for crtmpserver-apps package
> >
> > diff --git a/debian/crtmpserver-apps.postinst 
> > b/debian/crtmpserver-apps.postinst
> > new file mode 100644
> > index 0000000..1c6507d
> > --- /dev/null
> > +++ b/debian/crtmpserver-apps.postinst
> > @@ -0,0 +1,36 @@
> > +#!/bin/sh
> > +
> > +set -e
> > +
> > +APPLICATIONS="admin applestreamingclient appselector flvplayback 
> > proxypublish samplefactory stresstest vptests"
> > +APPCONFPATH="/etc/crtmpserver/applications"
> > +
> > +
> > +case "$1" in
> > +   configure)
> > +           # Copy application config if not exists
> > +           for app in "$APPLICATIONS"; do
> > +                   if [ ! -f /etc/crtmpserver/applications/${app}.lua ]
> > +                   then
> > +                           cp 
> > /etc/crtmpserver/applications/${app}.lua.sample \
> > +                                   /etc/crtmpserver/applications/${app}.lua
> > +                           chmod 644 
> > /etc/crtmpserver/applications/${app}.lua
> > +                   fi
> > +           done
> 
> Why this copying around? This looks pretty confusing and surprising to
> the user. I guess you want to have a reference copy around on the
> system, which is a valid concern. However, since we are working on the
> 'official' debian packages, I think we should do this consinstently with
> other packages in debian. 
Thank you for answer to must questions. I was going to ask this. :)

> So, this is what I propose:
> 
> - Install the references in /usr/share/doc/crtmpserver/examples. This
>   can be done elegenatly using dh_installexamples(1) in debian/rules.
I think crtmpserver-apps.examples is enough.
>
> - Install a copy of that sample files in 
> /etc/crtmpserver/applications/{app}.whatever.
>
> - remove this postinst script.
This is main question. How I can copy/install working scripts if not use
postinst ? Most of theese scripts must and will be modified in future by user.
 
> - Rely on dpkg conffile mechanism to track user changes.
I do not think that it so smart to track changes in LUA script.
"We can safely expect that every user *will* definitly want to edit and
adjust the contents. This also means that dpkg *will* prompt on every 
package upgrade that changes anything in the file." - Your word about(april
2011 :))
 
> 
> > +           # copy users sample file if not exists
> > +           if [ ! -f /etc/crtmpserver/conf.d/users.lua ]
> > +           then
> > +                   cp /etc/crtmpserver/conf.d/users.lua.sample \
> > +                           /etc/crtmpserver/conf.d/users.lua
> > +                   chmod 640 /etc/crtmpserver/conf.d/users.lua
> > +           fi
> 
> dito.

So mostly I wanna to know what way is properly for such type of situation.
 
> Cheers,
> Reinhard.
> -- 
> Gruesse/greetings,
> Reinhard Tartler, KeyID 945348A4
> 
> _______________________________________________
> pkg-multimedia-maintainers mailing list
> pkg-multimedia-maintainers@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

-- 
Best regards,
Andriy
0xBDDBDAE3

Attachment: signature.asc
Description: Digital signature

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

Reply via email to