diff options
author | Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2010-01-06 20:41:47 +0100 |
---|---|---|
committer | Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2010-01-06 20:41:47 +0100 |
commit | 8c9d687be640db90533f5b00ea0b7984af9d2378 (patch) | |
tree | 692a1355086f665f673f19512bce5789a514079b | |
parent | Transform more chapters still. (diff) | |
download | devmanual-8c9d687be640db90533f5b00ea0b7984af9d2378.tar.gz devmanual-8c9d687be640db90533f5b00ea0b7984af9d2378.tar.bz2 devmanual-8c9d687be640db90533f5b00ea0b7984af9d2378.zip |
More translations.
-rw-r--r-- | chunk.toc | 5 | ||||
-rw-r--r-- | content/general-concepts.xmli | 6 | ||||
-rw-r--r-- | content/general-concepts/filesystem.xmli | 127 | ||||
-rw-r--r-- | content/general-concepts/herds-and-projects.xmli | 27 | ||||
-rw-r--r-- | content/general-concepts/install-destinations.xmli | 27 | ||||
-rw-r--r-- | content/general-concepts/licenses.xmli | 36 | ||||
-rw-r--r-- | content/general-concepts/mirrors.xmli | 85 |
7 files changed, 313 insertions, 0 deletions
@@ -13,6 +13,11 @@ <d:tocentry linkend="general-concepts.emerge-and-ebuild"><?dbhtml filename="general-concepts/emerge-and-ebuild/index.html"?></d:tocentry> <d:tocentry linkend="general-concepts.features"><?dbhtml filename="general-concepts/features/index.html"?></d:tocentry> </d:tocentry> + <d:tocentry linkend="general-concepts.filesystem"><?dbhtml filename="general-concepts/filesystem/index.html"?></d:tocentry> + <d:tocentry linkend="general-concepts.herds-and-projects"><?dbhtml filename="general-concepts/herds-and-projects/index.html"?></d:tocentry> + <d:tocentry linkend="general-concepts.install-destinations"><?dbhtml filename="general-concepts/install-destinations/index.html"?></d:tocentry> + <d:tocentry linkend="general-concepts.licenses"><?dbhtml filename="general-concepts/licenses/index.html"?></d:tocentry> + <d:tocentry linkend="general-concepts.mirrors"><?dbhtml filename="general-concepts/mirrors/index.html"?></d:tocentry> </d:tocentry> </toc> diff --git a/content/general-concepts.xmli b/content/general-concepts.xmli index 23ccf5d..217661e 100644 --- a/content/general-concepts.xmli +++ b/content/general-concepts.xmli @@ -22,5 +22,11 @@ <xi:include parse="xml" href="general-concepts/ebuild-revisions.xmli" /> <xi:include parse="xml" href="general-concepts/emerge-and-ebuild.xmli" /> <xi:include parse="xml" href="general-concepts/features.xmli" /> + <xi:include parse="xml" href="general-concepts/filesystem.xmli" /> + <xi:include parse="xml" href="general-concepts/herds-and-projects.xmli" /> + <xi:include parse="xml" href="general-concepts/install-destinations.xmli" /> + <xi:include parse="xml" href="general-concepts/licenses.xmli" /> + <!-- <xi:include parse="xml" href="general-concepts/linguas.xmli" /> --> + <xi:include parse="xml" href="general-concepts/mirrors.xmli" /> </part> diff --git a/content/general-concepts/filesystem.xmli b/content/general-concepts/filesystem.xmli new file mode 100644 index 0000000..d1b9223 --- /dev/null +++ b/content/general-concepts/filesystem.xmli @@ -0,0 +1,127 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns="http://docbook.org/ns/docbook" + xmlns:xl="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xml:id="general-concepts.filesystem"> + <title>Filesystem</title> + + <para> + The basic filesystem layout and purpose is as follows: + </para> + + <itemizedlist> + <listitem><para> + <filename>/bin</filename>: Boot-critical applications + </para></listitem> + + <listitem><para> + <filename>/etc</filename>: System administrator controlled configuration files + </para></listitem> + + <listitem><para> + <filename>/lib</filename>: Boot-critical libraries + </para></listitem> + + <listitem><para> + <filename>/opt</filename>: Binary-only applications.</para> + </listitem> + + <listitem><para> + <filename>/sbin</filename>: System administrator boot-critical applications + </para></listitem> + + <listitem><para> + <filename>/tmp</filename>: Temporary data</para> + </listitem> + + <listitem> + <para> + <filename>/usr</filename>: General applications + </para> + + <itemizedlist> + <listitem><para> + <filename>/usr/bin</filename>: Applications + </para></listitem> + + <listitem><para> + <filename>/usr/lib</filename>: Libraries + </para></listitem> + + <listitem><para> + <filename>/usr/local</filename>: Non-portage applications. <emphasis>Ebuilds must not install here</emphasis>. + </para></listitem> + + <listitem><para> + <filename>/usr/sbin</filename>: Non-system-critical system administrator applications + </para></listitem> + + <listitem><para> + <filename>/usr/share</filename>: Architecture independent application data and documentation + </para></listitem> + + </itemizedlist> + </listitem> + + <listitem> + <para> + <filename>/var</filename>: Program generated data + </para> + + <itemizedlist> + <listitem><para> + <filename>/var/cache</filename>: Long term data which can be regenerated + </para></listitem> + + <listitem><para> + <filename>/var/lib</filename>: General application generated data + </para></listitem> + + <listitem><para> + <filename>/var/log</filename>: Log files + </para></listitem> + </itemizedlist> + </listitem> + </itemizedlist> + + <para> + Where possible, we prefer to put non-boot-critical applications in <filename>/usr</filename> rather than + <filename>/</filename>. If a program is not needed in the boot process until after filesystems are mounted then it + generally does not belong on <filename>/</filename>. + </para> + + <para> + Any binary which links against a library under <filename>/usr</filename> must itself go into + <filename>/usr</filename> (or possibly <filename>/opt</filename>). + </para> + + <para> + The <filename>/opt</filename> top-level should only be used for binary-only applications. Binary-only applications + must not be installed outside of <filename>/opt</filename>. + </para> + + <para> + The <filename>/usr/local</filename> heirarchy is for non-portage software. Ebuilds must not attempt to put anything + in here. + </para> + + <para> + The <filename>/usr/share</filename> directory is for <emphasis>architecture independent</emphasis> application data + which is not modified at runtime. + </para> + + <para> + Try to avoid installing unnecessary things into <filename>/etc</filename> — every file in there is additional work + for the system administrator. In particular, non-text files and files that are not intended for system administrator + usage should be moved to <filename>/usr/share</filename>. + </para> + + <section> + <title>FHS</title> + + <para> + Gentoo does not consider the <link xl:href="http://www.pathname.com/fhs/"> Filesystem Hierarchy Standard</link> to + be an authoritative standard, although much of our policy coincides with it. + </para> + </section> +</chapter> diff --git a/content/general-concepts/herds-and-projects.xmli b/content/general-concepts/herds-and-projects.xmli new file mode 100644 index 0000000..518157f --- /dev/null +++ b/content/general-concepts/herds-and-projects.xmli @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns="http://docbook.org/ns/docbook" + xmlns:xl="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xml:id="general-concepts.herds-and-projects"> + <title>Herds and Projects</title> + + <para> + A <emphasis>herd</emphasis> is a collection of packages with an associated set of maintainers. It can happen for + example because of retirement that a herd has no developers but this should be avoided if at all possible. A herd + has an associated email address which can be used for bugzilla assignments. This email address is + <emphasis>not</emphasis> always <email>herdname@gentoo.org</email> — for example, because of the way Gentoo's email + aliases are set up, the <emphasis>cron</emphasis> herd use <email>cron-bugs@gentoo.org</email> (aliases cannot match + system usernames). + </para> + + <para> + A <emphasis>project</emphasis> is a group formed for handling a particular general area. A project may have herds + associated with it. + </para> + + <para> + Sometimes herd and project names overlap — for example, the <emphasis>sparc</emphasis> project has an associated + <emphasis>sparc</emphasis> herd which maintains sparc-specific packages (such as the <package>silo</package> + bootloader). This is <emphasis>not</emphasis> always the case. + </para> +</chapter> diff --git a/content/general-concepts/install-destinations.xmli b/content/general-concepts/install-destinations.xmli new file mode 100644 index 0000000..2586444 --- /dev/null +++ b/content/general-concepts/install-destinations.xmli @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns="http://docbook.org/ns/docbook" + xmlns:xl="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xml:id="general-concepts.install-destinations"> + <title>Install Destinations</title> + + <para> + When an ebuild runs the <function>src_install</function> phase, it installs an image of the package in question from + <literal>${S}</literal> into <literal>${D}</literal>. Ebuilds must <emphasis>not</emphasis> attempt to perform any + operation upon the live filesystem at this stage — this will break binaries, and will (often) cause a sandbox + violation notice. + </para> + + <para> + When installing, Portage will install the image in <literal>${D}</literal> into <literal>${ROOT}</literal>. By + default, <literal>${ROOT}</literal> points to <literal>/</literal>, although the user can alter this — for example, + the user may be building a minimal image for another system in a different location. If your package must operate on + the live filesystem (for example, to create some cache files during <function>pkg_postinst</function>), you must + ensure that you prefix any paths with <literal>${ROOT}</literal>. + </para> + + <para> + When inside <function>pkg_preinst</function>, the image to be installed can be accessed under + <literal>"${D}"</literal>. + </para> +</chapter> diff --git a/content/general-concepts/licenses.xmli b/content/general-concepts/licenses.xmli new file mode 100644 index 0000000..c37cfcd --- /dev/null +++ b/content/general-concepts/licenses.xmli @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns="http://docbook.org/ns/docbook" + xmlns:xl="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xml:id="general-concepts.licenses"> + <title>Licenses</title> + + <para> + All ebuilds must specify a <varname>LICENSE</varname> (note the American English spelling) variable. The value of + this variable must be the name of a file in the Portage tree's <filename>licenses/</filename> directory. + </para> + + <para> + If the application is multi-license (either of several licenses can be used) then use the following syntax: + </para> + + <programlisting language="ebuild"><![CDATA[ +LICENSE="|| ( foo bar )" +]]></programlisting> + + <section> + <title>Adding New Licenses</title> + + <para> + If your package's license is not already in the tree, you must add the license before committing the package. When + adding the license, use a plain text file if at all possible. Some licenses are PDF files rather than plain text — + this should only be done if we are legally required to do so. + </para> + + <para> + It is not normally necessary to mail the <email>gentoo-dev@lists.gentoo.org</email> list before adding a new + license. You should only do so if the license could be considered 'questionable' or if you are unsure as to the + meaning of any part of it. + </para> + </section> +</chapter> diff --git a/content/general-concepts/mirrors.xmli b/content/general-concepts/mirrors.xmli new file mode 100644 index 0000000..d00ef61 --- /dev/null +++ b/content/general-concepts/mirrors.xmli @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns="http://docbook.org/ns/docbook" + xmlns:xl="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xml:id="general-concepts.mirrors"> + <title>Mirrors</title> + + <figure> + <title>Mirroring Process</title> + + <mediaobject> + <imageobject> + <imagedata fileref="/images/mirrors-diagram.png" + align="center" /> + </imageobject> + </mediaobject> + </figure> + + <section> + <title>Automatic Mirroring</title> + + <para> + Packages will automatically have their <varname>SRC_URI</varname> components mirrored onto Gentoo mirrors. When + fetching, Portage checks Gentoo mirrors first before trying the original upstream location. + </para> + + <para> + This is generally desired behaviour — upstream mirrors are prone to being rearranged, tidied out or having files + modified. + </para> + + <section> + <title>Restricting Automatic Mirroring</title> + + <para> + Three <varname>RESTRICT</varname> keywords can be used to control the mirroring process. + </para> + + <para> + The <literal>RESTRICT="mirror"</literal> setting should be used if we cannot legally mirror certain files; files + will still be downloaded from the original locations. + </para> + + <para> + The <literal>RESTRICT="primaryuri"</literal> setting causes Portage to try original locations + <emphasis>first</emphasis>, and then fall back to mirrors if necessary — this is sometimes useful if approximate + download counts are needed, or if upstream have a reliable mirror setup. + </para> + + <para> + There is also <literal>RESTRICT="fetch"</literal>>, which prevents Portage from trying to fetch anything + manually. The <xref linkend="ebuild-writing.functions.pkg_nofetch"/> function will be called if any + <varname>SRC_URI</varname> components cannot be found. This should only be used if a license requires it. + </para> + </section> + + <section> + <title>Suitable Download Hosts</title> + + <para> + Hosting files off <filename>dev.gentoo.org</filename> is <emphasis>not</emphasis> acceptable for main-tree items. + Instead, these files must be moved onto <literal>mirror://gentoo</literal> before release. + </para> + </section> + </section> + + <section> + <title>Gentoo Mirrors</title> + + <para> + To manually upload a file to <literal>mirror://gentoo</literal>, <command>scp</command> it to + <filename>dev.gentoo.org:/space/distfiles-local</filename>. You must ensure that the permissions are set to + <literal>ug+rw</literal> manually. The file should appear on the mirrors within four hours (note that this is + <emphasis>less frequent</emphasis> than <xref linkend="general-concepts.cvs-to-rsync"/>). + </para> + + <para> + If the upstream download location for a package uses a non-standard TCP port (anything other than 21, 80 or 443), + you <emphasis>must</emphasis> manually mirror the files. Not doing so can cause all kinds of problems with strict + firewalls. + </para> + </section> + +</chapter> + |