Development/Howto/Maintainer

From Mandriva Community Wiki

Jump to: navigation, search
Maintainer Guide

Contents


[edit] Prerequisite

In order to maintain your package, you'll need several resources. As everything is still manually handled, make your sure you get all the following:

  • build cluster account on all systems (cooker and stables)
  • proper sudo permissions for all needed commands ( ue, rurpmi, rpmctl, urpmi, ...)
  • subscription to maintainers mailing-list
  • bugzilla account, in the maintainer group

[edit] Process overview

The package releasing process depends on several factors:

  • branches (cooker, 2006.0, 10.2, etc...)
  • section (main, contrib)
  • repository
  • architecture

Cooker is the dedicated development branch. All maintainers can freely release new updated packages in the contrib section. The main section is more restricted, only some maintainers can release updated packages, and new packages upon permission only. Usually packages should be uploaded to the /release repository of the appropriate section. The /testing repository is available for testing particularly dangerous changes.

The /release repositories of stable releases are frozen, meaning you can't upload packages there. The /testing and /updates repositories of the main section are used for issuing official security updates according to the Post-Release Support Policy (basically, you upload to /testing and pass the baton to the QA and security teams, who will take care of moving it to /updates). The contrib section is similar except the security and QA teams have no involvement, you will upload to /updates directly. The /backports repositories of both main and contrib are available for non-bugfix or security related updates.

Concerning architectures, the two officialy supported ones are i586 and x86_64. You have to make sure your package builds correctly on all of them. There are also other architectures, either developed internally or by the community. See Ports for details.

[edit] Technical details

[edit] Build facility

The Mandriva build facility is composed of a cluster of build hosts, each running Cooker as the main system:

  • i586 hosts: n1, n2, n3, n4, n5
  • x86_64 host: seggie, deborah, celeste, klodia

To build on older distribution versions, you must use iurt to create an appropriate chroot, see below for details.

Your homedir is located on one of the i586 nodes, and is mounted through NFS on each of the others for cooker systems only.

Your account is managed through NIS. If your password expires, you have to change it through yppasswd.

A Mandriva mirror, synced with the primary mirror every 20 minutes, is available on /mnt/BIG/.

External access is possible from the gateway (kenobi), trough SSH.

You can configure your ~/.ssh/config file on your computer to automatically have SSH use the gateway to log on to the cluster:

Host n1 n2 n3 n4 n5 seggie deborah celeste klodia
    ForwardAgent yes
    ProxyCommand ssh -qax kenobi.mandriva.com /usr/bin/nc %h %p

To be able to use the subversion repository on your buildhost, you should also configure ForwardAgent yes in ~/.ssh/config on Kenobi. Make sure your home system is running ssh-agent too.

[edit] Configuring your environment

The first thing you have to do is to set up your RPM build environment, following RPM Howto. There is no need to set up a GPG signature, however, as your packages will automatically get resigned with the official MDK keys when they will be uploaded.

Building on an NFS-mounted directory may cause troubles:

  • locking problems
  • slower read/write access

As a consequence, you'd better always build from the node where your home dir is located. When you don't have the choice, such as for the x86_64 arch, you may redefine the relevant rpm macro:

%_builddir      %(if [ "$(hostname -a)" == "deborah" ]; then echo -n "/export/$HOME/rpm/BUILD"; else echo -n "%{_topdir}/BUILD"; fi)

[edit] Installing packages

On cooker systems, binary package installation is done through the rurpmi command, via sudo:

  • sudo rurpmi foo to install or update foo package
  • sudo rurpme foo to remove foo package

On the stable systems, binary package installation is done through standard urpm* commands, via sudo:

  • sudo urpmi foo to install or update foo package
  • sudo urpme foo to remove foo package

On all systems, source package installation can be done from the /SRPMS directory.

[edit] Building packages

You can either use rpm directly to build your package within your rpm build tree, or use iurt to build your package in a clean chroot: see Iurt Howto for details.

Your packages will be rebuilt anyway by iurt after submission, and you will receive a mail if something goes wrong.

Mandriva is switching to a new buildsystem. Currently we are in the middle of the migration, so you may find some conflicting documentation here and there. For a step by step walkthrough about building a package for cooker and using svn, please see Repository System Quickstart. A quick reference page is also available at Build System Quickref.

[edit] Building packages for older distributions

You must use Iurt if you want to compile your packages on older version.

sudo iurt2006 package.src.rpm to build on a 2006.0 sudo iurt2007 package.src.rpm to build on a 2007.0

If you just want a chroot, use sudo iurt<version> --shell

[edit] Uploading packages

Please see Repository System Quickstart -- Submitting.

The queue is processed approximately every 5 minutes. All packages undergo some basic checks, such as existence of newer release existence, lack of continuity in history, etc... If any of those checks fails, the upload is canceled, and you get the errors list. Otherwise, the package is either put in a compilation queue, waiting for the build bot to recompile them. If the rebuild failed, you get a warning mail; if it succeeds, the packages are pushed to the upload server. A notification mail is then sent to the changelog mailing list. The changelog mail is only triggered by the source package file.

You have an overview of the compilation queue at http://svn.mandriva.com/

[edit] Uploading a package during version freeze

During the freeze period, if you want to upload a package:

  • You are not sure of your fix and you want it to be tested

Upload it with:

mdv-youri-submit --define section={main,contrib}/testing cooker <package>

It will appear on the media that are publicly available, and everybody will be able to test it and give you feedback. Once uploaded, you are encouraged to send a mail on cooker asking for tests.

You MUST include a bugzilla bug ID in your changelog. If there is no associated bug, try to explain clearly what was the bug and if possible how to reproduce it.

You must only provide the Source package, it will be recompiled by iurt and uploaded if the build succeeded.

You can see the current queue status from the cluster on http://svn.mandriva.com (this is quite raw but there is nothing better right now).

  • You have really tested your fix, and this package is critically needed

Please ask a distrib-admin ( request) to upload your package via using on the cluster:

mdv-youri-submit --define section={main,contrib}/release <package>

[edit] Asking permissions

Some actions require approval:

  • ask for everything related to updates for stable branches, official flavour
  • ask for everything else

[edit] Managing external contributor's packages

Submitted packages are available from /mnt/BIG/dis/incoming/, which is read only from the cluster nodes, and write accessible from kenobi. You can install them, then rebuild and upload them as if they were your own packages. By doing so you are effectively endorsing responsability, and you'll be granted maintainer status for them, so check they are correct first! Don't forget to remove them afterward.

The usual way to acknowledge someone else's work is to keep your @mandriva.org address for the changelog entry, then quote the original contributor changes:

* Tue Dec 19 2000 Lenny Cartier <[email protected]> 1.0-1mdk
- used srpm from Guillaume Rousse <[email protected]> :

Whatever decision you make about such a contributed package, take the time to reply to the original contributor, explaining the changes you had to make before accepting it, or alternatively the reasons for your rejection.

[edit] Other

Package maintainership can be changed throught the pages at http://maint.mandriva.com/

You can use /usr/local/bin/check_sync to get an overview of differences between arches

/usr/local/bin/check_sync /mnt/BIG/dis/cooker/ i586 x86_64
Total missing x86_64 main: 140
Total extra x86_64 main: 24
Total unsynchro x86_64 main: 482
Total missing x86_64 contrib: 913
Total extra x86_64 contrib: 102
Total unsynchro x86_64 contrib: 622

With check_sync -v, you can have the list of packages which are not correctly rebuilt.

Personal tools