Hello community, here is the log from the commit of package wayland for openSUSE:Factory checked in at 2018-09-11 17:11:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wayland (Old) and /work/SRC/openSUSE:Factory/.wayland.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wayland" Tue Sep 11 17:11:44 2018 rev:36 rq:631746 version:1.16.0 Changes: -------- --- /work/SRC/openSUSE:Factory/wayland/wayland.changes 2018-08-20 16:17:50.728689267 +0200 +++ /work/SRC/openSUSE:Factory/.wayland.new/wayland.changes 2018-09-11 17:11:48.151919134 +0200 @@ -1,0 +2,8 @@ +Sat Aug 25 17:24:13 UTC 2018 - jeng...@inai.de + +- Update to new upstream release 1.16 + * The client definition of wl_global is removed. + * Some long standing oddness has been fixed with destroy signals. + * The code generator now supports referencing foreign enums. + +------------------------------------------------------------------- Old: ---- wayland-1.15.0.tar.xz wayland-1.15.0.tar.xz.sig New: ---- wayland-1.16.0.tar.xz wayland-1.16.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wayland.spec ++++++ --- /var/tmp/diff_new_pack.7GE2WU/_old 2018-09-11 17:11:48.703918278 +0200 +++ /var/tmp/diff_new_pack.7GE2WU/_new 2018-09-11 17:11:48.703918278 +0200 @@ -18,7 +18,7 @@ %define lname libwayland0 Name: wayland -Version: 1.15.0 +Version: 1.16.0 Release: 0 Summary: Wayland Compositor Infrastructure License: MIT ++++++ wayland-1.15.0.tar.xz -> wayland-1.16.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/CONTRIBUTING.md new/wayland-1.16.0/CONTRIBUTING.md --- old/wayland-1.15.0/CONTRIBUTING.md 1970-01-01 01:00:00.000000000 +0100 +++ new/wayland-1.16.0/CONTRIBUTING.md 2018-08-24 20:04:36.000000000 +0200 @@ -0,0 +1,347 @@ +Contributing to Wayland +======================= + +Sending patches +--------------- + +Patches should be sent to **wayland-de...@lists.freedesktop.org**, using +`git send-email`. See [git documentation] for help. + +The first line of a commit message should contain a prefix indicating +what part is affected by the patch followed by one sentence that +describes the change. For examples: + + protocol: Support scaled outputs and surfaces + +and + + doc: generate server documentation from XML too + +If in doubt what prefix to use, look at other commits that change the +same file(s) as the patch being sent. + +The body of the commit message should describe what the patch changes +and why, and also note any particular side effects. This shouldn't be +empty on most of the cases. It shouldn't take a lot of effort to write +a commit message for an obvious change, so an empty commit message +body is only acceptable if the questions "What?" and "Why?" are already +answered on the one-line summary. + +The lines of the commit message should have at most 76 characters, to +cope with the way git log presents them. + +See [notes on commit messages] for a recommended reading on writing commit +messages. + +Your patches should also include a Signed-off-by line with your name and +email address. If you're not the patch's original author, you should +also gather S-o-b's by them (and/or whomever gave the patch to you.) The +significance of this is that it certifies that you created the patch, +that it was created under an appropriate open source license, or +provided to you under those terms. This lets us indicate a chain of +responsibility for the copyright status of the code. + +We won't reject patches that lack S-o-b, but it is strongly recommended. + +When you re-send patches, revised or not, it would be very good to document the +changes compared to the previous revision in the commit message and/or the +cover letter. If you have already received Reviewed-by or Acked-by tags, you +should evaluate whether they still apply and include them in the respective +commit messages. Otherwise the tags may be lost, reviewers miss the credit they +deserve, and the patches may cause redundant review effort. + + +Tracking patches and following up +--------------------------------- + +[Wayland Patchwork](http://patchwork.freedesktop.org/project/wayland/list/) is +used for tracking patches to Wayland. Xwayland patches are tracked with the +[Xorg project](https://patchwork.freedesktop.org/project/Xorg/list/) +instead. Weston uses +[GitLab merge requests](https://gitlab.freedesktop.org/wayland/weston/merge_requests) +for code review, and does not use mailing list review at all. + +Libinput patches, even though they use the same mailing list as +Wayland, are not tracked in the Wayland Patchwork. + +The following applies only to Wayland. + +If a patch is not found in Patchwork, there is a high possibility for it to be +forgotten. Patches attached to bug reports or not arriving to the mailing list +because of e.g. subscription issues will not be in Patchwork because Patchwork +only collects patches sent to the list. + +When you send a revised version of a patch, it would be very nice to mark your +old patch as superseded (or rejected, if that is applicable). You can change +the status of your own patches by registering to Patchwork - ownership is +identified by email address you use to register. Updating your patch status +appropriately will help maintainer work. + +The following patch states are found in Patchwork: + +- **New**: + Patches under discussion or not yet processed. + +- **Under review**: + Mostly unused state. + +- **Accepted**: + The patch is merged in the master branch upstream, as is or slightly + modified. + +- **Rejected**: + The idea or approach is rejected and cannot be fixed by revising + the patch. + +- **RFC**: + Request for comments, not meant to be merged as is. + +- **Not applicable**: + The email was not actually a patch, or the patch is not for Wayland. + Libinput patches are usually automatically ignored by Wayland + Patchwork, but if they get through, they will be marked as Not + applicable. + +- **Changes requested**: + Reviewers determined that changes to the patch are needed. The + submitter is expected to send a revised version. (You should + not wait for your patch to be set to this state before revising, + though.) + +- **Awaiting upstream**: + Mostly unused as the patch is waiting for upstream actions but + is not shown in the default list, which means it is easy to + overlook. + +- **Superseded**: + A revised version of the patch has been submitted. + +- **Deferred**: + Used mostly during freeze periods before releases, to temporarily + hide patches that cannot be merged during a freeze. + +Note, that in the default listing, only patches in *New* or *Under review* are +shown. + +There is also a command line interface to Patchwork called `pwclient`, see +http://patchwork.freedesktop.org/project/wayland/ +for links where to get it and the sample `.pwclientrc` for Wayland. + + +Coding style +------------ + +You should follow the style of the file you're editing. In general, we +try to follow the rules below. + +**Note: this file uses spaces due to markdown rendering issues for tabs. + Code must be implemented using tabs.** + +- indent with tabs, and a tab is always 8 characters wide +- opening braces are on the same line as the if statement; +- no braces in an if-body with just one statement; +- if one of the branches of an if-else condition has braces, then the + other branch should also have braces; +- there is always an empty line between variable declarations and the + code; + +```c +static int +my_function(void) +{ + int a = 0; + + if (a) + b(); + else + c(); + + if (a) { + b(); + c(); + } else { + d(); + } +} +``` + +- lines should be less than 80 characters wide; +- when breaking lines with functions calls, the parameters are aligned + with the opening parentheses; +- when assigning a variable with the result of a function call, if the + line would be longer we break it around the equal '=' sign if it makes + sense; + +```c + long_variable_name = + function_with_a_really_long_name(parameter1, parameter2, + parameter3, parameter4); + + x = function_with_a_really_long_name(parameter1, parameter2, + parameter3, parameter4); +``` + +Conduct +======= + +As a freedesktop.org project, Wayland follows the Contributor Covenant, +found at: +https://www.freedesktop.org/wiki/CodeOfConduct + +Please conduct yourself in a respectful and civilised manner when +interacting with community members on mailing lists, IRC, or bug +trackers. The community represents the project as a whole, and abusive +or bullying behaviour is not tolerated by the project. + + +Licensing +========= + +Wayland is licensed with the intention to be usable anywhere X.org is. +Originally, X.org was covered under the MIT X11 license, but changed to +the MIT Expat license. Similarly, Wayland was covered initially as MIT +X11 licensed, but changed to the MIT Expat license, following in X.org's +footsteps. Other than wording, the two licenses are substantially the +same, with the exception of a no-advertising clause in X11 not included +in Expat. + +New source code files should specify the MIT Expat license in their +boilerplate, as part of the copyright statement. + + +Review +====== + +All patches, even trivial ones, require at least one positive review +(Reviewed-by). Additionally, if no Reviewed-by's have been given by +people with commit access, there needs to be at least one Acked-by from +someone with commit access. A person with commit access is expected to be +able to evaluate the patch with respect to the project scope and architecture. + +The below review guidelines are intended to be interpreted in spirit, not by +the letter. There may be circumstances where some guidelines are better +ignored. We rely very much on the judgement of reviewers and commit rights +holders. + +During review, the following matters should be checked: + +- The commit message explains why the change is being made. + +- The code fits the project's scope. + +- The code license is the same MIT licence the project generally uses. + +- Stable ABI or API is not broken. + +- Stable ABI or API additions must be justified by actual use cases, not only +by speculation. They must also be documented, and it is strongly recommended to +include tests excercising the additions in the test suite. + +- The code fits the existing software architecture, e.g. no layering +violations. + +- The code is correct and does not introduce new failures for existing users, +does not add new corner-case bugs, and does not introduce new compiler +warnings. + +- The patch does what it says in the commit message and changes nothing else. + +- The patch is a single logical change. If the commit message addresses +multiple points, it is a hint that the commit might need splitting up. + +- A bug fix should target the underlying root cause instead of hiding symptoms. +If a complete fix is not practical, partial fixes are acceptable if they come +with code comments and filed Gitlab issues for the remaining bugs. + +- The bug root cause rule applies to external software components as well, e.g. +do not work around kernel driver issues in userspace. + +- The test suite passes. + +- The code does not depend on API or ABI which has no working free open source +implementation. + +- The code is not dead or untestable. E.g. if there are no free open source +software users for it then it is effectively dead code. + +- The code is written to be easy to understand, or if code cannot be clear +enough on its own there are code comments to explain it. + +- The code is minimal, i.e. prefer refactor and re-use when possible unless +clarity suffers. + +- The code adheres to the style guidelines. + +- In a patch series, every intermediate step adheres to the above guidelines. + + +Commit rights +============= + +Commit rights will be granted to anyone who requests them and fulfills the +below criteria: + +- Submitted some (10 as a rule of thumb) non-trivial (not just simple + spelling fixes and whitespace adjustment) patches that have been merged + already. + +- Are actively participating in public discussions about their work (on the + mailing list or IRC). This should not be interpreted as a requirement to + review other peoples patches but just make sure that patch submission isn't + one-way communication. Cross-review is still highly encouraged. + +- Will be regularly contributing further patches. This includes regular + contributors to other parts of the open source graphics stack who only + do the occasional development in this project. + +- Agrees to use their commit rights in accordance with the documented merge + criteria, tools, and processes. + +To apply for commit rights, create a new issue in gitlab for the respective +project and give it the "accounts" label. + +Committers are encouraged to request their commit rights get removed when they +no longer contribute to the project. Commit rights will be reinstated when they +come back to the project. + +Maintainers and committers should encourage contributors to request commit +rights, especially junior contributors tend to underestimate their skills. + + +Stabilising for releases +======================== + +A release cycle ends with a stable release which also starts a new cycle and +lifts any code freezes. Gradual code freezing towards a stable release starts +with an alpha release. The release stages of a cycle are: + +- **Alpha release**: + Signified by version number #.#.91. + Major features must have landed before this. Major features include + invasive code motion and refactoring, high risk changes, and new stable + library ABI. + +- **Beta release**: + Signified by version number #.#.92. + Minor features must have landed before this. Minor features include all + new features that are not major, low risk changes, clean-ups, and + documentation. Stable ABI that was new in the alpha release can be removed + before a beta release if necessary. + +- **Release candidates (RC)**: + Signified by version number #.#.93 and up to #.#.99. + Bug fixes that are not release critical must have landed before this. + Release critical bug fixes can still be landed after this, but they may + call for another RC. + +- **Stable release**: + Signified by version number #.#.0. + Ideally no changes since the last RC. + +Mind that version #.#.90 is never released. It is used during development when +no code freeze is in effect. Stable branches and point releases are not covered +by the above. + + +[git documentation]: http://git-scm.com/documentation +[notes on commit messages]: http://who-t.blogspot.de/2009/12/on-commit-messages.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/Makefile.am new/wayland-1.16.0/Makefile.am --- old/wayland-1.15.0/Makefile.am 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/Makefile.am 2018-08-24 20:04:36.000000000 +0200 @@ -121,7 +121,7 @@ CLEANFILES = $(BUILT_SOURCES) doc/doxygen/doxygen_sqlite3.db DISTCLEANFILES = src/wayland-version.h -EXTRA_DIST = +EXTRA_DIST = CONTRIBUTING.md diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/Makefile.in new/wayland-1.16.0/Makefile.in --- old/wayland-1.15.0/Makefile.in 2018-04-09 19:19:31.000000000 +0200 +++ new/wayland-1.16.0/Makefile.in 2018-08-24 20:04:41.000000000 +0200 @@ -1057,7 +1057,8 @@ @ENABLE_LIBRARIES_TRUE@CLEANFILES = $(BUILT_SOURCES) doc/doxygen/doxygen_sqlite3.db @ENABLE_LIBRARIES_TRUE@DISTCLEANFILES = src/wayland-version.h -@ENABLE_LIBRARIES_TRUE@EXTRA_DIST = egl/wayland-egl-symbols-check \ +@ENABLE_LIBRARIES_TRUE@EXTRA_DIST = CONTRIBUTING.md \ +@ENABLE_LIBRARIES_TRUE@ egl/wayland-egl-symbols-check \ @ENABLE_LIBRARIES_TRUE@ tests/scanner-test.sh \ @ENABLE_LIBRARIES_TRUE@ protocol/tests.xml \ @ENABLE_LIBRARIES_TRUE@ tests/data/example.xml \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/README new/wayland-1.16.0/README --- old/wayland-1.15.0/README 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/README 2018-08-24 20:04:36.000000000 +0200 @@ -24,12 +24,12 @@ Building the wayland libraries is fairly simple, aside from libffi, they don't have many dependencies: - $ git clone git://anongit.freedesktop.org/wayland/wayland + $ git clone https://gitlab.freedesktop.org/wayland/wayland $ cd wayland $ ./autogen.sh --prefix=PREFIX $ make $ make install where PREFIX is where you want to install the libraries. See -http://wayland.freedesktop.org for more complete build instructions +https://wayland.freedesktop.org for more complete build instructions for wayland, weston, xwayland and various toolkits. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/config.h.in new/wayland-1.16.0/config.h.in --- old/wayland-1.15.0/config.h.in 2018-04-09 19:19:35.000000000 +0200 +++ new/wayland-1.16.0/config.h.in 2018-08-24 20:04:43.000000000 +0200 @@ -6,12 +6,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <execinfo.h> header file. */ -#undef HAVE_EXECINFO_H - -/* Define to 1 if you have the <expat.h> header file. */ -#undef HAVE_EXPAT_H - /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/configure new/wayland-1.16.0/configure --- old/wayland-1.15.0/configure 2018-04-09 19:19:30.000000000 +0200 +++ new/wayland-1.16.0/configure 2018-08-24 20:04:40.000000000 +0200 @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for wayland 1.15.0. +# Generated by GNU Autoconf 2.69 for wayland 1.16.0. # -# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.15.0>. +# Report bugs to <https://gitlab.freedesktop.org/wayland/wayland/issues/>. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -275,7 +275,7 @@ $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoc...@gnu.org and -$0: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.15.0 +$0: https://gitlab.freedesktop.org/wayland/wayland/issues/ $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do @@ -651,10 +651,10 @@ # Identity of this package. PACKAGE_NAME='wayland' PACKAGE_TARNAME='wayland' -PACKAGE_VERSION='1.15.0' -PACKAGE_STRING='wayland 1.15.0' -PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.15.0' -PACKAGE_URL='http://wayland.freedesktop.org/' +PACKAGE_VERSION='1.16.0' +PACKAGE_STRING='wayland 1.16.0' +PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/wayland/wayland/issues/' +PACKAGE_URL='https://wayland.freedesktop.org/' # Factoring default headers for most tests. ac_includes_default="\ @@ -1442,7 +1442,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures wayland 1.15.0 to adapt to many kinds of systems. +\`configure' configures wayland 1.16.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1512,7 +1512,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of wayland 1.15.0:";; + short | recursive ) echo "Configuration of wayland 1.16.0:";; esac cat <<\_ACEOF @@ -1585,8 +1585,8 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.15.0>. -wayland home page: <http://wayland.freedesktop.org/>. +Report bugs to <https://gitlab.freedesktop.org/wayland/wayland/issues/>. +wayland home page: <https://wayland.freedesktop.org/>. _ACEOF ac_status=$? fi @@ -1649,7 +1649,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -wayland configure 1.15.0 +wayland configure 1.16.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2115,9 +2115,9 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ---------------------------------------------------------------------------------------------------------- ## -## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.15.0 ## -## ---------------------------------------------------------------------------------------------------------- ##" +( $as_echo "## --------------------------------------------------------------------- ## +## Report this to https://gitlab.freedesktop.org/wayland/wayland/issues/ ## +## --------------------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -2185,7 +2185,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by wayland $as_me 1.15.0, which was +It was created by wayland $as_me 1.16.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2536,11 +2536,11 @@ WAYLAND_VERSION_MAJOR=1 -WAYLAND_VERSION_MINOR=15 +WAYLAND_VERSION_MINOR=16 WAYLAND_VERSION_MICRO=0 -WAYLAND_VERSION=1.15.0 +WAYLAND_VERSION=1.16.0 ac_config_headers="$ac_config_headers config.h" @@ -3062,7 +3062,7 @@ # Define the identity of the package. PACKAGE='wayland' - VERSION='1.15.0' + VERSION='1.16.0' cat >>confdefs.h <<_ACEOF @@ -16506,18 +16506,6 @@ as_fn_error $? "\"CLOCK_MONOTONIC is needed to compile wayland libraries\"" "$LINENO" 5 fi - for ac_header in execinfo.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" -if test "x$ac_cv_header_execinfo_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EXECINFO_H 1 -_ACEOF - -fi - -done - fi @@ -16579,163 +16567,31 @@ # Put the nasty error message in config.log where it belongs echo "$EXPAT_PKG_ERRORS" >&5 - for ac_header in expat.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default" -if test "x$ac_cv_header_expat_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EXPAT_H 1 -_ACEOF - -else - as_fn_error $? "Can't find expat.h. Please install expat." "$LINENO" 5 -fi - -done + as_fn_error $? "Package requirements (expat) were not met: - SAVE_LIBS="$LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing XML_ParserCreate" >&5 -$as_echo_n "checking for library containing XML_ParserCreate... " >&6; } -if ${ac_cv_search_XML_ParserCreate+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XML_ParserCreate (); -int -main () -{ -return XML_ParserCreate (); - ; - return 0; -} -_ACEOF -for ac_lib in '' expat; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_XML_ParserCreate=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_XML_ParserCreate+:} false; then : - break -fi -done -if ${ac_cv_search_XML_ParserCreate+:} false; then : - -else - ac_cv_search_XML_ParserCreate=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_XML_ParserCreate" >&5 -$as_echo "$ac_cv_search_XML_ParserCreate" >&6; } -ac_res=$ac_cv_search_XML_ParserCreate -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - as_fn_error $? "Can't find expat library. Please install expat." "$LINENO" 5 -fi - - EXPAT_LIBS="$LIBS" - LIBS="$SAVE_LIBS" +$EXPAT_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables EXPAT_CFLAGS +and EXPAT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - for ac_header in expat.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default" -if test "x$ac_cv_header_expat_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EXPAT_H 1 -_ACEOF - -else - as_fn_error $? "Can't find expat.h. Please install expat." "$LINENO" 5 -fi - -done - - SAVE_LIBS="$LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing XML_ParserCreate" >&5 -$as_echo_n "checking for library containing XML_ParserCreate... " >&6; } -if ${ac_cv_search_XML_ParserCreate+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XML_ParserCreate (); -int -main () -{ -return XML_ParserCreate (); - ; - return 0; -} -_ACEOF -for ac_lib in '' expat; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_XML_ParserCreate=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_XML_ParserCreate+:} false; then : - break -fi -done -if ${ac_cv_search_XML_ParserCreate+:} false; then : - -else - ac_cv_search_XML_ParserCreate=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_XML_ParserCreate" >&5 -$as_echo "$ac_cv_search_XML_ParserCreate" >&6; } -ac_res=$ac_cv_search_XML_ParserCreate -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - as_fn_error $? "Can't find expat library. Please install expat." "$LINENO" 5 -fi - - EXPAT_LIBS="$LIBS" - LIBS="$SAVE_LIBS" + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. +Alternatively, you may set the environment variables EXPAT_CFLAGS +and EXPAT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } else EXPAT_CFLAGS=$pkg_cv_EXPAT_CFLAGS EXPAT_LIBS=$pkg_cv_EXPAT_LIBS @@ -17728,7 +17584,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by wayland $as_me 1.15.0, which was +This file was extended by wayland $as_me 1.16.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17792,14 +17648,14 @@ Configuration commands: $config_commands -Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.15.0>. -wayland home page: <http://wayland.freedesktop.org/>." +Report bugs to <https://gitlab.freedesktop.org/wayland/wayland/issues/>. +wayland home page: <https://wayland.freedesktop.org/>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -wayland config.status 1.15.0 +wayland config.status 1.16.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/configure.ac new/wayland-1.16.0/configure.ac --- old/wayland-1.15.0/configure.ac 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/configure.ac 2018-08-24 20:04:36.000000000 +0200 @@ -1,16 +1,16 @@ AC_PREREQ([2.64]) m4_define([wayland_major_version], [1]) -m4_define([wayland_minor_version], [15]) +m4_define([wayland_minor_version], [16]) m4_define([wayland_micro_version], [0]) m4_define([wayland_version], [wayland_major_version.wayland_minor_version.wayland_micro_version]) AC_INIT([wayland], [wayland_version], - [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=wayland_version], + [https://gitlab.freedesktop.org/wayland/wayland/issues/], [wayland], - [http://wayland.freedesktop.org/]) + [https://wayland.freedesktop.org/]) AC_SUBST([WAYLAND_VERSION_MAJOR], [wayland_major_version]) AC_SUBST([WAYLAND_VERSION_MINOR], [wayland_minor_version]) @@ -109,19 +109,9 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland libraries")], [[#include <time.h>]]) - AC_CHECK_HEADERS([execinfo.h]) fi -PKG_CHECK_MODULES(EXPAT, [expat], [], - [AC_CHECK_HEADERS(expat.h, [], - [AC_MSG_ERROR([Can't find expat.h. Please install expat.])]) - SAVE_LIBS="$LIBS" - AC_SEARCH_LIBS(XML_ParserCreate, expat, [], - [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) - EXPAT_LIBS="$LIBS" - LIBS="$SAVE_LIBS" - AC_SUBST(EXPAT_LIBS) - ]) +PKG_CHECK_MODULES(EXPAT, [expat]) AM_CONDITIONAL([DTD_VALIDATION], [test "x$enable_dtd_validation" = "xyes"]) if test "x$enable_dtd_validation" = "xyes"; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/doc/Contributing new/wayland-1.16.0/doc/Contributing --- old/wayland-1.15.0/doc/Contributing 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/doc/Contributing 1970-01-01 01:00:00.000000000 +0100 @@ -1,193 +0,0 @@ -= Contributing to Wayland = - -== Sending patches == - -Patches should be sent to wayland-de...@lists.freedesktop.org, using -git send-email. See git's documentation for help [1]. - -The first line of a commit message should contain a prefix indicating -what part is affected by the patch followed by one sentence that -describes the change. For examples: - - protocol: Support scaled outputs and surfaces - -and - - doc: generate server documentation from XML too - -If in doubt what prefix to use, look at other commits that change the -same file(s) as the patch being sent. - -The body of the commit message should describe what the patch changes -and why, and also note any particular side effects. This shouldn't be -empty on most of the cases. It shouldn't take a lot of effort to write -a commit message for an obvious change, so an empty commit message -body is only acceptable if the questions "What?" and "Why?" are already -answered on the one-line summary. - -The lines of the commit message should have at most 76 characters, to -cope with the way git log presents them. - -See [2] for a recommended reading on writing commit messages. - -Your patches should also include a Signed-off-by line with your name and -email address. If you're not the patch's original author, you should -also gather S-o-b's by them (and/or whomever gave the patch to you.) The -significance of this is that it certifies that you created the patch, -that it was created under an appropriate open source license, or -provided to you under those terms. This lets us indicate a chain of -responsibility for the copyright status of the code. - -We won't reject patches that lack S-o-b, but it is strongly recommended. - -== Tracking patches and following up == - -Patchwork is used for tracking patches to Wayland and Weston: -http://patchwork.freedesktop.org/project/wayland/list/ - -Xwayland patches are tracked with the Xorg project, not here. - -Libinput patches, even though they use the same mailing list as Wayland, are -not tracked in the Wayland Patchwork. - -The following applies only to Wayland and Weston. - -If a patch is not found in Patchwork, there is a high possibility for it to be -forgotten. Patches attached to bug reports or not arriving to the mailing list -because of e.g. subscription issues will not be in Patchwork because Patchwork -only collects patches sent to the list. - -When you send a revised version of a patch, it would be very nice to mark your -old patch as superseded (or rejected, if that is applicable). You can change -the status of your own patches by registering to Patchwork - ownership is -identified by email address you use to register. Updating your patch status -appropriately will help maintainer work. - -The following patch states are found in Patchwork: - - New - Patches under discussion or not yet processed. - - Under review - Mostly unused state. - - Accepted - The patch is merged in the master branch upstream, as is or slightly - modified. - - Rejected - The idea or approach is rejected and cannot be fixed by revising - the patch. - - RFC - Request for comments, not meant to be merged as is. - - Not applicable - The email was not actually a patch, or the patch is not for Wayland or - Weston. Libinput patches are usually automatically ignored by Wayland - Patchwork, but if they get through, they will be marked as Not - applicable. - - Changes requested - Reviewers determined that changes to the patch are needed. The - submitter is expected to send a revised version. (You should - not wait for your patch to be set to this state before revising, - though.) - - Awaiting upstream - Mostly unused as the patch is waiting for upstream actions but - is not shown in the default list, which means it is easy to - overlook. - - Superseded - A revised version of the patch has been submitted. - - Deferred - Used mostly during freeze periods before releases, to temporarily - hide patches that cannot be merged during a freeze. - -Note, that in the default listing, only patches in New or Under review are -shown. - -There is also a command line interface to Patchwork called 'pwclient', see -http://patchwork.freedesktop.org/project/wayland/ -for links where to get it and the sample .pwclientrc for Wayland/Weston. - - -== Coding style == - -You should follow the style of the file you're editing. In general, we -try to follow the rules below. - -- indent with tabs, and a tab is always 8 characters wide -- opening braces are on the same line as the if statement; -- no braces in an if-body with just one statement; -- if one of the branches of an if-else condition has braces, then the - other branch should also have braces; -- there is always an empty line between variable declarations and the - code; - -static int -my_function(void) -{ - int a = 0; - - if (a) - b(); - else - c(); - - if (a) { - b(); - c(); - } else { - d(); - } -} - -- lines should be less than 80 characters wide; -- when breaking lines with functions calls, the parameters are aligned - with the opening parentheses; -- when assigning a variable with the result of a function call, if the - line would be longer we break it around the equal '=' sign if it makes - sense; - - long_variable_name = - function_with_a_really_long_name(parameter1, parameter2, - parameter3, parameter4); - - x = function_with_a_really_long_name(parameter1, parameter2, - parameter3, parameter4); - - -== Conduct == - -As a freedesktop.org project, Wayland follows the Contributor Covenant, -found at: -https://www.freedesktop.org/wiki/CodeOfConduct - -Please conduct yourself in a respectful and civilised manner when -interacting with community members on mailing lists, IRC, or bug -trackers. The community represents the project as a whole, and abusive -or bullying behaviour is not tolerated by the project. - - -== Licensing == - -Wayland is licensed with the intention to be usable anywhere X.org is. -Originally, X.org was covered under the MIT X11 license, but changed to -the MIT Expat license. Similarly, Wayland was covered initially as MIT -X11 licensed, but changed to the MIT Expat license, following in X.org's -footsteps. Other than wording, the two licenses are substantially the -same, with the exception of a no-advertising clause in X11 not included -in Expat. - -New source code files should specify the MIT Expat license in their -boilerplate, as part of the copyright statement. - -== References == - - [1] http://git-scm.com/documentation - - [2] http://who-t.blogspot.de/2009/12/on-commit-messages.html - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/doc/Makefile.am new/wayland-1.16.0/doc/Makefile.am --- old/wayland-1.15.0/doc/Makefile.am 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/doc/Makefile.am 2018-08-24 20:04:36.000000000 +0200 @@ -1,3 +1 @@ SUBDIRS = doxygen publican man - -EXTRA_DIST = Contributing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/doc/Makefile.in new/wayland-1.16.0/doc/Makefile.in --- old/wayland-1.15.0/doc/Makefile.in 2018-04-09 19:19:31.000000000 +0200 +++ new/wayland-1.16.0/doc/Makefile.in 2018-08-24 20:04:41.000000000 +0200 @@ -326,7 +326,6 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = doxygen publican man -EXTRA_DIST = Contributing all: all-recursive .SUFFIXES: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/doc/publican/Makefile.in new/wayland-1.16.0/doc/publican/Makefile.in --- old/wayland-1.15.0/doc/publican/Makefile.in 2018-04-09 19:19:31.000000000 +0200 +++ new/wayland-1.16.0/doc/publican/Makefile.in 2018-08-24 20:04:41.000000000 +0200 @@ -464,12 +464,12 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +@HAVE_XMLTO_FALSE@install-data-local: +@HAVE_XSLTPROC_FALSE@install-data-local: @HAVE_XMLTO_FALSE@uninstall-local: @HAVE_XSLTPROC_FALSE@uninstall-local: @HAVE_XMLTO_FALSE@clean-local: @HAVE_XSLTPROC_FALSE@clean-local: -@HAVE_XMLTO_FALSE@install-data-local: -@HAVE_XSLTPROC_FALSE@install-data-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/doc/publican/sources/Protocol.xml new/wayland-1.16.0/doc/publican/sources/Protocol.xml --- old/wayland-1.15.0/doc/publican/sources/Protocol.xml 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/doc/publican/sources/Protocol.xml 2018-08-24 20:04:36.000000000 +0200 @@ -479,7 +479,7 @@ </para> <para> MIME is defined in RFC's 2045-2049. A - <ulink url="ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/"> + <ulink url="https://www.iana.org/assignments/media-types/media-types.xhtml"> registry of MIME types</ulink> is maintained by the Internet Assigned Numbers Authority (IANA). </para> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/protocol/wayland.xml new/wayland-1.16.0/protocol/wayland.xml --- old/wayland-1.15.0/protocol/wayland.xml 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/protocol/wayland.xml 2018-08-24 20:04:36.000000000 +0200 @@ -2399,6 +2399,9 @@ The geometry event describes geometric properties of the output. The event is sent when binding to the output object and whenever any of the properties change. + + The physical size can be set to zero if it doesn't make sense for this + output (e.g. for projectors or virtual outputs). </description> <arg name="x" type="int" summary="x position within the global compositor space"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/src/connection.c new/wayland-1.16.0/src/connection.c --- old/wayland-1.15.0/src/connection.c 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/src/connection.c 2018-08-24 20:04:36.000000000 +0200 @@ -44,7 +44,15 @@ #include "wayland-private.h" #include "wayland-os.h" -#define DIV_ROUNDUP(n, a) ( ((n) + ((a) - 1)) / (a) ) +static inline uint32_t +div_roundup(uint32_t n, size_t a) +{ + /* The cast to uint64_t is necessary to prevent overflow when rounding + * values close to UINT32_MAX. After the division it is again safe to + * cast back to uint32_t. + */ + return (uint32_t) (((uint64_t) n + (a - 1)) / a); +} struct wl_buffer { char data[4096]; @@ -678,7 +686,7 @@ struct wl_map *objects, const struct wl_message *message) { - uint32_t *p, *next, *end, length, id; + uint32_t *p, *next, *end, length, length_in_u32, id; int fd; char *s; int i, count, num_arrays; @@ -734,8 +742,8 @@ break; } - next = p + DIV_ROUNDUP(length, sizeof *p); - if (next > end) { + length_in_u32 = div_roundup(length, sizeof *p); + if ((uint32_t) (end - p) < length_in_u32) { wl_log("message too short, " "object (%d), message %s(%s)\n", closure->sender_id, message->name, @@ -743,6 +751,7 @@ errno = EINVAL; goto err; } + next = p + length_in_u32; s = (char *) p; @@ -793,8 +802,8 @@ case 'a': length = *p++; - next = p + DIV_ROUNDUP(length, sizeof *p); - if (next > end) { + length_in_u32 = div_roundup(length, sizeof *p); + if ((uint32_t) (end - p) < length_in_u32) { wl_log("message too short, " "object (%d), message %s(%s)\n", closure->sender_id, message->name, @@ -802,6 +811,7 @@ errno = EINVAL; goto err; } + next = p + length_in_u32; array_extra->size = length; array_extra->alloc = 0; @@ -1068,7 +1078,7 @@ } size = strlen(closure->args[i].s) + 1; - buffer_size += 1 + DIV_ROUNDUP(size, sizeof(uint32_t)); + buffer_size += 1 + div_roundup(size, sizeof(uint32_t)); break; case 'a': if (closure->args[i].a == NULL) { @@ -1077,7 +1087,7 @@ } size = closure->args[i].a->size; - buffer_size += (1 + DIV_ROUNDUP(size, sizeof(uint32_t))); + buffer_size += (1 + div_roundup(size, sizeof(uint32_t))); break; default: break; @@ -1139,11 +1149,11 @@ size = strlen(closure->args[i].s) + 1; *p++ = size; - if (p + DIV_ROUNDUP(size, sizeof *p) > end) + if (p + div_roundup(size, sizeof *p) > end) goto overflow; memcpy(p, closure->args[i].s, size); - p += DIV_ROUNDUP(size, sizeof *p); + p += div_roundup(size, sizeof *p); break; case 'a': if (closure->args[i].a == NULL) { @@ -1154,11 +1164,11 @@ size = closure->args[i].a->size; *p++ = size; - if (p + DIV_ROUNDUP(size, sizeof *p) > end) + if (p + div_roundup(size, sizeof *p) > end) goto overflow; memcpy(p, closure->args[i].a->data, size); - p += DIV_ROUNDUP(size, sizeof *p); + p += div_roundup(size, sizeof *p); break; default: break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/src/scanner.c new/wayland-1.16.0/src/scanner.c --- old/wayland-1.15.0/src/scanner.c 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/src/scanner.c 2018-08-24 20:04:36.000000000 +0200 @@ -894,14 +894,9 @@ e = find_enumeration(ctx->protocol, interface, a->enumeration_name); - if (e == NULL) - fail(&ctx->loc, - "could not find enumeration %s", - a->enumeration_name); - switch (a->type) { case INT: - if (e->bitfield) + if (e && e->bitfield) fail(&ctx->loc, "bitfield-style enum must only be referenced by uint"); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/src/wayland-client.c new/wayland-1.16.0/src/wayland-client.c --- old/wayland-1.15.0/src/wayland-client.c 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/src/wayland-client.c 2018-08-24 20:04:36.000000000 +0200 @@ -71,13 +71,6 @@ uint32_t version; }; -struct wl_global { - uint32_t id; - char *interface; - uint32_t version; - struct wl_list link; -}; - struct wl_event_queue { struct wl_list event_list; struct wl_display *display; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/src/wayland-private.h new/wayland-1.16.0/src/wayland-private.h --- old/wayland-1.15.0/src/wayland-private.h 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/src/wayland-private.h 2018-08-24 20:04:36.000000000 +0200 @@ -254,6 +254,9 @@ wl_priv_signal_emit(struct wl_priv_signal *signal, void *data); void +wl_priv_signal_final_emit(struct wl_priv_signal *signal, void *data); + +void wl_connection_close_fds_in(struct wl_connection *connection, int max); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/src/wayland-server.c new/wayland-1.16.0/src/wayland-server.c --- old/wayland-1.15.0/src/wayland-server.c 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/src/wayland-server.c 2018-08-24 20:04:36.000000000 +0200 @@ -353,7 +353,7 @@ } } - while ((size_t) len >= sizeof p) { + while (len >= 0 && (size_t) len >= sizeof p) { wl_connection_copy(connection, p, sizeof p); opcode = p[1] & 0xffff; size = p[1] >> 16; @@ -682,7 +682,7 @@ /* Don't emit the new signal for deprecated resources, as that would * access memory outside the bounds of the deprecated struct */ if (!resource_is_deprecated(resource)) - wl_priv_signal_emit(&resource->destroy_signal, resource); + wl_priv_signal_final_emit(&resource->destroy_signal, resource); if (resource->destroy) resource->destroy(resource); @@ -841,7 +841,7 @@ { uint32_t serial = 0; - wl_priv_signal_emit(&client->destroy_signal, client); + wl_priv_signal_final_emit(&client->destroy_signal, client); wl_client_flush(client); wl_map_for_each(&client->objects, destroy_resource, &serial); @@ -1089,7 +1089,7 @@ struct wl_socket *s, *next; struct wl_global *global, *gnext; - wl_priv_signal_emit(&display->destroy_signal, display); + wl_priv_signal_final_emit(&display->destroy_signal, display); wl_list_for_each_safe(s, next, &display->socket_list, link) { wl_socket_destroy(s); @@ -2023,6 +2023,46 @@ l->notify(l, data); } +} + +/** Emit the signal for the last time, calling all the installed listeners + * + * Iterate over all the listeners added to this \a signal and call + * their \a notify function pointer, passing on the given \a data. + * Removing or adding a listener from within wl_priv_signal_emit() + * is safe, as is freeing the structure containing the listener. + * + * A large body of external code assumes it's ok to free a destruction + * listener without removing that listener from the list. Mixing code + * that acts like this and code that doesn't will result in list + * corruption. + * + * We resolve this by removing each item from the list and isolating it + * in another list. We discard it completely after firing the notifier. + * This should allow interoperability between code that unlinks its + * destruction listeners and code that just frees structures they're in. + * + */ +void +wl_priv_signal_final_emit(struct wl_priv_signal *signal, void *data) +{ + struct wl_listener *l; + struct wl_list *pos; + + /* During a destructor notifier isolate every list item before + * notifying. This renders harmless the long standing misuse + * of freeing listeners without removing them, but allows + * callers that do choose to remove them to interoperate with + * ones that don't. */ + while (!wl_list_empty(&signal->listener_list)) { + pos = signal->listener_list.next; + l = wl_container_of(pos, l, link); + + wl_list_remove(pos); + wl_list_init(pos); + + l->notify(l, data); + } } /** \endcond INTERNAL */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/src/wayland-server.h new/wayland-1.16.0/src/wayland-server.h --- old/wayland-1.15.0/src/wayland-server.h 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/src/wayland-server.h 2018-08-24 20:04:36.000000000 +0200 @@ -70,12 +70,6 @@ void *data; }; -struct wl_buffer { - struct wl_resource resource; - int32_t width, height; - uint32_t busy_count; -} WL_DEPRECATED; - uint32_t wl_client_add_resource(struct wl_client *client, struct wl_resource *resource) WL_DEPRECATED; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/src/wayland-version.h new/wayland-1.16.0/src/wayland-version.h --- old/wayland-1.15.0/src/wayland-version.h 2018-04-09 19:19:34.000000000 +0200 +++ new/wayland-1.16.0/src/wayland-version.h 2018-08-24 20:04:43.000000000 +0200 @@ -27,8 +27,8 @@ #define WAYLAND_VERSION_H #define WAYLAND_VERSION_MAJOR 1 -#define WAYLAND_VERSION_MINOR 15 +#define WAYLAND_VERSION_MINOR 16 #define WAYLAND_VERSION_MICRO 0 -#define WAYLAND_VERSION "1.15.0" +#define WAYLAND_VERSION "1.16.0" #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/tests/connection-test.c new/wayland-1.16.0/tests/connection-test.c --- old/wayland-1.15.0/tests/connection-test.c 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/tests/connection-test.c 2018-08-24 20:04:36.000000000 +0200 @@ -533,6 +533,69 @@ release_marshal_data(&data); } +static void +expected_fail_demarshal(struct marshal_data *data, const char *format, + const uint32_t *msg, int expected_error) +{ + struct wl_message message = { "test", format, NULL }; + struct wl_closure *closure; + struct wl_map objects; + int size = (msg[1] >> 16); + + assert(write(data->s[1], msg, size) == size); + assert(wl_connection_read(data->read_connection) == size); + + wl_map_init(&objects, WL_MAP_SERVER_SIDE); + closure = wl_connection_demarshal(data->read_connection, + size, &objects, &message); + + assert(closure == NULL); + assert(errno == expected_error); +} + +/* These tests are verifying that the demarshaling code will gracefuly handle + * clients lying about string and array lengths and giving values near + * UINT32_MAX. Before fixes f7fdface and f5b9e3b9 this test would crash on + * 32bit systems. + */ +TEST(connection_demarshal_failures) +{ + struct marshal_data data; + unsigned int i; + uint32_t msg[3]; + + const uint32_t overflowing_values[] = { + /* Values very close to UINT32_MAX. Before f5b9e3b9 these + * would cause integer overflow in DIV_ROUNDUP. */ + 0xffffffff, 0xfffffffe, 0xfffffffd, 0xfffffffc, + + /* Values at various offsets from UINT32_MAX. Before f7fdface + * these would overflow the "p" pointer on 32bit systems, + * effectively subtracting the offset from it. It had good + * chance to cause crash depending on what was stored at that + * offset before "p". */ + 0xfffff000, 0xffffd000, 0xffffc000, 0xffffb000 + }; + + setup_marshal_data(&data); + + /* sender_id, does not matter */ + msg[0] = 0; + + /* (size << 16 | opcode), opcode is 0, does not matter */ + msg[1] = sizeof(msg) << 16; + + for (i = 0; i < ARRAY_LENGTH(overflowing_values); i++) { + /* length of the string or array */ + msg[2] = overflowing_values[i]; + + expected_fail_demarshal(&data, "s", msg, EINVAL); + expected_fail_demarshal(&data, "a", msg, EINVAL); + } + + release_marshal_data(&data); +} + TEST(connection_marshal_alot) { struct marshal_data data; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wayland-1.15.0/tests/resources-test.c new/wayland-1.16.0/tests/resources-test.c --- old/wayland-1.15.0/tests/resources-test.c 2018-04-09 19:19:26.000000000 +0200 +++ new/wayland-1.16.0/tests/resources-test.c 2018-08-24 20:04:36.000000000 +0200 @@ -84,6 +84,17 @@ { assert(l && data); notify_called = 1; + + /* In real code it's common to free the structure holding the + * listener at this point, but not to remove it from the list. + * + * That's fine since this is a destruction notification and + * it's the last time this signal can fire. We set these + * to NULL so we can check them later to ensure no write after + * "free" occurred. + */ + l->link.prev = NULL; + l->link.next = NULL; } TEST(destroy_res_tst) @@ -119,6 +130,8 @@ assert(destroyed); assert(notify_called); /* check if signal was emitted */ assert(wl_client_get_object(client, id) == NULL); + assert(destroy_listener.link.prev == NULL); + assert(destroy_listener.link.next == NULL); res = wl_resource_create(client, &wl_seat_interface, 2, 0); assert(res); @@ -131,6 +144,8 @@ wl_client_destroy(client); assert(destroyed); assert(notify_called); + assert(destroy_listener.link.prev == NULL); + assert(destroy_listener.link.next == NULL); wl_display_destroy(display); close(s[1]); @@ -167,3 +182,27 @@ wl_display_destroy(display); close(s[1]); } + +static void +display_destroy_notify(struct wl_listener *l, void *data) +{ + l->link.prev = l->link.next = NULL; +} + +TEST(free_without_remove) +{ + struct wl_display *display; + struct wl_listener a, b; + + display = wl_display_create(); + a.notify = display_destroy_notify; + b.notify = display_destroy_notify; + + wl_display_add_destroy_listener(display, &a); + wl_display_add_destroy_listener(display, &b); + + wl_display_destroy(display); + + assert(a.link.next == a.link.prev && a.link.next == NULL); + assert(b.link.next == b.link.prev && b.link.next == NULL); +}