From Mageia wiki
Jump to: navigation, search

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:

  1. Download the SRPM. The rationale behind this is to keep history for past changes in the RPM
  2. Import the packages with mgarepo import package.src.rpm. Be sure to run this command under your ssh-agent, otherwise the import will fail.
  3. Check out the imported version in a repository with mgarepo.
    1. Special, important steps after importing Mandriva packages:
    2. 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).
    3. Check it does not have unlicensed Mandriva stuff: image (icons), video, audio files, ... etc.
    4. Check software license ( free or not, existence of license file, compare license file to headers containing license information).
  4. Update software on last stable version.
  5. Send patches upstream if possible.
    1. Remove useless cruft, like macros that no longer apply, some examples follow:
    2. Buildroot is no longer necessary
    3. whole %clean section can be removed
    4.  %defattr(-,root,root)
    5.  %mdkversion
    6. ldconfig in post (handled by filetriggers)
  6. check that it builds locally.
  7. commit the update with a good (meaningful and detailed) commit message.
  8. submit package to build for mga.
  9. For submit to work with mgarepo, you need to enable ssh-agent forwarding in your ssh configuration for the host (see the FAQ for details)
  10. See how it builds at