[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: tar files in example dirs



> > But for example in nfsroot, I've got an example of how to setup
> > a printerserver. This pringerserver needs some ten files to
> > setup (samba etc). These files all need to go into /etc, of cource.
> > 
> > Now, the problem with me putting all those files in /etc is that:
> >   - they need to go into /etc/nfsroot/$IPNUMBER/
> >     and I don't know the $IPNUMBER of the clients the user is going
> >     to create.
> >   - I assume most people don't want to make printerservers.
> >     If I were to put those files in, say, /etc/nfsroot/default, then
> >     every client will by default have that setup. This is not ideal.
> > So, I have to put those files in /usr/doc/examples.
> 
> Well, firstly let me repeat that I wasn't talking about your example (I
> hear this for the first time), but about tarballs containing example
> files for user's info).
> Your problem: I could think of several approaches (not very well
> studied):
>  - put files in /usr/lib/<package>, create a /usr/sbin script that
>    asks for a $IPNUMBER and let the admin use it to create the /etc
>    thing.
>  - make a question in the postinst and do the thing at installation
>    time (not my preferred solution)
>  - create a saparate binary package depending on the main package,
>    maybe call it "printserver", mainly to build the /etc thing. This
>    package could use both the methods above, and maybe also check
>    some /etc file or env var looking for the value during
>    installation/upgrade (to avoid the question in postinst if the
>    user supplied value is available). I don't know if there is a way
>    to register the new files as conffiles during postinst (that would
>    be the best thing IMHO).

All of those are possible, but I'd say much less clean than just including
the files in /usr/doc. First of all, putting them in /usr/lib seems just
wrong, as the files _are_ examples of how to do things, and they will
actually never be used from /usr/lib. (I'd say anything in /usr/lib has
to be actaully used by programmes running).
Adding extra makefiles/postinst prompts/packages is way too much work.


> 
> But I was under the impression that you should be able to _navigate_
> /usr/doc using less or some other simple "reading" tool like lynx or
> cat, and tar isn't exactly a reading tool, mostly for a newbie.

Nfsroot isn't at all for ordinary users, it's only for admins. So,
I don't mind if ordinary (non-tar-aware) users cannot read the
example files from nfsroot: they'll have to become "unix-aware" first
anyway.


And yes, I realise you were talking about real documentation in
/usr/doc/*/*.tar.gz. Now, that's something different, and maybe
the maintainers should think again about those tarfiles. But
on the bases of those "doc.tar.gz" files you wanted policy to be changed
to the effect of not allowing .tar.gz in /usr/doc. That I think is wrong.


-- 
joost witteveen, joostje@debian.org
#!/usr/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
#what's this? see http://www.dcs.ex.ac.uk/~aba/rsa/


Reply to: