| Line 49: | Line 49: | ||
<pre> | <pre> | ||
| - | # Install QEMU for ARM support. This will ask you a couple of times to accept a repository key | + | # Install QEMU for ARM support and git. This will ask you a couple of times to accept a repository key |
| - | zypper install qemu-svn | + | zypper install qemu-svn git |
# This will indicate to the OBS which architectures to work with (ARMv7 and i586) | # This will indicate to the OBS which architectures to work with (ARMv7 and i586) | ||
| Line 130: | Line 130: | ||
EOF | EOF | ||
| + | |||
| + | chmod +x /usr/sbin/import-meego-release.sh | ||
| + | </pre> | ||
| + | |||
| + | Now, go to http://mirrors.kernel.org/meego/ , find a release that suits you. For example, http://mirrors.kernel.org/meego/builds/1.0.99/1.0.99.0.20101005.1/ | ||
| + | |||
| + | You'd then need to (please note the http to rsync change): | ||
| + | |||
| + | <pre> | ||
| + | /usr/sbin/import-meego-release.sh 1.0.99.0.20101005.1 rsync://mirrors.kernel.org/meego/builds/1.0.99/ | ||
| + | </pre> | ||
| + | |||
| + | And it'll import the release. | ||
| + | |||
| + | In addition to that, you now need to set up a prjconf. A prjconf basically is a bunch of settings determining how to resolve dependancies, build settings and so on. | ||
| + | |||
| + | Currently these are not exported in the release directories ([http://bugs.meego.com/show_bug.cgi?id=8121 bug 8121]), so you will have to do it manually. | ||
| + | |||
| + | These prjconfs are hosted in a git repository, http://git.gitorious.org/meego-developer-tools/obs-project-config.git | ||
| + | |||
| + | On your OBS machine, do the following: | ||
| + | |||
| + | <pre> | ||
| + | git clone http://git.gitorious.org/meego-developer-tools/obs-project-config.git | ||
| + | ls obs-project-config | ||
| + | </pre> | ||
| + | |||
| + | You then need to decide which one matches with your release. Trunk is the one for the next version being released (check http://wiki.meego.com/Release_Engineering ). MeeGo:1.0:Core and MeeGo:1.1:Core would qualify for 1.0 and 1.1. | ||
| + | |||
| + | Then, when you have figured out this, you can then do, if 1.1 was the release we imported and we wanted MeeGo:1.1:Core: | ||
| + | |||
| + | <pre> | ||
| + | osc -A http://localhost:81 meta prj -F obs-project-config/MeeGo:1.1:Core MeeGo:1.1:Core | ||
| + | </pre> | ||
| + | |||
| + | And now your release is ready to go as a build target! | ||
DRAFT
This guide is to show you how to deploy a MeeGo-enabled OBS appliance with two built-in workers in a virtualized environment for developing for and with MeeGo. The tips is based on http://en.opensuse.org/openSUSE:Build_Service_Appliance and I've tested this within VirtualBox.
You'll need a Virtual Machine like this:
This can also be a physical machine with a physical disk where obs-server.i686-2.0.105-Build1.1.raw.bz2 (bunzipped and dd'ed to a USB stick) can be used as boot device.
Contents |
Power on the machine. At the first setup the image will set itself up to fit with the machine. You'll arrive at a login: prompt where you can log in as 'root'
We need to set up LVM on the virtual disk, sdb. Log in as root and run: (WARNING: this will erase your 'sdb' disk)
# This will partition your disk sfdisk /dev/sdb << EOF ,,8e EOF # This will set up LVM with various file systems. You can adjust sizes as wished. pvcreate /dev/sdb1 vgcreate "OBS" /dev/sdb1 lvcreate -L 50G -n "server" /dev/OBS vgscan mkfs /dev/OBS/server lvcreate -L 20G -n "cache" OBS vgscan mkfs /dev/OBS/cache lvcreate -L 4G -n "worker_root_1" /dev/OBS lvcreate -L 4G -n "worker_root_2" /dev/OBS lvcreate -L 512M -n "worker_swap_1" /dev/OBS lvcreate -L 512M -n "worker_swap_2" /dev/OBS vgscan mkfs /dev/OBS/worker_root_1 mkfs /dev/OBS/worker_root_2
Run the following commands on the machine:
# Install QEMU for ARM support and git. This will ask you a couple of times to accept a repository key zypper install qemu-svn git # This will indicate to the OBS which architectures to work with (ARMv7 and i586) sed s/OBS_SCHEDULER_ARCHITECTURES=\"i586 x86_64\"/OBS_SCHEDULER_ARCHITECTURES=\"i586 armv7el\"/g /etc/sysconfig/obs-server # This will reboot the virtual machine to pick up the LVM partitions from before shutdown -h now
After the reboot, log in as root and do the following commands:
mkdir -p /obs/imports mkdir -p /obs/build ln -s /obs/build /srv/obs/build
A MeeGo release is approximately 4-5 gb each - and this is even without the debug symbols.
Run the following command - this will set up a script which is handy to import MeeGo releases in the future:
cat > /usr/sbin/import-meego-release.sh << EOF
#!/bin/sh -e
#
# SYNTAX: import-meego-release.sh <RELEASE NUMBER> <DOWNLOAD LOCATION>
# Example: import-meego-release.sh 1.0.99.0.20101005.1 rsync://mirrors.kernel.org/meego/builds/1.0.99/
# This will set up a OBS project MeeGo:RELEASE NUMBER:Core
# You might have to use login for OBS, that is, login Admin password opensuse
# Download the RPMs
mkdir -p /obs/imports/MeeGo_$1/core/
for x in ia32 armv7l
do
mkdir -p /obs/imports/MeeGo_$1/core/$x/
cd /obs/imports/MeeGo_$1/core/$x/
rsync -a --progress $2/$1/core/repos/$x/packages/* .
done
# Set up symlinks to packages
mkdir -p /obs/build/MeeGo:$1:Core/standard/i586/:full
cd /obs/build/MeeGo:$1:Core/standard/i586/:full
find /obs/imports/MeeGo_$1/core/ia32/ -name *.rpm | xargs -I@ ln @ .
mkdir -p /obs/build/MeeGo:$1:Core/standard/armv7el/:full
cd /obs/build/MeeGo:$1:Core/standard/armv7el/:full
find /obs/imports/MeeGo_$1/core/armv7l/ -name *.rpm | xargs -I@ ln @ .
chown -R obsrun:obsrun /obs/build/
chown -R obsrun:obsrun /obs/imports/
# Set up prj information in OBS
osc -A http://localhost:81 meta prj -F - MeeGo:$1:Core << OTHEREOF
<project name="MeeGo:$1">
<title/>
<description/>
<build>
<enable/>
</build>
<repository name="standard">
<arch>armv7el</arch>
<arch>i586</arch>
</repository>
</project>
OTHEREOF
for x in i586 armv7el
do
/usr/lib/obs/server/bs_admin --rescan-repository MeeGo:$1:Core standard $x
done
echo "MeeGo:$1:Core imported into OBS, after rescan is done."
EOF
chmod +x /usr/sbin/import-meego-release.sh
Now, go to http://mirrors.kernel.org/meego/ , find a release that suits you. For example, http://mirrors.kernel.org/meego/builds/1.0.99/1.0.99.0.20101005.1/
You'd then need to (please note the http to rsync change):
/usr/sbin/import-meego-release.sh 1.0.99.0.20101005.1 rsync://mirrors.kernel.org/meego/builds/1.0.99/
And it'll import the release.
In addition to that, you now need to set up a prjconf. A prjconf basically is a bunch of settings determining how to resolve dependancies, build settings and so on.
Currently these are not exported in the release directories (bug 8121), so you will have to do it manually.
These prjconfs are hosted in a git repository, http://git.gitorious.org/meego-developer-tools/obs-project-config.git
On your OBS machine, do the following:
git clone http://git.gitorious.org/meego-developer-tools/obs-project-config.git ls obs-project-config
You then need to decide which one matches with your release. Trunk is the one for the next version being released (check http://wiki.meego.com/Release_Engineering ). MeeGo:1.0:Core and MeeGo:1.1:Core would qualify for 1.0 and 1.1.
Then, when you have figured out this, you can then do, if 1.1 was the release we imported and we wanted MeeGo:1.1:Core:
osc -A http://localhost:81 meta prj -F obs-project-config/MeeGo:1.1:Core MeeGo:1.1:Core
And now your release is ready to go as a build target!