summaryrefslogtreecommitdiffstats
path: root/man/repo-manifest.1
diff options
context:
space:
mode:
Diffstat (limited to 'man/repo-manifest.1')
-rw-r--r--man/repo-manifest.1548
1 files changed, 548 insertions, 0 deletions
diff --git a/man/repo-manifest.1 b/man/repo-manifest.1
new file mode 100644
index 00000000..be467607
--- /dev/null
+++ b/man/repo-manifest.1
@@ -0,0 +1,548 @@
1.\" DO NOT MODIFY THIS FILE! It was generated by help2man.
2.TH REPO "1" "July 2021" "repo manifest" "Repo Manual"
3.SH NAME
4repo \- repo manifest - manual page for repo manifest
5.SH SYNOPSIS
6.B repo
7\fI\,manifest \/\fR[\fI\,-o {-|NAME.xml}\/\fR] [\fI\,-m MANIFEST.xml\/\fR] [\fI\,-r\/\fR]
8.SH DESCRIPTION
9Summary
10.PP
11Manifest inspection utility
12.SH OPTIONS
13.TP
14\fB\-h\fR, \fB\-\-help\fR
15show this help message and exit
16.TP
17\fB\-r\fR, \fB\-\-revision\-as\-HEAD\fR
18save revisions as current HEAD
19.TP
20\fB\-m\fR NAME.xml, \fB\-\-manifest\-name\fR=\fI\,NAME\/\fR.xml
21temporary manifest to use for this sync
22.TP
23\fB\-\-suppress\-upstream\-revision\fR
24if in \fB\-r\fR mode, do not write the upstream field (only
25of use if the branch names for a sha1 manifest are
26sensitive)
27.TP
28\fB\-\-suppress\-dest\-branch\fR
29if in \fB\-r\fR mode, do not write the dest\-branch field
30(only of use if the branch names for a sha1 manifest
31are sensitive)
32.TP
33\fB\-\-json\fR
34output manifest in JSON format (experimental)
35.TP
36\fB\-\-pretty\fR
37format output for humans to read
38.TP
39\fB\-\-no\-local\-manifests\fR
40ignore local manifests
41.TP
42\fB\-o\fR \-|NAME.xml, \fB\-\-output\-file\fR=\fI\,\-\/\fR|NAME.xml
43file to save the manifest to
44.SS Logging options:
45.TP
46\fB\-v\fR, \fB\-\-verbose\fR
47show all output
48.TP
49\fB\-q\fR, \fB\-\-quiet\fR
50only show errors
51.PP
52Run `repo help manifest` to view the detailed manual.
53.SH DETAILS
54.PP
55With the \fB\-o\fR option, exports the current manifest for inspection. The manifest
56and (if present) local_manifests/ are combined together to produce a single
57manifest file. This file can be stored in a Git repository for use during future
58\&'repo init' invocations.
59.PP
60The \fB\-r\fR option can be used to generate a manifest file with project revisions set
61to the current commit hash. These are known as "revision locked manifests", as
62they don't follow a particular branch. In this case, the 'upstream' attribute is
63set to the ref we were on when the manifest was generated. The 'dest\-branch'
64attribute is set to indicate the remote ref to push changes to via 'repo
65upload'.
66.PP
67repo Manifest Format
68.PP
69A repo manifest describes the structure of a repo client; that is the
70directories that are visible and where they should be obtained from with git.
71.PP
72The basic structure of a manifest is a bare Git repository holding a single
73`default.xml` XML file in the top level directory.
74.PP
75Manifests are inherently version controlled, since they are kept within a Git
76repository. Updates to manifests are automatically obtained by clients during
77`repo sync`.
78.PP
79[TOC]
80.PP
81XML File Format
82.PP
83A manifest XML file (e.g. `default.xml`) roughly conforms to the following DTD:
84.PP
85```xml <!DOCTYPE manifest [
86.TP
87<!ELEMENT manifest (notice?,
88remote*,
89default?,
90manifest\-server?,
91remove\-project*,
92project*,
93extend\-project*,
94repo\-hooks?,
95superproject?,
96contactinfo?,
97include*)>
98.IP
99<!ELEMENT notice (#PCDATA)>
100.IP
101<!ELEMENT remote (annotation*)>
102<!ATTLIST remote name ID #REQUIRED>
103<!ATTLIST remote alias CDATA #IMPLIED>
104<!ATTLIST remote fetch CDATA #REQUIRED>
105<!ATTLIST remote pushurl CDATA #IMPLIED>
106<!ATTLIST remote review CDATA #IMPLIED>
107<!ATTLIST remote revision CDATA #IMPLIED>
108.IP
109<!ELEMENT default EMPTY>
110<!ATTLIST default remote IDREF #IMPLIED>
111<!ATTLIST default revision CDATA #IMPLIED>
112<!ATTLIST default dest\-branch CDATA #IMPLIED>
113<!ATTLIST default upstream CDATA #IMPLIED>
114<!ATTLIST default sync\-j CDATA #IMPLIED>
115<!ATTLIST default sync\-c CDATA #IMPLIED>
116<!ATTLIST default sync\-s CDATA #IMPLIED>
117<!ATTLIST default sync\-tags CDATA #IMPLIED>
118.IP
119<!ELEMENT manifest\-server EMPTY>
120<!ATTLIST manifest\-server url CDATA #REQUIRED>
121.TP
122<!ELEMENT project (annotation*,
123project*,
124copyfile*,
125linkfile*)>
126.TP
127<!ATTLIST project name
128CDATA #REQUIRED>
129.TP
130<!ATTLIST project path
131CDATA #IMPLIED>
132.TP
133<!ATTLIST project remote
134IDREF #IMPLIED>
135.TP
136<!ATTLIST project revision
137CDATA #IMPLIED>
138.IP
139<!ATTLIST project dest\-branch CDATA #IMPLIED>
140<!ATTLIST project groups CDATA #IMPLIED>
141<!ATTLIST project sync\-c CDATA #IMPLIED>
142<!ATTLIST project sync\-s CDATA #IMPLIED>
143<!ATTLIST project sync\-tags CDATA #IMPLIED>
144<!ATTLIST project upstream CDATA #IMPLIED>
145<!ATTLIST project clone\-depth CDATA #IMPLIED>
146<!ATTLIST project force\-path CDATA #IMPLIED>
147.IP
148<!ELEMENT annotation EMPTY>
149<!ATTLIST annotation name CDATA #REQUIRED>
150<!ATTLIST annotation value CDATA #REQUIRED>
151<!ATTLIST annotation keep CDATA "true">
152.IP
153<!ELEMENT copyfile EMPTY>
154<!ATTLIST copyfile src CDATA #REQUIRED>
155<!ATTLIST copyfile dest CDATA #REQUIRED>
156.IP
157<!ELEMENT linkfile EMPTY>
158<!ATTLIST linkfile src CDATA #REQUIRED>
159<!ATTLIST linkfile dest CDATA #REQUIRED>
160.IP
161<!ELEMENT extend\-project EMPTY>
162<!ATTLIST extend\-project name CDATA #REQUIRED>
163<!ATTLIST extend\-project path CDATA #IMPLIED>
164<!ATTLIST extend\-project groups CDATA #IMPLIED>
165<!ATTLIST extend\-project revision CDATA #IMPLIED>
166<!ATTLIST extend\-project remote CDATA #IMPLIED>
167.IP
168<!ELEMENT remove\-project EMPTY>
169<!ATTLIST remove\-project name CDATA #REQUIRED>
170<!ATTLIST remove\-project optional CDATA #IMPLIED>
171.IP
172<!ELEMENT repo\-hooks EMPTY>
173<!ATTLIST repo\-hooks in\-project CDATA #REQUIRED>
174<!ATTLIST repo\-hooks enabled\-list CDATA #REQUIRED>
175.IP
176<!ELEMENT superproject EMPTY>
177<!ATTLIST superproject name CDATA #REQUIRED>
178<!ATTLIST superproject remote IDREF #IMPLIED>
179.IP
180<!ELEMENT contactinfo EMPTY>
181<!ATTLIST contactinfo bugurl CDATA #REQUIRED>
182.IP
183<!ELEMENT include EMPTY>
184<!ATTLIST include name CDATA #REQUIRED>
185<!ATTLIST include groups CDATA #IMPLIED>
186.PP
187]>
188```
189.PP
190For compatibility purposes across repo releases, all unknown elements are
191silently ignored. However, repo reserves all possible names for itself for
192future use. If you want to use custom elements, the `x\-*` namespace is reserved
193for that purpose, and repo guarantees to never allocate any corresponding names.
194.PP
195A description of the elements and their attributes follows.
196.PP
197Element manifest
198.PP
199The root element of the file.
200.PP
201Element notice
202.PP
203Arbitrary text that is displayed to users whenever `repo sync` finishes. The
204content is simply passed through as it exists in the manifest.
205.PP
206Element remote
207.PP
208One or more remote elements may be specified. Each remote element specifies a
209Git URL shared by one or more projects and (optionally) the Gerrit review server
210those projects upload changes through.
211.PP
212Attribute `name`: A short name unique to this manifest file. The name specified
213here is used as the remote name in each project's .git/config, and is therefore
214automatically available to commands like `git fetch`, `git remote`, `git pull`
215and `git push`.
216.PP
217Attribute `alias`: The alias, if specified, is used to override `name` to be set
218as the remote name in each project's .git/config. Its value can be duplicated
219while attribute `name` has to be unique in the manifest file. This helps each
220project to be able to have same remote name which actually points to different
221remote url.
222.PP
223Attribute `fetch`: The Git URL prefix for all projects which use this remote.
224Each project's name is appended to this prefix to form the actual URL used to
225clone the project.
226.PP
227Attribute `pushurl`: The Git "push" URL prefix for all projects which use this
228remote. Each project's name is appended to this prefix to form the actual URL
229used to "git push" the project. This attribute is optional; if not specified
230then "git push" will use the same URL as the `fetch` attribute.
231.PP
232Attribute `review`: Hostname of the Gerrit server where reviews are uploaded to
233by `repo upload`. This attribute is optional; if not specified then `repo
234upload` will not function.
235.PP
236Attribute `revision`: Name of a Git branch (e.g. `main` or `refs/heads/main`).
237Remotes with their own revision will override the default revision.
238.PP
239Element default
240.PP
241At most one default element may be specified. Its remote and revision attributes
242are used when a project element does not specify its own remote or revision
243attribute.
244.PP
245Attribute `remote`: Name of a previously defined remote element. Project
246elements lacking a remote attribute of their own will use this remote.
247.PP
248Attribute `revision`: Name of a Git branch (e.g. `main` or `refs/heads/main`).
249Project elements lacking their own revision attribute will use this revision.
250.PP
251Attribute `dest\-branch`: Name of a Git branch (e.g. `main`). Project elements
252not setting their own `dest\-branch` will inherit this value. If this value is
253not set, projects will use `revision` by default instead.
254.PP
255Attribute `upstream`: Name of the Git ref in which a sha1 can be found. Used
256when syncing a revision locked manifest in \fB\-c\fR mode to avoid having to sync the
257entire ref space. Project elements not setting their own `upstream` will inherit
258this value.
259.PP
260Attribute `sync\-j`: Number of parallel jobs to use when synching.
261.PP
262Attribute `sync\-c`: Set to true to only sync the given Git branch (specified in
263the `revision` attribute) rather than the whole ref space. Project elements
264lacking a sync\-c element of their own will use this value.
265.PP
266Attribute `sync\-s`: Set to true to also sync sub\-projects.
267.PP
268Attribute `sync\-tags`: Set to false to only sync the given Git branch (specified
269in the `revision` attribute) rather than the other ref tags.
270.PP
271Element manifest\-server
272.PP
273At most one manifest\-server may be specified. The url attribute is used to
274specify the URL of a manifest server, which is an XML RPC service.
275.PP
276The manifest server should implement the following RPC methods:
277.IP
278GetApprovedManifest(branch, target)
279.PP
280Return a manifest in which each project is pegged to a known good revision for
281the current branch and target. This is used by repo sync when the \fB\-\-smart\-sync\fR
282option is given.
283.PP
284The target to use is defined by environment variables TARGET_PRODUCT and
285TARGET_BUILD_VARIANT. These variables are used to create a string of the form
286$TARGET_PRODUCT\-$TARGET_BUILD_VARIANT, e.g. passion\-userdebug. If one of those
287variables or both are not present, the program will call GetApprovedManifest
288without the target parameter and the manifest server should choose a reasonable
289default target.
290.IP
291GetManifest(tag)
292.PP
293Return a manifest in which each project is pegged to the revision at the
294specified tag. This is used by repo sync when the \fB\-\-smart\-tag\fR option is given.
295.PP
296Element project
297.PP
298One or more project elements may be specified. Each element describes a single
299Git repository to be cloned into the repo client workspace. You may specify
300Git\-submodules by creating a nested project. Git\-submodules will be
301automatically recognized and inherit their parent's attributes, but those may be
302overridden by an explicitly specified project element.
303.PP
304Attribute `name`: A unique name for this project. The project's name is appended
305onto its remote's fetch URL to generate the actual URL to configure the Git
306remote with. The URL gets formed as:
307.IP
308${remote_fetch}/${project_name}.git
309.PP
310where ${remote_fetch} is the remote's fetch attribute and ${project_name} is the
311project's name attribute. The suffix ".git" is always appended as repo assumes
312the upstream is a forest of bare Git repositories. If the project has a parent
313element, its name will be prefixed by the parent's.
314.PP
315The project name must match the name Gerrit knows, if Gerrit is being used for
316code reviews.
317.PP
318"name" must not be empty, and may not be an absolute path or use "." or ".."
319path components. It is always interpreted relative to the remote's fetch
320settings, so if a different base path is needed, declare a different remote with
321the new settings needed. These restrictions are not enforced for [Local
322Manifests].
323.PP
324Attribute `path`: An optional path relative to the top directory of the repo
325client where the Git working directory for this project should be placed. If not
326supplied the project "name" is used. If the project has a parent element, its
327path will be prefixed by the parent's.
328.PP
329"path" may not be an absolute path or use "." or ".." path components. These
330restrictions are not enforced for [Local Manifests].
331.PP
332If you want to place files into the root of the checkout (e.g. a README or
333Makefile or another build script), use the [copyfile] or [linkfile] elements
334instead.
335.PP
336Attribute `remote`: Name of a previously defined remote element. If not supplied
337the remote given by the default element is used.
338.PP
339Attribute `revision`: Name of the Git branch the manifest wants to track for
340this project. Names can be relative to refs/heads (e.g. just "main") or absolute
341(e.g. "refs/heads/main"). Tags and/or explicit SHA\-1s should work in theory, but
342have not been extensively tested. If not supplied the revision given by the
343remote element is used if applicable, else the default element is used.
344.PP
345Attribute `dest\-branch`: Name of a Git branch (e.g. `main`). When using `repo
346upload`, changes will be submitted for code review on this branch. If
347unspecified both here and in the default element, `revision` is used instead.
348.PP
349Attribute `groups`: List of groups to which this project belongs, whitespace or
350comma separated. All projects belong to the group "all", and each project
351automatically belongs to a group of its name:`name` and path:`path`. E.g. for
352`<project name="monkeys" path="barrel\-of"/>`, that project definition is
353implicitly in the following manifest groups: default, name:monkeys, and
354path:barrel\-of. If you place a project in the group "notdefault", it will not be
355automatically downloaded by repo. If the project has a parent element, the
356`name` and `path` here are the prefixed ones.
357.PP
358Attribute `sync\-c`: Set to true to only sync the given Git branch (specified in
359the `revision` attribute) rather than the whole ref space.
360.PP
361Attribute `sync\-s`: Set to true to also sync sub\-projects.
362.PP
363Attribute `upstream`: Name of the Git ref in which a sha1 can be found. Used
364when syncing a revision locked manifest in \fB\-c\fR mode to avoid having to sync the
365entire ref space.
366.PP
367Attribute `clone\-depth`: Set the depth to use when fetching this project. If
368specified, this value will override any value given to repo init with the
369\fB\-\-depth\fR option on the command line.
370.PP
371Attribute `force\-path`: Set to true to force this project to create the local
372mirror repository according to its `path` attribute (if supplied) rather than
373the `name` attribute. This attribute only applies to the local mirrors syncing,
374it will be ignored when syncing the projects in a client working directory.
375.PP
376Element extend\-project
377.PP
378Modify the attributes of the named project.
379.PP
380This element is mostly useful in a local manifest file, to modify the attributes
381of an existing project without completely replacing the existing project
382definition. This makes the local manifest more robust against changes to the
383original manifest.
384.PP
385Attribute `path`: If specified, limit the change to projects checked out at the
386specified path, rather than all projects with the given name.
387.PP
388Attribute `groups`: List of additional groups to which this project belongs.
389Same syntax as the corresponding element of `project`.
390.PP
391Attribute `revision`: If specified, overrides the revision of the original
392project. Same syntax as the corresponding element of `project`.
393.PP
394Attribute `remote`: If specified, overrides the remote of the original project.
395Same syntax as the corresponding element of `project`.
396.PP
397Element annotation
398.PP
399Zero or more annotation elements may be specified as children of a project or
400remote element. Each element describes a name\-value pair. For projects, this
401name\-value pair will be exported into each project's environment during a
402\&'forall' command, prefixed with `REPO__`. In addition, there is an optional
403attribute "keep" which accepts the case insensitive values "true" (default) or
404"false". This attribute determines whether or not the annotation will be kept
405when exported with the manifest subcommand.
406.PP
407Element copyfile
408.PP
409Zero or more copyfile elements may be specified as children of a project
410element. Each element describes a src\-dest pair of files; the "src" file will be
411copied to the "dest" place during `repo sync` command.
412.PP
413"src" is project relative, "dest" is relative to the top of the tree. Copying
414from paths outside of the project or to paths outside of the repo client is not
415allowed.
416.PP
417"src" and "dest" must be files. Directories or symlinks are not allowed.
418Intermediate paths must not be symlinks either.
419.PP
420Parent directories of "dest" will be automatically created if missing.
421.PP
422Element linkfile
423.PP
424It's just like copyfile and runs at the same time as copyfile but instead of
425copying it creates a symlink.
426.PP
427The symlink is created at "dest" (relative to the top of the tree) and points to
428the path specified by "src" which is a path in the project.
429.PP
430Parent directories of "dest" will be automatically created if missing.
431.PP
432The symlink target may be a file or directory, but it may not point outside of
433the repo client.
434.PP
435Element remove\-project
436.PP
437Deletes the named project from the internal manifest table, possibly allowing a
438subsequent project element in the same manifest file to replace the project with
439a different source.
440.PP
441This element is mostly useful in a local manifest file, where the user can
442remove a project, and possibly replace it with their own definition.
443.PP
444Attribute `optional`: Set to true to ignore remove\-project elements with no
445matching `project` element.
446.PP
447Element repo\-hooks
448.PP
449NB: See the [practical documentation](./repo\-hooks.md) for using repo hooks.
450.PP
451Only one repo\-hooks element may be specified at a time. Attempting to redefine
452it will fail to parse.
453.PP
454Attribute `in\-project`: The project where the hooks are defined. The value must
455match the `name` attribute (**not** the `path` attribute) of a previously
456defined `project` element.
457.PP
458Attribute `enabled\-list`: List of hooks to use, whitespace or comma separated.
459.PP
460Element superproject
461.PP
462*** *Note*: This is currently a WIP. ***
463.PP
464NB: See the [git superprojects documentation](
465https://en.wikibooks.org/wiki/Git/Submodules_and_Superprojects) for background
466information.
467.PP
468This element is used to specify the URL of the superproject. It has "name" and
469"remote" as atrributes. Only "name" is required while the others have reasonable
470defaults. At most one superproject may be specified. Attempting to redefine it
471will fail to parse.
472.PP
473Attribute `name`: A unique name for the superproject. This attribute has the
474same meaning as project's name attribute. See the [element
475project](#element\-project) for more information.
476.PP
477Attribute `remote`: Name of a previously defined remote element. If not supplied
478the remote given by the default element is used.
479.PP
480Element contactinfo
481.PP
482*** *Note*: This is currently a WIP. ***
483.PP
484This element is used to let manifest authors self\-register contact info. It has
485"bugurl" as a required atrribute. This element can be repeated, and any later
486entries will clobber earlier ones. This would allow manifest authors who extend
487manifests to specify their own contact info.
488.PP
489Attribute `bugurl`: The URL to file a bug against the manifest owner.
490.PP
491Element include
492.PP
493This element provides the capability of including another manifest file into the
494originating manifest. Normal rules apply for the target manifest to include \- it
495must be a usable manifest on its own.
496.PP
497Attribute `name`: the manifest to include, specified relative to the manifest
498repository's root.
499.PP
500"name" may not be an absolute path or use "." or ".." path components. These
501restrictions are not enforced for [Local Manifests].
502.PP
503Attribute `groups`: List of additional groups to which all projects in the
504included manifest belong. This appends and recurses, meaning all projects in
505sub\-manifests carry all parent include groups. Same syntax as the corresponding
506element of `project`.
507.PP
508Local Manifests
509.PP
510Additional remotes and projects may be added through local manifest files stored
511in `$TOP_DIR/.repo/local_manifests/*.xml`.
512.PP
513For example:
514.IP
515\f(CW$ ls .repo/local_manifests\fR
516.IP
517local_manifest.xml
518another_local_manifest.xml
519.IP
520\f(CW$ cat .repo/local_manifests/local_manifest.xml\fR
521.IP
522<?xml version="1.0" encoding="UTF\-8"?>
523<manifest>
524.IP
525<project path="manifest"
526.IP
527name="tools/manifest" />
528.IP
529<project path="platform\-manifest"
530.IP
531name="platform/manifest" />
532.IP
533</manifest>
534.PP
535Users may add projects to the local manifest(s) prior to a `repo sync`
536invocation, instructing repo to automatically download and manage these extra
537projects.
538.PP
539Manifest files stored in `$TOP_DIR/.repo/local_manifests/*.xml` will be loaded
540in alphabetical order.
541.PP
542Projects from local manifest files are added into local::<local manifest
543filename> group.
544.PP
545The legacy `$TOP_DIR/.repo/local_manifest.xml` path is no longer supported.
546.SS [copyfile]: #Element\-copyfile [linkfile]: #Element\-linkfile [Local Manifests]:
547.PP
548#local\-manifests