Successfully reported this slideshow.
Into Fedora RPM packages
Lubomir Rintel
Presented by
Fedora Package Maintainer
Creative Commons Attribution-ShareAlike lic...
Gems and RPM
Why use RPM?
Consistency simplifies maintenance
Administrative tasks (rpm)
Repository and update management (yum)
Lots exi...
Ruby Gems
Archive of Ruby code
Ruby library metadata specification
A sane and useful standard
Ruby specific
Guarantees con...
Wrapping Gems into RPM
Respecting both OS and Gem customs
FHS, naming and versioning standards, ...
Gem tooling still work...
Wrapping Gems into RPM
Respecting both OS and Gem customs
FHS, naming and versioning standards, ...
Gem tooling still work...
RPM basics
Binary package
Installable with rpm -i
Query installed package with rpm -q
Query package file with rpm -q -f
So...
RPM packaging basics
SPEC file
Divided into sections
Starts with header with tags
Metadata: %description, %files, %changel...
Ruby Gem RPM anatomy
Guidelines in Wiki
Defines
%{gemname}, %{gemdir}, %{geminstdir}
Name: rubygem-%{gemname}
Usually no r...
Questions?
Hands-on
exercise
Adding the package
into Fedora
Fedora infrastructure
Koji – Build System
http://koji.fedoraproject.org/koji/
Packages are built here
Maintains package co...
Fedora infrastructure
Bugzilla – Ticket tracking system
https://bugzilla.redhat.com/
New packages are reviewed here
GIT re...
Packager setup
Set up a SSH key in FAS
Install required client software
fedpkg, koji client, bodhi client
yum -y install f...
Questions?
Creative Commons Attribution-ShareAlike license applies
lkundrak@v3.sk
Contact:
GoodData is hiring!
● Perl, C, SQL, Java, Javascript
● Data analysis and visualization
http://www.gooddata.com/about/caree...
Useful resources
Wiki: https://fedoraproject.org/wiki/
https://fedoraproject.org/wiki/PackageMaintainers/Join
https://fedo...
Useful resources
Mailing lists
devel@lists.fedoraproject.org
ruby-sig@lists.fedoraproject.org
IRC
#fedora-devel@irc.freeno...
Upcoming SlideShare
Loading in …5
×

Brno meetr: Packaging Ruby Gems into RPM

1,103 views

Published on

Packaging Ruby Gems into RPM

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Brno meetr: Packaging Ruby Gems into RPM

  1. 1. Into Fedora RPM packages Lubomir Rintel Presented by Fedora Package Maintainer Creative Commons Attribution-ShareAlike license applies. Packaging Gems
  2. 2. Gems and RPM
  3. 3. Why use RPM? Consistency simplifies maintenance Administrative tasks (rpm) Repository and update management (yum) Lots existing tooling Creating Live or JEOS images (livecd-tools) Reproducible builds (mock, koji) Security Package signing (rpm -k) File verification (rpm -V)
  4. 4. Ruby Gems Archive of Ruby code Ruby library metadata specification A sane and useful standard Ruby specific Guarantees consistent build mechanism Subset of RPM capabilities Naming and versioning Dependency resolution Maps well to RPM
  5. 5. Wrapping Gems into RPM Respecting both OS and Gem customs FHS, naming and versioning standards, ... Gem tooling still works Use wisely Can be aided with automated tools gem2rpm Available in rubygem-gem2rpm package
  6. 6. Wrapping Gems into RPM Respecting both OS and Gem customs FHS, naming and versioning standards, ... Gem tooling still works Use wisely Can be aided with automated tools gem2rpm Available in rubygem-gem2rpm package Very helpful!
  7. 7. RPM basics Binary package Installable with rpm -i Query installed package with rpm -q Query package file with rpm -q -f Source package Wraps source files, patches and build SPEC Buildable with rpmbuild rpm -i and rpm -q -p works the same as with binaries
  8. 8. RPM packaging basics SPEC file Divided into sections Starts with header with tags Metadata: %description, %files, %changelog Shell scriptlets: %prep, %build, %install, %check, %pre, %post Macro expansion occurs first Defines: %{buildroot}, %{_prefix}, %{?dist} Conditionals: %if .. %endif, %ifarch i386
  9. 9. Ruby Gem RPM anatomy Guidelines in Wiki Defines %{gemname}, %{gemdir}, %{geminstdir} Name: rubygem-%{gemname} Usually no rebuild Source package same as built in Rubygems Empty %prep and %build sections
  10. 10. Questions?
  11. 11. Hands-on exercise
  12. 12. Adding the package into Fedora
  13. 13. Fedora infrastructure Koji – Build System http://koji.fedoraproject.org/koji/ Packages are built here Maintains package collections for specific releases Bodhi – Update system https://admin.fedoraproject.org/updates/ Tells Koji to include packages in Stable (Beta, RC, Gold) repositories
  14. 14. Fedora infrastructure Bugzilla – Ticket tracking system https://bugzilla.redhat.com/ New packages are reviewed here GIT requests are processed here FAS2 – Fedora Account System https://admin.fedoraproject.org/accounts/ Need a packager account
  15. 15. Packager setup Set up a SSH key in FAS Install required client software fedpkg, koji client, bodhi client yum -y install fedora-packager Get a certificate for Koji client fedora-packager-setup Clone your package and start hacking fedpkg co rubygem-<name>
  16. 16. Questions? Creative Commons Attribution-ShareAlike license applies lkundrak@v3.sk Contact:
  17. 17. GoodData is hiring! ● Perl, C, SQL, Java, Javascript ● Data analysis and visualization http://www.gooddata.com/about/careers/
  18. 18. Useful resources Wiki: https://fedoraproject.org/wiki/ https://fedoraproject.org/wiki/PackageMaintainers/Join https://fedoraproject.org/wiki/Packaging/Guidelines http://fedoraproject.org/wiki/SIGs/Ruby RPM Packaging http://docs.fedoraproject.org/en-US/Fedora_Draft_Docu http://www.rpm.org/max-rpm/
  19. 19. Useful resources Mailing lists devel@lists.fedoraproject.org ruby-sig@lists.fedoraproject.org IRC #fedora-devel@irc.freenode.net #fedora-cs@irc.freenode.net

×