Differences between revisions 1 and 10 (spanning 9 versions)
Revision 1 as of 2012-12-10 15:41:02
Size: 1256
Comment:
Revision 10 as of 2015-03-29 10:50:15
Size: 3218
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
You can easily build a package from an Ubuntu PPA, using the following procedure.
The Zfs on Linux PPA is used as an example: https://launchpad.net/~zfs-native/+archive/stable
Install the Debian SDK:
If a package is availaible in a Ubuntu PPA but not in Debian, you can easily create a Debian version of if.

Here we're going to build a Debian package of the Pogo music player.

<<TableOfContents()>>

===== Checking that the package is absent from debian =====
The package might not be availaible in your version from Debian, but maybe it is available in testing/unstable
You can check that with the command rmadison.
If you're interested by a package called {{{vagrant}}} and {{{rmadison vagrant}}} returns something like:
{{{
vagrant | 1.6.5+dfsg1-2 | sid | source, all
}}}
it means you should rather do a SimpleBackportCreation of the vagrant package.

===== Install the Debian SDK =====
Line 8: Line 21:
Add the PPA to your sources.list ===== Add the PPA source url to your sources.list =====
The pogo team maintains two PPA's, a stable PPA, which we are going to use
https://launchpad.net/~pogo-dev/+archive/ubuntu/daily
and a dev" PPA here
https://launchpad.net/~pogo-dev/+archive/ubuntu/daily

Step 1: On the page of the PPA, look for the heading that reads "Adding this PPA to your system" and click the "Technical details about this PPA" link.

Step 2: Use the Display sources.list entries drop-down box, and select here the latest version of Ubuntu

Step 3: You'll see that the text-box directly below reads something like this:
Line 10: Line 33:
#NB: the deb-src line and GPG key are to be found on the
echo "deb-src http://ppa.launchpad.net/zfs-native/stable/ubuntu precise main" >> /etc/apt_sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6B0FC61
apt-get update
deb http://ppa.launchpad.net/pogo-dev/stable/ubuntu utopic main
Line 16: Line 36:
Install build tools and required deps
apt-get build-dep linux-headers-amd64 zfs-linux spl-linux
We are interested in the line start with with **deb-src**. which is the source repository of the package.
Line 19: Line 38:
#build the zfs-linux packages
apt-get source -b zfs-dkms
Step 4: Now we can add this line in your list of repos
As root:
{{{
echo "deb-src http://ppa.launchpad.net/pogo-dev/stable/ubuntu utopic main" > /etc/apt/sources.list.d/pogo.list
}}}
Line 22: Line 44:
#build the spl-linux packages
apt-get source -b spl-linux
Step 5: To use this repository safely we also have to add the repository signing key, localted on the same page. Here it reads:
{{{
Signing key:
1024R/0D4D9B55 (What is this?)
}}}
The 0D4D9B55 part in the middle, is the key ID, that we will use to add this key to our list of trusted apted sources.
As root:
{{{
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0D4D9B55
}}}
Line 25: Line 55:
#install the resulting stuff
dpkg -i "zfsutils_0.6.0.86-0ubuntu1~precise1_amd64.deb zfs-dkms_0.6.0.86-0ubuntu1~precise1_amd64.deb libzpool1_0.6.0.86-0ubuntu1~precise1_amd64.deb libzfs1_0.6.0.86-0ubuntu1~precise1_amd64.deb libuutil1_0.6.0.86-0ubuntu1~precise1_amd64.deb libnvpair1_0.6.0.86-0ubuntu1~precise1_amd64.deb spl-dkms_0.6.0.86-0ubuntu1~precise1_all.deb"
===== Install the package source and build the package =====
All of this is possible with the magical command.
As normal user:
{{{
apt-get source --build pogo
}}}
Line 28: Line 62:
#Activate zfs on startup and reboot:
#In /etc/default/zfs
ZFS_MOUNT='yes'
ZFS_UNMOUNT='yes'
ZFS_UNMOUNT='yes'
Note: For this to work you need to uncomment the lines starting with *deb-src* in /etc/apt/sources.list, or you will get the error "E: You must put some 'source' URIs in your sources.list".

===== Install the resulting stuff =====
You habe a package in the directory called something like pogo_0.8.3-0~579~ubuntu14.10.1_all.deb
You can install it with
{{{
dpkg -i pogo_0.8.3-0~579~ubuntu14.10.1_all.deb
}}}

===== Going further =====
If you find that the program you used would be of interest to other debian users, check it if an "ITP:IntentToPackage" or a "RFP:RequestForPackage" bug report has been used.
If no one has done this before, create a new bug report.
For instance this the RFP for Pogo:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666008

If you feel brave, have a look at what's inside the {{{pogo-0.8.3/debian/}}} directory, read IntroDebianPackaging

If a package is availaible in a Ubuntu PPA but not in Debian, you can easily create a Debian version of if.

Here we're going to build a Debian package of the Pogo music player.

Checking that the package is absent from debian

The package might not be availaible in your version from Debian, but maybe it is available in testing/unstable You can check that with the command rmadison. If you're interested by a package called vagrant and rmadison vagrant returns something like:

vagrant | 1.6.5+dfsg1-2 | sid          | source, all

it means you should rather do a SimpleBackportCreation of the vagrant package.

Install the Debian SDK

apt-get install devscripts build-essential

Add the PPA source url to your sources.list

The pogo team maintains two PPA's, a stable PPA, which we are going to use https://launchpad.net/~pogo-dev/+archive/ubuntu/daily and a dev" PPA here https://launchpad.net/~pogo-dev/+archive/ubuntu/daily

Step 1: On the page of the PPA, look for the heading that reads "Adding this PPA to your system" and click the "Technical details about this PPA" link.

Step 2: Use the Display sources.list entries drop-down box, and select here the latest version of Ubuntu

Step 3: You'll see that the text-box directly below reads something like this:

deb http://ppa.launchpad.net/pogo-dev/stable/ubuntu utopic main 

We are interested in the line start with with **deb-src**. which is the source repository of the package.

Step 4: Now we can add this line in your list of repos As root:

echo "deb-src http://ppa.launchpad.net/pogo-dev/stable/ubuntu utopic main" > /etc/apt/sources.list.d/pogo.list 

Step 5: To use this repository safely we also have to add the repository signing key, localted on the same page. Here it reads:

Signing key:
1024R/0D4D9B55 (What is this?) 

The 0D4D9B55 part in the middle, is the key ID, that we will use to add this key to our list of trusted apted sources. As root:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0D4D9B55

Install the package source and build the package

All of this is possible with the magical command. As normal user:

apt-get source --build pogo

Note: For this to work you need to uncomment the lines starting with *deb-src* in /etc/apt/sources.list, or you will get the error "E: You must put some 'source' URIs in your sources.list".

Install the resulting stuff

You habe a package in the directory called something like pogo_0.8.3-0~579~ubuntu14.10.1_all.deb You can install it with

dpkg -i pogo_0.8.3-0~579~ubuntu14.10.1_all.deb

Going further

If you find that the program you used would be of interest to other debian users, check it if an "ITP:IntentToPackage" or a "RFP:RequestForPackage" bug report has been used. If no one has done this before, create a new bug report. For instance this the RFP for Pogo: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666008

If you feel brave, have a look at what's inside the pogo-0.8.3/debian/ directory, read IntroDebianPackaging