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

Re: A couple of questions



If you want a non-conffile configuration file, then you must not
provide the file in the package.  Instead, create the file at install
time (not compile time) with the maintainer scripts (postinst
usually).  If its a complicated file, store a template in
/usr/share/pkgnamehere/...
Justin

On Sun, Apr 03, 2005 at 09:16:05AM +0300, Shachar Shemesh wrote:
> Florent Rougon wrote:
> 
> >Shachar Shemesh <debian@shemesh.biz> wrote:
> > 
> >
> >>two questions:
> >>1. My package has a password file. Where is the best place to store it?
> >>/etc/name/password? /var/lib/name/password?
> >>   
> >>
> >
> >If the password file is a system configuration file (i.e., a file that
> >can be customized by the admin to modify the behavior of the program),
> >it belongs to /etc. Otherwise, it should be placed elsewhere. See the
> >FHS.
> > 
> >
> Well, you would need a helper program to actually change it, as the 
> password is encrypted. Otherwise, yes it's a configuration file.
> 
> >>2. I have placed some file names into debian/conffiles. It seems, however,
> >>that all files under /etc are logically added to it as well.
> >>   
> >>
> >This is a feature of dh_installdeb in debhelper compatibility levels 3
> >and above. cf. debhelper(1).
> > 
> >
> Saw it. Thanks.
> 
> >>Files under /etc
> >>that I explicitly list as conffiles are listed twice on
> >>/var/lib/dpkg/info/name.conffiles after installation. This is not good,
> >>especially if option #1 above is taken. Can anyone explain why/how to 
> >>stop the
> >>scripts from marking all files under /etc as configuration files?
> >>   
> >>
> >1. You are confusing conffiles and configuration files. These notions
> >  are explained in the Debian Policy Manual.
> > 
> >
> I read the policy manual. I even reread it now. It says:
> 10.7.1 Definitions
> 
> >The distinction between these two is important; they are not 
> >interchangeable concepts. Almost all conffiles are configuration 
> >files, but many configuration files are not conffiles.
> >
> >Note that a script that embeds configuration information (such as most 
> >of the files in |/etc/default| and |/etc/cron.{daily,weekly,monthly}|) 
> >is de-facto a configuration file and should be treated as such.
> >
> >
> 10.7.2 Location
> 
> >Any configuration files created or used by your package must reside in 
> >|/etc|. If there are several, consider creating a subdirectory of 
> >|/etc| named after your package.
> 
> Debhelper(1) says:
> 
> >V3  This mode works like V2, with the following additions:
> >-       Every file in etc/ is automatically flagged as a conffile by 
> >dh_installdeb.
> 
> You are right, I am thoroughly confused. It seems to me that if I follow 
> the policy version 3 or above (and we all agree that I should), then 
> every configuration file (that must be placed under /etc according to 
> 10.7.2) will also be a conffile, contradicting 10.7.1.
> 
> While I am confused, I have to say your explanation did not help me. The 
> way I see it, a password file is a configuration file, but not a 
> conffile. All configuration files, be them conffiles or not, should go 
> into /etc, but debhelper compatibility version 3 (and, by induction, 
> version 4) does not allow me to place a file there that is not a 
> conffile. It seems to me that the standard is self conflicting.
> 
> >2. This is probably a bad idea, but I suppose that setting DH_COMPAT to
> >  2 or below just for the dh_installdeb invocation would do the trick.
> > 
> >
> I agree. It is a bad idea. Give me another option.
> 
> I am either utterly and totally misunderstanding the standard here, or 
> the standard makes it impossible to create standard conforming 
> applications in some circumstances.
> 
> Help?
>          Shachar
> 
> -- 
> Shachar Shemesh
> Lingnu Open Source Consulting ltd.
> Have you backed up today's work? http://www.lingnu.com/backup.html
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-mentors-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact 
> listmaster@lists.debian.org
> 

-- 
Justin Pryzby
whois jgalt

References

[0] 



Reply to: