Blackdranzer / awarenet

Automatically exported from code.google.com/p/awarenet
1 stars 0 forks source link

create debian package for awarenet #384

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Strix wants to create a debian package in order to make installation of 
awarenet seammless on debian based linux installations (ubuntu, etc.). Also, 
awarenet might be noticed by more people if it is easily available in the 
respective application store of the various linux distributions.

Original issue reported on code.google.com by appiapp...@gmail.com on 7 Apr 2014 at 9:27

GoogleCodeExporter commented 9 years ago

Original comment by a...@villagescribe.org on 7 Apr 2014 at 9:32

GoogleCodeExporter commented 9 years ago
Some very quick background on that this entails: a debian package is a tar.gz 
file containing software, optional shell scripts to install and uninstall it, 
and a list of other packages which it depends on.

http://en.wikipedia.org/wiki/Deb_%28file_format%29

Once a package exists in this .deb format (Debian, Ubuntu, Mint) it can be 
exported to other formats such as RPM (Red Hat, Fedora, CentOS).

.deb packages can also be installed on Windows with Cygwin - though not an 
optimal way of doing things - or on Mac via RPM and Macports.

How I would go about this is to add a 'makedeb' action on the packages module 
which would tar up the current installation and registry, and copy some shell 
scripts into the tarball to perform installation tasks:

 (*) add registry settings for a new server UID and encryption keys
 (*) import MySQL or SQLite schemas dumped from the instance the .deb was made on
 (*) add a crontab entry
 (*) change some PHP and Apache VHOST settings

Under the Ubuntu family of distributions the awarenet package would depend on:

apache2 - Apache HTTP Server metapackage
php5 - server-side, HTML-embedded scripting language (metapackage)
php5-gd - GD module for php5
php5-mysql - MySQL module for php5
php5-curl - CURL module for php5
php5-cli - command-line interpreter for the php5 scripting language
php5-sqlite - SQLite module for php5
php5-memcached - memcached extension module for PHP5, uses libmemcached
mysql-server - MySQL database server (metapackage depending on the latest 
version)
openssl - Secure Socket Layer (SSL) binary and related cryptographic tools
memcached - A high-performance memory object caching system
imagemagick - image manipulation programs
ffmpeg - Multimedia player, server, encoder and transcoder (transitional 
package)
youtube-dl - downloader of videos from YouTube and other sites

Original comment by awarenet...@gmail.com on 7 Apr 2014 at 11:10

GoogleCodeExporter commented 9 years ago
I have started with this task. I installed Virtual Box as the VM environment 
but have noted that it is not compatible with my machine/setup because I cannot 
get another 64 bit Ubuntu to work as a guest OS (no 64 bit OS is supported 
there on my laptop). There is a lot of information on Google about this and I 
followed some of the advice available but fact stays that it does not work.

I am busy installing VMware Player (internet is very slow so download takes 
hours) and hope that 64 bit guest OSs work within that VM environment.

Original comment by appiapp...@gmail.com on 28 May 2014 at 12:41

GoogleCodeExporter commented 9 years ago
Ok, I found out that the ekhayaict laptop's CPU that I am using does not 
support VT-x technology. It is therefore technically not possible to make a 64 
bit OS a guest of the Virtual Machine. I will therefore first develop the 
debian package for Ubuntu 13.10 32 bit and then test 64 bit much later (using 
boot from flash stick or boot from external hard drive maybe).

Original comment by appiapp...@gmail.com on 28 May 2014 at 2:47

GoogleCodeExporter commented 9 years ago
Oh dear. OK. I hope that option will work for you...

Original comment by a...@villagescribe.org on 30 May 2014 at 7:27

GoogleCodeExporter commented 9 years ago
Ok, let me start with the remark that obviously the ekhaya laptop slows down 
comprehensively if I start up a Virtual Machine in order to test installation 
and de-installation of a debian package. This means testing the installation of 
a debian package is a very slow and kind of frustrating experience but I get 
through it all right. I mention this so that you take note and know that 
progress is slow because of this.

Good news are that I made a very simple debian package for the 32 bit Ubuntu, 
installed it on the virtual machine 32 bit Ubuntu, tested and yes, it did what 
I wanted. I also uninstalled it and every trace of the installation was gone. 
So I end this working day as a happy man.

Next I will make a more complex debian package (one with dependencies to other 
packages) before packaging the most basic awarenet possible.

Original comment by appiapp...@gmail.com on 31 May 2014 at 7:00

GoogleCodeExporter commented 9 years ago
Ok, I understand. Well, I am happy that you manage to work despite the trouble 
and even got a good result. :-)

Original comment by a...@villagescribe.org on 2 Jun 2014 at 1:21

GoogleCodeExporter commented 9 years ago
I made good progress today and am well on my way to create a debian package 
with the least code necessary to run awarenet. 

I am currently stuck on a configuration issue on apache2, which would allow php 
code to run even though the coding file only starts with an "<?" instead of 
"<?php".

Original comment by appiapp...@gmail.com on 20 Jun 2014 at 1:43

GoogleCodeExporter commented 9 years ago
> I am currently stuck on a configuration issue on apache2, which would allow 
php code to run even though the coding file only starts with an "<?" instead of 
"<?php".

Hi Michael, two things:

The short open tag is deprecated, have been moving to the long open tag for 
this very reason.

However, we will need to make some changes to php.ini in any case (to increase 
the default limits on memory, running time and file upload size).

For these we'll need a shell or PHP script which runs over 
/etc/php5/apache2/php.ini (or correct location on Ubuntu, I forget) and changes 
these keys.  IIRC the one you want here is:

; short_open_tag
; recommended for several years that you not use the short tag "short cut" and
; this short cut has been a feature for such a long time, it's currently still
; http://www.php.net/manual/en/ini.core.php#ini.short-open-tag
short_open_tag = On

Original comment by awarenet...@gmail.com on 20 Jun 2014 at 2:10

GoogleCodeExporter commented 9 years ago

Original comment by appiapp...@gmail.com on 18 Jul 2014 at 1:45

GoogleCodeExporter commented 9 years ago
all packages known to me are syncronised (package code equals google code).

I am busy now with setting up awarenet database (new installation) and then 
extracting it (backup). After that will introduce scripts into installation 
procedure that will take the backup data and insert it into an already empty 
created database of the new installation.

Original comment by appiapp...@gmail.com on 5 Aug 2014 at 1:29

GoogleCodeExporter commented 9 years ago
I managed, after a long fight, to create a debian package that a) ignores the 
setting of a root password for mysql by always resetting it to '' and b) 
installs awarenet with a pre-initialised database. The approach of suppresing 
debconf dialog did not work, I had no handle to do so during the installation 
phase of Depends: packages. And I would not have a way of preventing a password 
anyway should MYSQL have been installed before installation of this package.

Last things to do is a cleanup of everything including renaming from 'testappi' 
to 'awarenet'.

Original comment by appiapp...@gmail.com on 11 Aug 2014 at 10:12

GoogleCodeExporter commented 9 years ago
https://drive.google.com/file/d/0B19GTRujRAPCeTJtMTA4V3ZBaTg/edit?usp=sharing

Link to awarenet debian package.

Original comment by appiapp...@gmail.com on 26 Aug 2014 at 8:46