Converting an i386 deb package for ShellInABox to PowerPC architecture

In this post, I describe how to convert a Debian i386 .deb package for Shell In A Box into a PowerPC .deb. The instructions also apply to other programs and architectures, where the source code and prebuilt i386 .deb are available, but a prebuilt native .deb is not.

It is sometimes very handy to have a web-based SSH terminal installed on a server, for the times when you need remote shell access from a workstation that doesn't have an SSH client available. Previously I've used Ajaxterm for this purpose, but I've become increasingly dissatisfied with it. Today I decided to switch to Shell In A Box on one of my Debian servers, as I've found it more reliable than Ajaxterm.

The complication was that Shell In A Box is not yet available in the Debian stable repositories, and this server is PowerPC based. The Shell In A Box developers offer prebuilt packages, but only for i386 and x86_64. I decided to figure out how to rebuild an i386 package into a PowerPC package, so I could benefit from the packaging structure, rather than just installing directly from source. A post on the Ubuntu forums set me on the right track. Here are the steps I took:

  1. Download the current i386 deb from the Shell In A Box downloads page.
  2. Extract the deb file using Ubuntu's Archive Manager.
  3. Rename the resulting folder to the target deb filename (in my case this was shellinabox_2.14-1_ppc).
  4. Download and extract the latest* source tar.gz of Shell In A Box onto your PowerPC server.
  5. Change into the resulting directory and run ./configure followed by make.
  6. In the OLD package tree that you extracted earlier:
    1. Copy the newly compiled shellinaboxd binary into usr/bin.
    2. Edit usr/share/doc/shellinabox/changelog.Debian.gz to reflect the version bump.
    3. Edit DEBIAN/control with the new version number and architecture (for PowerPC this is "powerpc", not "ppc", and DEBIAN/md5sums with md5sums from the new binary and Debian changelog.
  7. Open a terminal and change into the directory above the OLD extracted deb directory, e.g. if you extracted the deb to /home/pete/shellinabox_2.14-1_ppc, then change to /home/pete.
  8. Run dpkg --build shellinabox_2.14-1_ppc.
  9. Install the resulting shellinabox_2.14-1_ppc.deb package on your server by running dpkg -i shellinabox_2.14-1_ppc.deb.

* NOTE: At time of writing, the prebuilt deb files of Shell In A Box are version 2.10, while the latest tarball is version 2.14. Version 2.10 will not build on PowerPC (see this bug report for more details), so I used the latest tarball version instead, without any problems.

Add new comment

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.