Package maintainer tutorial

From Mandriva Community Wiki

Jump to: navigation, search


This tutorial is a quick introduction to mandriva package maintaining, intended to be used as the base for a short interactive course by existing packagers mentoring new ones.

Contents


Prerequisite checking

First questions:

  • are you running cooker?
  • are you familiar with ssh and ssh agent?
  • are you familiar with rpm?
  • are you familiar with urpm*?
  • are you familiar with subversion?
  • are you familiar with rpm building?

Mandriva setup

Given the lack of user account setup automation, and the multiple authentication backends available, a few manual steps are needed in order to initialize account with a single identity:

  • register any mail adress to maintainers@mandriva.com ML
  • ensure your login@mandriva.org email address redirect to your regular email address
  • ensure your bugzilla identity is login@mandriva.org
  • my.mandriva.com account
  • cluster access
    • test ssh connection to kenobi
    • test connection from kenobi to the node hosting your home directory
    • test connection to subversion from the node hosting your home directory

See also:

Home setup

Needed packages installation:

  • The package rpm which is our patched version of Red Hat's.
  • The package rpm-build which holds scripts used to build packages.
  • The package spec-helper which is a tool to minimalize the specfiles by doing automatic things such as stripping the binaries and compressing the man pages.
  • The package libtool which is used by some configure scripts to build shared libraries.
  • The package rpmlint which is used to check the validity of the generated src.rpm.

Files creation:

  • ~/.rpmmacros file
  • rpm build tree
   mkdir -p ~/rpm/{BUILD,BUILDROOT,RPMS/{$ARCH,noarch},SOURCES,SRPMS,SPECS,tmp} 

Replace $ARCH with the architecture(s): i586 / x86_64

RPM

perl-IO-Null

http://merlin.mongueurs.net/pub/rpm1/

  • study spec file
  • create rpm
  • create source rpm

perl-Getopt-Long

http://merlin.mongueurs.net/pub/rpm2/

  • correct errors
  • create rpm

Build System

Cooker package manual update

Working locally

  • mdvsys co perl-IO-Null / perl-GetOpt-Long / ncmpc
  • cd $1
  • svn info
  • svn up
  • update %mkrel
  • bm -l
  • rpm -Uvh
  • svn di
  • svn ci -m 'update mkrel to test'

Working on the cluster

  • ssh kenobi.mandriva.com
  • mdvsys co perl-IO-Null / perl-GetOpt-Long / ncmpc
  • cd $1
  • bm -ls SPECS/... ==> error
  • bm -ls --nodeps
  • OU repsys getsrpm perl-IO-Null
  • ssh n1 / celeste
  • sudo iurt ./perl-IO-Null-1.01-1mdv2008.0.src.rpm
  • $HOME/iurt/...
  • logout
  • mdvsys submit
  • mdvsys submit perl-IO-Null
  • checking http://kenobi.mandriva.com/bs/output.php

Cooker package automatic update

  • mdvsys update perl-IO-Null
  • mdvsys update perl-IO-Null $newver )

Maintainer database

  • adopt packages
http://maint.mandriva.com/listpkgs.php?scount=4000&owner=1
  • see self packages
http://maint.mandriva.com/listpkgs.php?owner=85

QA reports

Youri demo http://youri.zarb.org/demo/mandriva/

  • age: last build > 1 year ago
  • missing: discrepancies between source and binaries
  • orphans: no maintainer
  • rpmcheck: dependency issue
  • updates: new version available

http://youri.zarb.org/demo/mandriva/jquelin@mandriva.org/index.html ==> for my own packages use the rss + mdvsys update mdvsys mass-update

Personal tools