Difference between revisions of "Building LinuxMCE 0810"

From LinuxMCE
Jump to: navigation, search
(Getting started)
m
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[category: tutorials]]
+
[[Category: Building]]
 
[[category: programmer's Guide]]
 
[[category: programmer's Guide]]
 
{| align="right"
 
{| align="right"
Line 7: Line 7:
 
{{versioninfo|810Status=relevant|810UpdatedDate=8 October 2010|810UpdatedBy=golgoj4}}
 
{{versioninfo|810Status=relevant|810UpdatedDate=8 October 2010|810UpdatedBy=golgoj4}}
 
The following steps explain how to install a development environment onto your core in a chroot environment, so that your running core and its database are not affected. Alternatively, you could build on a separate machine or virtual machine with a clean Kubuntu-8.10 install. There are notes to this effect at the end of the page.
 
The following steps explain how to install a development environment onto your core in a chroot environment, so that your running core and its database are not affected. Alternatively, you could build on a separate machine or virtual machine with a clean Kubuntu-8.10 install. There are notes to this effect at the end of the page.
 +
 +
This information is relevant for 810 as well as for 1004. For 810 use intrepid, for 1004, replace every 810 with 1004, and every intrepid with lucid.
 +
 +
For 1204 please see [[Building_LinuxMCE]]
  
 
==Setting up a chroot environment==
 
==Setting up a chroot environment==
Line 15: Line 19:
 
  apt-get install debootstrap
 
  apt-get install debootstrap
 
  debootstrap --arch i386 intrepid /media/kubuntu-8.10/ http://old-releases.ubuntu.com/ubuntu
 
  debootstrap --arch i386 intrepid /media/kubuntu-8.10/ http://old-releases.ubuntu.com/ubuntu
 +
# or for 1004
 +
debootstrap --arch i386 lucid /media/kubuntu-8.10/
 +
  
 
Note: the following steps will also have to be performed after each reboot
 
Note: the following steps will also have to be performed after each reboot
Line 36: Line 43:
 
  deb    <nowiki>http://deb.linuxmce.org/ubuntu/ intrepid beta2</nowiki>
 
  deb    <nowiki>http://deb.linuxmce.org/ubuntu/ intrepid beta2</nowiki>
 
  deb    <nowiki>http://deb.linuxmce.org/ubuntu/ 20dev_ubuntu main</nowiki>
 
  deb    <nowiki>http://deb.linuxmce.org/ubuntu/ 20dev_ubuntu main</nowiki>
<del>deb    <nowiki>http://</nowiki>www.avenard.org/files/ubuntu-repos/ intrepid release testing</del>
 
  
 
The following line is added to the sources.list during the prepare script and should not be added before. [[User:Posde|posde]]
 
The following line is added to the sources.list during the prepare script and should not be added before. [[User:Posde|posde]]
 
  deb      <nowiki>http://</nowiki>debian.slimdevices.com/ stable  main
 
  deb      <nowiki>http://</nowiki>debian.slimdevices.com/ stable  main
 
The Avenard repository is no longer used. [[User:L3mce|l3mce]]
 
 
<del>Add the Avenard GPG key</del>
 
apt-get update
 
apt-get install wget
 
<del>wget http://www.avenard.org/files/ubuntu-repos/ubuntu-repos.key && sudo apt-key add ubuntu-repos.key && rm ubuntu-repos.key</del>
 
  
 
Add the e-tobi.net GPG key
 
Add the e-tobi.net GPG key
Line 90: Line 89:
 
  cd Ubuntu_Helpers_NoHardcode
 
  cd Ubuntu_Helpers_NoHardcode
 
  ./install.sh
 
  ./install.sh
cd /usr/local/lmce-build
 
  
 
====Configuring the build scripts====
 
====Configuring the build scripts====
 
  cat >/etc/lmce-build/builder.custom.conf <<EOF
 
  cat >/etc/lmce-build/builder.custom.conf <<EOF
 
   
 
   
  # Uncomment to avoid DVD build step[s]
+
  # Avoid DVD build step[s]
 
  do_not_build_sl_dvd="yes"
 
  do_not_build_sl_dvd="yes"
 
  do_not_build_dl_dvd="yes"
 
  do_not_build_dl_dvd="yes"
 
   
 
   
 
   
 
   
  # Uncomment to create fake win32 binaries
+
  # Create fake win32 binaries
 
  win32_create_fake="yes"
 
  win32_create_fake="yes"
 
   
 
   
Line 123: Line 121:
  
 
===Building from source===
 
===Building from source===
 
cd /usr/local/lmce-build
 
  
 
All the build steps can be executed seperately (recommended at least the first time):
 
All the build steps can be executed seperately (recommended at least the first time):
Line 173: Line 169:
  
 
  Total: roughly 1h 38minutes for compiling
 
  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
 
<del>make sure to have avenard repo in your builders sources.list</del>
 
 
<del>deb http://www.avenard.org/files/ubuntu-repos/ intrepid release testing</del>
 
 
  
 
=== Notes for installing on a virgin Kubuntu 8.10 installation (no chroot) ===
 
=== Notes for installing on a virgin Kubuntu 8.10 installation (no chroot) ===

Latest revision as of 02:59, 3 October 2014

Version Status Date Updated Updated By
710 Unknown N/A N/A
810 relevant 8 October 2010 golgoj4
1004 Unknown N/A N/A
1204 Unknown N/A N/A
1404 Unknown N/A N/A
Usage Information

The following steps explain how to install a development environment onto your core in a chroot environment, so that your running core and its database are not affected. Alternatively, you could build on a separate machine or virtual machine with a clean Kubuntu-8.10 install. There are notes to this effect at the end of the page.

This information is relevant for 810 as well as for 1004. For 810 use intrepid, for 1004, replace every 810 with 1004, and every intrepid with lucid.

For 1204 please see Building_LinuxMCE

Setting up a chroot environment

Start with becoming root on your core. 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/ http://old-releases.ubuntu.com/ubuntu
# or for 1004
debootstrap --arch i386 lucid /media/kubuntu-8.10/ 


Note: the following steps will also have to be performed after each reboot

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://old-releases.ubuntu.com/ubuntu/ intrepid  main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid  main restricted universe
deb     http://old-releases.ubuntu.com/ubuntu/ intrepid-updates  main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid-updates  main restricted universe
deb     http://security.ubuntu.com/ubuntu intrepid-security  main restricted universe
deb-src http://security.ubuntu.com/ubuntu intrepid-security  main restricted universe
deb     http://www.e-tobi.net/vdr-experimental/ sid base
deb     http://deb.linuxmce.org/ubuntu/ intrepid beta2
deb     http://deb.linuxmce.org/ubuntu/ 20dev_ubuntu main

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

deb      http://debian.slimdevices.com/ stable  main

Add the e-tobi.net GPG key

gpg --keyserver pgp.mit.edu --recv-keys F7180D26AEDAA642
gpg --export --armor F7180D26AEDAA642 | sudo apt-key add -

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

Start MySQL Server

Do not execute the mysql start before doing the sed statement listed above.

/etc/init.d/mysql start

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.

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

Configuring the build scripts

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

# Avoid DVD build step[s]
do_not_build_sl_dvd="yes"
do_not_build_dl_dvd="yes"


# 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

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

Using the build's output

The build.sh 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 pre-install-from-repo.sh, go into /etc/apt/sources.list, and replace the deb.linuxmce.org 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
wget http://deb.linuxmce.org/ubuntu/dists/intrepid/lmce-alpha2/binary-all/libft-perl_1.0_all.deb
wget http://deb.linuxmce.org/ubuntu/dists/intrepid/lmce-alpha-latest/binary-all/mail-transport-agent_1.0_all.deb 
dpkg-scanpackages . >Packages
gzip -c Packages > Packages.gz
popd

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

Notes

If you want to speed up building on a multi-core machine, amend build-scripts/build-maindebs.sh and change the call to MakeRelease to include -j <number of cores>. Before executing the build, copy libresolution.so 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

Notes for installing on a virgin Kubuntu 8.10 installation (no chroot)

  • As pointed out above, there is no need to run the command below, IF you are not chroot'ing
 sed 's/^[^#]*bind-addressspace:*=.*$/#&\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