1mgarepo(8)                                                          mgarepo(8)
2
3
4

NAME

6       mgarepo - Package sources repository management tool
7

SYNOPSIS

9       mgarepo command [options] [arguments]
10

DESCRIPTION

12       mgarepo is the tool used to manage RPM packages in a subversion reposi‐
13       tory. It is used to create, tag releases, generate  .src.rpm,  generate
14       changelog,  and  request new package releases for build. It mostly acts
15       as a interface to svn(1) commands and small task  scripts  run  on  the
16       build system side over ssh(1).
17
18       Most of the mgarepo commands operate on a given package URL, these URLs
19       can be omitted when the configuration option repository is set.
20
21       Detailed help  on  commands  is  available  running  mgarepo  <command>
22       --help.
23

BASIC USAGE

25   Setup
26       mgarepo does not handle the authentication interface used by svn. So it
27       is usually required to setup  ssh-agent(1)  if  the  repository  access
28       method  is over SSH (svn+ssh:// URLs), or performing some simple opera‐
29       tion in order to obtain a authentication token.
30
31       For more information related how to setup ssh-agent, see:
32       https://wiki.mageia.org/en/Packagers_ssh
33
34       Users that don't have an ssh account in the default repository URL  can
35       set the option mirror pointing to a non-authenticated, read-only repos‐
36       itory (such as svn://svn.mageia.org/svn/packages).
37
38   Examples
39       mgarepo co foo
40              Obtains a working copy of the package foo.
41
42       mgarepo co 1/mutt
43              Obtains a working copy of the package mutt of from the 1 branch.
44
45       mgarepo co hplip -k 5
46              Obtains a working copy of the package hplib of from the 5 branch
47              and backport directory.
48
49       mgarepo ci
50              Commits pending changes in the working copy.
51
52       mgarepo submit foo -r 12345
53              Requests  the package foo in the revision 12345 to be built and,
54              if successful, to be uploaded to the RPMs repository.
55
56       mgarepo submit foo -r 12345 -t 1 --define section=core/testing
57              Will submit the package foo and, upon successful build will have
58              its  RPMs  placed inside the core/testing media of the 1 reposi‐
59              tory.
60
61       mgarepo submit
62              submit run without parameters will use package name and revision
63              found in the working copy in the current directory.
64
65       mgarepo obsolete foo
66              Move the package foo from cauldron/foo to obsolete/foo on svn.
67

COMMANDS

69       For detailed help on commands run mgarepo <command> --help.
70
71       co     checkout a package
72
73       ci     commit changes
74
75       submit submit a package in a given revision for build and release
76
77       sync   add-remove all file changes from the .spec
78
79       maintdb
80              get/set package maintainers informations
81
82       putsrpm
83              import a source package to the repository
84
85       getspec
86              print the spec
87
88       rpmlog print the RPM changelog generated from SVN
89
90       getsrpm
91              create the source RPM
92
93       create create the structure of a new package
94
95       changed
96              show changes not submitted
97
98       authoremail
99              print the e-mail of a given svn author
100
101       switch relocate to mirror or upstream repository
102
103       markrelease
104              create a tag for a given package revision and version
105
106       upload add a file to binrepo
107
108       del    remove a file from binrepo
109
110       up     update the working copy and synchronize all binaries
111
112       obsolete
113              move a package in obsolete directory
114

REPOSITORY LAYOUT

116       A detailed description can be found at:
117       http://wiki.mandriva.com/en/Development/Packaging/RepositorySystem
118
119       The svn repository used by mgarepo consists of a set of branches in the
120       top directory, followed by  package  directories  having  the  internal
121       package structure.
122
123       The  internal  package layout contains a directory current/, which con‐
124       tains the latest version of the package (equivalent to "trunk" in soft‐
125       ware  repositories).  The  directory  releases/ contain copies of older
126       submitted packages that have been already released, it is organized  in
127       the <version>/<release> format (equivalent to "tags" directories).
128
129       URLs used in mgarepo commands refer to the package directory, and never
130       to current. In other words, the http://host/svn/cauldron/foo is  valid,
131       whereas http://host/svn/cauldron/foo/current is not.
132
133       One example layout:
134
135        /packages/cauldron
136            |
137            +- cauldron/
138            |  ...
139            |  +- rsync/
140            |  +- coreutils/
141            |  +- make/
142            |  +- foo/
143            |     +- current/
144            |     |  +- SOURCES/
145            |     |  +- SPECS/
146            |     +- releases/
147            |        ...
148            |        +- 1.0
149            |           +- 1.mga1/
150            |              +- SOURCES/
151            |              +- SPECS/
152            |           +- 2.mga1/
153            |           ...
154            +- updates/
155               +- 1/
156               +- 2/
157               +- 3/
158
159   Setting up a repository
160       The  minimal  setup is accomplished with a Subversion repository having
161       three directories: cauldron/, misc/ and  updates/.  The  name  of  this
162       directories  can  be  changed using the configuration options trunk-dir
163       and branches-dir. Having this you can  start  importing  packages  with
164       mgarepo import.
165

CONFIGURATION

167   Introduction
168       The  main  configuration  file  is /etc/mgarepo.conf, it is in the .ini
169       format. It is basically defined by a set of [name] sections, with a set
170       of variables defined by name = value.
171
172       If existing, the file ~/.mgarepo/config is also loaded.
173
174   [global] section
175       repository = URL
176              Contains the base URL used to access packages in the svn reposi‐
177              tory when only package names are used in mgarepo  commands.  For
178              example,  if  mgarepo  co  trafshow  is  run  and  repository is
179              http://host/svn/, the URL http://host/svn/cauldron/trafshow will
180              be used ("cauldron" is the default branch).
181
182       default_parent = URL
183              Points  to  the  base  URL  of the development branch of the svn
184              repository. This option is deprecated as it has been replaced by
185              "repository".
186
187       mirror = URL
188              The  URL  of  an alternative and read-only repository to be used
189              when checking out packages. mgarepo ci will automatically  relo‐
190              cate to "repository" when comitting.
191
192       use-mirror = yes/no
193              Disable the use of the mirror repository when checking out pack‐
194              ages.
195
196       url-map = MATCH-REGEXP REPLACE-EXPR
197              This option is used on server-side to remap remote URLs  brought
198              by  the  user when running mgarepo submit to local (and probably
199              faster) URLs. MATCH-REGEXP is a Python regular expression match‐
200              ing  the  components  that  must  be  reused  in  the local URL.
201              REPLACE-EXPR is a replace expression that should expand  in  the
202              final URL. Example: svn+ssh://svn.mageia.org/(.*) file:///1
203
204       tempdir = PATH
205              The  directory  to  be used as base for temporay directories and
206              files created by mgarepo.
207
208       download-command = COMMAND-FMT
209              Command used to download generic remote  URLs,  it  accepts  the
210              variables  $url  and  $dest.  It  is currently used when running
211              mgarepo sync -d.
212
213       svn-command = COMMAND
214              The base command used to execute svn(1). Runs through system(3).
215
216       svn-env = VAR=VALUE ..
217              The environment variables to use when running svn. More  entries
218              can  be  defined  by  using  more lines. The variable defined by
219              default is SVN_SSH, which points to the mgarepo-ssh ssh wrapper.
220
221       verbose = yes/no
222              Increase the verbosity  of  mgarepo  output,  printing  commands
223              being run and complete traceback when unhanlded errors happen.
224
225       trunk-dir
226              Points to the default branch of the distro used in commands that
227              do not have their branch or URL specified.
228
229       branches-dir
230              The directory inside  the  repository  which  contains  all  the
231              branches  of the distro. It is used to build the URL of packages
232              referred using the branch notation BRANCH/PACKAGE, as in mgarepo
233              co 1/mutt.
234
235   [submit-groups] section
236       This  section contains aliases to groups of packages to be submitted at
237       once. For example, a line with my-python-packages = bzr  bzrtools  bzr-
238       gtk  would  allow the user to simply run mgarepo submit my-python-pack‐
239       ages.
240
241       Also distro branches or revision numbers  can  be  specified  for  each
242       package group. For example: mgarepo submit 1/my-python-packages.
243
244   [submit] section
245       host = HOST
246              Defines  the  default  host in which mgarepo submit will run the
247              submit helper.
248
249       default = TARGET
250              The default target to be used in mgarepo submit when the  option
251              -t is not used.
252
253   [submit TARGET] sections (server-side only)
254       These  sections  describe  each one of the sections available to submit
255       packages, ther configuration options are:
256
257       target = PATH
258              The path where SRPMs generated by create-srpm-  will  be  placed
259              during during the submit process.
260
261       allowed = URLs
262              A  space-delimited  list of package URLs that will be allowed to
263              be used with this target. The comparison is done by checking  if
264              the  package  URL  used in submit starts with one of the URLs of
265              this option.
266
267       scripts = PATHS
268              A space-delimited list of scripts that will be run receiving the
269              generated SRPM as first argument. These scripts are usually used
270              to perform small  changes  in  the  SRPM  structure,  increasing
271              release number for example.
272
273       rpm-macros = NAMES
274              It points to sections in the configuration that will contain the
275              RPM macros used when generating the SRPM of  the  package  being
276              submitted.  These  section  should be named in the [macros NAME]
277              format.
278
279   [macros NAME] sections (server-side only)
280       These sections contain variables that will be  defined  as  RPM  macros
281       when  generating  the SRPM of the package being submitted.It is usually
282       used to define the distribution suffix that will  be  used  in  package
283       releases, such as "mga1".
284
285   [users] section (server-side only)
286       This  section  maps  the usernames found in svn to their real names and
287       e-mails. It is used when generating the changelog based on  commits  in
288       svn and by authoremail. Example: joe = Joe User <joeuser@host.com>.
289
290       This section can be used on client-side too, but will have no effect in
291       generated changelogs on the server-side.
292
293   [helper] section
294       create-srpm = PATH
295              The path of the script that will be run through ssh on the  sub‐
296              mit host when running mgarepo submit.
297
298       upload-srpm = PATH
299              (server-side  only) Path of the script that will be called after
300              the generated SRPM is copied to its target location (see  target
301              sections above) and target scripts are run.
302
303       rpmbuild = COMMAND
304              The command used to call rpmbuild. Note that build options (such
305              as -bs) are supplied by mgarepo.
306
307   [log] section
308       oldurl = URL
309              The URL of a directory structure that will contain old  changel‐
310              ogs  of  packages  that  will be appended to the changelog being
311              generated by rpmlog or getsrpm -l.
312
313       merge-spec = yes/no
314              If enabled, changelogs generated by mgarepo will have  the  con‐
315              tents  of  the %changelog found in the .spec file of the package
316              appended.
317
318       sort = yes/no
319              If enabled, the changelog will be resorted after its generation.
320              It  is  useful when changelogs found in oldurl or in the .spec's
321              %changelog section are newer than those generated by SVN.
322
323       revision-offset = REVISION-NUMBER
324              The base revision used to generated changelogs. As in svn log -r
325              REVISION-OFFSET:HEAD URL.
326
327       ignore-string = STRING
328              Mark used to hide log messages. When it appears at the beginning
329              of the log message, the whole changeset log is hidden.  When  it
330              is  found  in  the middle of a string, only the line will not be
331              shown.
332
333       unignore-string = STRING
334              The complement of the previous option. When this token is found,
335              only  those  lines  containg  this  mark  will  be  shown. It is
336              intended to be used in very long log messages.
337
338   [template] section
339       path = PATH
340              Obsolete.  The  path  of  the  template  used  to  generate  the
341              changelog from svn commits.
342
343       name = NAME
344              The name of the template used to generate the changelog from svn
345              commits. Use default or revno.
346
347   [srpm] section
348       run-prep = yes/no
349              Repsys can check for the presence of a file  named  Makefile  in
350              the  top directory of the package and run make prep-srpm so that
351              it can generate the actual files that must be distributed in  in
352              the  srpm.  This option enables this feature. (Note: the command
353              is expected to run in an restricted  environment,  the  Makefile
354              must use only minimal funcionalities.)
355

ENVIRONMENT VARIABLES

357       REPSYS_CONF
358              Sets the configuration file to be read by mgarepo
359

FILES

361       ~/.mgarepo/config
362       /etc/mgarepo.conf
363       /usr/share/mgarepo/
364       /usr/share/doc/mgarepo/
365

BUGS

367       See  the  list  of  bugs  at  http://bugs.mageia.org/buglist.cgi?quick
368       search=mgarepo
369

SEE ALSO

371       mdvsys(1), svn(1), ssh-agent(1)
372
373       https://wiki.mageia.org/en/Packagers_svn
374       https://wiki.mageia.org/en/Mgarepo
375

AUTHOR

377       repsys was originally written by Gustavo Niemeyer <gustavo@niemeyer.net>
378       for the Conectiva Linux distribution. It was then maintained by Mandriva
379       contributors and employees. mgarepo is a fork of repsys maintained by
380       Mageia contributors.
381
382
383
384Mageia                            2011 Jan 11                       mgarepo(8)
Impressum