Difference between revisions of "Building LinuxMCE 0810"

From LinuxMCE
Jump to: navigation, search
(streamlined the instructions)
Line 1: Line 1:
 
[[category: tutorials]]
 
[[category: tutorials]]
 
[[category: programmer's Guide]]
 
[[category: programmer's Guide]]
===Create Build Environment===
+
{| align="right"
debootstrap --arch i386 intrepid /media/kubuntu-8.10/
+
  | __TOC__
 +
  |}
  
 +
==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===
 +
debootstrap --arch i386 intrepid /media/kubuntu-8.10/
  
 
===Mount required directories===
 
===Mount required directories===
Line 10: Line 19:
 
  mount none /media/kubuntu-8.10/dev/pts -t devpts
 
  mount none /media/kubuntu-8.10/dev/pts -t devpts
  
===Change Root to build environment===
+
===Change-root into the environment===
 
  chroot /media/kubuntu-8.10
 
  chroot /media/kubuntu-8.10
  
===Verify Apt Sources===
+
===Verify apt's list of repositories===
contains
+
Make sure ''/etc/apt/sources.list'' (inside the chroot) contains something very similar to:
  deb     http://us.archive.ubuntu.com/ubuntu/     intrepid main restricted universe multiverse  
+
  deb       <nowiki>http://</nowiki>''us.archive.ubuntu.com''/ubuntu/ intrepid main restricted universe multiverse  
  deb-src http://us.archive.ubuntu.com/ubuntu/     intrepid main restricted universe
+
  deb-src <nowiki>http://</nowiki>''us.archive.ubuntu.com''/ubuntu/ intrepid main restricted universe
  deb     http://us.archive.ubuntu.com/ubuntu/     intrepid-updates main restricted universe multiverse
+
  deb       <nowiki>http://</nowiki>''us.archive.ubuntu.com''/ubuntu/ intrepid-updates main restricted universe multiverse
  deb-src http://us.archive.ubuntu.com/ubuntu/     intrepid-updates main restricted universe
+
  deb-src <nowiki>http://</nowiki>''us.archive.ubuntu.com''/ubuntu/ intrepid-updates main restricted universe
  deb http://security.ubuntu.com/ubuntu intrepid-security main restricted universe
+
  deb       <nowiki>http://</nowiki>security.ubuntu.com/ubuntu</nowiki> intrepid-security main restricted universe
  deb-src http://security.ubuntu.com/ubuntu intrepid-security main restricted universe
+
  deb-src <nowiki>http://</nowiki>security.ubuntu.com/ubuntu</nowiki> intrepid-security main restricted universe
  deb http://debian.slimdevices.com/ stable main
+
  deb       <nowiki>http://</nowiki>debian.slimdevices.com/</nowiki> stable main
  
===Install Aptitude===
+
===Installing needed packages===
 +
'''Important!''' Perform these also '''after''' chrooting. 
 +
apt-get update
 +
apt-get dist-upgrade
 
  apt-get install aptitude
 
  apt-get install aptitude
 
 
 
 
===Prep MySQl===
 
 
  apt-get install mysql-server
 
  apt-get install mysql-server
 +
Reconfigure MySQL to not open a TCP-IP network port:
 
  <nowiki>sed 's/^[^#]*bind-address[[:space:]]*=.*$/#&\nskip-networking/' -i /etc/mysql/my.cnf</nowiki>
 
  <nowiki>sed 's/^[^#]*bind-address[[:space:]]*=.*$/#&\nskip-networking/' -i /etc/mysql/my.cnf</nowiki>
  
 
+
==Building from source==
 
+
 
For a more in detail description of all the steps involved see [[Building LinuxMCE 0804]]
 
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.
 
Currently the focus is on getting the following to work completely.
  
===Obtaining, installing and configuring the build scripts===
+
===Getting started===
 +
You should only have to do this part once initially.
  
Obtaining.
+
The following steps will require superuser privileges, And it is always wise to refresh the packages list beforehand.
 
  sudo su -
 
  sudo su -
 +
apt-get update
 +
 +
====Obtaining the build scripts====
 
  apt-get install subversion
 
  apt-get install subversion
 
  svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-0810/src/Ubuntu_Helpers_NoHardcode
 
  svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-0810/src/Ubuntu_Helpers_NoHardcode
  
Installing.
+
====Installing the build scripts====
 
  cd Ubuntu_Helpers_NoHardcode
 
  cd Ubuntu_Helpers_NoHardcode
 
  ./install.sh
 
  ./install.sh
 
  cd /usr/local/lmce-build
 
  cd /usr/local/lmce-build
  
Configuring.
+
====Configuring the build scripts====
 
  cat >/etc/lmce-build/builder.custom.conf <<EOF
 
  cat >/etc/lmce-build/builder.custom.conf <<EOF
 
   
 
   
Line 70: Line 81:
 
  cd /usr/local/lmce-build
 
  cd /usr/local/lmce-build
  
The preparation steps one at a time:
+
The preparation steps one at a time (recommended):
 
  prepare-scripts/install-build-pkgs.sh
 
  prepare-scripts/install-build-pkgs.sh
 
  prepare-scripts/cd1-prepare.sh
 
  prepare-scripts/cd1-prepare.sh
Line 80: Line 91:
 
Or, you could do them all in one go with:
 
Or, you could do them all in one go with:
 
  ./prepare.sh
 
  ./prepare.sh
 
[[User:Posde|posde]] Doing the prepare.sh script produced a hash error. apt-get update and restarting the prepare.sh solved this.
 
  
 
===Building from source===
 
===Building from source===
Line 87: Line 96:
 
  cd /usr/local/lmce-build
 
  cd /usr/local/lmce-build
  
All the build steps can be executed seperately:
+
All the build steps can be executed seperately (recommended at least the first time):
 
  build-scripts/checkout-svn.sh
 
  build-scripts/checkout-svn.sh
 
  build-scripts/import-win32bins.sh
 
  build-scripts/import-win32bins.sh

Revision as of 22:35, 23 February 2009

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

debootstrap --arch i386 intrepid /media/kubuntu-8.10/

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

Verify apt's list of repositories

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

deb       http://us.archive.ubuntu.com/ubuntu/ intrepid  main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ intrepid  main restricted universe
deb       http://us.archive.ubuntu.com/ubuntu/ intrepid-updates  main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ intrepid-updates  main restricted universe
deb       http://security.ubuntu.com/ubuntu</nowiki> intrepid-security  main restricted universe
deb-src http://security.ubuntu.com/ubuntu</nowiki> intrepid-security  main restricted universe
deb       http://debian.slimdevices.com/</nowiki> stable  main

Installing needed packages

Important! Perform these also after chrooting.

apt-get update
apt-get dist-upgrade
apt-get install aptitude
apt-get install mysql-server

Reconfigure MySQL to not open a TCP-IP network port:

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 http://svn.linuxmce.org/svn/branches/LinuxMCE-0810/src/Ubuntu_Helpers_NoHardcode

Installing the build scripts

cd Ubuntu_Helpers_NoHardcode
./install.sh
cd /usr/local/lmce-build

Configuring the build scripts

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

# Uncomment to avoid DVD build step[s]
do_not_build_sl_dvd="yes"
do_not_build_dl_dvd="yes"


# Uncomment to create fake win32 binaries
win32_create_fake="yes"

# Point to the development sqlCVS server for 0810
sqlcvs_host="schema.linuxmce.org"
EOF

Preparing for build

cd /usr/local/lmce-build

The preparation steps one at a time (recommended):

prepare-scripts/install-build-pkgs.sh
prepare-scripts/cd1-prepare.sh
prepare-scripts/cd2-prepare.sh
prepare-scripts/create-diskless-debootstrap.sh
prepare-scripts/import-external-files.sh
prepare-scripts/preseed-build-pkgs.sh

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

./prepare.sh

Building from source

cd /usr/local/lmce-build

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

build-scripts/checkout-svn.sh
build-scripts/import-win32bins.sh
build-scripts/build-replacements.sh
build-scripts/build-makerelease.sh
build-scripts/import-databases.sh
build-scripts/build-maindebs.sh
build-scripts/get-closed-source-debs.sh
build-scripts/create-repo.sh
build-scripts/cd1-build.sh
build-scripts/cd2-build.sh

Or the following script will run them all:

./build.sh