|
|
--> | --> |
| |
<sections> | <sections> |
<version>1.0.4</version> |
<version>1.0.5</version> |
<date>2007-07-31</date> |
<date>2007-11-27</date> |
| |
<section> | <section> |
<title>Why the need for metadata.xml?</title> | <title>Why the need for metadata.xml?</title> |
|
|
<body> | <body> |
| |
<p> | <p> |
The <c>metadata.xml</c> file has as its purpose to give extra information about |
The <path>metadata.xml</path> file has as its purpose to give extra information about |
ebuilds. The <c>metadata.xml</c> file should exist in every package directory. |
ebuilds. The <path>metadata.xml</path> file should exist in every package directory. |
A skel file can be found as <c>skel.metadata.xml</c> in the portage tree. |
A skel file can be found as <path>skel.metadata.xml</path> in the root of the portage tree. |
</p> | </p> |
| |
<note> | <note> |
Please run <c>xmllint --valid metadata.xml</c> before committing a |
Please run <c>xmllint --valid --noout metadata.xml</c> before committing a |
<c>metadata.xml</c> file. We hope to add support for <c>metadata.xml</c> to |
<path>metadata.xml</path> file. We hope to add support for <path>metadata.xml</path> to |
repoman soon. | repoman soon. |
</note> | </note> |
| |
|
|
<body> | <body> |
| |
<p> | <p> |
A <c>metadata.xml</c> file can contain a number of tags: |
A <path>metadata.xml</path> file can contain a number of tags: |
</p> | </p> |
| |
<table> | <table> |
|
|
<brite><pkgmetadata></brite> | <brite><pkgmetadata></brite> |
</ti> | </ti> |
<ti> | <ti> |
This is the root element of the metadata.xml file for packages. It has |
This is the root element of the <path>metadata.xml</path> file for packages. It has |
no attributes. Its required subtag is: <brite><herd></brite>. | no attributes. Its required subtag is: <brite><herd></brite>. |
Furthermore, the following subtags are allowed: <brite><email></brite> | Furthermore, the following subtags are allowed: <brite><email></brite> |
for a general herd email address, <brite><maintainer></brite>, and | for a general herd email address, <brite><maintainer></brite>, and |
|
|
<brite><catmetadata></brite> | <brite><catmetadata></brite> |
</ti> | </ti> |
<ti> | <ti> |
This is the root element of the metadata.xml file for categories as per |
This is the root element of the <path>metadata.xml</path> file for categories as per |
<uri link="/proj/en/glep/glep-0034.html">GLEP 34</uri>. It has | <uri link="/proj/en/glep/glep-0034.html">GLEP 34</uri>. It has |
no attributes. It contains a number of | no attributes. It contains a number of |
<brite><longdescription></brite> tags, each for a different | <brite><longdescription></brite> tags, each for a different |
|
|
<ti><brite><longdescription></brite></ti> | <ti><brite><longdescription></brite></ti> |
<ti> | <ti> |
This tag contains a description of the package. This is to augment the | This tag contains a description of the package. This is to augment the |
DESCRIPTION field in the ebuilds themselves. |
DESCRIPTION field in the ebuilds themselves. This tag has one optional |
|
subtag: <brite><pkg></brite>. |
|
</ti> |
|
</tr> |
|
<tr> |
|
<ti><brite><use></brite></ti> |
|
<ti> |
|
This tag contains descriptions of <uri |
|
link="/doc/en/handbook/handbook-x86.xml?part=2&chap=2">USE flags</uri>. |
|
This tag is optional and, if specified, has one required subtag: |
|
<brite><flag></brite>. |
|
</ti> |
|
</tr> |
|
<tr> |
|
<ti><brite><flag></brite></ti> |
|
<ti> |
|
This tag contains a description of how the named USE flag affects this |
|
package. It is required if the <brite><use></brite> tag is specified. |
|
It also requires the USE flag to be named in the <c>name</c> attribute. |
|
This tag has one optional subtag: <brite><pkg></brite>. |
|
</ti> |
|
</tr> |
|
<tr> |
|
<ti><brite><pkg></brite></ti> |
|
<ti> |
|
This tag contains a package name in the format of category/package. For |
|
example, <c><pkg>sys-apps/hal</pkg></c>. |
</ti> | </ti> |
</tr> | </tr> |
</table> | </table> |
|
|
<tr> | <tr> |
<ti>lang</ti> | <ti>lang</ti> |
<ti> | <ti> |
<brite><description></brite>, <brite><longdescription></brite> |
<brite><description></brite>, <brite><longdescription></brite>, <brite><use></brite> |
</ti> | </ti> |
<ti> | <ti> |
In every case where a description is required, there must be at | In every case where a description is required, there must be at |
|
|
<ti>restrict</ti> | <ti>restrict</ti> |
<ti> | <ti> |
<brite><herd></brite>, <brite><maintainer></brite>, | <brite><herd></brite>, <brite><maintainer></brite>, |
<brite><longdescription></brite> |
<brite><longdescription></brite>, <brite><flag></brite> |
</ti> | </ti> |
<ti> | <ti> |
The restrict attribute allows to restrict the application of certain tags | The restrict attribute allows to restrict the application of certain tags |
|
|
is that of the DEPEND flag, except that "<" and | is that of the DEPEND flag, except that "<" and |
">" need to be specified by &lt; and &gt;.<br /> | ">" need to be specified by &lt; and &gt;.<br /> |
<br /> | <br /> |
For example in the db package |
For example in the <c>sys-libs/db</c> package, |
<c>restrict="&gt;=sys-libs/db-3.2.9-r5"</c> |
<c>restrict=">=sys-libs/db-3.2.9-r5"</c> |
on the maintainer tag shows that I'm currently maintaining all versions |
on the <brite><maintainer></brite> tag shows that I'm currently maintaining all versions |
bigger then 3.2.9-r5. |
greater than <c>3.2.9-r5</c>. |
|
</ti> |
|
</tr> |
|
<tr> |
|
<ti>name</ti> |
|
<ti> |
|
<brite><name></brite> |
|
</ti> |
|
<ti> |
|
This attribute is required on the <brite><flag></brite> tag. It |
|
simply contains the USE flag. |
|
<br /><br /> |
|
For example in the sys-apps/hal package, |
|
<c><flag name='acpi'>Enables ACPI (longer description in the actual file)</flag></c> |
</ti> | </ti> |
</tr> | </tr> |
</table> | </table> |
|
|
<body> | <body> |
| |
<p> | <p> |
As second example we view the <path>metadata.xml</path> of <c>mirrorselect</c>. |
For the second example, we view the <path>metadata.xml</path> of <c>app-portage/mirrorselect</c>. |
This ebuild is maintained by the <c>tools-portage</c> herd, but has a separate | This ebuild is maintained by the <c>tools-portage</c> herd, but has a separate |
maintainer. | maintainer. |
</p> | </p> |
|
|
| |
</body> | </body> |
</subsection> | </subsection> |
|
<subsection> |
|
<title>Third Example</title> |
|
<body> |
|
|
|
<p> |
|
For the third example, we will describe the <path>metadata.xml</path> of |
|
<c>sys-apps/hal</c>. This ebuild is maintained by the <c>gentopia</c> herd |
|
and contains USE flag descriptions. |
|
</p> |
|
<pre caption="USE flag descriptions"> |
|
<?xml version="1.0" encoding="UTF-8"?> |
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
|
<pkgmetadata> |
|
<herd>gentopia</herd> |
|
<maintainer> |
|
<email>cardoe@gentoo.org</email> |
|
</maintainer> |
|
<maintainer> |
|
<email>steev@gentoo.org</email> |
|
</maintainer> |
|
<maintainer> |
|
<email>compnerd@gentoo.org</email> |
|
</maintainer> |
|
<use> |
|
<flag name='acpi'>Enables HAL to attempt to read from /proc/acpi/event, if |
|
unavailable, HAL will read events from <pkg>sys-power/acpid</pkg>. If |
|
you need multiple acpi readers, ensure acpid is in your default |
|
runlevel (rc-update add acpid default) along with HAL. This will also |
|
enable HAL to read Toshiba and IBM acpi events which do not get sent |
|
via /proc/acpi/event</flag> |
|
<flag name='crypt'>Allows HAL to mount volumes that are encrypted using |
|
LUKS. <pkg>sys-fs/cryptsetup-luks</pkg> which has recently been renamed |
|
to <pkg>sys-fs/cryptsetup</pkg> allows you to create such encrypted |
|
volumes. HAL will be able to handle volumes that are removable or |
|
fixed.</flag> |
|
<flag name='dell'>Builds an installs the Dell addon, which reads data from |
|
the Dell SM BIOS via <pkg>sys-libs/libsmbios</pkg>. It will read your |
|
service tag information and your hardware backlight data as well as |
|
allow you to modify the backlight settings on a Dell laptop.</flag> |
|
<flag name='disk-partition'>Allows HAL to use libparted from |
|
<pkg>sys-apps/parted</pkg> to read raw partition data from your disks |
|
and process that data. Future versions of HAL (possibly 0.5.11 and |
|
higher) will allow you to create, modify, delete and format partitions |
|
from a GUI interface agnostic of your desktop environment.</flag> |
|
<flag name='doc'>Generates documentation that describes HAL's fdi |
|
format.</flag> |
|
<flag name='pcmcia'>Allows HAL to process PCMCIA/CardBus slot data which |
|
includes inserts and removals and act on these events.</flag> |
|
<flag name='selinux'>Installs SELinux policies and links HAL to the SELinux |
|
libraries.</flag> |
|
</use> |
|
</pkgmetadata> |
|
</pre> |
|
|
|
</body> |
|
</subsection> |
</section> | </section> |
</sections> | </sections> |