Changeset 109


Ignore:
Timestamp:
07/03/06 08:25:48 (18 years ago)
Author:
nanardon
Message:
  • add translation by baud123
Location:
trunk/fairerpms
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/fairerpms/Makefile

    r106 r109  
    77 
    88FIGURES= \ 
    9         rpm-building.fig 
     9        rpm-building.fig rpm-building-en.fig 
    1010 
    1111IMAGES= \ 
  • trunk/fairerpms/presentation_en.tex

    r106 r109  
    77 
    88 
    9 \title{RPM et politique de packaging} 
    10 \subtitle{Adapter un rpm à sa distribution} 
     9\title{RPM and policy for packaging} 
     10\subtitle{Adapt a rpm to a GNU/Linux distribution} 
    1111\author{Olivier Thauvin} 
    1212\email{olivier.thauvin@aerov.jussieu.fr} 
     
    2525\end{slide} 
    2626 
    27 \part{RPM rappel} 
     27\part{RPM reminder} 
    2828 
    2929\overlays{2}{ 
    3030\begin{slide}{RPM: Rpm Package Manager} 
    31 Qu'est ce ? 
    32 \begin{itemize} 
    33     \item un ensemble d'outils 
    34     \item un format d'archive (.rpm) 
    35     \item des fichiers au format rpm 
     31What is it ? 
     32\begin{itemize} 
     33    \item a set of tools 
     34    \item an archive format (.rpm) 
     35    \item files in rpm format  
    3636\end{itemize} 
    3737\bigskip 
    3838 
    3939\FromSlide{2} 
    40 Rôle: 
    41 \begin{itemize} 
    42 \item installer 
    43 \item inventorier 
    44 \item controler 
    45 %\item faciliter l'installation des logiciels 
    46 %\item suivi des version (evr) 
    47 %\item assurer que l'environnement est compatible avec le logiciel 
    48 %\item assurer l'intégrité du système 
    49 \end{itemize} 
    50 \end{slide} 
    51 } 
    52  
    53 \begin{slide}{le paquet} 
    54 Un fichier .rpm contenant: 
    55 \begin{itemize} 
    56 \item{entête} les informations sur le rpm 
     40Role: 
     41\begin{itemize} 
     42\item install 
     43\item list 
     44\item control 
     45%\item make easier software installation  
     46%\item versioning (evr) 
     47%\item ensure that the environment is compatible with the software 
     48%\item ensure system's integrity 
     49\end{itemize} 
     50\end{slide} 
     51} 
     52 
     53\begin{slide}{the package} 
     54An .rpm file containing: 
     55\begin{itemize} 
     56\item{entête} informations about the rpm 
    5757    \begin{itemize} 
    58     \item des informations pratiques sur le logiciel (nom, version, url, \ldots) 
    59     \item sur la fabrication du rpm 
    60     \item une liste de dépendances 
    61     \item la liste des fichiers contenus 
    62     \item l'historique du paquet (changelog) 
     58    \item practical informations about the software (name, version, url, \ldots) 
     59    \item to make the rpm 
     60    \item a list of dependances 
     61    \item a list of files provided 
     62    \item history of the package (changelog) 
    6363    \end{itemize} 
    64 \item une archive contenant les fichiers  
    65 \end{itemize} 
    66 \end{slide} 
    67  
    68 \begin{slide}{faire un rpm} 
     64\item an archive containing the files  
     65\end{itemize} 
     66\end{slide} 
     67 
     68\begin{slide}{making an rpm} 
    6969\begin{center} 
    70 \includegraphics*[height=1\textheight]{rpm-building} 
     70\includegraphics*[height=1\textheight]{rpm-building-en} 
    7171\end{center} 
    7272\end{slide} 
    7373 
    74 \begin{slide}{le fichier spec} 
    75 Il décrit: 
    76 \begin{itemize} 
    77 \item le (ou les) rpm(s) produit(s) 
    78 \item le moyen de compiler le logiciel 
    79 \end{itemize} 
    80 \bigskip 
    81 Il est composé de sections: 
    82 \begin{itemize} 
    83 \item En-tête, \%description 
     74\begin{slide}{the spec file} 
     75It describes: 
     76\begin{itemize} 
     77\item the rpm(s) produced(s) 
     78\item the compiling of the software 
     79\end{itemize} 
     80\bigskip 
     81There are the following sections: 
     82\begin{itemize} 
     83\item header, \%description 
    8484\item \%package 
    8585\item \%prep, \%build, \%install, \%check 
     
    9090\end{slide} 
    9191 
    92 \begin{slide}{specfile: exemple} 
     92\begin{slide}{specfile: example} 
    9393\begin{small} 
    9494\verbatiminput{simple.spec} 
     
    9696\begin{verbatim} 
    9797$ rpm -ba simple.spec 
    98 Ecrit: /home/users/olivier/RPM/SRPMS/simple-1-1.src.rpm 
     98Write: /home/users/olivier/RPM/SRPMS/simple-1-1.src.rpm 
    9999\o/ 
    100100\end{verbatim} 
     
    102102\end{slide} 
    103103 
    104 \begin{slide}{les macros} 
    105 Variable propres à rpm. 
     104\begin{slide}{macros} 
     105RPM specific variables. 
    106106 
    107107Origine: 
    108108\begin{tabular}{|l|l|} 
    109109\hline 
    110 localisation&fournisseur\\ 
    111 \hline 
    112 \hline 
    113 fichiers macros systèmes&rpm\\ 
    114 \hline 
    115 fichiers macros systèmes&distribution\\ 
    116 \hline 
    117 \verb+~/.rpmmacros+&utilisateur\\ 
    118 \hline 
    119 fichier spec&packager\\ 
     110where&provider\\ 
     111\hline 
     112\hline 
     113system macros files&rpm\\ 
     114\hline 
     115system macros files&distribution\\ 
     116\hline 
     117\verb+~/.rpmmacros+&user\\ 
     118\hline 
     119spec file&packager\\ 
    120120\hline 
    121121\end{tabular} 
    122122 
    123123\bigskip 
    124 Elles fournissent des valeurs ou des fonctions. 
    125 \end{slide} 
    126  
    127 \part{Politique: généralité} 
     124They provide values or functions. 
     125\end{slide} 
     126 
     127\part{Policy: introduction} 
    128128 
    129129\overlays{2}{ 
    130 \begin{slide}{Pourquoi définir une politique} 
    131 \begin{itemize} 
    132 \item homogénéité 
    133 \item factorisation du travail 
    134 \item qualité 
    135 \item faciliter le travail 
    136 \end{itemize} 
    137 \bigskip 
    138 Bref, c'est bien (tm) 
     130\begin{slide}{Why defining a policy} 
     131\begin{itemize} 
     132\item homogeneity 
     133\item work factorisation 
     134\item quality 
     135\item ease the work 
     136\end{itemize} 
     137\bigskip 
     138In brief, that's good (tm) 
    139139\bigskip 
    140140 
    141141\FromSlide{2} 
    142 Elle doit être: 
    143 \begin{itemize} 
    144 \item justifiée 
    145 \item expliquée 
    146 \item discutée 
    147 \item documentée 
    148 \item approuvée 
    149 \end{itemize} 
    150 \end{slide} 
    151 } 
    152  
    153 \begin{slide}{Root est méchant} 
    154 On ne construit pas sous root,\\ 
    155 On ne construit pas sous root,\\ 
    156 Et on ne construit pas sous root.\\ 
    157 \bigskip 
    158  
    159 Risques : 
    160 \begin{itemize} 
    161 \item polluer son système 
    162 \item passer à coté d'erreurs 
    163 \item compromission, corruption du système 
    164 \item c'est impossible sur la machine de compilation finale 
    165 \item ça donne des boutons 
    166 %\item ça rend impuissant 
    167 \end{itemize} 
    168 \end{slide} 
    169  
    170 \begin{slide}{ne pas changer la config} 
    171 L'environnement de rpm fourni adapte les rpms les uns aux autres. 
    172  
    173 On trouve notamment: 
    174 \begin{itemize} 
    175 \item les chemins par défaut 
    176 \item la génération des dépendences 
     142It must be: 
     143\begin{itemize} 
     144\item justified 
     145\item explained 
     146\item argumented 
     147\item documented 
     148\item approved 
     149\end{itemize} 
     150\end{slide} 
     151} 
     152 
     153\begin{slide}{Root is evil} 
     154Do not build as root,\\ 
     155Do not build as root,\\ 
     156And do not build as root.\\ 
     157\bigskip 
     158 
     159Risks : 
     160\begin{itemize} 
     161\item pollute your system 
     162\item skip errors unwillingly 
     163\item compromission, corruption of your system 
     164\item cannot be done on the compile-server 
     165\item it gives buttons 
     166%\item It makes you impotent 
     167\end{itemize} 
     168\end{slide} 
     169 
     170\begin{slide}{do not change the config} 
     171The environment provided with rpm adapts the rpms one to each other. 
     172 
     173You notably find: 
     174\begin{itemize} 
     175\item default paths 
     176\item dependances generation 
    177177\item post-installation 
    178178\end{itemize} 
    179179\end{slide} 
    180180 
    181 \begin{slide}{Règles de base résumées} 
    182 \begin{itemize} 
    183 \item se documenter 
    184 \item demander aux gens habitués à faire des packages pour leur distribution 
    185 \item comprendre plutôt que contourner 
    186 \item un package bien fait pour une distribution est souvent incompatible 
    187 avec les autres 
    188 \item faire intégrer son paquet dans la distribution 
    189 (ça ne vaut pas que pour rpm) 
    190 \end{itemize} 
    191 \end{slide} 
    192  
    193 \part{cas concret: Mandriva} 
     181\begin{slide}{Summary of basic rules} 
     182\begin{itemize} 
     183\item document yourself 
     184\item ask people used to making packages for their distribution 
     185\item understand rather than work-around 
     186\item a package well done for a distribution often becomes uncompatible 
     187with others 
     188\item get your package integrated to the distribution 
     189(it's worth doing for other things than rpm) 
     190\end{itemize} 
     191\end{slide} 
     192 
     193\part{Matter of fact case: Mandriva} 
    194194 
    195195\overlays{2}{ 
    196 \begin{slide}{Configuration utilisateur} 
    197 \begin{itemize} 
    198 \item definir son environnement rpm 
    199 \item définir le packager tag 
     196\begin{slide}{User configuration} 
     197\begin{itemize} 
     198\item define your rpm environment 
     199\item define the packager tag 
    200200\end{itemize} 
    201201 
     
    211211\overlays{2}{ 
    212212\begin{slide}{mkrel} 
    213 Problématique des backport: 
     213Problems with backport: 
    214214 
    215215\begin{tabular}{|l|l|c|l|} 
     
    218218\hline 
    219219\hline 
    220 sans&1mdv&==&1mdv\\ 
    221 \hline 
    222 avec&1mdk&>&0.1.20060mdk\\ 
     220without&1mdv&==&1mdv\\ 
     221\hline 
     222with&1mdk&>&0.1.20060mdk\\ 
    223223&1mdv2007.0&>&1mdv2006.0\\ 
    224224\hline 
     
    229229Release: 1mdk 
    230230 
    231 devient: 
     231becomes: 
    232232 
    233233Release: \%mkrel 1 
     
    236236} 
    237237 
    238 \begin{slide}{chemin des fichiers} 
    239 \begin{itemize} 
    240 \item Prefix a une signification particulière, ne pas l'utiliser 
    241 \item respecter les emplacements standards 
    242 \item préférer les macros 
    243 \item /usr/local est réservé aux logiciels installé sans rpm 
    244 \end{itemize} 
    245 \end{slide} 
    246  
    247 \begin{slide}{chemin standard} 
     238\begin{slide}{path for files} 
     239\begin{itemize} 
     240\item Prefix has a specific meaning, do not use it  
     241\item respect the standard paths 
     242\item prefer macros 
     243\item /usr/local is reserved for softwares installed without rpm 
     244\end{itemize} 
     245\end{slide} 
     246 
     247\begin{slide}{standard path} 
    248248\bigskip 
    249249\begin{small} 
    250250\begin{tabular}{|l|l|l|} 
    251251\hline 
    252 chemin&macro&usage\\ 
    253 \hline 
    254 \hline 
    255 /usr&\%\_prefix&chemin général\\ 
     252path&macro&usage\\ 
     253\hline 
     254\hline 
     255/usr&\%\_prefix&general path\\ 
    256256\hline 
    257257/etc&\%\_sysconfdir&configuration\\ 
     
    259259/usr/bin&\%\_bindir&application\\ 
    260260\hline 
    261 /usr/sbin&\%\_sbindir&app. pour root\\ 
    262 \hline 
    263 /usr/lib&\%\_libdir&librairies\\ 
     261/usr/sbin&\%\_sbindir&app. for root\\ 
     262\hline 
     263/usr/lib&\%\_libdir&libraries\\ 
    264264/usr/lib64&&\\ 
    265265\hline 
    266 /usr/share&\%\_datadir&données\\ 
    267 \hline 
    268 /usr/share/man&\%\_mandir&pages de man\\ 
     266/usr/share&\%\_datadir&data\\ 
     267\hline 
     268/usr/share/man&\%\_mandir&man pages\\ 
    269269\hline 
    270270\end{tabular} 
     
    272272\end{slide} 
    273273 
    274 \begin{slide}{compilation et installation} 
    275 Compilation du soft: 
    276  
    277 \begin{itemize} 
    278 \item utiliser les bonne options (\%optflags) 
    279 \item faire attention aux chemins 
    280 \item installer les fichiers dans \%buildroot 
    281 \end{itemize} 
    282 \bigskip 
    283 Cas simple avec autotools 
     274\begin{slide}{compilation and installation} 
     275Compiling a software: 
     276 
     277\begin{itemize} 
     278\item use the appropriate options (\%optflags) 
     279\item take care to paths 
     280\item install files in \%buildroot 
     281\end{itemize} 
     282\bigskip 
     283Simple case with autotools 
    284284 
    285285{\scriptsize\begin{verbatim} 
     
    294294\end{slide} 
    295295 
    296 \begin{slide}{extraits de spec} 
    297 Example d'un cas compliqué: 
     296\begin{slide}{spec extracts} 
     297Example of a complicated case: 
    298298 
    299299{\tiny\begin{verbatim} 
     
    303303    --bindir %_bindir \ 
    304304    --libdir %_libdir 
    305 # parallèle make don't work 
     305# parallel make do not work 
    306306make 
    307307 
     
    309309make install DEST=%buildroot 
    310310 
    311 #installation d'un fichier: 
     311#install one file: 
    312312cat > %buildroot%_sysconfdir/%name.cfg <<EOF 
    313313blabla 
     
    319319 
    320320\overlays{3}{ 
    321 \begin{slide}{intégrer les fichiers dans le paquet} 
     321\begin{slide}{include the files in the package} 
    322322\begin{itemstep} 
    323 \item tout les fichiers doivent être listés 
    324 \item utiliser les macros 
    325 \item les répertoires propres au logiciels doivent être intégrés 
     323\item all files must be listed 
     324\item use macros 
     325\item software-specific directories must be included 
    326326\end{itemstep} 
    327327\end{slide} 
     
    329329 
    330330\overlays{3}{ 
    331 \begin{slide}{intégrer les fichiers dans le paquet} 
     331\begin{slide}{include the files in the package} 
    332332\begin{itemstep} 
    333 \item les fichier de configuration ne doivent pas être remplacés 
     333\item configuration files must not be replaced 
    334334 
    335335{\scriptsize% 
     
    337337} 
    338338 
    339 \item les documentation sont intégrées avec \%doc 
     339\item documentations are included with \%doc 
    340340{\scriptsize% 
    341341\%doc README \ldots 
    342342} 
    343343 
    344 \item utiliser \%find\_lang pour les traductions 
     344\item use \%find\_lang for translations 
    345345 
    346346{\scriptsize% 
     
    355355} 
    356356 
    357 \begin{slide}{les dépendences} 
    358 Pour les paquets binaires: rien à faire en général 
    359  
    360 Pour les sources: 
    361 \begin{itemize} 
    362 \item identiques pour toutes les architectures 
    363 \item suffisants pour builder les paquets 
    364 \item non redondants 
    365 \end{itemize} 
    366 \bigskip 
    367 Exemple: 
     357\begin{slide}{dependances} 
     358For binary packages: usually, nothing to do 
     359 
     360For sources: 
     361\begin{itemize} 
     362\item identical for all architectures 
     363\item suficient to build the packages 
     364\item no redundancy 
     365\end{itemize} 
     366\bigskip 
     367Example: 
    368368\begin{verbatim} 
    369369BuildRequires: libfoo-devel 
     
    372372 
    373373\begin{slide}{libidification} 
    374 But: 
    375 \begin{itemize} 
    376 \item avoir plusieur versions de la librairie\\ 
    377 Nomage des paquet en utilisant le numéro majeur 
    378 \item avoir plusieur architectures\\ 
    379 Nomage en incluant un prefix 
     374Goal: 
     375\begin{itemize} 
     376\item have many versions of a library\\ 
     377Name packages using major number 
     378\item have many architectures\\ 
     379Name package including a prefix 
    380380\end{itemize} 
    381381\bigskip 
     
    398398\end{slide} 
    399399 
    400 \begin{slide}{libidification: dans la pratique} 
     400\begin{slide}{libidification: use case} 
    401401 
    402402\begin{verbatim} 
     
    423423Outil pour vérifier que les paquets sont conformes à la politique 
    424424\begin{itemize} 
    425 \item maintenu par le merveilleux Michaël Scherer 
    426 \item disponible sur \url{http://rpmlint.zarb.org/} 
     425\item maintained by the wonderful Michaël Scherer 
     426\item available at \url{http://rpmlint.zarb.org/} 
    427427\end{itemize} 
    428428\bigskip 
     
    443443 
    444444\begin{slide}{The End} 
    445 Ce document sera là: {\scriptsize\url{http://forge.ipsl.jussieu.fr/docipsl/}}. 
    446  
    447 Le rpmhowto de mandriva: {\scriptsize\url{http://qa.mandriva.com/twiki/bin/view/Main/RpmHowTo}}. 
    448  
    449 \bigskip 
    450 Merci: 
     445This document is there: {\scriptsize\url{http://forge.ipsl.jussieu.fr/docipsl/}}. 
     446 
     447Mandriva's rpmhowto: {\scriptsize\url{http://qa.mandriva.com/twiki/bin/view/Main/RpmHowTo}}. 
     448 
     449\bigskip 
     450Thanks: 
    451451\begin{itemize} 
    452452\item Guillaume Rousse 
    453 \item Benoit Audouard 
     453\item Benoît Audouard 
    454454\item Eric Villard 
    455 \item CNRS/ISPL pour l'hébergement 
     455\item CNRS/ISPL for web hosting 
    456456\end{itemize} 
    457457 
  • trunk/fairerpms/rpm-building-en.fig

    r102 r109  
    11112 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 
    1212         150 2475 1725 2475 1725 2775 150 2775 150 2475 
    13 4 0 0 50 -1 0 12 0.0000 4 180 1410 225 2700 Rpm(s) binaire(s)\001 
     134 0 0 50 -1 0 12 0.0000 4 180 1410 225 2700 Binary(ies) Rpm(s)\001 
    1414-6 
    15156 525 3450 1350 3900 
    16162 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 
    1717         525 3450 1350 3450 1350 3900 525 3900 525 3450 
    18 4 0 0 50 -1 0 12 0.0000 4 180 675 600 3750 Syst\350me\001 
     184 0 0 50 -1 0 12 0.0000 4 180 675 600 3750 System\001 
    1919-6 
    20206 1875 2475 3000 2775 
    21212 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 
    2222         1875 2475 3000 2475 3000 2775 1875 2775 1875 2475 
    23 4 0 0 50 -1 0 12 0.0000 4 180 975 1950 2700 Rpm source\001 
     234 0 0 50 -1 0 12 0.0000 4 180 975 1950 2700 Source rpm\001 
    2424-6 
    25256 300 675 1575 1275 
    26262 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 
    2727         300 675 1575 675 1575 1275 300 1275 300 675 
    28 4 0 0 50 -1 0 12 0.0000 4 180 990 450 1050 Fichier spec\001 
     284 0 0 50 -1 0 12 0.0000 4 180 990 450 1050 Spec File\001 
    2929-6 
    30306 2100 675 3000 1500 
    31316 2250 750 2925 1350 
    32 4 0 0 50 -1 0 12 0.0000 4 180 525 2250 900 correctifs\001 
     324 0 0 50 -1 0 12 0.0000 4 180 525 2250 900 patches\001 
    33334 0 0 50 -1 0 12 0.0000 4 90 615 2250 1125 sources\001 
    34 4 0 0 50 -1 0 12 0.0000 4 135 360 2250 1350 icône\001 
     344 0 0 50 -1 0 12 0.0000 4 135 360 2250 1350 icon\001 
    3535-6 
    36362 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 
Note: See TracChangeset for help on using the changeset viewer.