SlideShare a Scribd company logo
1 of 14
Download to read offline
romal@fedoraproject.org - 21 Mai 2008
Florian Tani
Presented by
Licensed under a Creative Commons Attribution-ShareAlike (BY-SA) 3.0 license. http://creativecommons.org/by-sa/3.0/
Introduction in creating 
RPM packages
Stuff covered
Basic concept of RPM packaging
How to write a simple SPEC for a simple package
Stuff not covered
Stuff from Fedora Packaging Guidelines
Advanced tricks around RPM packaging
Whatever off-topic
Matter of day
Outline
Getting Started
Quick into to RPM
How RPMs are packaged
RPM Packaging Basics
The toolset
The SPEC file
Writing a SPEC file
Building your package
Getting Started
Creating a RPM package is easy
Equivalent to writing a script for automatically
compile and install a particular source code package
With some extra rules to follow
Straightforward, write a SPEC, put the source
tarball and the SPEC in the correct place, run
rpmbuild, wait, fun, profit!.
The Toolset
RPMBuild
Obviously, used for building RPM
yum install rpmdevtools fedora-packager
This is the primary tool needed for building RPM.
rpmbuild -ba mypackage.spec
rpmbuild --rebuild mypackage.src.rpm
rpmbuild -ta mypackage.tar.bz2
Exist an Eclipse plug-in called :
Fedora Packager
yum install eclipse-fedorapackager
The SPEC file
Look at it as the specification
config for a RPM package
Generally consist of several parts
Headers
Source preparation script (%prep)
Build script (%build)
Install script (%install)
Post-installation cleanup script (%clean)
Installed files listing (%files)
SPEC changelog (%changelog)
Writing a SPEC file
General steps
Define the package information
Figure out the dependencies required for
building the package and define in the spec
Write the prepare script
Write the build script
Write the install script
Define files included in the package
Building RPM packages
To create a RPM build tree skeleton
rpmdev-setuptree
This will create a tree in ~/rpmbuild
containing:
BUILD – folder for temporary build files
BUILDROOT – folder for temporary install files
RPMS – generated RPMs are saved here
SOURCES – where you should put your
source tarballs
SPECS – where you should pun your specfile
Building RPM packages
Save the specfile in the SPEC folder
Copy the source tarballs to the SOURCES
folder
Chdir to the SPEC folder, and build!!!
rpmbuild -ba yourspecfile.spec
The build process will run,Source RPM will
be saved in SRPMS folder, and binary RPM
will be saved in RPMS folder.
Make the step
Grab some softwares which are not
packaged in Fedora Repository, package
them, and submit for review on Bugzilla
Start writing your RPM package!
Be A Fedora Packager
http://join.fedoraproject.org
http://fedoraproject.org/wiki/Join_the_packag
e_collection_maintainers
Useful Links
Fedora Packaging Guidelines:
https://fedoraproject.org/wiki/Packaging:Guidelines
https://fedoraproject.org/wiki/Packaging:ReviewGuidelines
Maximum RPM:
http://www.rpm.org/max-rpm-snapshot/
Fedora GIT Tree (contains lots of example specs)
http://pkgs.fedoraproject.org/gitweb/ (be patient with it)
Fedora packaging mailing list
https://admin.fedoraproject.org/mailman/listinfo/packaging
Rpmlint website:
http://rpmlint.zarb.org/cgi-bin/trac.cgi
Any questions?
Any volunteers?
Licensed under a Creative Commons Attribution-ShareAlike (BY-SA) 3.0 license. http://creativecommons.org/by-sa/3.0/
linux@openlabs.cc
floriantani@gmail.com
Contact:
romal@fedoraproject.org - 21 Mai 2008
We can't wait to impress you,
The team

More Related Content

Viewers also liked (6)

Fedora Linux
Fedora LinuxFedora Linux
Fedora Linux
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Linux.ppt
Linux.ppt Linux.ppt
Linux.ppt
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
 
Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
 

Similar to RPM packaging @OSCAL2014

Deploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTDeploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APT
Joshua Thijssen
 

Similar to RPM packaging @OSCAL2014 (20)

Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPM
 
RPM Packaging 101 (Old)
RPM Packaging 101 (Old)RPM Packaging 101 (Old)
RPM Packaging 101 (Old)
 
Bringing-it-all-together-overview-of-rpm-packaging-in-fedora
Bringing-it-all-together-overview-of-rpm-packaging-in-fedoraBringing-it-all-together-overview-of-rpm-packaging-in-fedora
Bringing-it-all-together-overview-of-rpm-packaging-in-fedora
 
Composer - The missing package manager for PHP
Composer - The missing package manager for PHPComposer - The missing package manager for PHP
Composer - The missing package manager for PHP
 
Packaging for the Maemo Platform
Packaging for the Maemo PlatformPackaging for the Maemo Platform
Packaging for the Maemo Platform
 
Rpm cheatbook
Rpm cheatbookRpm cheatbook
Rpm cheatbook
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Perl in RPM-Land
Perl in RPM-LandPerl in RPM-Land
Perl in RPM-Land
 
RPM: Speed up your deploy
RPM: Speed up your deployRPM: Speed up your deploy
RPM: Speed up your deploy
 
Brno meetr: Packaging Ruby Gems into RPM
Brno meetr: Packaging Ruby Gems into RPMBrno meetr: Packaging Ruby Gems into RPM
Brno meetr: Packaging Ruby Gems into RPM
 
OpenStack for Centos
OpenStack for CentosOpenStack for Centos
OpenStack for Centos
 
Composer & Drupal
Composer & DrupalComposer & Drupal
Composer & Drupal
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015
 
Deploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTDeploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APT
 
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
 
Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015
 
Linux for programmers
Linux for programmersLinux for programmers
Linux for programmers
 
composer_talk_20160209
composer_talk_20160209composer_talk_20160209
composer_talk_20160209
 
How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)
 
Apache Bigtop and ARM64 / AArch64 - Empowering Big Data Everywhere
Apache Bigtop and ARM64 / AArch64 - Empowering Big Data EverywhereApache Bigtop and ARM64 / AArch64 - Empowering Big Data Everywhere
Apache Bigtop and ARM64 / AArch64 - Empowering Big Data Everywhere
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

RPM packaging @OSCAL2014

  • 2. Florian Tani Presented by Licensed under a Creative Commons Attribution-ShareAlike (BY-SA) 3.0 license. http://creativecommons.org/by-sa/3.0/ Introduction in creating  RPM packages
  • 3. Stuff covered Basic concept of RPM packaging How to write a simple SPEC for a simple package Stuff not covered Stuff from Fedora Packaging Guidelines Advanced tricks around RPM packaging Whatever off-topic Matter of day
  • 4. Outline Getting Started Quick into to RPM How RPMs are packaged RPM Packaging Basics The toolset The SPEC file Writing a SPEC file Building your package
  • 5. Getting Started Creating a RPM package is easy Equivalent to writing a script for automatically compile and install a particular source code package With some extra rules to follow Straightforward, write a SPEC, put the source tarball and the SPEC in the correct place, run rpmbuild, wait, fun, profit!.
  • 6. The Toolset RPMBuild Obviously, used for building RPM yum install rpmdevtools fedora-packager This is the primary tool needed for building RPM. rpmbuild -ba mypackage.spec rpmbuild --rebuild mypackage.src.rpm rpmbuild -ta mypackage.tar.bz2 Exist an Eclipse plug-in called : Fedora Packager yum install eclipse-fedorapackager
  • 7. The SPEC file Look at it as the specification config for a RPM package Generally consist of several parts Headers Source preparation script (%prep) Build script (%build) Install script (%install) Post-installation cleanup script (%clean) Installed files listing (%files) SPEC changelog (%changelog)
  • 8. Writing a SPEC file General steps Define the package information Figure out the dependencies required for building the package and define in the spec Write the prepare script Write the build script Write the install script Define files included in the package
  • 9. Building RPM packages To create a RPM build tree skeleton rpmdev-setuptree This will create a tree in ~/rpmbuild containing: BUILD – folder for temporary build files BUILDROOT – folder for temporary install files RPMS – generated RPMs are saved here SOURCES – where you should put your source tarballs SPECS – where you should pun your specfile
  • 10. Building RPM packages Save the specfile in the SPEC folder Copy the source tarballs to the SOURCES folder Chdir to the SPEC folder, and build!!! rpmbuild -ba yourspecfile.spec The build process will run,Source RPM will be saved in SRPMS folder, and binary RPM will be saved in RPMS folder.
  • 11. Make the step Grab some softwares which are not packaged in Fedora Repository, package them, and submit for review on Bugzilla Start writing your RPM package! Be A Fedora Packager http://join.fedoraproject.org http://fedoraproject.org/wiki/Join_the_packag e_collection_maintainers
  • 12. Useful Links Fedora Packaging Guidelines: https://fedoraproject.org/wiki/Packaging:Guidelines https://fedoraproject.org/wiki/Packaging:ReviewGuidelines Maximum RPM: http://www.rpm.org/max-rpm-snapshot/ Fedora GIT Tree (contains lots of example specs) http://pkgs.fedoraproject.org/gitweb/ (be patient with it) Fedora packaging mailing list https://admin.fedoraproject.org/mailman/listinfo/packaging Rpmlint website: http://rpmlint.zarb.org/cgi-bin/trac.cgi
  • 13. Any questions? Any volunteers? Licensed under a Creative Commons Attribution-ShareAlike (BY-SA) 3.0 license. http://creativecommons.org/by-sa/3.0/ linux@openlabs.cc floriantani@gmail.com Contact:
  • 14. romal@fedoraproject.org - 21 Mai 2008 We can't wait to impress you, The team