Editing Mer/Build/Install OBS

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
-
{{Mer}}
 
-
 
-
[[OBS]] stands for [https://build.opensuse.org/ OpenSuse Build Service]. You can find out more about it from the OpenSuse webpage.
 
-
 
== Installing OBS tools locally ==
== Installing OBS tools locally ==
You'll need an [https://secure-www.novell.com/selfreg/jsp/createOpenSuseAccount.jsp?target=http://www.opensuse.org account with Novell]
You'll need an [https://secure-www.novell.com/selfreg/jsp/createOpenSuseAccount.jsp?target=http://www.opensuse.org account with Novell]
-
You must then visit your [https://build.opensuse.org/project/list_my project list] and click : "Let me build my packages!"
+
You must then visit your [https://build.opensuse.org/project/list_my project list] and click : "Let me build my packages"
 +
(Could someone confirm the step above... it only appears when you create a new account)
=== Debian ===
=== Debian ===
-
Assuming a Debian Testing development box locally:
+
Assuming a Debian Lenny/5.0 development box locally:
-
To get the OBS tools repository add an entry to the sources.lists:
+
To get the OBS tools repository add the following line:
-
  echo "deb <nowiki>http://download.opensuse.org/repositories/openSUSE:/Tools/Debian_5.0/ /</nowiki>" > /etc/apt/sources.list.d/obs.list
+
  deb <nowiki>http://download.opensuse.org/repositories/openSUSE:/Tools/Debian_5.0/ /</nowiki>
 +
to a new file called:
 +
/etc/apt/sources.list.d/obs.list
Then
Then
  apt-get update
  apt-get update
  apt-get install osc build qemu
  apt-get install osc build qemu
-
 
-
OBS uses 403 redirects which hits a [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479350 bug in apt] in Lenny.
 
-
 
-
 
-
You can workaround using:
 
-
  wget http://download.opensuse.org/repositories/openSUSE:/Tools/Debian_5.0/./all/build_2009.09.23-1_all.deb
 
-
  apt-get -f install
 
=== Ubuntu ===
=== Ubuntu ===
Line 36: Line 28:
Then
Then
-
# add the key in the apt keyring
 
-
wget -q http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_9.04/Release.key -O- | apt-key add -
 
-
# refresh your package source
 
  apt-get update
  apt-get update
  apt-get install osc build
  apt-get install osc build
Line 48: Line 37:
   ln -s ../site-packages/osc* .
   ln -s ../site-packages/osc* .
-
Suse don't have an Ubuntu qemu yet so we use the one they make for Debian (bug raised):
+
Ubuntu qemu isn't up to it so we need the Debian one:
Add the following lines:
Add the following lines:
  deb <nowiki>http://download.opensuse.org/repositories/openSUSE:/Tools/Debian_5.0/ /</nowiki>
  deb <nowiki>http://download.opensuse.org/repositories/openSUSE:/Tools/Debian_5.0/ /</nowiki>
 +
deb <nowiki>http://ftp.debian.org/debian/</nowiki> stable main
to a new file called:
to a new file called:
  /etc/apt/sources.list.d/debian5_qemu.list
  /etc/apt/sources.list.d/debian5_qemu.list
Line 58: Line 48:
  apt-get update
  apt-get update
  apt-get install qemu
  apt-get install qemu
 +
now remove that file:  
now remove that file:  
Line 64: Line 55:
and run
and run
  apt-get update
  apt-get update
-
 
==== Troubleshooting ====
==== Troubleshooting ====
Line 73: Line 63:
  gpg --keyserver pgpkeys.mit.edu --recv-key ''SOMEKEY'' && gpg -a --export  ''SOMEKEY'' | sudo apt-key add -
  gpg --keyserver pgpkeys.mit.edu --recv-key ''SOMEKEY'' && gpg -a --export  ''SOMEKEY'' | sudo apt-key add -
replacing ''SOMEKEY'' with the complained about key
replacing ''SOMEKEY'' with the complained about key
-
 
-
=== RedHat Enterprise Linux 5 ===
 
-
Assuming a RHEL 5 box locally:
 
-
 
-
The M2Crypto package that comes w/ RHEL5 is too old. I retrieved the 0.19.1 source rpm from Fedora 10 and built it for my architecture. But you will need to update this package to at least version 0.19 before installing the OBS packages.
 
-
 
-
Install the public key for the OBS RPM repository:
 
-
rpm --import http://download.opensuse.org/repositories/openSUSE:/Tools/RHEL_5/repodata/repomd.xml.key
 
-
 
-
To get the OBS tools repository recognized by yum:
 
-
echo "[obs]" > /etc/yum.repos.d/obs.repo
 
-
echo "name=OpenSUSE Build System" >> /etc/yum.repos.d/obs.repo
 
-
echo "baseurl=http://download.opensuse.org/repositories/openSUSE:/Tools/RHEL_5" >> /etc/yum.repos.d/obs.repo
 
-
 
-
Then:
 
-
yum makecache
 
-
yum install osc build qemu-svn
 
-
 
-
This technique is likely to work with RHEL derivatives like CentOS.
 
-
 
-
=== Other distributions ===
 
-
You can find openSuse build tools for various distributions at
 
-
http://download.opensuse.org/repositories/openSUSE:/Tools/
 
=== All OSes ===
=== All OSes ===
-
 
-
NAME=<username>
 
-
cat <<EOF >> /etc/sudoers
 
-
$NAME ALL=NOPASSWD: /usr/bin/build
 
-
$NAME ALL=NOPASSWD: /usr/sbin/chroot
 
-
EOF
 
-
 
Now, as a normal user, run
Now, as a normal user, run
  osc
  osc
Line 117: Line 77:
Note that if, in the future, qemu fails to work you may need to setup the associations for arm binaries by running:
Note that if, in the future, qemu fails to work you may need to setup the associations for arm binaries by running:
   qemu-binfmt-conf.sh
   qemu-binfmt-conf.sh
-
 
-
=== Handle OBS using ':' in filenames ===
 
-
 
-
To help bash completion etc:
 
-
  export COMP_WORDBREAKS="
 
-
  > "\""'><=;|&("
 
-
or
 
-
  COMP_WORDBREAKS=${COMP_WORDBREAKS//:/}
 
=== Local osc setup ===
=== Local osc setup ===
-
Create a local build path. E.g.,
+
Create a local build path.
  mkdir -p ~/maemo/Mer/obs
  mkdir -p ~/maemo/Mer/obs
-
In the following instructions, references to ''local-username'' should be replaced with the username used to login on your local machine while ''build-username'' (resp. ''build-password'') should be replaced with your OBS account name (resp. OBS account password).
+
All references below with (yourusername) should of course be replaced with the login name on your local machine.
-
Run <code>osc</code> without arguments. It will basically ask you to enter your OBS account username and password and create a default configuration in <code>~/.oscrc</code>. Edit it to match your needs. Here are a few interesting parameters mainly found in the <code><nowiki>[general]</nowiki></code> section:
+
You can now check some settings in your ~/.oscrc :
-
* the <code>apiurl</code> parameter should be set to the following URL:  https://api.opensuse.org.
+
This is the OBS builder we're using... maybe we'll use a maemo.org instance one day?
 +
apiurl = <nowiki>https://api.opensuse.org</nowiki>
-
* the <code>packagecachedir</code> parameter specifies where all the cached binary packages are held to create a chroot build environment. Around 300MB are needed. E.g.,
+
This specifies where all the cached binary packages are held to create a chroot build environment. Around 300MB.
-
  packagecachedir = /home/''local-username''/maemo/Mer/obs/.pkg-cache/
+
  packagecachedir = /home/(yourusername)/maemo/Mer/obs/.pkg-cache/
-
* the <code>build-root</code> parameter specifies the default location where a complete chroot build will be installed. This will be a minimal OS install: 400MB minimum.  E.g.,
+
This specifies the default location where a complete chroot build will be installed. This will be a minimal OS install - allow 400MB minimum.  Replace (yourusername) with your current login name
-
  build-root = /home/''local-username''/maemo/Mer/obs/build-%(repo)s-%(arch)s
+
  build-root = /home/(yourusername)/maemo/Mer/obs/build-%(repo)s-%(arch)s
-
* in the section <code><nowiki>[https://api.opensuse.org]</nowiki></code>, set your credentials as follow:
+
The next section is credentials for access control to the builder.
-
  user = ''build-username''
+
<nowiki>[https://api.opensuse.org]</nowiki>
-
  pass = ''build-password''
+
  user = <username>
 +
  pass = <password>
-
=== Next Steps ===
+
[[Category:Mer]]
-
Go back to [[Mer/Build]] and then onto [[Mer/Build/Application Building|Application Building]]
+

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)

Templates used on this page: