From: david-sarah Date: Mon, 1 Aug 2011 03:18:57 +0000 (-0700) Subject: Makefile: remove targets that used misc/debian[_helpers] which no longer exist. Also... X-Git-Tag: pre-393~17 X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/statistics?a=commitdiff_plain;h=4d58e7cef9569b1292f8cb34581a5ea31fa8d52f;p=tahoe-lafs%2Ftahoe-lafs.git Makefile: remove targets that used misc/debian[_helpers] which no longer exist. Also change docs/debian.rst to reflect the fact that we no longer support building .debs using those targets. refs #1454 --- diff --git a/Makefile b/Makefile index 1f498103..a0bda520 100644 --- a/Makefile +++ b/Makefile @@ -255,129 +255,3 @@ tarballs: upload-tarballs: @if [ "X${BB_BRANCH}" == "Xtrunk" ] || [ "X${BB_BRANCH}" == "X" ]; then for f in dist/allmydata-tahoe-*; do flappclient --furlfile ~/.tahoe-tarball-upload.furl upload-file $$f; done ; else echo not uploading tarballs because this is not trunk but is branch \"${BB_BRANCH}\" ; fi - -# DEBIAN PACKAGING - -VER=$(shell $(PYTHON) misc/build_helpers/get-version.py) -DEBCOMMENTS="'make deb' build" - -show-version: - @echo $(VER) -show-pp: - @echo $(PP) - -.PHONY: setup-deb deb-ARCH is-known-debian-arch -.PHONY: deb-etch deb-lenny deb-sid -.PHONY: deb-edgy deb-feisty deb-gutsy deb-hardy deb-intrepid deb-jaunty - -# we use misc/debian_helpers/$TAHOE_ARCH/debian - -deb-etch: # py2.4 - $(MAKE) deb-ARCH ARCH=etch TAHOE_ARCH=etch -deb-lenny: # py2.5 - $(MAKE) deb-ARCH ARCH=lenny TAHOE_ARCH=lenny -deb-sid: - $(MAKE) deb-ARCH ARCH=sid TAHOE_ARCH=sid - -deb-edgy: # py2.4 - $(MAKE) deb-ARCH ARCH=edgy TAHOE_ARCH=etch -deb-feisty: # py2.5 - $(MAKE) deb-ARCH ARCH=feisty TAHOE_ARCH=lenny -deb-gutsy: # py2.5 - $(MAKE) deb-ARCH ARCH=gutsy TAHOE_ARCH=lenny -deb-hardy: # py2.5 - $(MAKE) deb-ARCH ARCH=hardy TAHOE_ARCH=lenny -deb-intrepid: # py2.5 - $(MAKE) deb-ARCH ARCH=intrepid TAHOE_ARCH=lenny -deb-jaunty: # py2.6 - $(MAKE) deb-ARCH ARCH=jaunty TAHOE_ARCH=lenny - - - -# we know how to handle the following debian architectures -KNOWN_DEBIAN_ARCHES := etch lenny sid edgy feisty gutsy hardy intrepid jaunty - -ifeq ($(findstring x-$(ARCH)-x,$(foreach arch,$(KNOWN_DEBIAN_ARCHES),"x-$(arch)-x")),) -is-known-debian-arch: - @echo "ARCH must be set when using setup-deb or deb-ARCH" - @echo "I know how to handle:" $(KNOWN_DEBIAN_ARCHES) - false -else -is-known-debian-arch: - true -endif - -ifndef TAHOE_ARCH -TAHOE_ARCH=$(ARCH) -endif - -setup-deb: is-known-debian-arch - rm -f debian - ln -s misc/debian_helpers/$(TAHOE_ARCH)/debian debian - chmod +x debian/rules - -# etch (current debian stable) has python-simplejson-1.3, which doesn't -# support indent= -# sid (debian unstable) currently has python-simplejson 1.7.1 -# edgy has 1.3, which doesn't support indent= -# feisty has 1.4, which supports indent= but emits a deprecation warning -# gutsy has 1.7.1 -# -# we need 1.4 or newer - -deb-ARCH: is-known-debian-arch setup-deb - fakeroot debian/rules binary - @echo - @echo "The newly built .deb packages are in the parent directory from here." - -.PHONY: increment-deb-version -.PHONY: deb-etch-head deb-lenny-head deb-sid-head -.PHONY: deb-edgy-head deb-feisty-head deb-gutsy-head deb-hardy-head deb-intrepid-head deb-jaunty-head - -# The buildbot runs the following targets after each change, to produce -# up-to-date tahoe .debs. These steps do not create .debs for anything else. - -increment-deb-version: make-version - debchange --newversion $(VER) $(DEBCOMMENTS) -deb-etch-head: - $(MAKE) setup-deb ARCH=etch TAHOE_ARCH=etch - $(MAKE) increment-deb-version - fakeroot debian/rules binary -deb-lenny-head: - $(MAKE) setup-deb ARCH=lenny TAHOE_ARCH=lenny - $(MAKE) increment-deb-version - fakeroot debian/rules binary -deb-sid-head: - $(MAKE) setup-deb ARCH=sid TAHOE_ARCH=lenny - $(MAKE) increment-deb-version - fakeroot debian/rules binary - -deb-edgy-head: - $(MAKE) setup-deb ARCH=edgy TAHOE_ARCH=etch - $(MAKE) increment-deb-version - fakeroot debian/rules binary -deb-feisty-head: - $(MAKE) setup-deb ARCH=feisty TAHOE_ARCH=lenny - $(MAKE) increment-deb-version - fakeroot debian/rules binary -deb-gutsy-head: - $(MAKE) setup-deb ARCH=gutsy TAHOE_ARCH=lenny - $(MAKE) increment-deb-version - fakeroot debian/rules binary -deb-hardy-head: - $(MAKE) setup-deb ARCH=hardy TAHOE_ARCH=lenny - $(MAKE) increment-deb-version - fakeroot debian/rules binary -deb-intrepid-head: - $(MAKE) setup-deb ARCH=intrepid TAHOE_ARCH=lenny - $(MAKE) increment-deb-version - fakeroot debian/rules binary -deb-jaunty-head: - $(MAKE) setup-deb ARCH=jaunty TAHOE_ARCH=lenny - $(MAKE) increment-deb-version - fakeroot debian/rules binary - -# new experimental debian-packaging-building target -.PHONY: EXPERIMENTAL-deb -EXPERIMENTAL-deb: is-known-debian-arch - $(PYTHON) misc/build_helpers/build-deb.py $(ARCH) diff --git a/docs/debian.rst b/docs/debian.rst index ac6dce4f..cee6b445 100644 --- a/docs/debian.rst +++ b/docs/debian.rst @@ -1,184 +1,59 @@ -============== -Debian Support -============== +========================= +Debian and Ubuntu Support +========================= 1. `Overview`_ -2. `TL;DR supporting package building instructions`_ -3. `TL;DR package building instructions for Tahoe`_ -4. `Building Debian Packages`_ -5. `Using Pre-Built Debian Packages`_ -6. `Building From Source on Debian Systems`_ +2. `Dependency Packages`_ + Overview ======== -One convenient way to install Tahoe-LAFS is with Debian packages. -This document attempts to explain how to complete a desert island build for -people in a hurry. It also attempts to explain more about our Debian packaging -for those willing to read beyond the simple pragmatic packaging exercises. - -TL;DR supporting package building instructions -============================================== - -There are only four supporting packages that are currently not available from -the Debian apt repositories in Debian Lenny:: - - python-foolscap python-zfec argparse zbase32 - -First, we'll install some common packages for development:: - - sudo apt-get install -y build-essential debhelper cdbs python-central \ - python-setuptools python python-dev python-twisted-core \ - fakeroot darcs python-twisted python-nevow \ - python-simplejson python-pycryptopp devscripts \ - apt-file - sudo apt-file update - - -To create packages for Lenny, we'll also install stdeb:: - - sudo apt-get install python-all-dev - STDEB_VERSION="0.5.1" - wget http://pypi.python.org/packages/source/s/stdeb/stdeb-$STDEB_VERSION.tar.gz - tar xzf stdeb-$STDEB_VERSION.tar.gz - cd stdeb-$STDEB_VERSION - python setup.py --command-packages=stdeb.command bdist_deb - sudo dpkg -i deb_dist/python-stdeb_$STDEB_VERSION-1_all.deb - -Now we're ready to build and install the zfec Debian package:: - - darcs get http://allmydata.org/source/zfec/trunk zfac - cd zfac/zfec/ - python setup.py sdist_dsc - cd `find deb_dist -mindepth 1 -maxdepth 1 -type d` && \ - dpkg-buildpackage -rfakeroot -uc -us - sudo dpkg -i ../python-zfec_1.4.6-r333-1_amd64.deb - -We need to build a pyutil package:: - - wget http://pypi.python.org/packages/source/p/pyutil/pyutil-1.6.1.tar.gz - tar -xvzf pyutil-1.6.1.tar.gz - cd pyutil-1.6.1/ - python setup.py --command-packages=stdeb.command sdist_dsc - cd deb_dist/pyutil-1.6.1/ - dpkg-buildpackage -rfakeroot -uc -us - sudo dpkg -i ../python-pyutil_1.6.1-1_all.deb - -We also need to install argparse and zbase32:: - - sudo easy_install argparse # argparse won't install with stdeb (!) :-( - sudo easy_install zbase32 # XXX TODO: package with stdeb - -Finally, we'll fetch, unpack, build and install foolscap:: - - # You may not already have Brian's key: - # gpg --recv-key 0x1514A7BD - wget http://foolscap.lothar.com/releases/foolscap-0.5.0.tar.gz.asc - wget http://foolscap.lothar.com/releases/foolscap-0.5.0.tar.gz - gpg --verify foolscap-0.5.0.tar.gz.asc - tar -xvzf foolscap-0.5.0.tar.gz - cd foolscap-0.5.0/ - python setup.py --command-packages=stdeb.command sdist_dsc - cd deb_dist/foolscap-0.5.0/ - dpkg-buildpackage -rfakeroot -uc -us - sudo dpkg -i ../python-foolscap_0.5.0-1_all.deb - -TL;DR package building instructions for Tahoe -============================================= - -If you want to build your own Debian packages from the darcs tree or from -a source release, do the following:: - - cd ~/ - mkdir src && cd src/ - darcs get --lazy http://allmydata.org/source/tahoe-lafs/trunk tahoe-lafs - cd tahoe-lafs - # set this for your Debian release name (lenny, sid, etc) - make deb-lenny-head - # You must have your dependency issues worked out by hand for this to work - sudo dpkg -i ../allmydata-tahoe_1.6.1-r4262_all.deb - -You should now have a functional desert island build of Tahoe with all of the -supported libraries as .deb packages. You'll need to edit the Debian-specific -``/etc/defaults/allmydata-tahoe`` file to get Tahoe started. Data is by default -stored in ``/var/lib/tahoelafsd/`` and Tahoe runs as the 'tahoelafsd' user. - -Building Debian Packages -======================== - -The Tahoe source tree comes with limited support for building Debian packages -on a variety of Debian and Ubuntu platforms. For each supported platform, -there is a "deb-PLATFORM-head" target in the Makefile that will produce a -Debian package from a darcs checkout, using a version number that is derived -from the most recent darcs tag, plus the total number of revisions present in -the tree (e.g. "1.1-r2678"). - -To create Debian packages from a Tahoe tree, you will need some additional -tools installed. The canonical list of these packages is in the -"Build-Depends" clause of ``misc/sid/debian/control``, and includes:: - - build-essential - debhelper - cdbs - python-central - python-setuptools - python - python-dev - python-twisted-core - -In addition, to use the "deb-$PLATFORM-head" target, you will also need the -"``debchange``" utility from the "devscripts" package, and the "fakeroot" package. - -Some recent platforms can be handled by using the targets for the previous -release, for example if there is no "deb-hardy-head" target, try building -"deb-gutsy-head" and see if the resulting package will work. - -Note that we haven't tried to build source packages (``.orig.tar.gz`` + dsc) yet, -and there are no such source packages in our APT repository. - -Using Pre-Built Debian Packages -=============================== - -The ``tahoe-lafs.org`` site hosts an APT repository with Debian packages that are -built after each checkin. The `DownloadDebianPackages -`_ wiki page -describes this repository. - -The ``tahoe-lafs.org`` APT repository also includes Debian packages of support -libraries, like Foolscap, zfec, pycryptopp, and everything else you need that -isn't already in Debian. - -Building From Source on Debian Systems -====================================== - -Many of Tahoe's build dependencies can be satisfied by first installing -certain Debian packages: simplejson is one of these. Some Debian/Ubuntu -platforms do not provide the necessary ``.egg-info`` metadata with their -packages, so the Tahoe build process may not believe they are present. Some -Tahoe dependencies are not present in most Debian systems (such as foolscap -and zfec): debs for these are made available in the APT repository described -above. - -The Tahoe build process will acquire (via setuptools) most of the libraries -that it needs to run and which are not already present in the build -environment). - -We have observed occasional problems with this acquisition process. In some -cases, setuptools will only be half-aware of an installed Debian package, -just enough to interfere with the automatic download+build of the dependency. -For example, on some platforms, if Nevow-0.9.26 is installed via a Debian -package, setuptools will believe that it must download Nevow anyways, but it -will insist upon downloading that specific 0.9.26 version. Since the current -release of Nevow is 0.9.31, and 0.9.26 is no longer available for download, -this will fail. - -``_ -contains source tarballs for Tahoe's dependent libraries. The Nevow-0.9.26-type -problem can be mitigated by putting the right dependency in ``tahoe-deps``, -or by downloading the "SUMO" distribution of Tahoe-LAFS, which includes all of -these source tarballs. - -If you encounter problems building a dependency from source, -``_ -contains binary (`.egg`) distributions for various OS platforms and versions -of Python. +Tahoe-LAFS is provided as a ``.deb`` package in current Debian (>= wheezy) +and Ubuntu (>= lucid) releases. Before official packages were added, the Tahoe +source tree provided support for building unofficial packages for a variety +of popular Debian/Ubuntu versions. The project also ran buildbots to create +``.debs`` of current trunk for ease of testing. + +As of version 1.9, the source tree no longer provides these tools. To +construct a ``.deb`` from current trunk, your best bet is to apply the current +Debian diff from the latest upstream package and invoke the ``debian/rules`` +as usual. Debian's standard ``apt-get`` tool can be used to fetch the current +source package (including the Debian-specific diff): run +"``apt-get source tahoe-lafs``". That will fetch three files: the ``.dsc`` +control file, the main Tahoe tarball, and the Debian-specific +``.debian.tar.gz`` file. Just unpack the ``.debian.tar.gz`` file inside +your Tahoe source tree, modify the version number in ``debian/changelog``, +then run "``fakeroot ./debian/rules binary``", and a new ``.deb`` will be +placed in the parent directory. + + +Dependency Packages +=================== + +Tahoe depends upon a number of additional libraries. When building Tahoe from +source, any dependencies that are not already present in the environment will +be downloaded (via ``easy_install``) and stored in the ``support/lib`` +directory. + +The ``.deb`` packages, of course, rely solely upon other ``.deb`` packages. +For reference, here is a list of the debian package names that provide Tahoe's +dependencies as of the 1.9 release: + +* python +* python-zfec +* python-pycryptopp +* python-foolscap +* python-openssl (needed by foolscap) +* python-twisted +* python-nevow +* python-mock +* python-simplejson +* python-setuptools +* python-support (for Debian-specific install-time tools) + +When building your own Debian packages, a convenient way to get all these +dependencies installed is to first install the official "tahoe-lafs" package, +then uninstall it, leaving the dependencies behind. You may also find it +useful to run "``apt-get build-dep tahoe-lafs``" to make sure all the usual +build-essential tools are installed.