Author Topic: HowTo: Pure Debian (sid) install "Works" on ARM architectures too!  (Read 5933 times)

l3iggs

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +1/-0
    • View Profile
I've recently had some decent success with getting zentyal up and running on my arm based machine. Below you'll find my notes describing what I've done. I've tested this on ARM hardware (globalscale d2plug) and in an amd64 virtual machine with equal success, but this should be applicable to anything that can run debian sid (which is basically everything).

This is a work in progress and I would love some help here. I'll update this post with any progress I make or help I get from others.

Disclaimer
Following this guide will replace sysvinit with upstart. Doing this may very well cause numerous undocumented problems during the boot process and leave your system unbootable. You've been warned.

Things that work
- zentyal, zentyal-common, zentyal-software, and zentyal-core install
- The associated zentyal core processes and servers seem to be spawning properly at boot and running properly. This includes apache2, nginx, redis and mysql
- The web interface renders fine and navigating around and logging in seem to work well

Major issues
- Changes I make in the web interface don't seem to be saving properly. This is probably some database related issue.

Minor(?) issues
- /usr/share/perl5/EBox/Config/Redis.pm.pm is throwing a bunch of errors related to undefined symbols being used
- Zentyal packages not listed above in the working section are untested and will probably not work without some tweaking

Installation notes
These notes assume you have debian sid up and running on your hardware.
To start, your /etc/apt/sources.list should include  (or similar)
deb http://http.debian.net/debian sid main
deb-src http://http.debian.net/debian sid main

Code: [Select]
sudo apt-get update
sudo apt-get dist-upgrade

Let's install some packages that we'll need that debian sid doesn't have (but debian experimental does)
You'll see some errors with the dpkg command below, that's okay, they'll be taken care of 3 commands later.
Code: [Select]
mkdir debs
cd debs
wget http://ftp.us.debian.org/debian/pool/main/a/apport/apport_2.12.6-1_all.deb
wget http://ftp.us.debian.org/debian/pool/main/a/apport/python3-apport_2.12.6-1_all.deb
wget http://ftp.us.debian.org/debian/pool/main/a/apport/python3-problem-report_2.12.6-1_all.deb
sudo dpkg -i *
cd ..
rm -rf debs
sudo apt-get install -f

Install dependencies
Note: The mysql install will ask for root passwords several times. I left them blank.
Code: [Select]
sudo apt-get build-dep libtrycatch-perl
sudo apt-get install fakeroot
sudo apt-get install --no-install-recommends mysql-server
sudo reboot

Now we'll do the only compilation we'll need. The dpkg-checkbuilddeps line below should return empty. If it doesn't, use apt-get to install any packages it lists and repeat until it returns nothing.
Code: [Select]
mkdir ltc
cd ltc
wget https://launchpad.net/~zentyal/+archive/experimental/+files/libtrycatch-perl_1.003001%2Bzentyal4.tar.gz
tar -xvf libtrycatch*
cd libtrycatch-perl*
dpkg-checkbuilddeps
DEB_BUILD_OPTIONS=nocheck debuild -us -uc
cd ..
sudo dpkg -i libtrycatch-lite-perl*
cd ..
rm -rf ltc

Switch to upstart.
This is the most dangerous step. If your system boots properly after this, breath a sigh of relief. If it doesn't, I'm sorry, I've only tested this on fresh, minimal command line only installs. It's not guaranteed to work for a fully fledged graphical desktop install with a bunch of complicated stuff that needs to be brought up at boot time (but it might! upstart for debian is getting better quickly). I had to add the 'rw' and 'rootfstype=' directives to my kernel options line for the boot to complete properly on my arm box, go figure.
Code: [Select]
sudo apt-get install upstart
sudo reboot
Congrats if you've made it this far, the rest should be easy.

