Changeset 109
- Timestamp:
- 07/03/06 08:25:48 (18 years ago)
- Location:
- trunk/fairerpms
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/fairerpms/Makefile
r106 r109 7 7 8 8 FIGURES= \ 9 rpm-building.fig 9 rpm-building.fig rpm-building-en.fig 10 10 11 11 IMAGES= \ -
trunk/fairerpms/presentation_en.tex
r106 r109 7 7 8 8 9 \title{RPM et politique depackaging}10 \subtitle{Adapt er un rpm à sadistribution}9 \title{RPM and policy for packaging} 10 \subtitle{Adapt a rpm to a GNU/Linux distribution} 11 11 \author{Olivier Thauvin} 12 12 \email{olivier.thauvin@aerov.jussieu.fr} … … 25 25 \end{slide} 26 26 27 \part{RPM r appel}27 \part{RPM reminder} 28 28 29 29 \overlays{2}{ 30 30 \begin{slide}{RPM: Rpm Package Manager} 31 Qu'est ce?32 \begin{itemize} 33 \item un ensemble d'outils34 \item un format d'archive(.rpm)35 \item des fichiers au format rpm31 What is it ? 32 \begin{itemize} 33 \item a set of tools 34 \item an archive format (.rpm) 35 \item files in rpm format 36 36 \end{itemize} 37 37 \bigskip 38 38 39 39 \FromSlide{2} 40 R ôle:41 \begin{itemize} 42 \item install er43 \item inventorier44 \item control er45 %\item faciliter l'installation des logiciels46 %\item suivi des version(evr)47 %\item assurer que l'environnement est compatible avec le logiciel48 %\item assurer l'intégrité du système49 \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 rpm40 Role: 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} 54 An .rpm file containing: 55 \begin{itemize} 56 \item{entête} informations about the rpm 57 57 \begin{itemize} 58 \item des informations pratiques sur le logiciel (nom, version, url, \ldots)59 \item sur la fabrication durpm60 \item une liste de dépendances61 \item la liste des fichiers contenus62 \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) 63 63 \end{itemize} 64 \item une archive contenant les fichiers65 \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} 69 69 \begin{center} 70 \includegraphics*[height=1\textheight]{rpm-building }70 \includegraphics*[height=1\textheight]{rpm-building-en} 71 71 \end{center} 72 72 \end{slide} 73 73 74 \begin{slide}{ le fichier spec}75 I l décrit:76 \begin{itemize} 77 \item le (ou les) rpm(s) produit(s)78 \item le moyen de compiler le logiciel79 \end{itemize} 80 \bigskip 81 Il est composé desections:82 \begin{itemize} 83 \item En-tête, \%description74 \begin{slide}{the spec file} 75 It describes: 76 \begin{itemize} 77 \item the rpm(s) produced(s) 78 \item the compiling of the software 79 \end{itemize} 80 \bigskip 81 There are the following sections: 82 \begin{itemize} 83 \item header, \%description 84 84 \item \%package 85 85 \item \%prep, \%build, \%install, \%check … … 90 90 \end{slide} 91 91 92 \begin{slide}{specfile: ex emple}92 \begin{slide}{specfile: example} 93 93 \begin{small} 94 94 \verbatiminput{simple.spec} … … 96 96 \begin{verbatim} 97 97 $ rpm -ba simple.spec 98 Ecrit: /home/users/olivier/RPM/SRPMS/simple-1-1.src.rpm98 Write: /home/users/olivier/RPM/SRPMS/simple-1-1.src.rpm 99 99 \o/ 100 100 \end{verbatim} … … 102 102 \end{slide} 103 103 104 \begin{slide}{ lesmacros}105 Variable propres à rpm.104 \begin{slide}{macros} 105 RPM specific variables. 106 106 107 107 Origine: 108 108 \begin{tabular}{|l|l|} 109 109 \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+&u tilisateur\\118 \hline 119 fichier spec&packager\\110 where&provider\\ 111 \hline 112 \hline 113 system macros files&rpm\\ 114 \hline 115 system macros files&distribution\\ 116 \hline 117 \verb+~/.rpmmacros+&user\\ 118 \hline 119 spec file&packager\\ 120 120 \hline 121 121 \end{tabular} 122 122 123 123 \bigskip 124 Elles fournissent des valeurs ou des fonctions.125 \end{slide} 126 127 \part{Poli tique: généralité}124 They provide values or functions. 125 \end{slide} 126 127 \part{Policy: introduction} 128 128 129 129 \overlays{2}{ 130 \begin{slide}{ Pourquoi définir une politique}131 \begin{itemize} 132 \item homog énéité133 \item factorisation du travail134 \item qualit é135 \item faciliter le travail136 \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 138 In brief, that's good (tm) 139 139 \bigskip 140 140 141 141 \FromSlide{2} 142 Elle doit être:143 \begin{itemize} 144 \item justifi ée145 \item expl iquée146 \item discutée147 \item document ée148 \item appro uvée149 \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 Ris ques :160 \begin{itemize} 161 \item pollu er son système162 \item passer à coté d'erreurs163 \item compromission, corruption du système164 \item c 'est impossible sur la machine de compilation finale165 \item ça donne des boutons166 %\item ça rend impuissant167 \end{itemize} 168 \end{slide} 169 170 \begin{slide}{ ne pas changer laconfig}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éfaut176 \item la génération des dépendences142 It 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} 154 Do not build as root,\\ 155 Do not build as root,\\ 156 And do not build as root.\\ 157 \bigskip 158 159 Risks : 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} 171 The environment provided with rpm adapts the rpms one to each other. 172 173 You notably find: 174 \begin{itemize} 175 \item default paths 176 \item dependances generation 177 177 \item post-installation 178 178 \end{itemize} 179 179 \end{slide} 180 180 181 \begin{slide}{ Règles de base résumées}182 \begin{itemize} 183 \item se documenter184 \item demander aux gens habitués à faire des packages pour leur distribution185 \item comprendre plutôt que contourner186 \item un package bien fait pour une distribution est souvent incompatible187 avec les autres188 \item faire intégrer son paquet dans ladistribution189 ( ça ne vaut pas que pourrpm)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 187 with 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} 194 194 195 195 \overlays{2}{ 196 \begin{slide}{ Configuration utilisateur}197 \begin{itemize} 198 \item defin ir son environnement rpm199 \item d éfinir le packager tag196 \begin{slide}{User configuration} 197 \begin{itemize} 198 \item define your rpm environment 199 \item define the packager tag 200 200 \end{itemize} 201 201 … … 211 211 \overlays{2}{ 212 212 \begin{slide}{mkrel} 213 Probl ématique desbackport:213 Problems with backport: 214 214 215 215 \begin{tabular}{|l|l|c|l|} … … 218 218 \hline 219 219 \hline 220 sans&1mdv&==&1mdv\\221 \hline 222 avec&1mdk&>&0.1.20060mdk\\220 without&1mdv&==&1mdv\\ 221 \hline 222 with&1mdk&>&0.1.20060mdk\\ 223 223 &1mdv2007.0&>&1mdv2006.0\\ 224 224 \hline … … 229 229 Release: 1mdk 230 230 231 devient:231 becomes: 232 232 233 233 Release: \%mkrel 1 … … 236 236 } 237 237 238 \begin{slide}{ chemin des fichiers}239 \begin{itemize} 240 \item Prefix a une signification particulière, ne pas l'utiliser241 \item respect er les emplacements standards242 \item pr éférer lesmacros243 \item /usr/local est réservé aux logiciels installé sansrpm244 \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} 248 248 \bigskip 249 249 \begin{small} 250 250 \begin{tabular}{|l|l|l|} 251 251 \hline 252 chemin¯o&usage\\253 \hline 254 \hline 255 /usr&\%\_prefix& chemin général\\252 path¯o&usage\\ 253 \hline 254 \hline 255 /usr&\%\_prefix&general path\\ 256 256 \hline 257 257 /etc&\%\_sysconfdir&configuration\\ … … 259 259 /usr/bin&\%\_bindir&application\\ 260 260 \hline 261 /usr/sbin&\%\_sbindir&app. pour root\\262 \hline 263 /usr/lib&\%\_libdir&libra iries\\261 /usr/sbin&\%\_sbindir&app. for root\\ 262 \hline 263 /usr/lib&\%\_libdir&libraries\\ 264 264 /usr/lib64&&\\ 265 265 \hline 266 /usr/share&\%\_datadir&d onné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\\ 269 269 \hline 270 270 \end{tabular} … … 272 272 \end{slide} 273 273 274 \begin{slide}{compilation etinstallation}275 Compil ation du soft:276 277 \begin{itemize} 278 \item u tiliser les bonne options (\%optflags)279 \item faire attention aux chemins280 \item install er les fichiers dans\%buildroot281 \end{itemize} 282 \bigskip 283 Cas simple avecautotools274 \begin{slide}{compilation and installation} 275 Compiling 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 283 Simple case with autotools 284 284 285 285 {\scriptsize\begin{verbatim} … … 294 294 \end{slide} 295 295 296 \begin{slide}{ extraits de spec}297 Example d'un cas compliqué:296 \begin{slide}{spec extracts} 297 Example of a complicated case: 298 298 299 299 {\tiny\begin{verbatim} … … 303 303 --bindir %_bindir \ 304 304 --libdir %_libdir 305 # parall èle make don't work305 # parallel make do not work 306 306 make 307 307 … … 309 309 make install DEST=%buildroot 310 310 311 #install ation d'un fichier:311 #install one file: 312 312 cat > %buildroot%_sysconfdir/%name.cfg <<EOF 313 313 blabla … … 319 319 320 320 \overlays{3}{ 321 \begin{slide}{in tégrer les fichiers dans le paquet}321 \begin{slide}{include the files in the package} 322 322 \begin{itemstep} 323 \item tout les fichiers doivent être listés324 \item u tiliser lesmacros325 \item les répertoires propres au logiciels doivent être intégrés323 \item all files must be listed 324 \item use macros 325 \item software-specific directories must be included 326 326 \end{itemstep} 327 327 \end{slide} … … 329 329 330 330 \overlays{3}{ 331 \begin{slide}{in tégrer les fichiers dans le paquet}331 \begin{slide}{include the files in the package} 332 332 \begin{itemstep} 333 \item les fichier de configuration ne doivent pas être remplacés333 \item configuration files must not be replaced 334 334 335 335 {\scriptsize% … … 337 337 } 338 338 339 \item les documentation sont intégrées avec\%doc339 \item documentations are included with \%doc 340 340 {\scriptsize% 341 341 \%doc README \ldots 342 342 } 343 343 344 \item u tiliser \%find\_lang pour les traductions344 \item use \%find\_lang for translations 345 345 346 346 {\scriptsize% … … 355 355 } 356 356 357 \begin{slide}{ les dépendences}358 Pour les paquets binaires: rien à faire en général 359 360 Pour lessources:361 \begin{itemize} 362 \item identi ques pour toutes lesarchitectures363 \item suf fisants pour builder les paquets364 \item no n redondants365 \end{itemize} 366 \bigskip 367 Ex emple:357 \begin{slide}{dependances} 358 For binary packages: usually, nothing to do 359 360 For 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 367 Example: 368 368 \begin{verbatim} 369 369 BuildRequires: libfoo-devel … … 372 372 373 373 \begin{slide}{libidification} 374 But:375 \begin{itemize} 376 \item avoir plusieur versions de la librairie\\377 N omage des paquet en utilisant le numéro majeur378 \item avoir plusieurarchitectures\\379 N omage en incluant unprefix374 Goal: 375 \begin{itemize} 376 \item have many versions of a library\\ 377 Name packages using major number 378 \item have many architectures\\ 379 Name package including a prefix 380 380 \end{itemize} 381 381 \bigskip … … 398 398 \end{slide} 399 399 400 \begin{slide}{libidification: dans la pratique}400 \begin{slide}{libidification: use case} 401 401 402 402 \begin{verbatim} … … 423 423 Outil pour vérifier que les paquets sont conformes à la politique 424 424 \begin{itemize} 425 \item maint enu par le merveilleuxMichaël Scherer426 \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/} 427 427 \end{itemize} 428 428 \bigskip … … 443 443 444 444 \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:445 This document is there: {\scriptsize\url{http://forge.ipsl.jussieu.fr/docipsl/}}. 446 447 Mandriva's rpmhowto: {\scriptsize\url{http://qa.mandriva.com/twiki/bin/view/Main/RpmHowTo}}. 448 449 \bigskip 450 Thanks: 451 451 \begin{itemize} 452 452 \item Guillaume Rousse 453 \item Beno it Audouard453 \item Benoît Audouard 454 454 \item Eric Villard 455 \item CNRS/ISPL pour l'hébergement455 \item CNRS/ISPL for web hosting 456 456 \end{itemize} 457 457 -
trunk/fairerpms/rpm-building-en.fig
r102 r109 11 11 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 12 12 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)\00113 4 0 0 50 -1 0 12 0.0000 4 180 1410 225 2700 Binary(ies) Rpm(s)\001 14 14 -6 15 15 6 525 3450 1350 3900 16 16 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 17 17 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\00118 4 0 0 50 -1 0 12 0.0000 4 180 675 600 3750 System\001 19 19 -6 20 20 6 1875 2475 3000 2775 21 21 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 22 22 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\00123 4 0 0 50 -1 0 12 0.0000 4 180 975 1950 2700 Source rpm\001 24 24 -6 25 25 6 300 675 1575 1275 26 26 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 27 27 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\00128 4 0 0 50 -1 0 12 0.0000 4 180 990 450 1050 Spec File\001 29 29 -6 30 30 6 2100 675 3000 1500 31 31 6 2250 750 2925 1350 32 4 0 0 50 -1 0 12 0.0000 4 180 525 2250 900 correctifs\00132 4 0 0 50 -1 0 12 0.0000 4 180 525 2250 900 patches\001 33 33 4 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\00134 4 0 0 50 -1 0 12 0.0000 4 135 360 2250 1350 icon\001 35 35 -6 36 36 2 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.