Weblog entry #2 for debstar
#2
Building a .deb package from source.
Posted by debstar on Fri 11 Aug 2006 at 13:56
Dear all, here is my 2c tips.
Firstly, let me tell you the reasons for which I need to build a package from source :
The package in question is Squid because in 2.5.x versions, the authentication scheme used for parent proxy is only Basic HTTP. However NEGOTIATE, KERBEROS and NTLM handling exist only in 2.6.x+ versions.
The 2.5.x versions worked for me before because my parent proxy was an MS-Proxy then MS ISA 2000. Now, they changed it into MS ISA 2004 without the Basic HTTP authentication scheme (security policy) so the need to upgrade.
This example is to build the .deb packages for the last stable version of Squid, at this writing 2.6.1-3. You need to download the files advised by http://packages.debian.org. I choosed the testing version in lieu of unstable because the version in testing is now the stable version of Squid. The files are : squid_2.6.1-3.diff.gz, squid_2.6.1.orig.tar.gz and squid_2.6.1-3.dsc
Issue the command :
Here is the steps to build the .deb files needed :
All the binary packages are in parent directory, Actually :
The next step is to put these .deb files somewhere and update the apt database :
Insert this line in your /etc/apt/source.list. For one liners :
Et voilà, it may complains of a bash script not found : log_daemon_msg but at least you are now using a recent stable release without upgrading to Sid.
$Id: Signature $
Nirina Michel RATOANDROMANANA
Debian is my 80/20 way.
Firstly, let me tell you the reasons for which I need to build a package from source :
- I use Debian Sarge with a quite outdated package version,
- I need to install a recent version,
- using the apt tools is preferred,
- downloading a .deb file and install it doesn't work because of dependencies.
The package in question is Squid because in 2.5.x versions, the authentication scheme used for parent proxy is only Basic HTTP. However NEGOTIATE, KERBEROS and NTLM handling exist only in 2.6.x+ versions.
The 2.5.x versions worked for me before because my parent proxy was an MS-Proxy then MS ISA 2000. Now, they changed it into MS ISA 2004 without the Basic HTTP authentication scheme (security policy) so the need to upgrade.
This example is to build the .deb packages for the last stable version of Squid, at this writing 2.6.1-3. You need to download the files advised by http://packages.debian.org. I choosed the testing version in lieu of unstable because the version in testing is now the stable version of Squid. The files are : squid_2.6.1-3.diff.gz, squid_2.6.1.orig.tar.gz and squid_2.6.1-3.dsc
Issue the command :
$ cat squid_2.6.1-3.dscand you'll find the developpement libraries required to build the packages. For me I had to install these :
# apt-get install libpam0g-dev libldap2-dev dpatch po-debconf libdb4.3-dev fakeroot
Here is the steps to build the .deb files needed :
$ dpkg-source -x squid_2.6.1-3.dsc $ cd squid-2.6.1/ $ gunzip -c ../squid_2.6.1-3.diff.gz| patch $ fakeroot debian/rules binary
All the binary packages are in parent directory, Actually :
$ ls ../*deb squid_2.6.1-3_i386.deb squid-cgi_2.6.1-3_i386.deb squidclient_2.6.1-3_i386.deb squid-common_2.6.1-3_all.deb
The next step is to put these .deb files somewhere and update the apt database :
Insert this line in your /etc/apt/source.list. For one liners :
# echo "deb file:/home/debstar/mirror ./" >> /etc/apt/sources.list
$ mv *deb /home/debstar/mirror $ dpkg-scanpackages /home/debstar/mirror /dev/null | gzip -f9 > /home/debstar/mirror/Packages.gz # apt-get update # apt-get install squid-common squid
Et voilà, it may complains of a bash script not found : log_daemon_msg but at least you are now using a recent stable release without upgrading to Sid.
$Id: Signature $
Nirina Michel RATOANDROMANANA
Debian is my 80/20 way.
Comments on this Entry
Just to mention useful tools that I use for such cases:
- dget - Download Debian source and binary packages
- apt-get build-dep - causes apt-get to install/remove packages in an attempt to satisfy the build dependencies for a source package.
- pbuilder - personal package builder for Debian packages
Cheers,
Julien
[ Parent | Reply to this comment ]
Posted by Anonymous (192.115.xx.xx) on Tue 22 Aug 2006 at 10:36
Thanks for the tip.
I use checkinstall if I want to create debs for packages which uses plain compilation processes (./configure; make; make test; make install).
Ofer Shaked.
I use checkinstall if I want to create debs for packages which uses plain compilation processes (./configure; make; make test; make install).
Ofer Shaked.
[ Parent | Reply to this comment ]