http://wiki.linuxmce.org/api.php?action=feedcontributions&user=Skbohra&feedformat=atomLinuxMCE - User contributions [en]2024-03-29T01:55:01ZUser contributionsMediaWiki 1.24.1http://wiki.linuxmce.org/index.php?title=Building_LinuxMCE_0810&diff=22192Building LinuxMCE 08102010-01-28T07:38:58Z<p>Skbohra: /* Virgin Kubuntu 8.10 builder (no chroot) notes */</p>
<hr />
<div>[[category: tutorials]]<br />
[[category: programmer's Guide]]<br />
{| align="right"<br />
| __TOC__<br />
|}<br />
<br />
==Setting up a chroot environment==<br />
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.<br />
<br />
Start with becoming root as the following steps will need to be done using super user privileges.<br />
sudo su -<br />
<br />
===Create the environment===<br />
apt-get install debootstrap<br />
debootstrap --arch i386 intrepid /media/kubuntu-8.10/<br />
<br />
===Steps after each reboot ===<br />
(Note: For First building, perform steps in the '''Getting Started''' section)<br />
====Mount required directories====<br />
mount --bind /dev /media/kubuntu-8.10/dev<br />
mount none /media/kubuntu-8.10/proc -t proc<br />
mount none /media/kubuntu-8.10/dev/pts -t devpts<br />
<br />
====Change-root into the environment====<br />
chroot /media/kubuntu-8.10<br />
====Start MySQL Server====<br />
Do not execute the mysql start before doing the sed statement listed in the '''Installing needed packages section''' below to reconfigure MySQL.<br />
/etc/init.d/mysql start<br />
<br />
===Verify apt's list of repositories===<br />
Make sure ''/etc/apt/sources.list'' (inside the chroot) contains something very similar to:<br />
deb <nowiki>http://</nowiki>''us.archive.ubuntu.com''/ubuntu/ intrepid main restricted universe multiverse <br />
deb-src <nowiki>http://</nowiki>''us.archive.ubuntu.com''/ubuntu/ intrepid main restricted universe<br />
deb <nowiki>http://</nowiki>''us.archive.ubuntu.com''/ubuntu/ intrepid-updates main restricted universe multiverse<br />
deb-src <nowiki>http://</nowiki>''us.archive.ubuntu.com''/ubuntu/ intrepid-updates main restricted universe<br />
deb <nowiki>http://</nowiki>security.ubuntu.com/ubuntu intrepid-security main restricted universe<br />
deb-src <nowiki>http://</nowiki>security.ubuntu.com/ubuntu intrepid-security main restricted universe<br />
<br />
The following line is added to the sources.list during the prepare script and should not be added before. [[User:Posde|posde]]<br />
deb <nowiki>http://</nowiki>debian.slimdevices.com/ stable main<br />
<br />
deb <nowiki>http://</nowiki>www.avenard.org/files/ubuntu-repos/ intrepid release testing<br />
<br />
Add the Avenard GPG key<br />
wget http://www.avenard.org/files/ubuntu-repos/ubuntu-repos.key && sudo apt-key add ubuntu-repos.key && rm ubuntu-repos.key<br />
<br />
===Installing needed packages===<br />
'''Important!''' Perform these also '''after''' chrooting if you are building in a chrooted environment.<br />
<br />
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).<br />
<br />
(Leave the root password for MySQL empty.)<br />
apt-get update<br />
<br />
# Uncomment either of lines below if needed (see explanation above)<br />
#unset LANG<br />
#apt-get install language-pack-en-base<br />
<br />
apt-get dist-upgrade<br />
apt-get install aptitude openssh-client mysql-server<br />
<br />
Reconfigure MySQL to not open a TCP-IP network port: (only needed if you are building in a chrooted environment)<br />
<nowiki>sed 's/^[^#]*bind-address[[:space:]]*=.*$/#&\nskip-networking/' -i /etc/mysql/my.cnf</nowiki><br />
<br />
==Building from source==<br />
For a more in detail description of all the steps involved see [[Building LinuxMCE 0804]]<br />
<br />
Currently the focus is on getting the following to work completely.<br />
<br />
===Getting started===<br />
You should only have to do this part once initially.<br />
<br />
The following steps will require superuser privileges, and it is '''always''' wise to refresh the packages list beforehand.<br />
sudo su -<br />
apt-get update<br />
<br />
====Obtaining the build scripts====<br />
apt-get install subversion<br />
svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-0810/src/Ubuntu_Helpers_NoHardcode<br />
<br />
====Installing the build scripts====<br />
cd Ubuntu_Helpers_NoHardcode<br />
./install.sh<br />
cd /usr/local/lmce-build<br />
<br />
====Configuring the build scripts====<br />
cat >/etc/lmce-build/builder.custom.conf <<EOF<br />
<br />
# Uncomment to avoid DVD build step[s]<br />
do_not_build_sl_dvd="yes"<br />
do_not_build_dl_dvd="yes"<br />
<br />
<br />
# Uncomment to create fake win32 binaries<br />
win32_create_fake="yes"<br />
<br />
# Point to the development sqlCVS server for 0810<br />
sqlcvs_host="schema.linuxmce.org"<br />
EOF<br />
<br />
===Preparing for build===<br />
<br />
cd /usr/local/lmce-build<br />
<br />
The preparation steps one at a time (recommended):<br />
prepare-scripts/install-build-pkgs.sh<br />
prepare-scripts/cd1-prepare.sh<br />
prepare-scripts/cd2-prepare.sh<br />
prepare-scripts/create-diskless-debootstrap.sh<br />
prepare-scripts/import-external-files.sh<br />
prepare-scripts/preseed-build-pkgs.sh<br />
<br />
Or, you could do them all in one go with:<br />
./prepare.sh<br />
<br />
===Building from source===<br />
<br />
cd /usr/local/lmce-build<br />
<br />
All the build steps can be executed seperately (recommended at least the first time):<br />
build-scripts/checkout-svn.sh<br />
build-scripts/import-win32bins.sh<br />
build-scripts/build-replacements.sh<br />
build-scripts/build-makerelease.sh<br />
build-scripts/import-databases.sh<br />
build-scripts/build-maindebs.sh<br />
build-scripts/get-closed-source-debs.sh<br />
build-scripts/create-repo.sh<br />
build-scripts/cd1-build.sh<br />
build-scripts/cd2-build.sh<br />
<br />
Or the following script will run them all:<br />
./build.sh<br />
<br />
== Using the build's output ==<br />
The build.sh script puts all created deb-files under /var/www. Setup a web server to point to that directory. <br />
sudo apt-get install apache2<br />
<br />
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<br />
deb <ip-address-of-your-builder> ./<br />
and re-run apt-get update<br />
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<br />
<br />
pushd /var/www<br />
wget http://deb.linuxmce.org/ubuntu/dists/intrepid/lmce-alpha2/binary-all/libft-perl_1.0_all.deb<br />
wget http://deb.linuxmce.org/ubuntu/dists/intrepid/lmce-alpha-latest/binary-all/mail-transport-agent_1.0_all.deb <br />
dpkg-scanpackages . >Packages<br />
gzip -c Packages > Packages.gz<br />
popd<br />
<br />
Now, on your new or test core, execute another apt-get update, and you are good to go for the mce-install.sh<br />
<br />
== Notes ==<br />
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.<br />
<br />
=== Without -j 2 ===<br />
23:36:44 Compiling and building packages<br />
01:42:50 *** STEP: Download closed source debs<br />
<br />
Total: roughly 2h 6minutes for compiling<br />
<br />
=== With -j 2 ===<br />
13:13:44 Compiling and building packages<br />
14:51:56 *** STEP: Download closed source debs<br />
<br />
Total: roughly 1h 38minutes for compiling<br />
<br />
=== Error during prepare step ===<br />
If you get an error during the prepare stage<br />
E: Couldn't find package libvdpau-dev<br />
make sure to have avenard repo in your builders sources.list<br />
<br />
deb http://www.avenard.org/files/ubuntu-repos/ intrepid release testing<br />
<br />
<br />
=== Virgin Kubuntu 8.10 builder (no chroot) notes ===<br />
-As pointed out above, do not run the command below, it is not needed when you aren't chrooted.<br />
<nowiki>sed 's/^[^#]*bind-address[[:space:]]*=.*$/#&\nskip-networking/' -i /etc/mysql/my.cnf</nowiki><br />
<br />
<br />
- 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.<br />
<br />
<br />
- 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<br />
sudo apt-get install openssh-server</div>Skbohra