Changes between Version 23 and Version 24 of BuildingDebianPackages


Ignore:
Timestamp:
10/29/09 20:26:18 (14 years ago)
Author:
dclark
Comment:

Reorg in prep for more doc

Legend:

Unmodified
Added
Removed
Modified
  • BuildingDebianPackages

    v23 v24  
    33= Building Debian Packages = 
    44 
     5 
    56== Bcfg2 Packaging == 
    67 
    7 The Bcfg2 project provides a `debian` subdirectory with the project's 
    8 source that enables users to create their own Debian/Ubuntu compatible 
    9 packages (`.deb` files).  The steps to do this, assuming that you are 
    10 running on a Debian/Ubuntu system, are as follows: 
    11  
    12 === Install packages necessary for building bcfg2 === 
    13  
    14 If the distribution you are building on already has packaged bcfg2 
    15 (even an older version), the following command will likely install the 
    16 necessary packages to enable it to be built: 
     8The Bcfg2 project provides a `debian` subdirectory with the project's source that enables users to create their own Debian/Ubuntu compatible packages (`.deb` files).  The steps to do this, assuming that you are running on a Debian/Ubuntu system, are as follows: 
     9 
     10=== Build deps === 
     11 
     12If the distribution you are building on already has packaged bcfg2 (even an older version), the following command will likely install the necessary packages to enable it to be built: 
    1713 
    1814{{{ 
     
    2016}}} 
    2117 
    22 Or, if the available repositories do not have any version of bcfg2, 
    23 try something like: 
     18Or, if the available repositories do not have any version of bcfg2, try something like: 
    2419 
    2520{{{ 
     
    2722}}} 
    2823 
    29 === Install the Bcfg2 source code === 
    30  
    31 Depending on which version of bcfg2 you want build, you can obtain the 
    32 source code from [wiki:Download] or from the project's Subversion 
    33 repository.  To create a local anonymous working copy of the latest 
    34 version of the bcfg2 source code, use a command like the following: 
     24=== Install source code === 
     25 
     26Depending on which version of bcfg2 you want build, you can obtain the source code from [wiki:Download] or from the project's Subversion 
     27repository.  To create a local anonymous working copy of the latest version of the bcfg2 source code, use a command like the following: 
    3528 
    3629{{{ 
     
    3831}}} 
    3932 
    40 === Configure the Bcfg2 working copy === 
    41  
    42 Once you have a copy of the source code, there are a couple of final 
    43 steps. 
    44  
    45 First, Bcfg2 as packaged for Debian supports several different 
    46 versions of Python.  To select the appropriate version you will need 
    47 to run the `buildsys-select.sh` script from within the `debian` 
    48 subdirectory.  You must pass it an argument ''<PYTHON_VERSION>'' that 
    49 is one of the following values: 
     33=== Configure for python version === 
     34'''This step is only needed in Bcfg2 1.0.0rc1 and earlier.''' 
     35 
     36Once you have a copy of the source code, there are a couple of final steps. 
     37 
     38First, Bcfg2 as packaged for Debian supports several different versions of Python.  To select the appropriate version you will need 
     39to run the `buildsys-select.sh` script from within the `debian` subdirectory.  You must pass it an argument ''<PYTHON_VERSION>'' that is one of the following values: 
    5040 
    5141 `2.3`:: for Debian sarge. 
     
    5545    newer. 
    5646 
    57 As Debian and other related distributions have matured, many of these 
    58 are fading from use and the correct choice for ''<PYTHON_VERSION>'' is 
    59 almost always `pycentral`. 
    60  
    61 Once you have figured out the correct value for ''<PYTHON_VERSION>'', 
    62 run the following command: 
     47As Debian and other related distributions have matured, many of these are fading from use and the correct choice for ''<PYTHON_VERSION>'' is almost always `pycentral`. 
     48 
     49Once you have figured out the correct value for ''<PYTHON_VERSION>'', run the following command: 
    6350 
    6451{{{ 
     
    6754}}} 
    6855 
    69 The next step is to update the Debian `changelog` file with an 
    70 appropriate package version string.  Debian packages contain a version 
    71 that is extracted from the latest entry in the `changelog` file.  An 
    72 appropriate version will help you distinguish your locally built 
    73 package from one provided by your distribution.  It also helps the 
    74 packaging system know when a newer version of the package is available 
    75 to install. 
    76  
    77 It is possible to skip this step, but the packages you build will have 
    78 the same version as the source distribution and will be easy to 
    79 confuse with other similarly named (but maybe not equivalent) 
    80 packages. 
     56=== Update the changelog === 
     57 
     58The next step is to update the Debian `changelog` file with an appropriate package version string.  Debian packages contain a version 
     59that is extracted from the latest entry in the `changelog` file.  An appropriate version will help you distinguish your locally built 
     60package from one provided by your distribution.  It also helps the packaging system know when a newer version of the package is available to install. 
     61 
     62It is possible to skip this step, but the packages you build will have the same version as the source distribution and will be easy to 
     63confuse with other similarly named (but maybe not equivalent) packages. 
    8164 
    8265The basic format of the package version string to use is this: 
     
    8467  {{{<UPSTREAM VER>~<UPSTREAM PRE-VER>+r<UPSTREAM SVN REV>-0.1+<LOCAL VER>}}} 
    8568 
    86 '''NOTE: The '~', '+', and '-' characters have significance in 
    87 determining when one package is newer than another.  The following 
    88 format is believed to do the right thing in all common situations.''' 
     69'''NOTE: The '~', '+', and '-' characters have significance in determining when one package is newer than another.  The following format is believed to do the right thing in all common situations.''' 
    8970 
    9071The components of the package version string are explained below: 
    9172 
    9273 `<UPSTREAM VER>`:: 
    93    This is the version of the Bcfg source code you are working from. 
    94    It will likely be something like `0.9.6` or `1.0`. 
     74   This is the version of the Bcfg source code you are working from. It will likely be something like `0.9.6` or `1.0`. 
    9575 `~<UPSTREAM PRE-VER>`:: 
    96    If you are using a published pre-release of Bcfg2, it will have a 
    97    name like `pre1` or `rc1`.  Use that string here, otherwise drop 
    98    this component and the preceding tilde (`~`) character from the 
    99    package version string. 
     76   If you are using a published pre-release of Bcfg2, it will have a name like `pre1` or `rc1`.  Use that string here, otherwise drop this component and the preceding tilde (`~`) character from the package version string. 
    10077 `+<UPSTREAM SVN REV>`:: 
    101    If you are building from a local working copy of the Subversion 
    102    repository, it is useful to include the repository revision in the 
    103    package version.  It will be a number like '5464'.  If you are 
    104    building from a downloaded copy of the source, drop this component 
    105    (including the preceding plus-sign (`+`) from the package version 
    106    string. 
     78   If you are building from a local working copy of the Subversion repository, it is useful to include the repository revision in the package version.  It will be a number like '5464'.  If you are building from a downloaded copy of the source, drop this component (including the preceding plus-sign (`+`) from the package version string. 
    10779 `+<LOCAL VER>`:: 
    108    This is a locally relevant name like your last name or your domain 
    109    name, plus the digit `1`.  For example, if your family name is 
    110    ''Smith'', you could use `smith1`.  If you work for ''Example Inc'', 
    111    you could use `example1`. 
     80   This is a locally relevant name like your last name or your domain name, plus the digit `1`.  For example, if your family name is ''Smith'', you could use `smith1`.  If you work for ''Example Inc'', you could use `example1`. 
    11281 
    11382Here are some examples: 
    11483 
    115  * If you are building packages for revision 5463 of the Subversion 
    116    trunk, and the latest published version is 1.0pre5, the version 
    117    string should be `1.0~pre5+r5463-0.1+example1`. 
    118  * If you are building packages for the published 1.0 rc1 version, the 
    119    version string should be `1.0~rc1-0.1+example1`. 
    120  * If you are building packages for the published 1.0 version, the 
    121    version string should be `1.0-0.1+example1`. 
    122  
    123 If you are working on a Subversion working copy of 1.0 pre5 and have 
    124 the `devscripts` package installed, the following command is a 
    125 convenient way to create a well formatted changelog entry: 
     84 * If you are building packages for revision 5463 of the Subversion trunk, and the latest published version is 1.0pre5, the version string should be `1.0~pre5+r5463-0.1+example1`. 
     85 * If you are building packages for the published 1.0 rc1 version, the version string should be `1.0~rc1-0.1+example1`. 
     86 * If you are building packages for the published 1.0 version, the version string should be `1.0-0.1+example1`. 
     87 
     88If you are working on a Subversion working copy of 1.0 pre5 and have the `devscripts` package installed, the following command is a convenient way to create a well formatted changelog entry: 
    12689 
    12790{{{ 
     
    13093}}} 
    13194 
    132 === Building the Bcfg2 Package === 
     95=== Building the package === 
     96 
     97==== Local use ==== 
    13398 
    13499With the preliminaries out of the way, building the package is simple. 
     
    139104}}} 
    140105 
    141 The freshly built packages will be deposited in the parent of the 
    142 current directory (`..`).  Examine the output of `dpkg-buildpackage` 
    143 for details. 
    144  
    145   
     106The freshly built packages will be deposited in the parent of the current directory (`..`).  Examine the output of `dpkg-buildpackage` for details. 
     107 
     108==== Debian repository ==== 
     109 
     110There is currently no one maintaining newer versions of Bcfg2 than are in the Debian archives. If you are interested in doing do, you may want to take a look at [http://en.opensuse.org/Build_Service/Deb_builds openSUSE Build Service/Deb builds]. 
     111 
     112 
     113==== Ubuntu PPA ==== 
     114 
     115TODO 
     116 
     117 
    146118== Python SSL Backport Packaging == 
     119 
    147120As of Bcfg2 1.0, Bcfg2 has switched to the in-tree ssl module included with python 2.6. A backport exists for 2.3, 2.4, and 2.5. With this, M2Crypto is not needed, and tlslite is no longer included with bcfg2 sources. The ssl module can be found [http://pypi.python.org/pypi/ssl here]. See [wiki:Authentication] for details.  
    148121 
     
    178151 
    179152== SQLAlchemy Backport Packaging == 
     153 
    180154For the standard Bcfg2 1.0 Snapshots reporting feature, you need SQLAlchemy 0.5 or later. 
    181155 
    182156=== Trisquel 3.0 / Ubuntu Jaunty === 
     157 
    183158(rough notes; will make nicer later...) 
    184159 
     
    230205dput bcfg2-force-jaunty sqlalchemy_0.5.5-1~ppa2~jaunty2_source.changes 
    231206}}} 
     207 
     208== debhelper backport packaging == 
     209 
     210Bcfg2 1.0.0rc2 and later require a very recent debhelper, which in turn requires a very recent po4a. 
     211 
     212TODO