WebKitClutter

From Apertis
Jump to: navigation, search

Contents

Migration to WebKit2

WebKit Clutter is being deprecated in favour of a switch to WebKit2GTK+. Read the WebKit2 page for status and more information.

Releasing from the git repository

Obtaining WebKitClutter

The mainline for the clutter port of WebKit is hosted here:

http://cgit.collabora.com/git/webkit-clutter.git/

To build it on an Apertis image just obtain the build-dependencies for webkit-clutter by doing this (make sure you have the development component enabled in your sources.list and that you have also the deb-src line):

$ sudo apt-get build-dep webkit-clutter

Then from inside the repository, run:

$ ./Tools/Scripts/build-webkit --clutter

Generating the tarball

WebKit Clutter uses the CMake build system also used by most ports of WebKit. It used to share the autotools one that the GTK+ port used, but GTK+ has also moved to CMake now. To create the distribution tarball you run the following command from the directory you built WebKit on (WebKitBuild/Release if you used build-webkit, for instance, or wherever you ran configure from):

$ cd WebKitBuild/Release/
$ make dist

This will generate a package named webkit-clutter-x.y.z.tar.xz in the current directory.

Naming the tarball

After the tarball is generated you need to rename it. We have been using the following name convention:

webkit-clutter-x.y.z+YYYYMMDD+SHA1.tar.xz

The bit that is added to the end of the version should be the latest available tag in the git repository. To find out what the latest tag is, run the following commands:

$ git remote update
$ git tag

The last tag with the format described above should be used. If the tag is the same as the current package, then either no changes are available for packaging or a tag has been forgotten. Talk to the maintainers of WebKit Clutter (Collabora), if that is the case.

Packaging

The webkit-clutter package is kept in the following git repository: https://git.secure-automotive-cloud.org/git/webkit-clutter-package.git/. First of all, ensure you have the git-buildpackage tool installed in the system you'll be working on. If you have not worked with git-buildpackage yet, there is a guide on Debian's wiki.

To start the package update you run the following command, from inside your git clone:

$ git-import-orig <path-to-tar.xz>

It will ask you about the version and will import the new version to the upstream branch and merge it onto the master branch. You can then edit the debian/changelog file, and do any other required packaging changes. Remember to commit your changes! After you're satisfied you can run the following command:

$ git-buildpackage -S

If you face this kind of error, "gpg secret key not available", just add "-uc -us" to avoid it. If you got build-depends problem, just add "-d" option to avoid it.

$ git-buildpackage -S -us -uc -d

This will generate the source package (i.e. the .dsc file, the debian tarball and the .orig.tar.xz file will be a symbolic link to the original file). You can then add those files to OBS. When you're satisfied you should tag and push your changes:

$ git-buildpackage --git-tag-only
$ git push --tags origin
$ git push origin upstream
$ git push origin master

Testing external packages buildability

Before releasing, make sure that external packages depending on webkit-clutter are still buildable. As a quick test try to build chaiwala-apparmor-tests and the webkit-clutter-simple-test-shell against the new webkit-clutter release:

$ make install
$ git clone https://git.secure-automotive-cloud.org/git/chaiwala-apparmor-tests.git/ ~/chaiwala-apparmor-tests
$ make -c ~/chaiwala-apparmor-tests
$ git clone git://gitorious.org/webkit-clutter-simple-test-shell/webkit-clutter-simple-test-shell.git ~/webkit-clutter-simple-test-shell
$ make -c ~/webkit-clutter-simple-test-shell

Building in a chroot

When debugging issues that are reproducible on Apertis but not on your development environment, it can be useful to build WebKit in Apertis directly from git, without going through OBS.

For this, create a chroot with Apertis packages, in a filesystem that hasn't been mounted with the nodev option:

$ sudo debootstrap --no-check-gpg --components=target,development \
  --arch i386 14.12 /srv/chroot/apertis-i386-webkit \
  https://repositories.apertis.org/apertis /usr/share/debootstrap/scripts/sid

Bind a few directories to the chroot:

$ sudo mount --bind /tmp /srv/chroot/apertis-i386-webkit/tmp
$ sudo mount --bind /dev /srv/chroot/apertis-i386-webkit/dev
$ sudo mount --bind /dev/pts /srv/chroot/apertis-i386-webkit/dev/pts
$ sudo mount --bind /proc /srv/chroot/apertis-i386-webkit/proc
$ sudo mount --bind /sys /srv/chroot/apertis-i386-webkit/sys

Start a shell in the chroot:

$ sudo chroot /srv/chroot/apertis-i386-webkit

Install build dependencies for webkit-clutter, plus ruby and fonts-liberation (you may need to add repositories to /etc/apt/sources.list):

$ sudo apt-get build-dep webkit-clutter
$ sudo apt-get install ruby fonts-liberation

Now you can copy the webkit source dir (or mount bind it) and build it as you do in your build environment, only that passing this env var when configuring: LDFLAGS=-Wl,--no-keep-memory.

The schroot tool can be used to automate mounting and sync'ing of important files when entering the chroot (eg. /etc/resolv.conf). Edit the configuration below and drop it into /etc/schroot/chroot.d/apertis-i386-webkit and use schroot -c apertis-i386-webkit to enter the chroot:

[apertis-i386-webkit]
type=directory
description=Apertis i386 for WebKit development
directory=/srv/chroot/apertis-i386-webkit
users=$YOURUSER
root-users=$YOURUSER
personality=linux32
Personal tools
Namespaces

Variants
Actions
Navigation
Tools