Should --sysconfdir=/etc/defaults/etc/?

2003-10-30 Thread Gary R. Van Sickle
Current packaging instructions at http://cygwin.com/setup.html#package_contents
indicate that --sysconfdir should be set to "/etc".  Should this perhaps be
changed to "/etc/defaults/etc", with the subsequent instruction that if your
package actually has anything in sysconfdir, it should conditionally copy it to
/etc if it doesn't already exist with a postinstall script[1]?

[1] Setup wishlist item: Somehow tag files like this and integrate "replace if
not exist else ask user if he wants to replace" functionality into setup,
eliminating the need for disparate shell scripts and their possible disparate
bugs.

--
Gary R. Van Sickle



Re: Should --sysconfdir=/etc/defaults/etc/?

2003-10-30 Thread Corinna Vinschen
On Thu, Oct 30, 2003 at 08:43:31AM -0600, Gary R. Van Sickle wrote:
> Current packaging instructions at http://cygwin.com/setup.html#package_contents
> indicate that --sysconfdir should be set to "/etc".  Should this perhaps be
> changed to "/etc/defaults/etc", with the subsequent instruction that if your
> package actually has anything in sysconfdir, it should conditionally copy it to
> /etc if it doesn't already exist with a postinstall script[1]?

No.  If you set --sysconfdir to something else than /etc, a big bunch
of packages will search their config files in the wrong directory.
Keep in mind, that the sysconfdir setting might get hardcoded into
a tool on compile time.

Better create a package script which moves the files from /etc to
/etc/defaults/etc after calling `make install DESTDIR=...'.  Or even
do it by hand.

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.


Re: Should --sysconfdir=/etc/defaults/etc/?

2003-10-30 Thread Robert Collins
On Fri, 2003-10-31 at 01:43, Gary R. Van Sickle wrote:
> Current packaging instructions at http://cygwin.com/setup.html#package_contents
> indicate that --sysconfdir should be set to "/etc".  Should this perhaps be
> changed to "/etc/defaults/etc", with the subsequent instruction that if your
> package actually has anything in sysconfdir, it should conditionally copy it to
> /etc if it doesn't already exist with a postinstall script[1]?

No. Programs built with /etc/defaults/etc may depend on their files
being there in use. However, having the defaults installed into 
/etc/defaults/etc is a good idea.

> [1] Setup wishlist item: Somehow tag files like this and integrate "replace if
> not exist else ask user if he wants to replace" functionality into setup,
> eliminating the need for disparate shell scripts and their possible disparate
> bugs.

Yah - thats one of the TODO's already, as both dpkg and rpm 'know about'
config files.

Rob
-- 
GPG key available at: .


signature.asc
Description: This is a digitally signed message part


Re: Should --sysconfdir=/etc/defaults/etc/?

2003-10-30 Thread Nicholas Wourms
[EMAIL PROTECTED] wrote:

On Thu, Oct 30, 2003 at 08:43:31AM -0600, Gary R. Van Sickle wrote:

Current packaging instructions at http://cygwin.com/setup.html#package_contents
indicate that --sysconfdir should be set to "/etc".  Should this perhaps be
changed to "/etc/defaults/etc", with the subsequent instruction that if your
package actually has anything in sysconfdir, it should conditionally copy it to
/etc if it doesn't already exist with a postinstall script[1]?


No.  If you set --sysconfdir to something else than /etc, a big bunch
of packages will search their config files in the wrong directory.
Keep in mind, that the sysconfdir setting might get hardcoded into
a tool on compile time.
Better create a package script which moves the files from /etc to
/etc/defaults/etc after calling `make install DESTDIR=...'.  Or even
do it by hand.
RedHat does `make install DESTDIR=".." sysconfdir=".."` for packages 
where they want the target sysconfdir be something other then the 
default set at compile time.

Cheers,
Nicholas


RE: Should --sysconfdir=/etc/defaults/etc/?

2003-10-30 Thread Gary R. Van Sickle
> On Thu, Oct 30, 2003 at 08:43:31AM -0600, Gary R. Van Sickle wrote:
> > Current packaging instructions at
> http://cygwin.com/setup.html#package_contents
> > indicate that --sysconfdir should be set to "/etc".  Should this perhaps be
> > changed to "/etc/defaults/etc", with the subsequent instruction that if your
> > package actually has anything in sysconfdir, it should
> conditionally copy it to
> > /etc if it doesn't already exist with a postinstall script[1]?
>
> No.  If you set --sysconfdir to something else than /etc, a big bunch
> of packages will search their config files in the wrong directory.
> Keep in mind, that the sysconfdir setting might get hardcoded into
> a tool on compile time.

DOH!  Right, sorry, I plead temporary insanity. ;-)

--
Gary R. Van Sickle