Hello community, here is the log from the commit of package snapper for openSUSE:Factory checked in at 2014-02-21 19:43:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/snapper (Old) and /work/SRC/openSUSE:Factory/.snapper.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "snapper" Changes: -------- --- /work/SRC/openSUSE:Factory/snapper/snapper.changes 2014-02-17 09:37:41.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.snapper.new/snapper.changes 2014-02-21 19:43:24.000000000 +0100 @@ -1,0 +2,10 @@ +Thu Feb 20 15:04:30 CET 2014 - [email protected] + +- fixed segmentation fault with DBus (bnc#860119) + +------------------------------------------------------------------- +Thu Feb 20 14:18:01 CET 2014 - [email protected] + +- updated zypp-plugin.conf (bnc#864841) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ snapper-0.2.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.1/data/zypp-plugin.conf new/snapper-0.2.1/data/zypp-plugin.conf --- old/snapper-0.2.1/data/zypp-plugin.conf 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.1/data/zypp-plugin.conf 2014-02-20 15:30:52.000000000 +0100 @@ -8,9 +8,9 @@ is marked as important, the snapshots are also marked as important. --> <solvables> <solvable match="w" important="true">kernel-*</solvable> - <solvable match="w" important="true">mkinitrd</solvable> + <solvable match="w" important="true">dracut</solvable> <solvable match="w" important="true">glibc</solvable> - <solvable match="w" important="true">systemd</solvable> + <solvable match="w" important="true">systemd*</solvable> <solvable match="w" important="true">udev</solvable> <solvable match="w">*</solvable> </solvables> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.1/dbus/DBusMainLoop.cc new/snapper-0.2.1/dbus/DBusMainLoop.cc --- old/snapper-0.2.1/dbus/DBusMainLoop.cc 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.1/dbus/DBusMainLoop.cc 2014-02-20 15:30:52.000000000 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Novell, Inc. + * Copyright (c) [2012-2014] Novell, Inc. * * All Rights Reserved. * @@ -30,6 +30,28 @@ namespace DBus { + MainLoop::Watch::Watch(DBusWatch* dbus_watch) + : dbus_watch(dbus_watch), enabled(false), fd(-1), events(0) + { + enabled = dbus_watch_get_enabled(dbus_watch); + fd = dbus_watch_get_unix_fd(dbus_watch); + + unsigned int flags = dbus_watch_get_flags(dbus_watch); + if (flags & DBUS_WATCH_READABLE) + events |= POLLIN; + if (flags & DBUS_WATCH_WRITABLE) + events |= POLLOUT; + } + + + MainLoop::Timeout::Timeout(DBusTimeout* dbus_timeout) + : dbus_timeout(dbus_timeout), enabled(false), interval(0) + { + enabled = dbus_timeout_get_enabled(dbus_timeout); + interval = dbus_timeout_get_interval(dbus_timeout); + } + + MainLoop::MainLoop(DBusBusType type) : Connection(type), idle_timeout(-1) { @@ -100,36 +122,37 @@ periodic(); - for (vector<struct pollfd>::const_iterator it2 = pollfds.begin(); it2 != pollfds.end(); ++it2) + for (vector<struct pollfd>::const_iterator it1 = pollfds.begin(); it1 != pollfds.end(); ++it1) { - if (it2->fd == wakeup_pipe[0] && (it2->revents & POLLIN)) + if (it1->fd == wakeup_pipe[0]) { - char arbitrary; - read(wakeup_pipe[0], &arbitrary, 1); + if (it1->revents & POLLIN) + { + char arbitrary; + read(wakeup_pipe[0], &arbitrary, 1); + } } - } - - for (vector<Watch>::const_iterator it = watches.begin(); it != watches.end(); ++it) - { - if (it->enabled) + else { - for (vector<struct pollfd>::const_iterator it2 = pollfds.begin(); it2 != pollfds.end(); ++it2) - { - if (it2->fd == it->fd) - { - unsigned int flags = 0; + unsigned int flags = 0; - if (it2->revents & POLLIN) - flags |= DBUS_WATCH_READABLE; + if (it1->revents & POLLIN) + flags |= DBUS_WATCH_READABLE; - if (it2->revents & POLLOUT) - flags |= DBUS_WATCH_WRITABLE; + if (it1->revents & POLLOUT) + flags |= DBUS_WATCH_WRITABLE; - if (flags != 0) - { - boost::lock_guard<boost::mutex> lock(mutex); - dbus_watch_handle(it->dbus_watch, flags); - } + if (flags != 0) + { + // Do not iterate over watches here since calling dbus_watch_handle() can + // trigger a remove_watch() callback, thus invalidating the iterator. + // Instead always search for the watch. + + vector<Watch>::const_iterator it2 = find_enabled_watch(it1->fd, it1->events); + if (it2 != watches.end()) + { + boost::lock_guard<boost::mutex> lock(mutex); + dbus_watch_handle(it2->dbus_watch, flags); } } } @@ -178,6 +201,17 @@ } + vector<MainLoop::Watch>::iterator + MainLoop::find_enabled_watch(int fd, int events) + { + for (vector<Watch>::iterator it = watches.begin(); it != watches.end(); ++it) + if (it->enabled && it->fd == fd && it->events == events) + return it; + + return watches.end(); + } + + vector<MainLoop::Timeout>::iterator MainLoop::find_timeout(DBusTimeout* dbus_timeout) { @@ -192,22 +226,9 @@ dbus_bool_t MainLoop::add_watch(DBusWatch* dbus_watch, void* data) { - Watch tmp; - tmp.enabled = dbus_watch_get_enabled(dbus_watch); - tmp.fd = dbus_watch_get_unix_fd(dbus_watch); - tmp.flags = dbus_watch_get_flags(dbus_watch); - - tmp.events = 0; - if (tmp.flags & DBUS_WATCH_READABLE) - tmp.events |= POLLIN; - if (tmp.flags & DBUS_WATCH_WRITABLE) - tmp.events |= POLLOUT; - - tmp.dbus_watch = dbus_watch; - + Watch tmp(dbus_watch); MainLoop* s = static_cast<MainLoop*>(data); s->watches.push_back(tmp); - return true; } @@ -233,14 +254,9 @@ dbus_bool_t MainLoop::add_timeout(DBusTimeout* dbus_timeout, void* data) { - Timeout tmp; - tmp.enabled = dbus_timeout_get_enabled(dbus_timeout); - tmp.interval = dbus_timeout_get_interval(dbus_timeout); - tmp.dbus_timeout = dbus_timeout; - + Timeout tmp(dbus_timeout); MainLoop* s = static_cast<MainLoop*>(data); s->timeouts.push_back(tmp); - return true; } @@ -249,7 +265,6 @@ MainLoop::remove_timeout(DBusTimeout* dbus_timeout, void* data) { MainLoop* s = static_cast<MainLoop*>(data); - vector<Timeout>::iterator it = s->find_timeout(dbus_timeout); s->timeouts.erase(it); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.1/dbus/DBusMainLoop.h new/snapper-0.2.1/dbus/DBusMainLoop.h --- old/snapper-0.2.1/dbus/DBusMainLoop.h 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.1/dbus/DBusMainLoop.h 2014-02-20 15:30:52.000000000 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Novell, Inc. + * Copyright (c) [2012-2014] Novell, Inc. * * All Rights Reserved. * @@ -57,18 +57,21 @@ struct Watch { + Watch(DBusWatch* dbus_watch); + + DBusWatch* dbus_watch; bool enabled; int fd; - unsigned int flags; int events; - DBusWatch* dbus_watch; }; struct Timeout { + Timeout(DBusTimeout* dbus_timeout); + + DBusTimeout* dbus_timeout; bool enabled; int interval; - DBusTimeout* dbus_timeout; }; vector<Watch> watches; @@ -76,6 +79,7 @@ int wakeup_pipe[2]; vector<Watch>::iterator find_watch(DBusWatch* dbus_watch); + vector<Watch>::iterator find_enabled_watch(int fd, int events); vector<Timeout>::iterator find_timeout(DBusTimeout* dbus_timeout); static dbus_bool_t add_watch(DBusWatch* dbus_watch, void* data); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.1/snapper/Lvm.cc new/snapper-0.2.1/snapper/Lvm.cc --- old/snapper-0.2.1/snapper/Lvm.cc 2014-02-05 14:22:06.000000000 +0100 +++ new/snapper-0.2.1/snapper/Lvm.cc 2014-02-18 09:58:52.000000000 +0100 @@ -94,7 +94,10 @@ mount_options = filter_mount_options(mtab_data.options); if (mount_type == "xfs") + { mount_options.push_back("nouuid"); + mount_options.push_back("norecovery"); + } } -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
