Hello community,
here is the log from the commit of package snapper for openSUSE:Factory checked in at 2012-03-17 13:23:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/snapper (Old)
and /work/SRC/openSUSE:Factory/.snapper.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "snapper", Maintainer is "ASchnell@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/snapper/snapper.changes 2012-01-04 07:31:47.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.snapper.new/snapper.changes 2012-03-17 13:23:20.000000000 +0100
@@ -1,0 +2,22 @@
+Thu Mar 15 10:56:40 CET 2012 - aschnell@suse.de
+
+- added missing includes for gcc 4.7
+
+-------------------------------------------------------------------
+Tue Mar 06 11:37:34 CET 2012 - aschnell@suse.de
+
+- allow to disable background comparison (bnc#726122)
+- 0.0.10
+
+-------------------------------------------------------------------
+Fri Mar 02 16:25:26 CET 2012 - aschnell@suse.de
+
+- added option --command to snapper create
+- 0.0.9
+
+-------------------------------------------------------------------
+Fri Feb 24 19:21:15 CET 2012 - aschnell@suse.de
+
+- allow to compile without blocxx
+
+-------------------------------------------------------------------
Old:
----
snapper-0.0.8.tar.bz2
New:
----
no-readonly.diff
snapper-0.0.10.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ snapper.spec ++++++
--- /var/tmp/diff_new_pack.fovMms/_old 2012-03-17 13:23:22.000000000 +0100
+++ /var/tmp/diff_new_pack.fovMms/_new 2012-03-17 13:23:22.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package snapper
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,19 +18,27 @@
Name: snapper
-Version: 0.0.8
+Version: 0.0.10
Release: 0
License: GPL-2.0
Group: System/Packages
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: snapper-%{version}.tar.bz2
+Patch1: no-readonly.diff
Prefix: /usr
-BuildRequires: boost-devel doxygen gcc-c++ libblocxx-devel libtool libxml2-devel
+BuildRequires: boost-devel doxygen gcc-c++ libtool libxml2-devel
BuildRequires: python-devel swig
+%if 0%{?suse_version}
+BuildRequires: libblocxx-devel
+%if 0%{?suse_version} >= 1210
BuildRequires: libzypp(plugin:commit)
+%endif
+%endif
Requires: libsnapper1 = %version
+%if 0%{?suse_version}
Recommends: cron logrotate snapper-zypp-plugin
Supplements: btrfsprogs
+%endif
Summary: Tool for filesystem snapshot management
Url: http://en.opensuse.org/Portal:Snapper
@@ -43,6 +51,9 @@
%prep
%setup -n snapper-%{version}
+%if (0%{?suse_version} && 0%{?suse_version} < 1210) || (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel_version} && 0%{?rhel_version} < 700) || (0%{?centos_version} && 0%{?centos_version} < 700) || (0%{?mdkversion} && 0%{?mdkversion} < 201200)
+%patch1
+%endif
%build
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
@@ -60,6 +71,12 @@
%install
make install DESTDIR="$RPM_BUILD_ROOT"
+%if 0%{?suse_version}
+install -D data/sysconfig.snapper $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.snapper
+%else
+install -D data/sysconfig.snapper $RPM_BUILD_ROOT/etc/sysconfig/snapper
+%endif
+
%{find_lang} snapper
rm -f $RPM_BUILD_ROOT/%{python_sitearch}/_libsnapper.a
@@ -80,7 +97,9 @@
Summary: Library for filesystem snapshot management
Group: System/Libraries
Requires: diffutils util-linux
+%if 0%{?suse_version}
PreReq: %fillup_prereq
+%endif
%description -n libsnapper1
This package contains libsnapper, a library for filesystem snapshot management.
@@ -101,21 +120,30 @@
%doc %dir %{prefix}/share/doc/packages/snapper
%doc %{prefix}/share/doc/packages/snapper/AUTHORS
%doc %{prefix}/share/doc/packages/snapper/COPYING
+%if 0%{?suse_version}
/var/adm/fillup-templates/sysconfig.snapper
+%else
+%config(noreplace) %{_sysconfdir}/sysconfig/snapper
+%endif
%dir %{prefix}/lib/snapper
%dir %{prefix}/lib/snapper/bin
%{prefix}/lib/snapper/bin/compare-dirs
%post -n libsnapper1
/sbin/ldconfig
+%if 0%{?suse_version}
%{fillup_only -n snapper}
+%endif
%postun -n libsnapper1
/sbin/ldconfig
%package -n libsnapper-devel
Requires: libsnapper1 = %version
-Requires: gcc-c++ libstdc++-devel boost-devel blocxx-devel libxml2-devel
+Requires: gcc-c++ libstdc++-devel boost-devel libxml2-devel
+%if 0%{?suse_version}
+Requires: blocxx-devel
+%endif
Summary: Header files and documentation for libsnapper
Group: Development/Languages/C and C++
@@ -164,6 +192,11 @@
%files -n snapper-zypp-plugin
%defattr(-,root,root)
+%if 0%{?suse_version} < 1210
+%dir /usr/lib/zypp
+%dir /usr/lib/zypp/plugins
+%dir /usr/lib/zypp/plugins/commit
+%endif
/usr/lib/zypp/plugins/commit/snapper.py
%changelog
++++++ no-readonly.diff ++++++
--- snapper/Filesystem.cc
+++ snapper/Filesystem.cc
@@ -96,7 +96,7 @@
void
Btrfs::createSnapshot(unsigned int num) const
{
- SystemCmd cmd(BTRFSBIN " subvolume snapshot -r " + quote(subvolume) + " " +
+ SystemCmd cmd(BTRFSBIN " subvolume snapshot " + quote(subvolume) + " " +
quote(snapshotDir(num)));
if (cmd.retcode() != 0)
throw CreateSnapshotFailedException();
++++++ snapper-0.0.8.tar.bz2 -> snapper-0.0.10.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/Makefile.in new/snapper-0.0.10/Makefile.in
--- old/snapper-0.0.8/Makefile.in 2011-12-23 15:36:24.000000000 +0100
+++ new/snapper-0.0.10/Makefile.in 2012-03-15 11:00:31.000000000 +0100
@@ -172,6 +172,7 @@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBBLOCXX = @LIBBLOCXX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/VERSION new/snapper-0.0.10/VERSION
--- old/snapper-0.0.8/VERSION 2011-11-24 13:55:35.000000000 +0100
+++ new/snapper-0.0.10/VERSION 2012-03-06 17:23:43.000000000 +0100
@@ -1 +1 @@
-0.0.8
+0.0.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/bindings/Makefile.in new/snapper-0.0.10/bindings/Makefile.in
--- old/snapper-0.0.8/bindings/Makefile.in 2011-12-23 15:36:24.000000000 +0100
+++ new/snapper-0.0.10/bindings/Makefile.in 2012-03-15 11:00:30.000000000 +0100
@@ -132,6 +132,7 @@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBBLOCXX = @LIBBLOCXX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/bindings/python/Makefile.in new/snapper-0.0.10/bindings/python/Makefile.in
--- old/snapper-0.0.8/bindings/python/Makefile.in 2011-12-23 15:36:24.000000000 +0100
+++ new/snapper-0.0.10/bindings/python/Makefile.in 2012-03-15 11:00:31.000000000 +0100
@@ -150,6 +150,7 @@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBBLOCXX = @LIBBLOCXX@
LIBOBJS = @LIBOBJS@
LIBS = $(top_builddir)/snapper/libsnapper.la
LIBTOOL = @LIBTOOL@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/config.h.in new/snapper-0.0.10/config.h.in
--- old/snapper-0.0.8/config.h.in 2011-12-23 15:36:23.000000000 +0100
+++ new/snapper-0.0.10/config.h.in 2012-03-15 11:00:30.000000000 +0100
@@ -6,6 +6,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_INTTYPES_H
+/* Define if you have libblocxx */
+#undef HAVE_LIBBLOCXX
+
/* Define to 1 if you have the header file. */
#undef HAVE_MEMORY_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/configure new/snapper-0.0.10/configure
--- old/snapper-0.0.8/configure 2011-12-23 15:36:23.000000000 +0100
+++ new/snapper-0.0.10/configure 2012-03-15 11:00:29.000000000 +0100
@@ -758,6 +758,7 @@
LIBVERSION_MAJOR
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
+LIBBLOCXX
pkgpyexecdir
pyexecdir
pkgpythondir
@@ -4963,13 +4964,13 @@
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:4966: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:4967: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:4969: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:4970: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:4972: output\"" >&5)
+ (eval echo "\"\$as_me:4973: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -6175,7 +6176,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6178 "configure"' > conftest.$ac_ext
+ echo '#line 6179 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -8197,11 +8198,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8200: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8201: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8204: \$? = $ac_status" >&5
+ echo "$as_me:8205: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8536,11 +8537,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8539: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8540: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8543: \$? = $ac_status" >&5
+ echo "$as_me:8544: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8641,11 +8642,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8644: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8645: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8648: \$? = $ac_status" >&5
+ echo "$as_me:8649: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8696,11 +8697,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8699: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8700: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8703: \$? = $ac_status" >&5
+ echo "$as_me:8704: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11064,7 +11065,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11067 "configure"
+#line 11068 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11160,7 +11161,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11163 "configure"
+#line 11164 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13116,11 +13117,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13119: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13120: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13123: \$? = $ac_status" >&5
+ echo "$as_me:13124: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13215,11 +13216,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13218: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13219: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13222: \$? = $ac_status" >&5
+ echo "$as_me:13223: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13267,11 +13268,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13270: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13271: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13274: \$? = $ac_status" >&5
+ echo "$as_me:13275: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14397,6 +14398,45 @@
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lblocxx" >&5
+$as_echo_n "checking for main in -lblocxx... " >&6; }
+if ${ac_cv_lib_blocxx_main+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lblocxx $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_blocxx_main=yes
+else
+ ac_cv_lib_blocxx_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blocxx_main" >&5
+$as_echo "$ac_cv_lib_blocxx_main" >&6; }
+if test "x$ac_cv_lib_blocxx_main" = xyes; then :
+ LIBBLOCXX="-lblocxx"
+
+
+$as_echo "#define HAVE_LIBBLOCXX 1" >>confdefs.h
+
+fi
+
+
# Check whether --enable-silent-rules was given.
if test "${enable_silent_rules+set}" = set; then :
enableval=$enable_silent_rules;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/configure.in new/snapper-0.0.10/configure.in
--- old/snapper-0.0.8/configure.in 2011-11-24 13:54:31.000000000 +0100
+++ new/snapper-0.0.10/configure.in 2012-02-27 15:34:47.000000000 +0100
@@ -25,6 +25,12 @@
AC_PREFIX_DEFAULT(/usr)
+dnl Check for blocxx
+AC_CHECK_LIB(blocxx, main,
+ AC_SUBST([LIBBLOCXX], ["-lblocxx"])
+ AC_DEFINE([HAVE_LIBBLOCXX], [1],
+ [Define if you have libblocxx]))
+
dnl Automake 1.11 enables silent compilation
dnl Disable it by "configure --disable-silent-rules" or "make V=1"
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/data/Makefile.am new/snapper-0.0.10/data/Makefile.am
--- old/snapper-0.0.8/data/Makefile.am 2011-11-11 14:34:04.000000000 +0100
+++ new/snapper-0.0.10/data/Makefile.am 2012-02-27 17:23:04.000000000 +0100
@@ -2,9 +2,7 @@
# Makefile.am for snapper/data
#
-fillup_DATA = sysconfig.snapper
-
-EXTRA_DIST = $(fillup_DATA) base.txt x11.txt snapper.logrotate default-config
+EXTRA_DIST = sysconfig.snapper base.txt x11.txt snapper.logrotate default-config
install-data-local:
install -D -m 644 snapper.logrotate $(DESTDIR)/etc/logrotate.d/snapper
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/data/Makefile.in new/snapper-0.0.10/data/Makefile.in
--- old/snapper-0.0.8/data/Makefile.in 2011-12-23 15:36:24.000000000 +0100
+++ new/snapper-0.0.10/data/Makefile.in 2012-03-15 11:00:31.000000000 +0100
@@ -18,7 +18,6 @@
#
# Makefile.am for snapper/data
#
-
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -56,29 +55,6 @@
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(fillupdir)"
-DATA = $(fillup_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -116,6 +92,7 @@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBBLOCXX = @LIBBLOCXX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@@ -209,8 +186,7 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-fillup_DATA = sysconfig.snapper
-EXTRA_DIST = $(fillup_DATA) base.txt x11.txt snapper.logrotate default-config
+EXTRA_DIST = sysconfig.snapper base.txt x11.txt snapper.logrotate default-config
all: all-am
.SUFFIXES:
@@ -250,26 +226,6 @@
clean-libtool:
-rm -rf .libs _libs
-install-fillupDATA: $(fillup_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(fillupdir)" || $(MKDIR_P) "$(DESTDIR)$(fillupdir)"
- @list='$(fillup_DATA)'; test -n "$(fillupdir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(fillupdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(fillupdir)" || exit $$?; \
- done
-
-uninstall-fillupDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(fillup_DATA)'; test -n "$(fillupdir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(fillupdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(fillupdir)" && rm -f $$files
tags: TAGS
TAGS:
@@ -309,11 +265,8 @@
done
check-am: all-am
check: check-am
-all-am: Makefile $(DATA)
+all-am: Makefile
installdirs:
- for dir in "$(DESTDIR)$(fillupdir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -359,7 +312,7 @@
info-am:
-install-data-am: install-data-local install-fillupDATA
+install-data-am: install-data-local
install-dvi: install-dvi-am
@@ -403,7 +356,7 @@
ps-am:
-uninstall-am: uninstall-fillupDATA
+uninstall-am:
.MAKE: install-am install-strip
@@ -411,13 +364,13 @@
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-local install-dvi \
- install-dvi-am install-exec install-exec-am install-fillupDATA \
- install-html install-html-am install-info install-info-am \
- install-man install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
- ps ps-am uninstall uninstall-am uninstall-fillupDATA
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ uninstall uninstall-am
install-data-local:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/data/default-config new/snapper-0.0.10/data/default-config
--- old/snapper-0.0.8/data/default-config 2011-11-11 14:34:04.000000000 +0100
+++ new/snapper-0.0.10/data/default-config 2012-03-06 17:23:43.000000000 +0100
@@ -5,6 +5,10 @@
# filesystem type
FSTYPE="btrfs"
+# start comparing pre- and post-snapshot in background after creating
+# post-snapshot
+BACKGROUND_COMPARISON="yes"
+
# run daily number cleanup
NUMBER_CLEANUP="yes"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/doc/Makefile.in new/snapper-0.0.10/doc/Makefile.in
--- old/snapper-0.0.8/doc/Makefile.in 2011-12-23 15:36:24.000000000 +0100
+++ new/snapper-0.0.10/doc/Makefile.in 2012-03-15 11:00:31.000000000 +0100
@@ -118,6 +118,7 @@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBBLOCXX = @LIBBLOCXX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/doc/snapper.8 new/snapper-0.0.10/doc/snapper.8
--- old/snapper-0.0.8/doc/snapper.8 2011-12-23 15:36:29.000000000 +0100
+++ new/snapper-0.0.10/doc/snapper.8 2012-03-15 11:00:39.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "snapper" "8" 0.0.8 "snapper" "System Tools"
+.TH "snapper" "8" 0.0.10 "snapper" "System Tools"
.SH "NAME"
.LP
snapper - Command\-line program for filesystem snapshot management
@@ -157,6 +157,9 @@
Set userdata for the snapshot. The key-value pairs must be seperated by comma
and the key and value must be seperated by an equal sign,
e.g. requestid=42,user=arthur.
+.TP
+\fI\-\-command\fR <command>
+Create a pre and post snapshot and run command in between.
.TP
.B modify [options] <number>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/doc/snapper.8.in new/snapper-0.0.10/doc/snapper.8.in
--- old/snapper-0.0.8/doc/snapper.8.in 2011-12-23 15:19:14.000000000 +0100
+++ new/snapper-0.0.10/doc/snapper.8.in 2012-03-06 17:23:43.000000000 +0100
@@ -157,6 +157,9 @@
Set userdata for the snapshot. The key-value pairs must be seperated by comma
and the key and value must be seperated by an equal sign,
e.g. requestid=42,user=arthur.
+.TP
+\fI\-\-command\fR <command>
+Create a pre and post snapshot and run command in between.
.TP
.B modify [options] <number>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/examples/Makefile.in new/snapper-0.0.10/examples/Makefile.in
--- old/snapper-0.0.8/examples/Makefile.in 2011-12-23 15:36:24.000000000 +0100
+++ new/snapper-0.0.10/examples/Makefile.in 2012-03-15 11:00:31.000000000 +0100
@@ -149,6 +149,7 @@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBBLOCXX = @LIBBLOCXX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/po/Makefile.in new/snapper-0.0.10/po/Makefile.in
--- old/snapper-0.0.8/po/Makefile.in 2011-12-23 15:36:24.000000000 +0100
+++ new/snapper-0.0.10/po/Makefile.in 2012-03-15 11:00:31.000000000 +0100
@@ -92,6 +92,7 @@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBBLOCXX = @LIBBLOCXX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/scripts/Makefile.in new/snapper-0.0.10/scripts/Makefile.in
--- old/snapper-0.0.8/scripts/Makefile.in 2011-12-23 15:36:24.000000000 +0100
+++ new/snapper-0.0.10/scripts/Makefile.in 2012-03-15 11:00:31.000000000 +0100
@@ -92,6 +92,7 @@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBBLOCXX = @LIBBLOCXX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/snapper/AsciiFile.cc new/snapper-0.0.10/snapper/AsciiFile.cc
--- old/snapper-0.0.8/snapper/AsciiFile.cc 2011-11-11 14:34:04.000000000 +0100
+++ new/snapper-0.0.10/snapper/AsciiFile.cc 2012-03-06 17:23:43.000000000 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) [2004-2011] Novell, Inc.
+ * Copyright (c) [2004-2012] Novell, Inc.
*
* All Rights Reserved.
*
@@ -150,6 +150,25 @@
void
+ SysconfigFile::setValue(const string& key, bool value)
+ {
+ setValue(key, value ? "yes" : "no");
+ }
+
+
+ bool
+ SysconfigFile::getValue(const string& key, bool& value) const
+ {
+ string tmp;
+ if (!getValue(key, tmp))
+ return false;
+
+ value = tmp == "yes";
+ return true;
+ }
+
+
+ void
SysconfigFile::setValue(const string& key, const string& value)
{
string line = key + "=\"" + value + "\"";
@@ -190,8 +209,6 @@
bool
SysconfigFile::getValue(const string& key, vector<string>& values) const
{
- values.clear();
-
string tmp;
if (!getValue(key, tmp))
return false;
@@ -200,6 +217,8 @@
if (!tmp.empty())
boost::split(values, tmp, boost::is_any_of(" \t"), boost::token_compress_on);
+ else
+ values.clear();
return true;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/snapper/AsciiFile.h new/snapper-0.0.10/snapper/AsciiFile.h
--- old/snapper-0.0.8/snapper/AsciiFile.h 2011-11-11 14:34:04.000000000 +0100
+++ new/snapper-0.0.10/snapper/AsciiFile.h 2012-03-06 17:23:43.000000000 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) [2004-2011] Novell, Inc.
+ * Copyright (c) [2004-2012] Novell, Inc.
*
* All Rights Reserved.
*
@@ -91,6 +91,9 @@
SysconfigFile(const string& name) : AsciiFile(name), modified(false) {}
~SysconfigFile() { if (modified) save(); }
+ void setValue(const string& key, bool value);
+ bool getValue(const string& key, bool& value) const;
+
void setValue(const string& key, const string& value);
bool getValue(const string& key, string& value) const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/snapper/Filesystem.cc new/snapper-0.0.10/snapper/Filesystem.cc
--- old/snapper-0.0.8/snapper/Filesystem.cc 2011-12-23 15:17:30.000000000 +0100
+++ new/snapper-0.0.10/snapper/Filesystem.cc 2012-03-15 11:00:15.000000000 +0100
@@ -24,6 +24,7 @@
#include
#include
#include
+#include
#include
#include "snapper/Log.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/snapper/Log.cc new/snapper-0.0.10/snapper/Log.cc
--- old/snapper-0.0.8/snapper/Log.cc 2011-11-11 14:34:04.000000000 +0100
+++ new/snapper-0.0.10/snapper/Log.cc 2012-03-15 11:00:15.000000000 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) [2004-2011] Novell, Inc.
+ * Copyright (c) [2004-2012] Novell, Inc.
*
* All Rights Reserved.
*
@@ -21,28 +21,45 @@
#include
-#include <string>
+#include
+#include
#include
+#include <string>
+
+#include "config.h"
+#ifdef HAVE_LIBBLOCXX
#include
#include
#include
#include
+#endif
#include "snapper/Log.h"
+#include "snapper/AppUtil.h"
namespace snapper
{
using namespace std;
- using namespace blocxx;
+#ifdef HAVE_LIBBLOCXX
+
+ using namespace blocxx;
static const String component = "libsnapper";
+#else
+
+ string filename;
+
+#endif
+
void createLogger(const string& name, const string& logpath, const string& logfile)
{
+#ifdef HAVE_LIBBLOCXX
+
if (logpath != "NULL" && logfile != "NULL")
{
String nm = name.c_str();
@@ -84,12 +101,20 @@
LogAppender::setDefaultLogAppender(logApp);
}
+
+#else
+
+ filename = logpath + "/" + logfile;
+
+#endif
}
bool
testLogLevel(LogLevel level)
{
+#ifdef HAVE_LIBBLOCXX
+
ELogLevel curLevel = LogAppender::getCurrentLogAppender()->getLogLevel();
switch (level)
@@ -105,6 +130,12 @@
default:
return curLevel >= E_FATAL_ERROR_LEVEL;
}
+
+#else
+
+ return level != DEBUG;
+
+#endif
}
@@ -130,6 +161,8 @@
logStreamClose(LogLevel level, const char* file, unsigned line, const char* func,
ostringstream* stream)
{
+#ifdef HAVE_LIBBLOCXX
+
ELogLevel curLevel = LogAppender::getCurrentLogAppender()->getLogLevel();
String category;
@@ -179,6 +212,36 @@
}
}
+#else
+
+ static const char* ln[4] = { "DEB", "MIL", "WAR", "ERR" };
+
+ string prefix = sformat("%s %s libsnapper(%d) %s(%s):%d", datetime(time(0), false, true).c_str(),
+ ln[level], getpid(), file, func, line);
+
+ FILE* f = fopen(filename.c_str(), "a");
+
+ string tmp = stream->str();
+
+ string::size_type pos1 = 0;
+
+ while (true)
+ {
+ string::size_type pos2 = tmp.find('\n', pos1);
+
+ if (pos2 != string::npos || pos1 != tmp.length())
+ fprintf(f, "%s - %s\n", prefix.c_str(), tmp.substr(pos1, pos2 - pos1).c_str());
+
+ if (pos2 == string::npos)
+ break;
+
+ pos1 = pos2 + 1;
+ }
+
+ fclose(f);
+
+#endif
+
delete stream;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/snapper/Makefile.am new/snapper-0.0.10/snapper/Makefile.am
--- old/snapper-0.0.8/snapper/Makefile.am 2011-11-11 14:34:04.000000000 +0100
+++ new/snapper-0.0.10/snapper/Makefile.am 2012-02-27 15:34:47.000000000 +0100
@@ -2,7 +2,7 @@
# Makefile.am for snapper/snapper
#
-AM_CXXFLAGS = -D_FILE_OFFSET_BITS=64
+AM_CXXFLAGS = -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2
lib_LTLIBRARIES = libsnapper.la
@@ -27,7 +27,7 @@
SnapperDefines.h
libsnapper_la_LDFLAGS = -version-info @LIBVERSION_INFO@
-libsnapper_la_LIBADD = -lblocxx -lxml2
+libsnapper_la_LIBADD = @LIBBLOCXX@ -lxml2 -lz -lm
pkgincludedir = $(includedir)/snapper
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/snapper/Makefile.in new/snapper-0.0.10/snapper/Makefile.in
--- old/snapper-0.0.8/snapper/Makefile.in 2011-12-23 15:36:24.000000000 +0100
+++ new/snapper-0.0.10/snapper/Makefile.in 2012-03-15 11:00:31.000000000 +0100
@@ -170,6 +170,7 @@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBBLOCXX = @LIBBLOCXX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@@ -263,7 +264,7 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CXXFLAGS = -D_FILE_OFFSET_BITS=64
+AM_CXXFLAGS = -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2
lib_LTLIBRARIES = libsnapper.la
libsnapper_la_SOURCES = \
Factory.cc Factory.h \
@@ -286,7 +287,7 @@
SnapperDefines.h
libsnapper_la_LDFLAGS = -version-info @LIBVERSION_INFO@
-libsnapper_la_LIBADD = -lblocxx -lxml2
+libsnapper_la_LIBADD = @LIBBLOCXX@ -lxml2 -lz -lm
pkginclude_HEADERS = \
Factory.h \
Snapper.h \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/snapper/Snapper.cc new/snapper-0.0.10/snapper/Snapper.cc
--- old/snapper-0.0.8/snapper/Snapper.cc 2011-12-23 15:12:04.000000000 +0100
+++ new/snapper-0.0.10/snapper/Snapper.cc 2012-03-06 17:23:43.000000000 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 Novell, Inc.
+ * Copyright (c) [2011-2012] Novell, Inc.
*
* All Rights Reserved.
*
@@ -28,6 +28,7 @@
#include
#include "config.h"
+
#include "snapper/Snapper.h"
#include "snapper/Comparison.h"
#include "snapper/AppUtil.h"
@@ -177,6 +178,11 @@
if (snapshot2 == snapshots.end() || snapshot2->isCurrent())
throw IllegalSnapshotException();
+ bool background_comparison = true;
+ config->getValue("BACKGROUND_COMPARISON", background_comparison);
+ if (!background_comparison)
+ return;
+
y2mil("num1:" << snapshot1->getNum() << " num2:" << snapshot2->getNum());
if (!snapshot1->isCurrent())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/snapper.spec.in new/snapper-0.0.10/snapper.spec.in
--- old/snapper-0.0.8/snapper.spec.in 2011-12-21 17:20:53.000000000 +0100
+++ new/snapper-0.0.10/snapper.spec.in 2012-02-29 18:38:35.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package snapper
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,13 +23,21 @@
Group: System/Packages
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: snapper-%{version}.tar.bz2
+Patch1: no-readonly.diff
Prefix: /usr
-BuildRequires: boost-devel doxygen gcc-c++ libblocxx-devel libtool libxml2-devel
+BuildRequires: boost-devel doxygen gcc-c++ libtool libxml2-devel
BuildRequires: python-devel swig
+%if 0%{?suse_version}
+BuildRequires: libblocxx-devel
+%if 0%{?suse_version} >= 1210
BuildRequires: libzypp(plugin:commit)
+%endif
+%endif
Requires: libsnapper@LIBVERSION_MAJOR@ = %version
+%if 0%{?suse_version}
Recommends: cron logrotate snapper-zypp-plugin
Supplements: btrfsprogs
+%endif
Summary: Tool for filesystem snapshot management
Url: http://en.opensuse.org/Portal:Snapper
@@ -42,6 +50,9 @@
%prep
%setup -n snapper-%{version}
+%if (0%{?suse_version} && 0%{?suse_version} < 1210) || (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel_version} && 0%{?rhel_version} < 700) || (0%{?centos_version} && 0%{?centos_version} < 700) || (0%{?mdkversion} && 0%{?mdkversion} < 201200)
+%patch1
+%endif
%build
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
@@ -59,6 +70,12 @@
%install
make install DESTDIR="$RPM_BUILD_ROOT"
+%if 0%{?suse_version}
+install -D data/sysconfig.snapper $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.snapper
+%else
+install -D data/sysconfig.snapper $RPM_BUILD_ROOT/etc/sysconfig/snapper
+%endif
+
%{find_lang} snapper
rm -f $RPM_BUILD_ROOT/%{python_sitearch}/_libsnapper.a
@@ -79,7 +96,9 @@
Summary: Library for filesystem snapshot management
Group: System/Libraries
Requires: diffutils util-linux
+%if 0%{?suse_version}
PreReq: %fillup_prereq
+%endif
%description -n libsnapper@LIBVERSION_MAJOR@
This package contains libsnapper, a library for filesystem snapshot management.
@@ -100,21 +119,30 @@
%doc %dir %{prefix}/share/doc/packages/snapper
%doc %{prefix}/share/doc/packages/snapper/AUTHORS
%doc %{prefix}/share/doc/packages/snapper/COPYING
+%if 0%{?suse_version}
/var/adm/fillup-templates/sysconfig.snapper
+%else
+%config(noreplace) %{_sysconfdir}/sysconfig/snapper
+%endif
%dir %{prefix}/lib/snapper
%dir %{prefix}/lib/snapper/bin
%{prefix}/lib/snapper/bin/compare-dirs
%post -n libsnapper@LIBVERSION_MAJOR@
/sbin/ldconfig
+%if 0%{?suse_version}
%{fillup_only -n snapper}
+%endif
%postun -n libsnapper@LIBVERSION_MAJOR@
/sbin/ldconfig
%package -n libsnapper-devel
Requires: libsnapper@LIBVERSION_MAJOR@ = %version
-Requires: gcc-c++ libstdc++-devel boost-devel blocxx-devel libxml2-devel
+Requires: gcc-c++ libstdc++-devel boost-devel libxml2-devel
+%if 0%{?suse_version}
+Requires: blocxx-devel
+%endif
Summary: Header files and documentation for libsnapper
Group: Development/Languages/C and C++
@@ -163,6 +191,11 @@
%files -n snapper-zypp-plugin
%defattr(-,root,root)
+%if 0%{?suse_version} < 1210
+%dir /usr/lib/zypp
+%dir /usr/lib/zypp/plugins
+%dir /usr/lib/zypp/plugins/commit
+%endif
/usr/lib/zypp/plugins/commit/snapper.py
%changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/testsuite-real/Makefile.in new/snapper-0.0.10/testsuite-real/Makefile.in
--- old/snapper-0.0.8/testsuite-real/Makefile.in 2011-12-23 15:36:24.000000000 +0100
+++ new/snapper-0.0.10/testsuite-real/Makefile.in 2012-03-15 11:00:31.000000000 +0100
@@ -195,6 +195,7 @@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBBLOCXX = @LIBBLOCXX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/tools/Makefile.in new/snapper-0.0.10/tools/Makefile.in
--- old/snapper-0.0.8/tools/Makefile.in 2011-12-23 15:36:24.000000000 +0100
+++ new/snapper-0.0.10/tools/Makefile.in 2012-03-15 11:00:31.000000000 +0100
@@ -166,6 +166,7 @@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBBLOCXX = @LIBBLOCXX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/tools/compare-dirs.cc new/snapper-0.0.10/tools/compare-dirs.cc
--- old/snapper-0.0.8/tools/compare-dirs.cc 2011-11-11 14:34:04.000000000 +0100
+++ new/snapper-0.0.10/tools/compare-dirs.cc 2012-03-15 11:00:15.000000000 +0100
@@ -2,6 +2,7 @@
#include
#include
#include
+#include
#include
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/tools/snapper.cc new/snapper-0.0.10/tools/snapper.cc
--- old/snapper-0.0.8/tools/snapper.cc 2011-12-23 13:51:25.000000000 +0100
+++ new/snapper-0.0.10/tools/snapper.cc 2012-03-06 17:23:43.000000000 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 Novell, Inc.
+ * Copyright (c) 2011-2012 Novell, Inc.
*
* All Rights Reserved.
*
@@ -463,6 +463,7 @@
<< _("\t--description, -d <description>\tDescription for snapshot.") << endl
<< _("\t--cleanup-algorithm, -c <algo>\tCleanup algorithm for snapshot.") << endl
<< _("\t--userdata, -u <userdata>\tUserdata for snapshot.") << endl
+ << _("\t--command <command>\tRun command and create pre and post snapshots.") << endl
<< endl;
}
@@ -477,6 +478,7 @@
{ "description", required_argument, 0, 'd' },
{ "cleanup-algorithm", required_argument, 0, 'c' },
{ "userdata", required_argument, 0, 'u' },
+ { "command", required_argument, 0, 0 },
{ 0, 0, 0, 0 }
};
@@ -487,20 +489,31 @@
exit(EXIT_FAILURE);
}
+ enum CreateType { CT_SINGLE, CT_PRE, CT_POST, CT_PRE_POST };
+
const Snapshots& snapshots = sh->getSnapshots();
- SnapshotType type = SINGLE;
+ CreateType type = CT_SINGLE;
Snapshots::const_iterator snap1 = snapshots.end();
bool print_number = false;
string description;
string cleanup;
map userdata;
+ string command;
GetOpts::parsed_opts::const_iterator opt;
if ((opt = opts.find("type")) != opts.end())
{
- if (!toValue(opt->second, type, SINGLE))
+ if (opt->second == "single")
+ type = CT_SINGLE;
+ else if (opt->second == "pre")
+ type = CT_PRE;
+ else if (opt->second == "post")
+ type = CT_POST;
+ else if (opt->second == "pre-post")
+ type = CT_PRE_POST;
+ else
{
cerr << _("Unknown type of snapshot.") << endl;
exit(EXIT_FAILURE);
@@ -522,17 +535,29 @@
if ((opt = opts.find("userdata")) != opts.end())
userdata = read_userdata(opt->second);
- if (type == POST && (snap1 == snapshots.end() || snap1->isCurrent()))
+ if ((opt = opts.find("command")) != opts.end())
+ {
+ command = opt->second;
+ type = CT_PRE_POST;
+ }
+
+ if (type == CT_POST && (snap1 == snapshots.end() || snap1->isCurrent()))
{
cerr << _("Missing or invalid pre-number.") << endl;
exit(EXIT_FAILURE);
}
+ if (type == CT_PRE_POST && command.empty())
+ {
+ cerr << _("Missing command argument.") << endl;
+ exit(EXIT_FAILURE);
+ }
+
try
{
switch (type)
{
- case SINGLE: {
+ case CT_SINGLE: {
Snapshots::iterator snap1 = sh->createSingleSnapshot(description);
snap1->setCleanup(cleanup);
snap1->setUserdata(userdata);
@@ -541,7 +566,7 @@
cout << snap1->getNum() << endl;
} break;
- case PRE: {
+ case CT_PRE: {
Snapshots::iterator snap1 = sh->createPreSnapshot(description);
snap1->setCleanup(cleanup);
snap1->setUserdata(userdata);
@@ -550,7 +575,7 @@
cout << snap1->getNum() << endl;
} break;
- case POST: {
+ case CT_POST: {
Snapshots::iterator snap2 = sh->createPostSnapshot(description, snap1);
snap2->setCleanup(cleanup);
snap2->setUserdata(userdata);
@@ -559,6 +584,23 @@
cout << snap2->getNum() << endl;
sh->startBackgroundComparsion(snap1, snap2);
} break;
+
+ case CT_PRE_POST: {
+ Snapshots::iterator snap1 = sh->createPreSnapshot(description);
+ snap1->setCleanup(cleanup);
+ snap1->setUserdata(userdata);
+ snap1->flushInfo();
+
+ system(command.c_str());
+
+ Snapshots::iterator snap2 = sh->createPostSnapshot("", snap1);
+ snap2->setCleanup(cleanup);
+ snap2->setUserdata(userdata);
+ snap2->flushInfo();
+ if (print_number)
+ cout << snap1->getNum() << ".." << snap2->getNum() << endl;
+ sh->startBackgroundComparsion(snap1, snap2);
+ } break;
}
}
catch (const InvalidUserdataException& e)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/tools/utils/Makefile.in new/snapper-0.0.10/tools/utils/Makefile.in
--- old/snapper-0.0.8/tools/utils/Makefile.in 2011-12-23 15:36:24.000000000 +0100
+++ new/snapper-0.0.10/tools/utils/Makefile.in 2012-03-15 11:00:31.000000000 +0100
@@ -138,6 +138,7 @@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBBLOCXX = @LIBBLOCXX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.0.8/tools/utils/console.cc new/snapper-0.0.10/tools/utils/console.cc
--- old/snapper-0.0.8/tools/utils/console.cc 2011-11-11 14:34:04.000000000 +0100
+++ new/snapper-0.0.10/tools/utils/console.cc 2012-03-15 11:00:15.000000000 +0100
@@ -9,6 +9,7 @@
* Miscellaneous console utilities.
*/
+#include
#include <string>
#include <fstream>
#include <iostream>
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org