.rpm .deb .ebuild .tgz OMG! <ul><ul><li>Eddy Mulyono </li></ul></ul><ul><ul><li>current state of packaging across distros ...
metadata – whoami <ul><li>Gentoo </li></ul><ul><ul><li>~ 3 years </li></ul></ul><ul><ul><li>bunch of Bugzilla </li></ul></...
metadata - who <ul><li>User </li></ul><ul><ul><li>internal </li></ul></ul><ul><li>SysAdmin </li></ul><ul><ul><li>package s...
whatis packaging <ul><li>packages </li></ul><ul><li>.C.R.U.D. </li></ul><ul><li>package managers </li></ul><ul><li>related...
why packaging?
base <ul><li>“wrapper” around shellscripts </li></ul>
across distros <ul><li>Debian (Ubuntu) </li></ul><ul><li>Fedora (Redhat) </li></ul><ul><li>Gentoo </li></ul><ul><li>Foresi...
Debian <ul><li>1: dpkg </li></ul><ul><li>deps: apt </li></ul>
debian/rules <ul><li>makefile targets </li></ul><ul><ul><li>build </li></ul></ul><ul><ul><li>binary </li></ul></ul><ul><ul...
debian/rules: from scratch <ul><li>Makefile repeats </li></ul><ul><ul><li>remember autotools? </li></ul></ul>
debhelper <ul><li>debhelper </li></ul><ul><ul><li>dh_make </li></ul></ul><ul><ul><ul><li>generate scaffold debian/* (rules...
cdbs <ul><li>debhelper all over </li></ul><ul><li>refactor common code </li></ul><ul><li>include debhelper.mk </li></ul><u...
cdbs: append <ul><li>append </li></ul><ul><ul><li>build:: </li></ul></ul><ul><ul><li>build/mysql-common:: </li></ul></ul><...
cdbs: next <ul><li>dbconfig-common </li></ul><ul><li>wwwconfig-common </li></ul><ul><li>webapps-common </li></ul><ul><li>(...
debian/control: apt <ul><li>package metadata </li></ul><ul><li>Build-Depends </li></ul><ul><li>Depends </li></ul><ul><li>C...
Debian: packaging dev <ul><li>package archive </li></ul><ul><ul><li>can't wrap my head around it. </li></ul></ul><ul><li>u...
Debian: A&D <ul><li>dpkg-divert </li></ul><ul><li>debconf </li></ul><ul><li>packaging info all over the place </li></ul><u...
Gentoo <ul><li>1: ebuild </li></ul><ul><li>deps: emerge </li></ul><ul><ul><li>paludis </li></ul></ul>
Gentoo: ebuild <ul><li>ebuild: shell functions </li></ul><ul><li>src_unpack() </li></ul><ul><ul><li>get source & patch </l...
Gentoo: ebuild (cont.) <ul><li>pkg_preinst() </li></ul><ul><ul><li>enewgroup & enewuser </li></ul></ul><ul><li>(merge) </l...
Gentoo: ebuild: inst v. rm <ul><li>pkg_preinst() </li></ul><ul><li>(merge) </li></ul><ul><li>pkg_postinst() </li></ul><ul>...
Gentoo: portage <ul><li>package metadata </li></ul><ul><li>DEPENDS </li></ul><ul><ul><li>conflicts: !package </li></ul></u...
Gentoo: eclasses <ul><li>ebuild: “object-oriented” shell functions </li></ul><ul><li>inheritance </li></ul><ul><li>gnome, ...
Gentoo: eclass <ul><li>inherit gnome2 python </li></ul><ul><li>gnome2_src_unpack </li></ul><ul><li>python_src_unpack </li>...
Gentoo: eclass notes <ul><li>eclass </li></ul><ul><ul><li>refactor common code </li></ul></ul><ul><ul><li>cvs, subversion,...
Gentoo: packaging dev <ul><li>overlays </li></ul><ul><ul><li>/usr/portage </li></ul></ul><ul><ul><li>/usr/local/portage </...
Fedora/Redhat <ul><li>1: rpm </li></ul><ul><li>deps: yum, up2date, zypp, urpmi </li></ul>
rpm specfiles <ul><li>shellscript </li></ul><ul><li>sections (& macros) </li></ul><ul><ul><li>%prep </li></ul></ul><ul><ul...
specfiles: into rpm <ul><li>%files </li></ul><ul><ul><li>%doc </li></ul></ul><ul><ul><li>%config(noreplace) </li></ul></ul...
specfiles: inst v. rm <ul><li>%pre </li></ul><ul><li>(install) </li></ul><ul><li>%post </li></ul><ul><li>%preun </li></ul>...
specfiles: (belated) introduction <ul><li>package metadata </li></ul><ul><li>Name, %description </li></ul><ul><li>Requires...
specfiles: A&D <ul><li>%triggerin </li></ul><ul><li>%triggerun </li></ul><ul><li>many tools: </li></ul><ul><ul><li>rpm2tar...
rPath/Foresight <ul><li>1: cvc (kinda) </li></ul><ul><li>deps: conary </li></ul>
conary package.recipe <ul><li>class Foo(PackageRecipe) </li></ul><ul><ul><li>def setup(r) </li></ul></ul><ul><ul><ul><li>r...
super classes <ul><li>AutoPackageRecipe </li></ul><ul><li>Gnome  PR </li></ul><ul><li>kdeCore  PR </li></ul><ul><li>CPAN  ...
super classes (2) <ul><li>multiple inheritance </li></ul><ul><ul><li>Python mixin </li></ul></ul>
cvc <ul><li>pkg repo~ver ctrl repo </li></ul><ul><li>cvc newpkg </li></ul><ul><li>cvc co </li></ul><ul><li>(edit, cook .re...
conary A&D <ul><li>Python </li></ul><ul><li>dvcs </li></ul><ul><li>rollback </li></ul><ul><li>changeset:config files </li>...
Loose Ends
chroots <ul><li>Debian: pbuilder </li></ul><ul><li>Fedora: mock </li></ul><ul><li>rPath: rmake </li></ul><ul><li>Gentoo: c...
Build Services <ul><li>Ubuntu: Launchpad PPA (apt repo) </li></ul><ul><li>Fedora: Koji </li></ul><ul><li>rPath: rBuilder O...
Devs: why pkg-ing? <ul><li>build system </li></ul><ul><li>distribution system </li></ul><ul><ul><li>LP PPA </li></ul></ul>...
SysAdmins: why pkg-ing? <ul><li>“encode” best practices </li></ul><ul><ul><li>apache2 </li></ul></ul><ul><ul><li>phpmyadmi...
users: why pkg-ing? <ul><li>“easier” deployment </li></ul><ul><ul><li>pre-built </li></ul></ul><ul><ul><li>dependencies </...
what's next
what's next: CPANism <ul><li>Perl CPAN, Ruby gems, PHP PEAR & PECL, PyPI, R CRAN </li></ul><ul><li>Mozilla extensions, Ecl...
what's next: Java <ul><li>current practice: bundle JARs </li></ul><ul><li>Gentoo is doing fun stuff </li></ul><ul><li>Mave...
what's next: PackageKit <ul><li>one UI to rule them all </li></ul><ul><ul><li>apt </li></ul></ul><ul><ul><li>conary </li><...
what's next: Windows <ul><li>Pidgin: GTK </li></ul><ul><li>XChat: GTK </li></ul><ul><li>GIMP: GTK </li></ul><ul><li>KDE on...
exit <ul><li>Things are getting better </li></ul><ul><li>Many challenges ahead </li></ul><ul><li>Thanx! </li></ul>
Q&A
References <ul><li>http://docs.fedoraproject.org/drafts/rpm-guide-en/index.html </li></ul><ul><li>http://wiki.rpath.com/ <...
Upcoming SlideShare
Loading in...5
×

packaging

1,643
-1

Published on

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,643
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
22
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • packaging

    1. 1. .rpm .deb .ebuild .tgz OMG! <ul><ul><li>Eddy Mulyono </li></ul></ul><ul><ul><li>current state of packaging across distros (Ubuntu, Gentoo, rPath), lessons learned, and what's next </li></ul></ul>
    2. 2. metadata – whoami <ul><li>Gentoo </li></ul><ul><ul><li>~ 3 years </li></ul></ul><ul><ul><li>bunch of Bugzilla </li></ul></ul><ul><ul><li>Sunrise committer </li></ul></ul><ul><li>Ubuntu </li></ul><ul><ul><li>~ 1 year </li></ul></ul><ul><ul><li>Launchpad PPA </li></ul></ul>
    3. 3. metadata - who <ul><li>User </li></ul><ul><ul><li>internal </li></ul></ul><ul><li>SysAdmin </li></ul><ul><ul><li>package stuff! </li></ul></ul><ul><li>Dev </li></ul><ul><ul><li>package stuff! </li></ul></ul>
    4. 4. whatis packaging <ul><li>packages </li></ul><ul><li>.C.R.U.D. </li></ul><ul><li>package managers </li></ul><ul><li>related tools </li></ul>
    5. 5. why packaging?
    6. 6. base <ul><li>“wrapper” around shellscripts </li></ul>
    7. 7. across distros <ul><li>Debian (Ubuntu) </li></ul><ul><li>Fedora (Redhat) </li></ul><ul><li>Gentoo </li></ul><ul><li>Foresight (rPath) </li></ul>
    8. 8. Debian <ul><li>1: dpkg </li></ul><ul><li>deps: apt </li></ul>
    9. 9. debian/rules <ul><li>makefile targets </li></ul><ul><ul><li>build </li></ul></ul><ul><ul><li>binary </li></ul></ul><ul><ul><ul><li>.deb </li></ul></ul></ul><ul><ul><ul><li>arch, indep </li></ul></ul></ul><ul><ul><li>clean </li></ul></ul>
    10. 10. debian/rules: from scratch <ul><li>Makefile repeats </li></ul><ul><ul><li>remember autotools? </li></ul></ul>
    11. 11. debhelper <ul><li>debhelper </li></ul><ul><ul><li>dh_make </li></ul></ul><ul><ul><ul><li>generate scaffold debian/* (rules) </li></ul></ul></ul><ul><ul><li>dh_* </li></ul></ul><ul><ul><ul><li>wrapper scripts </li></ul></ul></ul><ul><li>scaffold pic </li></ul>
    12. 12. cdbs <ul><li>debhelper all over </li></ul><ul><li>refactor common code </li></ul><ul><li>include debhelper.mk </li></ul><ul><li>dpatch </li></ul><ul><li>autotools </li></ul><ul><li>gnome, kde, xfce </li></ul><ul><li>perl, python, ant </li></ul>
    13. 13. cdbs: append <ul><li>append </li></ul><ul><ul><li>build:: </li></ul></ul><ul><ul><li>build/mysql-common:: </li></ul></ul><ul><ul><li>build/mysql-client:: </li></ul></ul><ul><ul><li>build/mysql-server:: </li></ul></ul>
    14. 14. cdbs: next <ul><li>dbconfig-common </li></ul><ul><li>wwwconfig-common </li></ul><ul><li>webapps-common </li></ul><ul><li>(mozilla-extension) </li></ul><ul><li>more, please </li></ul>
    15. 15. debian/control: apt <ul><li>package metadata </li></ul><ul><li>Build-Depends </li></ul><ul><li>Depends </li></ul><ul><li>Conflicts </li></ul><ul><li>Suggests, Recommends </li></ul>
    16. 16. Debian: packaging dev <ul><li>package archive </li></ul><ul><ul><li>can't wrap my head around it. </li></ul></ul><ul><li>use Launchpad PPA </li></ul>
    17. 17. Debian: A&D <ul><li>dpkg-divert </li></ul><ul><li>debconf </li></ul><ul><li>packaging info all over the place </li></ul><ul><ul><li>debian/rules </li></ul></ul><ul><ul><li>debian/control </li></ul></ul><ul><ul><li>debian/install </li></ul></ul>
    18. 18. Gentoo <ul><li>1: ebuild </li></ul><ul><li>deps: emerge </li></ul><ul><ul><li>paludis </li></ul></ul>
    19. 19. Gentoo: ebuild <ul><li>ebuild: shell functions </li></ul><ul><li>src_unpack() </li></ul><ul><ul><li>get source & patch </li></ul></ul><ul><li>src_compile() </li></ul><ul><ul><li>configure & make </li></ul></ul><ul><li>src_install() </li></ul><ul><ul><li>make install </li></ul></ul><ul><li>src_test() </li></ul><ul><ul><li>make test </li></ul></ul>
    20. 20. Gentoo: ebuild (cont.) <ul><li>pkg_preinst() </li></ul><ul><ul><li>enewgroup & enewuser </li></ul></ul><ul><li>(merge) </li></ul><ul><li>pkg_postinst() </li></ul><ul><ul><li>gnome: menu item entry, mime handler </li></ul></ul><ul><li>pkg_config() </li></ul><ul><ul><li>mysql: init db, password </li></ul></ul>
    21. 21. Gentoo: ebuild: inst v. rm <ul><li>pkg_preinst() </li></ul><ul><li>(merge) </li></ul><ul><li>pkg_postinst() </li></ul><ul><li>pkg_prerm() </li></ul><ul><li>(unmerge) </li></ul><ul><li>pkg_postrm() </li></ul>
    22. 22. Gentoo: portage <ul><li>package metadata </li></ul><ul><li>DEPENDS </li></ul><ul><ul><li>conflicts: !package </li></ul></ul><ul><li>RDEPENDS </li></ul>
    23. 23. Gentoo: eclasses <ul><li>ebuild: “object-oriented” shell functions </li></ul><ul><li>inheritance </li></ul><ul><li>gnome, kde, xfce, rox, enlightenment </li></ul><ul><li>python, ruby, perl, mono, java </li></ul><ul><li>vim, elisp, xemacs </li></ul><ul><li>perl-module, gems, php-pear-r1 </li></ul>
    24. 24. Gentoo: eclass <ul><li>inherit gnome2 python </li></ul><ul><li>gnome2_src_unpack </li></ul><ul><li>python_src_unpack </li></ul><ul><li>src_unpack? </li></ul><ul><ul><li>python_src_unpack </li></ul></ul><ul><li>order matters </li></ul>
    25. 25. Gentoo: eclass notes <ul><li>eclass </li></ul><ul><ul><li>refactor common code </li></ul></ul><ul><ul><li>cvs, subversion, git, darcs (“live ebuilds”) </li></ul></ul><ul><ul><li>webapps </li></ul></ul><ul><ul><ul><li>multi-instance </li></ul></ul></ul><ul><ul><ul><li>vhosts </li></ul></ul></ul><ul><ul><ul><li>Debian: webapps-common </li></ul></ul></ul><ul><ul><li>gems, php-pear </li></ul></ul><ul><ul><li>perl-module: g-cpan </li></ul></ul>
    26. 26. Gentoo: packaging dev <ul><li>overlays </li></ul><ul><ul><li>/usr/portage </li></ul></ul><ul><ul><li>/usr/local/portage </li></ul></ul><ul><ul><li>sunrise </li></ul></ul><ul><ul><li>gnome </li></ul></ul><ul><ul><li>overlays.gentoo.org </li></ul></ul><ul><ul><li>YOURs! </li></ul></ul><ul><li>version bump:rename </li></ul>
    27. 27. Fedora/Redhat <ul><li>1: rpm </li></ul><ul><li>deps: yum, up2date, zypp, urpmi </li></ul>
    28. 28. rpm specfiles <ul><li>shellscript </li></ul><ul><li>sections (& macros) </li></ul><ul><ul><li>%prep </li></ul></ul><ul><ul><ul><li>%setup: unpack </li></ul></ul></ul><ul><ul><ul><li>%patch </li></ul></ul></ul><ul><ul><li>%build </li></ul></ul><ul><ul><ul><li>%configure </li></ul></ul></ul><ul><ul><li>%install </li></ul></ul><ul><ul><ul><li>%makeinstall </li></ul></ul></ul>
    29. 29. specfiles: into rpm <ul><li>%files </li></ul><ul><ul><li>%doc </li></ul></ul><ul><ul><li>%config(noreplace) </li></ul></ul><ul><ul><ul><li>*.rpmnew </li></ul></ul></ul><ul><ul><li>%attr(0644, root, root) </li></ul></ul><ul><ul><ul><li>%defattr </li></ul></ul></ul><ul><li>`rust` helps </li></ul>
    30. 30. specfiles: inst v. rm <ul><li>%pre </li></ul><ul><li>(install) </li></ul><ul><li>%post </li></ul><ul><li>%preun </li></ul><ul><li>(uninstall) </li></ul><ul><li>%postun </li></ul>
    31. 31. specfiles: (belated) introduction <ul><li>package metadata </li></ul><ul><li>Name, %description </li></ul><ul><li>Requires, Conflicts </li></ul>
    32. 32. specfiles: A&D <ul><li>%triggerin </li></ul><ul><li>%triggerun </li></ul><ul><li>many tools: </li></ul><ul><ul><li>rpm2targz </li></ul></ul><ul><ul><li>alien </li></ul></ul><ul><ul><li>apt-rpm </li></ul></ul><ul><li>Fedora, OpenSuSE, and Mandriva don't share macros </li></ul>
    33. 33. rPath/Foresight <ul><li>1: cvc (kinda) </li></ul><ul><li>deps: conary </li></ul>
    34. 34. conary package.recipe <ul><li>class Foo(PackageRecipe) </li></ul><ul><ul><li>def setup(r) </li></ul></ul><ul><ul><ul><li>r.addArchive('http://...') </li></ul></ul></ul><ul><ul><ul><li>r.addPatch() </li></ul></ul></ul><ul><ul><ul><li>r.Configure('--with-gtk') </li></ul></ul></ul><ul><ul><ul><li>r.Make('all') </li></ul></ul></ul><ul><ul><ul><li>r.MakeInstall() </li></ul></ul></ul><ul><ul><ul><li>r.Run('ls') </li></ul></ul></ul><ul><li>AutoPackageRecipe </li></ul>
    35. 35. super classes <ul><li>AutoPackageRecipe </li></ul><ul><li>Gnome PR </li></ul><ul><li>kdeCore PR </li></ul><ul><li>CPAN PR </li></ul><ul><li>RPM PR </li></ul>
    36. 36. super classes (2) <ul><li>multiple inheritance </li></ul><ul><ul><li>Python mixin </li></ul></ul>
    37. 37. cvc <ul><li>pkg repo~ver ctrl repo </li></ul><ul><li>cvc newpkg </li></ul><ul><li>cvc co </li></ul><ul><li>(edit, cook .recipe) </li></ul><ul><li>cvc ci </li></ul><ul><li>distributed VCS repo </li></ul><ul><li>shadow (branch) </li></ul><ul><li>co </li></ul><ul><li>(edit, cook .recipe) </li></ul><ul><li>ci </li></ul><ul><li>merge </li></ul><ul><li>(upstream) promote (pull) </li></ul>
    38. 38. conary A&D <ul><li>Python </li></ul><ul><li>dvcs </li></ul><ul><li>rollback </li></ul><ul><li>changeset:config files </li></ul><ul><li>steep learning curve </li></ul><ul><ul><li>trove, flavor, ... </li></ul></ul><ul><li>verbose syntax to specify package </li></ul><ul><ul><li>Tom Lord's Arch </li></ul></ul><ul><ul><li>shortcuts :) </li></ul></ul><ul><li>relatively young </li></ul>
    39. 39. Loose Ends
    40. 40. chroots <ul><li>Debian: pbuilder </li></ul><ul><li>Fedora: mock </li></ul><ul><li>rPath: rmake </li></ul><ul><li>Gentoo: catalyst </li></ul><ul><ul><li>LiveCD </li></ul></ul>
    41. 41. Build Services <ul><li>Ubuntu: Launchpad PPA (apt repo) </li></ul><ul><li>Fedora: Koji </li></ul><ul><li>rPath: rBuilder Online (VM) </li></ul><ul><li>OpenSuSE: Build Service (obs) (one click) </li></ul><ul><ul><li>open source! </li></ul></ul><ul><li>Gentoo: tinderbox </li></ul><ul><ul><li>some dude's DistCC farm </li></ul></ul>
    42. 42. Devs: why pkg-ing? <ul><li>build system </li></ul><ul><li>distribution system </li></ul><ul><ul><li>LP PPA </li></ul></ul><ul><ul><li>obs 1 click install </li></ul></ul>
    43. 43. SysAdmins: why pkg-ing? <ul><li>“encode” best practices </li></ul><ul><ul><li>apache2 </li></ul></ul><ul><ul><li>phpmyadmin </li></ul></ul><ul><ul><li>don't document, package! </li></ul></ul>
    44. 44. users: why pkg-ing? <ul><li>“easier” deployment </li></ul><ul><ul><li>pre-built </li></ul></ul><ul><ul><li>dependencies </li></ul></ul>
    45. 45. what's next
    46. 46. what's next: CPANism <ul><li>Perl CPAN, Ruby gems, PHP PEAR & PECL, PyPI, R CRAN </li></ul><ul><li>Mozilla extensions, Eclipse plugins </li></ul><ul><li>should os distro handle this? </li></ul><ul><ul><li>if so, how? </li></ul></ul><ul><ul><ul><li>Debian: manual (py-support, py-central) </li></ul></ul></ul><ul><ul><ul><li>Gentoo: auto-generate </li></ul></ul></ul><ul><ul><ul><ul><li>ex needed by non-Perl </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>666+ </li></ul></ul></ul></ul></ul><ul><ul><li>if not, how? </li></ul></ul>
    47. 47. what's next: Java <ul><li>current practice: bundle JARs </li></ul><ul><li>Gentoo is doing fun stuff </li></ul><ul><li>Maven </li></ul>
    48. 48. what's next: PackageKit <ul><li>one UI to rule them all </li></ul><ul><ul><li>apt </li></ul></ul><ul><ul><li>conary </li></ul></ul><ul><ul><li>yum </li></ul></ul><ul><ul><li>zypp </li></ul></ul><ul><ul><li>... </li></ul></ul>
    49. 49. what's next: Windows <ul><li>Pidgin: GTK </li></ul><ul><li>XChat: GTK </li></ul><ul><li>GIMP: GTK </li></ul><ul><li>KDE on Windows </li></ul><ul><li>Games: DirectX </li></ul>
    50. 50. exit <ul><li>Things are getting better </li></ul><ul><li>Many challenges ahead </li></ul><ul><li>Thanx! </li></ul>
    51. 51. Q&A
    52. 52. References <ul><li>http://docs.fedoraproject.org/drafts/rpm-guide-en/index.html </li></ul><ul><li>http://wiki.rpath.com/ </li></ul><ul><li>http://www.packagekit.org/ </li></ul><ul><li>http://flickr.com/photos/mknowles/47457221/sizes/m/ </li></ul><ul><li>http://www.supermanhomepage.com/multimedia/Wallpaper-Images/superman-supergirl-tb.html </li></ul><ul><li>http://flickr.com/photos/juiceboxgasoline/98539782/ </li></ul><ul><li>http://flickr.com/photos/drh/2256587356/ </li></ul><ul><li>http://www.fpa.nifc.gov/Library/Documentation/FPA_PM_Reference_Information/Output/images/gis_layers.jpg </li></ul>
    1. Gostou de algum slide específico?

      Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

    ×