Porting Mandriva packages to other/older distributions

From Mandriva Community Wiki

Jump to: navigation, search
Porting Mandriva packages to other/older distributions

Many packages in Mandriva support rebuilding on older releases of the distribution. Some may even support being rebuilt on other distributions (with some compatability macros). This page covers some of the issues that arise when doing so.

Contents


[edit] Place holder

This page is currently a placeholder for a guide on back/cross-porting Mandriva RPMs to older releases or other semi-compatible distributions.

[edit] Policy

Acceptance of packages in the "backports" sub-media of "main" and "contrib" media is described in the software media page.

[edit] Uploading in backports media

[edit] From a package not hosted in the SVN build system

$ mdv-youri-submit --define section=[main|contrib]/backports <version> <package>.src.rpm

[edit] From a package in cooker SVN build system

[edit] From original cooker package

To upload directly a package from its cooker version to the stable version without any changes:

$ repsys submit -t <version> --define section=[main|contrib]/backports <package> <rev>

This way is useful when the cooker package directly builds on the backport target, and does not require any modification for the backport target.

[edit] From a new branch

If the backported package can not be made directly from its cooker version, or if it needs a different development branch, a specific branch can be created in the backport target SVN.

  • if the package is not already in SVN for the backport target, a new module has to be created on SVN: repsys create svn+ssh://svn.mandriva.com/svn/packages/updates/2008.1/<package>
  • create backport branch: svn mkdir -m "prepare <package> branches" svn+ssh://svn.mandriva.com/svn/packages/updates/2008.1/<package>/branches/
  • copy the cooker SVN module to a "backports" branch: svn cp -m "copy cooker <package> to 2008.1 backports" svn+ssh://svn.mandriva.com/svn/packages/cooker/<package> svn+ssh://svn.mandriva.com/svn/packages/updates/2008.1/<package>/branches/backports
  • checkout: svn co svn+ssh://svn.mandriva.com/svn/packages//updates/2008.1/<package>/branches/backports/current <package>
  • cd <package>
  • make some modification for the backport target
  • checkin your modifications: svn ci
  • upload in the "backports" medium: repsys submit -t 2008.1 --define section=[main|contrib]/backports svn+ssh://svn.mandriva.com/svn/packages/updates/2008.1/<package>/branches/backports <rev>

[edit] Building Mandriva SRPMS on other distributions

In many cases, all that is necessary to rebuild Mandriva SRPMS are macro definitions for the Mandriva macros.

For Red-Hat based systems (RHEL, CentOS, Fedora), Download Image:Macros.mdk4rh to /etc/rpm/macros, and edit the file, setting distversion and/or distsuffix to more appropriate values.

Personal tools
Ad (via La Vignette)
Looking for a job?