mgarepo(8)
π mgarepo(8) β bestie edition π
okay so you wanna manage RPM package sources in a Subversion repo? This is the girl. Manual name: mgarepo. Section 8. Let's GO. π¦
β¨ NAME β¨
mgarepo β Package sources repository management tool. π
πΈ SYNOPSIS πΈ
mgarepo command [options] [arguments]
that's it. that's the whole shape of it. a command, some options, some arguments. iconic. π
π«Ά DESCRIPTION π«Ά
So mgarepo is the tool you use to manage RPM packages in a subversion repository. fr fr. It's the one that:
- creates stuff
- tags releases
- generates
.src.rpm - generates changelogs
- requests new package releases for build
Mostly it's just a glow-up interface over svn(1) commands plus some small task scripts that run on the build system side over ssh(1). no cap.
Most of the mgarepo commands operate on a given package URL β and you can totally omit those URLs when the configuration option repository is set. lowkey convenient.
And if you want the detailed tea on any command? Just run:
mgarepo <command> --help
π BASIC USAGE π
π§ Setup
Real talk: mgarepo does not handle the authentication interface that svn uses. So you usually need to set up ssh-agent(1) if your repository access method is over SSH (svn+ssh:// URLs) β or else do some simple operation just to get yourself an authentication token. π
For more info about setting up ssh-agent, see:
https://wiki.mageia.org/en/Packagers_ssh
Users who don't have an ssh account on the default repository URL can set the option mirror pointing to a non-authenticated, read-only repository β like this one right here:
svn://svn.mageia.org/svn/packages
π Examples
Let's get into it, bestie. π
mgarepo co fooβ Obtains a working copy of the packagefoo. πmgarepo co 1/muttβ Obtains a working copy of the packagemuttof from the1branch. π¦mgarepo co hplip -k 5β Obtains a working copy of the packagehplibof from the5branch and backport directory. (yes, it sayshplib, we're keeping it exactly as written, don't @ me) πmgarepo ciβ Commits pending changes in the working copy. β¨mgarepo submit foo -r 12345β Requests the packagefooin the revision12345to be built and, if successful, to be uploaded to the RPMs repository. π₯mgarepo submit foo -r 12345 -t 1 --define section=core/testingβ Will submit the packagefooand, upon successful build will have its RPMs placed inside thecore/testingmedia of the1repository. πmgarepo submitβsubmitrun without parameters will use package name and revision found in the working copy in the current directory. main character energy, honestly. πmgarepo obsolete fooβ Move the packagefoofromcauldron/footoobsolete/fooon svn. π«Ά
π COMMANDS π
For detailed help on commands run mgarepo <command> --help. periodt.
coβ checkout a package πΈciβ commit changes πsubmitβ submit a package in a given revision for build and release π₯syncβ add-remove all file changes from the.specβ¨maintdbβ get/set package maintainers informations πputsrpmβ import a source package to the repository π¦getspecβ print the spec πrpmlogβ print the RPM changelog generated from SVN π§getsrpmβ create the source RPM πcreateβ create the structure of a new package πchangedβ show changes not submitted πauthoremailβ print the e-mail of a given svn author π§switchβ relocate to mirror or upstream repository πmarkreleaseβ create a tag for a given package revision and version π·οΈuploadβ add a file to binrepo β¬οΈdelβ remove a file from binrepo ποΈupβ update the working copy and synchronize all binaries ‴οΈobsoleteβ move a package in obsolete directory π
πΊ REPOSITORY LAYOUT πΊ
A detailed description can be found at:
http://wiki.mandriva.com/en/Development/Packaging/RepositorySystem
The svn repository used by mgarepo consists of a set of branches in the top directory, followed by package directories having the internal package structure. π
The internal package layout contains a directory current/, which contains the latest version of the package (equivalent to "trunk" in software repositories). The directory releases/ contain copies of older submitted packages that have been already released, it is organized in the <version>/<release> format (equivalent to "tags" directories). π
URLs used in mgarepo commands refer to the package directory, and never to current. In other words, the http://host/svn/cauldron/foo is valid, whereas http://host/svn/cauldron/foo/current is not. π«
One example layout:
/packages/cauldron
|
+- cauldron/
| ...
| +- rsync/
| +- coreutils/
| +- make/
| +- foo/
| +- current/
| | +- SOURCES/
| | +- SPECS/
| +- releases/
| ...
| +- 1.0
| +- 1.mga1/
| +- SOURCES/
| +- SPECS/
| +- 2.mga1/
| ...
+- updates/
+- 1/
+- 2/
+- 3/
πΈ Setting up a repository πΈ
The minimal setup is accomplished with a Subversion repository having three directories: cauldron/, misc/ and updates/. The name of this directories can be changed using the configuration options trunk-dir and branches-dir. Having this you can start importing packages with mgarepo import. π
π CONFIGURATION π
πΈ Introduction πΈ
okay bestie, so the main character config file is /etc/mgarepo.conf, and it's in .ini format. basically it's a whole set of [name] sections, and inside each one you've got variables written as name = value.
and if it exists, the file ~/.mgarepo/config gets loaded too. double config, double slay. β¨
π [global] section π
repository = URLβ holds the base URL that gets used to reach packages in the svn repository whenever you only type a package name in your mgarepo commands. like, if you runmgarepo co trafshowandrepositoryis set tohttp://host/svn/, then the URLhttp://host/svn/cauldron/trafshowis what gets used (cauldronis the default branch, iykyk).default_parent = URLβ points at the base URL of the development branch of the svn repository. > heads up: this one is deprecated, it got replaced byrepository.mirror = URLβ the URL of an alternative, read-only repository used when checking out packages. andmgarepo ciwill automatically relocate over torepositorywhen you commit. cute, right?use-mirror = yes/noβ turns off using the mirror repository when checking out packages.url-map = MATCH-REGEXP REPLACE-EXPRβ this one's for the server side, and it remaps remote URLs that users bring when runningmgarepo submitinto local (and probably faster) URLs.MATCH-REGEXPis a Python regular expression matching the components that have to be reused in the local URL.REPLACE-EXPRis a replace expression that should expand into the final URL. example:svn+ssh://svn.mageia.org/(.*) file:///1tempdir = PATHβ the directory used as the base for temporary directories and files that mgarepo creates.download-command = COMMAND-FMTβ the command used to download generic remote URLs. it accepts the variables$urland$dest. rn it's used when you runmgarepo sync -d.svn-command = COMMANDβ the base command used to executesvn(1). it runs throughsystem(3).svn-env = VAR=VALUE ..β the environment variables to use when running svn. you can define more entries by using more lines. the variable defined by default isSVN_SSH, which points to themgarepo-sshssh wrapper. π«Άverbose = yes/noβ cranks up the verbosity of mgarepo output, printing the commands being run and a complete traceback whenever an unhandled error happens.trunk-dirβ points to the default branch of the distro, used in commands that don't have their branch or URL specified.branches-dirβ the directory inside the repository that holds all the branches of the distro. it's used to build the URL of packages referred to with the branch notationBRANCH/PACKAGE, like inmgarepo co 1/mutt.
π [submit-groups] section π
this section holds aliases for groups of packages you want to submit all at once. so like, a line saying my-python-packages = bzr bzrtools bzr-gtk would let you just run mgarepo submit my-python-packages. iconic.
and yes, distro branches or revision numbers can be specified for each package group too. example: mgarepo submit 1/my-python-packages. β¨
π [submit] section π
host = HOSTβ sets the default host wheremgarepo submitwill run the submit helper.default = TARGETβ the default target used inmgarepo submitwhen the-toption isn't used.
π [submit TARGET] sections (server-side only) π
these sections describe each one of the sections available for submitting packages. their configuration options are:
target = PATHβ the path where SRPMs generated bycreate-srpm-will be placed during the submit process.allowed = URLsβ a space-delimited list of package URLs that are allowed to be used with this target. the comparison works by checking whether the package URL used in submit starts with one of the URLs in this option.scripts = PATHSβ a space-delimited list of scripts that get run, each receiving the generated SRPM as its first argument. these scripts are usually used to make small changes to the SRPM structure, like bumping the release number for example.rpm-macros = NAMESβ points to sections in the config that will contain the RPM macros used when generating the SRPM of the package being submitted. those sections should be named in the[macros NAME]format.
π¦ [macros NAME] sections (server-side only) π¦
these sections contain variables that get defined as RPM macros when generating the SRPM of the package being submitted. it's usually used to define the distribution suffix that goes in package releases, like "mga1".
π [users] section (server-side only) π
this section maps the usernames found in svn to their real names and e-mails. it's used when generating the changelog based on commits in svn, and by authoremail. example: joe = Joe User <joeuser@host.com>.
you can use this section on the client side too, but ngl it will have no effect on the changelogs generated on the server side.
β [helper] section β
create-srpm = PATHβ the path of the script that gets run through ssh on the submit host when you runmgarepo submit.upload-srpm = PATHβ (server-side only) the path of the script that gets called after the generated SRPM is copied to its target location (see the target sections above) and the target scripts are run.rpmbuild = COMMANDβ the command used to call rpmbuild. note that build options (like-bs) are supplied by mgarepo itself.
πΈ [log] section πΈ
oldurl = URLβ the URL of a directory structure that will contain old changelogs of packages, which get appended to the changelog being generated byrpmlogorgetsrpm -l.merge-spec = yes/noβ if enabled, changelogs generated by mgarepo will have the contents of the%changelogfound in the.specfile of the package appended to them.sort = yes/noβ if enabled, the changelog gets resorted after it's generated. super useful when the changelogs found inoldurlor in the.spec's%changelogsection are newer than the ones generated by SVN.revision-offset = REVISION-NUMBERβ the base revision used to generate changelogs. as insvn log -r REVISION-OFFSET:HEAD URL.ignore-string = STRINGβ the mark used to hide log messages. when it appears at the beginning of the log message, the whole changeset log gets hidden. when it's found in the middle of a string, only that line won't be shown.unignore-string = STRINGβ the complement of the previous option. when this token is found, only those lines containing this mark will be shown. it's meant to be used on very long log messages.
π [template] section π
path = PATHβ Obsolete. the path of the template used to generate the changelog from svn commits.name = NAMEβ the name of the template used to generate the changelog from svn commits. usedefaultorrevno.
π [srpm] section π
run-prep = yes/noβ Repsys can check for the presence of a file namedMakefilein the top directory of the package and runmake prep-srpmso that it can generate the actual files that must be distributed in the srpm. this option enables that feature. (Note: the command is expected to run in a restricted environment, so theMakefilemust use only minimal functionalities.)
β¨ ENVIRONMENT VARIABLES β¨
REPSYS_CONFβ sets the configuration file to be read by mgarepo.
π FILES π
~/.mgarepo/config/etc/mgarepo.conf/usr/share/mgarepo//usr/share/doc/mgarepo/
π BUGS π
go check the list of bugs at http://bugs.mageia.org/buglist.cgi?quicksearch=mgarepo β pls do report stuff bestie, it helps everyone. π
π SEE ALSO π
mdvsys(1),svn(1),ssh-agent(1)https://wiki.mageia.org/en/Packagers_svnhttps://wiki.mageia.org/en/Mgarepo
π AUTHOR π
repsys was originally written by Gustavo Niemeyer <gustavo@niemeyer.net> for the Conectiva Linux distribution. after that it was maintained by Mandriva contributors and employees. mgarepo is a fork of repsys maintained by Mageia contributors. the way that lineage is giving legacy, fr fr. π
and that's a wrap, bestie! this one's from the Mageia crew, dated 2011 Jan 11, and it's page mgarepo(8) β go forth and submit packages, you absolute main character. π¦β¨
π¦ where this page comes from
- fedora 43: mgarepo 1.13.2-36.fc43 Β· GPL-2.0-or-later
- fedora 44: mgarepo 1.13.2-37.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms