Changes from Version 1 of YumForIsvs

Show
Ignore:
Author:
skvidal (IP: 98.122.179.90)
Timestamp:
02/03/11 16:54:59 (7 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • YumForIsvs

    v0 v1  
     1= Yum For ISVs = 
     2 
     3So, you're shipping a product as an rpm and you want to keep it updated. This page will help you with the basics to do just that. 
     4We make a few assumptions: 
     5 
     6 * Your product/package is not being shipped in the linux distros themselves 
     7 * Your product/package is being packaged in the rpm format 
     8 * You have a website where you can host your package and a yum repo - any simple http server will do 
     9 * You have a linux system upon which you can run createrepo 
     10 
     11If you don't have the above then get them and come back. 
     12 
     13 
     14Yum knows to look for updates for packages by knowing about the package repositories they live in. A package repository is a collection of packages and the accompanying metadata about those packages stored in a specific format. Yum looks at the repositories that are listed in its repos.d configuration directory (normally /etc/yum.repos.d/). It checks to see if the repositories have new repodata. If they do then it downloads this repodata and looks to see if the repository has a newer version of any package the system has installed. 
     15 
     16Makes sense? 
     17 
     18 
     19== Use Case == 
     20The general use case that we're expecting for packages/products not included with the linux distro is: 
     21 
     22 * user finds a product via websearch or reference on a website. 
     23 * user goes to product websites and buys/accesses the product in an rpm package. 
     24 * user installs rpm package (ideally using yum but not necessarily) 
     25 * user then would like to automatically receive updates whenever the package is updated using their normal updater, yum. 
     26 
     27 
     28== Here's what you need to do == 
     29 * in the package the user is likely to download include a .repo file in /etc/yum.repos.d/ - normally it will be named after the company or product. 
     30 * the .repo file should be in the yum repo format which is quite simple. 
     31 
     32  Here's an example for a fictional widgetizer product, comments precede each line. 
     33  {{{ 
     34     # any word will do as long as it uniquely identifies your repository. No spaces or 'odd' characters. 
     35     [widgetizer]  
     36     # completely free form text field. 
     37     name = Widgetizer from Almagamted Widgets, Inc: $basearch  
     38     # path where your repository can be found - this is the path where you find the 'repodata' dir made by createrepo 
     39     baseurl = http://yum.widgetizer.com/$basearch/  
     40     # enable the repository 
     41     enabled = 1  
     42     # path to your gpg public key so yum can import it. 
     43     gpgkey = http://yum.widgetizer.com/widgetizer.public_key.gpg  
     44     # enable gpg checking of your packages. 
     45     gpgcheck = 1  
     46  }}} 
     47 
     48 
     49   $basearch is expanded out by yum to match the 'base architecture' for the system this file is installed on. base architecture is the way we refer to families of cpu 
     50   architectures. Yum derives this value from your architecture (uname -m). For example if your architecture is i686 your basearch will be i386. If your arch is ia32e  
     51   your basearch  will be x86_64. 
     52    
     53 
     54 * the above file should be included in the rpm your user downloaded. If this file is in /etc/yum.repos.d then yum will now know about your repository. 
     55 * whenever yum is used it will check your repository for updates. 
     56 
     57That's the basics. 
     58 
     59== How to setup your repository == 
     60 
     61The gist of it is: 
     62 
     63 * put all the packages you'd like in the repository in a directory (or a set of subdirectories) 
     64 * run createrepo on the path you would like to make into a repository 
     65 * anytime you add/remove/change a package in that path run createrepo again. 
     66  
     67For more details on how to best run createrepo please see the RepoCreate guide on this wiki. 
     68 
     69 
     70Let us know if you have any additional questions at yum@lists.baseurl.org.