Projet

Général

Profil

EoleDebianPackaging24 » Historique » Version 4

« Précédent - Version 4/28 (diff) - Suivant » - Version actuelle
Benjamin Bohard, 24/07/2012 15:54
typo


Debian packaging pour EOLE 2.4

Introduction

Nous ne décrirons pas ici comment créer un paquet debian, mais
quelques règles utiles lors de la création d’un paquet debian pour
EOLE.

La principale cible de cette documentation est le packaging pour Ubuntu Precise Pangolin.

debian/control

Source: <package>
Section: <(admin|web|vcs|...)>
Priority: optional
Maintainer: Équipe Eole <eole@ac-dijon.fr>
Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.3
Homepage: http://eole.orion.education.fr/diff/
Vcs-Git: http://dev-eole.ac-dijon.fr/git/<package>
Vcs-Browser: http://dev-eole.ac-dijon.fr/projects/<package>/repository

Package: <package>
Architecture: all
Depends: ${misc:Depends}
Description: <MAX 72 CHARS>
 <DESCRIPTION>
 .
 <PARAGRAPHE SEPARATED BY DOT>

Package: <package>-doc
Architecture: all
Description: <MAX 72 CHARS>
 <DESCRIPTION>
 .
 <PARAGRAPHE SEPARATED BY DOT>

Package: <package>-tests
Architecture: all
Depends: <package>
Description: <MAX 72 CHARS>
 <DESCRIPTION>
 .
 <PARAGRAPHE SEPARATED BY DOT>

Paquets sources et binaires python

Il faut ajouter :

  • Build-Depends du paquet source: python-all-dev
  • Depends du/des paquet(s) binaire(s): ${python:Depends}

debian/rules

Pour tous

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
    dh $@

Pour paquet python

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
    dh $@ --with python2

debian/compat

9

debian/source/format

De ce paramètre découle qui est responsable de l’incrémentation du numéro de version ou de l’absence totale de fichier dans la branche dite upstream (chez EOLE, la branche master)

Les développeurs

L’idée est de dire que le paquet debian ne peut pas contenir de modification du code source (tout ce qui est en dehors du répertoire debian), sans qu’il y ait eu un nouveau numéro de version.

Dans notre cas, un tag nommé release/%(version)s, qui engendrera un paquet debian avec des numéros de version :

  • %(version)s-1 pour le premier build ;
  • %(version)s-2 pour le second build qui ne doit corriger que des erreurs de packaging ou avoir un patch pour upstream dans debian/patches ;
  • %(version)s-3 pour le troisième build qui ne doit corriger que des erreurs de packaging ou avoir un patch pour upstream dans debian/patches ;
3.0 (quilt)

Les packageurs

Les modifications de code source sont autorisé sur la branche de packaging sans nouveau tag upstream.
La branche upstream peut-être complètement vide (cas des métapaquets de dépendances *-pkg)

3.0 (native)

debian/copyright

Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: <package
Source: <UPSTREAM URL>

Files: *
Copyright: <YEAR1>,<YEAR2>,<YEAR3> <UPSTREAM AUTHOR NAME> <UPSTREAM AUTHOR EMAIL>
Copyright: <YEAR1>,<YEAR2>,<YEAR3> <UPSTREAM AUTHOR NAME> <UPSTREAM AUTHOR EMAIL>
License: GPL-3+

Files: debian/*
Copyright: <YEAR1>,<YEAR2>,<YEAR3> Équipe EOLE <eole@ac-dijon.fr>
License: GPL-3+

License: GPL-3+
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 .
 This package is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 .
 You should have received a copy of the GNU General Public License
 along with this program. If not, see <http://www.gnu.org/licenses/>.
 .
 On Debian systems, the complete text of the GNU General
 Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".