How to import packages
NOTE: The full importing process (import & submit to buildsystem) is only available for full Mageia packager account holders. If you are a Mageia apprentice, you only have commit rights, so you can only import, but not submit. If you don't have a Mageia packager/apprentice account yet, please look at the mentoring process to become packager.
People who had a Mandriva packager account in the past may be granted a full Mageia packager account.
Normally you want to import the original src.rpm, preferably from Mandriva, without changing/rebuilding it beforehand. Afterwards you need to clean it up properly in the steps described below.
Directly importing the original src.rpm from another distro has the following advantages:
- the original changelog gets imported too (this may be of advantage to see earlier changes, or when some older problems resurface)
- you can easily see the changes and the cleaning by looking at the diff from the import -> first commit (this helps investigating issues where someone has played Mr. Proper too seriously and has cleaned way too much ;) )
Step-by-step instructions to import packages to Mageia:
- On Mageia, install the "mgarepo" package using urpmi, version 1.10.0 or later is required. If your development system is still running Mandriva, you can use the Backports repositories to install the "mgarepo" package or alternatively you can rebuild the "mgarepo" package from Mageia Cauldron
- Read the FAQ about the new SVN, and read the Mageia Packaging Guidelines
Import packages using the following process:
- Download the SRPM. The rationale behind this is to keep history for past changes in the RPM
- Import the packages with mgarepo import package.src.rpm. Be sure to run this command under your ssh-agent, otherwise the import will fail.
- Check out the imported version in a repository with mgarepo.
- Special, important steps after importing Mandriva packages:
- Check it does not have "mandriva" / "mandrake" occurrences used as a brand/name in the software (history/changelog is ok, emails for references are ok, also copyright notices in files should be kept).
- Check it does not have unlicensed Mandriva stuff: image (icons), video, audio files, ... etc.
- Check software license ( free or not, existence of license file, compare license file to headers containing license information).
- Update software on last stable version.
- Send patches upstream if possible.
- Remove useless cruft, like macros that no longer apply, some examples follow:
- Buildroot is no longer necessary
- whole %clean section can be removed
- ldconfig in post (handled by filetriggers)
- check that it builds locally.
- commit the update with a good (meaningful and detailed) commit message.
- submit package to build for mga.
- For submit to work with mgarepo, you need to enable ssh-agent forwarding in your ssh configuration for the host pkgsubmit.mageia.org (see the FAQ for details)
- See how it builds at http://pkgsubmit.mageia.org/