[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

wayland: Changes to 'ubuntu'



 TODO                                 |   35 ------
 debian/README.source                 |   58 ++++++++++
 debian/changelog                     |   36 ++++++
 debian/compat                        |    2 
 debian/control                       |    4 
 debian/copyright                     |   29 +----
 debian/gbp.conf                      |    5 
 debian/libwayland-dev.install        |   12 +-
 debian/libwayland0.install           |    8 -
 debian/libwayland0.lintian-overrides |    1 
 debian/libwayland0.symbols.in        |    2 
 debian/rules                         |    6 -
 debian/source.lintian-overrides      |    1 
 debian/wayland.lintian-overrides     |    1 
 protocol/screenshooter.xml           |    7 -
 protocol/wayland.xml                 |  159 +++++++++++++++++++++------
 wayland/Makefile.am                  |    4 
 wayland/connection.c                 |   20 ++-
 wayland/connection.h                 |    2 
 wayland/event-loop.c                 |   37 +++---
 wayland/scanner.c                    |  199 +++++++++++++++++++++++++++++------
 wayland/wayland-client.c             |   39 +++++-
 wayland/wayland-server.c             |   60 ++++++++--
 wayland/wayland-server.h             |    7 +
 wayland/wayland-shm.c                |    7 -
 wayland/wayland-util.h               |    2 
 26 files changed, 551 insertions(+), 192 deletions(-)

New commits:
commit ccf0a121b8e856ca49d4a7f77ec7bd4e77a0b46b
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Aug 5 16:26:31 2011 +1000

    gbp.conf: Tag Ubuntu releases nicely

diff --git a/debian/gbp.conf b/debian/gbp.conf
index 8f0d1b4..240dc81 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -2,3 +2,4 @@
 upstream-branch=upstream-ubuntu
 debian-branch=ubuntu
 pristine-tar=true
+debian-tag=ubuntu/%(version)s

commit 30ceda60c9b86f01af161d8c59c069bc070301c5
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Aug 5 15:54:06 2011 +1000

    Release to oneiric

diff --git a/debian/changelog b/debian/changelog
index 46496dc..c8ae067 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-wayland (0.1.0~0.2-0ubuntu1) UNRELEASED; urgency=low
+wayland (0.1.0~0.2-0ubuntu1) oneiric; urgency=low
 
   * Update to newer snapshot, to eb13ae17 from July 27, 2011
   * debian/rules:

commit ac1b4cb127fcd27df788539b1099384f9d210fd7
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Aug 5 15:23:41 2011 +1000

    Add quilt README.source.
    
    One fewer lintian warning.

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..5dde0bf
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,58 @@
+This package uses quilt to manage all modifications to the upstream
+source.  Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To configure quilt to use debian/patches instead of patches, you want
+either to export QUILT_PATCHES=debian/patches in your environment
+or use this snippet in your ~/.quiltrc:
+
+    for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
+        if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
+                export QUILT_PATCHES=debian/patches
+                break
+        fi
+    done
+
+To get the fully patched source after unpacking the source package, cd to
+the root level of the source package and run:
+
+    quilt push -a
+
+The last patch listed in debian/patches/series will become the current
+patch.
+
+To add a new set of changes, first run quilt push -a, and then run:
+
+    quilt new <patch>
+
+where <patch> is a descriptive name for the patch, used as the filename in
+debian/patches.  Then, for every file that will be modified by this patch,
+run:
+
+    quilt add <file>
+
+before editing those files.  You must tell quilt with quilt add what files
+will be part of the patch before making changes or quilt will not work
+properly.  After editing the files, run:
+
+    quilt refresh
+
+to save the results as a patch.
+
+Alternately, if you already have an external patch and you just want to
+add it to the build system, run quilt push -a and then:
+
+    quilt import -P <patch> /path/to/patch
+    quilt push -a
+
+(add -p 0 to quilt import if needed). <patch> as above is the filename to
+use in debian/patches.  The last quilt push -a will apply the patch to
+make sure it works properly.
+
+To remove an existing patch from the list of patches that will be applied,
+run:
+
+    quilt delete <patch>
+
+You may need to run quilt pop -a to unapply patches first before running
+this command.

commit fd82831f7fc9e072ce51a0721e2499a61134b53c
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Aug 5 15:21:05 2011 +1000

    Add gbp.conf

diff --git a/debian/changelog b/debian/changelog
index cc52908..46496dc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ wayland (0.1.0~0.2-0ubuntu1) UNRELEASED; urgency=low
   * debian/rules:
     - Drop dh_auto_install override.  dh_auto_install automatically installs to
       debian/tmp whenever there are multiple binary packages.
+  * debian/gbp.conf:
+    - Point to ubuntu and upstream-ubuntu branches; use pristine-tar
   
  -- Christopher James Halse Rogers <raof@ubuntu.com>  Thu, 04 Aug 2011 16:45:00 +1000
 
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..8f0d1b4
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,4 @@
+[DEFAULT]
+upstream-branch=upstream-ubuntu
+debian-branch=ubuntu
+pristine-tar=true

commit bfe0e54710d4e1bb08109bad7b252af84deab80b
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Aug 5 15:15:14 2011 +1000

    Import changelog from 0.1.0~0.1-0ubuntu1, which was not in git.
    
    All the changes of this upload have been subsumed in the newer upstream.

diff --git a/debian/changelog b/debian/changelog
index 7726983..cc52908 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-wayland (0.1.0~0.1-0ubuntu1) UNRELEASED; urgency=low
+wayland (0.1.0~0.2-0ubuntu1) UNRELEASED; urgency=low
 
   * Update to newer snapshot, to eb13ae17 from July 27, 2011
   * debian/rules:
@@ -22,6 +22,16 @@ wayland (0.1.0~0.1-0ubuntu1) UNRELEASED; urgency=low
   
  -- Christopher James Halse Rogers <raof@ubuntu.com>  Thu, 04 Aug 2011 16:45:00 +1000
 
+wayland (0.1.0~0.1-0ubuntu1) oneiric; urgency=low
+
+  * Update to newer upstream snapshot aa7bbb21 from June 29, 2011
+    - Patch a56c0455 "Add busy_count and client parameter to wl_buffer"
+      (at least) is required by Ubuntu's 7.11 mesa snapshot.
+    - Other changes flesh out wayland protocol definition,
+      wl_display_remove_global, and a handful of other fixes.
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Wed, 13 Jul 2011 17:51:02 -0700
+
 wayland (0.1.0~0-1ubuntu3) oneiric; urgency=low
 
   * wayland.lintian-overrides: libwayland-client and libwayland-server are

commit 0602d7ad026b66008b3c54b76cf76f60b08e9fc8
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Aug 5 14:11:20 2011 +1000

    debian/copyright: Gentle cleaning.
    
    Factor out X11 license from wayland/* and debian/*.
    Add protocol/* to this license class.
    
    Name the wayland/wayland-hash.c license as MIT2; it's one of the (stupidly many)
    MIT licenses floating around.

diff --git a/debian/copyright b/debian/copyright
index 976ab3c..1993fcc 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -6,29 +6,16 @@ Last-Updated: 98d8256b8e67a417eebc314440716e66926adf92
 
 Files: debian/*
 Copyright: © 2011 Cyril Brulebois <kibi@debian.org>
-License:
- Permission to use, copy, modify, distribute, and sell this software and its
- documentation for any purpose is hereby granted without fee, provided that
- the above copyright notice appear in all copies and that both that copyright
- notice and this permission notice appear in supporting documentation, and
- that the name of the copyright holders not be used in advertising or
- publicity pertaining to distribution of the software without specific,
- written prior permission.  The copyright holders make no representations
- about the suitability of this software for any purpose.  It is provided "as
- is" without express or implied warranty.
- .
- THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- OF THIS SOFTWARE.
+License: X11
 
 Files: wayland/*
+Files: protocol/*
 Copyright: © 2008-2011 Kristian Høgsberg <krh@bitplanet.net>
            © 2011 Benjamin Franzke <benjaminfranzke@googlemail.com>
-License:
+	   © 2010-2011 Intel Corporation
+License: X11
+
+License: X11
  Permission to use, copy, modify, distribute, and sell this software and its
  documentation for any purpose is hereby granted without fee, provided that
  the above copyright notice appear in all copies and that both that copyright
@@ -66,7 +53,7 @@ License: GPL-2+
 Files: wayland/wayland-hash.c
 Copyright: © 2009 Intel Corporation
            © 1988-2004 Keith Packard and Bart Massey.
-License:
+License: MIT2
  Permission is hereby granted, free of charge, to any person obtaining a
  copy of this software and associated documentation files (the "Software"),
  to deal in the Software without restriction, including without limitation

commit c0262ef5f2e206b1f9e95172e11795e67b12de21
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Aug 5 11:16:26 2011 +1000

    Replace debian/copyright Format-Specification with final format URL

diff --git a/debian/copyright b/debian/copyright
index 95f5e02..976ab3c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,4 +1,4 @@
-Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=166
+Format-Specification: http://dep.debian.net/deps/dep5/
 Upstream-Name: wayland
 Upstream-Contact: Kristian Høgsberg <krh@bitplanet.net>
 Source: http://cgit.freedesktop.org/wayland/wayland

commit 92129c9ad127448786b25d859a41818c719ae358
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Aug 5 11:03:03 2011 +1000

    Drop unnecessary dh_auto_install override

diff --git a/debian/changelog b/debian/changelog
index df5174d..7726983 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,9 @@ wayland (0.1.0~0.1-0ubuntu1) UNRELEASED; urgency=low
     - Rename to libwayland0.lintian-overrides and fix contents to refer to
       the actual package these overrides apply to.  Package-name-is-not-SONAME
       warning is now successfully suppressed.
+  * debian/rules:
+    - Drop dh_auto_install override.  dh_auto_install automatically installs to
+      debian/tmp whenever there are multiple binary packages.
   
  -- Christopher James Halse Rogers <raof@ubuntu.com>  Thu, 04 Aug 2011 16:45:00 +1000
 
diff --git a/debian/rules b/debian/rules
index fda0015..f3a5acc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,10 +3,6 @@
 SOURCE=wayland
 PACKAGE=libwayland0
 
-# Install in debian/tmp to retain control through dh_install:
-override_dh_auto_install:
-	dh_auto_install --destdir=debian/tmp
-
 # Kill *.la files, and forget no-one:
 override_dh_install:
 	find debian/tmp -name '*.la' -delete

commit b0efd945db0f0606b6cb48e8b121c425063428a8
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Aug 5 10:44:09 2011 +1000

    Correctly suppress pkgname-doesn't-match-SONAME lintian warning

diff --git a/debian/changelog b/debian/changelog
index c5f452c..df5174d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,7 +12,11 @@ wayland (0.1.0~0.1-0ubuntu1) UNRELEASED; urgency=low
     - Switch to compat 9 and build for multiarch.
   * debian/source.lintian-overrides:
     - Silence lintian's warning that compat 9 is subject to change.  We know.
-
+  * debian/wayland.lintian-overrides:
+    - Rename to libwayland0.lintian-overrides and fix contents to refer to
+      the actual package these overrides apply to.  Package-name-is-not-SONAME
+      warning is now successfully suppressed.
+  
  -- Christopher James Halse Rogers <raof@ubuntu.com>  Thu, 04 Aug 2011 16:45:00 +1000
 
 wayland (0.1.0~0-1ubuntu3) oneiric; urgency=low
diff --git a/debian/libwayland0.lintian-overrides b/debian/libwayland0.lintian-overrides
new file mode 100644
index 0000000..b63e8d1
--- /dev/null
+++ b/debian/libwayland0.lintian-overrides
@@ -0,0 +1 @@
+libwayland0: package-name-doesnt-match-sonames libwayland-client0 libwayland-server0
diff --git a/debian/wayland.lintian-overrides b/debian/wayland.lintian-overrides
deleted file mode 100644
index 7809072..0000000
--- a/debian/wayland.lintian-overrides
+++ /dev/null
@@ -1 +0,0 @@
-wayland: package-name-doesnt-match-sonames libwayland-client0 libwayland-server0

commit 768e4d0a6e6688ac5b7d7a87406f7d83814d738d
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Thu Aug 4 18:11:29 2011 +1000

    Build for multiarch

diff --git a/debian/changelog b/debian/changelog
index 0f43715..c5f452c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,13 @@ wayland (0.1.0~0.1-0ubuntu1) UNRELEASED; urgency=low
     - Switch the gentarball target to generate tarball from upstream-ubuntu.
   * debian/libwayland0.symbols:
     - Add extra symbols in new snapshot.
+  * debian/control:
+  * debian/libwayland0.install:
+  * debian/libwayland-dev.install:
+  * debian/compat:
+    - Switch to compat 9 and build for multiarch.
+  * debian/source.lintian-overrides:
+    - Silence lintian's warning that compat 9 is subject to change.  We know.
 
  -- Christopher James Halse Rogers <raof@ubuntu.com>  Thu, 04 Aug 2011 16:45:00 +1000
 
diff --git a/debian/compat b/debian/compat
index 45a4fb7..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/debian/control b/debian/control
index e54a97e..96f1dc6 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
 XSBC-Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
 Uploaders: Cyril Brulebois <kibi@debian.org>
 Build-Depends:
- debhelper (>= 8),
+ debhelper (>= 8.1.3),
  quilt,
  dh-autoreconf,
  pkg-config,
@@ -22,6 +22,8 @@ Architecture: amd64 i386 armel
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
 Replaces: libwayland-server0, libwayland-client0
 Conflicts: libwayland-server0, libwayland-client0
 Description: wayland compositor infrastructure - shared libraries
diff --git a/debian/libwayland-dev.install b/debian/libwayland-dev.install
index 80a170f..02534df 100644
--- a/debian/libwayland-dev.install
+++ b/debian/libwayland-dev.install
@@ -5,11 +5,11 @@ usr/bin/wayland-scanner
 usr/include
 
 # Use no wildcards to ensure we spot any update:
-usr/lib/libwayland-client.a
-usr/lib/libwayland-client.so
-usr/lib/libwayland-server.a
-usr/lib/libwayland-server.so
-usr/lib/pkgconfig/wayland-client.pc
-usr/lib/pkgconfig/wayland-server.pc
+usr/lib/*/libwayland-client.a
+usr/lib/*/libwayland-client.so
+usr/lib/*/libwayland-server.a
+usr/lib/*/libwayland-server.so
+usr/lib/*/pkgconfig/wayland-client.pc
+usr/lib/*/pkgconfig/wayland-server.pc
 usr/share/aclocal/wayland-scanner.m4
 usr/share/aclocal/wayland-scanner.mk
diff --git a/debian/libwayland0.install b/debian/libwayland0.install
index 50d39f7..96fd067 100644
--- a/debian/libwayland0.install
+++ b/debian/libwayland0.install
@@ -1,5 +1,5 @@
 # Use no wildcards to ensure we spot any update:
-usr/lib/libwayland-client.so.0
-usr/lib/libwayland-client.so.0.0.0
-usr/lib/libwayland-server.so.0
-usr/lib/libwayland-server.so.0.0.0
+usr/lib/*/libwayland-client.so.0
+usr/lib/*/libwayland-client.so.0.0.0
+usr/lib/*/libwayland-server.so.0
+usr/lib/*/libwayland-server.so.0.0.0
diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides
new file mode 100644
index 0000000..4c9ca41
--- /dev/null
+++ b/debian/source.lintian-overrides
@@ -0,0 +1 @@
+package-needs-versioned-debhelper-build-depends 9

commit edc01aab6fc9ac6b0948b89137569607c21d8dd6
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Thu Aug 4 17:33:33 2011 +1000

    New upstream version, switch to upstream-ubuntu for gentarball

diff --git a/debian/changelog b/debian/changelog
index cb691db..0f43715 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+wayland (0.1.0~0.1-0ubuntu1) UNRELEASED; urgency=low
+
+  * Update to newer snapshot, to eb13ae17 from July 27, 2011
+  * debian/rules:
+    - Switch the gentarball target to generate tarball from upstream-ubuntu.
+  * debian/libwayland0.symbols:
+    - Add extra symbols in new snapshot.
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com>  Thu, 04 Aug 2011 16:45:00 +1000
+
 wayland (0.1.0~0-1ubuntu3) oneiric; urgency=low
 
   * wayland.lintian-overrides: libwayland-client and libwayland-server are
diff --git a/debian/libwayland0.symbols.in b/debian/libwayland0.symbols.in
index c31ec59..8720699 100644
--- a/debian/libwayland0.symbols.in
+++ b/debian/libwayland0.symbols.in
@@ -54,6 +54,7 @@ libwayland-server.so.0 libwayland0 @@currentversion@@
  wl_client_add_resource@Base 0.1.0~0
  wl_client_create@Base 0.1.0~0
  wl_client_destroy@Base 0.1.0~0
+ wl_client_flush@Base 0.1.0~0.1
  wl_client_get_display@Base 0.1.0~0
  wl_client_post_error@Base 0.1.0~0
  wl_client_post_event@Base 0.1.0~0
@@ -69,6 +70,7 @@ libwayland-server.so.0 libwayland0 @@currentversion@@
  wl_display_get_event_loop@Base 0.1.0~0
  wl_display_interface@Base 0.1.0~0
  wl_display_post_frame@Base 0.1.0~0
+ wl_display_remove_global@Base 0.1.0~0.1
  wl_display_run@Base 0.1.0~0
  wl_display_terminate@Base 0.1.0~0
  wl_drag_interface@Base 0.1.0~0
diff --git a/debian/rules b/debian/rules
index 57e861b..fda0015 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,4 +29,4 @@ override_dh_strip:
 # For maintainer use only, generate a tarball:
 gentarball: UV=$(shell dpkg-parsechangelog|awk '/^Version:/ {print $$2}'|sed 's/-.*$$//')
 gentarball:
-	git archive --format=tar upstream-experimental --prefix=$(SOURCE)-$(UV)/ | gzip -9 > ../$(SOURCE)_$(UV).orig.tar.gz
+	git archive --format=tar upstream-ubuntu --prefix=$(SOURCE)-$(UV)/ | gzip -9 > ../$(SOURCE)_$(UV).orig.tar.gz

commit eb13ae17b41dea24000e8ff78b762b20c1fdf23b
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Wed Jul 27 05:50:41 2011 -0700

    scanner: Initialize protocol.copyright to NULL

diff --git a/wayland/scanner.c b/wayland/scanner.c
index 9248edb..dff63de 100644
--- a/wayland/scanner.c
+++ b/wayland/scanner.c
@@ -824,6 +824,7 @@ int main(int argc, char *argv[])
 	wl_list_init(&protocol.interface_list);
 	protocol.type_index = 0;
 	protocol.null_run_length = 0;
+	protocol.copyright = NULL;
 	ctx.protocol = &protocol;
 
 	ctx.filename = "<stdin>";

commit 7a291117e7ff1c8f817242b9b223e600a0a9e3c8
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date:   Tue Jul 26 11:43:19 2011 +0300

    protocol: Delete screenshooter.xml
    
    The protocol interface is on compositor's side now.
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>

diff --git a/protocol/screenshooter.xml b/protocol/screenshooter.xml
deleted file mode 100644
index f8d993d..0000000
--- a/protocol/screenshooter.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<protocol name="screenshooter">
-
-  <interface name="screenshooter" version="1">
-    <request name="shoot"/>
-  </interface>
-
-</protocol>

commit 986703ac7365bc87a5501714adb9fc73157c62b7
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jul 25 18:14:20 2011 -0700

    scanner: Take copyright notice from xml file

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 79bb3ea..92377c4 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -1,6 +1,32 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <protocol name="wayland">
 
+  <copyright>
+    Copyright © 2008-2011 Kristian Høgsberg
+    Copyright © 2010-2011 Intel Corporation
+
+    Permission to use, copy, modify, distribute, and sell this
+    software and its documentation for any purpose is hereby granted
+    without fee, provided that\n the above copyright notice appear in
+    all copies and that both that copyright notice and this permission
+    notice appear in supporting documentation, and that the name of
+    the copyright holders not be used in advertising or publicity
+    pertaining to distribution of the software without specific,
+    written prior permission.  The copyright holders make no
+    representations about the suitability of this software for any
+    purpose.  It is provided "as is" without express or implied
+    warranty.
+
+    THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+    SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+    FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+    SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+    AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+    THIS SOFTWARE.
+  </copyright>
+
   <!-- The core global object. This is a special singleton object.
        It is used for internal wayland protocol features. -->
   <interface name="wl_display" version="1">
diff --git a/wayland/scanner.c b/wayland/scanner.c
index 300e39d..9248edb 100644
--- a/wayland/scanner.c
+++ b/wayland/scanner.c
@@ -24,29 +24,6 @@
 
 #include "wayland-util.h"
 
-static const char copyright[] =
-	"/*\n"
-	" * Copyright © 2010 Kristian Høgsberg\n"
-	" *\n"
-	" * Permission to use, copy, modify, distribute, and sell this software and its\n"
-	" * documentation for any purpose is hereby granted without fee, provided that\n"
-	" * the above copyright notice appear in all copies and that both that copyright\n"
-	" * notice and this permission notice appear in supporting documentation, and\n"
-	" * that the name of the copyright holders not be used in advertising or\n"
-	" * publicity pertaining to distribution of the software without specific,\n"
-	" * written prior permission.  The copyright holders make no representations\n"
-	" * about the suitability of this software for any purpose.  It is provided \"as\n"
-	" * is\" without express or implied warranty.\n"
-	" *\n"
-	" * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\n"
-	" * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO\n"
-	" * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR\n"
-	" * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,\n"
-	" * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n"
-	" * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE\n"
-	" * OF THIS SOFTWARE.\n"
-	" */\n";
-
 static int
 usage(int ret)
 {
@@ -62,6 +39,7 @@ struct protocol {
 	struct wl_list interface_list;
 	int type_index;
 	int null_run_length;
+	char *copyright;
 };
 
 struct interface {
@@ -123,6 +101,8 @@ struct parse_context {
 	struct interface *interface;
 	struct message *message;
 	struct enumeration *enumeration;
+	char character_data[8192];
+	int character_data_length;
 };
 
 static char *
@@ -177,12 +157,15 @@ start_element(void *data, const char *element_name, const char **atts)
 			interface_name = atts[i + 1];
 	}
 
+	ctx->character_data_length = 0;
 	if (strcmp(element_name, "protocol") == 0) {
 		if (name == NULL)
 			fail(ctx, "no protocol name given");
 
 		ctx->protocol->name = strdup(name);
 		ctx->protocol->uppercase_name = uppercase_dup(name);
+	} else if (strcmp(element_name, "copyright") == 0) {
+		
 	} else if (strcmp(element_name, "interface") == 0) {
 		if (name == NULL)
 			fail(ctx, "no interface name given");
@@ -281,6 +264,32 @@ start_element(void *data, const char *element_name, const char **atts)
 }
 
 static void
+end_element(void *data, const XML_Char *name)
+{
+	struct parse_context *ctx = data;
+
+	if (strcmp(name, "copyright") == 0) {
+		ctx->protocol->copyright =
+			strndup(ctx->character_data,
+				ctx->character_data_length);
+	}
+}
+
+static void
+character_data(void *data, const XML_Char *s, int len)
+{
+	struct parse_context *ctx = data;
+
+	if (ctx->character_data_length + len > sizeof (ctx->character_data)) {
+		fprintf(stderr, "too much character data");
+		exit(EXIT_FAILURE);
+	    }
+
+	memcpy(ctx->character_data + ctx->character_data_length, s, len);
+	ctx->character_data_length += len;
+}
+
+static void
 emit_opcodes(struct wl_list *message_list, struct interface *interface)
 {
 	struct message *m;
@@ -550,6 +559,28 @@ emit_structs(struct wl_list *message_list, struct interface *interface)
 	}
 }
 
+static void
+format_copyright(const char *copyright)
+{
+	int bol = 1, start, i;
+
+	for (i = 0; copyright[i]; i++) {
+		if (bol && (copyright[i] == ' ' || copyright[i] == '\t')) {
+			continue;
+		} else if (bol) {
+			bol = 0;
+			start = i;
+		}
+
+		if (copyright[i] == '\n' || copyright[i] == '\0') {
+			printf("%s %.*s\n",
+			       i == 0 ? "/*" : " *",
+			       i - start, copyright + start);
+			bol = 1;
+		}
+	}
+	printf(" */\n\n");
+}
 
 static void
 emit_header(struct protocol *protocol, int server)
@@ -557,8 +588,10 @@ emit_header(struct protocol *protocol, int server)
 	struct interface *i;
 	const char *s = server ? "SERVER" : "CLIENT";
 
-	printf("%s\n\n"
-	       "#ifndef %s_%s_PROTOCOL_H\n"
+	if (protocol->copyright)
+		format_copyright(protocol->copyright);
+
+	printf("#ifndef %s_%s_PROTOCOL_H\n"
 	       "#define %s_%s_PROTOCOL_H\n"
 	       "\n"
 	       "#ifdef  __cplusplus\n"
@@ -569,7 +602,6 @@ emit_header(struct protocol *protocol, int server)
 	       "#include <stddef.h>\n"
 	       "#include \"wayland-util.h\"\n\n"
 	       "struct wl_client;\n\n",
-	       copyright,
 	       protocol->uppercase_name, s,
 	       protocol->uppercase_name, s);
 
@@ -732,11 +764,12 @@ emit_code(struct protocol *protocol)
 {
 	struct interface *i;
 
-	printf("%s\n\n"
-	       "#include <stdlib.h>\n"
+	if (protocol->copyright)
+		format_copyright(protocol->copyright);
+
+	printf("#include <stdlib.h>\n"
 	       "#include <stdint.h>\n"
-	       "#include \"wayland-util.h\"\n\n",
-	       copyright);
+	       "#include \"wayland-util.h\"\n\n");
 
 	wl_list_for_each(i, &protocol->interface_list, link) {
 		emit_types_forward_declarations(protocol, &i->request_list);
@@ -801,7 +834,9 @@ int main(int argc, char *argv[])
 		exit(EXIT_FAILURE);
 	}
 
-	XML_SetElementHandler(ctx.parser, start_element, NULL);
+	XML_SetElementHandler(ctx.parser, start_element, end_element);
+	XML_SetCharacterDataHandler(ctx.parser, character_data);
+
 	do {
 		buf = XML_GetBuffer(ctx.parser, XML_BUFFER_SIZE);
 		len = fread(buf, 1, XML_BUFFER_SIZE, stdin);

commit 64732b01e4e9720eaef181c631d94a509a73dc65
Author: Kristian Høgsberg <krh@localhost.localdomain>
Date:   Tue Jul 19 10:01:46 2011 -0700

    connection: Use static strings instead of sprintf and buffer overflow
    
    Spotted by Samuel Rødal <samuel.rodal@nokia.com>

diff --git a/wayland/connection.c b/wayland/connection.c
index af9a90e..467a2d0 100644
--- a/wayland/connection.c
+++ b/wayland/connection.c
@@ -692,20 +692,16 @@ void
 wl_closure_print(struct wl_closure *closure, struct wl_object *target, int send)
 {
 	union wl_value *value;
-	char buffer[4] = "\0";
 	int i;
 	struct timespec tp;
 	unsigned int time;
 
-	if (send)
-		sprintf(buffer, " -> ");
-
 	clock_gettime(CLOCK_REALTIME, &tp);
 	time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
 
 	fprintf(stderr, "[%10.3f] %s%s@%d.%s(",
 		time / 1000.0,
-		buffer,
+		send ? " -> " : "",
 		target->interface->name, target->id,
 		closure->message->name);
 

commit f9b3c151459c1627ea971d6539f706e868b89ef4
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jul 18 13:35:18 2011 -0400

    Link to -lrt for clock_gettime()

diff --git a/wayland/Makefile.am b/wayland/Makefile.am
index fd79eb3..8a73cd3 100644
--- a/wayland/Makefile.am
+++ b/wayland/Makefile.am
@@ -16,14 +16,14 @@ libwayland_util_la_SOURCES =			\
 	wayland-util.h				\
 	wayland-hash.c
 
-libwayland_server_la_LIBADD = $(FFI_LIBS) libwayland-util.la
+libwayland_server_la_LIBADD = $(FFI_LIBS) libwayland-util.la -lrt
 libwayland_server_la_SOURCES =			\
 	wayland-protocol.c			\
 	wayland-server.c			\
 	wayland-shm.c				\
 	event-loop.c
 
-libwayland_client_la_LIBADD = $(FFI_LIBS) libwayland-util.la
+libwayland_client_la_LIBADD = $(FFI_LIBS) libwayland-util.la -lrt
 libwayland_client_la_SOURCES =			\
 	wayland-protocol.c			\
 	wayland-client.c

commit c86ba825c474bbbd9e95bcdbc2b8b577d24322fe
Author: Casey Dahlin <cdahlin@redhat.com>
Date:   Mon Jul 18 02:00:25 2011 -0400

    Pass object ID not pointer when sending a global announce event
    
    When the type for the first argument of the global event changed from new_id to
    uint, wl_connection_vmarshal started expecting an integer argument rather than
    an object argument. As a result we were sending the client a chunk of pointer
    rather than a useful global identifier.

diff --git a/wayland/wayland-server.c b/wayland/wayland-server.c
index d4fdfc7..2019cb4 100644
--- a/wayland/wayland-server.c
+++ b/wayland/wayland-server.c
@@ -313,7 +313,7 @@ wl_client_post_global(struct wl_client *client, struct wl_object *object)
 	wl_client_post_event(client,
 			     &client->display->object,
 			     WL_DISPLAY_GLOBAL,
-			     object,
+			     object->id,
 			     object->interface->name,
 			     object->interface->version);
 }

commit a8db57befa3263c6de24fd9762a4aec3b564d4d3
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jul 18 13:10:49 2011 -0400

    conection: Handle demarshal errors a little less dramatically

diff --git a/wayland/connection.c b/wayland/connection.c
index 4f6a845..af9a90e 100644
--- a/wayland/connection.c
+++ b/wayland/connection.c
@@ -509,13 +509,17 @@ wl_connection_demarshal(struct wl_connection *connection,
 	count = strlen(message->signature) + 2;
 	if (count > ARRAY_LENGTH(closure->types)) {
 		printf("too many args (%d)\n", count);
-		assert(0);
+		errno = EINVAL;
+		wl_connection_consume(connection, size);
+		return NULL;
 	}
 
 	extra_space = wl_message_size_extra(message);
 	if (sizeof closure->buffer < size + extra_space) {
 		printf("request too big, should malloc tmp buffer here\n");
-		assert(0);
+		errno = ENOMEM;
+		wl_connection_consume(connection, size);
+		return NULL;
 	}
 
 	closure->message = message;

commit 728d09936f76ce60090e0fd0505b0522d03dd535
Author: Casey Dahlin <cdahlin@redhat.com>
Date:   Mon Jul 18 02:00:24 2011 -0400

    Fix segfault in client when demarshalling fails

diff --git a/wayland/wayland-client.c b/wayland/wayland-client.c
index ce27a90..9d1f66b 100644
--- a/wayland/wayland-client.c
+++ b/wayland/wayland-client.c
@@ -521,6 +521,11 @@ handle_event(struct wl_display *display,
 	closure = wl_connection_demarshal(display->connection,
 					  size, display->objects, message);
 
+	if (closure == NULL) {
+		fprintf(stderr, "Error demarshalling event: %m\n");
+		abort();
+	}
+
 	if (wl_debug)
 		wl_closure_print(closure, &proxy->object, false);
 

commit 068ba750caebb62aaef20ac3452ce23e066c7239
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date:   Thu Jul 14 18:56:51 2011 +0300

    protocol: fix key event and related comments

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index fec9135..79bb3ea 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -10,9 +10,9 @@
       <arg name="version" type="uint"/>
     </request>
 
-    <!-- sync is an just an echo, which will reply with a sync event.
+    <!-- sync is an just an echo, which will reply with a key event.
          Since requests are handled in-order, this can be used as a
-         barrier to ensure all previous requests have ben handled.
+         barrier to ensure all previous requests have been handled.
          The key argument can be used to correlate between multiple
          sync invocations. -->
     <request name="sync">
@@ -70,7 +70,7 @@
     <!-- A reply to the frame or sync request.  The key is the one
          used in the request.  time is in millisecond units, and
          denotes the time when the frame was posted on the
-         display. time can be used to estimaate frame rate, determine
+         display. time can be used to estimate frame rate, determine
          how much to advance animations and compensate for jitter. -->
     <event name="key">
       <arg name="key" type="uint"/>

commit a9ef785cf83731b82334b22894dd01ee6ada66c8
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date:   Thu Jul 14 18:56:40 2011 +0300

    debug: add timestamps when logging
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>

diff --git a/wayland/connection.c b/wayland/connection.c
index 0f2051a..4f6a845 100644
--- a/wayland/connection.c
+++ b/wayland/connection.c
@@ -34,6 +34,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <time.h>
 
 #include "wayland-util.h"
 #include "connection.h"
@@ -684,12 +685,23 @@ wl_closure_send(struct wl_closure *closure, struct wl_connection *connection)
 }
 
 void
-wl_closure_print(struct wl_closure *closure, struct wl_object *target)
+wl_closure_print(struct wl_closure *closure, struct wl_object *target, int send)
 {
 	union wl_value *value;
+	char buffer[4] = "\0";
 	int i;
+	struct timespec tp;
+	unsigned int time;
 
-	fprintf(stderr, "%s@%d.%s(",
+	if (send)
+		sprintf(buffer, " -> ");
+
+	clock_gettime(CLOCK_REALTIME, &tp);
+	time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
+
+	fprintf(stderr, "[%10.3f] %s%s@%d.%s(",
+		time / 1000.0,
+		buffer,
 		target->interface->name, target->id,
 		closure->message->name);
 
diff --git a/wayland/connection.h b/wayland/connection.h
index 413977d..5f4588b 100644
--- a/wayland/connection.h
+++ b/wayland/connection.h
@@ -61,7 +61,7 @@ wl_closure_invoke(struct wl_closure *closure,
 void
 wl_closure_send(struct wl_closure *closure, struct wl_connection *connection);
 void
-wl_closure_print(struct wl_closure *closure, struct wl_object *target);


Reply to: