quick tip: build debian package from sqldeveloper rpm

Oracle has made the installation of sqldeveloper easy on distributions that use rpm by providing a nice package. But we are using ubuntu for our development workstations at the office and thus need a debian .deb package. I do not want to use the ‘alien’ workaround and we already build or rebuild some of our packages for our own repository anyway. This can easily be built with the help of fpm like this after downloading the Linux rpm from OTN:

fpm --no-auto-depends -d 'oracle-jdk-7' -s rpm -t deb -m "portrix Systems GmbH " /var/tmp/sqldeveloper-

Upload this to your local repository and you can then install this with apt-get or simply show the details like this.

portrix@vm-04:~$ sudo apt-cache show sqldeveloper
Package: sqldeveloper
Architecture: all
Maintainer: portrix Systems GmbH 
Installed-Size: 305622
Depends: oracle-jdk-7
Provides: sqldeveloper
Filename: pool/main/sqldeveloper_4.
Size: 246647402
MD5sum: 1a7127bde4521e0a5bc7160ee3f891a0
SHA1: 55f12afe5075bcbd9223f61fe8f183fd0570c295
SHA256: aeb07cede84298c7c8a9bf8caf0c42ccf560840a857415be81bb4189c8939ba2
Section: extra
Priority: Priority
Homepage: http://example.com/no-uri-given
Description: Oracle SQL Developer is a new, free graphical tool that enhances productivity
             and simplifies database development tasks. With SQL Developer, you can browse database objects, 
             run SQL statements and SQL scripts, and edit and debug PL/SQL statements. 
             You can also run any number of provided reports, as well as create and save your own.
License: Oracle

Update October 2015:
I tried the same procedure for sqldeveloper 4.1.1 but this failed on installation with an error complaining about the Provides meta-information:

root@PS-112:~# dpkg -i /tmp/sqldeveloper_4.
dpkg: error processing archive /tmp/sqldeveloper_4. (--install):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 9 package 'sqldeveloper':
 `Provides' field, invalid package name `/home/twall/jna/build/native-linux-x86-64/libjnidispatch.so': must start with an alphanumeric character
Errors were encountered while processing:

So I went through some extra steps to modify the package (unpack, edit, repack) and remove the two references starting with /home/twall like this:

root@PS-112:~# dpkg-deb -R /tmp/sqldeveloper_4. /tmp/rebuild-sqldev
root@PS-112:~# vim /tmp/rebuild-sqldev/DEBIAN/control 
# edit the Provides: line to show only "Provides: sqldeveloper"
root@PS-112:~# dpkg-deb -b /tmp/rebuild-sqldev /tmp/sqldeveloper_4.

One thought on “quick tip: build debian package from sqldeveloper rpm

  1. Regarding the October Update:

    You can skip the repackage step, fpm has a nice –edit mode that opens an editor and let’s you fix the package spec if required. Like so:

    $ fpm -s rpm -t deb –no-auto-depends –depends “oracle-jdk-8” –maintainer “company build team” –url “company internal doc url” –edit /path/to/sqldeveloper-

Leave a Reply

Your email address will not be published. Required fields are marked *