<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>

<sect1 id="ch-system-tar" role="wrap">
  <?dbhtml filename="tar.html"?>

  <sect1info condition="script">
    <productname>tar</productname>
    <productnumber>&tar-version;</productnumber>
    <address>&tar-url;</address>
  </sect1info>

  <title>Tar-&tar-version;</title>

  <indexterm zone="ch-system-tar">
    <primary sortas="a-Tar">Tar</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>Tar 软件包包含一个归档程序。</para>

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>

      <seglistitem>
        <seg>&tar-ch6-sbu;</seg>
        <seg>&tar-ch6-du;</seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

  <sect2 role="installation">
    <title>安装 Tar</title>
<!--
    <para>Add a program that generates a man page for tar from the source code:</para>
 
 <screen><userinput remap="pre">patch -Np1 -i ../&tar-manpage-patch;</userinput></screen>
-->
    <para>准备安装 Tar：</para>

<screen><userinput remap="configure">FORCE_UNSAFE_CONFIGURE=1  \
./configure --prefix=/usr \
            --bindir=/bin</userinput></screen>

    <variablelist>
      <title>配置选项的含义：</title>

      <varlistentry>
        <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term>
        <listitem>
          <para>该选项强制以 root 用户身份运行 <function>mknod</function>
          测试。一般认为以 root 用户身份运行该测试是危险的，
		  不过由于是在仅仅部分构建好的系统上运行测试，
		  可以覆盖掉这个安全措施。
          </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>编译该软件包：</para>

<screen><userinput remap="make">make</userinput></screen>

    <para>执行以下命令测试编译结果（需要约 3 SBU）：</para>

<screen><userinput remap="test">make check</userinput></screen>

    <para>已知一项名为 link mismatch 的测试可能失败。</para>

    <para>安装该软件包：</para>

<screen><userinput remap="install">make install
make -C doc install-html docdir=/usr/share/doc/tar-&tar-version;</userinput></screen>

  </sect2>


  <sect2 id="contents-tar" role="content">
    <title>Tar 的内容</title>

    <segmentedlist>
      <segtitle>安装的程序</segtitle>
      <segtitle>安装的目录</segtitle>

      <seglistitem>
        <seg>tar</seg>
        <seg>/usr/share/doc/tar-&tar-version;</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">简要描述</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="tar">
        <term><command>tar</command></term>
        <listitem>
          <para>创建称为 tarball 的档案文件，从档案文件中提取文件，
          或列出档案文件内容</para>
          <indexterm zone="ch-system-tar tar">
            <primary sortas="b-tar">tar</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
