Difference between revisions of "UbuntuPorting"

From Amahi Wiki
Jump to: navigation, search
 
(16 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''This page is being edited actively and a lot of sections are missing currently'''
+
'''This page is no longer accurate.  Please use guidance located [http://docs.amahi.org here]'''
  
 
=Current state=
 
=Current state=
We just started porting Amahi to Ubuntu. The support is highly experimental. There are a few important things to be fixed before you can run it with minimal tweaking. Please don't try it on a production server yet. We are using Ubuntu 9.04 (jaunty) Desktop 32 bit for development. We strongly recommend you to use the same for experiments. You can download this version from [http://www.ubuntu.com/getubuntu/download here].
+
We just started porting Amahi to Ubuntu. The support is highly experimental. There are a few important things to be fixed before you can run it with minimal tweaking. Please don't try it on a production server yet. We are using Ubuntu 12.04 LTS (Precise Pangolin) Desktop 32 bit for development. We strongly recommend you to use the same for experiments. You can download this version from [http://www.ubuntu.com/getubuntu/download here].
  
 
=Requirements=
 
=Requirements=
 
You may want to have two different installations of Ubuntu.
 
You may want to have two different installations of Ubuntu.
* A development platform, running Ubuntu 9.04 Desktop 32 bit with the recommended development packages installed.
+
* A development platform, running Ubuntu 12.04 LTS Desktop 32 bit and/or 64 bit with the recommended development packages installed.
* An Amahi sandbox, running Ubuntu 9.04 Desktop 32 bit '''preferably''' under [http://www.virtualbox.org/ VirtualBox].
+
* An Amahi sandbox, running Ubuntu 12.04 LTS Desktop 32 bit '''preferably''' under [http://www.virtualbox.org/ VirtualBox].
 
Please don't install the Amahi packages on the development platform as this might break your networking.
 
Please don't install the Amahi packages on the development platform as this might break your networking.
  
 
=Setting up the development platform=
 
=Setting up the development platform=
# Install Ubuntu 9.04 Desktop 32 bit.
+
# Install Ubuntu 12.04 LTS Desktop 32 bit.
 
# Install essential build toolchain.
 
# Install essential build toolchain.
## sudo aptitude install build-essential
+
## sudo apt-get update
## sudo apt-get install devscripts
+
## sudo apt-get install build-essential devscripts debhelper fakeroot lintian reprepro git-core
## sudo apt-get install debhelper
 
# Install git. # sudo aptitude install git-core
 
 
# Read [https://wiki.ubuntu.com/PackagingGuide/Complete Ubuntu packaging guide] to get an idea of other additional packages that you may want to install to create Ubuntu packages. I will list the packages to make your part easier at a later point.
 
# Read [https://wiki.ubuntu.com/PackagingGuide/Complete Ubuntu packaging guide] to get an idea of other additional packages that you may want to install to create Ubuntu packages. I will list the packages to make your part easier at a later point.
  
 
=Setting up the Amahi sandbox=
 
=Setting up the Amahi sandbox=
 
# Install [http://www.virtualbox.org/ Sun VirtualBox]. # sudo aptitude install virtualbox-ose
 
# Install [http://www.virtualbox.org/ Sun VirtualBox]. # sudo aptitude install virtualbox-ose
# Open VirtualBox and create a new guest platform for Ubuntu and install Ubuntu 9.04 Desktop 32 bit.
+
# Open VirtualBox and create a new guest platform for Ubuntu and install Ubuntu 12.04 LTS Desktop 32 bit.
# Install VirtualBox guest additions in your Amahi sandbox.
+
# Install VirtualBox guest additions in your Amahi sandbox. # sudo apt-get install virtualbox-ose-guest-utils  (do this inside your virtual machine!)
 
# Setup VirtualBox folder sharing between your development platform and Amahi sandbox.
 
# Setup VirtualBox folder sharing between your development platform and Amahi sandbox.
 +
 +
Of course you can also download virtualbox from the virtualbox website and install the guest additions from the virtual CD with these additions (select install guest additions from the menu to mount the CD).
  
 
=Amahi source code=
 
=Amahi source code=
On your development platform, download Amahi source code from our git repository. Follow these steps to build Ubuntu packages.
+
On your development platform, download Amahi source code from our git repository. # git clone git://git.amahi.org/amahi.git
 +
*Follow these steps to build Ubuntu packages.
  
# Set AMAHI_DEB_MAINTAINER environment variable. # export AMAHI_DEB_MAINTAINER="Full Name <you@domain.com>" You need to have a GnuPG key created for the e-mail address that you use in this field. It will be used to sign the package. You will be prompted for the passphrase when the package is built in the later stages.
+
# After downloading the source, navigate to the platform directory (/trunk/platform).
# To build hdactl package, change to 'platform/hdactl' directory and run 'make deb'. # cd platform/hdactl # make deb You will find the .deb file generated under platform/hdactl/release directory.
+
# Navigate to the package you wish to build (hdactl or platform).
# To build hda-platform package, change to 'platform/platform' directory and run 'make deb'. # cd platform/platform # make deb You will find the .deb file generated under platform/platform/release directory.
+
# (if appropriate) run "dch -i" to edit the changelog if you have made changes
 +
# run "make deb" to compile the packages
 +
# run "debuild" to create binary packages or "debuild -S" to create source packages.
  
 
=Architecture differences=
 
=Architecture differences=
 
+
*No /etc/sysconfig folder. Instead, configuration is scattered all over the place.
* Apache runs as 'www-data' instead of 'apache'.
+
*Requires copying the functions library required by several shellscripts (but works fine)
** Fix - Edit /var/hda/platform/html/script/install-app the following:
 
  uid = Etc.getpwnam("apache").uid
 
  
 
=Post install gotchas (asp's notes)=
 
=Post install gotchas (asp's notes)=
After building the deb packages above and installing using the Ubuntu pkg installer, was able to then startup hdactl (using '/etc/init.d/hdactl start') and then http;//hda worked.
 
 
# Had to install the pluginfactory gem by running 'gem install -no-rdoc -no-ri pluginfactory'
 
# Noticed that Apache runs as 'www-data' on Ubuntu instead of 'apache' user like on Fedora. Amahi-app-installer.log indicated 'apache' user was not found after attempting to install an app on Application tab of platform.
 
  
 +
= Known Bugs =
 +
Check out our project at [http://bugs.amahi.org/projects/show/ubuntu our bugtracker]
 
=Considerations=
 
=Considerations=
Instead of using FastCGI, perhaps package Amahi with capability to use Ubuntu's native phusion passenger (aka mod_rails) package.
+
*<s>Apache mod_passenger</s> This has been implemented in the installer since it is now in the default repositories.
 
 
Add the following line to the Third Party Software Sources:
 
 
 
  deb http://apt.brightbox.net hardy main
 
 
 
(The simplest way to do that is to create a file in /etc/apt/sources.list.d/ containing the deb instruction, and then run 'apt-get update').
 
 
 
Once you've done this then you can install Phusion Passenger by running:
 
 
 
  apt-get install libapache2-mod-passenger
 
  
  
 
'''This page is being edited actively and a lot of sections are missing currently'''
 
'''This page is being edited actively and a lot of sections are missing currently'''

Latest revision as of 03:26, 21 July 2012

This page is no longer accurate. Please use guidance located here

Current state

We just started porting Amahi to Ubuntu. The support is highly experimental. There are a few important things to be fixed before you can run it with minimal tweaking. Please don't try it on a production server yet. We are using Ubuntu 12.04 LTS (Precise Pangolin) Desktop 32 bit for development. We strongly recommend you to use the same for experiments. You can download this version from here.

Requirements

You may want to have two different installations of Ubuntu.

  • A development platform, running Ubuntu 12.04 LTS Desktop 32 bit and/or 64 bit with the recommended development packages installed.
  • An Amahi sandbox, running Ubuntu 12.04 LTS Desktop 32 bit preferably under VirtualBox.

Please don't install the Amahi packages on the development platform as this might break your networking.

Setting up the development platform

  1. Install Ubuntu 12.04 LTS Desktop 32 bit.
  2. Install essential build toolchain.
    1. sudo apt-get update
    2. sudo apt-get install build-essential devscripts debhelper fakeroot lintian reprepro git-core
  3. Read Ubuntu packaging guide to get an idea of other additional packages that you may want to install to create Ubuntu packages. I will list the packages to make your part easier at a later point.

Setting up the Amahi sandbox

  1. Install Sun VirtualBox. # sudo aptitude install virtualbox-ose
  2. Open VirtualBox and create a new guest platform for Ubuntu and install Ubuntu 12.04 LTS Desktop 32 bit.
  3. Install VirtualBox guest additions in your Amahi sandbox. # sudo apt-get install virtualbox-ose-guest-utils (do this inside your virtual machine!)
  4. Setup VirtualBox folder sharing between your development platform and Amahi sandbox.

Of course you can also download virtualbox from the virtualbox website and install the guest additions from the virtual CD with these additions (select install guest additions from the menu to mount the CD).

Amahi source code

On your development platform, download Amahi source code from our git repository. # git clone git://git.amahi.org/amahi.git

  • Follow these steps to build Ubuntu packages.
  1. After downloading the source, navigate to the platform directory (/trunk/platform).
  2. Navigate to the package you wish to build (hdactl or platform).
  3. (if appropriate) run "dch -i" to edit the changelog if you have made changes
  4. run "make deb" to compile the packages
  5. run "debuild" to create binary packages or "debuild -S" to create source packages.

Architecture differences

  • No /etc/sysconfig folder. Instead, configuration is scattered all over the place.
  • Requires copying the functions library required by several shellscripts (but works fine)

Post install gotchas (asp's notes)

Known Bugs

Check out our project at our bugtracker

Considerations

  • Apache mod_passenger This has been implemented in the installer since it is now in the default repositories.


This page is being edited actively and a lot of sections are missing currently