<kc version="0.1.0"> 
 
<headquote><a href="http://www.cs.utah.edu/projects/flux/mach4/html/">Mach 
4</a> | <a href="http://www.gnu.org/software/hurd/hurd.html">Hurd Servers</a> 
| <a href="http://www.gnu.org/software/hurd/debian-gnu-hurd.html">Debian Hurd 
Home</a> | <a href="http://www.debian.org/ports/hurd/hurd-faq">Debian Hurd 
FAQ</a> | <a href="http://lists.debian.org/#debian-hurd">debian-hurd 
List Archives</a> | <a 
href="http://mail.gnu.org/pipermail/bug-hurd/">bug-hurd List Archives</a> | 
<a href="http://mail.gnu.org/pipermail/help-hurd/">help-hurd List Archive</a> | 
<a href="http://www.gnu.org/software/hurd/reference-manual.html">Hurd Reference 
Manual</a> | <a href="http://pick.sel.cam.ac.uk/~mcv21/hurd.html">Hurd 
Installation Guide</a> | <a 
href="http://pages.hotbot.com/sf/igorkh/gnumach-cross.txt">Cross-Compiling 
GNUMach</a> | <a 
href="http://www.urbanophile.com/arenn/hacking/hurd/hurd-hardware.html">Hurd 
Hardware Compatibility Guide</a></headquote> 
 
<title>Hurd Traffic</title> 
 
<author contact="mailto:paule@chem.gla.ac.uk">Paul Emsley</author> 
 
<issue num="108" date="17 Sep 2001 23:00:00 -0800" /> 

<section
  title="Compiling Jed"
  subject="compiling under hurd"
  archive="http://lists.debian.org/debian-hurd/2001/debian-hurd-200109/msg00020.html"
  posts="7"
  startdate="03 Sep 2001 12:51:02 -0800"
  enddate="09 Sep 2001 15:38:17 -0800"
>

<mention>Diego Roversi</mention>

<p>Diego Roversi had been trying to compile Jed and wanted to properly
conditionalise his patch to send to the author. Roland McGrath said
that one rarely appropriate to use #ifdef HURD (or some such).  Diego
went on to explain the problem in more detail to which Roland replied:
<quote who="Roland McGrath">GNU libc has the pty.h header and the
openpty function on both Linux and Hurd.  Programs should use
that</quote>. Stefan Skoglund finished up this thread saying <quote
who="Stefan Skoglund">The application should use openpty directly.  If
that is absent, then the program should contain an replacement
</quote>. </p>



</section>


<section
  title="Xdm's Shared Libs"
  subject="xdm problems"
  archive="http://lists.debian.org/debian-hurd/2001/debian-hurd-200109/msg00050.html"
  posts="7"
  startdate="08 Sep 2001 08:07:05 -0800"
  enddate="10 Sep 2001 14:44:02 -0800"
>

<p>When attempting to run xdm (from the hurd-F3-main CD) Daniel
Lichtenberger found that it uses the library libXdmGreet.so, which he
did not have and libXmu.so, which he <i>did</i> have, but xdm failed
to find it.  Daniel provided extra information, including something
about ld.so.conf.  Marcus Brinkmann replied that ld.so.conf is a
Linuxism and not used with the Hurd. Marcus continued: </p>

<quote who="Marcus Brinkmann">


<p> The real solution is to use DT_RUNPATH (not RPATH!) when linking
the executable, but this will have to wait for the next major binutils
version.  The reason it works for you is thta you have LD_LIBRARY_PATH
set, I would guess (like in /etc/profile)</p>

<p>The reason it doesn't work with xdm is that this program ignores
the LD_LIBRARY_PATH env variable for security reasons. You can
configure this, though.  [] Somewhere in /etc/X11/xdm you can tell it
to not ignore the value, or even set it to some fixed value.  </p>
</quote>

