[SCM] crtmpserver/master: Add postrm script for crtmpserver-apps.

Jonas Smedegaard dr at jones.dk
Tue Apr 24 13:23:56 UTC 2012


On 12-04-24 at 10:17am, Andriy Beregovenko wrote:
> Hi Jonas,
> 
> On Tue, Apr 24, 2012 at 02:40:22AM -0400, Jonas Smedegaard wrote:
> > On 12-04-24 at 08:53am, Andriy Beregovenko wrote:
> > > Hi Alessio,
> > > 
> > > On Tue, Apr 24, 2012 at 02:06:43AM +0200, Alessio Treglia wrote:
> > > > This doesn't look sane to me:
> > > > 
> > > > On Sat, Apr 14, 2012 at 9:45 PM,  <jet-guest at users.alioth.debian.org> wrote:
> > > > > +do_remove() {
> > > > > +       for app in $APPLICATIONS; do
> > > > > +               if [ -f "/etc/crtmpserver/applications/$app.lua" ]; then
> > > > > +                       compare "/etc/crtmpserver/applications/$app.lua" \
> > > > > +                               "/usr/share/doc/crtmpserver-apps/examples/$app.lua" \
> > > > > +                               && rm "/etc/crtmpserver/applications/$app.lua"
> > > > 
> > > > Why do you try to remove those files?
> > > > The crtmpserver-apps package seems to own no conffiles.
> > > This files are not managed by conffile, so I check if it is same as default,
> > > and if yes - remove it(if no user changes in it)
> > > 
> > > > 
> > > > > +               fi
> > > > > +       done
> > > > > +       rmdir /etc/crtmpserver/applications
> > > > 
> > > > This is Severity: grave as it means removing user's files and may potentially
> > > > cause data loss!
> > > This may not lead to data loss, because rmdir(w/o -f) actually do not remove dir
> > > if there are files inside, so this command remove dir only if it is empty 
> > > (i.e. user do not modificate any conf files and it was removed during prev
> > > steps)
> > > 
> > > > If you really want to provide crtmpserver-apps with conffiles, you 
> > > > should install them clean way (e.g. dh_install) and then manage 
> > > > their removal with dpkg-maintscript-helper.
> > 
> > If you really really need to do it this odd way (I too recommend to 
> > simply use conffiles) then beware that you must not rely on files below 
> > /usr/share/doc but need to install the reference files somewhere else.
> 
> Ok, let me describe my point, maybe I have misunderstood somewhere.
> Files that need for server to be usable is installed with package
> crtmpserver. Lua scripts that is installed with package crtmpserver-apps
> mostly is example scripts and it provides "default solution" that can done
> basic needs(so user will not modify them and if it purge app - it will be
> removed), but users who need to implement advanced configuration will
> modify this scripts harder, and in this way I do not think that annoing user
> with conffiles notifications is good idea. That is why i'm just copy
> "example scripts" from /usr/share/doc and maintaine "remove/purge" action
> manually.
> 
> Please correct me if I wrong.

Either the files are *only* provided as examples or they are handled by 
the packaging scripts.

If only example files, then they are not owned by the package and should 
not be handled by the package.

If handled by the package - no matter how rarely - they must not be 
located below /usr/share/doc/.

Conffiles except for special cases where you need some complex 
maintenance routines. If conffile notifications occur without a sane 
reason, then something else is wrong with your packaging!

Please carefully reas Debian Policy §10.7.3 and §12.3.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20120424/b14a2271/attachment.pgp>


More information about the pkg-multimedia-maintainers mailing list