Now for the official zentyal repo, version 3.3.
Note: The first command contains "amd64" that's intentional
Code: [Select]
su -c 'echo "deb [arch=amd64] http://archive.zentyal.org/zentyal 3.3 main extra" > /etc/apt/sources.list.d/zentyal-archive.list'
wget -q http://keys.zentyal.org/zentyal-3.3-archive.asc -O- | sudo apt-key add -
sudo apt-get clean
sudo apt-get update
sudo apt-get -d --no-install-recommends install zentyal
sudo dpkg --unpack /var/cache/apt/archives/*.deb

At this point all of the required zentyal packages have been downloaded and unpacked into the proper install locations on your system, but none of the install scripts have been run yet. If we ran them now, they'd fail miserably, so we have to make some changes to some of the files installed by zentyal before we can run the install scripts with any degree of success.

Replace /usr/share/zentyal/stubs/core/redis.conf.mas with the file attached here

Replace /usr/share/zentyal/stubs/core/apache.mas with the file attached here

Now run all the install scripts that you've held back.
Note: If you're running a virtual machine, before running this command is a great time to take a snapshot. You're about to do the initial setup for all the zentyal packages and start all their associated services.
Code: [Select]
sudo dpkg --configure -aYou'll get some warnings here, but everything should complete. I'd love to have some help solving these warnings.

That's it! You should now be able to access your the zentyal web interface. Not much really works there yet, but hey, it's a start!
« Last Edit: December 30, 2013, 04:55:16 am by l3iggs »

vlotho

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: HowTo: Pure Debian (sid) install "Works" on ARM architectures too!
« Reply #1 on: November 30, 2014, 09:59:10 am »
i have this error when i try to compile libtrycatch-lite-perl :

Code: [Select]
Adding cdbs dependencies to debian/libtrycatch-perl.substvars
dh_installdirs -plibtrycatch-perl
mkdir -p /root/ltc/libtrycatch-perl-1.003000/debian/libtrycatch-perl/usr/lib/perl5/
mv /root/ltc/libtrycatch-perl-1.003000/debian/libtrycatch-lite-perl/usr/lib/perl5/TryCatch.pm /root/ltc/libtrycatch-perl-1.003000/debian/libtrycatch-perl/usr/lib/perl5/
mv: cannot stat ‘/root/ltc/libtrycatch-perl-1.003000/debian/libtrycatch-lite-perl/usr/lib/perl5/TryCatch.pm’: No such file or directory
debian/rules:31: recipe for target 'install/libtrycatch-perl' failed
make: *** [install/libtrycatch-perl] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1373:
dpkg-buildpackage -rfakeroot -D -us -uc failed

i have tryed with the zentyal2 version, which it more recent but i'have same error.
« Last Edit: November 30, 2014, 11:21:11 am by vlotho »

vlotho

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: HowTo: Pure Debian (sid) install "Works" on ARM architectures too!
« Reply #2 on: November 30, 2014, 12:05:23 pm »
problem solved by changing the path of the source in debian / rules (mv $ (CURDIR) /debian/libtrycatch-lite-perl/usr/lib/arm-linux-gnueabihf/perl5/5.20/TryCatch.pm $ (CURDIR) / debian / libtrycatch-perl / usr / lib / perl5 /), for cons, during installation of Zentyal, a dependency is not satisfied and makes reference to the "perlapi-5.14.2" file which is a virtual package of "perl-base" package, which is installed it but can not be recognized by the system.

Code: [Select]
root@cubie:~/ltc/libtrycatch-perl-1.003002+zentyal2# apt-get install perlapi-5.14.2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package perlapi-5.14.2 is a virtual package provided by:
  perl-base 5.14.2-21+deb7u2 [Not candidate version]

E: Package 'perlapi-5.14.2' has no installation candidate

even forcing the installation of "libclone-fast-perl" with dpkg -i --force-all * .deb, Zentyal installation always asks perlapi-5.14.2 package
« Last Edit: November 30, 2014, 01:35:34 pm by vlotho »