<p>The problem with libXdmGreet (which is dlopen'ed at run time) seems
unresolved.</p>


</section>


<section
  title="Naming The System"
  subject="Debian GNU or Debian GNU/Hurd?"
  archive="http://lists.debian.org/debian-hurd/2001/debian-hurd-200109/msg00052.html"
  posts="8"
  startdate="08 Sep 2001 11:10:16 -0800"
  enddate="08 Sep 2001 21:48:35 -0800"
>

<p>There was a bit of discussion about the name of this project/system
(i.e. <quote who="Evandro Giovanini">Shouldn't Debian GNU/Hurd be
called Debian GNU?</quote>), the argument being that the Hurd is part
of GNU and GNU is the operating system.

<p>There were other views expressing the need to distinguish ourselves
from GNU/Linux. </p>

<p>Somewhat tongue-in-cheek, Marcus finished off this recurring topic
(for now) with <quote who="Marcus Brinkmann">Of course, it's all wrong
anyway.  It should be &quot;Debian GNU/the Hurd&quot; at the very
least</quote>.</p>

</p>




</section>



<section
  title="Supporting The Hurd's Features"
  subject="support for translators in tar"
  archive="http://mail.gnu.org/pipermail/bug-hurd/2001-September/005214.html"
  posts="11"
  startdate="09 Sep 2001 12:57:47 -0800" 
  enddate="12 Sep 2001 09:11:08 -0800"
>
<topic>FS: ext2</topic>
<topic>POSIX</topic>

<p>
This is this week's most interesting and forward-looking thread
contributed to by many of the Hurd developers old and new (even Miles
Bader!). </p>

<p>
For a long time now, the Hurd developers have been expounding on the
marvellous new features that that Hurd provides.  The problem being
that there are not any programs to take advantage of these features. </p>

<p> This week, Marcus attempts to address that problem by spurring
development for support of translators in two of the most obvious
targets: tar and ls.  </p>

<p>For tar, Marcus had in mind the ability to store the translator
rather than read through it (much like storing a symlink instead of
the (dereferenced) file to which it points): </p>

<quote who="Marcus Brinkmann">


<p>I want to tackle the issue of support for translators as used in the Hurd by
tar.  This is important for installation tar files (/dev/ nodes), for
example. </p>

<p>For the tar maintainer: The Hurd allows to attach programs to filesystem
nodes, those programs service all filesystem accesses (inkl. stat()!).
Such running servers are active translators, and mostly transparent to the
user.  We have GNU extensions in the C library to detect them, though (but
we need _GNU_SOURCE).
 </p>

<p>The servers can be started transparently from passive translators which is
a command line string stored in a block of the filesystem and associated
with an inode.  This command line string is used to start up the actuve
translators.
 </p>

<p> It is those passive translators that should be stored and restored
by tar on request.  </p>

<p>Some properties of passive translators (aka translators from now
on) are shared by symlinks.  Both are stored as a string connected to
an inode.  Both can be dereferenced or not.  In fact, symlinks are
implemented as special translators in the most general case (for
efficiency, filesystem servers can use native symlink support if they
want).  A symlink is by definition a "/hurd/symlink TARGET"
translator.  The program /hurd/symlink exists and is a translator that
provides the expected functionality (of course, this program is not
regularly used, and POSIX programs see the symlink as defined by
POSIX).  </p>

<p>Now to tar.  Of course, reading and writing translators is a GNU
extension.  All calls necessary to do this are part of the C library,
so it is easy to add the support (autoconf-wise).  I expect that the
archive management code is mostly the same between long symlinks and
translators.  </p>

<p> The default for symlinks is to store them, dereferencing is
possible with -h (--dereference).  For translators, I think the
opposite should be true.  Users expect translators to be transparent
to normal applications.  For example, mount points are also
translators, and I expect tar to not store the mount point settings,
but the data within.  </p>

<p>The check for a translator should be done before any other check,
to avoid starting up the server unnecessarily (any normal file i/o on
the node, even a stat(), starts up the server).  There is one
complication.  Symlinks, device files, fifos and similar are also
implemented as translators.  However, I'd expect that a symlink
together with the --do-not-dereference-translators option will not
store a /hurd/symlink translator, but a symlink.  So, the translator
handling code will recognize the couple of special translators and
coerce them into archive entries compatible to traditional Unix
systems.  </p>

<p>I write all this to make sure the above is what everybody wants,
and in the hope to get some pointers into the relevant parts of the
tar code.  Of course, if the tar people (Paul?) want to do the
changes, I am happy to just assist with the Hurd specific parts and
testing.  The reason I am not just diving into the source is that the
details of tar are quite complicated (format versioning etc), and I am
sure that I would spent a lot of time just figuring out where to put
the code. </p>
</quote>

<p>Thomas Bushnell thought that the default mode should be to
dereference translators and he went on to say <quote who="Thomas
Bushnell">For the special --do-not-dereference-translators mode, you
want basically exactly the same thing for the lookup, except use
O_NOTRANS.  Then you have to check to see if there is a translator,
and if there is, see if it's one of the special well-known translators
(and turn them into the appropriate standard special archive entry
type).</quote> </p>


<p>Paul Eggert thought that tar should do something similar to ls, as
in "ls -l", and asked about the switch to do this for translators.  He
pointed Marcus to the latest experimental tar (<a
href="ftp://alpha.gnu.org/gnu/tar/">ftp://alpha.gnu.org/gnu/tar/</a>)
but warned: <quote who="Paul Eggert">The tar code, to put it politely,
is a mess that nobody has had time to clean up.  Feel free to dive in,
but bring a wetsuit....  </quote> </p>

<p>Unfortunately, ls does not currently support
--do-not-dereference-translators either and Kalle Niemitalo added the
following about ls and tar: </p> 

<quote who="Kalle Niemitalo">

<p>There has been a lot
of talk about extending 'ls' to display the Hurd's fourth rwx
permission set.  When someone eventually does that, (s)he could also
add an option for showing passive translators.  That would be more
convenient than a separate 'showtrans' program, I think.  The output
could then also obey the '--quoting-style' option.  </p>

<p>The tar format should be extended to support the following data
for each file, in addition to what it stores already:
 </p>

<ol>
<li>Passive translator:

<ul>

<li>Usage:  Command line for a program that the parent filesystem
   starts when a process looks up the file.
</li>

<li> Type:  List of strings.  The strings cannot contain null
   characters.
</li>

<li>Frequency:  Most files haven't got passive translators.
</li>

<li>Format: The RPC interfaces and ext2fs (I don't know about ufs)
keep the passive translator in argz format (see the glibc manual) so
it could be easiest to use that format in the tar file too.  The
ext2fs format restricts the argz to the filesystem block length minus
two bytes, but I don't think tar should inherit that limitation.
</li>

<li> Default: When extracting a non-Hurd archive, don't set a
translator except implicitly via mknod or symlink.  </li>

<li> API: There is S_IPTRANS for mode_t, but I think that's a bit late
since a stat already uses the translator.  'showtrans' gets a Mach
port to the file with file_name_lookup, reads the passive-translator
argz with file_get_translator, and closes the port with
mach_port_deallocate.  'settrans' uses file_set_translator in a
similar way.  </li>
</ul>

</li>


<li>Fourth rwx set:
<ul>

<li>Usage:  Read, Write and Execute permissions for processes that
   don't have any UIDs at all.  There is also a bit that says
   whether the fourth set is active.  If it is not active, then
   the "other" set is used instead.  Legacy programs that set
   permissions are expected to store 0 in the activity bit, which
   currently means "not active".  Some later version of the Hurd
   may change 0 to mean "active", so that UIDless processes
   don't get any permissions by default (since the rwx bits are
   also 000).
</li>

<li>   Type:  3+1 bits.
</li>

<li>   Frequency:  In principle, all files have these bits.  However,
   they will often be all zero.

</li>

<li>   Format:  If the bits are zero, I think they needn't be saved.
   The possible future inversion of the activity bit could
   corrupt permissions of old tar files.  I think it is best to
   only design the format for now and not actually save nonzero
   values until we know for sure whether the bit will be
   inverted.
</li>

<li>   Default:  Zero.  If it's good enough for legacy programs, it's
   good enough for legacy archives.
</li>

<li>   API:  These mode_t bits can be read with stat and changed with
   chmod.  Constants: S_IUSEUNK, S_IUNKNOWN, S_IUNKSHIFT.  See
   &lt;bits/stat.h&gt; for details.
</li>

</ul>

</li>



<li>Author ID:

<ul>

<li>   Usage:  Another UID.  Doesn't affect any permissions.  The
   owner or root can store any value here.
   
</li>

<li>Type:  uid_t, 32 bits.
</li>

<li> Frequency:  All files have an author ID, but it is normally
   the same as the owner UID.
</li>

<li>Format:  I suppose tar could store both the number and the
   name, like with UID and GID.
</li>


<li>Default:  When extracting a non-Hurd archive, don't set the
   author ID; let the file system choose the default.
   (FIXME: Is this reasonable if 'tar' then does a chown?)
</li>

<li>API:  To read the author ID, use stat and see st_author.  To
   change it, get a Mach port to the file and call file_chauthor.
</li>
</ul>

</li>

</ol>
 </quote>


<p>Paul Eggert finished for now suggesting that it made more sense to
work on "ls" before "tar" since it would be quicker to develop.
Having read the next POSIX standard for tar, Paul noted that there was
room for translator support, although there were other issues of which
he did not particularly approve.</p>

</section>

</kc> 
