openSUSE Commits
Threads by month
- ----- 2024 -----
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2019
- 1 participants
- 2232 discussions
Hello community,
here is the log from the commit of package i3 for openSUSE:Factory checked in at 2019-05-02 19:18:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/i3 (Old)
and /work/SRC/openSUSE:Factory/.i3.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "i3"
Thu May 2 19:18:57 2019 rev:33 rq:699734 version:4.16.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/i3/i3.changes 2018-11-08 09:50:24.888963572 +0100
+++ /work/SRC/openSUSE:Factory/.i3.new.5148/i3.changes 2019-05-02 19:19:04.765608291 +0200
@@ -1,0 +2,14 @@
+Fri Mar 1 18:09:10 UTC 2019 - Arun Persaud <arun(a)gmx.de>
+
+- update to version 4.16.1:
+ * Truncate wm_name utf8 strings to first zero byte (fixes window
+ title corruption)
+ * Apply title_align to non-leaf containers Additionally, marks
+ will now display for non-leaf containers.
+ * attach_to_workspace: set new parent before tree_render (fixes a
+ heap-use-after-free)
+ * Use ipc queue for all messages (fixes an i3bar crash)
+ * Fix crash with popups when fullscreen is non-leaf
+ * Fix: render_con shows floating containers on wrong workspace
+
+-------------------------------------------------------------------
Old:
----
i3-4.16.tar.bz2
i3-4.16.tar.bz2.asc
New:
----
i3-4.16.1.tar.bz2
i3-4.16.1.tar.bz2.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ i3.spec ++++++
--- /var/tmp/diff_new_pack.I7E3ax/_old 2019-05-02 19:19:06.453611262 +0200
+++ /var/tmp/diff_new_pack.I7E3ax/_new 2019-05-02 19:19:06.453611262 +0200
@@ -1,7 +1,7 @@
#
# spec file for package i3
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: i3
-Version: 4.16
+Version: 4.16.1
Release: 0
Summary: Tiling window manager
License: BSD-3-Clause
++++++ i3-4.16.tar.bz2 -> i3-4.16.1.tar.bz2 ++++++
++++ 4175 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/I3_VERSION new/i3-4.16.1/I3_VERSION
--- old/i3-4.16/I3_VERSION 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/I3_VERSION 2019-01-27 16:45:19.000000000 +0100
@@ -1 +1 @@
-4.16 (2018-11-04)
+4.16.1 (2019-01-27)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/Makefile.am new/i3-4.16.1/Makefile.am
--- old/i3-4.16/Makefile.am 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/Makefile.am 2019-01-27 16:45:19.000000000 +0100
@@ -118,7 +118,7 @@
I3_VERSION \
LICENSE \
PACKAGE-MAINTAINER \
- RELEASE-NOTES-4.16 \
+ RELEASE-NOTES-4.16.1 \
generate-command-parser.pl \
parser-specs/commands.spec \
parser-specs/config.spec \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/RELEASE-NOTES-4.16 new/i3-4.16.1/RELEASE-NOTES-4.16
--- old/i3-4.16/RELEASE-NOTES-4.16 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/RELEASE-NOTES-4.16 1970-01-01 01:00:00.000000000 +0100
@@ -1,145 +0,0 @@
-
- ┌────────────────────────────┐
- │ Release notes for i3 v4.16 │
- └────────────────────────────┘
-
-This is i3 v4.16. This version is considered stable. All users of i3 are
-strongly encouraged to upgrade.
-
-This release contains a number of assorted fixes and improvements across pretty
-much all individual components of i3.
-
- ┌────────────────────────────┐
- │ Changes in i3 v4.16 │
- └────────────────────────────┘
-
- • build: add conditionals for building docs/mans
- • docs/i3bar-protocol: mention skipping blocks with empty full_text
- • docs/ipc: add window_properties to tree node
- • docs/layout-saving: clarify JSON non-compliance
- • docs/userguide: clarify X resource value format
- • docs/userguide: fix move_to_outputs link
- • docs/userguide: link workspace_auto_back_and_forth from workspace
- command
- • docs/userguide: mention known issues for assign
- • docs/userguide: use anchor for list_of_commands
- • docs/userguide: add the default keybinding for focus parent
- • man/*: fix title markers (for asciidoctor)
- • man/i3-msg.man: add get_config and send_tick
- • ipc: kill misbehaving subscribed clients instead of hanging
- • ipc: introduce the sync IPC command for synchronization with i3bar
- • ipc: scratchpad show now returns correct success
- • ipc: send_tick now sets the already-documented “first” field
- • i3bar-protocol: add modifiers to events sent by i3bar
- • dump-asy: use Pod::Usage for --help and perldoc
- • dump-asy: introduce -gv flag to disable opening ghostview
- • dump-asy: introduce -save flag to store the rendered tree in a file
- • dump-asy: add marks
- • dump-asy: include floating containers
- • i3bar: add --verbose flag
- • i3bar: make modifier accept combinations (like floating_modifier)
- • i3-config-wizard: add --modifier flag to allow for headless config
- • i3-config-wizard: support startup notifications
- • i3-msg: only print input + error position if they are set
- • i3-msg: check replies also in quiet mode (-q)
- • i3-msg: add support for the SUBSCRIBE message type
- • i3-nagbar: support startup notifications
- • i3-nagbar: add option for button that runs commands without a terminal
- • i3-save-tree: exclude unsupported transient_for property
- • i3-sensible-terminal: add alacritty
- • i3-sensible-terminal: add hyper
- • introduce strip_workspace_name alongside strip_workspace_numbers
- • introduce title_align config directive
- • “border toggle” now accepts an optional pixel argument
- • “resize set” now interprets 0 as “no change”
- • “resize set” now accepts the “width” and “height” keywords
- • “resize” with pixel values now works for tiling containers
- • the optional “absolute” method is now silently ignored in “move position”
- commands, where it did not cause a visible difference anyway
- • the _NET_WM_STATE_FOCUSED atom is now supported, resulting in e.g.
- GTK applications displaying the correct window decoration
- • moving fullscreen containers now moves them across outputs
- • floating windows can now be used with a geometry of e.g. +1+1, i.e.
- their top-left corner can be outside any output as long as the window
- is contained partially by one
- • prefer floating fullscreen containers when switching focus
- • moving containers to an active workspace no longer changes focus
- • the rename workspace command no longer confuses directions (e.g. “left”)
- with output names
- • prefer $XDG_CONFIG_HOME/i3/config over ~/.i3/config
- • allow multiple assignments of workspaces to output
- • respect maximum size in WM_NORMAL_HINTS
- • reject requests for WM_STATE_ICONIC, which avoids e.g. wine
- applications being stuck in paused state
- • a number of code refactorings and cleanups, some of which tool-assisted
-
- ┌────────────────────────────┐
- │ Bugfixes │
- └────────────────────────────┘
-
- • build: fix static linking
- • i3bar: fix various memory leaks
- • i3bar: fix crash when no status_command is provided
- • i3bar: fix chopping the first character on the very left when using the
- full width of the output
- • i3bar: fix relative_x and width properties of click events
- • i3bar: fix the tray disappearing in some cases when using "tray_output"
- • fix various memory leaks and memory correctness issues
- • refocus focused window on FOCUS_IN events for the root window. This
- fixes incorrect behavior with steam and some tk apps
- • fix focus bugs when moving unfocused containers
- • fix incorrect urgent window state edge case
- • moving an unfocused container from inside a split container to another
- workspace doesn’t focus siblings
- • toggling and killing floating windows now maintains focus order
- • don’t incorrectly focus siblings when scrolling on window decorations
- • fix crash when moving a container to a marked workspace
- • fix swap when first is behind a fullscreen window
- • fix crash when renaming an existing workspace to a name assigned to the
- focused output
- • reframe swallowed windows if depth doesn’t match
- • use detectable autorepeat so that --release bindings are run only when
- the key is actually released (and not when it is repeated)
- • fix border artifacts when moving windows
- • correctly handle bindings for the same mod key with and without --release
- • reset B_UPON_KEYRELEASE_IGNORE_MODS bindings when switching modes
- • fix height offset calculation in pango text drawing
- • fix detection of libiconv on OpenBSD
- • free workspace assignments on reload
- • fix mouse position at startup with multiple outputs
- • no longer allow dragging global fullscreen floating containers
- • fix rendering artifacts with global fullscreen containers
- • fix disabling floating for scratchpad windows
- • fix a crash when renaming an unfocused empty workspace matching an
- assignment
- • ensure containers have a size of at least 1px after resize
- • permit invalid UTF-8 in layout JSON files (e.g. for window titles)
- • correct invalid UTF-8 characters in window and container titles
- • fix a crash when moving to a child of a floating container
- • fix a crash when matching __focused__ with no window open
- • fix no_focus when only using floating windows
- • fix max_aspect calculation
- • moving an unfocused container from another output now maintains
- the correct focus order
- • don’t change focus order when swapping containers
- • correctly update _NET_CURRENT_DESKTOP when moving containers between outputs
- using the directional move command
- • don’t produce move events after attempting to directionally move a container
- towards a direction it can’t go
- • fix sticky focus when switching to workspace on different output
-
-
- ┌────────────────────────────┐
- │ Thanks! │
- └────────────────────────────┘
-
-Thanks for testing, bugfixes, discussions and everything I forgot go out to:
-
- Adrian Cybulski, Aestek, Alan Barr, Andriy Yablonskyy, Cassandra Fox,
- Christian Duerr, Dan Elkouby, downzer0, Elouan Martinet, Felix Buehler,
- Gravemind, Harry Lawrence, Hritik Vijay, hwangcc23, Ingo Bürk, Joona, Klorax,
- lasers, Łukasz Adamczak, Martin, Michael Stapelberg, Oliver Graff,
- Orestis Floros, Soumya, Takashi Iwai, Thomas Fischer, Todd Walton, Tony
- Crisci, Uli Schlachter, Vivien Didelot
-
--- Michael Stapelberg, 2018-11-04
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/RELEASE-NOTES-4.16.1 new/i3-4.16.1/RELEASE-NOTES-4.16.1
--- old/i3-4.16/RELEASE-NOTES-4.16.1 1970-01-01 01:00:00.000000000 +0100
+++ new/i3-4.16.1/RELEASE-NOTES-4.16.1 2019-01-27 16:45:19.000000000 +0100
@@ -0,0 +1,35 @@
+
+ ┌──────────────────────────────┐
+ │ Release notes for i3 v4.16.1 │
+ └──────────────────────────────┘
+
+This is i3 v4.16.1. This version is considered stable. All users of i3 are
+strongly encouraged to upgrade.
+
+This is a bugfix release for v4.16.
+
+ ┌────────────────────────────┐
+ │ Bugfixes │
+ └────────────────────────────┘
+
+ • Truncate wm_name utf8 strings to first zero byte
+ (fixes window title corruption)
+ • Apply title_align to non-leaf containers
+ Additionally, marks will now display for non-leaf containers.
+ • attach_to_workspace: set new parent before tree_render
+ (fixes a heap-use-after-free)
+ • Use ipc queue for all messages
+ (fixes an i3bar crash)
+ • Fix crash with popups when fullscreen is non-leaf
+ • Fix: render_con shows floating containers on wrong workspace
+
+
+ ┌────────────────────────────┐
+ │ Thanks! │
+ └────────────────────────────┘
+
+Thanks for testing, bugfixes, discussions and everything I forgot go out to:
+
+ Orestis Floros
+
+-- Michael Stapelberg, 2019-01-27
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/ar-lib new/i3-4.16.1/ar-lib
--- old/i3-4.16/ar-lib 2018-11-04 14:47:41.000000000 +0100
+++ new/i3-4.16.1/ar-lib 2019-01-27 16:45:26.000000000 +0100
@@ -4,7 +4,7 @@
me=ar-lib
scriptversion=2012-03-01.08; # UTC
-# Copyright (C) 2010-2017 Free Software Foundation, Inc.
+# Copyright (C) 2010-2018 Free Software Foundation, Inc.
# Written by Peter Rosin <peda(a)lysator.liu.se>.
#
# This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/compile new/i3-4.16.1/compile
--- old/i3-4.16/compile 2018-11-04 14:47:41.000000000 +0100
+++ new/i3-4.16.1/compile 2019-01-27 16:45:26.000000000 +0100
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey(a)cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -255,7 +255,8 @@
echo "compile $scriptversion"
exit $?
;;
- cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
@@ -339,9 +340,9 @@
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/configure.ac new/i3-4.16.1/configure.ac
--- old/i3-4.16/configure.ac 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/configure.ac 2019-01-27 16:45:19.000000000 +0100
@@ -2,7 +2,7 @@
# Run autoreconf -fi to generate a configure script from this file.
AC_PREREQ([2.69])
-AC_INIT([i3], [4.16], [https://github.com/i3/i3/issues])
+AC_INIT([i3], [4.16.1], [https://github.com/i3/i3/issues])
# For AX_EXTEND_SRCDIR
AX_ENABLE_BUILDDIR
AM_INIT_AUTOMAKE([foreign subdir-objects -Wall no-dist-gzip dist-bzip2])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/docs/debugging.html new/i3-4.16.1/docs/debugging.html
--- old/i3-4.16/docs/debugging.html 2018-11-04 14:47:44.000000000 +0100
+++ new/i3-4.16.1/docs/debugging.html 2019-01-27 16:45:29.000000000 +0100
@@ -957,7 +957,7 @@
<div id="footer">
<div id="footer-text">
Last updated
- 2018-11-04 14:47:34 CET
+ 2019-01-27 16:45:19 CET
</div>
</div>
</body>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/docs/hacking-howto.html new/i3-4.16.1/docs/hacking-howto.html
--- old/i3-4.16/docs/hacking-howto.html 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/docs/hacking-howto.html 2019-01-27 16:45:29.000000000 +0100
@@ -2381,7 +2381,7 @@
<div id="footer">
<div id="footer-text">
Last updated
- 2018-11-04 14:47:34 CET
+ 2019-01-27 16:45:19 CET
</div>
</div>
</body>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/docs/i3bar-protocol.html new/i3-4.16.1/docs/i3bar-protocol.html
--- old/i3-4.16/docs/i3bar-protocol.html 2018-11-04 14:47:44.000000000 +0100
+++ new/i3-4.16.1/docs/i3bar-protocol.html 2019-01-27 16:45:29.000000000 +0100
@@ -1168,7 +1168,7 @@
<div id="footer">
<div id="footer-text">
Last updated
- 2018-11-04 14:47:34 CET
+ 2019-01-27 16:45:19 CET
</div>
</div>
</body>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/docs/ipc.html new/i3-4.16.1/docs/ipc.html
--- old/i3-4.16/docs/ipc.html 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/docs/ipc.html 2019-01-27 16:45:29.000000000 +0100
@@ -2596,7 +2596,7 @@
<div id="footer">
<div id="footer-text">
Last updated
- 2018-11-04 14:47:34 CET
+ 2019-01-27 16:45:19 CET
</div>
</div>
</body>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/docs/layout-saving.html new/i3-4.16.1/docs/layout-saving.html
--- old/i3-4.16/docs/layout-saving.html 2018-11-04 14:47:44.000000000 +0100
+++ new/i3-4.16.1/docs/layout-saving.html 2019-01-27 16:45:29.000000000 +0100
@@ -1039,7 +1039,7 @@
<div id="footer">
<div id="footer-text">
Last updated
- 2018-11-04 14:47:34 CET
+ 2019-01-27 16:45:19 CET
</div>
</div>
</body>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/docs/multi-monitor.html new/i3-4.16.1/docs/multi-monitor.html
--- old/i3-4.16/docs/multi-monitor.html 2018-11-04 14:47:44.000000000 +0100
+++ new/i3-4.16.1/docs/multi-monitor.html 2019-01-27 16:45:29.000000000 +0100
@@ -816,7 +816,7 @@
<div id="footer">
<div id="footer-text">
Last updated
- 2018-11-04 14:47:34 CET
+ 2019-01-27 16:45:19 CET
</div>
</div>
</body>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/docs/testsuite.html new/i3-4.16.1/docs/testsuite.html
--- old/i3-4.16/docs/testsuite.html 2018-11-04 14:47:44.000000000 +0100
+++ new/i3-4.16.1/docs/testsuite.html 2019-01-27 16:45:29.000000000 +0100
@@ -1434,7 +1434,7 @@
<div id="footer">
<div id="footer-text">
Last updated
- 2018-11-04 14:47:34 CET
+ 2019-01-27 16:45:19 CET
</div>
</div>
</body>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/docs/userguide.html new/i3-4.16.1/docs/userguide.html
--- old/i3-4.16/docs/userguide.html 2018-11-04 14:47:46.000000000 +0100
+++ new/i3-4.16.1/docs/userguide.html 2019-01-27 16:45:30.000000000 +0100
@@ -3840,7 +3840,7 @@
<div id="footer">
<div id="footer-text">
Last updated
- 2018-11-04 14:47:34 CET
+ 2019-01-27 16:45:19 CET
</div>
</div>
</body>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/docs/wsbar.html new/i3-4.16.1/docs/wsbar.html
--- old/i3-4.16/docs/wsbar.html 2018-11-04 14:47:44.000000000 +0100
+++ new/i3-4.16.1/docs/wsbar.html 2019-01-27 16:45:29.000000000 +0100
@@ -844,7 +844,7 @@
<div id="footer">
<div id="footer-text">
Last updated
- 2018-11-04 14:47:34 CET
+ 2019-01-27 16:45:19 CET
</div>
</div>
</body>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/include/ipc.h new/i3-4.16.1/include/ipc.h
--- old/i3-4.16/include/ipc.h 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/include/ipc.h 2019-01-27 16:45:19.000000000 +0100
@@ -35,7 +35,8 @@
* event has been sent by i3. */
bool first_tick_sent;
- struct ev_io *callback;
+ struct ev_io *read_callback;
+ struct ev_io *write_callback;
struct ev_timer *timeout;
uint8_t *buffer;
size_t buffer_size;
@@ -54,12 +55,12 @@
* message_type is the type of the message as the sender specified it.
*
*/
-typedef void (*handler_t)(int, uint8_t *, int, uint32_t, uint32_t);
+typedef void (*handler_t)(ipc_client *, uint8_t *, int, uint32_t, uint32_t);
/* Macro to declare a callback */
-#define IPC_HANDLER(name) \
- static void handle_##name(int fd, uint8_t *message, \
- int size, uint32_t message_size, \
+#define IPC_HANDLER(name) \
+ static void handle_##name(ipc_client *client, uint8_t *message, \
+ int size, uint32_t message_size, \
uint32_t message_type)
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3-config-wizard.1 new/i3-4.16.1/man/i3-config-wizard.1
--- old/i3-4.16/man/i3-config-wizard.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3-config-wizard.1 2019-01-27 16:45:30.000000000 +0100
@@ -2,12 +2,12 @@
.\" Title: i3-config-wizard
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/04/2018
+.\" Date: 01/27/2019
.\" Manual: i3 Manual
-.\" Source: i3 4.16
+.\" Source: i3 4.16.1
.\" Language: English
.\"
-.TH "I3\-CONFIG\-WIZARD" "1" "11/04/2018" "i3 4\&.16" "i3 Manual"
+.TH "I3\-CONFIG\-WIZARD" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3-dmenu-desktop.1 new/i3-4.16.1/man/i3-dmenu-desktop.1
--- old/i3-4.16/man/i3-dmenu-desktop.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3-dmenu-desktop.1 2019-01-27 16:45:29.000000000 +0100
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
+.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -54,20 +54,24 @@
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
-.if !\nF .nr F 0
-.if \nF>0 \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+. if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
..
-. if !\nF==2 \{\
-. nr % 0
-. nr F 2
+. if !\nF==2 \{\
+. nr % 0
+. nr F 2
+. \}
. \}
.\}
+.rr rF
.\" ========================================================================
.\"
.IX Title "I3-DMENU-DESKTOP 1"
-.TH I3-DMENU-DESKTOP 1 "2018-11-04" "perl v5.26.1" "User Contributed Perl Documentation"
+.TH I3-DMENU-DESKTOP 1 "2019-01-27" "perl v5.28.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -84,9 +88,9 @@
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
i3\-dmenu\-desktop is a script which extracts the (localized) name from
-application .desktop files, offers the user a choice via \fIdmenu\fR\|(1) and then
+application .desktop files, offers the user a choice via \fBdmenu\fR\|(1) and then
starts the chosen application via i3 (for startup notification support).
-The advantage of using .desktop files instead of \fIdmenu_run\fR\|(1) is that dmenu_run
+The advantage of using .desktop files instead of \fBdmenu_run\fR\|(1) is that dmenu_run
offers \fBall\fR binaries in your \f(CW$PATH\fR, including non-interactive utilities like
\&\*(L"sed\*(R". Also, .desktop files contain a proper name, information about whether
the application runs in a terminal and whether it supports startup
@@ -108,7 +112,7 @@
want to launch \*(L"\s-1GNU\s0 Emacs 24\*(R" with the patch /tmp/foobar.txt, you would type
\&\*(L"emacs\*(R", press \s-1TAB,\s0 type \*(L" /tmp/foobar.txt\*(R" and press \s-1ENTER.\s0
.PP
-\&.desktop files with Terminal=true are started using \fIi3\-sensible\-terminal\fR\|(1).
+\&.desktop files with Terminal=true are started using \fBi3\-sensible\-terminal\fR\|(1).
.PP
\&.desktop files with NoDisplay=true or Hidden=true are skipped.
.PP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3-dump-log.1 new/i3-4.16.1/man/i3-dump-log.1
--- old/i3-4.16/man/i3-dump-log.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3-dump-log.1 2019-01-27 16:45:30.000000000 +0100
@@ -2,12 +2,12 @@
.\" Title: i3-dump-log
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/04/2018
+.\" Date: 01/27/2019
.\" Manual: i3 Manual
-.\" Source: i3 4.16
+.\" Source: i3 4.16.1
.\" Language: English
.\"
-.TH "I3\-DUMP\-LOG" "1" "11/04/2018" "i3 4\&.16" "i3 Manual"
+.TH "I3\-DUMP\-LOG" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3-input.1 new/i3-4.16.1/man/i3-input.1
--- old/i3-4.16/man/i3-input.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3-input.1 2019-01-27 16:45:30.000000000 +0100
@@ -2,12 +2,12 @@
.\" Title: i3-input
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/04/2018
+.\" Date: 01/27/2019
.\" Manual: i3 Manual
-.\" Source: i3 4.16
+.\" Source: i3 4.16.1
.\" Language: English
.\"
-.TH "I3\-INPUT" "1" "11/04/2018" "i3 4\&.16" "i3 Manual"
+.TH "I3\-INPUT" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3-migrate-config-to-v4.1 new/i3-4.16.1/man/i3-migrate-config-to-v4.1
--- old/i3-4.16/man/i3-migrate-config-to-v4.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3-migrate-config-to-v4.1 2019-01-27 16:45:30.000000000 +0100
@@ -2,12 +2,12 @@
.\" Title: i3-migrate-config-to-v4
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/04/2018
+.\" Date: 01/27/2019
.\" Manual: i3 Manual
-.\" Source: i3 4.16
+.\" Source: i3 4.16.1
.\" Language: English
.\"
-.TH "I3\-MIGRATE\-CONFIG\" "1" "11/04/2018" "i3 4\&.16" "i3 Manual"
+.TH "I3\-MIGRATE\-CONFIG\" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3-msg.1 new/i3-4.16.1/man/i3-msg.1
--- old/i3-4.16/man/i3-msg.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3-msg.1 2019-01-27 16:45:30.000000000 +0100
@@ -2,12 +2,12 @@
.\" Title: i3-msg
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/04/2018
+.\" Date: 01/27/2019
.\" Manual: i3 Manual
-.\" Source: i3 4.16
+.\" Source: i3 4.16.1
.\" Language: English
.\"
-.TH "I3\-MSG" "1" "11/04/2018" "i3 4\&.16" "i3 Manual"
+.TH "I3\-MSG" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3-nagbar.1 new/i3-4.16.1/man/i3-nagbar.1
--- old/i3-4.16/man/i3-nagbar.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3-nagbar.1 2019-01-27 16:45:30.000000000 +0100
@@ -2,12 +2,12 @@
.\" Title: i3-nagbar
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/04/2018
+.\" Date: 01/27/2019
.\" Manual: i3 Manual
-.\" Source: i3 4.16
+.\" Source: i3 4.16.1
.\" Language: English
.\"
-.TH "I3\-NAGBAR" "1" "11/04/2018" "i3 4\&.16" "i3 Manual"
+.TH "I3\-NAGBAR" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3-save-tree.1 new/i3-4.16.1/man/i3-save-tree.1
--- old/i3-4.16/man/i3-save-tree.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3-save-tree.1 2019-01-27 16:45:29.000000000 +0100
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
+.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -54,20 +54,24 @@
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
-.if !\nF .nr F 0
-.if \nF>0 \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+. if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
..
-. if !\nF==2 \{\
-. nr % 0
-. nr F 2
+. if !\nF==2 \{\
+. nr % 0
+. nr F 2
+. \}
. \}
.\}
+.rr rF
.\" ========================================================================
.\"
.IX Title "I3-SAVE-TREE 1"
-.TH I3-SAVE-TREE 1 "2018-11-04" "perl v5.26.1" "User Contributed Perl Documentation"
+.TH I3-SAVE-TREE 1 "2019-01-27" "perl v5.28.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3-sensible-editor.1 new/i3-4.16.1/man/i3-sensible-editor.1
--- old/i3-4.16/man/i3-sensible-editor.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3-sensible-editor.1 2019-01-27 16:45:30.000000000 +0100
@@ -2,12 +2,12 @@
.\" Title: i3-sensible-editor
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/04/2018
+.\" Date: 01/27/2019
.\" Manual: i3 Manual
-.\" Source: i3 4.16
+.\" Source: i3 4.16.1
.\" Language: English
.\"
-.TH "I3\-SENSIBLE\-EDITOR" "1" "11/04/2018" "i3 4\&.16" "i3 Manual"
+.TH "I3\-SENSIBLE\-EDITOR" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3-sensible-pager.1 new/i3-4.16.1/man/i3-sensible-pager.1
--- old/i3-4.16/man/i3-sensible-pager.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3-sensible-pager.1 2019-01-27 16:45:30.000000000 +0100
@@ -2,12 +2,12 @@
.\" Title: i3-sensible-pager
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/04/2018
+.\" Date: 01/27/2019
.\" Manual: i3 Manual
-.\" Source: i3 4.16
+.\" Source: i3 4.16.1
.\" Language: English
.\"
-.TH "I3\-SENSIBLE\-PAGER" "1" "11/04/2018" "i3 4\&.16" "i3 Manual"
+.TH "I3\-SENSIBLE\-PAGER" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3-sensible-terminal.1 new/i3-4.16.1/man/i3-sensible-terminal.1
--- old/i3-4.16/man/i3-sensible-terminal.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3-sensible-terminal.1 2019-01-27 16:45:30.000000000 +0100
@@ -2,12 +2,12 @@
.\" Title: i3-sensible-terminal
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/04/2018
+.\" Date: 01/27/2019
.\" Manual: i3 Manual
-.\" Source: i3 4.16
+.\" Source: i3 4.16.1
.\" Language: English
.\"
-.TH "I3\-SENSIBLE\-TERMIN" "1" "11/04/2018" "i3 4\&.16" "i3 Manual"
+.TH "I3\-SENSIBLE\-TERMIN" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3.1 new/i3-4.16.1/man/i3.1
--- old/i3-4.16/man/i3.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3.1 2019-01-27 16:45:30.000000000 +0100
@@ -2,12 +2,12 @@
.\" Title: i3
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/04/2018
+.\" Date: 01/27/2019
.\" Manual: i3 Manual
-.\" Source: i3 4.16
+.\" Source: i3 4.16.1
.\" Language: English
.\"
-.TH "I3" "1" "11/04/2018" "i3 4\&.16" "i3 Manual"
+.TH "I3" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/man/i3bar.1 new/i3-4.16.1/man/i3bar.1
--- old/i3-4.16/man/i3bar.1 2018-11-04 14:47:45.000000000 +0100
+++ new/i3-4.16.1/man/i3bar.1 2019-01-27 16:45:30.000000000 +0100
@@ -2,12 +2,12 @@
.\" Title: i3bar
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/04/2018
+.\" Date: 01/27/2019
.\" Manual: i3 Manual
-.\" Source: i3 4.16
+.\" Source: i3 4.16.1
.\" Language: English
.\"
-.TH "I3BAR" "1" "11/04/2018" "i3 4\&.16" "i3 Manual"
+.TH "I3BAR" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/missing new/i3-4.16.1/missing
--- old/i3-4.16/missing 2018-11-04 14:47:41.000000000 +0100
+++ new/i3-4.16.1/missing 2019-01-27 16:45:26.000000000 +0100
@@ -1,9 +1,9 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard(a)iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@
exit $st
fi
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
program_details ()
{
@@ -207,9 +207,9 @@
exit $st
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/src/commands.c new/i3-4.16.1/src/commands.c
--- old/i3-4.16/src/commands.c 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/src/commands.c 2019-01-27 16:45:19.000000000 +0100
@@ -13,10 +13,6 @@
#include <float.h>
#include <stdarg.h>
-#ifdef I3_ASAN_ENABLED
-#include <sanitizer/lsan_interface.h>
-#endif
-
#include "shmlog.h"
// Macros to make the YAJL API a bit easier to use.
@@ -1567,12 +1563,6 @@
*/
void cmd_exit(I3_CMD) {
LOG("Exiting due to user command.\n");
-#ifdef I3_ASAN_ENABLED
- __lsan_do_leak_check();
-#endif
- ipc_shutdown(SHUTDOWN_REASON_EXIT);
- unlink(config.ipc_socket_path);
- xcb_disconnect(conn);
exit(0);
/* unreached */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/src/floating.c new/i3-4.16.1/src/floating.c
--- old/i3-4.16/src/floating.c 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/src/floating.c 2019-01-27 16:45:19.000000000 +0100
@@ -907,8 +907,7 @@
/* Workspace change will already result in a tree_render. */
if (!reassigned) {
- render_con(con, false);
- x_push_node(con);
+ tree_render();
}
return true;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/src/ipc.c new/i3-4.16.1/src/ipc.c
--- old/i3-4.16/src/ipc.c 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/src/ipc.c 2019-01-27 16:45:19.000000000 +0100
@@ -38,46 +38,6 @@
err(-1, "Could not set O_NONBLOCK");
}
-/*
- * Given a message and a message type, create the corresponding header, merge it
- * with the message and append it to the given client's output buffer.
- *
- */
-static void append_payload(ipc_client *client, uint32_t message_type, const char *payload) {
- const size_t size = strlen(payload);
- const i3_ipc_header_t header = {
- .magic = {'i', '3', '-', 'i', 'p', 'c'},
- .size = size,
- .type = message_type};
- const size_t header_size = sizeof(i3_ipc_header_t);
- const size_t message_size = header_size + size;
-
- client->buffer = srealloc(client->buffer, client->buffer_size + message_size);
- memcpy(client->buffer + client->buffer_size, ((void *)&header), header_size);
- memcpy(client->buffer + client->buffer_size + header_size, payload, size);
- client->buffer_size += message_size;
-}
-
-static void free_ipc_client(ipc_client *client) {
- close(client->fd);
-
- ev_io_stop(main_loop, client->callback);
- FREE(client->callback);
- if (client->timeout) {
- ev_timer_stop(main_loop, client->timeout);
- FREE(client->timeout);
- }
-
- free(client->buffer);
-
- for (int i = 0; i < client->num_events; i++) {
- free(client->events[i]);
- }
- free(client->events);
- TAILQ_REMOVE(&all_clients, client, clients);
- free(client);
-}
-
static void ipc_client_timeout(EV_P_ ev_timer *w, int revents);
static void ipc_socket_writeable_cb(EV_P_ struct ev_io *w, int revents);
@@ -89,8 +49,8 @@
/*
* Try to write the contents of the pending buffer to the client's subscription
- * socket. Will set, reset or clear the timeout and io callbacks depending on
- * the result of the write operation.
+ * socket. Will set, reset or clear the timeout and io write callbacks depending
+ * on the result of the write operation.
*
*/
static void ipc_push_pending(ipc_client *client) {
@@ -108,13 +68,13 @@
ev_timer_stop(main_loop, client->timeout);
FREE(client->timeout);
}
- ev_io_stop(main_loop, client->callback);
+ ev_io_stop(main_loop, client->write_callback);
return;
}
/* Otherwise, make sure that the io callback is enabled and create a new
* timer if needed. */
- ev_io_start(main_loop, client->callback);
+ ev_io_start(main_loop, client->write_callback);
if (!client->timeout) {
struct ev_timer *timeout = scalloc(1, sizeof(struct ev_timer));
@@ -141,6 +101,54 @@
}
/*
+ * Given a message and a message type, create the corresponding header, merge it
+ * with the message and append it to the given client's output buffer. Also,
+ * send the message if the client's buffer was empty.
+ *
+ */
+static void ipc_send_client_message(ipc_client *client, size_t size, const uint32_t message_type, const uint8_t *payload) {
+ const i3_ipc_header_t header = {
+ .magic = {'i', '3', '-', 'i', 'p', 'c'},
+ .size = size,
+ .type = message_type};
+ const size_t header_size = sizeof(i3_ipc_header_t);
+ const size_t message_size = header_size + size;
+
+ const bool push_now = (client->buffer_size == 0);
+ client->buffer = srealloc(client->buffer, client->buffer_size + message_size);
+ memcpy(client->buffer + client->buffer_size, ((void *)&header), header_size);
+ memcpy(client->buffer + client->buffer_size + header_size, payload, size);
+ client->buffer_size += message_size;
+
+ if (push_now) {
+ ipc_push_pending(client);
+ }
+}
+
+static void free_ipc_client(ipc_client *client) {
+ DLOG("Disconnecting client on fd %d\n", client->fd);
+ close(client->fd);
+
+ ev_io_stop(main_loop, client->read_callback);
+ FREE(client->read_callback);
+ ev_io_stop(main_loop, client->write_callback);
+ FREE(client->write_callback);
+ if (client->timeout) {
+ ev_timer_stop(main_loop, client->timeout);
+ FREE(client->timeout);
+ }
+
+ free(client->buffer);
+
+ for (int i = 0; i < client->num_events; i++) {
+ free(client->events[i]);
+ }
+ free(client->events);
+ TAILQ_REMOVE(&all_clients, client, clients);
+ free(client);
+}
+
+/*
* Sends the specified event to all IPC clients which are currently connected
* and subscribed to this kind of event.
*
@@ -148,21 +156,11 @@
void ipc_send_event(const char *event, uint32_t message_type, const char *payload) {
ipc_client *current;
TAILQ_FOREACH(current, &all_clients, clients) {
- /* see if this client is interested in this event */
- bool interested = false;
for (int i = 0; i < current->num_events; i++) {
- if (strcasecmp(current->events[i], event) != 0)
- continue;
- interested = true;
- break;
- }
- if (!interested)
- continue;
-
- const bool push_now = (current->buffer_size == 0);
- append_payload(current, message_type, payload);
- if (push_now) {
- ipc_push_pending(current);
+ if (strcasecmp(current->events[i], event) == 0) {
+ ipc_send_client_message(current, strlen(payload), message_type, (uint8_t *)payload);
+ break;
+ }
}
}
}
@@ -234,8 +232,8 @@
ylength length;
yajl_gen_get_buf(gen, &reply, &length);
- ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_COMMAND,
- (const uint8_t *)reply);
+ ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_COMMAND,
+ (const uint8_t *)reply);
yajl_gen_free(gen);
}
@@ -838,7 +836,7 @@
ylength length;
y(get_buf, &payload, &length);
- ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_TREE, payload);
+ ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_TREE, payload);
y(free);
}
@@ -902,7 +900,7 @@
ylength length;
y(get_buf, &payload, &length);
- ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_WORKSPACES, payload);
+ ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_WORKSPACES, payload);
y(free);
}
@@ -956,7 +954,7 @@
ylength length;
y(get_buf, &payload, &length);
- ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_OUTPUTS, payload);
+ ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_OUTPUTS, payload);
y(free);
}
@@ -983,7 +981,7 @@
ylength length;
y(get_buf, &payload, &length);
- ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_MARKS, payload);
+ ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_MARKS, payload);
y(free);
}
@@ -1016,7 +1014,7 @@
ylength length;
y(get_buf, &payload, &length);
- ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_VERSION, payload);
+ ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_VERSION, payload);
y(free);
}
@@ -1041,7 +1039,7 @@
ylength length;
y(get_buf, &payload, &length);
- ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_BAR_CONFIG, payload);
+ ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_BAR_CONFIG, payload);
y(free);
return;
}
@@ -1078,7 +1076,7 @@
ylength length;
y(get_buf, &payload, &length);
- ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_BAR_CONFIG, payload);
+ ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_BAR_CONFIG, payload);
y(free);
}
@@ -1100,7 +1098,7 @@
ylength length;
y(get_buf, &payload, &length);
- ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_BINDING_MODES, payload);
+ ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_BINDING_MODES, payload);
y(free);
}
@@ -1139,21 +1137,6 @@
IPC_HANDLER(subscribe) {
yajl_handle p;
yajl_status stat;
- ipc_client *current, *client = NULL;
-
- /* Search the ipc_client structure for this connection */
- TAILQ_FOREACH(current, &all_clients, clients) {
- if (current->fd != fd)
- continue;
-
- client = current;
- break;
- }
-
- if (client == NULL) {
- ELOG("Could not find ipc_client data structure for fd %d\n", fd);
- return;
- }
/* Setup the JSON parser */
static yajl_callbacks callbacks = {
@@ -1170,13 +1153,13 @@
yajl_free_error(p, err);
const char *reply = "{\"success\":false}";
- ipc_send_message(fd, strlen(reply), I3_IPC_REPLY_TYPE_SUBSCRIBE, (const uint8_t *)reply);
+ ipc_send_client_message(client, strlen(reply), I3_IPC_REPLY_TYPE_SUBSCRIBE, (const uint8_t *)reply);
yajl_free(p);
return;
}
yajl_free(p);
const char *reply = "{\"success\":true}";
- ipc_send_message(fd, strlen(reply), I3_IPC_REPLY_TYPE_SUBSCRIBE, (const uint8_t *)reply);
+ ipc_send_client_message(client, strlen(reply), I3_IPC_REPLY_TYPE_SUBSCRIBE, (const uint8_t *)reply);
if (client->first_tick_sent) {
return;
@@ -1195,7 +1178,7 @@
client->first_tick_sent = true;
const char *payload = "{\"first\":true,\"payload\":\"\"}";
- ipc_send_message(client->fd, strlen(payload), I3_IPC_EVENT_TICK, (const uint8_t *)payload);
+ ipc_send_client_message(client, strlen(payload), I3_IPC_EVENT_TICK, (const uint8_t *)payload);
}
/*
@@ -1215,7 +1198,7 @@
ylength length;
y(get_buf, &payload, &length);
- ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_CONFIG, payload);
+ ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_CONFIG, payload);
y(free);
}
@@ -1244,7 +1227,7 @@
y(free);
const char *reply = "{\"success\":true}";
- ipc_send_message(fd, strlen(reply), I3_IPC_REPLY_TYPE_TICK, (const uint8_t *)reply);
+ ipc_send_client_message(client, strlen(reply), I3_IPC_REPLY_TYPE_TICK, (const uint8_t *)reply);
DLOG("Sent tick event\n");
}
@@ -1295,7 +1278,7 @@
yajl_free_error(p, err);
const char *reply = "{\"success\":false}";
- ipc_send_message(fd, strlen(reply), I3_IPC_REPLY_TYPE_SYNC, (const uint8_t *)reply);
+ ipc_send_client_message(client, strlen(reply), I3_IPC_REPLY_TYPE_SYNC, (const uint8_t *)reply);
yajl_free(p);
return;
}
@@ -1304,7 +1287,7 @@
DLOG("received IPC sync request (rnd = %d, window = 0x%08x)\n", state.rnd, state.window);
sync_respond(state.window, state.rnd);
const char *reply = "{\"success\":true}";
- ipc_send_message(fd, strlen(reply), I3_IPC_REPLY_TYPE_SYNC, (const uint8_t *)reply);
+ ipc_send_client_message(client, strlen(reply), I3_IPC_REPLY_TYPE_SYNC, (const uint8_t *)reply);
}
/* The index of each callback function corresponds to the numeric
@@ -1338,6 +1321,8 @@
uint32_t message_type;
uint32_t message_length;
uint8_t *message = NULL;
+ ipc_client *client = (ipc_client *)w->data;
+ assert(client->fd == w->fd);
int ret = ipc_recv_message(w->fd, &message_type, &message_length, &message);
/* EOF or other error */
@@ -1350,25 +1335,8 @@
/* If not, there was some kind of error. We don’t bother and close the
* connection. Delete the client from the list of clients. */
- bool closed = false;
- ipc_client *current;
- TAILQ_FOREACH(current, &all_clients, clients) {
- if (current->fd != w->fd)
- continue;
-
- free_ipc_client(current);
- closed = true;
- break;
- }
- if (!closed) {
- close(w->fd);
- }
-
- ev_io_stop(EV_A_ w);
- free(w);
+ free_ipc_client(client);
FREE(message);
-
- DLOG("IPC: client disconnected\n");
return;
}
@@ -1376,7 +1344,7 @@
DLOG("Unhandled message type: %d\n", message_type);
else {
handler_t h = handlers[message_type];
- h(w->fd, message, 0, message_length, message_type);
+ h(client, message, 0, message_length, message_type);
}
FREE(message);
@@ -1448,36 +1416,33 @@
void ipc_new_client(EV_P_ struct ev_io *w, int revents) {
struct sockaddr_un peer;
socklen_t len = sizeof(struct sockaddr_un);
- int client;
- if ((client = accept(w->fd, (struct sockaddr *)&peer, &len)) < 0) {
- if (errno == EINTR)
- return;
- else
+ int fd;
+ if ((fd = accept(w->fd, (struct sockaddr *)&peer, &len)) < 0) {
+ if (errno != EINTR) {
perror("accept()");
+ }
return;
}
/* Close this file descriptor on exec() */
- (void)fcntl(client, F_SETFD, FD_CLOEXEC);
+ (void)fcntl(fd, F_SETFD, FD_CLOEXEC);
- set_nonblock(client);
+ set_nonblock(fd);
- struct ev_io *package = scalloc(1, sizeof(struct ev_io));
- ev_io_init(package, ipc_receive_message, client, EV_READ);
- ev_io_start(EV_A_ package);
+ ipc_client *client = scalloc(1, sizeof(ipc_client));
+ client->fd = fd;
- ipc_client *new = scalloc(1, sizeof(ipc_client));
+ client->read_callback = scalloc(1, sizeof(struct ev_io));
+ client->read_callback->data = client;
+ ev_io_init(client->read_callback, ipc_receive_message, fd, EV_READ);
+ ev_io_start(EV_A_ client->read_callback);
- package = scalloc(1, sizeof(struct ev_io));
- package->data = new;
- ev_io_init(package, ipc_socket_writeable_cb, client, EV_WRITE);
+ client->write_callback = scalloc(1, sizeof(struct ev_io));
+ client->write_callback->data = client;
+ ev_io_init(client->write_callback, ipc_socket_writeable_cb, fd, EV_WRITE);
DLOG("IPC: new client connected on fd %d\n", w->fd);
-
- new->fd = client;
- new->callback = package;
-
- TAILQ_INSERT_TAIL(&all_clients, new, clients);
+ TAILQ_INSERT_TAIL(&all_clients, client, clients);
}
/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/src/main.c new/i3-4.16.1/src/main.c
--- old/i3-4.16/src/main.c 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/src/main.c 2019-01-27 16:45:19.000000000 +0100
@@ -160,13 +160,6 @@
*
*/
static void i3_exit(void) {
-/* We need ev >= 4 for the following code. Since it is not *that* important (it
- * only makes sure that there are no i3-nagbar instances left behind) we still
- * support old systems with libev 3. */
-#if EV_VERSION_MAJOR >= 4
- ev_loop_destroy(main_loop);
-#endif
-
if (*shmlogname != '\0') {
fprintf(stderr, "Closing SHM log \"%s\"\n", shmlogname);
fflush(stderr);
@@ -174,6 +167,18 @@
}
ipc_shutdown(SHUTDOWN_REASON_EXIT);
unlink(config.ipc_socket_path);
+ xcb_disconnect(conn);
+
+/* We need ev >= 4 for the following code. Since it is not *that* important (it
+ * only makes sure that there are no i3-nagbar instances left behind) we still
+ * support old systems with libev 3. */
+#if EV_VERSION_MAJOR >= 4
+ ev_loop_destroy(main_loop);
+#endif
+
+#ifdef I3_ASAN_ENABLED
+ __lsan_do_leak_check();
+#endif
}
/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/src/move.c new/i3-4.16.1/src/move.c
--- old/i3-4.16/src/move.c 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/src/move.c 2019-01-27 16:45:19.000000000 +0100
@@ -178,9 +178,7 @@
*/
static void attach_to_workspace(Con *con, Con *ws, direction_t direction) {
con_detach(con);
- con_fix_percent(con->parent);
- CALL(con->parent, on_remove_child);
-
+ Con *old_parent = con->parent;
con->parent = ws;
if (direction == D_RIGHT || direction == D_DOWN) {
@@ -195,6 +193,9 @@
* does not make sense anyways. */
con->percent = 0.0;
con_fix_percent(ws);
+
+ con_fix_percent(old_parent);
+ CALL(old_parent, on_remove_child);
}
/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/src/render.c new/i3-4.16.1/src/render.c
--- old/i3-4.16/src/render.c 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/src/render.c 2019-01-27 16:45:19.000000000 +0100
@@ -243,7 +243,7 @@
* fullscreen work correctly (ticket #564). Exception to the
* above rule: smart popup_during_fullscreen handling (popups
* belonging to the fullscreen app will be rendered). */
- if (config.popup_during_fullscreen != PDF_SMART) {
+ if (config.popup_during_fullscreen != PDF_SMART || fullscreen->window == NULL) {
continue;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/src/window.c new/i3-4.16.1/src/window.c
--- old/i3-4.16/src/window.c 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/src/window.c 2019-01-27 16:45:19.000000000 +0100
@@ -74,8 +74,12 @@
}
i3string_free(win->name);
- win->name = i3string_from_utf8_with_length(xcb_get_property_value(prop),
- xcb_get_property_value_length(prop));
+
+ /* Truncate the name at the first zero byte. See #3515. */
+ const int len = xcb_get_property_value_length(prop);
+ char *name = sstrndup(xcb_get_property_value(prop), len);
+ win->name = i3string_from_utf8(name);
+ free(name);
Con *con = con_by_window_id(win->id);
if (con != NULL && con->title_format != NULL) {
@@ -119,8 +123,10 @@
}
i3string_free(win->name);
- win->name = i3string_from_utf8_with_length(xcb_get_property_value(prop),
- xcb_get_property_value_length(prop));
+ const int len = xcb_get_property_value_length(prop);
+ char *name = sstrndup(xcb_get_property_value(prop), len);
+ win->name = i3string_from_utf8(name);
+ free(name);
Con *con = con_by_window_id(win->id);
if (con != NULL && con->title_format != NULL) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/src/x.c new/i3-4.16.1/src/x.c
--- old/i3-4.16/src/x.c 2018-11-04 14:47:34.000000000 +0100
+++ new/i3-4.16.1/src/x.c 2019-01-27 16:45:19.000000000 +0100
@@ -579,31 +579,6 @@
/* 6: draw the title */
int text_offset_y = (con->deco_rect.height - config.font.height) / 2;
- struct Window *win = con->window;
- if (win == NULL) {
- i3String *title;
- if (con->title_format == NULL) {
- char *_title;
- char *tree = con_get_tree_representation(con);
- sasprintf(&_title, "i3: %s", tree);
- free(tree);
-
- title = i3string_from_utf8(_title);
- FREE(_title);
- } else {
- title = con_parse_title_format(con);
- }
-
- draw_util_text(title, &(parent->frame_buffer),
- p->color->text, p->color->background,
- con->deco_rect.x + logical_px(2),
- con->deco_rect.y + text_offset_y,
- con->deco_rect.width - 2 * logical_px(2));
- I3STRING_FREE(title);
-
- goto after_title;
- }
-
const int title_padding = logical_px(2);
const int deco_width = (int)con->deco_rect.width;
int mark_width = 0;
@@ -643,7 +618,23 @@
FREE(formatted_mark);
}
- i3String *title = con->title_format == NULL ? win->name : con_parse_title_format(con);
+ i3String *title = NULL;
+ struct Window *win = con->window;
+ if (win == NULL) {
+ if (con->title_format == NULL) {
+ char *_title;
+ char *tree = con_get_tree_representation(con);
+ sasprintf(&_title, "i3: %s", tree);
+ free(tree);
+
+ title = i3string_from_utf8(_title);
+ FREE(_title);
+ } else {
+ title = con_parse_title_format(con);
+ }
+ } else {
+ title = con->title_format == NULL ? win->name : con_parse_title_format(con);
+ }
if (title == NULL) {
goto copy_pixmaps;
}
@@ -676,11 +667,10 @@
con->deco_rect.y + text_offset_y,
deco_width - mark_width - 2 * title_padding);
- if (con->title_format != NULL) {
+ if (win == NULL || con->title_format != NULL) {
I3STRING_FREE(title);
}
-after_title:
x_draw_decoration_after_title(con, p);
copy_pixmaps:
draw_util_copy_surface(&(con->frame_buffer), &(con->frame), 0, 0, 0, 0, con->rect.width, con->rect.height);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/test-driver new/i3-4.16.1/test-driver
--- old/i3-4.16/test-driver 2018-11-04 14:47:41.000000000 +0100
+++ new/i3-4.16.1/test-driver 2019-01-27 16:45:26.000000000 +0100
@@ -1,9 +1,9 @@
#! /bin/sh
# test-driver - basic testsuite driver script.
-scriptversion=2013-07-13.22; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 2011-2014 Free Software Foundation, Inc.
+# Copyright (C) 2011-2018 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -140,9 +140,9 @@
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/i3-4.16/testcases/t/303-regress-move-floating.t new/i3-4.16.1/testcases/t/303-regress-move-floating.t
--- old/i3-4.16/testcases/t/303-regress-move-floating.t 1970-01-01 01:00:00.000000000 +0100
+++ new/i3-4.16.1/testcases/t/303-regress-move-floating.t 2019-01-27 16:45:19.000000000 +0100
@@ -0,0 +1,33 @@
+#!perl
+# vim:ts=4:sw=4:expandtab
+#
+# Please read the following documents before working on tests:
+# • https://build.i3wm.org/docs/testsuite.html
+# (or docs/testsuite)
+#
+# • https://build.i3wm.org/docs/lib-i3test.html
+# (alternatively: perldoc ./testcases/lib/i3test.pm)
+#
+# • https://build.i3wm.org/docs/ipc.html
+# (or docs/ipc)
+#
+# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
+# (unless you are already familiar with Perl)
+#
+# Regression: moving a container which is the only child of the only child of a
+# floating container crashes i3.
+# Ticket: #3556
+# Bug still in: 4.16-61-g376833db4
+use i3test;
+
+my $ws = fresh_workspace;
+open_window;
+open_window;
+cmd 'split v, focus parent, floating toggle, focus child, move right';
+does_i3_live;
+
+$ws = get_ws($ws);
+is(scalar @{$ws->{floating_nodes}}, 0, 'No floating nodes in workspace');
+is(scalar @{$ws->{nodes}}, 2, 'Two tiling nodes in workspace');
+
+done_testing;
1
0
Hello community,
here is the log from the commit of package albert for openSUSE:Factory checked in at 2019-05-02 19:18:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/albert (Old)
and /work/SRC/openSUSE:Factory/.albert.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "albert"
Thu May 2 19:18:49 2019 rev:10 rq:699732 version:0.16.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/albert/albert.changes 2019-01-08 12:29:42.544191609 +0100
+++ /work/SRC/openSUSE:Factory/.albert.new.5148/albert.changes 2019-05-02 19:18:55.889592668 +0200
@@ -1,0 +2,5 @@
+Mon Mar 18 00:05:10 UTC 2019 - Simon Lees <sflees(a)suse.de>
+
+- %make_jobs -> %cmake_build
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ albert.spec ++++++
--- /var/tmp/diff_new_pack.ioFoYw/_old 2019-05-02 19:18:57.245595055 +0200
+++ /var/tmp/diff_new_pack.ioFoYw/_new 2019-05-02 19:18:57.245595055 +0200
@@ -58,7 +58,7 @@
-DCMAKE_SHARED_LINKER_FLAGS="" \
-DCMAKE_SKIP_RPATH=OFF \
-DBUILD_VIRTUALBOX=OFF
-%make_jobs
+%cmake_build
%install
%cmake_install
1
0
Hello community,
here is the log from the commit of package tmux for openSUSE:Factory checked in at 2019-05-02 19:18:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tmux (Old)
and /work/SRC/openSUSE:Factory/.tmux.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tmux"
Thu May 2 19:18:39 2019 rev:44 rq:699719 version:2.9
Changes:
--------
--- /work/SRC/openSUSE:Factory/tmux/tmux.changes 2019-01-05 14:42:50.948455234 +0100
+++ /work/SRC/openSUSE:Factory/.tmux.new.5148/tmux.changes 2019-05-02 19:18:41.669567640 +0200
@@ -1,0 +2,38 @@
+Fri Apr 26 15:46:52 UTC 2019 - Ismail Dönmez <idonmez(a)suse.com>
+
+- Update to version 2.9
+ * Add format variables for the default formats in the various modes
+ (tree_mode_format and so on) and add a -a flag to display-message
+ to list variables with values.
+ * Add a -v flag to display-message to show verbose messages as the
+ format is parsed, this allows formats to be debugged
+ * Add support for HPA (\033[`).
+ * Add support for origin mode (\033[?6h).
+ * No longer clear history on RIS.
+ * Extend the #[] style syntax and use that together with previous
+ format changes to allow the status line to be entirely configured
+ with a single option.
+ * Add E: and T: format modifiers to expand a format twice
+ (useful to expand the value of an option).
+ * The individual -fg, -bg and -attr options have been removed; they
+ were superseded by -style options in tmux 1.9.
+ * Add -b to display-panes like run-shell.
+ * Handle UTF-8 in word-separators option.
+ * New "terminal" colour allowing options to use the terminal default
+ colour rather than inheriting the default from a parent option.
+ * Do not move the cursor in copy mode when the mouse wheel is used.
+ * Use the same working directory rules for jobs as new windows rather than
+ always starting in the user's home.
+ * Allow panes to be one line or column in size.
+ * Go to last line when goto-line number is out of range in copy mode.
+ * Yank previously cut text if any with C-y in the command prompt, only use the
+ buffer if no text has been cut.
+ * Add q: format modifier to quote shell special characters.
+ * Add -Z to find-window.
+ * Support for windows larger than the client. This adds two new options,
+ window-size and default-size, and a new command, resize-window. The
+ force-width and force-height options and the session_width and session_height
+ formats have been removed.
+- Drop fix-cve201819387.patch, issue_1549.diff: Fixed upstream.
+
+-------------------------------------------------------------------
Old:
----
fix-cve201819387.patch
issue_1549.diff
tmux-2.8.tar.gz
New:
----
tmux-2.9.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ tmux.spec ++++++
--- /var/tmp/diff_new_pack.rd9Equ/_old 2019-05-02 19:18:42.213568597 +0200
+++ /var/tmp/diff_new_pack.rd9Equ/_new 2019-05-02 19:18:42.217568603 +0200
@@ -1,7 +1,7 @@
#
# spec file for package tmux
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: tmux
-Version: 2.8
+Version: 2.9
Release: 0
Summary: Terminal multiplexer
License: ISC AND BSD-3-Clause AND BSD-2-Clause
@@ -27,8 +27,6 @@
Source1: bash_completion_tmux.sh
# PATCH-FIX-OPENSUSE crrodriguez(a)opensuse.org -- Use /run/tmux instead of /tmp as the default socket path, this add some robustness against accidental deletion via systemd-tmpfiles-clean, tmpwatch, or similar
Patch0: tmux-socket-path.patch
-Patch1: fix-cve201819387.patch
-Patch2: issue_1549.diff
BuildRequires: pkgconfig
BuildRequires: utempter-devel
BuildRequires: pkgconfig(libevent) >= 2.0
@@ -55,8 +53,6 @@
%prep
%setup -q
%patch0 -p1
-%patch1 -p3
-%patch2 -p1
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
++++++ tmux-2.8.tar.gz -> tmux-2.9.tar.gz ++++++
++++ 19252 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package dovecot23 for openSUSE:Factory checked in at 2019-05-02 19:18:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dovecot23 (Old)
and /work/SRC/openSUSE:Factory/.dovecot23.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dovecot23"
Thu May 2 19:18:31 2019 rev:18 rq:699690 version:2.3.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/dovecot23/dovecot23.changes 2019-04-19 18:38:46.763214914 +0200
+++ /work/SRC/openSUSE:Factory/.dovecot23.new.5148/dovecot23.changes 2019-05-02 19:18:38.661562344 +0200
@@ -1,0 +2,51 @@
+Tue Apr 30 13:49:18 UTC 2019 - Marcus Rueckert <mrueckert(a)suse.de>
+
+- update pigeonhole to 0.5.6
+ + sieve: Redirect loop prevention is sometimes ineffective.
+ Improve existing loop detection by also recognizing the
+ X-Sieve-Redirected-From header in incoming messages and
+ dropping redirect actions when it points to the sending
+ account. This header is already added by the redirect action,
+ so this improvement only adds an additional use of this header.
+ - sieve: Prevent execution of implicit keep upon temporary
+ failure occurring at runtime.
+
+-------------------------------------------------------------------
+Tue Apr 30 13:34:16 UTC 2019 - Marcus Rueckert <mrueckert(a)suse.de>
+
+- update to 2.3.6: (boo#1133624 boo#1133625)
+ * CVE-2019-11494: Submission-login crashed with signal 11 due to
+ null pointer access when authentication was aborted by
+ disconnecting.
+ * CVE-2019-11499: Submission-login crashed when authentication
+ was started over TLS secured channel and invalid authentication
+ message was sent.
+ * auth: Support password grant with passdb oauth2.
+ + Use system default CAs for outbound TLS connections.
+ + Simplify array handling with new helper macros.
+ + fts_solr: Enable configuring batch_size and soft_commit features.
+ - lmtp/submission: Fixed various bugs in XCLIENT handling,
+ including a hang when XCLIENT commands were sent infinitely to
+ the remote server.
+ - lmtp/submission: Forwarded multi-line replies were erroneously
+ sent as two replies to the client.
+ - lib-smtp: client: Message was not guaranteed to contain CRLF
+ consistently when CHUNKING was used.
+ - fts_solr: Plugin was no longer compatible with Solr 7.
+ - Make it possible to disable certificate checking without
+ setting ssl_client_ca_* settings.
+ - pop3c: SSL support was broken.
+ - mysql: Closing connection twice lead to crash on some systems.
+ - auth: Multiple oauth2 passdbs crashed auth process on deinit.
+ - HTTP client connection errors infrequently triggered a
+ segmentation fault when the connection was idle and not used
+ for a particular client instance.
+- drop https://github.com/dovecot/core/commit/3c5101ffd.patch
+
+-------------------------------------------------------------------
+Mon Apr 29 22:11:53 UTC 2019 - Marcus Rueckert <mrueckert(a)suse.de>
+
+- backport https://github.com/dovecot/core/commit/3c5101ffd.patch
+ [PATCH] driver-mysql: Avoid double-closing MySQL connection
+
+-------------------------------------------------------------------
Old:
----
dovecot-2.3-pigeonhole-0.5.5.tar.gz
dovecot-2.3-pigeonhole-0.5.5.tar.gz.sig
dovecot-2.3.5.2.tar.gz
dovecot-2.3.5.2.tar.gz.sig
New:
----
dovecot-2.3-pigeonhole-0.5.6.tar.gz
dovecot-2.3-pigeonhole-0.5.6.tar.gz.sig
dovecot-2.3.6.tar.gz
dovecot-2.3.6.tar.gz.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dovecot23.spec ++++++
--- /var/tmp/diff_new_pack.2FCLCQ/_old 2019-05-02 19:18:39.597563992 +0200
+++ /var/tmp/diff_new_pack.2FCLCQ/_new 2019-05-02 19:18:39.601563999 +0200
@@ -17,11 +17,11 @@
Name: dovecot23
-Version: 2.3.5.2
+Version: 2.3.6
Release: 0
%define pkg_name dovecot
-%define dovecot_version 2.3.5.2
-%define dovecot_pigeonhole_version 0.5.5
+%define dovecot_version 2.3.6
+%define dovecot_pigeonhole_version 0.5.6
%define dovecot_branch 2.3
%define dovecot_pigeonhole_source_dir %{pkg_name}-%{dovecot_branch}-pigeonhole-%{dovecot_pigeonhole_version}
%define dovecot_pigeonhole_docdir %{_docdir}/%{pkg_name}/dovecot-pigeonhole
++++++ dovecot-2.3-pigeonhole-0.5.5.tar.gz -> dovecot-2.3-pigeonhole-0.5.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.3-pigeonhole-0.5.5/ChangeLog new/dovecot-2.3-pigeonhole-0.5.6/ChangeLog
--- old/dovecot-2.3-pigeonhole-0.5.5/ChangeLog 2019-03-05 12:53:28.000000000 +0100
+++ new/dovecot-2.3-pigeonhole-0.5.6/ChangeLog 2019-04-30 14:26:49.000000000 +0200
@@ -1,11 +1,132 @@
-2019-03-05 13:48:57 +0200 Aki Tuomi <aki.tuomi(a)open-xchange.com> (2483b085)
+2019-04-30 14:30:41 +0300 Aki Tuomi <aki.tuomi(a)open-xchange.com> (92dc263a)
- Release v0.5.5 for Dovecot v2.3.5
+ Released v0.5.6
M configure.ac
-2019-03-04 15:01:08 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (0a9f9095)
+2019-04-30 14:26:16 +0300 Aki Tuomi <aki.tuomi(a)open-xchange.com> (18751d35)
+
+ NEWS: Add news for v0.5.6
+
+
+M NEWS
+
+2019-01-16 08:51:09 -0500 Josef 'Jeff' Sipek <jeffpc(a)josefsipek.net> (ea20d2d9)
+
+ global: hash_table_destroy(NULL) is a no-op
+
+ @@ expression E;
+ @@
+
+ - if (hash_table_is_created(E)) {
+ - hash_table_destroy(&E);
+ - }
+ + hash_table_destroy(&E);
+
+M src/lib-sieve/sieve-result.c
+M src/plugins/imapsieve/imap-sieve-storage.c
+
+2019-01-24 22:46:09 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (3733c159)
+
+ lib-sieve: Prevent execution of implicit keep upon temporary failure
+ occurring at runtime.
+
+
+M src/lib-sieve/sieve.c
+
+2018-12-12 18:46:50 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (76a44097)
+
+ lib-sieve: redirect action: Assert that dupeid is not NULL when
+ act_redirect_get_duplicate_id() is successful.
+
+ Addresses scan-build report.
+
+M src/lib-sieve/cmd-redirect.c
+
+2018-12-12 18:45:00 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (2c5a4cb5)
+
+ lib-sieve: redirect action: Fix lack of NULL checking in new
+ X-Sieve-Redirected-From header comparisons.
+
+ Problem found by scan-build.
+
+M src/lib-sieve/cmd-redirect.c
+
+2018-12-11 17:29:18 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (049de1fc)
+
+ lib-sieve: redirect action: Implement additional protection against mail
+ loops.
+
+ Also check the X-Sieve-Redirected-From header for our own e-mail addresses.
+ This header is added by the redirect action itself and in a mail loop it
+ would see that same header with that same content. This is less reliable
+ than the other mail loop detection (sender may set such a header), so,
+ unlike the existing loop detection based on the duplicate db, the implicit
+ keep is not canceled when the new loop detection is triggered.
+
+M src/lib-sieve/cmd-redirect.c
+M tests/execute/smtp.svtest
+
+2018-12-11 17:27:20 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (663ac718)
+
+ lib-sieve: redirect action: Put msgdata->mail in local variable in
+ act_redirect_get_duplicate_id().
+
+ Serves as an abbreviation.
+
+M src/lib-sieve/cmd-redirect.c
+
+2018-12-11 17:26:56 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (c3c9a521)
+
+ lib-sieve: redirect action: Move composition of duplicate database ID to
+ separate function.
+
+
+M src/lib-sieve/cmd-redirect.c
+
+2018-12-11 20:28:51 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (2c52769b)
+
+ lib-sieve: redirect action: Give log messages emitted during execution a
+ uniform prefix.
+
+
+M src/lib-sieve/cmd-redirect.c
+
+2018-12-11 17:25:12 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (dd626dfe)
+
+ lib-sieve: redirect action: Report errors on original message in
+ act_redirect_commit().
+
+ It was errorneously using the (potentially) modified mail struct for error
+ reporting.
+
+M src/lib-sieve/cmd-redirect.c
+
+2018-12-11 17:24:38 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (88792972)
+
+ lib-sieve: redirect action: Update coding style of act_redirect_commit().
+
+
+M src/lib-sieve/cmd-redirect.c
+
+2018-12-11 20:25:12 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (7d2d1eca)
+
+ lib-sieve: redirect action: Update coding style of act_redirect_send().
+
+
+M src/lib-sieve/cmd-redirect.c
+
+2018-12-11 17:23:06 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (4ef89d76)
+
+ lib-sieve: editheader extension: Protect the X-Sieve-Redirected-From header
+ against modification.
+
+ This prevents users from messing with redirect loop detection.
+
+M src/lib-sieve/plugins/editheader/ext-editheader-common.c
+
+2019-03-04 15:01:08 +0100 Stephan Bosch <stephan.bosch(a)dovecot.fi> (73378b27)
Update NEWS file for v0.5.5 release.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.3-pigeonhole-0.5.5/NEWS new/dovecot-2.3-pigeonhole-0.5.6/NEWS
--- old/dovecot-2.3-pigeonhole-0.5.5/NEWS 2019-03-05 12:53:18.000000000 +0100
+++ new/dovecot-2.3-pigeonhole-0.5.6/NEWS 2019-04-30 14:26:38.000000000 +0200
@@ -1,3 +1,14 @@
+v0.5.6 2019-04-30 Aki Tuomi <aki.tuomi(a)open-xchange.com>
+
+ + sieve: Redirect loop prevention is sometimes ineffective. Improve
+ existing loop detection by also recognizing the
+ X-Sieve-Redirected-From header in incoming messages and dropping
+ redirect actions when it points to the sending account. This header
+ is already added by the redirect action, so this improvement only
+ adds an additional use of this header.
+ - sieve: Prevent execution of implicit keep upon temporary failure
+ occurring at runtime.
+
v0.5.5 2019-03-05 Stephan Bosch <stephan(a)rename-it.nl>
+ IMAPSieve: Add new plugin/imapsieve_expunge_discarded setting which
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.3-pigeonhole-0.5.5/configure new/dovecot-2.3-pigeonhole-0.5.6/configure
--- old/dovecot-2.3-pigeonhole-0.5.5/configure 2019-03-05 12:53:23.000000000 +0100
+++ new/dovecot-2.3-pigeonhole-0.5.6/configure 2019-04-30 14:26:43.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Pigeonhole 0.5.5.
+# Generated by GNU Autoconf 2.69 for Pigeonhole 0.5.6.
#
# Report bugs to <dovecot(a)dovecot.org>.
#
@@ -590,8 +590,8 @@
# Identity of this package.
PACKAGE_NAME='Pigeonhole'
PACKAGE_TARNAME='dovecot-2.3-pigeonhole'
-PACKAGE_VERSION='0.5.5'
-PACKAGE_STRING='Pigeonhole 0.5.5'
+PACKAGE_VERSION='0.5.6'
+PACKAGE_STRING='Pigeonhole 0.5.6'
PACKAGE_BUGREPORT='dovecot(a)dovecot.org'
PACKAGE_URL=''
@@ -1413,7 +1413,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 Pigeonhole 0.5.5 to adapt to many kinds of systems.
+\`configure' configures Pigeonhole 0.5.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1485,7 +1485,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Pigeonhole 0.5.5:";;
+ short | recursive ) echo "Configuration of Pigeonhole 0.5.6:";;
esac
cat <<\_ACEOF
@@ -1610,7 +1610,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Pigeonhole configure 0.5.5
+Pigeonhole configure 0.5.6
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1979,7 +1979,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Pigeonhole $as_me 0.5.5, which was
+It was created by Pigeonhole $as_me 0.5.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2329,7 +2329,7 @@
cat >>confdefs.h <<_ACEOF
-#define PIGEONHOLE_ABI_VERSION "0.5.ABIv0($PACKAGE_VERSION)"
+#define PIGEONHOLE_ABI_VERSION "0.5.ABIv6($PACKAGE_VERSION)"
_ACEOF
@@ -2869,7 +2869,7 @@
# Define the identity of the package.
PACKAGE='dovecot-2.3-pigeonhole'
- VERSION='0.5.5'
+ VERSION='0.5.6'
# Some tools Automake needs.
@@ -13907,7 +13907,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Pigeonhole $as_me 0.5.5, which was
+This file was extended by Pigeonhole $as_me 0.5.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13973,7 +13973,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-Pigeonhole config.status 0.5.5
+Pigeonhole config.status 0.5.6
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/dovecot-2.3-pigeonhole-0.5.5/configure.ac new/dovecot-2.3-pigeonhole-0.5.6/configure.ac
--- old/dovecot-2.3-pigeonhole-0.5.5/configure.ac 2019-03-05 12:53:18.000000000 +0100
+++ new/dovecot-2.3-pigeonhole-0.5.6/configure.ac 2019-04-30 14:26:38.000000000 +0200
@@ -2,8 +2,8 @@
# Be sure to update ABI version also if anything changes that might require
# recompiling plugins. Most importantly that means if any structs are changed.
-AC_INIT([Pigeonhole], [0.5.5], [dovecot(a)dovecot.org], [dovecot-2.3-pigeonhole])
-AC_DEFINE_UNQUOTED([PIGEONHOLE_ABI_VERSION], "0.5.ABIv0($PACKAGE_VERSION)", [Pigeonhole ABI version])
+AC_INIT([Pigeonhole], [0.5.6], [dovecot(a)dovecot.org], [dovecot-2.3-pigeonhole])
+AC_DEFINE_UNQUOTED([PIGEONHOLE_ABI_VERSION], "0.5.ABIv6($PACKAGE_VERSION)", [Pigeonhole ABI version])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_SRCDIR([src])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.3-pigeonhole-0.5.5/pigeonhole-version.h new/dovecot-2.3-pigeonhole-0.5.6/pigeonhole-version.h
--- old/dovecot-2.3-pigeonhole-0.5.5/pigeonhole-version.h 2019-03-05 12:53:28.000000000 +0100
+++ new/dovecot-2.3-pigeonhole-0.5.6/pigeonhole-version.h 2019-04-30 14:26:48.000000000 +0200
@@ -1,6 +1,6 @@
#ifndef PIGEONHOLE_VERSION_H
#define PIGEONHOLE_VERSION_H
-#define PIGEONHOLE_VERSION_FULL PIGEONHOLE_VERSION" (2483b085)"
+#define PIGEONHOLE_VERSION_FULL PIGEONHOLE_VERSION" (92dc263a)"
#endif /* PIGEONHOLE_VERSION_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.3-pigeonhole-0.5.5/src/lib-sieve/cmd-redirect.c new/dovecot-2.3-pigeonhole-0.5.6/src/lib-sieve/cmd-redirect.c
--- old/dovecot-2.3-pigeonhole-0.5.5/src/lib-sieve/cmd-redirect.c 2019-03-05 12:53:18.000000000 +0100
+++ new/dovecot-2.3-pigeonhole-0.5.6/src/lib-sieve/cmd-redirect.c 2019-04-30 14:26:38.000000000 +0200
@@ -275,13 +275,13 @@
*keep = FALSE;
}
-static int act_redirect_send
-(const struct sieve_action_exec_env *aenv, struct mail *mail,
- struct act_redirect_context *ctx, const char *new_msg_id)
+static int
+act_redirect_send(const struct sieve_action_exec_env *aenv, struct mail *mail,
+ struct act_redirect_context *ctx, const char *new_msg_id)
ATTR_NULL(4)
{
static const char *hide_headers[] =
- { "Return-Path", "X-Sieve", "X-Sieve-Redirected-From" };
+ { "Return-Path" };
struct sieve_instance *svinst = aenv->svinst;
struct sieve_message_context *msgctx = aenv->msgctx;
const struct sieve_script_env *senv = aenv->scriptenv;
@@ -294,43 +294,46 @@
int ret;
/* Just to be sure */
- if ( !sieve_smtp_available(senv) ) {
- sieve_result_global_warning
- (aenv, "redirect action has no means to send mail.");
+ if (!sieve_smtp_available(senv)) {
+ sieve_result_global_warning(
+ aenv, "redirect action: no means to send mail");
return SIEVE_EXEC_FAILURE;
}
if (mail_get_stream(mail, NULL, NULL, &input) < 0) {
- return sieve_result_mail_error(aenv, mail,
- "redirect action: failed to read input message");
+ return sieve_result_mail_error(
+ aenv, mail, "redirect action: "
+ "failed to read input message");
}
/* Determine which sender to use
From RFC 5228, Section 4.2:
- The envelope sender address on the outgoing message is chosen by the
- sieve implementation. It MAY be copied from the message being
- processed. However, if the message being processed has an empty
- envelope sender address the outgoing message MUST also have an empty
- envelope sender address. This last requirement is imposed to prevent
- loops in the case where a message is redirected to an invalid address
- when then returns a delivery status notification that also ends up
- being redirected to the same invalid address.
+ The envelope sender address on the outgoing message is chosen by the
+ sieve implementation. It MAY be copied from the message being
+ processed. However, if the message being processed has an empty
+ envelope sender address the outgoing message MUST also have an empty
+ envelope sender address. This last requirement is imposed to prevent
+ loops in the case where a message is redirected to an invalid address
+ when then returns a delivery status notification that also ends up
+ being redirected to the same invalid address.
*/
- if ( (aenv->flags & SIEVE_EXECUTE_FLAG_NO_ENVELOPE) == 0 ) {
+ if ((aenv->flags & SIEVE_EXECUTE_FLAG_NO_ENVELOPE) == 0) {
/* Envelope available */
sender = sieve_message_get_sender(msgctx);
- if ( sender != NULL &&
- sieve_address_source_get_address(&env_from, svinst,
- senv, msgctx, aenv->flags, &sender) < 0 )
+ if (sender != NULL &&
+ sieve_address_source_get_address(
+ &env_from, svinst, senv, msgctx, aenv->flags,
+ &sender) < 0)
sender = NULL;
} else {
/* No envelope available */
- if ( (ret=sieve_address_source_get_address(&env_from, svinst,
- senv, msgctx, aenv->flags, &sender)) < 0 ) {
+ ret = sieve_address_source_get_address(
+ &env_from, svinst, senv, msgctx, aenv->flags, &sender);
+ if (ret < 0) {
sender = NULL;
- } else if ( ret == 0 ) {
+ } else if (ret == 0) {
sender = svinst->user_email;
}
}
@@ -339,29 +342,31 @@
sctx = sieve_smtp_start_single(senv, ctx->to_address, sender, &output);
/* Remove unwanted headers */
- input = i_stream_create_header_filter
- (input, HEADER_FILTER_EXCLUDE | HEADER_FILTER_NO_CR, hide_headers,
- N_ELEMENTS(hide_headers), *null_header_filter_callback, (void *)NULL);
+ input = i_stream_create_header_filter(
+ input, HEADER_FILTER_EXCLUDE | HEADER_FILTER_NO_CR,
+ hide_headers, N_ELEMENTS(hide_headers),
+ *null_header_filter_callback, (void *)NULL);
T_BEGIN {
string_t *hdr = t_str_new(256);
const struct smtp_address *user_email;
/* Prepend sieve headers (should not affect signatures) */
- rfc2822_header_append(hdr,
- "X-Sieve", SIEVE_IMPLEMENTATION, FALSE, NULL);
- if ( svinst->user_email == NULL &&
- (aenv->flags & SIEVE_EXECUTE_FLAG_NO_ENVELOPE) == 0 )
+ rfc2822_header_append(hdr, "X-Sieve", SIEVE_IMPLEMENTATION,
+ FALSE, NULL);
+ if (svinst->user_email == NULL &&
+ (aenv->flags & SIEVE_EXECUTE_FLAG_NO_ENVELOPE) == 0)
user_email = sieve_message_get_final_recipient(msgctx);
else
user_email = sieve_get_user_email(aenv->svinst);
- if ( user_email != NULL ) {
+ if (user_email != NULL) {
rfc2822_header_append(hdr, "X-Sieve-Redirected-From",
- smtp_address_encode(user_email), FALSE, NULL);
+ smtp_address_encode(user_email),
+ FALSE, NULL);
}
/* Add new Message-ID if message doesn't have one */
- if ( new_msg_id != NULL )
+ if (new_msg_id != NULL)
rfc2822_header_write(hdr, "Message-ID", new_msg_id);
o_stream_nsend(output, str_data(hdr), str_len(hdr));
@@ -370,20 +375,22 @@
o_stream_nsend_istream(output, input);
if (input->stream_errno != 0) {
- sieve_result_critical(aenv,
- "redirect action: failed to read input message",
+ sieve_result_critical(
+ aenv, "redirect action: "
+ "failed to read input message",
"redirect action: read(%s) failed: %s",
i_stream_get_name(input),
i_stream_get_error(input));
i_stream_unref(&input);
return SIEVE_EXEC_TEMP_FAILURE;
}
- i_stream_unref(&input);
+ i_stream_unref(&input);
/* Close SMTP transport */
- if ( (ret=sieve_smtp_finish(sctx, &error)) <= 0 ) {
- if ( ret < 0 ) {
- sieve_result_global_error(aenv,
+ if ((ret = sieve_smtp_finish(sctx, &error)) <= 0) {
+ if (ret < 0) {
+ sieve_result_global_error(
+ aenv, "redirect action: "
"failed to redirect message to <%s>: %s "
"(temporary failure)",
smtp_address_encode(ctx->to_address),
@@ -391,7 +398,8 @@
return SIEVE_EXEC_TEMP_FAILURE;
}
- sieve_result_global_log_error(aenv,
+ sieve_result_global_log_error(
+ aenv, "redirect action: "
"failed to redirect message to <%s>: %s "
"(permanent failure)",
smtp_address_encode(ctx->to_address),
@@ -402,55 +410,36 @@
return SIEVE_EXEC_OK;
}
-static int act_redirect_commit
-(const struct sieve_action *action,
- const struct sieve_action_exec_env *aenv, void *tr_context ATTR_UNUSED,
- bool *keep)
+static int
+act_redirect_get_duplicate_id(struct act_redirect_context *ctx,
+ const struct sieve_action_exec_env *aenv,
+ const char *msg_id, const char **dupeid_r)
{
- struct sieve_instance *svinst = aenv->svinst;
- struct act_redirect_context *ctx =
- (struct act_redirect_context *) action->context;
struct sieve_message_context *msgctx = aenv->msgctx;
- struct mail *mail = ( action->mail != NULL ?
- action->mail : sieve_message_get_mail(msgctx) );
const struct sieve_message_data *msgdata = aenv->msgdata;
- const struct sieve_script_env *senv = aenv->scriptenv;
+ struct mail *mail = msgdata->mail;
const struct smtp_address *recipient;
- const char *msg_id = msgdata->id, *new_msg_id = NULL;
- const char *dupeid, *resent_id = NULL;
- const char *list_id = NULL;
- int ret;
-
- /*
- * Prevent mail loops
- */
+ const char *resent_id = NULL, *list_id = NULL;
/* Read identifying headers */
- if ( mail_get_first_header
- (msgdata->mail, "resent-message-id", &resent_id) < 0 ) {
- return sieve_result_mail_error(aenv, mail,
+ if (mail_get_first_header(mail, "resent-message-id", &resent_id) < 0) {
+ return sieve_result_mail_error(
+ aenv, mail, "redirect action: "
"failed to read header field `resent-message-id'");
}
- if ( resent_id == NULL ) {
- if ( mail_get_first_header
- (msgdata->mail, "resent-from", &resent_id) < 0 ) {
- return sieve_result_mail_error(aenv, mail,
- "failed to read header field `resent-from'");
- }
+ if (resent_id == NULL &&
+ mail_get_first_header(mail, "resent-from", &resent_id) < 0) {
+ return sieve_result_mail_error(
+ aenv, mail, "redirect action: "
+ "failed to read header field `resent-from'");
}
- if ( mail_get_first_header
- (msgdata->mail, "list-id", &list_id) < 0 ) {
- return sieve_result_mail_error(aenv, mail,
+ if (mail_get_first_header(mail, "list-id", &list_id) < 0) {
+ return sieve_result_mail_error(
+ aenv, mail, "redirect action: "
"failed to read header field `list-id'");
}
- /* Create Message-ID for the message if it has none */
- if ( msg_id == NULL ) {
- msg_id = new_msg_id =
- sieve_message_get_new_id(aenv->svinst);
- }
-
- if ( (aenv->flags & SIEVE_EXECUTE_FLAG_NO_ENVELOPE) == 0 )
+ if ((aenv->flags & SIEVE_EXECUTE_FLAG_NO_ENVELOPE) == 0)
recipient = sieve_message_get_orig_recipient(msgctx);
else
recipient = sieve_get_user_email(aenv->svinst);
@@ -463,34 +452,132 @@
the original message
- if the message came through a mailing list: the mailinglist ID
*/
- dupeid = t_strdup_printf("%s-%s-%s-%s-%s", msg_id,
+ *dupeid_r = t_strdup_printf("%s-%s-%s-%s-%s", msg_id,
(recipient != NULL ? smtp_address_encode(recipient) : ""),
smtp_address_encode(ctx->to_address),
(resent_id != NULL ? resent_id : ""),
(list_id != NULL ? list_id : ""));
+ return SIEVE_EXEC_OK;
+}
+
+static int
+act_redirect_check_loop_header(const struct sieve_action_exec_env *aenv,
+ struct mail *mail, bool *loop_detected_r)
+{
+ struct sieve_message_context *msgctx = aenv->msgctx;
+ const char *const *headers;
+ const char *recipient, *user_email;
+ const struct smtp_address *addr;
+ int ret;
+
+ *loop_detected_r = FALSE;
+
+ ret = mail_get_headers(mail, "x-sieve-redirected-from", &headers);
+ if (ret < 0 ) {
+ return sieve_result_mail_error(
+ aenv, mail, "redirect action: "
+ "failed to read header field "
+ "`x-sieve-redirected-from'");
+ }
+
+ if (ret == 0)
+ return SIEVE_EXEC_OK;
+
+ recipient = user_email = NULL;
+ if ((aenv->flags & SIEVE_EXECUTE_FLAG_NO_ENVELOPE) == 0) {
+ addr = sieve_message_get_final_recipient(msgctx);
+ if (addr != NULL)
+ recipient = smtp_address_encode(addr);
+ }
+ addr = sieve_get_user_email(aenv->svinst);
+ if (addr != NULL)
+ user_email = smtp_address_encode(addr);
+
+ while (*headers != NULL) {
+ const char *header = t_str_trim(*headers, " \t\r\n");
+ if (recipient != NULL && strcmp(header, recipient) == 0) {
+ *loop_detected_r = TRUE;
+ break;
+ }
+ if (user_email != NULL && strcmp(header, user_email) == 0) {
+ *loop_detected_r = TRUE;
+ break;
+ }
+ headers++;
+ }
+
+ return SIEVE_EXEC_OK;
+}
+
+static int
+act_redirect_commit(const struct sieve_action *action,
+ const struct sieve_action_exec_env *aenv,
+ void *tr_context ATTR_UNUSED, bool *keep)
+{
+ struct sieve_instance *svinst = aenv->svinst;
+ struct act_redirect_context *ctx =
+ (struct act_redirect_context *) action->context;
+ struct sieve_message_context *msgctx = aenv->msgctx;
+ struct mail *mail = (action->mail != NULL ?
+ action->mail : sieve_message_get_mail(msgctx));
+ const struct sieve_message_data *msgdata = aenv->msgdata;
+ const struct sieve_script_env *senv = aenv->scriptenv;
+ const char *msg_id = msgdata->id, *new_msg_id = NULL;
+ const char *dupeid = NULL;
+ bool loop_detected = FALSE;
+ int ret;
+
+ /*
+ * Prevent mail loops
+ */
+
+ /* Create Message-ID for the message if it has none */
+ if (msg_id == NULL)
+ msg_id = new_msg_id = sieve_message_get_new_id(aenv->svinst);
+
+ /* Create ID for duplicate database lookup */
+ ret = act_redirect_get_duplicate_id(ctx, aenv, msg_id, &dupeid);
+ if (ret != SIEVE_EXEC_OK)
+ return ret;
+ i_assert(dupeid != NULL);
/* Check whether we've seen this message before */
- if (sieve_action_duplicate_check
- (senv, dupeid, strlen(dupeid))) {
- sieve_result_global_log(aenv,
+ if (sieve_action_duplicate_check(senv, dupeid, strlen(dupeid))) {
+ sieve_result_global_log(
+ aenv, "redirect action: "
"discarded duplicate forward to <%s>",
smtp_address_encode(ctx->to_address));
*keep = FALSE;
return SIEVE_EXEC_OK;
}
+ /* Check whether we've seen this message before based on added headers
+ */
+ ret = act_redirect_check_loop_header(aenv, mail, &loop_detected);
+ if (ret != SIEVE_EXEC_OK)
+ return ret;
+ if (loop_detected) {
+ sieve_result_global_log(
+ aenv, "redirect action: "
+ "not forwarding message to <%s>: "
+ "the `x-sieve-redirected-from' header indicates a mail loop",
+ smtp_address_encode(ctx->to_address));
+ return SIEVE_EXEC_OK;
+ }
+
/*
* Try to forward the message
*/
- if ( (ret=act_redirect_send
- (aenv, mail, ctx, new_msg_id)) == SIEVE_EXEC_OK) {
-
- /* Mark this message id as forwarded to the specified destination */
+ ret = act_redirect_send(aenv, mail, ctx, new_msg_id);
+ if (ret == SIEVE_EXEC_OK) {
+ /* Mark this message id as forwarded to the specified
+ destination */
sieve_action_duplicate_mark(senv, dupeid, strlen(dupeid),
ioloop_time + svinst->redirect_duplicate_period);
- sieve_result_global_log(aenv, "forwarded to <%s>",
+ sieve_result_global_log(
+ aenv, "redirect action: forwarded to <%s>",
smtp_address_encode(ctx->to_address));
/* Indicate that message was successfully forwarded */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.3-pigeonhole-0.5.5/src/lib-sieve/plugins/editheader/ext-editheader-common.c new/dovecot-2.3-pigeonhole-0.5.6/src/lib-sieve/plugins/editheader/ext-editheader-common.c
--- old/dovecot-2.3-pigeonhole-0.5.5/src/lib-sieve/plugins/editheader/ext-editheader-common.c 2019-03-05 12:53:18.000000000 +0100
+++ new/dovecot-2.3-pigeonhole-0.5.6/src/lib-sieve/plugins/editheader/ext-editheader-common.c 2019-04-30 14:26:38.000000000 +0200
@@ -156,6 +156,8 @@
if ( strcasecmp(hname, "subject") == 0 )
return TRUE;
+ if ( strcasecmp(hname, "x-sieve-redirected-from") == 0 )
+ return FALSE;
if ( (header=ext_editheader_config_header_find
(ext_config, hname)) == NULL )
@@ -174,6 +176,8 @@
if ( strcasecmp(hname, "received") == 0
|| strcasecmp(hname, "auto-submitted") == 0 )
return FALSE;
+ if ( strcasecmp(hname, "x-sieve-redirected-from") == 0 )
+ return FALSE;
if ( strcasecmp(hname, "subject") == 0 )
return TRUE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.3-pigeonhole-0.5.5/src/lib-sieve/sieve-result.c new/dovecot-2.3-pigeonhole-0.5.6/src/lib-sieve/sieve-result.c
--- old/dovecot-2.3-pigeonhole-0.5.5/src/lib-sieve/sieve-result.c 2019-03-05 12:53:18.000000000 +0100
+++ new/dovecot-2.3-pigeonhole-0.5.6/src/lib-sieve/sieve-result.c 2019-04-30 14:26:38.000000000 +0200
@@ -139,8 +139,7 @@
sieve_message_context_unref(&(*result)->action_env.msgctx);
- if ( hash_table_is_created((*result)->action_contexts) )
- hash_table_destroy(&(*result)->action_contexts);
+ hash_table_destroy(&(*result)->action_contexts);
if ( (*result)->action_env.ehandler != NULL )
sieve_error_handler_unref(&(*result)->action_env.ehandler);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.3-pigeonhole-0.5.5/src/lib-sieve/sieve.c new/dovecot-2.3-pigeonhole-0.5.6/src/lib-sieve/sieve.c
--- old/dovecot-2.3-pigeonhole-0.5.5/src/lib-sieve/sieve.c 2019-03-05 12:53:18.000000000 +0100
+++ new/dovecot-2.3-pigeonhole-0.5.6/src/lib-sieve/sieve.c 2019-04-30 14:26:38.000000000 +0200
@@ -714,14 +714,16 @@
sieve_multiscript_execute(mscript,
action_ehandler, flags, &mscript->keep);
}
- mscript->active =
- ( mscript->active && mscript->keep && mscript->status > 0 );
+ if ( !mscript->keep )
+ mscript->active = FALSE;
}
- if ( mscript->status <= 0 )
+ if ( !mscript->active || mscript->status <= 0 ) {
+ mscript->active = FALSE;
return FALSE;
+ }
- return mscript->active;
+ return TRUE;
}
bool sieve_multiscript_will_discard
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.3-pigeonhole-0.5.5/src/plugins/imapsieve/imap-sieve-storage.c new/dovecot-2.3-pigeonhole-0.5.6/src/plugins/imapsieve/imap-sieve-storage.c
--- old/dovecot-2.3-pigeonhole-0.5.5/src/plugins/imapsieve/imap-sieve-storage.c 2019-03-05 12:53:18.000000000 +0100
+++ new/dovecot-2.3-pigeonhole-0.5.6/src/plugins/imapsieve/imap-sieve-storage.c 2019-04-30 14:26:38.000000000 +0200
@@ -1157,8 +1157,7 @@
if (isuser->isieve != NULL)
imap_sieve_deinit(&isuser->isieve);
- if (hash_table_is_created(isuser->mbox_rules))
- hash_table_destroy(&isuser->mbox_rules);
+ hash_table_destroy(&isuser->mbox_rules);
if (array_is_created(&isuser->mbox_patterns))
array_free(&isuser->mbox_patterns);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.3-pigeonhole-0.5.5/tests/execute/smtp.svtest new/dovecot-2.3-pigeonhole-0.5.6/tests/execute/smtp.svtest
--- old/dovecot-2.3-pigeonhole-0.5.5/tests/execute/smtp.svtest 2019-03-05 12:53:18.000000000 +0100
+++ new/dovecot-2.3-pigeonhole-0.5.6/tests/execute/smtp.svtest 2019-04-30 14:26:38.000000000 +0200
@@ -346,3 +346,104 @@
}
}
+/*
+ * Redirect mail loop (sieve_user_email)
+ */
+
+test_result_reset;
+test_set "message" text:
+X-Sieve-Redirected-From: t.sirainen(a)example.net
+From: stephan(a)example.org
+To: tss(a)example.net
+Subject: Frop!
+
+Frop!
+.
+;
+test_set "envelope.from" "sirius(a)example.org";
+test_set "envelope.to" "timo(a)example.net";
+test_set "envelope.orig_to" "tss(a)example.net";
+
+test_config_set "sieve_redirect_envelope_from" "user_email";
+test_config_set "sieve_user_email" "t.sirainen(a)example.net";
+test_config_reload;
+
+test "Redirect mail loop (sieve_user_email)" {
+ redirect "cras(a)example.net";
+
+ if not test_result_execute {
+ test_fail "failed to execute redirect";
+ }
+
+ if test_message :smtp 0 {
+ test_fail "failed to recognize mail loop";
+ }
+}
+
+/*
+ * Redirect mail loop (final recipient)
+ */
+
+test_result_reset;
+test_set "message" text:
+X-Sieve-Redirected-From: timo(a)example.net
+From: stephan(a)example.org
+To: tss(a)example.net
+Subject: Frop!
+
+Frop!
+.
+;
+test_set "envelope.from" "sirius(a)example.org";
+test_set "envelope.to" "timo(a)example.net";
+test_set "envelope.orig_to" "tss(a)example.net";
+
+test_config_reload;
+
+test "Redirect mail loop (final recipient)" {
+ redirect "cras(a)example.net";
+
+ if not test_result_execute {
+ test_fail "failed to execute redirect";
+ }
+
+ if test_message :smtp 0 {
+ test_fail "failed to recognize mail loop";
+ }
+}
+
+/*
+ * Redirect mail loop (multiple headers)
+ */
+
+test_result_reset;
+test_set "message" text:
+X-Sieve-Redirected-From: stephan(a)example.net
+From: stephan(a)example.org
+To: tss(a)example.net
+Subject: Frop!
+X-Sieve-Redirected-From: t.sirainen(a)example.net
+X-Sieve-Redirected-From: t.sirainen(a)example.com
+
+Frop!
+.
+;
+test_set "envelope.from" "sirius(a)example.org";
+test_set "envelope.to" "timo(a)example.net";
+test_set "envelope.orig_to" "tss(a)example.net";
+
+test_config_set "sieve_redirect_envelope_from" "user_email";
+test_config_set "sieve_user_email" "t.sirainen(a)example.net";
+test_config_reload;
+
+test "Redirect mail loop (sieve_user_email)" {
+ redirect "cras(a)example.net";
+
+ if not test_result_execute {
+ test_fail "failed to execute redirect";
+ }
+
+ if test_message :smtp 0 {
+ test_fail "failed to recognize mail loop";
+ }
+}
++++++ dovecot-2.3-pigeonhole-0.5.5.tar.gz -> dovecot-2.3.6.tar.gz ++++++
/work/SRC/openSUSE:Factory/dovecot23/dovecot-2.3-pigeonhole-0.5.5.tar.gz /work/SRC/openSUSE:Factory/.dovecot23.new.5148/dovecot-2.3.6.tar.gz differ: char 5, line 1
1
0
Hello community,
here is the log from the commit of package monitoring-plugins for openSUSE:Factory checked in at 2019-05-02 19:18:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/monitoring-plugins (Old)
and /work/SRC/openSUSE:Factory/.monitoring-plugins.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "monitoring-plugins"
Thu May 2 19:18:26 2019 rev:15 rq:699682 version:2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/monitoring-plugins/monitoring-plugins.changes 2019-04-24 13:57:08.923997461 +0200
+++ /work/SRC/openSUSE:Factory/.monitoring-plugins.new.5148/monitoring-plugins.changes 2019-05-02 19:18:30.517548011 +0200
@@ -5 +5 @@
- sle12/leap42 ping does not know the -4 parameter (boo#132903)
+ sle12/leap42 ping does not know the -4 parameter (boo#1132903)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
1
0
Hello community,
here is the log from the commit of package python-irc for openSUSE:Factory checked in at 2019-05-02 19:18:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-irc (Old)
and /work/SRC/openSUSE:Factory/.python-irc.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-irc"
Thu May 2 19:18:22 2019 rev:5 rq:699681 version:17.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-irc/python-irc.changes 2019-04-08 20:53:04.210547837 +0200
+++ /work/SRC/openSUSE:Factory/.python-irc.new.5148/python-irc.changes 2019-05-02 19:18:26.961541557 +0200
@@ -1,0 +2,6 @@
+Tue Apr 30 09:17:40 UTC 2019 - Bernhard Wiedemann <bwiedemann(a)suse.com>
+
+- Drop test .pyc files from doc dir to make package build reproducible
+ (boo#1047218)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-irc.spec ++++++
--- /var/tmp/diff_new_pack.s2Rk0A/_old 2019-05-02 19:18:27.441542430 +0200
+++ /var/tmp/diff_new_pack.s2Rk0A/_new 2019-05-02 19:18:27.453542452 +0200
@@ -79,6 +79,7 @@
%if 0%{?suse_version} > 1500
%check
+export PYTHONDONTWRITEBYTECODE=1
%pytest
%endif
1
0
Hello community,
here is the log from the commit of package qwtplot3d for openSUSE:Factory checked in at 2019-05-02 19:18:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qwtplot3d (Old)
and /work/SRC/openSUSE:Factory/.qwtplot3d.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qwtplot3d"
Thu May 2 19:18:16 2019 rev:2 rq:699673 version:0.2.7+git20190410.a6d0890d
Changes:
--------
--- /work/SRC/openSUSE:Factory/qwtplot3d/qwtplot3d.changes 2017-08-28 15:32:58.571387134 +0200
+++ /work/SRC/openSUSE:Factory/.qwtplot3d.new.5148/qwtplot3d.changes 2019-05-02 19:18:26.145540074 +0200
@@ -1,0 +2,10 @@
+Sat Apr 27 12:59:02 UTC 2019 - christophe(a)krop.fr
+
+- Update to version 0.2.7+git20190410.a6d0890d
+ Switch to a git snapshot. This version supports Qt5 which is
+ required to build scidavis 1.25.
+- Drop glu_include.patch
+- Drop qwtplot3d-gcc43.patch
+- Add build_a_shared_lib.patch to build shared library.
+
+-------------------------------------------------------------------
Old:
----
glu_include.patch
qwtplot3d-0.2.7.tar.bz2
qwtplot3d-gcc43.patch
New:
----
_service
_servicedata
build_a_shared_lib.patch
qwtplot3d-0.2.7+git20190410.a6d0890d.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qwtplot3d.spec ++++++
--- /var/tmp/diff_new_pack.yJdg1z/_old 2019-05-02 19:18:26.773541216 +0200
+++ /var/tmp/diff_new_pack.yJdg1z/_new 2019-05-02 19:18:26.777541223 +0200
@@ -1,7 +1,7 @@
#
# spec file for package qwtplot3d
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,41 +12,41 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define soname 0
Name: qwtplot3d
-Version: 0.2.7
+Version: 0.2.7+git20190410.a6d0890d
Release: 0
Summary: A feature-rich Qt/OpenGL-based C++ programming library
License: Zlib
Group: Development/Libraries/C and C++
-Url: http://qwtplot3d.sourceforge.net/
-Source: qwtplot3d-%{version}.tar.bz2
-# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
-Patch0: qwtplot3d-gcc43.patch
-# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
-Patch1: glu_include.patch
+URL: https://github.com/copasi/copasi-dependencies/tree/master/src/qwtplot3d-qt4
+Source: %{name}-%{version}.tar.xz
+# PATCH-FIX-OPENSUSE
+Patch0: build_a_shared_lib.patch
BuildRequires: Mesa-devel
-BuildRequires: dos2unix
-%if 0%{?suse_version} > 1220
-BuildRequires: glu-devel
-%endif
-BuildRequires: qt-devel
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: cmake
+BuildRequires: pkgconfig
+BuildRequires: cmake(Qt5Core)
+BuildRequires: cmake(Qt5Gui)
+BuildRequires: cmake(Qt5OpenGL)
+BuildRequires: cmake(Qt5Xml)
+BuildRequires: pkgconfig(glu)
+BuildRequires: pkgconfig(zlib)
%description
QwtPlot3D is not a program, but a feature-rich Qt/OpenGL-based C++
programming library. It provides essentially a bunch of 3D widgets
for programmers.
-%package -n lib%{name}%{soname}
+%package -n libqwtplot3d-qt5-%{soname}
Summary: Shared library containing the QwtPlot3D Widget set
Group: System/Libraries
-%description -n lib%{name}%{soname}
+%description -n libqwtplot3d-qt5-%{soname}
QwtPlot3D is not a program, but a feature-rich Qt/OpenGL-based C++
programming library. It provides essentially a bunch of 3D widgets
for programmers.
@@ -54,50 +54,37 @@
%package devel
Summary: Development tools for programs which uses QwtPlot3D Widget set
Group: Development/Libraries/C and C++
-Requires: lib%{name}%{soname} = %{version}
-Requires: qt-devel
+Requires: libqwtplot3d-qt5-%{soname} = %{version}
%description devel
QwtPlot3D is a feature-rich Qt/OpenGL-based C++ programming library.
It provides essentially a bunch of 3D widgets for programmers.
%prep
-%setup -q -n qwtplot3d
+%setup -q
%patch0 -p1
-%patch1 -p0
-dos2unix COPYING
-find examples -type f -exec dos2unix {} +
%build
-qmake qwtplot3d.pro -o Makefile
-make %{?_smp_mflags}
+%cmake -DSELECT_QT=Qt5 \
+ -DWITH_ZLIB=ON \
+ -DCMAKE_INSTALL_INCLUDEDIR=%{_libqt5_includedir}/%{name}
+
+%make_jobs
%install
-mkdir -p %{buildroot}%{_includedir}/qwtplot3d
-mkdir -p %{buildroot}%{_libdir}
-for n in include/*.h ; do
- install -m 644 $n %{buildroot}%{_includedir}/qwtplot3d
-done
-# install, preserving links
-chmod 644 lib/libqwtplot3d.so*
-for n in lib/libqwtplot3d.so* ; do
- cp -d $n %{buildroot}%{_libdir}
-done
-
-%post -n lib%{name}%{soname} -p /sbin/ldconfig
-
-%postun -n lib%{name}%{soname} -p /sbin/ldconfig
-
-%files -n lib%{name}%{soname}
-%defattr(-,root,root)
-%doc COPYING
-%{_libdir}/lib%{name}.so.*
+%cmake_install
+
+%post -n libqwtplot3d-qt5-%{soname} -p /sbin/ldconfig
+%postun -n libqwtplot3d-qt5-%{soname} -p /sbin/ldconfig
+
+%files -n libqwtplot3d-qt5-%{soname}
+%license COPYING
+%{_libdir}/libqwtplot3d-qt5.so.*
%files devel
-%defattr(-,root,root)
-%doc COPYING examples
-%{_libdir}/lib%{name}.so
-%dir %{_includedir}/qwtplot3d
-%{_includedir}/qwtplot3d/qwt3d*.h
+%license COPYING
+%doc examples
+%{_libdir}/libqwtplot3d-qt5.so
+%{_libqt5_includedir}/qwtplot3d/
%changelog
++++++ _service ++++++
<services>
<service mode="disabled" name="tar_scm">
<param name="changesgenerate">enable</param>
<param name="versionformat">0.2.7+git%cd.%h</param>
<param name="url">https://github.com/copasi/copasi-dependencies</param>
<param name="subdir">src/qwtplot3d-qt4</param>
<param name="scm">git</param>
<param name="filename">qwtplot3d</param>
</service>
<service mode="disabled" name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service mode="disabled" name="set_version"/>
</services>
++++++ _servicedata ++++++
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/copasi/copasi-dependencies</param>
<param name="changesrevision">527adc603a454aefbfd87ecb998f56ed3b6359ab</param>
</service>
</servicedata>
++++++ build_a_shared_lib.patch ++++++
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 312690d..334bf30 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -171,16 +171,22 @@ endif()
set(SOURCES ${SOURCES} ${MOC_FILES})
-add_library(qwtplot3d STATIC ${SOURCES} ${HEADERS})
-QT_BIND_TO_TARGET(qwtplot3d)
+add_library(qwtplot3d-qt5 SHARED ${SOURCES} ${HEADERS})
+QT_BIND_TO_TARGET(qwtplot3d-qt5)
+
+target_link_libraries(qwtplot3d-qt5 GL GLU)
if (ZLIB_FOUND)
-target_link_libraries(qwtplot3d ${ZLIB_LIBRARIES})
+target_link_libraries(qwtplot3d-qt5 ${ZLIB_LIBRARIES})
endif(ZLIB_FOUND)
+set_target_properties(qwtplot3d-qt5 PROPERTIES
+ VERSION 0.2.7
+ SOVERSION 0
+)
install(FILES ${HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
-INSTALL(TARGETS qwtplot3d
+INSTALL(TARGETS qwtplot3d-qt5
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
1
0
Hello community,
here is the log from the commit of package ppc64-diag for openSUSE:Factory checked in at 2019-05-02 19:18:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ppc64-diag (Old)
and /work/SRC/openSUSE:Factory/.ppc64-diag.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ppc64-diag"
Thu May 2 19:18:12 2019 rev:43 rq:699671 version:2.7.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/ppc64-diag/ppc64-diag.changes 2019-01-24 14:13:05.943384355 +0100
+++ /work/SRC/openSUSE:Factory/.ppc64-diag.new.5148/ppc64-diag.changes 2019-05-02 19:18:18.257525735 +0200
@@ -1,0 +2,20 @@
+Tue Apr 30 12:31:54 UTC 2019 - josef.moellers(a)suse.com
+
+- Upgrade to upstream version 2.7.5
+ * Obsoletes 6 patches:
+ + ppc64-diag.bug-1072708_fix_service_scripts.patch
+ + ppc64-diag.bug-1072708_create_diag_disk_path.patch
+ + ppc64-diag.bug-1072708_increase_buffer_for_vpd.patch
+ + ppc64-diag.bug-1072708_remove_timestamp.patch
+ + ppc64-diag.bug-1072708_create_diag_disk_log_directory.patch
+ + bsc1113097-run_diag_encl-exit-gracefully.patch
+ * rather that just fail, give more concise
+ error messages in configure script
+ * use bison rather than yacc
+ * probe for indicators on running platform
+ * usysattn, usysfault and usysident: add -P option to limit the
+ operations to only the platform indicators excluding the
+ enclosures.
+ [jsc:SLE-6081]
+
+-------------------------------------------------------------------
Old:
----
bsc1113097-run_diag_encl-exit-gracefully.patch
ppc64-diag-2.7.4.tar.gz
ppc64-diag.bug-1072708_create_diag_disk_log_directory.patch
ppc64-diag.bug-1072708_create_diag_disk_path.patch
ppc64-diag.bug-1072708_fix_service_scripts.patch
ppc64-diag.bug-1072708_increase_buffer_for_vpd.patch
ppc64-diag.bug-1072708_remove_timestamp.patch
New:
----
ppc64-diag-2.7.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ppc64-diag.spec ++++++
--- /var/tmp/diff_new_pack.4op1ch/_old 2019-05-02 19:18:19.573528127 +0200
+++ /var/tmp/diff_new_pack.4op1ch/_new 2019-05-02 19:18:19.573528127 +0200
@@ -12,26 +12,20 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via https://bugs.opensuse.org/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: ppc64-diag
-Version: 2.7.4
+Version: 2.7.5
Release: 0
Summary: Linux for Power Platform Diagnostics
License: GPL-2.0-or-later
Group: System/Monitoring
-URL: http://sourceforge.net/projects/linux-diag/files/ppc64-diag
+Url: http://sourceforge.net/projects/linux-diag/files/ppc64-diag
Source0: http://downloads.sourceforge.net/project/linux-diag/ppc64-diag/v%{version}/…
#PATCH-FIX-OPENSUSE - ppc64-diag.varunused.patch - fix unused variables
Patch1: ppc64-diag.varunused.patch
-Patch2: ppc64-diag.bug-1072708_fix_service_scripts.patch
-Patch3: ppc64-diag.bug-1072708_create_diag_disk_path.patch
-Patch4: ppc64-diag.bug-1072708_increase_buffer_for_vpd.patch
-Patch5: ppc64-diag.bug-1072708_remove_timestamp.patch
-Patch6: ppc64-diag.bug-1072708_create_diag_disk_log_directory.patch
-Patch7: bsc1113097-run_diag_encl-exit-gracefully.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
@@ -71,12 +65,6 @@
%prep
%setup -q
%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
%build
sed -i 's@%{_prefix}/libexec/ppc64-diag@%{_libexecdir}@g' scripts/opal_errd.service
++++++ ppc64-diag-2.7.4.tar.gz -> ppc64-diag-2.7.5.tar.gz ++++++
++++ 8812 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package xfce4-panel-plugin-datetime for openSUSE:Factory checked in at 2019-05-02 19:18:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xfce4-panel-plugin-datetime (Old)
and /work/SRC/openSUSE:Factory/.xfce4-panel-plugin-datetime.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xfce4-panel-plugin-datetime"
Thu May 2 19:18:04 2019 rev:15 rq:699653 version:0.7.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/xfce4-panel-plugin-datetime/xfce4-panel-plugin-datetime.changes 2017-10-07 17:50:29.691754202 +0200
+++ /work/SRC/openSUSE:Factory/.xfce4-panel-plugin-datetime.new.5148/xfce4-panel-plugin-datetime.changes 2019-05-02 19:18:12.445515170 +0200
@@ -1,0 +2,9 @@
+Tue Apr 30 10:44:47 UTC 2019 - maurizio.galli(a)gmail.com
+
+- Update to version 0.7.1
+ * Removed the frame around the calendar popup to simplify appearance
+ * Spacing improvements in the preferences dialog (bxo#14662)
+ * Fixed build warnings
+ * Updated translations
+
+-------------------------------------------------------------------
Old:
----
xfce4-datetime-plugin-0.7.0.tar.bz2
New:
----
xfce4-datetime-plugin-0.7.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xfce4-panel-plugin-datetime.spec ++++++
--- /var/tmp/diff_new_pack.V6QgVm/_old 2019-05-02 19:18:12.977516137 +0200
+++ /var/tmp/diff_new_pack.V6QgVm/_new 2019-05-02 19:18:12.981516144 +0200
@@ -1,7 +1,7 @@
#
# spec file for package xfce4-panel-plugin-datetime
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -20,13 +20,13 @@
%define plugin_name xfce4-datetime-plugin
Name: xfce4-panel-plugin-datetime
-Version: 0.7.0
+Version: 0.7.1
Release: 0
Summary: Date And Time Plugin for the Xfce Panel
-License: GPL-2.0+
+License: GPL-2.0-or-later
Group: System/GUI/XFCE
-Url: http://goodies.xfce.org/projects/panel-plugins/xfce4-datetime-plugin
-Source0: http://archive.xfce.org/src/panel-plugins/%{plugin_name}/0.7/%{plugin_name}…
+Url: https://goodies.xfce.org/projects/panel-plugins/xfce4-datetime-plugin
+Source0: https://archive.xfce.org/src/panel-plugins/%{plugin_name}/0.7/%{plugin_name…
BuildRequires: fdupes
BuildRequires: intltool
BuildRequires: pkgconfig(libxfce4panel-2.0) >= %panel_version
@@ -48,7 +48,7 @@
%build
%configure --disable-static
-make %{_smp_mflags} V=1
+%make_build
%install
%make_install
@@ -63,7 +63,8 @@
%files
%defattr(-,root,root)
-%doc AUTHORS ChangeLog COPYING NEWS THANKS
+%doc AUTHORS ChangeLog NEWS THANKS
+%license COPYING
%{_libdir}/xfce4/panel/plugins/libdatetime.so
%{_datadir}/xfce4/panel/plugins/datetime.desktop
++++++ xfce4-datetime-plugin-0.7.0.tar.bz2 -> xfce4-datetime-plugin-0.7.1.tar.bz2 ++++++
++++ 43793 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package chromium for openSUSE:Factory checked in at 2019-05-02 19:17:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/chromium (Old)
and /work/SRC/openSUSE:Factory/.chromium.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "chromium"
Thu May 2 19:17:20 2019 rev:216 rq:699638 version:74.0.3729.108
Changes:
--------
--- /work/SRC/openSUSE:Factory/chromium/chromium.changes 2019-04-08 10:35:47.599229655 +0200
+++ /work/SRC/openSUSE:Factory/.chromium.new.5148/chromium.changes 2019-05-02 19:17:47.117469129 +0200
@@ -1,0 +2,43 @@
+Tue Apr 30 09:04:56 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 74.0.3729.108 bsc#1133313:
+ * CVE-2019-5805: Use after free in PDFium
+ * CVE-2019-5806: Integer overflow in Angle
+ * CVE-2019-5807: Memory corruption in V8
+ * CVE-2019-5808: Use after free in Blink
+ * CVE-2019-5809: Use after free in Blink
+ * CVE-2019-5810: User information disclosure in Autofill
+ * CVE-2019-5811: CORS bypass in Blink
+ * CVE-2019-5813: Out of bounds read in V8
+ * CVE-2019-5814: CORS bypass in Blink
+ * CVE-2019-5815: Heap buffer overflow in Blink
+ * CVE-2019-5818: Uninitialized value in media reader
+ * CVE-2019-5819: Incorrect escaping in developer tools
+ * CVE-2019-5820: Integer overflow in PDFium
+ * CVE-2019-5821: Integer overflow in PDFium
+ * CVE-2019-5822: CORS bypass in download manager
+ * CVE-2019-5823: Forced navigation from service worker
+ * CVE-2019-5812: URL spoof in Omnibox on iOS
+ * CVE-2019-5816: Exploit persistence extension on Android
+ * CVE-2019-5817: Heap buffer overflow in Angle on Windows
+- Add patches:
+ * 00-basevalue.patch
+ * 01-basevalue.patch
+ * 02-basevalue.patch
+ * 03-basevalue.patch
+ * 04-basevalue.patch
+ * 05-basevalue.patch
+ * 06-basevalue.patch
+ * old-libva.patch
+ * quic.patch
+- Remove patches:
+ * chromium-73.0.3683.75-pipewire-cstring-fix.patch
+ * chromium-fix_crashpad.patch
+ * chromium-fix_swiftshader.patch
+ * chromium-old-libva.patch
+- Rebase patches:
+ * chromium-gcc.patch
+ * chromium-non-void-return.patch
+ * chromium-old-glibc.patch
+
+-------------------------------------------------------------------
Old:
----
chromium-73.0.3683.103.tar.xz
chromium-73.0.3683.75-pipewire-cstring-fix.patch
chromium-fix_crashpad.patch
chromium-fix_swiftshader.patch
chromium-old-libva.patch
New:
----
00-basevalue.patch
01-basevalue.patch
02-basevalue.patch
03-basevalue.patch
04-basevalue.patch
05-basevalue.patch
06-basevalue.patch
chromium-74.0.3729.108.tar.xz
old-libva.patch
quic.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ chromium.spec ++++++
--- /var/tmp/diff_new_pack.yvyoKb/_old 2019-05-02 19:18:03.701499275 +0200
+++ /var/tmp/diff_new_pack.yvyoKb/_new 2019-05-02 19:18:03.701499275 +0200
@@ -48,7 +48,7 @@
%bcond_with clang
%bcond_with wayland
Name: chromium
-Version: 73.0.3683.103
+Version: 74.0.3729.108
Release: 0
Summary: Google's open source browser project
License: BSD-3-Clause AND LGPL-2.1-or-later
@@ -81,22 +81,25 @@
Patch10: chromium-system-libusb.patch
Patch11: chromium-old-glibc.patch
Patch12: chromium-skia-aarch64-buildfix.patch
-Patch13: chromium-old-libva.patch
-# GCC does not support -Wno-error=header-hygiene flag
-Patch14: chromium-fix_swiftshader.patch
-Patch15: chromium-gcc.patch
-# Patch-FIX-UPSTREAM https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1454376
-Patch16: chromium-fix_crashpad.patch
-Patch17: chromium-73.0.3683.75-pipewire-cstring-fix.patch
+Patch13: chromium-gcc.patch
+Patch14: 00-basevalue.patch
+Patch15: 01-basevalue.patch
+Patch16: 02-basevalue.patch
+Patch17: 03-basevalue.patch
+Patch18: 04-basevalue.patch
+Patch19: 05-basevalue.patch
+Patch20: 06-basevalue.patch
+Patch21: quic.patch
# Google seem not too keen on merging this but GPU accel is quite important
# https://chromium-review.googlesource.com/c/chromium/src/+/532294
# https://github.com/saiarcot895/chromium-ubuntu-build/tree/master/debian/pat…
# Recreated from scratch to be smaller and use system the orginal switches
# (default on) compared to the PR
Patch100: chromium-vaapi.patch
+Patch101: old-libva.patch
# Google does not care much about system libs here
# https://bugs.chromium.org/p/skia/issues/detail?id=6663
-Patch101: chromium-skia-system-fontconfig.patch
+Patch102: chromium-skia-system-fontconfig.patch
# PATCH-FIX-SUSE: allow prop codecs to be set with chromium branding
Patch202: chromium-prop-codecs.patch
BuildRequires: SDL-devel
@@ -230,7 +233,7 @@
BuildRequires: pkgconfig(libtcmalloc)
%endif
%if %{with system_harfbuzz}
-BuildRequires: pkgconfig(harfbuzz) > 1.9.0
+BuildRequires: pkgconfig(harfbuzz) > 2.3.0
%endif
%if %{with system_libxml}
BuildRequires: pkgconfig(libxml-2.0) >= 2.9.5
@@ -346,8 +349,10 @@
third_party/crashpad/crashpad/third_party/zlib
third_party/crc32c
third_party/cros_system_api
+ third_party/dav1d
third_party/devscripts
third_party/dom_distiller_js
+ third_party/emoji-segmenter
third_party/fips181
third_party/flatbuffers
third_party/flot
@@ -386,6 +391,7 @@
third_party/metrics_proto
third_party/minigbm
third_party/modp_b64
+ third_party/nasm
third_party/node
third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
third_party/openh264
++++++ 00-basevalue.patch ++++++
>From 0e121588d500217a38d57f5e285aa586676059b2 Mon Sep 17 00:00:00 2001
From: Sergey Abbakumov <sabbakumov(a)yandex-team.ru>
Date: Fri, 15 Mar 2019 22:32:16 +0000
Subject: [PATCH] base::Value::SetKey/SetPath performance improvements
Use rvalue references to avoid copying sizeof(base::Value).
This commit gives about -20KB of the browser.dll and browser_child.dll
size. Also it reduces renderer memory consumption by ~200
KB max.
Bug: 646113
Change-Id: I8c86594838292a2faf4d134b899a7978dbc214fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1520407
Reviewed-by: danakj <danakj(a)chromium.org>
Commit-Queue: danakj <danakj(a)chromium.org>
Cr-Commit-Position: refs/heads/master@{#641329}
---
base/values.cc | 10 +++++-----
base/values.h | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/base/values.cc b/base/values.cc
index 2b0c6c8163d8..0c002551b317 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -353,7 +353,7 @@ bool Value::RemoveKey(StringPiece key) {
return dict_.erase(key) != 0;
}
-Value* Value::SetKey(StringPiece key, Value value) {
+Value* Value::SetKey(StringPiece key, Value&& value) {
CHECK(is_dict());
// NOTE: We can't use |insert_or_assign| here, as only |try_emplace| does
// an explicit conversion from StringPiece to std::string if necessary.
@@ -366,7 +366,7 @@ Value* Value::SetKey(StringPiece key, Value value) {
return result.first->second.get();
}
-Value* Value::SetKey(std::string&& key, Value value) {
+Value* Value::SetKey(std::string&& key, Value&& value) {
CHECK(is_dict());
return dict_
.insert_or_assign(std::move(key),
@@ -374,7 +374,7 @@ Value* Value::SetKey(std::string&& key, Value value) {
.first->second.get();
}
-Value* Value::SetKey(const char* key, Value value) {
+Value* Value::SetKey(const char* key, Value&& value) {
return SetKey(StringPiece(key), std::move(value));
}
@@ -425,12 +425,12 @@ const Value* Value::FindPathOfType(span<const StringPiece> path,
return result;
}
-Value* Value::SetPath(std::initializer_list<StringPiece> path, Value value) {
+Value* Value::SetPath(std::initializer_list<StringPiece> path, Value&& value) {
DCHECK_GE(path.size(), 2u) << "Use SetKey() for a path of length 1.";
return SetPath(make_span(path.begin(), path.size()), std::move(value));
}
-Value* Value::SetPath(span<const StringPiece> path, Value value) {
+Value* Value::SetPath(span<const StringPiece> path, Value&& value) {
DCHECK(path.begin() != path.end()); // Can't be empty path.
// Walk/construct intermediate dictionaries. The last element requires
diff --git a/base/values.h b/base/values.h
index 7546fa53756d..429ef1dfdebd 100644
--- a/base/values.h
+++ b/base/values.h
@@ -210,11 +210,11 @@ class BASE_EXPORT Value {
//
// Example:
// SetKey("foo", std::move(myvalue));
- Value* SetKey(StringPiece key, Value value);
+ Value* SetKey(StringPiece key, Value&& value);
// This overload results in a performance improvement for std::string&&.
- Value* SetKey(std::string&& key, Value value);
+ Value* SetKey(std::string&& key, Value&& value);
// This overload is necessary to avoid ambiguity for const char* arguments.
- Value* SetKey(const char* key, Value value);
+ Value* SetKey(const char* key, Value&& value);
// This attemps to remove the value associated with |key|. In case of failure,
// e.g. the key does not exist, |false| is returned and the underlying
@@ -276,8 +276,8 @@ class BASE_EXPORT Value {
// value.SetPath(components, std::move(myvalue));
//
// Note: If there is only one component in the path, use SetKey() instead.
- Value* SetPath(std::initializer_list<StringPiece> path, Value value);
- Value* SetPath(span<const StringPiece> path, Value value);
+ Value* SetPath(std::initializer_list<StringPiece> path, Value&& value);
+ Value* SetPath(span<const StringPiece> path, Value&& value);
// Tries to remove a Value at the given path.
//
--
2.21.0
++++++ 01-basevalue.patch ++++++
>From e1b1f3a5f273c8da533fad495b9de316e2c83c9b Mon Sep 17 00:00:00 2001
From: jdoerrie <jdoerrie(a)chromium.org>
Date: Sat, 16 Mar 2019 04:08:01 +0000
Subject: [PATCH] [base] Add Dead Type to base::Value
This change adds a temporary DEAD type to base::Value which should help
to track down use-after-free bugs. Furthermore, this change also removes
the now unneeded is_alive_ flag.
Bug: 859477, 941404
Change-Id: I9b7a2f3cbb0b22d7e3ed35b2453537419f3f7e55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1478897
Reviewed-by: Pavol Marko <pmarko(a)chromium.org>
Reviewed-by: Tao Bai <michaelbai(a)chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson(a)chromium.org>
Reviewed-by: Mike Pinkerton <pinkerton(a)chromium.org>
Reviewed-by: Bill Budge <bbudge(a)chromium.org>
Reviewed-by: Ken Rockot <rockot(a)google.com>
Reviewed-by: Steven Bennetts <stevenjb(a)chromium.org>
Reviewed-by: Daniel Cheng <dcheng(a)chromium.org>
Reviewed-by: David Turner <digit(a)chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson(a)chromium.org>
Cr-Commit-Position: refs/heads/master@{#641404}
---
base/json/json_writer.cc | 5 ++
base/values.cc | 68 ++++++++++++-------
base/values.h | 23 ++-----
base/values_unittest.cc | 10 ++-
.../ui/cocoa/applescript/apple_event_util.mm | 10 +++
chromeos/network/onc/variable_expander.cc | 6 ++
.../core/browser/android/policy_converter.cc | 11 ++-
.../core/common/policy_loader_win_unittest.cc | 8 ++-
.../policy/core/common/policy_test_utils.cc | 5 ++
.../policy/core/common/registry_dict.cc | 4 ++
.../gin_java_script_to_java_types_coercion.cc | 8 ++-
ipc/ipc_message_utils.cc | 11 ++-
mojo/public/cpp/base/values_mojom_traits.h | 7 +-
.../ppb_x509_certificate_private_shared.cc | 2 +
14 files changed, 127 insertions(+), 51 deletions(-)
diff --git a/base/json/json_writer.cc b/base/json/json_writer.cc
index 376a459f9a46..cd020e7fa0c0 100644
--- a/base/json/json_writer.cc
+++ b/base/json/json_writer.cc
@@ -179,6 +179,11 @@ bool JSONWriter::BuildJSONString(const Value& node, size_t depth) {
// Successful only if we're allowed to omit it.
DLOG_IF(ERROR, !omit_binary_values_) << "Cannot serialize binary value.";
return omit_binary_values_;
+
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case Value::Type::DEAD:
+ CHECK(false);
+ return false;
}
// TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
diff --git a/base/values.cc b/base/values.cc
index 0c002551b317..035aa2350cde 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -90,8 +90,6 @@ std::unique_ptr<Value> CopyWithoutEmptyChildren(const Value& node) {
} // namespace
-constexpr uint16_t Value::kMagicIsAlive;
-
// static
std::unique_ptr<Value> Value::CreateWithCopiedBuffer(const char* buffer,
size_t size) {
@@ -112,9 +110,9 @@ Value::Value(Value&& that) noexcept {
InternalMoveConstructFrom(std::move(that));
}
-Value::Value() noexcept : type_(Type::NONE), is_alive_(kMagicIsAlive) {}
+Value::Value() noexcept : type_(Type::NONE) {}
-Value::Value(Type type) : type_(type), is_alive_(kMagicIsAlive) {
+Value::Value(Type type) : type_(type) {
// Initialize with the default value.
switch (type_) {
case Type::NONE:
@@ -141,22 +139,26 @@ Value::Value(Type type) : type_(type), is_alive_(kMagicIsAlive) {
case Type::LIST:
new (&list_) ListStorage();
return;
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case Type::DEAD:
+ CHECK(false);
+ return;
}
+
+ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
+ CHECK(false);
}
Value::Value(bool in_bool)
: bool_type_(Type::BOOLEAN),
- bool_is_alive_(kMagicIsAlive),
bool_value_(in_bool) {}
Value::Value(int in_int)
: int_type_(Type::INTEGER),
- int_is_alive_(kMagicIsAlive),
int_value_(in_int) {}
Value::Value(double in_double)
: double_type_(Type::DOUBLE),
- double_is_alive_(kMagicIsAlive),
double_value_(in_double) {
if (!std::isfinite(double_value_)) {
NOTREACHED() << "Non-finite (i.e. NaN or positive/negative infinity) "
@@ -171,7 +173,6 @@ Value::Value(StringPiece in_string) : Value(std::string(in_string)) {}
Value::Value(std::string&& in_string) noexcept
: string_type_(Type::STRING),
- string_is_alive_(kMagicIsAlive),
string_value_(std::move(in_string)) {
DCHECK(IsStringUTF8(string_value_));
}
@@ -182,21 +183,18 @@ Value::Value(StringPiece16 in_string16) : Value(UTF16ToUTF8(in_string16)) {}
Value::Value(const std::vector<char>& in_blob)
: binary_type_(Type::BINARY),
- binary_is_alive_(kMagicIsAlive),
binary_value_(in_blob.begin(), in_blob.end()) {}
Value::Value(base::span<const uint8_t> in_blob)
: binary_type_(Type::BINARY),
- binary_is_alive_(kMagicIsAlive),
binary_value_(in_blob.begin(), in_blob.end()) {}
Value::Value(BlobStorage&& in_blob) noexcept
: binary_type_(Type::BINARY),
- binary_is_alive_(kMagicIsAlive),
binary_value_(std::move(in_blob)) {}
Value::Value(const DictStorage& in_dict)
- : dict_type_(Type::DICTIONARY), dict_is_alive_(kMagicIsAlive), dict_() {
+ : dict_type_(Type::DICTIONARY), dict_() {
dict_.reserve(in_dict.size());
for (const auto& it : in_dict) {
dict_.try_emplace(dict_.end(), it.first,
@@ -206,11 +204,9 @@ Value::Value(const DictStorage& in_dict)
Value::Value(DictStorage&& in_dict) noexcept
: dict_type_(Type::DICTIONARY),
- dict_is_alive_(kMagicIsAlive),
dict_(std::move(in_dict)) {}
-Value::Value(const ListStorage& in_list)
- : list_type_(Type::LIST), list_is_alive_(kMagicIsAlive), list_() {
+Value::Value(const ListStorage& in_list) : list_type_(Type::LIST), list_() {
list_.reserve(in_list.size());
for (const auto& val : in_list)
list_.emplace_back(val.Clone());
@@ -218,7 +214,6 @@ Value::Value(const ListStorage& in_list)
Value::Value(ListStorage&& in_list) noexcept
: list_type_(Type::LIST),
- list_is_alive_(kMagicIsAlive),
list_(std::move(in_list)) {}
Value& Value::operator=(Value&& that) noexcept {
@@ -246,15 +241,21 @@ Value Value::Clone() const {
return Value(dict_);
case Type::LIST:
return Value(list_);
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case Type::DEAD:
+ CHECK(false);
+ return Value();
}
- NOTREACHED();
+ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
+ CHECK(false);
return Value();
}
Value::~Value() {
InternalCleanup();
- is_alive_ = 0;
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ type_ = Type::DEAD;
}
// static
@@ -654,9 +655,14 @@ bool operator==(const Value& lhs, const Value& rhs) {
});
case Value::Type::LIST:
return lhs.list_ == rhs.list_;
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case Value::Type::DEAD:
+ CHECK(false);
+ return false;
}
- NOTREACHED();
+ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
+ CHECK(false);
return false;
}
@@ -693,9 +699,14 @@ bool operator<(const Value& lhs, const Value& rhs) {
});
case Value::Type::LIST:
return lhs.list_ < rhs.list_;
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case Value::Type::DEAD:
+ CHECK(false);
+ return false;
}
- NOTREACHED();
+ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
+ CHECK(false);
return false;
}
@@ -733,7 +744,6 @@ size_t Value::EstimateMemoryUsage() const {
void Value::InternalMoveConstructFrom(Value&& that) {
type_ = that.type_;
- is_alive_ = that.is_alive_;
switch (type_) {
case Type::NONE:
@@ -759,12 +769,17 @@ void Value::InternalMoveConstructFrom(Value&& that) {
case Type::LIST:
new (&list_) ListStorage(std::move(that.list_));
return;
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case Type::DEAD:
+ CHECK(false);
+ return;
}
+
+ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
+ CHECK(false);
}
void Value::InternalCleanup() {
- CHECK_EQ(is_alive_, kMagicIsAlive);
-
switch (type_) {
case Type::NONE:
case Type::BOOLEAN:
@@ -785,7 +800,14 @@ void Value::InternalCleanup() {
case Type::LIST:
list_.~ListStorage();
return;
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case Type::DEAD:
+ CHECK(false);
+ return;
}
+
+ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
+ CHECK(false);
}
///////////////////// DictionaryValue ////////////////////
diff --git a/base/values.h b/base/values.h
index 429ef1dfdebd..e31cadd83102 100644
--- a/base/values.h
+++ b/base/values.h
@@ -92,7 +92,9 @@ class BASE_EXPORT Value {
STRING,
BINARY,
DICTIONARY,
- LIST
+ LIST,
+ // TODO(crbug.com/859477): Remove once root cause is found.
+ DEAD
// Note: Do not add more types. See the file-level comment above for why.
};
@@ -375,10 +377,6 @@ class BASE_EXPORT Value {
size_t EstimateMemoryUsage() const;
protected:
- // Magic IsAlive signature to debug double frees.
- // TODO(crbug.com/859477): Remove once root cause is found.
- static constexpr uint16_t kMagicIsAlive = 0x2f19;
-
// Technical note:
// The naive way to implement a tagged union leads to wasted bytes
// in the object on CPUs like ARM ones, which impose an 8-byte alignment
@@ -408,8 +406,8 @@ class BASE_EXPORT Value {
// that |double_value_| below is always located at an offset that is a
// multiple of 8, relative to the start of the overall data structure.
//
- // Each struct must declare its own |type_| and |is_alive_| field, which
- // must have a different name, to appease the C++ compiler.
+ // Each struct must declare its own |type_| field, which must have a different
+ // name, to appease the C++ compiler.
//
// Using this technique sizeof(base::Value) == 16 on 32-bit ARM instead
// of 24, without losing any information. Results are unchanged for x86,
@@ -419,24 +417,17 @@ class BASE_EXPORT Value {
// TODO(crbug.com/646113): Make these private once DictionaryValue and
// ListValue are properly inlined.
Type type_ : 8;
-
- // IsAlive member to debug double frees.
- // TODO(crbug.com/859477): Remove once root cause is found.
- uint16_t is_alive_ = kMagicIsAlive;
};
struct {
Type bool_type_ : 8;
- uint16_t bool_is_alive_;
bool bool_value_;
};
struct {
Type int_type_ : 8;
- uint16_t int_is_alive_;
int int_value_;
};
struct {
Type double_type_ : 8;
- uint16_t double_is_alive_;
// Subtle: On architectures that require it, the compiler will ensure
// that |double_value_|'s offset is a multiple of 8 (e.g. 32-bit ARM).
// See technical note above to understand why it is important.
@@ -444,22 +435,18 @@ class BASE_EXPORT Value {
};
struct {
Type string_type_ : 8;
- uint16_t string_is_alive_;
std::string string_value_;
};
struct {
Type binary_type_ : 8;
- uint16_t binary_is_alive_;
BlobStorage binary_value_;
};
struct {
Type dict_type_ : 8;
- uint16_t dict_is_alive_;
DictStorage dict_;
};
struct {
Type list_type_ : 8;
- uint16_t list_is_alive_;
ListStorage list_;
};
};
diff --git a/base/values_unittest.cc b/base/values_unittest.cc
index 0a641bcc7ef4..b23fd8332491 100644
--- a/base/values_unittest.cc
+++ b/base/values_unittest.cc
@@ -20,17 +20,20 @@
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
+// Test is currently incorrect on Windows x86.
+#if !defined(OS_WIN) || !defined(ARCH_CPU_X86)
TEST(ValuesTest, SizeOfValue) {
// Ensure that base::Value is as small as possible, i.e. that there is
// no wasted space after the inner value due to alignment constraints.
- // Distinguish between the 'header' that includes |type_| and |is_alive_|
- // and the inner value that follows it, which can be a bool, int, double,
- // string, blob, list or dict.
+ // Distinguish between the 'header' that includes |type_| and and the inner
+ // value that follows it, which can be a bool, int, double, string, blob, list
+ // or dict.
#define INNER_TYPES_LIST(X) \
X(bool, bool_value_) \
X(int, int_value_) \
@@ -61,6 +64,7 @@ TEST(ValuesTest, SizeOfValue) {
LOG(INFO) << "max_inner_struct_limit=" << max_inner_struct_limit;
}
}
+#endif
TEST(ValuesTest, TestNothrow) {
static_assert(std::is_nothrow_move_constructible<Value>::value,
diff --git a/chrome/browser/ui/cocoa/applescript/apple_event_util.mm b/chrome/browser/ui/cocoa/applescript/apple_event_util.mm
index 16d685607ced..25a59338ee73 100644
--- a/chrome/browser/ui/cocoa/applescript/apple_event_util.mm
+++ b/chrome/browser/ui/cocoa/applescript/apple_event_util.mm
@@ -96,6 +96,16 @@ NSAppleEventDescriptor* ValueToAppleEventDescriptor(const base::Value* value) {
}
break;
}
+
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case base::Value::Type::DEAD:
+ CHECK(false);
+ break;
+
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ default:
+ CHECK(false);
+ break;
}
return descriptor;
diff --git a/chromeos/network/onc/variable_expander.cc b/chromeos/network/onc/variable_expander.cc
index fd72752c2aa6..cd5bbb238eb3 100644
--- a/chromeos/network/onc/variable_expander.cc
+++ b/chromeos/network/onc/variable_expander.cc
@@ -145,6 +145,12 @@ bool VariableExpander::ExpandValue(base::Value* value) const {
// Nothing to do here.
break;
}
+
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case base::Value::Type::DEAD: {
+ CHECK(false);
+ break;
+ }
}
return no_error;
}
diff --git a/components/policy/core/browser/android/policy_converter.cc b/components/policy/core/browser/android/policy_converter.cc
index b711a64febc9..9d41ad0d1507 100644
--- a/components/policy/core/browser/android/policy_converter.cc
+++ b/components/policy/core/browser/android/policy_converter.cc
@@ -175,10 +175,17 @@ std::unique_ptr<base::Value> PolicyConverter::ConvertValueToSchema(
}
return value;
}
+
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case base::Value::Type::DEAD: {
+ CHECK(false);
+ return nullptr;
+ }
}
- NOTREACHED();
- return std::unique_ptr<base::Value>();
+ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
+ CHECK(false);
+ return nullptr;
}
void PolicyConverter::SetPolicyValue(const std::string& key,
diff --git a/components/policy/core/common/policy_loader_win_unittest.cc b/components/policy/core/common/policy_loader_win_unittest.cc
index 311e7fb122fc..0377307c5e28 100644
--- a/components/policy/core/common/policy_loader_win_unittest.cc
+++ b/components/policy/core/common/policy_loader_win_unittest.cc
@@ -133,8 +133,14 @@ bool InstallValue(const base::Value& value,
case base::Value::Type::BINARY:
return false;
+
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case base::Value::Type::DEAD:
+ CHECK(false);
+ return false;
}
- NOTREACHED();
+ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
+ CHECK(false);
return false;
}
diff --git a/components/policy/core/common/policy_test_utils.cc b/components/policy/core/common/policy_test_utils.cc
index 5af98b47275c..919f004153ec 100644
--- a/components/policy/core/common/policy_test_utils.cc
+++ b/components/policy/core/common/policy_test_utils.cc
@@ -137,6 +137,11 @@ CFPropertyListRef ValueToProperty(const base::Value& value) {
// because there's no equivalent JSON type, and policy values can only
// take valid JSON values.
break;
+
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case base::Value::Type::DEAD:
+ CHECK(false);
+ break;
}
return NULL;
diff --git a/components/policy/core/common/registry_dict.cc b/components/policy/core/common/registry_dict.cc
index f3ed372bdcb3..696ba7e04abe 100644
--- a/components/policy/core/common/registry_dict.cc
+++ b/components/policy/core/common/registry_dict.cc
@@ -135,6 +135,10 @@ std::unique_ptr<base::Value> ConvertRegistryValue(const base::Value& value,
case base::Value::Type::BINARY:
// No conversion possible.
break;
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case base::Value::Type::DEAD:
+ CHECK(false);
+ return nullptr;
}
LOG(WARNING) << "Failed to convert " << value.type() << " to "
diff --git a/content/browser/android/java/gin_java_script_to_java_types_coercion.cc b/content/browser/android/java/gin_java_script_to_java_types_coercion.cc
index dabd66ba8c72..84fd5489a414 100644
--- a/content/browser/android/java/gin_java_script_to_java_types_coercion.cc
+++ b/content/browser/android/java/gin_java_script_to_java_types_coercion.cc
@@ -722,8 +722,14 @@ jvalue CoerceJavaScriptValueToJavaValue(JNIEnv* env,
case base::Value::Type::BINARY:
return CoerceGinJavaBridgeValueToJavaValue(
env, value, target_type, coerce_to_string, object_refs, error);
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case base::Value::Type::DEAD:
+ CHECK(false);
+ return jvalue();
}
- NOTREACHED();
+
+ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
+ CHECK(false);
return jvalue();
}
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index ec04c77c6c18..df6ec39bd663 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -92,7 +92,7 @@ void WriteValue(base::Pickle* m, const base::Value* value, int recursion) {
switch (value->type()) {
case base::Value::Type::NONE:
- break;
+ break;
case base::Value::Type::BOOLEAN: {
bool val;
result = value->GetAsBoolean(&val);
@@ -147,6 +147,11 @@ void WriteValue(base::Pickle* m, const base::Value* value, int recursion) {
}
break;
}
+
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ default:
+ CHECK(false);
+ break;
}
}
@@ -260,7 +265,9 @@ bool ReadValue(const base::Pickle* m,
break;
}
default:
- return false;
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ CHECK(false);
+ return false;
}
return true;
diff --git a/mojo/public/cpp/base/values_mojom_traits.h b/mojo/public/cpp/base/values_mojom_traits.h
index cdb9bbbd94df..66752b7c90d8 100644
--- a/mojo/public/cpp/base/values_mojom_traits.h
+++ b/mojo/public/cpp/base/values_mojom_traits.h
@@ -86,8 +86,13 @@ struct COMPONENT_EXPORT(MOJO_BASE_SHARED_TRAITS)
return mojo_base::mojom::ValueDataView::Tag::DICTIONARY_VALUE;
case base::Value::Type::LIST:
return mojo_base::mojom::ValueDataView::Tag::LIST_VALUE;
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case base::Value::Type::DEAD:
+ CHECK(false);
+ return mojo_base::mojom::ValueDataView::Tag::NULL_VALUE;
}
- NOTREACHED();
+ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
+ CHECK(false);
return mojo_base::mojom::ValueDataView::Tag::NULL_VALUE;
}
diff --git a/ppapi/shared_impl/private/ppb_x509_certificate_private_shared.cc b/ppapi/shared_impl/private/ppb_x509_certificate_private_shared.cc
index 6ffff36337e0..7f392d50f718 100644
--- a/ppapi/shared_impl/private/ppb_x509_certificate_private_shared.cc
+++ b/ppapi/shared_impl/private/ppb_x509_certificate_private_shared.cc
@@ -73,6 +73,8 @@ PP_Var PPB_X509Certificate_Fields::GetFieldAsPPVar(
}
case base::Value::Type::DICTIONARY:
case base::Value::Type::LIST:
+ // TODO(crbug.com/859477): Remove after root cause is found.
+ case base::Value::Type::DEAD:
// Not handled.
break;
}
--
2.21.0
++++++ 02-basevalue.patch ++++++
>From c2c467f69fc00d353879d7add5f2c04a6acabbb1 Mon Sep 17 00:00:00 2001
From: David 'Digit' Turner <digit(a)google.com>
Date: Wed, 20 Mar 2019 21:41:09 +0000
Subject: [PATCH] base: Value::FindDoubleKey() converts integers to doubles
Ensure that FindDoubleKey() can return the value of an
INTEGER key as a double. This is consistent with the behaviour
of Value::GetDouble() which will auto-convert INTEGER values
to doubles.
BUG=646113
R=dcheng@chromium.org,jdoerrie@chromium.org,sdefresne@chromium.org,hidehiko@chromium.org
Change-Id: I2c08cb91b6cfd5db268a182ffffe16682d848008
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529017
Reviewed-by: Sylvain Defresne <sdefresne(a)chromium.org>
Reviewed-by: Daniel Cheng <dcheng(a)chromium.org>
Commit-Queue: David Turner <digit(a)chromium.org>
Cr-Commit-Position: refs/heads/master@{#642680}
---
base/values.cc | 10 ++++++++--
base/values.h | 2 ++
base/values_unittest.cc | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/base/values.cc b/base/values.cc
index 035aa2350cde..69d66ff8ab00 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -339,8 +339,14 @@ base::Optional<int> Value::FindIntKey(StringPiece key) const {
}
base::Optional<double> Value::FindDoubleKey(StringPiece key) const {
- const Value* result = FindKeyOfType(key, Type::DOUBLE);
- return result ? base::make_optional(result->double_value_) : base::nullopt;
+ const Value* result = FindKey(key);
+ if (result) {
+ if (result->is_int())
+ return base::make_optional(static_cast<double>(result->int_value_));
+ if (result->is_double())
+ return base::make_optional(result->double_value_);
+ }
+ return base::nullopt;
}
const std::string* Value::FindStringKey(StringPiece key) const {
diff --git a/base/values.h b/base/values.h
index e31cadd83102..6f2cd3cc3d79 100644
--- a/base/values.h
+++ b/base/values.h
@@ -200,6 +200,8 @@ class BASE_EXPORT Value {
// function's name.
base::Optional<bool> FindBoolKey(StringPiece key) const;
base::Optional<int> FindIntKey(StringPiece key) const;
+ // Note FindDoubleKey() will auto-convert INTEGER keys to their double
+ // value, for consistency with GetDouble().
base::Optional<double> FindDoubleKey(StringPiece key) const;
// |FindStringKey| returns |nullptr| if value is not found or not a string.
diff --git a/base/values_unittest.cc b/base/values_unittest.cc
index b23fd8332491..7c545c09d947 100644
--- a/base/values_unittest.cc
+++ b/base/values_unittest.cc
@@ -674,7 +674,7 @@ TEST(ValuesTest, FindDoubleKey) {
const Value dict(std::move(storage));
EXPECT_EQ(base::nullopt, dict.FindDoubleKey("null"));
EXPECT_EQ(base::nullopt, dict.FindDoubleKey("bool"));
- EXPECT_EQ(base::nullopt, dict.FindDoubleKey("int"));
+ EXPECT_NE(base::nullopt, dict.FindDoubleKey("int"));
EXPECT_NE(base::nullopt, dict.FindDoubleKey("double"));
EXPECT_EQ(base::nullopt, dict.FindDoubleKey("string"));
EXPECT_EQ(base::nullopt, dict.FindDoubleKey("blob"));
--
2.21.0
++++++ 03-basevalue.patch ++++++
>From fca8c4b5680297d58fa16a3ccf174f954b66cb48 Mon Sep 17 00:00:00 2001
From: David 'Digit' Turner <digit(a)google.com>
Date: Tue, 26 Mar 2019 11:14:06 +0000
Subject: [PATCH] base: Add Value::Find{Blob,List,Dict}Key() methods
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This CL adds new Value::Find<Type>Key() methods for convenience.
This saves typing and makes the code simpler to read and
understand as well.
+ Fix minor typo in values_unittest.cc
BUG=646113
R=dcheng@chromium.org,jdoerrie@chromium.org,sdefresne@chromium.org,hidehiko@chromium.org
TBR=palmer(a)chromium.org
Change-Id: I7cbc3f84da0f682411c7f5384849e7c0923c2fb0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1530910
Commit-Queue: David Turner <digit(a)chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko(a)chromium.org>
Reviewed-by: Mark Pearson <mpearson(a)chromium.org>
Reviewed-by: Primiano Tucci <primiano(a)chromium.org>
Reviewed-by: Jan Wilken Dörrie <jdoerrie(a)chromium.org>
Cr-Commit-Position: refs/heads/master@{#644251}
---
base/json/json_reader_unittest.cc | 15 ++--
base/metrics/statistics_recorder_unittest.cc | 11 ++-
base/trace_event/trace_config.cc | 3 +-
base/values.cc | 21 ++++++
base/values.h | 11 +++
base/values_unittest.cc | 74 ++++++++++++++++++--
6 files changed, 113 insertions(+), 22 deletions(-)
diff --git a/base/json/json_reader_unittest.cc b/base/json/json_reader_unittest.cc
index 5023f33ed7cd..186a6f1dce30 100644
--- a/base/json/json_reader_unittest.cc
+++ b/base/json/json_reader_unittest.cc
@@ -371,17 +371,15 @@ TEST(JSONReaderTest, NestedDictionaries) {
"{\"inner\":{\"array\":[true]},\"false\":false,\"d\":{}}");
ASSERT_TRUE(dict_val);
ASSERT_TRUE(dict_val->is_dict());
- const Value* inner_dict =
- dict_val->FindKeyOfType("inner", base::Value::Type::DICTIONARY);
+ const Value* inner_dict = dict_val->FindDictKey("inner");
ASSERT_TRUE(inner_dict);
- const Value* inner_array =
- inner_dict->FindKeyOfType("array", base::Value::Type::LIST);
+ const Value* inner_array = inner_dict->FindListKey("array");
ASSERT_TRUE(inner_array);
EXPECT_EQ(1U, inner_array->GetList().size());
auto bool_value = dict_val->FindBoolKey("false");
ASSERT_TRUE(bool_value);
EXPECT_FALSE(*bool_value);
- inner_dict = dict_val->FindKeyOfType("d", base::Value::Type::DICTIONARY);
+ inner_dict = dict_val->FindDictKey("d");
EXPECT_TRUE(inner_dict);
Optional<Value> root2 = JSONReader::Read(
@@ -403,8 +401,7 @@ TEST(JSONReaderTest, DictionaryKeysWithPeriods) {
integer_value = dict_val->FindIntKey("c");
ASSERT_TRUE(integer_value);
EXPECT_EQ(2, *integer_value);
- const Value* inner_dict =
- dict_val->FindKeyOfType("d.e.f", base::Value::Type::DICTIONARY);
+ const Value* inner_dict = dict_val->FindDictKey("d.e.f");
ASSERT_TRUE(inner_dict);
EXPECT_EQ(1U, inner_dict->DictSize());
integer_value = inner_dict->FindIntKey("g.h.i.j");
@@ -595,9 +592,9 @@ TEST(JSONReaderTest, StringOptimizations) {
ASSERT_TRUE(root);
ASSERT_TRUE(root->is_dict());
- Value* dict = root->FindKeyOfType("test", Value::Type::DICTIONARY);
+ Value* dict = root->FindDictKey("test");
ASSERT_TRUE(dict);
- Value* list = root->FindKeyOfType("list", Value::Type::LIST);
+ Value* list = root->FindListKey("list");
ASSERT_TRUE(list);
Value* to_move = dict->FindKey("foo");
diff --git a/base/metrics/statistics_recorder_unittest.cc b/base/metrics/statistics_recorder_unittest.cc
index f54f4146037a..9392e17cd25a 100644
--- a/base/metrics/statistics_recorder_unittest.cc
+++ b/base/metrics/statistics_recorder_unittest.cc
@@ -366,8 +366,7 @@ TEST_P(StatisticsRecorderTest, ToJSON) {
// No query should be set.
ASSERT_FALSE(root->FindKey("query"));
- const Value* histogram_list =
- root->FindKeyOfType("histograms", base::Value::Type::LIST);
+ const Value* histogram_list = root->FindListKey("histograms");
ASSERT_TRUE(histogram_list);
ASSERT_EQ(2u, histogram_list->GetList().size());
@@ -380,8 +379,7 @@ TEST_P(StatisticsRecorderTest, ToJSON) {
ASSERT_TRUE(sample_count);
EXPECT_EQ(2, *sample_count);
- const Value* buckets_list =
- histogram_dict.FindKeyOfType("buckets", base::Value::Type::LIST);
+ const Value* buckets_list = histogram_dict.FindListKey("buckets");
ASSERT_TRUE(buckets_list);
EXPECT_EQ(2u, buckets_list->GetList().size());
@@ -390,7 +388,7 @@ TEST_P(StatisticsRecorderTest, ToJSON) {
root = JSONReader::Read(json);
ASSERT_TRUE(root);
ASSERT_TRUE(root->is_dict());
- histogram_list = root->FindKeyOfType("histograms", base::Value::Type::LIST);
+ histogram_list = root->FindListKey("histograms");
ASSERT_TRUE(histogram_list);
ASSERT_EQ(2u, histogram_list->GetList().size());
const Value& histogram_dict2 = histogram_list->GetList()[0];
@@ -398,8 +396,7 @@ TEST_P(StatisticsRecorderTest, ToJSON) {
sample_count = histogram_dict2.FindIntKey("count");
ASSERT_TRUE(sample_count);
EXPECT_EQ(2, *sample_count);
- buckets_list =
- histogram_dict2.FindKeyOfType("buckets", base::Value::Type::LIST);
+ buckets_list = histogram_dict2.FindListKey("buckets");
// Bucket information should be omitted.
ASSERT_FALSE(buckets_list);
}
diff --git a/base/trace_event/trace_config.cc b/base/trace_event/trace_config.cc
index e28456bdd0c9..e5bc3a58ed7d 100644
--- a/base/trace_event/trace_config.cc
+++ b/base/trace_event/trace_config.cc
@@ -147,8 +147,7 @@ void TraceConfig::ProcessFilterConfig::Merge(
void TraceConfig::ProcessFilterConfig::InitializeFromConfigDict(
const base::DictionaryValue& dict) {
included_process_ids_.clear();
- const Value* value =
- dict.FindKeyOfType(kIncludedProcessesParam, Value::Type::LIST);
+ const Value* value = dict.FindListKey(kIncludedProcessesParam);
if (!value)
return;
for (auto& pid_value : value->GetList()) {
diff --git a/base/values.cc b/base/values.cc
index 69d66ff8ab00..6f3a9e2cd8a2 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -354,6 +354,27 @@ const std::string* Value::FindStringKey(StringPiece key) const {
return result ? &result->string_value_ : nullptr;
}
+const Value::BlobStorage* Value::FindBlobKey(StringPiece key) const {
+ const Value* value = FindKeyOfType(key, Type::BINARY);
+ return value ? &value->binary_value_ : nullptr;
+}
+
+const Value* Value::FindDictKey(StringPiece key) const {
+ return FindKeyOfType(key, Type::DICTIONARY);
+}
+
+Value* Value::FindDictKey(StringPiece key) {
+ return FindKeyOfType(key, Type::DICTIONARY);
+}
+
+const Value* Value::FindListKey(StringPiece key) const {
+ return FindKeyOfType(key, Type::LIST);
+}
+
+Value* Value::FindListKey(StringPiece key) {
+ return FindKeyOfType(key, Type::LIST);
+}
+
bool Value::RemoveKey(StringPiece key) {
CHECK(is_dict());
// NOTE: Can't directly return dict_->erase(key) due to MSVC warning C4800.
diff --git a/base/values.h b/base/values.h
index 6f2cd3cc3d79..7bc355ee586d 100644
--- a/base/values.h
+++ b/base/values.h
@@ -207,6 +207,17 @@ class BASE_EXPORT Value {
// |FindStringKey| returns |nullptr| if value is not found or not a string.
const std::string* FindStringKey(StringPiece key) const;
+ // Returns nullptr is value is not found or not a binary.
+ const BlobStorage* FindBlobKey(StringPiece key) const;
+
+ // Returns nullptr if value is not found or not a dictionary.
+ const Value* FindDictKey(StringPiece key) const;
+ Value* FindDictKey(StringPiece key);
+
+ // Returns nullptr if value is not found or not a list.
+ const Value* FindListKey(StringPiece key) const;
+ Value* FindListKey(StringPiece key);
+
// |SetKey| looks up |key| in the underlying dictionary and sets the mapped
// value to |value|. If |key| could not be found, a new element is inserted.
// A pointer to the modified item is returned.
diff --git a/base/values_unittest.cc b/base/values_unittest.cc
index 7c545c09d947..2907dc066843 100644
--- a/base/values_unittest.cc
+++ b/base/values_unittest.cc
@@ -635,7 +635,7 @@ TEST(ValuesTest, FindBoolKey) {
EXPECT_EQ(base::nullopt, dict.FindBoolKey("string"));
EXPECT_EQ(base::nullopt, dict.FindBoolKey("blob"));
EXPECT_EQ(base::nullopt, dict.FindBoolKey("list"));
- EXPECT_EQ(base::nullopt, dict.FindBoolKey("dist"));
+ EXPECT_EQ(base::nullopt, dict.FindBoolKey("dict"));
}
TEST(ValuesTest, FindIntKey) {
@@ -657,7 +657,7 @@ TEST(ValuesTest, FindIntKey) {
EXPECT_EQ(base::nullopt, dict.FindIntKey("string"));
EXPECT_EQ(base::nullopt, dict.FindIntKey("blob"));
EXPECT_EQ(base::nullopt, dict.FindIntKey("list"));
- EXPECT_EQ(base::nullopt, dict.FindIntKey("dist"));
+ EXPECT_EQ(base::nullopt, dict.FindIntKey("dict"));
}
TEST(ValuesTest, FindDoubleKey) {
@@ -679,7 +679,7 @@ TEST(ValuesTest, FindDoubleKey) {
EXPECT_EQ(base::nullopt, dict.FindDoubleKey("string"));
EXPECT_EQ(base::nullopt, dict.FindDoubleKey("blob"));
EXPECT_EQ(base::nullopt, dict.FindDoubleKey("list"));
- EXPECT_EQ(base::nullopt, dict.FindDoubleKey("dist"));
+ EXPECT_EQ(base::nullopt, dict.FindDoubleKey("dict"));
}
TEST(ValuesTest, FindStringKey) {
@@ -701,7 +701,73 @@ TEST(ValuesTest, FindStringKey) {
EXPECT_NE(nullptr, dict.FindStringKey("string"));
EXPECT_EQ(nullptr, dict.FindStringKey("blob"));
EXPECT_EQ(nullptr, dict.FindStringKey("list"));
- EXPECT_EQ(nullptr, dict.FindStringKey("dist"));
+ EXPECT_EQ(nullptr, dict.FindStringKey("dict"));
+}
+
+TEST(ValuesTest, FindDictKey) {
+ Value::DictStorage storage;
+ storage.emplace("null", std::make_unique<Value>(Value::Type::NONE));
+ storage.emplace("bool", std::make_unique<Value>(Value::Type::BOOLEAN));
+ storage.emplace("int", std::make_unique<Value>(Value::Type::INTEGER));
+ storage.emplace("double", std::make_unique<Value>(Value::Type::DOUBLE));
+ storage.emplace("string", std::make_unique<Value>(Value::Type::STRING));
+ storage.emplace("blob", std::make_unique<Value>(Value::Type::BINARY));
+ storage.emplace("list", std::make_unique<Value>(Value::Type::LIST));
+ storage.emplace("dict", std::make_unique<Value>(Value::Type::DICTIONARY));
+
+ const Value dict(std::move(storage));
+ EXPECT_EQ(nullptr, dict.FindDictKey("null"));
+ EXPECT_EQ(nullptr, dict.FindDictKey("bool"));
+ EXPECT_EQ(nullptr, dict.FindDictKey("int"));
+ EXPECT_EQ(nullptr, dict.FindDictKey("double"));
+ EXPECT_EQ(nullptr, dict.FindDictKey("string"));
+ EXPECT_EQ(nullptr, dict.FindDictKey("blob"));
+ EXPECT_EQ(nullptr, dict.FindDictKey("list"));
+ EXPECT_NE(nullptr, dict.FindDictKey("dict"));
+}
+
+TEST(ValuesTest, FindListKey) {
+ Value::DictStorage storage;
+ storage.emplace("null", std::make_unique<Value>(Value::Type::NONE));
+ storage.emplace("bool", std::make_unique<Value>(Value::Type::BOOLEAN));
+ storage.emplace("int", std::make_unique<Value>(Value::Type::INTEGER));
+ storage.emplace("double", std::make_unique<Value>(Value::Type::DOUBLE));
+ storage.emplace("string", std::make_unique<Value>(Value::Type::STRING));
+ storage.emplace("blob", std::make_unique<Value>(Value::Type::BINARY));
+ storage.emplace("list", std::make_unique<Value>(Value::Type::LIST));
+ storage.emplace("dict", std::make_unique<Value>(Value::Type::DICTIONARY));
+
+ const Value dict(std::move(storage));
+ EXPECT_EQ(nullptr, dict.FindListKey("null"));
+ EXPECT_EQ(nullptr, dict.FindListKey("bool"));
+ EXPECT_EQ(nullptr, dict.FindListKey("int"));
+ EXPECT_EQ(nullptr, dict.FindListKey("double"));
+ EXPECT_EQ(nullptr, dict.FindListKey("string"));
+ EXPECT_EQ(nullptr, dict.FindListKey("blob"));
+ EXPECT_NE(nullptr, dict.FindListKey("list"));
+ EXPECT_EQ(nullptr, dict.FindListKey("dict"));
+}
+
+TEST(ValuesTest, FindBlobKey) {
+ Value::DictStorage storage;
+ storage.emplace("null", std::make_unique<Value>(Value::Type::NONE));
+ storage.emplace("bool", std::make_unique<Value>(Value::Type::BOOLEAN));
+ storage.emplace("int", std::make_unique<Value>(Value::Type::INTEGER));
+ storage.emplace("double", std::make_unique<Value>(Value::Type::DOUBLE));
+ storage.emplace("string", std::make_unique<Value>(Value::Type::STRING));
+ storage.emplace("blob", std::make_unique<Value>(Value::Type::BINARY));
+ storage.emplace("list", std::make_unique<Value>(Value::Type::LIST));
+ storage.emplace("dict", std::make_unique<Value>(Value::Type::DICTIONARY));
+
+ const Value dict(std::move(storage));
+ EXPECT_EQ(nullptr, dict.FindBlobKey("null"));
+ EXPECT_EQ(nullptr, dict.FindBlobKey("bool"));
+ EXPECT_EQ(nullptr, dict.FindBlobKey("int"));
+ EXPECT_EQ(nullptr, dict.FindBlobKey("double"));
+ EXPECT_EQ(nullptr, dict.FindBlobKey("string"));
+ EXPECT_NE(nullptr, dict.FindBlobKey("blob"));
+ EXPECT_EQ(nullptr, dict.FindBlobKey("list"));
+ EXPECT_EQ(nullptr, dict.FindBlobKey("dict"));
}
TEST(ValuesTest, SetKey) {
--
2.21.0
++++++ 04-basevalue.patch ++++++
++++ 794 lines (skipped)
++++++ 05-basevalue.patch ++++++
>From 2f28731c17b246bd70075f828dcafcd23547da5d Mon Sep 17 00:00:00 2001
From: David 'Digit' Turner <digit(a)google.com>
Date: Wed, 3 Apr 2019 14:32:09 +0000
Subject: [PATCH] base: Fix Value layout for GCC
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It turns out that the previous changes to the base::Value
layout broke GCC compilation (see [1] for details).
This CL fixes the situation by using a new DoubleStorage
type that will store double values in a 4-byte aligned
struct, with bit_cast<> being used to convert between
double and DoubleStorage values in the implementation.
This ensures that base::Value remains as small as possible
in all cases. The small penalty is that loading/storing
double values on 32-bit ARM is slightly slower due to
the fact that the value is no longer 8-byte aligned.
+ Fix the ValuesTest.SizeOfValue test to work correctly,
and disable it for debug builds, so it doesn't fail
because debug versions of the internal containers
are larger on certain systems.
[1] https://chromium-review.googlesource.com/c/chromium/src/+/1472716
BUG=646113
R=dcheng(a)chromium.org, pasko(a)chromium.org, lizeb(a)chromium.org, jdoerrie(a)chromium.org, jose.dapena(a)lge.com
Change-Id: I9a365407dc064ba1bdc19859706f4154a495921e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1550363
Commit-Queue: David Turner <digit(a)chromium.org>
Reviewed-by: Jan Wilken Dörrie <jdoerrie(a)chromium.org>
Cr-Commit-Position: refs/heads/master@{#647271}
---
base/values.cc | 67 +++++++++++++---------------
base/values.h | 94 ++++++++++------------------------------
base/values_unittest.cc | 96 ++++++++++++++++++++++++++++++-----------
3 files changed, 124 insertions(+), 133 deletions(-)
diff --git a/base/values.cc b/base/values.cc
index 9fed5b52d60e..16d686b0bee5 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -12,6 +12,7 @@
#include <ostream>
#include <utility>
+#include "base/bit_cast.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
@@ -36,6 +37,9 @@ static_assert(std::is_standard_layout<Value>::value,
"base::Value should be a standard-layout C++ class in order "
"to avoid undefined behaviour in its implementation!");
+static_assert(sizeof(Value::DoubleStorage) == sizeof(double),
+ "The double and DoubleStorage types should have the same size");
+
namespace {
const char* const kTypeNames[] = {"null", "boolean", "integer", "double",
@@ -110,8 +114,6 @@ Value::Value(Value&& that) noexcept {
InternalMoveConstructFrom(std::move(that));
}
-Value::Value() noexcept : type_(Type::NONE) {}
-
Value::Value(Type type) : type_(type) {
// Initialize with the default value.
switch (type_) {
@@ -125,7 +127,7 @@ Value::Value(Type type) : type_(type) {
int_value_ = 0;
return;
case Type::DOUBLE:
- double_value_ = 0.0;
+ double_value_ = bit_cast<DoubleStorage>(0.0);
return;
case Type::STRING:
new (&string_value_) std::string();
@@ -149,21 +151,16 @@ Value::Value(Type type) : type_(type) {
CHECK(false);
}
-Value::Value(bool in_bool)
- : bool_type_(Type::BOOLEAN),
- bool_value_(in_bool) {}
+Value::Value(bool in_bool) : type_(Type::BOOLEAN), bool_value_(in_bool) {}
-Value::Value(int in_int)
- : int_type_(Type::INTEGER),
- int_value_(in_int) {}
+Value::Value(int in_int) : type_(Type::INTEGER), int_value_(in_int) {}
Value::Value(double in_double)
- : double_type_(Type::DOUBLE),
- double_value_(in_double) {
- if (!std::isfinite(double_value_)) {
+ : type_(Type::DOUBLE), double_value_(bit_cast<DoubleStorage>(in_double)) {
+ if (!std::isfinite(in_double)) {
NOTREACHED() << "Non-finite (i.e. NaN or positive/negative infinity) "
<< "values cannot be represented in JSON";
- double_value_ = 0.0;
+ double_value_ = bit_cast<DoubleStorage>(0.0);
}
}
@@ -172,8 +169,7 @@ Value::Value(const char* in_string) : Value(std::string(in_string)) {}
Value::Value(StringPiece in_string) : Value(std::string(in_string)) {}
Value::Value(std::string&& in_string) noexcept
- : string_type_(Type::STRING),
- string_value_(std::move(in_string)) {
+ : type_(Type::STRING), string_value_(std::move(in_string)) {
DCHECK(IsStringUTF8(string_value_));
}
@@ -182,19 +178,15 @@ Value::Value(const char16* in_string16) : Value(StringPiece16(in_string16)) {}
Value::Value(StringPiece16 in_string16) : Value(UTF16ToUTF8(in_string16)) {}
Value::Value(const std::vector<char>& in_blob)
- : binary_type_(Type::BINARY),
- binary_value_(in_blob.begin(), in_blob.end()) {}
+ : type_(Type::BINARY), binary_value_(in_blob.begin(), in_blob.end()) {}
Value::Value(base::span<const uint8_t> in_blob)
- : binary_type_(Type::BINARY),
- binary_value_(in_blob.begin(), in_blob.end()) {}
+ : type_(Type::BINARY), binary_value_(in_blob.begin(), in_blob.end()) {}
Value::Value(BlobStorage&& in_blob) noexcept
- : binary_type_(Type::BINARY),
- binary_value_(std::move(in_blob)) {}
+ : type_(Type::BINARY), binary_value_(std::move(in_blob)) {}
-Value::Value(const DictStorage& in_dict)
- : dict_type_(Type::DICTIONARY), dict_() {
+Value::Value(const DictStorage& in_dict) : type_(Type::DICTIONARY), dict_() {
dict_.reserve(in_dict.size());
for (const auto& it : in_dict) {
dict_.try_emplace(dict_.end(), it.first,
@@ -203,18 +195,16 @@ Value::Value(const DictStorage& in_dict)
}
Value::Value(DictStorage&& in_dict) noexcept
- : dict_type_(Type::DICTIONARY),
- dict_(std::move(in_dict)) {}
+ : type_(Type::DICTIONARY), dict_(std::move(in_dict)) {}
-Value::Value(const ListStorage& in_list) : list_type_(Type::LIST), list_() {
+Value::Value(const ListStorage& in_list) : type_(Type::LIST), list_() {
list_.reserve(in_list.size());
for (const auto& val : in_list)
list_.emplace_back(val.Clone());
}
Value::Value(ListStorage&& in_list) noexcept
- : list_type_(Type::LIST),
- list_(std::move(in_list)) {}
+ : type_(Type::LIST), list_(std::move(in_list)) {}
Value& Value::operator=(Value&& that) noexcept {
InternalCleanup();
@@ -223,6 +213,10 @@ Value& Value::operator=(Value&& that) noexcept {
return *this;
}
+double Value::AsDoubleInternal() const {
+ return bit_cast<double>(double_value_);
+}
+
Value Value::Clone() const {
switch (type_) {
case Type::NONE:
@@ -232,7 +226,7 @@ Value Value::Clone() const {
case Type::INTEGER:
return Value(int_value_);
case Type::DOUBLE:
- return Value(double_value_);
+ return Value(AsDoubleInternal());
case Type::STRING:
return Value(string_value_);
case Type::BINARY:
@@ -277,7 +271,7 @@ int Value::GetInt() const {
double Value::GetDouble() const {
if (is_double())
- return double_value_;
+ return AsDoubleInternal();
if (is_int())
return int_value_;
CHECK(false);
@@ -342,9 +336,10 @@ base::Optional<double> Value::FindDoubleKey(StringPiece key) const {
const Value* result = FindKey(key);
if (result) {
if (result->is_int())
- return base::make_optional(static_cast<double>(result->int_value_));
- if (result->is_double())
- return base::make_optional(result->double_value_);
+ return static_cast<double>(result->int_value_);
+ if (result->is_double()) {
+ return result->AsDoubleInternal();
+ }
}
return base::nullopt;
}
@@ -601,7 +596,7 @@ bool Value::GetAsInteger(int* out_value) const {
bool Value::GetAsDouble(double* out_value) const {
if (out_value && is_double()) {
- *out_value = double_value_;
+ *out_value = AsDoubleInternal();
return true;
}
if (out_value && is_int()) {
@@ -696,7 +691,7 @@ bool operator==(const Value& lhs, const Value& rhs) {
case Value::Type::INTEGER:
return lhs.int_value_ == rhs.int_value_;
case Value::Type::DOUBLE:
- return lhs.double_value_ == rhs.double_value_;
+ return lhs.AsDoubleInternal() == rhs.AsDoubleInternal();
case Value::Type::STRING:
return lhs.string_value_ == rhs.string_value_;
case Value::Type::BINARY:
@@ -741,7 +736,7 @@ bool operator<(const Value& lhs, const Value& rhs) {
case Value::Type::INTEGER:
return lhs.int_value_ < rhs.int_value_;
case Value::Type::DOUBLE:
- return lhs.double_value_ < rhs.double_value_;
+ return lhs.AsDoubleInternal() < rhs.AsDoubleInternal();
case Value::Type::STRING:
return lhs.string_value_ < rhs.string_value_;
case Value::Type::BINARY:
diff --git a/base/values.h b/base/values.h
index 486fe7ff3976..c455936d4961 100644
--- a/base/values.h
+++ b/base/values.h
@@ -83,6 +83,8 @@ class BASE_EXPORT Value {
using BlobStorage = std::vector<uint8_t>;
using DictStorage = flat_map<std::string, std::unique_ptr<Value>>;
using ListStorage = std::vector<Value>;
+ // See technical note below explaining why this is used.
+ using DoubleStorage = struct { alignas(4) char v[sizeof(double)]; };
enum class Type {
NONE = 0,
@@ -111,7 +113,10 @@ class BASE_EXPORT Value {
static std::unique_ptr<Value> ToUniquePtrValue(Value val);
Value(Value&& that) noexcept;
- Value() noexcept; // A null value.
+ Value() noexcept {} // A null value
+ // Fun fact: using '= default' above instead of '{}' does not work because
+ // the compiler complains that the default constructor was deleted since
+ // the inner union contains fields with non-default constructors.
// Value's copy constructor and copy assignment operator are deleted. Use this
// to obtain a deep copy explicitly.
@@ -405,82 +410,29 @@ class BASE_EXPORT Value {
size_t EstimateMemoryUsage() const;
protected:
- // Technical note:
- // The naive way to implement a tagged union leads to wasted bytes
- // in the object on CPUs like ARM ones, which impose an 8-byte alignment
- // for double values. I.e. if one does something like:
+ // Special case for doubles, which are aligned to 8 bytes on some
+ // 32-bit architectures. In this case, a simple declaration as a
+ // double member would make the whole union 8 byte-aligned, which
+ // would also force 4 bytes of wasted padding space before it in
+ // the Value layout.
//
- // struct TaggedValue {
- // int type_; // size = 1, align = 4
- // union {
- // bool bool_value_; // size = 1, align = 1
- // int int_value_; // size = 4, align = 4
- // double double_value_; // size = 8, align = 8
- // std::string string_value_; // size = 12, align = 4 (32-bit)
- // };
- // };
- //
- // The end result is that the union will have an alignment of 8, and a size
- // of 16, due to 4 extra padding bytes following |string_value_| to respect
- // the alignment requirement.
- //
- // As a consequence, the struct TaggedValue will have a size of 24 bytes,
- // due to the size of the union (16), the size of |type_| (4) and 4 bytes
- // of padding between |type_| and the union to respect its alignment.
- //
- // This means 8 bytes of unused memory per instance on 32-bit ARM!
- //
- // To reclaim these, a union of structs is used instead, in order to ensure
- // that |double_value_| below is always located at an offset that is a
- // multiple of 8, relative to the start of the overall data structure.
- //
- // Each struct must declare its own |type_| field, which must have a different
- // name, to appease the C++ compiler.
- //
- // Using this technique sizeof(base::Value) == 16 on 32-bit ARM instead
- // of 24, without losing any information. Results are unchanged for x86,
- // x86_64 and arm64 (16, 32 and 32 bytes respectively).
+ // To override this, store the value as an array of 32-bit integers, and
+ // perform the appropriate bit casts when reading / writing to it.
+ Type type_ = Type::NONE;
+
union {
- struct {
- // TODO(crbug.com/646113): Make these private once DictionaryValue and
- // ListValue are properly inlined.
- Type type_ : 8;
- };
- struct {
- Type bool_type_ : 8;
- bool bool_value_;
- };
- struct {
- Type int_type_ : 8;
- int int_value_;
- };
- struct {
- Type double_type_ : 8;
- // Subtle: On architectures that require it, the compiler will ensure
- // that |double_value_|'s offset is a multiple of 8 (e.g. 32-bit ARM).
- // See technical note above to understand why it is important.
- double double_value_;
- };
- struct {
- Type string_type_ : 8;
- std::string string_value_;
- };
- struct {
- Type binary_type_ : 8;
- BlobStorage binary_value_;
- };
- struct {
- Type dict_type_ : 8;
- DictStorage dict_;
- };
- struct {
- Type list_type_ : 8;
- ListStorage list_;
- };
+ bool bool_value_;
+ int int_value_;
+ DoubleStorage double_value_;
+ std::string string_value_;
+ BlobStorage binary_value_;
+ DictStorage dict_;
+ ListStorage list_;
};
private:
friend class ValuesTest_SizeOfValue_Test;
+ double AsDoubleInternal() const;
void InternalMoveConstructFrom(Value&& that);
void InternalCleanup();
diff --git a/base/values_unittest.cc b/base/values_unittest.cc
index 2dd1c76afaa9..f3536a8612b1 100644
--- a/base/values_unittest.cc
+++ b/base/values_unittest.cc
@@ -26,45 +26,89 @@
namespace base {
-// Test is currently incorrect on Windows x86.
-#if !defined(OS_WIN) || !defined(ARCH_CPU_X86)
+// Ensure that base::Value is as small as possible, i.e. that there is
+// no wasted space after the inner value due to alignment constraints.
+// Distinguish between the 'header' that includes |type_| and and the inner
+// value that follows it, which can be a bool, int, double, string, blob, list
+// or dict.
+//
+// This test is only enabled when NDEBUG is defined. This way the test will not
+// fail in debug builds that sometimes contain larger versions of the standard
+// containers used inside base::Value.
+#if defined(NDEBUG)
+
+static size_t AlignSizeTo(size_t size, size_t alignment) {
+ EXPECT_TRUE((alignment & (alignment - 1)) == 0)
+ << "Alignment " << alignment << " is not a power of 2!";
+ return (size + (alignment - 1u)) & ~(alignment - 1u);
+}
+
TEST(ValuesTest, SizeOfValue) {
- // Ensure that base::Value is as small as possible, i.e. that there is
- // no wasted space after the inner value due to alignment constraints.
- // Distinguish between the 'header' that includes |type_| and and the inner
- // value that follows it, which can be a bool, int, double, string, blob, list
- // or dict.
-#define INNER_TYPES_LIST(X) \
- X(bool, bool_value_) \
- X(int, int_value_) \
- X(double, double_value_) \
- X(std::string, string_value_) \
- X(Value::BlobStorage, binary_value_) \
- X(Value::ListStorage, list_) \
+#define INNER_TYPES_LIST(X) \
+ X(bool, bool_value_) \
+ X(int, int_value_) \
+ X(Value::DoubleStorage, double_value_) \
+ X(std::string, string_value_) \
+ X(Value::BlobStorage, binary_value_) \
+ X(Value::ListStorage, list_) \
X(Value::DictStorage, dict_)
-#define INNER_STRUCT_LIMIT(type, value) offsetof(Value, value) + sizeof(type),
+#define INNER_FIELD_ALIGNMENT(type, value) alignof(type),
+
+ // The maximum alignment of each inner struct value field inside base::Value
+ size_t max_inner_value_alignment =
+ std::max({INNER_TYPES_LIST(INNER_FIELD_ALIGNMENT)});
+
+ // Check that base::Value has the smallest alignment possible. This would
+ // fail if the header would contain something that has a larger alignment
+ // than necessary.
+ EXPECT_EQ(max_inner_value_alignment, alignof(Value));
+
+ // Find the offset of each inner value. Which should normally not be
+ // larger than 4. Note that we use std::max(4, ...) because bool_value_
+ // could be stored just after the |bool_type_| field, with an offset of
+ // 1, and that would be ok.
+#define INNER_VALUE_START_OFFSET(type, value) offsetof(Value, value),
+
+ size_t min_inner_value_offset =
+ std::min({INNER_TYPES_LIST(INNER_VALUE_START_OFFSET)});
- // Return the maximum size in bytes of each inner struct inside base::Value
- size_t max_inner_struct_limit =
- std::max({INNER_TYPES_LIST(INNER_STRUCT_LIMIT)});
+ // Inner fields may contain pointers, which have an alignment of 8
+ // on most 64-bit platforms.
+ size_t expected_min_offset = alignof(void*);
+
+ EXPECT_EQ(expected_min_offset, min_inner_value_offset);
// Ensure that base::Value is not larger than necessary, i.e. that there is
- // no un-necessary padding afte the structs due to alignment constraints of
+ // no un-necessary padding after the structs due to alignment constraints of
// one of the inner fields.
- EXPECT_EQ(max_inner_struct_limit, sizeof(Value));
- if (max_inner_struct_limit != sizeof(Value)) {
+#define INNER_STRUCT_END_OFFSET(type, value) \
+ offsetof(Value, value) + sizeof(type),
+
+ // The maximum size in bytes of each inner struct inside base::Value,
+ size_t max_inner_struct_end_offset =
+ std::max({INNER_TYPES_LIST(INNER_STRUCT_END_OFFSET)});
+
+ // The expected value size.
+ size_t expected_value_size =
+ AlignSizeTo(max_inner_struct_end_offset, alignof(Value));
+
+ EXPECT_EQ(expected_value_size, sizeof(Value));
+ if (min_inner_value_offset != expected_min_offset ||
+ expected_value_size != sizeof(Value)) {
// The following are useful to understand what's wrong when the EXPECT_EQ()
- // above actually fails.
-#define PRINT_INNER_FIELD_INFO(x, y) \
- LOG(INFO) << #y " type=" #x " size=" << sizeof(x) << " align=" << alignof(x);
+ // above actually fail.
+#define PRINT_INNER_FIELD_INFO(x, y) \
+ LOG(INFO) << #y " type=" #x " offset=" << offsetof(Value, y) \
+ << " size=" << sizeof(x) << " align=" << alignof(x);
LOG(INFO) << "Value size=" << sizeof(Value) << " align=" << alignof(Value);
INNER_TYPES_LIST(PRINT_INNER_FIELD_INFO)
- LOG(INFO) << "max_inner_struct_limit=" << max_inner_struct_limit;
+ LOG(INFO) << "max_inner_struct_end_offset=" << max_inner_struct_end_offset;
}
}
-#endif
+
+#endif // NDEBUG
TEST(ValuesTest, TestNothrow) {
static_assert(std::is_nothrow_move_constructible<Value>::value,
--
2.21.0
++++++ 06-basevalue.patch ++++++
>From 7685422a90e1da829cb32d685a4b970d30738098 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jose.dapena(a)lge.com>
Date: Wed, 3 Apr 2019 18:35:04 +0000
Subject: [PATCH] base: Value::Type enum class size should be 8-bit.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
GCC is complaining because, when base::Type is used to declare the different
variants of Type in its union, they are forced to take 8-bit, that is smaller
than the enum class default size (same as int).
So this change sets explicitely the enum class underlying type to be unsigned
char.
BUG=chromium:819294
Change-Id: I1765e2503e2c3d3675c73ecb0f7f5bc33456e6f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1550366
Commit-Queue: José Dapena Paz <jose.dapena(a)lge.com>
Reviewed-by: Jan Wilken Dörrie <jdoerrie(a)chromium.org>
Cr-Commit-Position: refs/heads/master@{#647382}
---
base/values.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/values.h b/base/values.h
index c455936d4961..14b76acec02f 100644
--- a/base/values.h
+++ b/base/values.h
@@ -86,7 +86,7 @@ class BASE_EXPORT Value {
// See technical note below explaining why this is used.
using DoubleStorage = struct { alignas(4) char v[sizeof(double)]; };
- enum class Type {
+ enum class Type : unsigned char {
NONE = 0,
BOOLEAN,
INTEGER,
--
2.21.0
++++++ chromium-73.0.3683.103.tar.xz -> chromium-74.0.3729.108.tar.xz ++++++
/work/SRC/openSUSE:Factory/chromium/chromium-73.0.3683.103.tar.xz /work/SRC/openSUSE:Factory/.chromium.new.5148/chromium-74.0.3729.108.tar.xz differ: char 25, line 1
++++++ chromium-gcc.patch ++++++
--- /var/tmp/diff_new_pack.yvyoKb/_old 2019-05-02 19:18:04.373500496 +0200
+++ /var/tmp/diff_new_pack.yvyoKb/_new 2019-05-02 19:18:04.389500525 +0200
@@ -1,430 +1,12 @@
-From 2c3b57cafbbb38c13a519c9d2fda8b65691d9564 Mon Sep 17 00:00:00 2001
-From: Raphael Kubo da Costa <raphael.kubo.da.costa(a)intel.com>
-Date: Thu, 7 Feb 2019 22:55:37 +0000
-Subject: [PATCH] allocator shim: Swap ALIGN_LINKAGE and SHIM_ALWAYS_EXPORT's
- positions
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This fixes the GCC build. GCC seems to be stricter with the position of the
-linkage specification, so just swap the terms to prevent an error that looks
-like:
-
-In file included from ../../base/allocator/allocator_shim.cc:333:
-../../base/allocator/allocator_shim_override_cpp_symbols.h:39:30: error: expected unqualified-id before string constant
- #define ALIGN_LINKAGE extern "C"
- ^~~
-../../base/allocator/allocator_shim_override_cpp_symbols.h:99:20: note: in expansion of macro ‘ALIGN_LINKAGE’
- SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void* ALIGN_NEW(std::size_t size,
- ^~~~~~~~~~~~~
-
-Bug: 819294
-Change-Id: I0aa16ea88cead42e83796a1c86afad8b447ddc50
-Reviewed-on: https://chromium-review.googlesource.com/c/1458256
-Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa(a)intel.com>
-Reviewed-by: Thomas Anderson <thomasanderson(a)chromium.org>
-Reviewed-by: Primiano Tucci <primiano(a)chromium.org>
-Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa(a)intel.com>
-Cr-Commit-Position: refs/heads/master@{#630084}
----
- .../allocator_shim_override_cpp_symbols.h | 20 +++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-Index: chromium-73.0.3683.75/base/allocator/allocator_shim_override_cpp_symbols.h
+Index: chromium-74.0.3729.108/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
===================================================================
---- chromium-73.0.3683.75.orig/base/allocator/allocator_shim_override_cpp_symbols.h
-+++ chromium-73.0.3683.75/base/allocator/allocator_shim_override_cpp_symbols.h
-@@ -96,57 +96,57 @@ SHIM_ALWAYS_EXPORT void operator delete[
- ShimCppDelete(p);
- }
+--- chromium-74.0.3729.108.orig/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
++++ chromium-74.0.3729.108/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
+@@ -20,6 +20,7 @@
+
+ #include <memory>
+ #include <utility>
++#include <cstring>
--SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void* ALIGN_NEW(std::size_t size,
-+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void* ALIGN_NEW(std::size_t size,
- ALIGN_VAL_T alignment) {
- return ShimCppAlignedNew(size, static_cast<size_t>(alignment));
- }
-
--SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void* ALIGN_NEW_NOTHROW(
-+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void* ALIGN_NEW_NOTHROW(
- std::size_t size,
- ALIGN_VAL_T alignment,
- const std::nothrow_t&) __THROW {
- return ShimCppAlignedNew(size, static_cast<size_t>(alignment));
- }
-
--SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void ALIGN_DEL(void* p, ALIGN_VAL_T) __THROW {
-+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void ALIGN_DEL(void* p, ALIGN_VAL_T) __THROW {
- ShimCppDelete(p);
- }
-
--SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void ALIGN_DEL_SIZED(void* p,
-+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void ALIGN_DEL_SIZED(void* p,
- std::size_t size,
- ALIGN_VAL_T) __THROW {
- ShimCppDelete(p);
- }
-
--SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void
-+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void
- ALIGN_DEL_NOTHROW(void* p, ALIGN_VAL_T, const std::nothrow_t&) __THROW {
- ShimCppDelete(p);
- }
-
--SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void* ALIGN_NEW_ARR(std::size_t size,
-+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void* ALIGN_NEW_ARR(std::size_t size,
- ALIGN_VAL_T alignment) {
- return ShimCppAlignedNew(size, static_cast<size_t>(alignment));
- }
-
--SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void* ALIGN_NEW_ARR_NOTHROW(
-+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void* ALIGN_NEW_ARR_NOTHROW(
- std::size_t size,
- ALIGN_VAL_T alignment,
- const std::nothrow_t&) __THROW {
- return ShimCppAlignedNew(size, static_cast<size_t>(alignment));
- }
-
--SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void ALIGN_DEL_ARR(void* p,
-+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void ALIGN_DEL_ARR(void* p,
- ALIGN_VAL_T) __THROW {
- ShimCppDelete(p);
- }
-
--SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void ALIGN_DEL_ARR_SIZED(void* p,
-+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void ALIGN_DEL_ARR_SIZED(void* p,
- std::size_t size,
- ALIGN_VAL_T) __THROW {
- ShimCppDelete(p);
- }
-
--SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void
-+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void
- ALIGN_DEL_ARR_NOTHROW(void* p, ALIGN_VAL_T, const std::nothrow_t&) __THROW {
- ShimCppDelete(p);
- }
-Index: chromium-73.0.3683.75/media/learning/common/labelled_example.cc
-===================================================================
---- chromium-73.0.3683.75.orig/media/learning/common/labelled_example.cc
-+++ chromium-73.0.3683.75/media/learning/common/labelled_example.cc
-@@ -59,7 +59,8 @@ bool LabelledExample::operator<(const La
- LabelledExample& LabelledExample::operator=(const LabelledExample& rhs) =
- default;
-
--LabelledExample& LabelledExample::operator=(LabelledExample&& rhs) = default;
-+LabelledExample& LabelledExample::operator=(LabelledExample&& rhs) noexcept =
-+ default;
-
- TrainingData::TrainingData() = default;
-
-Index: chromium-73.0.3683.75/media/learning/common/labelled_example.h
-===================================================================
---- chromium-73.0.3683.75.orig/media/learning/common/labelled_example.h
-+++ chromium-73.0.3683.75/media/learning/common/labelled_example.h
-@@ -40,7 +40,7 @@ struct COMPONENT_EXPORT(LEARNING_COMMON)
- bool operator<(const LabelledExample& rhs) const;
-
- LabelledExample& operator=(const LabelledExample& rhs);
-- LabelledExample& operator=(LabelledExample&& rhs);
-+ LabelledExample& operator=(LabelledExample&& rhs) noexcept;
-
- // Observed feature values.
- // Note that to interpret these values, you probably need to have the
-Index: chromium-73.0.3683.75/media/learning/common/value.cc
-===================================================================
---- chromium-73.0.3683.75.orig/media/learning/common/value.cc
-+++ chromium-73.0.3683.75/media/learning/common/value.cc
-@@ -23,6 +23,12 @@ Value::Value(const std::string& x) : val
-
- Value::Value(const Value& other) : value_(other.value_) {}
-
-+Value::Value(Value&& rhs) noexcept = default;
-+
-+Value& Value::operator=(const Value& rhs) = default;
-+
-+Value& Value::operator=(Value&& rhs) noexcept = default;
-+
- bool Value::operator==(const Value& rhs) const {
- return value_ == rhs.value_;
- }
-Index: chromium-73.0.3683.75/media/learning/common/value.h
-===================================================================
---- chromium-73.0.3683.75.orig/media/learning/common/value.h
-+++ chromium-73.0.3683.75/media/learning/common/value.h
-@@ -38,6 +38,10 @@ class COMPONENT_EXPORT(LEARNING_COMMON)
- explicit Value(const std::string& x);
-
- Value(const Value& other);
-+ Value(Value&&) noexcept;
-+
-+ Value& operator=(const Value&);
-+ Value& operator=(Value&&) noexcept;
-
- bool operator==(const Value& rhs) const;
- bool operator!=(const Value& rhs) const;
-Index: chromium-73.0.3683.75/ui/gfx/color_utils.cc
-===================================================================
---- chromium-73.0.3683.75.orig/ui/gfx/color_utils.cc
-+++ chromium-73.0.3683.75/ui/gfx/color_utils.cc
-@@ -431,7 +431,7 @@ SkColor SetDarkestColorForTesting(SkColo
- // GetContrastRatio(kWhiteLuminance, g_luminance_midpoint). The formula below
- // can be verified by plugging it into how GetContrastRatio() operates.
- g_luminance_midpoint =
-- std::sqrtf((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f;
-+ std::sqrt((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f;
-
- return previous_darkest_color;
- }
-Index: chromium-73.0.3683.75/net/third_party/quic/platform/impl/quic_flags_impl.cc
-===================================================================
---- chromium-73.0.3683.75.orig/net/third_party/quic/platform/impl/quic_flags_impl.cc
-+++ chromium-73.0.3683.75/net/third_party/quic/platform/impl/quic_flags_impl.cc
-@@ -5,6 +5,7 @@
- #include "net/third_party/quic/platform/impl/quic_flags_impl.h"
-
- #include <algorithm>
-+#include <initializer_list>
- #include <iostream>
- #include <set>
-
-@@ -153,9 +154,9 @@ std::string QuicFlagRegistry::GetHelp()
- template <>
- bool TypedQuicFlagHelper<bool>::SetFlag(const std::string& s) const {
- static const base::NoDestructor<std::set<std::string>> kTrueValues(
-- {"", "1", "t", "true", "y", "yes"});
-+ std::initializer_list<std::string>({"", "1", "t", "true", "y", "yes"}));
- static const base::NoDestructor<std::set<std::string>> kFalseValues(
-- {"0", "f", "false", "n", "no"});
-+ std::initializer_list<std::string>({"0", "f", "false", "n", "no"}));
- if (kTrueValues->find(base::ToLowerASCII(s)) != kTrueValues->end()) {
- *flag_ = true;
- return true;
-Index: chromium-73.0.3683.75/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
-===================================================================
---- chromium-73.0.3683.75.orig/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
-+++ chromium-73.0.3683.75/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
-@@ -1769,12 +1769,12 @@ void BaseRenderingContext2D::putImageDat
- CanvasColorParams(ColorParams().ColorSpace(), PixelFormat(), kNonOpaque);
- if (data_color_params.NeedsColorConversion(context_color_params) ||
- PixelFormat() == kF16CanvasPixelFormat) {
-- base::CheckedNumeric<size_t> data_length = data->Size().Area();
-- data_length *= context_color_params.BytesPerPixel();
-- if (!data_length.IsValid())
-+ size_t data_length;
-+ if (!base::CheckMul(data->Size().Area(),
-+ context_color_params.BytesPerPixel())
-+ .AssignIfValid(&data_length))
- return;
-- std::unique_ptr<uint8_t[]> converted_pixels(
-- new uint8_t[data_length.ValueOrDie()]);
-+ std::unique_ptr<uint8_t[]> converted_pixels(new uint8_t[data_length]);
- if (data->ImageDataInCanvasColorSettings(
- ColorParams().ColorSpace(), PixelFormat(), converted_pixels.get(),
- kRGBAColorType)) {
-Index: chromium-73.0.3683.75/chrome/browser/media/router/providers/cast/cast_activity_manager.cc
-===================================================================
---- chromium-73.0.3683.75.orig/chrome/browser/media/router/providers/cast/cast_activity_manager.cc
-+++ chromium-73.0.3683.75/chrome/browser/media/router/providers/cast/cast_activity_manager.cc
-@@ -803,7 +803,7 @@ CastActivityManager::DoLaunchSessionPara
- callback(std::move(callback)) {}
-
- CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams(
-- DoLaunchSessionParams&& other) noexcept = default;
-+ DoLaunchSessionParams&& other) = default;
-
- CastActivityManager::DoLaunchSessionParams::~DoLaunchSessionParams() = default;
-
-Index: chromium-73.0.3683.75/chrome/browser/media/router/providers/cast/cast_activity_manager.h
-===================================================================
---- chromium-73.0.3683.75.orig/chrome/browser/media/router/providers/cast/cast_activity_manager.h
-+++ chromium-73.0.3683.75/chrome/browser/media/router/providers/cast/cast_activity_manager.h
-@@ -295,7 +295,7 @@ class CastActivityManager : public cast_
- const url::Origin& origin,
- int tab_id,
- mojom::MediaRouteProvider::CreateRouteCallback callback);
-- DoLaunchSessionParams(DoLaunchSessionParams&& other) noexcept;
-+ DoLaunchSessionParams(DoLaunchSessionParams&& other);
- ~DoLaunchSessionParams();
- DoLaunchSessionParams& operator=(DoLaunchSessionParams&&) = delete;
-
-Index: chromium-73.0.3683.75/chrome/browser/ui/views/extensions/extension_popup.cc
-===================================================================
---- chromium-73.0.3683.75.orig/chrome/browser/ui/views/extensions/extension_popup.cc
-+++ chromium-73.0.3683.75/chrome/browser/ui/views/extensions/extension_popup.cc
-@@ -8,7 +8,6 @@
- #include "chrome/browser/devtools/devtools_window.h"
- #include "chrome/browser/extensions/extension_view_host.h"
- #include "chrome/browser/ui/browser.h"
--#include "chrome/browser/ui/tabs/tab_strip_model.h"
- #include "content/public/browser/devtools_agent_host.h"
- #include "content/public/browser/notification_details.h"
- #include "content/public/browser/notification_source.h"
-Index: chromium-73.0.3683.75/chrome/browser/ui/views/extensions/extension_popup.h
-===================================================================
---- chromium-73.0.3683.75.orig/chrome/browser/ui/views/extensions/extension_popup.h
-+++ chromium-73.0.3683.75/chrome/browser/ui/views/extensions/extension_popup.h
-@@ -9,6 +9,7 @@
- #include "base/compiler_specific.h"
- #include "base/macros.h"
- #include "base/scoped_observer.h"
-+#include "chrome/browser/ui/tabs/tab_strip_model.h"
- #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
- #include "chrome/browser/ui/views/extensions/extension_view_views.h"
- #include "content/public/browser/devtools_agent_host_observer.h"
-Index: chromium-73.0.3683.75/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
-===================================================================
---- chromium-73.0.3683.75.orig/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
-+++ chromium-73.0.3683.75/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
-@@ -8,6 +8,7 @@
- #include "base/macros.h"
- #include "base/memory/weak_ptr.h"
- #include "base/scoped_observer.h"
-+#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
- #include "chrome/browser/ui/toolbar/toolbar_actions_bar_observer.h"
- #include "chrome/browser/ui/views/toolbar/app_menu_observer.h"
- #include "ui/views/controls/scroll_view.h"
-@@ -15,7 +16,6 @@
- class AppMenu;
- class Browser;
- class BrowserActionsContainer;
--class ToolbarActionsBar;
-
- namespace views {
- class MenuItemView;
-Index: chromium-73.0.3683.75/content/public/browser/desktop_media_id.h
-===================================================================
---- chromium-73.0.3683.75.orig/content/public/browser/desktop_media_id.h
-+++ chromium-73.0.3683.75/content/public/browser/desktop_media_id.h
-@@ -41,16 +41,16 @@ struct CONTENT_EXPORT DesktopMediaID {
- static aura::Window* GetAuraWindowById(const DesktopMediaID& id);
- #endif // defined(USE_AURA)
-
-- constexpr DesktopMediaID() = default;
-+ DesktopMediaID() = default;
-
-- constexpr DesktopMediaID(Type type, Id id) : type(type), id(id) {}
-+ DesktopMediaID(Type type, Id id) : type(type), id(id) {}
-
-- constexpr DesktopMediaID(Type type,
-+ DesktopMediaID(Type type,
- Id id,
- WebContentsMediaCaptureId web_contents_id)
- : type(type), id(id), web_contents_id(web_contents_id) {}
-
-- constexpr DesktopMediaID(Type type, Id id, bool audio_share)
-+ DesktopMediaID(Type type, Id id, bool audio_share)
- : type(type), id(id), audio_share(audio_share) {}
-
- // Operators so that DesktopMediaID can be used with STL containers.
-Index: chromium-73.0.3683.75/extensions/browser/api/declarative_webrequest/webrequest_action.cc
-===================================================================
---- chromium-73.0.3683.75.orig/extensions/browser/api/declarative_webrequest/webrequest_action.cc
-+++ chromium-73.0.3683.75/extensions/browser/api/declarative_webrequest/webrequest_action.cc
-@@ -578,7 +578,7 @@ base::Optional<EventResponseDelta> WebRe
- CHECK(request_data.stage & stages());
- EventResponseDelta result(extension_id, extension_install_time);
- result.cancel = true;
-- return result;
-+ return base::make_optional(std::move(result));
- }
-
- //
-@@ -613,7 +613,7 @@ base::Optional<EventResponseDelta> WebRe
- return base::nullopt;
- EventResponseDelta result(extension_id, extension_install_time);
- result.new_url = redirect_url_;
-- return result;
-+ return base::make_optional(std::move(result));
- }
-
- //
-@@ -642,7 +642,7 @@ WebRequestRedirectToTransparentImageActi
- CHECK(request_data.stage & stages());
- EventResponseDelta result(extension_id, extension_install_time);
- result.new_url = GURL(kTransparentImageUrl);
-- return result;
-+ return base::make_optional(std::move(result));
- }
-
- //
-@@ -671,7 +671,7 @@ WebRequestRedirectToEmptyDocumentAction:
- CHECK(request_data.stage & stages());
- EventResponseDelta result(extension_id, extension_install_time);
- result.new_url = GURL(kEmptyDocumentUrl);
-- return result;
-+ return base::make_optional(std::move(result));
- }
-
- //
-@@ -773,7 +773,7 @@ base::Optional<EventResponseDelta> WebRe
-
- EventResponseDelta result(extension_id, extension_install_time);
- result.new_url = GURL(new_url);
-- return result;
-+ return base::make_optional(std::move(result));
- }
-
- //
-@@ -813,7 +813,7 @@ WebRequestSetRequestHeaderAction::Create
- CHECK(request_data.stage & stages());
- EventResponseDelta result(extension_id, extension_install_time);
- result.modified_request_headers.SetHeader(name_, value_);
-- return result;
-+ return base::make_optional(std::move(result));
- }
-
- //
-@@ -851,7 +851,7 @@ WebRequestRemoveRequestHeaderAction::Cre
- CHECK(request_data.stage & stages());
- EventResponseDelta result(extension_id, extension_install_time);
- result.deleted_request_headers.push_back(name_);
-- return result;
-+ return base::make_optional(std::move(result));
- }
-
- //
-@@ -900,7 +900,7 @@ WebRequestAddResponseHeaderAction::Creat
-
- EventResponseDelta result(extension_id, extension_install_time);
- result.added_response_headers.push_back(make_pair(name_, value_));
-- return result;
-+ return base::make_optional(std::move(result));
- }
-
- //
-@@ -954,7 +954,7 @@ WebRequestRemoveResponseHeaderAction::Cr
- continue;
- result.deleted_response_headers.push_back(make_pair(name_, current_value));
- }
-- return result;
-+ return base::make_optional(std::move(result));
- }
-
- //
-@@ -1039,7 +1039,7 @@ base::Optional<EventResponseDelta> WebRe
- EventResponseDelta result(extension_id, extension_install_time);
- result.request_cookie_modifications.push_back(
- request_cookie_modification_.Clone());
-- return result;
-+ return base::make_optional(std::move(result));
- }
-
- //
-@@ -1087,7 +1087,7 @@ base::Optional<EventResponseDelta> WebRe
- EventResponseDelta result(extension_id, extension_install_time);
- result.response_cookie_modifications.push_back(
- response_cookie_modification_.Clone());
-- return result;
-+ return base::make_optional(std::move(result));
- }
-
- //
-@@ -1127,7 +1127,7 @@ WebRequestSendMessageToExtensionAction::
- CHECK(request_data.stage & stages());
- EventResponseDelta result(extension_id, extension_install_time);
- result.messages_to_extension.insert(message_);
-- return result;
-+ return base::make_optional(std::move(result));
- }
-
- } // namespace extensions
+ #include "absl/memory/memory.h"
+ #include "modules/desktop_capture/desktop_capture_options.h"
++++++ chromium-non-void-return.patch ++++++
++++ 2641 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/chromium/chromium-non-void-return.patch
++++ and /work/SRC/openSUSE:Factory/.chromium.new.5148/chromium-non-void-return.patch
++++++ chromium-old-glibc.patch ++++++
--- /var/tmp/diff_new_pack.yvyoKb/_old 2019-05-02 19:18:04.865501391 +0200
+++ /var/tmp/diff_new_pack.yvyoKb/_new 2019-05-02 19:18:04.877501413 +0200
@@ -1,8 +1,8 @@
-Index: chromium-73.0.3673.0/gpu/config/gpu_info.cc
+Index: chromium-74.0.3729.108/gpu/config/gpu_info.cc
===================================================================
---- chromium-73.0.3673.0.orig/gpu/config/gpu_info.cc
-+++ chromium-73.0.3673.0/gpu/config/gpu_info.cc
-@@ -112,15 +112,15 @@ GPUInfo::GPUDevice::GPUDevice()
+--- chromium-74.0.3729.108.orig/gpu/config/gpu_info.cc
++++ chromium-74.0.3729.108/gpu/config/gpu_info.cc
+@@ -177,15 +177,15 @@ GPUInfo::GPUDevice::GPUDevice()
GPUInfo::GPUDevice::GPUDevice(const GPUInfo::GPUDevice& other) = default;
@@ -21,11 +21,11 @@
GPUInfo::GPUInfo()
: optimus(false),
-Index: chromium-73.0.3673.0/components/policy/core/common/policy_map.cc
+Index: chromium-74.0.3729.108/components/policy/core/common/policy_map.cc
===================================================================
---- chromium-73.0.3673.0.orig/components/policy/core/common/policy_map.cc
-+++ chromium-73.0.3673.0/components/policy/core/common/policy_map.cc
-@@ -17,8 +17,8 @@ PolicyMap::Entry::Entry() = default;
+--- chromium-74.0.3729.108.orig/components/policy/core/common/policy_map.cc
++++ chromium-74.0.3729.108/components/policy/core/common/policy_map.cc
+@@ -29,8 +29,8 @@ PolicyMap::Entry::Entry(
PolicyMap::Entry::~Entry() = default;
@@ -36,10 +36,10 @@
PolicyMap::Entry PolicyMap::Entry::DeepCopy() const {
Entry copy;
-Index: chromium-73.0.3673.0/components/search_provider_logos/logo_common.cc
+Index: chromium-74.0.3729.108/components/search_provider_logos/logo_common.cc
===================================================================
---- chromium-73.0.3673.0.orig/components/search_provider_logos/logo_common.cc
-+++ chromium-73.0.3673.0/components/search_provider_logos/logo_common.cc
+--- chromium-74.0.3729.108.orig/components/search_provider_logos/logo_common.cc
++++ chromium-74.0.3729.108/components/search_provider_logos/logo_common.cc
@@ -12,24 +12,24 @@ const int64_t kMaxTimeToLiveMS = INT64_C
LogoMetadata::LogoMetadata() = default;
@@ -71,11 +71,26 @@
LogoCallbacks::~LogoCallbacks() = default;
} // namespace search_provider_logos
-Index: chromium-73.0.3673.0/components/signin/core/browser/account_info.cc
+Index: chromium-74.0.3729.108/components/signin/core/browser/account_info.cc
===================================================================
---- chromium-73.0.3673.0.orig/components/signin/core/browser/account_info.cc
-+++ chromium-73.0.3673.0/components/signin/core/browser/account_info.cc
-@@ -28,11 +28,11 @@ AccountInfo::~AccountInfo() = default;
+--- chromium-74.0.3729.108.orig/components/signin/core/browser/account_info.cc
++++ chromium-74.0.3729.108/components/signin/core/browser/account_info.cc
+@@ -46,12 +46,12 @@ CoreAccountInfo::~CoreAccountInfo() = de
+
+ CoreAccountInfo::CoreAccountInfo(const CoreAccountInfo& other) = default;
+
+-CoreAccountInfo::CoreAccountInfo(CoreAccountInfo&& other) noexcept = default;
++CoreAccountInfo::CoreAccountInfo(CoreAccountInfo&& other) = default;
+
+ CoreAccountInfo& CoreAccountInfo::operator=(const CoreAccountInfo& other) =
+ default;
+
+-CoreAccountInfo& CoreAccountInfo::operator=(CoreAccountInfo&& other) noexcept =
++CoreAccountInfo& CoreAccountInfo::operator=(CoreAccountInfo&& other) =
+ default;
+
+ bool CoreAccountInfo::IsEmpty() const {
+@@ -64,11 +64,11 @@ AccountInfo::~AccountInfo() = default;
AccountInfo::AccountInfo(const AccountInfo& other) = default;
@@ -88,11 +103,11 @@
+AccountInfo& AccountInfo::operator=(AccountInfo&& other) = default;
bool AccountInfo::IsEmpty() const {
- return account_id.empty() && email.empty() && gaia.empty() &&
-Index: chromium-73.0.3673.0/chrome/common/media_router/media_sink.cc
+ return CoreAccountInfo::IsEmpty() && hosted_domain.empty() &&
+Index: chromium-74.0.3729.108/chrome/common/media_router/media_sink.cc
===================================================================
---- chromium-73.0.3673.0.orig/chrome/common/media_router/media_sink.cc
-+++ chromium-73.0.3673.0/chrome/common/media_router/media_sink.cc
+--- chromium-74.0.3729.108.orig/chrome/common/media_router/media_sink.cc
++++ chromium-74.0.3729.108/chrome/common/media_router/media_sink.cc
@@ -19,12 +19,12 @@ MediaSink::MediaSink(const MediaSink::Id
provider_id_(provider_id) {}
++++++ old-libva.patch ++++++
Index: chromium-74.0.3729.108/media/gpu/vaapi/vaapi_wrapper.cc
===================================================================
--- chromium-74.0.3729.108.orig/media/gpu/vaapi/vaapi_wrapper.cc
+++ chromium-74.0.3729.108/media/gpu/vaapi/vaapi_wrapper.cc
@@ -286,9 +286,6 @@ bool VADisplayState::Initialize() {
}
bool VADisplayState::InitializeOnce() {
- static_assert(VA_MAJOR_VERSION >= 1 && VA_MINOR_VERSION >= 1,
- "Requires VA-API >= 1.1.0");
-
switch (gl::GetGLImplementation()) {
case gl::kGLImplementationEGLGLES2:
va_display_ = vaGetDisplayDRM(drm_fd_.get());
Index: chromium-74.0.3729.108/media/gpu/vaapi/vaapi_jpeg_decode_accelerator.cc
===================================================================
--- chromium-74.0.3729.108.orig/media/gpu/vaapi/vaapi_jpeg_decode_accelerator.cc
+++ chromium-74.0.3729.108/media/gpu/vaapi/vaapi_jpeg_decode_accelerator.cc
@@ -29,6 +29,10 @@
#include "third_party/libyuv/include/libyuv.h"
#include "ui/gfx/geometry/size.h"
+#ifndef VA_FOURCC_I420
+#define VA_FOURCC_I420 0x30323449
+#endif
+
namespace media {
namespace {
Index: chromium-74.0.3729.108/media/gpu/vaapi/vaapi_jpeg_decoder.cc
===================================================================
--- chromium-74.0.3729.108.orig/media/gpu/vaapi/vaapi_jpeg_decoder.cc
+++ chromium-74.0.3729.108/media/gpu/vaapi/vaapi_jpeg_decoder.cc
@@ -19,6 +19,10 @@
#include "media/gpu/vaapi/vaapi_utils.h"
#include "media/gpu/vaapi/vaapi_wrapper.h"
+#ifndef VA_FOURCC_I420
+#define VA_FOURCC_I420 0x30323449
+#endif
+
namespace media {
namespace {
++++++ quic.patch ++++++
description: fix gcc compile error with substreams_ initializer list
author: Michael Gilbert <mgilbert(a)debian.org>
--- a/net/third_party/quic/core/quic_crypto_stream.cc
+++ b/net/third_party/quic/core/quic_crypto_stream.cc
@@ -28,9 +28,9 @@ QuicCryptoStream::QuicCryptoStream(QuicS
session,
/*is_static=*/true,
BIDIRECTIONAL),
- substreams_{{this, ENCRYPTION_NONE},
- {this, ENCRYPTION_ZERO_RTT},
- {this, ENCRYPTION_FORWARD_SECURE}} {
+ substreams_{std::make_unique<CryptoSubstream>(this, ENCRYPTION_NONE),
+ std::make_unique<CryptoSubstream>(this, ENCRYPTION_ZERO_RTT),
+ std::make_unique<CryptoSubstream>(this, ENCRYPTION_FORWARD_SECURE)} {
// The crypto stream is exempt from connection level flow control.
DisableConnectionFlowControlForThisStream();
}
@@ -57,7 +57,7 @@ void QuicCryptoStream::OnCryptoFrame(con
QUIC_BUG_IF(session()->connection()->transport_version() < QUIC_VERSION_47)
<< "Versions less than 47 shouldn't receive CRYPTO frames";
EncryptionLevel level = session()->connection()->last_decrypted_level();
- substreams_[level].sequencer.OnCryptoFrame(frame);
+ substreams_[level]->sequencer.OnCryptoFrame(frame);
}
void QuicCryptoStream::OnStreamFrame(const QuicStreamFrame& frame) {
@@ -79,7 +79,7 @@ void QuicCryptoStream::OnDataAvailable()
OnDataAvailableInSequencer(sequencer(), level);
return;
}
- OnDataAvailableInSequencer(&substreams_[level].sequencer, level);
+ OnDataAvailableInSequencer(&substreams_[level]->sequencer, level);
}
void QuicCryptoStream::OnDataAvailableInSequencer(
@@ -133,7 +133,7 @@ void QuicCryptoStream::WriteCryptoData(E
}
// Append |data| to the send buffer for this encryption level.
struct iovec iov(QuicUtils::MakeIovec(data));
- QuicStreamSendBuffer* send_buffer = &substreams_[level].send_buffer;
+ QuicStreamSendBuffer* send_buffer = &substreams_[level]->send_buffer;
QuicStreamOffset offset = send_buffer->stream_offset();
send_buffer->SaveStreamData(&iov, /*iov_count=*/1, /*iov_offset=*/0,
data.length());
@@ -160,7 +160,7 @@ void QuicCryptoStream::OnSuccessfulVersi
bool QuicCryptoStream::OnCryptoFrameAcked(const QuicCryptoFrame& frame,
QuicTime::Delta ack_delay_time) {
QuicByteCount newly_acked_length = 0;
- if (!substreams_[frame.level].send_buffer.OnStreamDataAcked(
+ if (!substreams_[frame.level]->send_buffer.OnStreamDataAcked(
frame.offset, frame.data_length, &newly_acked_length)) {
CloseConnectionWithDetails(QUIC_INTERNAL_ERROR,
"Trying to ack unsent crypto data.");
@@ -178,7 +178,7 @@ void QuicCryptoStream::NeuterUnencrypted
}
return;
}
- QuicStreamSendBuffer* send_buffer = &substreams_[ENCRYPTION_NONE].send_buffer;
+ QuicStreamSendBuffer* send_buffer = &substreams_[ENCRYPTION_NONE]->send_buffer;
// TODO(nharper): Consider adding a Clear() method to QuicStreamSendBuffer to
// replace the following code.
QuicIntervalSet<QuicStreamOffset> to_ack = send_buffer->bytes_acked();
@@ -207,7 +207,7 @@ bool QuicCryptoStream::HasPendingCryptoR
}
for (EncryptionLevel level :
{ENCRYPTION_NONE, ENCRYPTION_ZERO_RTT, ENCRYPTION_FORWARD_SECURE}) {
- if (substreams_[level].send_buffer.HasPendingRetransmission()) {
+ if (substreams_[level]->send_buffer.HasPendingRetransmission()) {
return true;
}
}
@@ -221,7 +221,7 @@ void QuicCryptoStream::WritePendingCrypt
session()->connection()->encryption_level();
for (EncryptionLevel level :
{ENCRYPTION_NONE, ENCRYPTION_ZERO_RTT, ENCRYPTION_FORWARD_SECURE}) {
- QuicStreamSendBuffer* send_buffer = &substreams_[level].send_buffer;
+ QuicStreamSendBuffer* send_buffer = &substreams_[level]->send_buffer;
session()->connection()->SetDefaultEncryptionLevel(level);
while (send_buffer->HasPendingRetransmission()) {
auto pending = send_buffer->NextPendingRetransmission();
@@ -326,13 +326,13 @@ uint64_t QuicCryptoStream::crypto_bytes_
if (session()->connection()->transport_version() < QUIC_VERSION_47) {
return stream_bytes_read();
}
- return substreams_[ENCRYPTION_NONE].sequencer.NumBytesConsumed() +
- substreams_[ENCRYPTION_ZERO_RTT].sequencer.NumBytesConsumed() +
- substreams_[ENCRYPTION_FORWARD_SECURE].sequencer.NumBytesConsumed();
+ return substreams_[ENCRYPTION_NONE]->sequencer.NumBytesConsumed() +
+ substreams_[ENCRYPTION_ZERO_RTT]->sequencer.NumBytesConsumed() +
+ substreams_[ENCRYPTION_FORWARD_SECURE]->sequencer.NumBytesConsumed();
}
uint64_t QuicCryptoStream::BytesReadOnLevel(EncryptionLevel level) const {
- return substreams_[level].sequencer.NumBytesConsumed();
+ return substreams_[level]->sequencer.NumBytesConsumed();
}
bool QuicCryptoStream::WriteCryptoFrame(EncryptionLevel level,
@@ -341,14 +341,14 @@ bool QuicCryptoStream::WriteCryptoFrame(
QuicDataWriter* writer) {
QUIC_BUG_IF(session()->connection()->transport_version() < QUIC_VERSION_47)
<< "Versions less than 47 don't write CRYPTO frames (2)";
- return substreams_[level].send_buffer.WriteStreamData(offset, data_length,
+ return substreams_[level]->send_buffer.WriteStreamData(offset, data_length,
writer);
}
void QuicCryptoStream::OnCryptoFrameLost(QuicCryptoFrame* crypto_frame) {
QUIC_BUG_IF(session()->connection()->transport_version() < QUIC_VERSION_47)
<< "Versions less than 47 don't lose CRYPTO frames";
- substreams_[crypto_frame->level].send_buffer.OnStreamDataLost(
+ substreams_[crypto_frame->level]->send_buffer.OnStreamDataLost(
crypto_frame->offset, crypto_frame->data_length);
}
@@ -358,7 +358,7 @@ void QuicCryptoStream::RetransmitData(Qu
QuicIntervalSet<QuicStreamOffset> retransmission(
crypto_frame->offset, crypto_frame->offset + crypto_frame->data_length);
QuicStreamSendBuffer* send_buffer =
- &substreams_[crypto_frame->level].send_buffer;
+ &substreams_[crypto_frame->level]->send_buffer;
retransmission.Difference(send_buffer->bytes_acked());
if (retransmission.Empty()) {
return;
@@ -389,7 +389,7 @@ bool QuicCryptoStream::IsFrameOutstandin
// the wrong transport version.
return false;
}
- return substreams_[level].send_buffer.IsStreamDataOutstanding(offset, length);
+ return substreams_[level]->send_buffer.IsStreamDataOutstanding(offset, length);
}
bool QuicCryptoStream::IsWaitingForAcks() const {
@@ -398,7 +398,7 @@ bool QuicCryptoStream::IsWaitingForAcks(
}
for (EncryptionLevel level :
{ENCRYPTION_NONE, ENCRYPTION_ZERO_RTT, ENCRYPTION_FORWARD_SECURE}) {
- if (substreams_[level].send_buffer.stream_bytes_outstanding()) {
+ if (substreams_[level]->send_buffer.stream_bytes_outstanding()) {
return true;
}
}
--- a/net/third_party/quic/core/quic_crypto_stream.h
+++ b/net/third_party/quic/core/quic_crypto_stream.h
@@ -166,7 +166,7 @@ class QUIC_EXPORT_PRIVATE QuicCryptoStre
// Keeps state for data sent/received in CRYPTO frames at each encryption
// level.
- CryptoSubstream substreams_[NUM_ENCRYPTION_LEVELS];
+ std::unique_ptr<CryptoSubstream> substreams_[NUM_ENCRYPTION_LEVELS];
};
} // namespace quic
1
0