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

Re: Autoconf test for Debian?



On Fri, 1 Jun 2001, James Bromberger wrote:

> On Fri, Jun 01, 2001 at 02:32:59PM +0200, Robert Bihlmeyer wrote:
> > James Bromberger <james@rcpt.to> writes:

> > > is being created on a Debian system. The reason is that I have a very small
> > > set of diffs that I want applied to the package only for Debian, and hope
> > > at some stage to feed these diffs upstream (things like file paths, etc).

> > Why are these changes only applicable when on a Debian system? What
> > about Progeny? Corel? SuSE? Orange Bone Linux? OpenBSD? SunOS? Cygwin?


> Ahhh. Well. File locations. The Makefile I want to modify has certain
> installation directories set. Debian's elegent filesystem and FHS compliance
> is perhaps different from the upstream author's locations. With this
> Autoconf test, I can then select where I want these files to go with.

If the software uses autoconf, why can you not use --prefix, --sysconfdir,
--localstatedir, and so on to set the file locations correctly?  This is far
more portable, inherently supported by autoconf, and gives the
administrator/packager complete control over where the files end up -- which
is always to be preferred, on Debian systems or otherwise.  If the software's
Makefile doesn't use these autoconf variables correctly, I would suggest
submitting a fix to add support for this, rather than trying to do anything
Debian-specific.


> > Since /etc/debian_version is a conffile, a user may have removed it.
> > My answer would be to check if "dpkg -s base-files" succeeds, but
> > that's not 100 % either. Anyway, you shouldn't do that, see above.

> Yes, but as Nick Bannon pointed out to me off list, dpkg is portable, and
> supposedly has been ported to other distros/platforms(?). Thus, I was looking
> for a sure fire way to know that I am on a Debian system during compilation.
> Thus these specific file locations can be sent upstream (perhaps?).

If you create a Debian package, it's expected to comply with *Debian* policy.
If someone's using dpkg to build your package on some other platform, they
have no reasonable expectation that your package will follow that OSes
filesystem heirarchy instead of Debian's.

OTOH, anyone building this program from source, upon seeing ./configure, can
reasonably expect that if they run './configure --sysconfdir=/etc/foo/bar'
this setting will be honored.  If the program's build scripts are /not/
honoring such settings, I would suggest that this is a genuine bug that ought
to be fixed.  This doesn't require any Debian-specific changes to the code.

HTH,
Steve Langasek
postmodern programmer



Reply to: