bug-inetutils
[Top][All Lists]
Advanced

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

Re: [bug-inetutils] tests/syslogd.sh and /tmp


From: Alfred M. Szmidt
Subject: Re: [bug-inetutils] tests/syslogd.sh and /tmp
Date: Wed, 18 Jan 2012 16:36:09 -0500

   > tests/syslogd.sh requires a writable /tmp.  In NixOS chroots
   > (yeah, again), there's no /tmp; instead, build systems are
   > expected to use $TMPDIR.
   > 
   > The problem is that $TMPDIR is a loooong file name, which is an
   > issue for socket paths.
   > 
   > The workaround I???ve used in Guile is to cd $TMPDIR, create
   > ./my-socket, and use that.
   > 
   > Would it be acceptable for you?

   Hardly! The use of "/tmp/" is there exactly to take care of well
   defined paths of reasonable length. The failure to provide a
   writeable "/tmp/" is as close to a perverted system I can think of.

   It is intentional that the test script is built to test that the
   expected socket name length is functional. The only solution would
   be to insert an optional variable that would disable the
   corresponding subtest, but run it for every POSIX system, which
   NixOS clearly does not bother even to approximate.

I am inclined to agree with both of you.  /tmp is from IEEE
1003.1-2001, but IEEE 1003.1-2004 and later recommend using $TMPDIR.
So in that sense, NixOS is indeed broken, IEEE 1003.1-2001 is not that
old, and more systems follow it that the 2004 or later editions.

The part where I'm confused is why "cat $TMPDIR/FILE" (*) (or similar)
does not work on NixOS, but "cd $TMPDIR; cat FILE" (**) does.  Is it
because some disreprency between ARG_MAX and PATH_MAX?  I.e. when
doing (*) you hit the ARG_MAX; but doing (**) you don't; even though
in both cases the file name fits in PATH_MAX?

PS.  I might be wrong about the exact IEEE 1003.1 revision, but I know
that recent enough revisions had /tmp; but later did prefer $TMPDIR.



reply via email to

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