automake
[Top][All Lists]
Advanced

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

Re: make distcheck fails for simple Makefile.am


From: Ralf Wildenhues
Subject: Re: make distcheck fails for simple Makefile.am
Date: Mon, 20 Jun 2005 13:10:49 +0200
User-agent: Mutt/1.4.1i

Hi Roger,

* Roger Leigh wrote on Mon, Jun 20, 2005 at 11:11:10AM CEST:
> Ralf Wildenhues <address@hidden> writes:
> > * Roger Leigh wrote on Sat, Jun 18, 2005 at 12:47:08PM CEST:
> >> 
> >> pamdir = /etc/pam.d
> >> pam_DATA = schroot
> >> EXTRA_DIST = $(pam_DATA)
> >> 
> >> make distcheck fails:
> >
> > Make that 
> >   pamdir = $(prefix)/etc/pam.d
> >
> > but you really should be using sysconfdir:
> >   pamdir = $(sysconfdir)/pam.d

> In this case, it will always be /etc/pam.d.  This directory is the
> location of the Linux-PAM service configuration files.  For security,
> libpam won't look anywhere else.  The package has other files to
> install in $(sysconfdir), so using $(sysconfdir) would be wrong
> because it's likely I might want that to be some other value.

That strikes me as inconsistent (for general packages).  In any case, it
prevents multiple installations of the same package under different
prefixes.

> I /could/ do this, but I would likely need to override pamdir during
> 'make install' if it was wrong, which really defeats the point.  If it
> only works when $(sysconfdir)=/etc, it's broken the rest of the time.

Make configure set sysconfdir to /etc unless overridden?  (That won't
solve the distcheck problem alone.)

> > So no, this is not a bug in Automake.
> 
> IMO the ability to use literal absolute paths is unconventional, but
> sometimes required.  If "make distcheck" used $(DESTDIR) rather than
> relying on the fact that *all* install paths begin with $(prefix), it
> would be rather more reliable.

Well, distcheck is meant for general purpose checking.  One item is
that packages should be installable in parallel.  Another one is that
packages should be usable by the powerless user (i.e., one without root
rights).  Both of these don't fit your package.

> It's often the case that a package installs files in locations picked
> up by configure.  e.g. in gimp-print the CUPS PPD files get installed
> in `cups-config --datadir`, and the drivers in `cups-config
> - --serverbin`/filter.  'make distcheck' has never worked because of
> this.

Hmm, DISTCHECK_CONFIGURE_FLAGS could help around this if the package
allows overriding.

> In both of these cases, the location is dictated by packages already
> installed on the system.  That location is completely independent of
> $(prefix).

OK.

> In summary:
> - - any location that does not start with $(prefix) will break distcheck
> - - this could be fixed by using $(DESTDIR)

Nono.  DESTDIR serves a different purpose, don't try to abuse it,
please.  It'll work with simple setups/packages only.

I agree with you that this is a limitation.  But I am still not sure
that it should be solved within Automake.  Why not have
 pamdir=/etc/pam.d

and set this in configure.ac but have it overridable by the user.  Then,
use DISTCHECK_CONFIGURE_FLAGS to have `make distcheck' pass?  I agree it
sounds like a hack, but then again, you _are_ violating packaging rules,
and IMVHO it's acceptable if it's difficult to get around them.

Just my opinion, though, I'd love to see arguments against it.

Regards,
Ralf




reply via email to

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