[Top][All Lists]

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

$(sharedstatedir) and other questions

From: Chad Walstrom
Subject: $(sharedstatedir) and other questions
Date: Mon, 26 Dec 2005 15:03:21 -0600

Decision time.  I've been cleaning up the automake/autoconf build
scripts so that we can get a working distribution tarball.  It is the
best way for me to test things out, obviously.  Automake makes some
generic decisions about where files should live once installed.
They're all very logical decisions, but they don't necessarily reflect
how we have historically installed files for the GNATS sources.

For example, if we were to simply use:

    dist_sysconfdir_DATA = send-pr.conf

Then, send-pr.conf would be installed in ${prefix}/etc by default.
That also includes databases, gnatsd.user_access, gnatsd.host_access,
and the "defaults" directory for the mkdb to generate new databases.
Historically, we've installed these files in a "gnats" subdirectory to
${sysconfdir}, and the shell scripts reflect this decision.

So, to "fix" this, I've added a configure option called
"--enable-gnats-sysconfdir=NAME" that overloads the ${sysconfdir}
variable with "${sysconfdir}/NAME".  By default, it uses "gnats" for
NAME.  (We still need to fix the shell scripts, though.)  I'm worried
that this will turn into an unmanageable game of "convenience options"
for the configure script.

Automake includes a couple variables for including package-specific
subdirectories, such as dist_pkgdata_DATA.  This installs data into
$(pkgdatadir).  Since the package name is "gnats", this will install
data files in $(prefix)/$(datadir)/$(pkgname).  This is *probably*
what we want, since it best reflects how people organize data in a
filesystem.  I'm using it now, but could easily switch back to a more
default behavior of using $(datadir) instead.

I question whether or not it makes sense to even create these
"convenience" package directories by default or simply let the
administrator make these decisions, and give him/her the knowledge to
do it:

    $ ./configure --prefix=/myprefix \
    > --sysconfdir='${prefix}/etc/gnats' \
    > --datadir='${prefix}/usr/share/gnats' \
    > --sharedstatedir='${prefix}/var/lib/gnats'

Apache provides a "--enable-layout=STYLE" configuration option where
STYLE is "linux", "bsd", "gnu", "windows", "apache", "opt".  To
provide this type of option, we would have to stay abreast of the
latest trends in filesystem layout, but it would certainly be
convenient for the administrator.

Personally, I would rather rely upon the administrator to make sane
decisions at configuration and installation time than make
assumptions.  If a "layout" style option is wanted, we could always
add it later.  Going to strict autoconf usage would be a change in
installation behavior, but it should simplify the source code and
substitution routines.

Opinions?  Objections?
Chad Walstrom <address@hidden> 
           assert(expired(knowledge)); /* core dump */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]