Hello community, here is the log from the commit of package snapper for openSUSE:Factory checked in at 2014-06-10 14:37:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-06-01 18:55:58.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.snapper.new/snapper.changes 2014-06-10 14:37:59.000000000 +0200 @@ -1,0 +2,5 @@ +Mon Jun 02 14:54:29 CEST 2014 - aschn...@suse.de + +- added aliases for some snapper commands + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ snapper-0.2.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.2/client/snapper.cc new/snapper-0.2.2/client/snapper.cc --- old/snapper-0.2.2/client/snapper.cc 2014-05-27 13:00:30.000000000 +0200 +++ new/snapper-0.2.2/client/snapper.cc 2014-06-06 13:36:33.000000000 +0200 @@ -66,15 +66,20 @@ works_without_dbus(works_without_dbus), needs_snapper(needs_snapper) {} + Cmd(const string& name, const vector<string>& aliases, cmd_func_t cmd_func, + help_func_t help_func, bool works_without_dbus, bool needs_snapper) + : name(name), aliases(aliases), cmd_func(cmd_func), help_func(help_func), + works_without_dbus(works_without_dbus), needs_snapper(needs_snapper) + {} + const string name; + const vector<string> aliases; const cmd_func_t cmd_func; const help_func_t help_func; const bool works_without_dbus; const bool needs_snapper; }; -list<Cmd> cmds; - GetOpts getopts; bool quiet = false; @@ -1448,7 +1453,7 @@ void help() __attribute__ ((__noreturn__)); void -help() +help(const list<Cmd>& cmds) { getopts.parse("help", GetOpts::no_options); if (getopts.hasArgs()) @@ -1486,28 +1491,30 @@ setLogDo(&log_do); setLogQuery(&log_query); - cmds.push_back(Cmd("list-configs", command_list_configs, help_list_configs, true, false)); - cmds.push_back(Cmd("create-config", command_create_config, help_create_config, true, false)); - cmds.push_back(Cmd("delete-config", command_delete_config, help_delete_config, true, false)); - cmds.push_back(Cmd("get-config", command_get_config, help_get_config, true, false)); - cmds.push_back(Cmd("set-config", command_set_config, help_set_config, true, true)); - cmds.push_back(Cmd("list", command_list, help_list, true, true)); - cmds.push_back(Cmd("create", command_create, help_create, false, true)); - cmds.push_back(Cmd("modify", command_modify, help_modify, false, true)); - cmds.push_back(Cmd("delete", command_delete, help_delete, false, true)); - cmds.push_back(Cmd("mount", command_mount, help_mount, true, true)); - cmds.push_back(Cmd("umount", command_umount, help_umount, true, true)); - cmds.push_back(Cmd("status", command_status, help_status, false, true)); - cmds.push_back(Cmd("diff", command_diff, help_diff, false, true)); + const list<Cmd> cmds = { + Cmd("list-configs", command_list_configs, help_list_configs, true, false), + Cmd("create-config", command_create_config, help_create_config, true, false), + Cmd("delete-config", command_delete_config, help_delete_config, true, false), + Cmd("get-config", command_get_config, help_get_config, true, false), + Cmd("set-config", command_set_config, help_set_config, true, true), + Cmd("list", { "ls" }, command_list, help_list, true, true), + Cmd("create", command_create, help_create, false, true), + Cmd("modify", command_modify, help_modify, false, true), + Cmd("delete", { "remove", "rm" }, command_delete, help_delete, false, true), + Cmd("mount", command_mount, help_mount, true, true), + Cmd("umount", command_umount, help_umount, true, true), + Cmd("status", command_status, help_status, false, true), + Cmd("diff", command_diff, help_diff, false, true), #ifdef ENABLE_XATTRS - cmds.push_back(Cmd("xadiff", command_xa_diff, help_xa_diff, false, true)); + Cmd("xadiff", command_xa_diff, help_xa_diff, false, true), #endif - cmds.push_back(Cmd("undochange", command_undo, help_undo, false, true)); + Cmd("undochange", command_undo, help_undo, false, true), #ifdef ENABLE_ROLLBACK - cmds.push_back(Cmd("rollback", command_rollback, help_rollback, false, true)); + Cmd("rollback", command_rollback, help_rollback, false, true), #endif - cmds.push_back(Cmd("cleanup", command_cleanup, help_cleanup, false, true)); - cmds.push_back(Cmd("debug", command_debug, help_debug, false, false)); + Cmd("cleanup", command_cleanup, help_cleanup, false, true), + Cmd("debug", command_debug, help_debug, false, false) + }; const struct option options[] = { { "quiet", no_argument, 0, 'q' }, @@ -1567,7 +1574,7 @@ if ((opt = opts.find("help")) != opts.end()) { - help(); + help(cmds); } if (!getopts.hasArgs()) @@ -1580,7 +1587,7 @@ const char* command = getopts.popArg(); list<Cmd>::const_iterator cmd = cmds.begin(); - while (cmd != cmds.end() && cmd->name != command) + while (cmd != cmds.end() && (cmd->name != command && !contains(cmd->aliases, command))) ++cmd; if (cmd == cmds.end()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.2/dbus/DBusConnection.cc new/snapper-0.2.2/dbus/DBusConnection.cc --- old/snapper-0.2.2/dbus/DBusConnection.cc 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.2/dbus/DBusConnection.cc 2014-06-04 12:23:25.000000000 +0200 @@ -150,7 +150,7 @@ } - unsigned long + uid_t Connection::get_unix_userid(const Message& m) { boost::lock_guard<boost::mutex> lock(mutex); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.2/dbus/DBusConnection.h new/snapper-0.2.2/dbus/DBusConnection.h --- old/snapper-0.2.2/dbus/DBusConnection.h 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.2/dbus/DBusConnection.h 2014-06-04 12:23:25.000000000 +0200 @@ -54,7 +54,7 @@ void add_match(const string& rule) { add_match(rule.c_str()); } void remove_match(const string& rule) { remove_match(rule.c_str()); } - unsigned long get_unix_userid(const Message& m); + uid_t get_unix_userid(const Message& m); protected: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.2/dbus/DBusMainLoop.cc new/snapper-0.2.2/dbus/DBusMainLoop.cc --- old/snapper-0.2.2/dbus/DBusMainLoop.cc 2014-02-20 15:30:52.000000000 +0100 +++ new/snapper-0.2.2/dbus/DBusMainLoop.cc 2014-06-03 18:58:43.000000000 +0200 @@ -202,7 +202,7 @@ vector<MainLoop::Watch>::iterator - MainLoop::find_enabled_watch(int fd, int events) + MainLoop::find_enabled_watch(int fd, short events) { for (vector<Watch>::iterator it = watches.begin(); it != watches.end(); ++it) if (it->enabled && it->fd == fd && it->events == events) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.2/dbus/DBusMainLoop.h new/snapper-0.2.2/dbus/DBusMainLoop.h --- old/snapper-0.2.2/dbus/DBusMainLoop.h 2014-02-20 15:30:52.000000000 +0100 +++ new/snapper-0.2.2/dbus/DBusMainLoop.h 2014-06-03 18:58:43.000000000 +0200 @@ -62,7 +62,7 @@ DBusWatch* dbus_watch; bool enabled; int fd; - int events; + short events; }; struct Timeout @@ -79,7 +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<Watch>::iterator find_enabled_watch(int fd, short 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.2/doc/snapper.xml.in new/snapper-0.2.2/doc/snapper.xml.in --- old/snapper-0.2.2/doc/snapper.xml.in 2014-05-27 13:00:30.000000000 +0200 +++ new/snapper-0.2.2/doc/snapper.xml.in 2014-06-02 15:28:35.000000000 +0200 @@ -299,7 +299,7 @@ </varlistentry> <varlistentry> - <term><option>list [options]</option></term> + <term><option>list (ls) [options]</option></term> <listitem> <para>List snapshots.</para> <variablelist> @@ -399,7 +399,8 @@ </varlistentry> <varlistentry> - <term><option>delete <replaceable>number</replaceable> | <replaceable>number1-number2</replaceable></option></term> + <term><option>delete (remove|rm) <replaceable>number</replaceable> | + <replaceable>number1-number2</replaceable></option></term> <listitem> <para>Delete a snapshot or a range of snapshots.</para> </listitem> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.2/examples/c/snapper_dbus_cli.c new/snapper-0.2.2/examples/c/snapper_dbus_cli.c --- old/snapper-0.2.2/examples/c/snapper_dbus_cli.c 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.2/examples/c/snapper_dbus_cli.c 2014-06-04 12:23:25.000000000 +0200 @@ -321,10 +321,10 @@ return ret; } -static void snap_array_free(int32_t num_snaps, +static void snap_array_free(uint32_t num_snaps, struct snap *snaps) { - int i; + uint32_t i; for (i = 0; i < num_snaps; i++) { free(snaps[i].user_data); @@ -332,10 +332,10 @@ free(snaps); } -static void snap_array_print(int32_t num_snaps, +static void snap_array_print(uint32_t num_snaps, struct snap *snaps) { - int i; + uint32_t i; for (i = 0; i < num_snaps; i++) { printf("id: %u\n" @@ -543,10 +543,10 @@ return ret; } -static void conf_array_free(int32_t num_confs, +static void conf_array_free(uint32_t num_confs, struct config *confs) { - int i; + uint32_t i; for (i = 0; i < num_confs; i++) { free(confs[i].attrs); @@ -554,10 +554,10 @@ free(confs); } -static void conf_array_print(int32_t num_confs, +static void conf_array_print(uint32_t num_confs, struct config *confs) { - int i; + uint32_t i; for (i = 0; i < num_confs; i++) { printf("name: %s\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.2/pam/pam_snapper.c new/snapper-0.2.2/pam/pam_snapper.c --- old/snapper-0.2.2/pam/pam_snapper.c 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.2/pam/pam_snapper.c 2014-06-04 12:23:25.000000000 +0200 @@ -425,8 +425,8 @@ } } -static void fill_user_data( pam_handle_t * pamh, struct dict ( *user_data )[], int *num_user_data, - int max_user_data ) +static void fill_user_data( pam_handle_t * pamh, struct dict ( *user_data )[], + uint32_t * num_user_data, uint32_t max_user_data ) { int fields[4] = { PAM_RUSER, PAM_RHOST, PAM_TTY, PAM_SERVICE }; const char *names[4] = { "ruser", "rhost", "tty", "service" }; @@ -472,9 +472,9 @@ static int worker( pam_handle_t * pamh, const char *pam_user, const char *snapper_conf, createmode_t createmode, const char *cleanup ) { - const int max_user_data = 5; + const uint32_t max_user_data = 5; struct dict user_data[max_user_data]; - int num_user_data = 0; + uint32_t num_user_data = 0; fill_user_data( pamh, &user_data, &num_user_data, max_user_data ); uid_t uid; @@ -500,8 +500,7 @@ } if ( forker( pamh, pam_user, uid, gid, snapper_conf, createmode, cleanup, num_user_data, - user_data, snapshot_num_in, snapshot_num_out ) != 0 ) - { + user_data, snapshot_num_in, snapshot_num_out ) != 0 ) { free( snapshot_num_out ); return -1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.2/snapper/AppUtil.cc new/snapper-0.2.2/snapper/AppUtil.cc --- old/snapper-0.2.2/snapper/AppUtil.cc 2014-01-29 16:48:30.000000000 +0100 +++ new/snapper-0.2.2/snapper/AppUtil.cc 2014-06-04 12:23:25.000000000 +0200 @@ -106,11 +106,11 @@ } - int + ssize_t readlink(const string& path, string& buf) { char tmp[1024]; - int ret = ::readlink(path.c_str(), tmp, sizeof(tmp)); + ssize_t ret = ::readlink(path.c_str(), tmp, sizeof(tmp)); if (ret >= 0) buf = string(tmp, ret); return ret; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.2/snapper/AppUtil.h new/snapper-0.2.2/snapper/AppUtil.h --- old/snapper-0.2.2/snapper/AppUtil.h 2014-04-02 14:27:32.000000000 +0200 +++ new/snapper-0.2.2/snapper/AppUtil.h 2014-06-04 12:23:25.000000000 +0200 @@ -51,7 +51,7 @@ bool clonefile(int src_fd, int dest_fd); bool copyfile(int src_fd, int dest_fd); - int readlink(const string& path, string& buf); + ssize_t readlink(const string& path, string& buf); int symlink(const string& oldpath, const string& newpath); string realpath(const string& path); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.2/snapper/Compare.cc new/snapper-0.2.2/snapper/Compare.cc --- old/snapper-0.2.2/snapper/Compare.cc 2014-02-26 18:11:56.000000000 +0100 +++ new/snapper-0.2.2/snapper/Compare.cc 2014-06-04 12:23:25.000000000 +0200 @@ -94,7 +94,7 @@ { off_t t = min(block_size, length); - int r1 = read(fd1, block1, t); + ssize_t r1 = read(fd1, block1, t); if (r1 != t) { y2err("read failed path:" << file1.fullname() << " errno:" << errno); @@ -102,7 +102,7 @@ break; } - int r2 = read(fd2, block2, t); + ssize_t r2 = read(fd2, block2, t); if (r2 != t) { y2err("read failed path:" << file2.fullname() << " errno:" << errno); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.2/snapper/FileUtils.cc new/snapper-0.2.2/snapper/FileUtils.cc --- old/snapper-0.2.2/snapper/FileUtils.cc 2014-04-10 12:28:10.000000000 +0200 +++ new/snapper-0.2.2/snapper/FileUtils.cc 2014-06-04 12:23:25.000000000 +0200 @@ -287,14 +287,14 @@ } - int + ssize_t SDir::readlink(const string& name, string& buf) const { assert(name.find('/') == string::npos); assert(name != ".."); char tmp[1024]; - int ret = ::readlinkat(dirfd, name.c_str(), tmp, sizeof(tmp)); + ssize_t ret = ::readlinkat(dirfd, name.c_str(), tmp, sizeof(tmp)); if (ret >= 0) buf = string(tmp, ret); return ret; @@ -600,7 +600,7 @@ } - int + ssize_t SFile::readlink(string& buf) const { return dir.readlink(name, buf); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.2/snapper/FileUtils.h new/snapper-0.2.2/snapper/FileUtils.h --- old/snapper-0.2.2/snapper/FileUtils.h 2014-04-10 12:28:10.000000000 +0200 +++ new/snapper-0.2.2/snapper/FileUtils.h 2014-06-04 12:23:25.000000000 +0200 @@ -82,7 +82,7 @@ int stat(const string& name, struct stat* buf, int flags) const; int open(const string& name, int flags) const; int open(const string& name, int flags, mode_t mode) const; - int readlink(const string& name, string& buf) const; + ssize_t readlink(const string& name, string& buf) const; int mkdir(const string& name, mode_t mode) const; int unlink(const string& name, int flags) const; int chmod(const string& name, mode_t mode, int flags) const; @@ -126,7 +126,7 @@ int stat(struct stat* buf, int flags) const; int open(int flags) const; - int readlink(string& buf) const; + ssize_t readlink(string& buf) const; int chmod(mode_t mode, int flags) const; bool xaSupported() const; -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org