Building LinuxMCE 0810

From LinuxMCE
Revision as of 01:59, 4 February 2010 by Tkmedia (Talk | contribs) (Verify apt's list of repositories)

Jump to: navigation, search

Setting up a chroot environment

These steps are optional as you can just build on a clean Kubuntu-8.10 install. But required if you want to build using an existing 0810 core without ruining it's run-time database.

Start with becoming root as the following steps will need to be done using super user privileges.

 sudo su -

Create the environment

apt-get install debootstrap
debootstrap --arch i386 intrepid /media/kubuntu-8.10/

Steps after each reboot

(Note: For First building, perform steps in the Getting Started section)

Mount required directories

mount --bind /dev /media/kubuntu-8.10/dev
mount none /media/kubuntu-8.10/proc -t proc
mount none /media/kubuntu-8.10/dev/pts -t devpts

Change-root into the environment

chroot /media/kubuntu-8.10

Start MySQL Server

Do not execute the mysql start before doing the sed statement listed in the Installing needed packages section below to reconfigure MySQL.

/etc/init.d/mysql start

Verify apt's list of repositories

Make sure /etc/apt/sources.list (inside the chroot) contains something very similar to:

deb intrepid  main restricted universe multiverse 
deb-src intrepid  main restricted universe
deb intrepid-updates  main restricted universe multiverse
deb-src intrepid-updates  main restricted universe
deb intrepid-security  main restricted universe
deb-src intrepid-security  main restricted universe
deb sid base

The following line is added to the sources.list during the prepare script and should not be added before. posde

deb stable  main
deb intrepid release testing

Add the Avenard GPG key

apt-get update
apt-get install wget
wget && sudo apt-key add ubuntu-repos.key && rm ubuntu-repos.key

Installing needed packages

Important! Perform these also after chrooting if you are building in a chrooted environment.

If you get messages like /usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory, that meens that $LANG is set. Either clear the LANG or install the needed language pack (english given example given in the code-snip below).

(Leave the root password for MySQL empty.)

apt-get update

#  Uncomment either of lines below if needed (see explanation above)
#unset LANG
#apt-get install language-pack-en-base

apt-get dist-upgrade
apt-get install aptitude openssh-client mysql-server

Reconfigure MySQL to not open a TCP-IP network port: (only needed if you are building in a chrooted environment)

sed 's/^[^#]*bind-address[[:space:]]*=.*$/#&\nskip-networking/' -i /etc/mysql/my.cnf

Building from source

For a more in detail description of all the steps involved see Building LinuxMCE 0804

Currently the focus is on getting the following to work completely.

Getting started

You should only have to do this part once initially.

The following steps will require superuser privileges, and it is always wise to refresh the packages list beforehand.

sudo su -
apt-get update

Obtaining the build scripts

apt-get install subversion
svn co

Installing the build scripts

cd Ubuntu_Helpers_NoHardcode
cd /usr/local/lmce-build

Configuring the build scripts

cat >/etc/lmce-build/builder.custom.conf <<EOF

# Uncomment to avoid DVD build step[s]

# Uncomment to create fake win32 binaries

# Point to the development sqlCVS server for 0810

Preparing for build

cd /usr/local/lmce-build

The preparation steps one at a time (recommended):


Or, you could do them all in one go with:


Building from source

cd /usr/local/lmce-build

All the build steps can be executed seperately (recommended at least the first time):


Or the following script will run them all:


Using the build's output

The script puts all created deb-files under /var/www. Setup a web server to point to that directory.

sudo apt-get install apache2

In the machine, where you want to test the build, follow the instructions on using the alpha build. After the step, go into /etc/apt/sources.list, and replace the line with

deb <ip-address-of-your-builder> ./

and re-run apt-get update You will find, that two packages are missing. Get those two packages from the regular repository and put them into the builders /var/www directory

pushd /var/www
dpkg-scanpackages . >Packages
gzip -c Packages > Packages.gz

Now, on your new or test core, execute another apt-get update, and you are good to go for the


If you want to speed up building on a multi-core machine, amend build-scripts/ and change the call to MakeRelease to include -j <number of cores>. Before executing the build, copy from an older build to your lib dir, and run ldconfig.

Without -j 2

23:36:44  Compiling and building packages
01:42:50  *** STEP: Download closed source debs
Total: roughly 2h 6minutes for compiling

With -j 2

13:13:44  Compiling and building packages
14:51:56  *** STEP: Download closed source debs
Total: roughly 1h 38minutes for compiling

Error during prepare step

If you get an error during the prepare stage

E: Couldn't find package libvdpau-dev

make sure to have avenard repo in your builders sources.list

deb intrepid release testing

Virgin Kubuntu 8.10 builder (no chroot) notes

-As pointed out above, do not run the command below, it is not needed when you aren't chrooted.

 sed 's/^[^#]*bind-address[[:space:]]*=.*$/#&\nskip-networking/' -i /etc/mysql/my.cnf

- After you reboot, you will notice that KDE mysteriously vanished, and you will go to a gnome desktop. I'm not sure why this is, but it does not seem to affect the builder any.

- If you want to run this builder headless (or just want to ability to ssh in to it), then you must configure it for ssh access by installing an ssh server

sudo apt-get install openssh-server