Urs Janßen
2011-08-08 15:39:06 UTC
Concerning the configure options, I wonder why the default for
--with-defaults-dir is /etc/tin and not the directory where
tin.defaults was installed ($sysconfdir/etc/tin). This is quite
inconsistent and suppose this is a bug.
--with-defaults-dir is documented as defaulting to /etc/tin and not to--with-defaults-dir is /etc/tin and not the directory where
tin.defaults was installed ($sysconfdir/etc/tin). This is quite
inconsistent and suppose this is a bug.
$sysconfdir/tin or whatever so I can't see a bug here.
is why --with-defaults-dir defaults to /etc/tin and not to
$sysconfdir/etc/tin? I don't see any reason to install the
defaults somewhere and read them in another place! Of course
installation is done to$(DESTDIR)$(INS_SYSDEF_DIR)
choosen by --with-install-prefix (=DESTDIR) (defaults to /)
and --with-defaults-dir= (INS_SYSDEF_DIR) (defaults to /etc/tin/)
so the full default is /etc/tin/
but you are right there is a bug in configure.in as it sets
TIN_DEFAULTS_DIR (the place which is used for reading the defaults file)
just to INS_SYSDEF_DIR, not to DESTDIR/INS_SYSDEF_DIR, but uses
$(DESTDIR)$(INS_SYSDEF_DIR) for initiall installation. that's a bug, but I'm
currently unsure how to fix this.
inm short src:Makefile.in uses:
DESTDIR = @DESTDIR@
INS_SYSDEF_DIR = @TIN_DEFAULTS_DIR@
$(INSTALL) -m 644 $(DOCDIR)/tin.defaults $(DESTDIR)$(INS_SYSDEF_DIR)/tin.defaults
but include/autoconf.hin has
# undef TIN_DEFAULTS_DIR
and the configure macro used is
CF_WITH_PATH(defaults-dir,
[ --with-defaults-dir=PATH
directory containing tin.defaults file
],
TIN_DEFAULTS_DIR,/etc/tin)
AC_DEFINE_UNQUOTED(TIN_DEFAULTS_DIR,"$TIN_DEFAULTS_DIR")
tin.h has:
#ifdef TIN_DEFAULTS_DIR
# define TIN_DEFAULTS TIN_DEFAULTS_DIR,TIN_DEFAULTS_BUILTIN
#endif
and init.c:read_site_config() tries to open each path given in
TIN_DEFAULTS"/tin.defaults" and stops after the first match.
- removing $(DESTDIR) from Mailefile.in would break --with-install-prefix.
- prepending $(DESTDIR) to the value of TIN_DEFAULTS_DIR in the configure
macro would require remvoibng the $(DESTDIR) prefix from the makefile rule
which makes things less understandable
looks like we have to do something like:
define DESTDIR in autoconf.h[in] and prepend it tin.h like
#define TIN_DEFAULTS DESTDIR##TIN_DEFAULTS_DIR,TIN_DEFAULTS_BUILTIN
BTW IIRC --with-install-prefix was introduced before
AC_PREFIX_DEFAULT(/usr/local) was added to configure.in
and nobody cleaned that up (i.e. use --prefix instead).
the current solution is to use --with-defaults-dir too, but
I find this behavior very unintuitive and it is easy to miss
this second configure option. So, I'm just suggesting that
the behavior and the documentation be changed to the default
$sysconfdir/etc/tin.
as stated above that would lead to /usr/local/etc/etc/tin, so if we areI find this behavior very unintuitive and it is easy to miss
this second configure option. So, I'm just suggesting that
the behavior and the documentation be changed to the default
$sysconfdir/etc/tin.
going to do such a change that should be ${sysconfdir}"/tin"
FYI, one uses a different prefix for MacPorts software to avoid
conflicts with software from the vendor (Apple). As both kinds
of software (having different versions) are installed in parallel,
one needs a different place for configuration files.
something like thisconflicts with software from the vendor (Apple). As both kinds
of software (having different versions) are installed in parallel,
one needs a different place for configuration files.
--prefix=/foo/ \
--with-defaults-dir=/foo/etc/tin/
without giving --with-install-prefix might solve your problem, but indeed
isn't very intuitive.
urs
--
"Only whimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)" - Linus
"Only whimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)" - Linus