Porting Mandriva packages to other/older distributions

From Mandriva Community Wiki

Jump to: navigation, search


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


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.

Policy

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

Uploading in backports media

From a package not hosted in the SVN build system

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

From a package in cooker SVN build system

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. To know the revision, you can checkout the package, and use "mdvsys info"

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.

  • create backport branch: svn mkdir -m "prepare <package> branches" svn+ssh://svn.mandriva.com/svn/packages/updates/2009.0/<package>/branches/
  • copy the cooker SVN module to a "backports" branch: svn cp -m "copy cooker <package> to 2009.0 backports" svn+ssh://svn.mandriva.com/svn/packages/cooker/<package> svn+ssh://svn.mandriva.com/svn/packages/updates/2009.0/<package>/branches/backports
  • checkout: svn co svn+ssh://svn.mandriva.com/svn/packages//updates/2009.0/<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 2009.0 --define section=[main|contrib]/backports svn+ssh://svn.mandriva.com/svn/packages/updates/2009.0/<package>/branches/backports <rev>

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 File:Macros.mdk4rh to /etc/rpm/macros, and edit the file, setting distversion and/or distsuffix to more appropriate values.

Personal tools