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

Re: Getting hostname

On Sun, May 04, 2003 at 07:19:37PM -0600, Bob Proulx wrote:
> Steve Langasek wrote:
> > Bob Proulx wrote:
> > > Just noting that 'getent' is GNU libc only and does not exist on other
> > > systems.  It is not portable.
> > 
> > Then the other systems are broken, because getent is *the* only
> > reliable way to do NSS queries from a script.  Every Debian port needs
> > to provide a 'getent passwd' implementation, glibc-based or not.
> I said *other* systems.  As in non-Debian systems.  In this case other
> than GNU based systems which are not based upon glibc.
> In a Debian package post install script 'getent' should be fine.

Debian does not imply GNU libc. And in fact, expecting it WILL break on at
least one existing Debian port - netbsd-i386. Of course, if it's easy to
port, we (I, at least) will be happy to build any ported package of it. Or,
if you'd like to file a PR against NetBSD itself and get it implemented
upstream, that would work too (I'm unwilling to, because I think I'd like
my head left on my shoulders).

The 'GNU' in Debian GNU/Linux (or GNU/*, really) refers to userland, not
libc. On the flip side, I don't think any of the non-GNU ports have any
problem with providing, where possible, workalikes for things provided by
GNU libc. (Honestly, some things much more fundamental than getent are not
the same - particularly locales; at some point, we'll have to find a sane
and rational way to address this).

Optionally, I suppose, you could in fact depend on libc6 and it's variants
(rather than just libc), which would mean the package would never install
on any non-glibc port. It's a poor solution, though, and not one I think
should be encouraged. (For the record, I build the netbsd-libc package,
and I'd be happy to roll a 'getent' into the Debian flavor of it, if folks
think it should, in fact, always come from libc, rather than sometimes
coming from a 'getent' package).
Joel Baker <fenton@debian.org>

Attachment: pgpf5P6kHQT1d.pgp
Description: PGP signature

Reply to: