summaryrefslogtreecommitdiff
path: root/content/slide/obs.md
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-02-05 10:48:36 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2017-02-05 10:48:36 +0100
commitb7b99ab942e2521553dfdb070c4b0abd88d12e71 (patch)
tree3d6c046b0184e5cbf56e634868064c74cd549838 /content/slide/obs.md
parent40aab6c7b06b9c4cb4288d3e692b06d5d2e5a89b (diff)
downloadwww-andreasbaumann-cc-b7b99ab942e2521553dfdb070c4b0abd88d12e71.tar.gz
www-andreasbaumann-cc-b7b99ab942e2521553dfdb070c4b0abd88d12e71.tar.bz2
changed website and blog to use Hugo
Diffstat (limited to 'content/slide/obs.md')
-rw-r--r--content/slide/obs.md243
1 files changed, 243 insertions, 0 deletions
diff --git a/content/slide/obs.md b/content/slide/obs.md
new file mode 100644
index 0000000..5c9d336
--- /dev/null
+++ b/content/slide/obs.md
@@ -0,0 +1,243 @@
++++
+title = "OpenBuild Service"
++++
+
+ <div class="reveal">
+
+ <!-- Any section element inside of this container is displayed as a slide -->
+ <div class="slides">
+ <section>
+ <h1>Open Build Service</h1>
+ <h3>Fighting the Linux binary distribution problem..</h3>
+ <p>
+ <small>Created by <a href="http://www.andreasbaumann.cc">Andreas Baumann</a></small>
+ </p>
+ <p>
+ <small><a href="http://www.andreasbaumann.cc/slide/obs">http://www.andreasbaumann.cc/slide/obs</a></small>
+ </p>
+ <p><small>(C)2015</small></p>
+ </section>
+
+ <section>
+ <h2>The Linux Binary Distribution Disaster</h2>
+ <p>
+ Linus Torvalds: Provides MacX and Windows binaries for his <i>divelog</i> application
+ but no Linux binaries, why?
+ </p>
+ <p>
+ There are no Linux binaries: there are Fedora binaries, Ubuntu
+ binaries, ArchLinux binaries, etc..
+ </p>
+ </section>
+
+ <section>
+ <h2>Linux binaries differ..</h2>
+ <ul>
+ <li>..in package formats (deb, rpm, tgz, ...)</li>
+ <li>..in build rules (compiler flags, fencing, optimization, ...)</li>
+ <li>Linux Standard Base (LSB): should actually guarantee ABI and API stability..</li>
+ <li>The problem is, there is still too much variation..</li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Shared libraries</h2>
+ <ul>
+ <li>share common code on a platform, good idea</li>
+ <li>there is not a common view of what can be shared and should be shared</li>
+ <li>packet names and versions differ</li>
+ <li>sometimes compilation flags differ (e.g. no threading support in sqlite3 on RHEL5)</li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Distribution types</h2>
+ <ul>
+ <li>Frozen releases, e.g. Debian 8, RHEL 7, Ubuntu LTS, ...,
+ long release cycles (4-8 years), they are stable,
+ but only if you use very old software</li>
+ <li>Rolling releases, e.g. Fedora, ArchLinux, Gentoo, ...
+ You have the newest and shiniest software, but
+ stability may suffer, backporting to other distros
+ gets almost impossible.
+ </li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Options for software developers</h2>
+ <p>Islands, part 1</p>
+ <ul>
+ <li>Create your own universe: examples Java, Go, Python, ...
+ </li>
+ <li>You deploy your software as a blob of static libraries,
+ there might be sharing inside your universe but not between
+ universes.
+ </li>
+ <li>In C++ we are "stuck" to the ELF format, shared libarires, binaries
+ in distribution packages. Build on one Linux (which one?) and hope
+ it runs everywhere
+ </li>
+ <li>Local libraries must be maintained (security patches), imagine
+ a bundled, unpatched, 5 years old libssl. :-)
+ </li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Package meta-systems</h2>
+ <p>Islands, part 2</p>
+ <ul>
+ <li><a href="http://www.openpkg.org/">http://www.openpkg.org/</a>: cross-platform RPMs</li>
+ <li>BSD-like port systems (gentoo, netsrc, etc.): but this means going back to distribution of source code only</li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Package build systems</h2>
+ <p>Islands, part 3<p>
+ <ul>
+ <li><a href="http://build.opensuse.org">http://build.opensuse.org</a>: Open Build Service (for OpenSuSE)</li>
+ <li><a href="http://launchpad.net">http://launchpad.net</a>: Ubuntu only</li>
+ <li><a href="http://copr.fedoraproject.org">http://copr.fedoraproject.org</a>, koji: Fedora only</li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Package build systems</h2>
+ <p>Islands, part 3</p>
+ <ul>
+ <li>Linux distros try to maintain their bleeding edge product with the help of the community.</li>
+ <li>Naturally communities form islands</li>
+ <li>Exception: OpenBuild system, they build SuSE, RHEL, Debian, Ubuntu, Mandriva, Arch,..</li>
+ <li>This "behaviour" should be honoured and supported as it is the really only way to go right now</li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>OBS</h2>
+ <ul>
+ <li>Basically having one RPM SPEC-file and one Debian/Ubuntu tree covers the majority of Linux distributions</li>
+ <li>Choose your dependencies wisely and provide what's not available on old distros on your own.</li>
+ <li>Either bundle your stub packages with your software package or package them into a 3rdParty meta package</li>
+ <li>Make sure package names DON'T collide!</li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Automatization</h2>
+ <ul>
+ <li>Combine it with github, build the source trees there (git tag)</li>
+ <li>Webhooks draw the tarballs and spec files to the OBS cluster</li>
+ <li>Publish releases on a web space</li>
+ <li>Keep the current git master as rolling last release of your software</li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Current process</h2>
+ <ul>
+ <li>Update in CMakeLists.txt:
+ <pre><code class="hljs" data-trim contenteditable>
+set( STRUS_MAJOR_VERSION 0 )
+set( STRUS_MINOR_VERSION 2 )
+set( STRUS_PATCH_VERSION 1 )
+ </code></pre>
+ </li>
+ <li>Adapt %changelog and dist/debian/changelog. Keep STRICTLY to syntax! For tipps see also: <a href="http://keepachangelog.com/">http://keepachangelog.com/</a></li>
+ <li>Commit the master revision and tag it</li>
+ <pre><code class="hljs" data-trim contenteditable>
+git commit -a -m 'changed to release 0.2.1'
+git tag 0.2.1
+ </code></pre>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Current process</h2>
+ <ul>
+ <li>Deploy to OBS workspace:
+ <pre><code class="hljs" data-trim contenteditable>
+osc co home:PatrickFrey (into $HOME/home:PatrickFrey)</li>
+ </code></pre>
+ <pre><code class="hljs" data-trim contenteditable>
+cmake .
+dist/obs/deploy_to_obs.sh
+ </code></pre>
+ </li>
+
+ <li>Remove source tarballs of old release, add tarballs of new release:
+
+ <pre><code class="hljs" data-trim contenteditable>
+cd home:PatrickFrey/strus
+osc up
+osc rm strus-0.1.6*
+osc add strus-0.2.1*
+osc commit -m 'added version 0.2.1'
+ </code></pre>
+ </li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Issues</h2>
+ <ul>
+ <li>dist/obs/deploy_to_obs.sh should be eliminated</li>
+ <li>Release versions need patching, the mirroring system plays mean tricks otherwise..</li>
+ <li>How to automatically update the OSC workspace, not having tarballs there, etc.</li>
+ <li>Have a central changelogs, create Debian and RHEL style from it</li>
+ <li>git commit is always needed, otherwise tarball lacks modified/added artifacts</li>
+ <li>Don't change git tags later on! Rather revoke broken releases.</li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Local OSB builds</h2>
+ <ul>
+ <li>Build locally in a chrooted envorinment:
+ <pre><code class="hljs" data-trim contenteditable>
+cd home:PatrickFrey/strus
+osc build --noinit Debian_8.0 x86_64 strus.dsc
+osc build --noinit xUbuntu_12.04 x86_64 strus-xUbuntu_12.04.dsc
+osc build --noinit CentOS_5 i586 strus.spec
+ </code></pre>
+ </li>
+ <li>Access a shell in the chroot to investigate issues:</li>
+ <pre><code class="hljs" data-trim contenteditable>
+sudo chroot /var/tmp/build-root/xUbuntu_12.04-x86_64/ /bin/bash --login
+cat /etc/debian_version
+wheezy/sid
+ </code></pre>
+ </li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Local OSB builds</h2>
+ <ul>
+ <li>The artifacts of the build system are somewhat hidden in the chroot:</li>
+ <pre><code class="hljs" data-trim contenteditable>
+/usr/src/packages/BUILD/
+/home/abuild/rpmbuild/BUILD/strus-0.2.1
+/usr/src/packages/BUILD/strus-0.2.1
+ </code></pre>
+ </li>
+ <li>The chrooted environment lacks things like an editor or a debugger or
+ even a package manager inside the chroot.
+ Either add a dependency for them 'BuildRequires:' or use
+ the package manager from outside the chroot (works nice on Archlinux
+ and for Ubuntu on Ubuntu, 'apt-get' on RHEL might be a problem).
+ </li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Links</h2>
+ <ul>
+ <li>OSC OpenBuild Service Command Line: <a href="http://openbuildservice.org/download/">http://openbuildservice.org/download/</a>
+ </li>
+ </ul>
+
+ </section>
+ </div>
+ </div>