jueves, 11 de diciembre de 2014

Add a Debian source repository to your ubuntu

Debian does all the work that Ubuntu bases its system on, so... if you want to add our latest Debian source package repository to ubuntu, so that you can compile and use it under Ubuntu, that should be as easy as to add to your /etc/apt/sources.list file:

deb-src http://ftp.debian.org/debian/ testing main deb-src http://ftp.debian.org/debian/ unstable main deb-src http://ftp.debian.org/debian/ ../project/experimental main

Well, just the line you want, if you want the future version of Debian (currently Jessie) use the testing one, if you want current develpment, use unstable, and sometimes you even get a experimental version if you want to test really bleeding edge versions.

The problem here is that after you add the lines you want to your sources.list file and you run your

apt-get update

You will end with a GPG error because the ubuntu's apt-key keyring doesn't know about Debian's keys, so... we'll have to run a few commands to get rid of this, but first we must locate the needed key for example here

wget https://ftp-master.debian.org/keys/archive-key-7.0.asc -O -|apt-key add - apt-get update

Now hopefully your Ubuntu will recognize your Debian sources and you'll be able to get your Debian favourite source into your good old Ubuntu by doing something like this as user (we'll use fakeroot):

apt-get install fakeroot apt-get apt-get build-dep your_favourite_package apt-get source your_favourite_package cd your_favourite_package_source_dir dpkg-buildpackage -rfakeroot

No hay comentarios: