116 | | * '''ubuntu''': karmic |
117 | | |
118 | | No special steps are needed to do these backports. |
| 116 | * '''ubuntu''': karmic, lucid |
| 117 | |
| 118 | === python-ssl === |
| 119 | |
| 120 | To run bcfg2-server 1.0.0 and later on platforms with python 2.5 and earlier, you'll need a python-ssl backport. |
| 121 | |
| 122 | As of Bcfg2 1.0.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. The ssl module can be found [http://pypi.python.org/pypi/ssl here]. See [wiki:Authentication] for details. |
| 123 | |
| 124 | To build a package of the ssl backport for .deb based distributions that don't ship with python 2.6, you can follow these instructions, which use [http://github.com/astraw/stdeb/tree/master stdeb]. Alternatively if you happen to have .deb packaging skills, it would be great to get policy-complaint .debs into the major deb-based distributions. |
| 125 | |
| 126 | '''NOTE:''' To build the module on Debian (lenny) and Ubuntu (hardy), I had to apply this [attachment:ssl-1.15-debian.patch ssl-1.15-debian.patch] to remove bluetooth references. |
| 127 | |
| 128 | {{{ |
| 129 | sudo aptitude install python-all-dev fakeroot python-setuptools libssl-dev debhelper python-support |
| 130 | sudo easy_install stdeb |
| 131 | wget http://pypi.python.org/packages/source/s/ssl/ssl-1.15.tar.gz#md5=81ea8a1175e437b4c769ae65b3290e0c |
| 132 | tar xvfz ssl-1.15.tar.gz |
| 133 | cd ssl-1.15 |
| 134 | # patch here if necessary |
| 135 | stdeb_run_setup |
| 136 | cd deb_dist/ssl-1.15 |
| 137 | dpkg-buildpackage -rfakeroot -uc -us |
| 138 | sudo dpkg -i ../python-ssl_1.15-1_amd64.deb |
| 139 | }}} |
| 140 | |
| 141 | For complete bcfg2 goodness, you'll also want to package stdeb using stdeb: |
| 142 | {{{ |
| 143 | sudo aptitude install apt-file |
| 144 | wget http://pypi.python.org/packages/source/s/stdeb/stdeb-0.3.tar.gz#md5=e692f745597dcdd9343ce133e3b910d0 |
| 145 | tar xvfz stdeb-0.3.tar.gz |
| 146 | cd stdeb-0.3 |
| 147 | stdeb_run_setup |
| 148 | cd deb_dist/stdeb-0.3 |
| 149 | dpkg-buildpackage -rfakeroot -uc -us |
| 150 | sudo dpkg -i ../python-stdeb_0.3-1_all.deb |
| 151 | }}} |
| 382 | |
| 383 | ==== bcfg2-server + python <= 2.5 ==== |
| 384 | |
| 385 | To run on GNU/Linux distributions that do not ship with python 2.6 or newer, you need python-ssl backported. |
| 386 | |
| 387 | ===== upload stdeb ===== |
| 388 | |
| 389 | Upload: |
| 390 | {{{ |
| 391 | #!/bin/sh -x |
| 392 | |
| 393 | sudo aptitude install python-all-dev fakeroot python-setuptools libssl-dev debhelper python-support apt-file |
| 394 | sudo easy_install stdeb |
| 395 | wget http://pypi.python.org/packages/source/s/stdeb/stdeb-0.4.1.tar.gz |
| 396 | tar xvfz stdeb-0.4.1.tar.gz |
| 397 | cd stdeb-0.4.1 |
| 398 | stdeb_run_setup |
| 399 | cd deb_dist/stdeb-0.4.1 |
| 400 | cp debian/changelog debian/changelog.orig |
| 401 | ppa="testing" # "testing" or "ppa" (for stable) |
| 402 | try="2" |
| 403 | |
| 404 | for dist in dapper hardy intrepid; do |
| 405 | cp debian/changelog.orig debian/changelog |
| 406 | (cd debian && debchange --force-bad-version --preserve --newversion \ |
| 407 | "0.4.1-1~${ppa}${try}~${dist}${try}" \ |
| 408 | backport to ppa ${ppa}, dist ${dist}, try ${try}) |
| 409 | # Replace 0xAA95C349 to your GnuPG Key ID |
| 410 | debuild -S -sa -k0xAA95C349 # Using -sa here because we need .orig.tar.gz file |
| 411 | dput bcfg2-testing-force-${dist} ../stdeb_0.4.1-1~${ppa}${try}~${dist}${try}_source.changes |
| 412 | done |
| 413 | |
| 414 | # TODO: Fix "Upload Warnings: No copyright file found." |
| 415 | }}} |
| 416 | |
| 417 | |
| 418 | |
| 419 | And then make sure it's installed locally for the next step. |
| 420 | |
| 421 | ===== upload python-ssl ===== |
| 422 | |
| 423 | Upload: |
| 424 | {{{ |
| 425 | #!/bin/sh -x |
| 426 | |
| 427 | wget http://pypi.python.org/packages/source/s/ssl/ssl-1.15.tar.gz |
| 428 | tar xvfz ssl-1.15.tar.gz |
| 429 | cd ssl-1.15 |
| 430 | wget https://trac.mcs.anl.gov/projects/bcfg2/raw-attachment/wiki/BuildingDebianPackages/ssl-1.15-debian.patch |
| 431 | patch -p1 < ssl-1.15-debian.patch |
| 432 | |
| 433 | # Note: ssl backport will only build on systems with Python 2.5 or earlier |
| 434 | # this is a workaround for newer systems... |
| 435 | sudo ln -sf /usr/bin/python2.5 /usr/bin/python |
| 436 | sudo easy_install stdeb |
| 437 | stdeb_run_setup |
| 438 | |
| 439 | cd deb_dist/ssl-1.15 |
| 440 | cp debian/changelog debian/changelog.orig |
| 441 | ppa="testing" # "testing" or "ppa" (for stable) |
| 442 | try="1" |
| 443 | |
| 444 | for dist in dapper hardy intrepid; do |
| 445 | cp debian/changelog.orig debian/changelog |
| 446 | (cd debian && debchange --force-bad-version --preserve --newversion \ |
| 447 | "1.15-1~${ppa}${try}~${dist}${try}" \ |
| 448 | backport to ppa ${ppa}, dist ${dist}, try ${try}) |
| 449 | # Replace 0xAA95C349 to your GnuPG Key ID |
| 450 | debuild -S -sa -k0xAA95C349 # Using -sa here because we need .orig.tar.gz file |
| 451 | dput bcfg2-testing-force-${dist} ../ssl_1.15-1~${ppa}${try}~${dist}${try}_source.changes |
| 452 | done |
| 453 | |
| 454 | sudo ln -sf /usr/bin/python2.6 /usr/bin/python |
| 455 | }}} |
| 456 | |
| 457 | And then make sure it's installed locally for the next step. |