Flexion.Org
Bad grammar and typos for total strangers
Wiki › Rebuild GFTPFrom Source
Wiki Index All Recent Edit Bottom

Rebuild gFTP with SSL Support

1.   Introduction
1.1   Rebuilding the package from source

Introduction

Sadly Debian has license issues with OpenSSL, therefore a number of applications are build with SSL support disabled. gFTP is one such application and because the Ubuntu gFTP package is built from upstream, it is also lacking SSL support.

Rebuilding the package from source

_ apt-get source gftp _ apt-get build-dep gftp _ apt-get install libssl-dev

Edit the Debian package configuration file, where the compile options are specified. Remember, this is Debian/Ubuntu specific, but the way Debian has implemented package management works rather nicely once you get used to it. Remove the '--disable-ssl' option from the line with definition of the variable 'CFLAGS'

_ nano gftp-2.0.18/debian/rules

Sample

_ CFLAGS="-O2 -g -Wall -D_GNU_SOURCE" ./configure \ _ --host=$(DEB_HOST_GNU_TYPE) \ _ --build=$(DEB_BUILD_GNU_TYPE) \ _ --prefix=/usr \ _ --mandir=\$${prefix}/share/man \ _ --infodir=\$${prefix}/share/info \ _ --enable-textport=yes

In order to stop the update manager from thinking it needs to update this package from the apt sources, edit the changelog as well and add a couple of lines at the start of the changelog. I know, there are other ways to tell Ubuntu/Debian about an updated version, but this is how I did it:

# nano gftp-2.0.18/debian/changelog

_ gftp (2.0.18-16ubuntu3+flexion0) gutsy; urgency=low _ _ * debian/rules: Enable TLS/SSL _ _ -- Martin Wimpress <ubuntu@flexion.org> Mon, 17 Dec 2007 13:08:00 +0000

See the '+flexion0' I added after 'ubuntu3'. You just need to make sure you have a different name here, but not too much different, as I still would like to be notified if and when an official update becomes available. Read the debian new maintainers guide for more information about packaging .deb's. Also write something sensible in the changelog so you know what this package/change is about.

To compile the sources, build the package and install it, you have to use the package tools. Please read the man page of dpkg-buildpackage in order to get to know more about the options.

_ cd gftp-2.0.18/ _ dpkg-buildpackage -uc -b

The package is now completely recompiled with the enabled TLS/SSL option. It will create a new installable package in the parent directory. To install the newly built package, go to the parent directory an issue the package install command.

_ cd .. _ dpkg -i dpkg -i gftp-*.deb

You can check that SSL support is now enabled.

  • Start gFTP from Applications -> Internet -> gFTP
  • Check the SSL Engine tab is listed under FTP -> Options...

References

$Id: RebuildGFTPFromSource,v 1.1 2007/12/17 13:23:18 martin Exp www-data $

Wiki Index All Recent Edit Top
 
Valid XHTML Valid CSS Hacker