Other languages English ; Français ; |
Contents
- 1 How to see the sources
- 2 FAQ
- 2.1 Is there anonymous access to svn?
- 2.2 I am a packager, how can I set up SSH on my box?
- 2.3 Does mgarepo support split binrepos?
- 2.4 I am a packager, how can I check out a package from SVN?
- 2.5 How can I commit my modifications?
- 2.6 How to update a package to a new version?
- 2.7 How can I see if a package that is already checked out on my hard drive has been updated?
- 2.8 Where can I follow changes to packages?
- 2.9 How to query if a commit has already been submitted
- 2.10 In case of errors, how can I revert a commit?
- 2.11 In case of misspell, how can I edit svn:log?
- 2.12 How can I import a new package to SVN ?
- 2.13 Where can I get mgarepo?
- 2.14 How to drop a package from SVN?
- 2.15 How to know from which branch is my local copy
How to see the sources
In "Mageia control center" → Software management → "Configure media sources for install and update", install the package "mgarepo" (meaning "Mageia's repository"). Then in /etc/mgarepo.conf , replace
repository = svn+ssh://svn.mageia.org/svn/packages/ |
by
repository = svn://svn.mageia.org/svn/packages/ |
then, to download, for instance, the source of the package "libreoffice-kde", in a terminal, launch:
$ mgarepo co libreoffice-kde |
FAQ
Is there anonymous access to svn?
- Yes, you can use for example:
svn co svn://svn.mageia.org/svn/packages/cauldron/$PACKAGE_NAME/current $PACKAGE_NAME |
This will check out the spec file and patches of $PACKAGE_NAME, but not the sources.
To get the associated sources, go to the directory 'cd $PACKAGE_NAME/SOURCES/', and then 'cat sha1.lst' will give you something like:
3f17f9de3e1d95ec2be5982f90f2362e474ed9ca fooarchive-0.1.tgz 5a513f683c8b2ec6d2d8c097dbd37e50311d92e3 bararchive-0.2.tgz |
For each line, do:
wget http://binrepo.mageia.org/3f17f9de3e1d95ec2be5982f90f2362e474ed9ca -O fooarchive-0.1.tgz |
wget http://binrepo.mageia.org/5a513f683c8b2ec6d2d8c097dbd37e50311d92e3 -O bararchive-0.2.tgz |
You can then build (after go back to the parent $PACKAGE_NAME directory):
rpmbuild --define "_sourcedir `pwd`/SOURCES" -ba ./SPECS/$PACKAGE_NAME.spec |
- You can also use the SVN web interface to view the rpm spec file and patches of any package.
I am a packager, how can I set up SSH on my box?
To use mgarepo to check out packages from SVN, import new packages or submit packages to the Build System you need to set up SSH on your box; to do so have a look at Basic SSH configuration for packagers.
Does mgarepo support split binrepos?
I am a packager, how can I check out a package from SVN?
mgarepo co $PACKAGE_NAME |
How can I commit my modifications?
Using either:
mgarepo ci |
or
svn commit |
How to update a package to a new version?
When updating a package to a new version, one used to put the new tarball in SOURCES, then
svn rm SOURCES/$previous |
svn add SOURCES/$new |
update spec file and
svn ci |
This has changed a bit in Mageia as the split binrepos is used in mgarepo.
You can use mgarepo upload /path/to/new/tarball.tar.* It will upload the tarball to binrepos, and update the sha1 file. However, you still need to remove the old tarball using
mgarepo del /path/to/old/tarball.tar.* |
Or you can use mgarepo sync: to see what it's going to do (without actually doing any changes):
mgarepo sync --dry-run |
Once you're sure it's working as expected, actually sync the changes locally:
mgarepo sync |
Remember to commit the changes on sha1 file after operations on binary files with
mgarepo ci |
How can I see if a package that is already checked out on my hard drive has been updated?
Previously, you would go to the directory and run "svn up". Now the equivalent is using:
mgarepo up |
This is needed now to be able to check out the newer tarball (if any) from the binrepos SVN.
Where can I follow changes to packages?
- To see the progress of currently building packages, you can use the Mageia Build System status web page.
- Browsing the SVN using the SVN web interface in any web browser – browser quicksearch features can help to easily access this information, see e.g. http://kb.mozillazine.org/Using_keyword_searches
You can also look at http://cia.vc/stats/project/Mageia for an overview of commits in Mageia source version control system.- To see a live record of the commits in Mageia you can join #mageia-commits IRC channel of the Libera.chat network
- mgarepo log packagename will show the svn log for current/ branch from SVN
How to query if a commit has already been submitted
- see also above, Mageia Build System status web page can be used to quickly search for recent package submits
- additional, one can compare via the SVN web interface the $PACKAGE_NAME/releases information against $PACKAGE_NAME/current/SPECS/$PACKAGE_NAME?view=log information
- svn log svn+ssh://svn.mageia.org/svn/packages/cauldron/$PACKAGE_NAME/release will show the releases/submissions of this package - can be easily queried via a shell function:
function svnrel2() { svn log svn+ssh://svn.mageia.org/svn/packages/cauldron/"$@"/releases } |
In case of errors, how can I revert a commit?
You can do
svn merge -rxx:yy SPECS/foo.spec |
- xx is current revision
- yy is last working revision
- SPECS/foo.spec is the file for which you want to revert changes
- in the root of your local checkout, you can also use as the filename if you want to revert all changes to the checkout
If you only want to revert exactly one revision, then use
svn merge -c -yy SOURCES/somefile |
- yy is last working revision
- SOURCES/somefile is the file for which you want to revert changes
- in the root of your local checkout, you can also use . as the filename if you want to revert all changes to the checkout.
In case of misspell, how can I edit svn:log?
You can do
svn propedit --revprop svn:log -r <revision> |
in a local checkout after setting the EDITOR env var to your favorite editor, or you can do
svn pe --revprop -r <revision> svn:log svn+ssh://svn.mageia.org/svn/packages --editor-cmd nano |
to directly work on the remote repository and directly specifying your favorite editor.
How can I import a new package to SVN ?
mgarepo import *.src.rpm |
or, as it's only an alias, as you can see from the mgarepo manpage or --help output:
mgarepo import *.src.rpm |
You can optionally provide an import log message, other than the default "imported package foobar" if you want to do proper attribution to the original package creator, or give a reason for the import, with the -l switch, like so:
mgarepo import *.src.rpm -l 'your import message here' |
Where can I get mgarepo?
Using urpmi
# urpmi mgarepo |
How to drop a package from SVN?
There is a directory to move old packages that are no longer needed, but still keep them available in case they are needed later
- To move a package to this directory use
mgarepo obsolete <pkg> -m "SILENT <message here>" |
- Please remember to use SILENT, in case the package get's restored this message does not appear in the changelog.
- For further steps on how to obsolete a package so that it will be removed from enduser systems and mirrors, see Obsoleting_a_package
How to know from which branch is my local copy
If you have a local copy of a package from svn, and you don't remember from which release is the copy, you use
svn info |
Then you get something like
Relative URL: ^/updates/8/sogo/current |
or in case of cauldron
Relative URL : ^/cauldron/python-django/current |
saying that local copy is from Mageia 8, respectively cauldron