|
Translations |
BackportingPackagesOccasionally, you may wish to use more recent versions of specific pieces of software. You have the choice of either compiling that software from scratch, or (assuming the version you desire is packaged for another Debian-based distribution) creating a backported package. Backporting the package makes it easier to share your improvements with other people, and is generally easier to manage when it comes to upgrading. (Just be sure to share the source to your packages, if you upload to a repository.) Step 1: Get the source of the upstream packageYou have two alternative methods. Alternative 1: Find and download the source manuallySearch the Ubuntu packages or Debian packages pages, until you find the relevant package page for the version you want. At the foot of the page, there is a line mentioning the source packages. Download the three links to the right, which should look something like: [dsc] [<package>_<version>.orig.tar.gz] [<package>_<version>.diff.gz] Put these into a working directory, and run: dpkg-source -x <package>_<version>.dsc Alternative 2: Use a deb-src line in sources.listThis is possibly controversial in this context, but done properly there should not be a risk of installing non-free software onto your system. Edit the file So, for example: deb-src http://archive.ubuntu.com/ubuntu/ edgy main universe deb-src http://archive.ubuntu.com/ubuntu/ edgy-backports main universe Choose a nearby mirror, it'll be faster. Update: sudo apt-get update Then, the following command will fetch the source and unpack it: apt-get source <package> You may wish to remove the Step 2: Check and install build dependenciesUnder alternative 1, change to the directory the source was unpacked in, and run: dpkg-checkbuilddeps You must then install the packages it lists, using If you are using alternative 2, then issue the following command: sudo apt-get build-dep <package> If it doesn't workSometimes, packages will depend on more recent library versions than are available in gNewSense. In this case, you have a few options:
Step 3: Edit the changelogBefore building, in the package source directory, run: dch -i This will let you edit the changelog. Add a note that the package is a backport, and note any changes you made to the source. The This is particularly important if you are uploading the package to a repository for others to use. Incrementing the version number is a good idea in any case, because it will stop the automatic updates system wanting to replace your new packages. At the same time, you want to choose an extension such that the next gNewSense version will still be automatically installed. Step 4: Build and install the packageChange to the package source directory, if you're not there already. Then run: fakeroot dpkg-buildpackage If all goes well, the package should be built in the parent directory. You can then: cd .. sudo dpkg -i <package>_<version>.deb Further reading |