Hello community, here is the log from the commit of package snapper for openSUSE:Factory checked in at 2014-09-08 21:28:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-08-03 15:36:33.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.snapper.new/snapper.changes 2014-09-08 21:28:12.000000000 +0200 @@ -1,0 +2,10 @@ +Wed Aug 27 17:55:32 CEST 2014 - dste...@suse.cz + +- conditional check for libbtrfs API version + +------------------------------------------------------------------- +Thu Aug 14 14:15:21 CEST 2014 - aschn...@suse.de + +- cleanup after failed create-config (bnc#863578) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ snapper-0.2.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.3/config.h.in new/snapper-0.2.3/config.h.in --- old/snapper-0.2.3/config.h.in 2014-08-01 10:14:16.000000000 +0200 +++ new/snapper-0.2.3/config.h.in 2014-09-04 12:28:54.000000000 +0200 @@ -30,6 +30,9 @@ /* Enable extended attributes support */ #undef ENABLE_XATTRS +/* Define to 1 if you have the <btrfs/version.h> header file. */ +#undef HAVE_BTRFS_VERSION_H + /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.3/configure new/snapper-0.2.3/configure --- old/snapper-0.2.3/configure 2014-08-01 10:14:15.000000000 +0200 +++ new/snapper-0.2.3/configure 2014-09-04 12:28:53.000000000 +0200 @@ -1960,6 +1960,93 @@ as_fn_set_status $ac_retval } # ac_fn_cxx_try_link + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -15832,6 +15919,18 @@ fi +for ac_header in btrfs/version.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "btrfs/version.h" "ac_cv_header_btrfs_version_h" "$ac_includes_default" +if test "x$ac_cv_header_btrfs_version_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BTRFS_VERSION_H 1 +_ACEOF + +fi + +done + # Check whether --enable-xattrs was given. if test "${enable_xattrs+set}" = set; then : diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.3/configure.ac new/snapper-0.2.3/configure.ac --- old/snapper-0.2.3/configure.ac 2014-06-30 15:03:26.000000000 +0200 +++ new/snapper-0.2.3/configure.ac 2014-09-01 15:52:46.000000000 +0200 @@ -102,6 +102,7 @@ AM_CONDITIONAL(HAVE_ZYPP, [test "x$with_zypp" = "xyes"]) AC_CHECK_LIB(btrfs, btrfs_read_and_process_send_stream) +AC_CHECK_HEADERS([btrfs/version.h]) AC_ARG_ENABLE([xattrs], AC_HELP_STRING([--disable-xattrs],[Disable extended attributes support]), [with_xattrs=$enableval],[with_xattrs=yes]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.3/snapper/Btrfs.cc new/snapper-0.2.3/snapper/Btrfs.cc --- old/snapper-0.2.3/snapper/Btrfs.cc 2014-06-30 15:03:26.000000000 +0200 +++ new/snapper-0.2.3/snapper/Btrfs.cc 2014-09-01 15:52:46.000000000 +0200 @@ -34,6 +34,11 @@ #include <libmount/libmount.h> #endif #ifdef HAVE_LIBBTRFS +#ifdef HAVE_BTRFS_VERSION_H +#include <btrfs/version.h> +#else +#define BTRFS_LIB_VERSION (100) +#endif #include <btrfs/ioctl.h> #include <btrfs/send.h> #include <btrfs/send-stream.h> @@ -1142,7 +1147,13 @@ boost::this_thread::interruption_point(); // remove the fourth parameter for older versions of libbtrfs - int r = btrfs_read_and_process_send_stream(fd, &send_ops, &*this, 0); + int r; + +#if BTRFS_LIB_VERSION < 101 + r = btrfs_read_and_process_send_stream(fd, &send_ops, &*this, 0); +#else + r = btrfs_read_and_process_send_stream(fd, &send_ops, &*this, 0, 1); +#endif if (r < 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.3/snapper/Snapper.cc new/snapper-0.2.3/snapper/Snapper.cc --- old/snapper-0.2.3/snapper/Snapper.cc 2014-06-30 15:03:26.000000000 +0200 +++ new/snapper-0.2.3/snapper/Snapper.cc 2014-09-01 15:40:38.000000000 +0200 @@ -403,7 +403,23 @@ throw CreateConfigFailedException("modifying config failed"); } - filesystem->createConfig(add_fstab); + try + { + filesystem->createConfig(add_fstab); + } + catch (...) + { + SysconfigFile sysconfig(SYSCONFIGFILE); + vector<string> config_names; + sysconfig.getValue("SNAPPER_CONFIGS", config_names); + config_names.erase(remove(config_names.begin(), config_names.end(), config_name), + config_names.end()); + sysconfig.setValue("SNAPPER_CONFIGS", config_names); + + SystemCmd cmd(RMBIN " " + quote(CONFIGSDIR "/" + config_name)); + + throw; + } #ifdef ENABLE_ROLLBACK if (subvolume == "/" && filesystem->fstype() == "btrfs" && -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org