Hello community,

here is the log from the commit of package snapper for openSUSE:Factory checked 
in at 2013-10-20 10:54:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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  2013-10-14 
13:06:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.snapper.new/snapper.changes     2013-10-20 
10:54:04.000000000 +0200
@@ -1,0 +2,12 @@
+Thu Oct 17 10:17:59 CEST 2013 - [email protected]
+
+- extended number cleanup algorithm to privilege important
+  snapshots (fate#316233)
+
+-------------------------------------------------------------------
+Tue Oct 15 16:28:15 CEST 2013 - [email protected]
+
+- added grub-snapper-plugin subpackage for writing extra snapshot
+  metadata for grub2 (fate#316232)
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ snapper.spec ++++++
--- /var/tmp/diff_new_pack.sJZj0W/_old  2013-10-20 10:54:04.000000000 +0200
+++ /var/tmp/diff_new_pack.sJZj0W/_new  2013-10-20 10:54:04.000000000 +0200
@@ -196,6 +196,28 @@
 %endif
 /usr/lib/zypp/plugins/commit/snapper.py*
 
+%package -n grub-snapper-plugin
+Requires:       python
+Requires:       python-xattr
+Requires:       snapper = %version
+Supplements:    packageand(snapper-zypp-plugin:grub2)
+Summary:        A snapper plugin for adding snapshot metadata for grub2
+Group:          System/Packages
+
+%description -n grub-snapper-plugin
+This package contains a plugin for snapper that adds metadata to snapshots
+used by grub2.
+
+Authors:
+--------
+    Arvin Schnell <[email protected]>
+
+%files -n grub-snapper-plugin
+%defattr(-,root,root)
+%dir /usr/lib/snapper
+%dir /usr/lib/snapper/plugins
+/usr/lib/snapper/plugins/grub.py*
+
 %package -n pam_snapper
 Requires:       pam
 Requires:       snapper = %version

++++++ snapper-0.1.7.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/client/cleanup.cc 
new/snapper-0.1.7/client/cleanup.cc
--- old/snapper-0.1.7/client/cleanup.cc 2013-07-09 14:05:02.000000000 +0200
+++ new/snapper-0.1.7/client/cleanup.cc 2013-10-17 09:44:05.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2011-2012] Novell, Inc.
+ * Copyright (c) [2011-2013] Novell, Inc.
  *
  * All Rights Reserved.
  *
@@ -84,10 +84,19 @@
 
 
 bool
+is_important(XSnapshots::const_iterator it1)
+{
+    map<string, string>::const_iterator it2 = 
it1->getUserdata().find("important");
+    return it2 != it1->getUserdata().end() && it2->second == "yes";
+}
+
+
+bool
 do_cleanup_number(DBus::Connection& conn, const string& config_name)
 {
     time_t min_age = 1800;
     size_t limit = 50;
+    size_t limit_important = 10;
 
     XConfigInfo ci = command_get_xconfig(conn, config_name);
     map<string, string>::const_iterator pos;
@@ -95,6 +104,11 @@
        pos->second >> min_age;
     if ((pos = ci.raw.find("NUMBER_LIMIT")) != ci.raw.end())
        pos->second >> limit;
+    if ((pos = ci.raw.find("NUMBER_LIMIT_IMPORTANT")) != ci.raw.end())
+       pos->second >> limit_important;
+
+    size_t num = 0;
+    size_t num_important = 0;
 
     XSnapshots snapshots = command_list_xsnapshots(conn, config_name);
 
@@ -103,24 +117,41 @@
     for (XSnapshots::const_iterator it = snapshots.begin(); it != 
snapshots.end(); ++it)
     {
        if (it->getCleanup() == "number")
-           tmp.push_back(it);
+           tmp.push_front(it);
     }
 
-    if (tmp.size() > limit)
+    list<XSnapshots::const_iterator>::iterator it = tmp.begin();
+    while (it != tmp.end())
     {
-       list<XSnapshots::const_iterator>::iterator it = tmp.end();
-       advance(it, - limit);
-       tmp.erase(it, tmp.end());
-
-       filter1(tmp, min_age);
-       filter2(snapshots, tmp);
+       bool keep = false;
 
-       for (list<XSnapshots::const_iterator>::const_iterator it = tmp.begin(); 
it != tmp.end(); ++it)
+       if (num_important < limit_important && is_important(*it))
        {
-           list<unsigned int> nums;
-           nums.push_back((*it)->getNum());
-           command_delete_xsnapshots(conn, config_name, nums);
+           ++num_important;
+           keep = true;
+       }
+       if (num < limit)
+       {
+           ++num;
+           keep = true;
        }
+
+       if (keep)
+           it = tmp.erase(it);
+       else
+           ++it;
+    }
+
+    tmp.reverse();
+
+    filter1(tmp, min_age);
+    filter2(snapshots, tmp);
+
+    for (list<XSnapshots::const_iterator>::const_iterator it = tmp.begin(); it 
!= tmp.end(); ++it)
+    {
+       list<unsigned int> nums;
+       nums.push_back((*it)->getNum());
+       command_delete_xsnapshots(conn, config_name, nums);
     }
 
     return true;
@@ -279,13 +310,9 @@
        }
 
        if (keep)
-       {
            it = tmp.erase(it);
-       }
        else
-       {
            ++it;
-       }
     }
 
     tmp.reverse();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/client/types.h 
new/snapper-0.1.7/client/types.h
--- old/snapper-0.1.7/client/types.h    2013-02-22 10:36:22.000000000 +0100
+++ new/snapper-0.1.7/client/types.h    2013-10-16 17:11:11.000000000 +0200
@@ -58,11 +58,11 @@
 
     unsigned int getPreNum() const { return pre_num; }
 
-    string getDescription() const { return description; }
+    const string& getDescription() const { return description; }
 
-    string getCleanup() const { return cleanup; }
+    const string& getCleanup() const { return cleanup; }
 
-    map<string, string> getUserdata() const { return userdata; }
+    const map<string, string>& getUserdata() const { return userdata; }
 
     SnapshotType type;
     unsigned int num;
@@ -115,4 +115,3 @@
     Hihi& operator>>(Hihi& hihi, XFile& data);
 
 }
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/data/default-config 
new/snapper-0.1.7/data/default-config
--- old/snapper-0.1.7/data/default-config       2013-09-13 17:15:31.000000000 
+0200
+++ new/snapper-0.1.7/data/default-config       2013-10-16 17:45:43.000000000 
+0200
@@ -20,6 +20,7 @@
 # limit for number cleanup
 NUMBER_MIN_AGE="1800"
 NUMBER_LIMIT="50"
+NUMBER_LIMIT_IMPORTANT="10"
 
 
 # create hourly snapshots
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/doc/snapper-configs.xml.in 
new/snapper-0.1.7/doc/snapper-configs.xml.in
--- old/snapper-0.1.7/doc/snapper-configs.xml.in        2013-09-13 
17:11:43.000000000 +0200
+++ new/snapper-0.1.7/doc/snapper-configs.xml.in        2013-10-16 
17:50:00.000000000 +0200
@@ -109,6 +109,17 @@
       </varlistentry>
 
       <varlistentry>
+       
<term><option>NUMBER_LIMIT_IMPORTANT=<replaceable>number</replaceable></option></term>
+       <listitem>
+         <para>Defines how many important snapshots the number cleanup
+         algorithm should keep. Important snapshots have important=yes in the
+         userdata. The youngest important snapshots will be kept.</para>
+         <para>Default value is &quot;10&quot;.</para>
+         <para>New in version 0.1.8.</para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
        
<term><option>TIMELINE_CREATE=<replaceable>boolean</replaceable></option></term>
        <listitem>
          <para>Defines whether hourly snapshots should be created.</para>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/examples/c++-lib/CreateNumber.cc 
new/snapper-0.1.7/examples/c++-lib/CreateNumber.cc
--- old/snapper-0.1.7/examples/c++-lib/CreateNumber.cc  1970-01-01 
01:00:00.000000000 +0100
+++ new/snapper-0.1.7/examples/c++-lib/CreateNumber.cc  2013-10-16 
17:16:35.000000000 +0200
@@ -0,0 +1,52 @@
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <vector>
+#include <iostream>
+
+#include <snapper/Snapper.h>
+
+using namespace snapper;
+using namespace std;
+
+
+void
+deleteAll()
+{
+    Snapper* sh = new Snapper("testsuite");
+
+    Snapshots snapshots = sh->getSnapshots();
+
+    vector<Snapshots::iterator> tmp;
+    for (Snapshots::iterator it = snapshots.begin(); it != snapshots.end(); 
++it)
+       if (!it->isCurrent())
+           tmp.push_back(it);
+
+    for (vector<Snapshots::iterator>::iterator it = tmp.begin(); it != 
tmp.end(); ++it)
+       sh->deleteSnapshot(*it);
+
+    delete sh;
+}
+
+
+int
+main()
+{
+    deleteAll();
+
+    Snapper* sh = new Snapper("testsuite");
+
+    for (size_t i = 0; i < 100; ++i)
+    {
+       map<string, string> userdata;
+       if (i % 5 == 0)
+           userdata["important"] = "yes";
+
+       sh->createSingleSnapshot(getuid(), "testsuite", "number", userdata);
+    }
+
+    delete sh;
+
+    exit(EXIT_SUCCESS);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/examples/c++-lib/CreateTimeline.cc 
new/snapper-0.1.7/examples/c++-lib/CreateTimeline.cc
--- old/snapper-0.1.7/examples/c++-lib/CreateTimeline.cc        2013-10-09 
13:45:49.000000000 +0200
+++ new/snapper-0.1.7/examples/c++-lib/CreateTimeline.cc        2013-10-16 
17:16:54.000000000 +0200
@@ -1,5 +1,7 @@
 
 #include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
 #include <vector>
 #include <iostream>
 
@@ -38,9 +40,9 @@
     time_t t = time(NULL) - 100 * 24*60*60;
     while (t < time(NULL))
     {
-       Snapshots::iterator snap = sh->createSingleSnapshot("testsuite");
+       Snapshots::iterator snap = sh->createSingleSnapshot(getuid(), 
"testsuite", "timeline",
+                                                           map<string, 
string>());
        // snap->setDate(t);
-       snap->setCleanup("timeline");
 
        t += 60*60;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/examples/c++-lib/Makefile.am 
new/snapper-0.1.7/examples/c++-lib/Makefile.am
--- old/snapper-0.1.7/examples/c++-lib/Makefile.am      2013-06-24 
17:51:58.000000000 +0200
+++ new/snapper-0.1.7/examples/c++-lib/Makefile.am      2013-10-16 
17:34:32.000000000 +0200
@@ -6,7 +6,7 @@
 
 LDADD = ../../snapper/libsnapper.la
 
-noinst_PROGRAMS = List ListAll Create CmpDirs CreateTimeline SnapTest
+noinst_PROGRAMS = List ListAll Create CmpDirs CreateNumber CreateTimeline 
SnapTest
 
 List_SOURCES = List.cc
 
@@ -16,6 +16,8 @@
 
 CmpDirs_SOURCES = CmpDirs.cc
 
+CreateNumber_SOURCES = CreateNumber.cc
+
 CreateTimeline_SOURCES = CreateTimeline.cc
 
 SnapTest_SOURCES = SnapTest.cc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/examples/c++-lib/Makefile.in 
new/snapper-0.1.7/examples/c++-lib/Makefile.in
--- old/snapper-0.1.7/examples/c++-lib/Makefile.in      2013-10-09 
13:48:09.000000000 +0200
+++ new/snapper-0.1.7/examples/c++-lib/Makefile.in      2013-10-17 
10:54:34.000000000 +0200
@@ -55,7 +55,8 @@
 build_triplet = @build@
 host_triplet = @host@
 noinst_PROGRAMS = List$(EXEEXT) ListAll$(EXEEXT) Create$(EXEEXT) \
-       CmpDirs$(EXEEXT) CreateTimeline$(EXEEXT) SnapTest$(EXEEXT)
+       CmpDirs$(EXEEXT) CreateNumber$(EXEEXT) CreateTimeline$(EXEEXT) \
+       SnapTest$(EXEEXT)
 subdir = examples/c++-lib
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
        $(top_srcdir)/depcomp
@@ -79,6 +80,10 @@
 Create_OBJECTS = $(am_Create_OBJECTS)
 Create_LDADD = $(LDADD)
 Create_DEPENDENCIES = ../../snapper/libsnapper.la
+am_CreateNumber_OBJECTS = CreateNumber.$(OBJEXT)
+CreateNumber_OBJECTS = $(am_CreateNumber_OBJECTS)
+CreateNumber_LDADD = $(LDADD)
+CreateNumber_DEPENDENCIES = ../../snapper/libsnapper.la
 am_CreateTimeline_OBJECTS = CreateTimeline.$(OBJEXT)
 CreateTimeline_OBJECTS = $(am_CreateTimeline_OBJECTS)
 CreateTimeline_LDADD = $(LDADD)
@@ -121,12 +126,12 @@
 AM_V_GEN = $(am__v_GEN_@AM_V@)
 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN     " $@;
-SOURCES = $(CmpDirs_SOURCES) $(Create_SOURCES) \
+SOURCES = $(CmpDirs_SOURCES) $(Create_SOURCES) $(CreateNumber_SOURCES) \
        $(CreateTimeline_SOURCES) $(List_SOURCES) $(ListAll_SOURCES) \
        $(SnapTest_SOURCES)
 DIST_SOURCES = $(CmpDirs_SOURCES) $(Create_SOURCES) \
-       $(CreateTimeline_SOURCES) $(List_SOURCES) $(ListAll_SOURCES) \
-       $(SnapTest_SOURCES)
+       $(CreateNumber_SOURCES) $(CreateTimeline_SOURCES) \
+       $(List_SOURCES) $(ListAll_SOURCES) $(SnapTest_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -283,6 +288,7 @@
 ListAll_SOURCES = ListAll.cc
 Create_SOURCES = Create.cc
 CmpDirs_SOURCES = CmpDirs.cc
+CreateNumber_SOURCES = CreateNumber.cc
 CreateTimeline_SOURCES = CreateTimeline.cc
 SnapTest_SOURCES = SnapTest.cc
 all: all-am
@@ -334,6 +340,9 @@
 Create$(EXEEXT): $(Create_OBJECTS) $(Create_DEPENDENCIES) 
$(EXTRA_Create_DEPENDENCIES) 
        @rm -f Create$(EXEEXT)
        $(AM_V_CXXLD)$(CXXLINK) $(Create_OBJECTS) $(Create_LDADD) $(LIBS)
+CreateNumber$(EXEEXT): $(CreateNumber_OBJECTS) $(CreateNumber_DEPENDENCIES) 
$(EXTRA_CreateNumber_DEPENDENCIES) 
+       @rm -f CreateNumber$(EXEEXT)
+       $(AM_V_CXXLD)$(CXXLINK) $(CreateNumber_OBJECTS) $(CreateNumber_LDADD) 
$(LIBS)
 CreateTimeline$(EXEEXT): $(CreateTimeline_OBJECTS) 
$(CreateTimeline_DEPENDENCIES) $(EXTRA_CreateTimeline_DEPENDENCIES) 
        @rm -f CreateTimeline$(EXEEXT)
        $(AM_V_CXXLD)$(CXXLINK) $(CreateTimeline_OBJECTS) 
$(CreateTimeline_LDADD) $(LIBS)
@@ -355,6 +364,7 @@
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CmpDirs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Create.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CreateNumber.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CreateTimeline.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/List.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ListAll.Po@am__quote@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/scripts/Makefile.am 
new/snapper-0.1.7/scripts/Makefile.am
--- old/snapper-0.1.7/scripts/Makefile.am       2013-10-09 13:47:26.000000000 
+0200
+++ new/snapper-0.1.7/scripts/Makefile.am       2013-10-15 15:27:35.000000000 
+0200
@@ -14,12 +14,13 @@
 
 endif
 
-EXTRA_DIST = snapper-hourly snapper-daily zypp-plugin.py $(pam_snapper_SCRIPTS)
+EXTRA_DIST = snapper-hourly snapper-daily zypp-plugin.py grub-plugin.py 
$(pam_snapper_SCRIPTS)
 
 install-data-local:
        install -D snapper-hourly $(DESTDIR)/etc/cron.hourly/suse.de-snapper
        install -D snapper-daily $(DESTDIR)/etc/cron.daily/suse.de-snapper
 if HAVE_ZYPP
        install -D zypp-plugin.py 
$(DESTDIR)/usr/lib/zypp/plugins/commit/snapper.py
+       install -D grub-plugin.py $(DESTDIR)/usr/lib/snapper/plugins/grub.py
 endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/scripts/Makefile.in 
new/snapper-0.1.7/scripts/Makefile.in
--- old/snapper-0.1.7/scripts/Makefile.in       2013-10-09 13:48:09.000000000 
+0200
+++ new/snapper-0.1.7/scripts/Makefile.in       2013-10-17 10:54:34.000000000 
+0200
@@ -256,7 +256,7 @@
 @HAVE_PAM_TRUE@        pam_snapper_useradd.sh          \
 @HAVE_PAM_TRUE@        pam_snapper_userdel.sh
 
-EXTRA_DIST = snapper-hourly snapper-daily zypp-plugin.py $(pam_snapper_SCRIPTS)
+EXTRA_DIST = snapper-hourly snapper-daily zypp-plugin.py grub-plugin.py 
$(pam_snapper_SCRIPTS)
 all: all-am
 
 .SUFFIXES:
@@ -493,6 +493,7 @@
        install -D snapper-hourly $(DESTDIR)/etc/cron.hourly/suse.de-snapper
        install -D snapper-daily $(DESTDIR)/etc/cron.daily/suse.de-snapper
 @HAVE_ZYPP_TRUE@       install -D zypp-plugin.py 
$(DESTDIR)/usr/lib/zypp/plugins/commit/snapper.py
+@HAVE_ZYPP_TRUE@       install -D grub-plugin.py 
$(DESTDIR)/usr/lib/snapper/plugins/grub.py
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/scripts/grub-plugin.py 
new/snapper-0.1.7/scripts/grub-plugin.py
--- old/snapper-0.1.7/scripts/grub-plugin.py    1970-01-01 01:00:00.000000000 
+0100
+++ new/snapper-0.1.7/scripts/grub-plugin.py    2013-10-15 16:25:42.000000000 
+0200
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+
+from subprocess import check_output
+from datetime import datetime
+from xattr import xattr
+from array import array
+from fcntl import ioctl
+from os import open, close, O_RDONLY
+from ctypes import c_ulonglong
+from sys import argv
+
+
+BTRFS_IOC_SUBVOL_GETFLAGS = 0x80089419
+BTRFS_IOC_SUBVOL_SETFLAGS = 0x4008941a
+BTRFS_SUBVOL_RDONLY = 0x2
+
+
+number = argv[1]
+
+kernel = check_output(["ls", "-1v", "/lib/modules"]).splitlines()[-1]
+date = datetime.utcnow()
+important = argv[2]
+
+
+fd = open("/.snapshots/%s/snapshot" % number, O_RDONLY)
+
+orig_buf = c_ulonglong()
+ioctl(fd, BTRFS_IOC_SUBVOL_GETFLAGS, orig_buf, True)
+
+new_buf = c_ulonglong(orig_buf.value & ~BTRFS_SUBVOL_RDONLY)
+ioctl(fd, BTRFS_IOC_SUBVOL_SETFLAGS, new_buf, True)
+
+x = xattr(fd)
+
+x.set("user.kernel", kernel)
+x.set("user.date", date.strftime("%F %T"))
+x.set("user.important", important)
+
+ioctl(fd, BTRFS_IOC_SUBVOL_SETFLAGS, orig_buf, True)
+
+close(fd)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/snapper/Snapshot.cc 
new/snapper-0.1.7/snapper/Snapshot.cc
--- old/snapper-0.1.7/snapper/Snapshot.cc       2013-10-09 13:47:26.000000000 
+0200
+++ new/snapper-0.1.7/snapper/Snapshot.cc       2013-10-15 16:10:14.000000000 
+0200
@@ -38,6 +38,7 @@
 #include "snapper/SnapperTmpl.h"
 #include "snapper/SnapperDefines.h"
 #include "snapper/Exception.h"
+#include "snapper/SystemCmd.h"
 
 
 namespace snapper
@@ -666,6 +667,19 @@
            throw;
        }
 
+#if 1
+       if (snapper->subvolumeDir() == "/" && 
snapper->getFilesystem()->fstype() == "btrfs" &&
+           snapshot.getType() == PRE && 
access("/usr/lib/snapper/plugins/grub.py", X_OK) == 0)
+       {
+           map<string, string> userdata = snapshot.getUserdata();
+           map<string, string>::const_iterator it = userdata.find("important");
+           bool important = it != userdata.end() && it->second == "yes";
+
+           SystemCmd cmd(sformat("/usr/lib/snapper/plugins/grub.py %d %s", 
snapshot.getNum(),
+                                 important ? "yes" : "no"));
+       }
+#endif
+
        return entries.insert(entries.end(), snapshot);
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snapper-0.1.7/snapper.spec.in 
new/snapper-0.1.7/snapper.spec.in
--- old/snapper-0.1.7/snapper.spec.in   2013-09-18 13:56:09.000000000 +0200
+++ new/snapper-0.1.7/snapper.spec.in   2013-10-15 17:38:42.000000000 +0200
@@ -16,34 +16,41 @@
 #
 
 
-Name:          snapper
-Version:       @VERSION@
-Release:       0
-License:       GPL-2.0
-Group:         System/Packages
-BuildRoot:     %{_tmppath}/%{name}-%{version}-build
-Source:                snapper-%{version}.tar.bz2
-Prefix:                /usr
-BuildRequires: boost-devel gcc-c++ libtool libxml2-devel pkg-config
+Name:           snapper
+Version:        @VERSION@
+Release:        0
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+Source:         snapper-%{version}.tar.bz2
+Prefix:         /usr
+BuildRequires:  boost-devel
+BuildRequires:  gcc-c++
+BuildRequires:  libtool
+BuildRequires:  libxml2-devel
+BuildRequires:  pkg-config
 %if ! 0%{?mandriva_version}
-BuildRequires: dbus-1-devel
-BuildRequires: libxslt docbook-xsl-stylesheets
+BuildRequires:  dbus-1-devel
+BuildRequires:  docbook-xsl-stylesheets
+BuildRequires:  libxslt
 %else
-BuildRequires: libdbus-1-devel
-BuildRequires: xsltproc docbook-dtd45-xml docbook-xsl
+BuildRequires:  docbook-dtd45-xml
+BuildRequires:  docbook-xsl
+BuildRequires:  libdbus-1-devel
+BuildRequires:  xsltproc
 %endif
 %if (0%{?suse_version} && 0%{?suse_version} >= 1210)
-BuildRequires: libzypp(plugin:commit)
+BuildRequires:  libzypp(plugin:commit)
 %endif
-BuildRequires: pam-devel
-Requires:      libsnapper@LIBVERSION_MAJOR@ = %version
-Requires:      diffutils
+BuildRequires:  pam-devel
+Requires:       diffutils
+Requires:       libsnapper@LIBVERSION_MAJOR@ = %version
 %if 0%{?suse_version}
-Recommends:    cron logrotate snapper-zypp-plugin
-Supplements:   btrfsprogs
+Recommends:     cron logrotate snapper-zypp-plugin
+Supplements:    btrfsprogs
 %endif
-Summary:       Tool for filesystem snapshot management
-Url:           http://snapper.io/
+Summary:        Tool for filesystem snapshot management
+License:        GPL-2.0
+Group:          System/Packages
+Url:            http://snapper.io/
 
 %description
 This package contains snapper, a tool for filesystem snapshot management.
@@ -100,11 +107,11 @@
 %{prefix}/share/dbus-1/system-services/org.opensuse.Snapper.service
 
 %package -n libsnapper@LIBVERSION_MAJOR@
-Summary:       Library for filesystem snapshot management
-Group:         System/Libraries
-Requires:      util-linux
+Summary:        Library for filesystem snapshot management
+Group:          System/Libraries
+Requires:       util-linux
 %if 0%{?suse_version}
-PreReq:                %fillup_prereq
+PreReq:         %fillup_prereq
 %endif
 
 %description -n libsnapper@LIBVERSION_MAJOR@
@@ -142,10 +149,13 @@
 /sbin/ldconfig
 
 %package -n libsnapper-devel
-Requires:      libsnapper@LIBVERSION_MAJOR@ = %version
-Requires:      gcc-c++ libstdc++-devel boost-devel libxml2-devel
-Summary:       Header files and documentation for libsnapper
-Group:         Development/Languages/C and C++
+Requires:       boost-devel
+Requires:       gcc-c++
+Requires:       libsnapper@LIBVERSION_MAJOR@ = %version
+Requires:       libstdc++-devel
+Requires:       libxml2-devel
+Summary:        Header files and documentation for libsnapper
+Group:          Development/Languages/C and C++
 
 %description -n libsnapper-devel
 This package contains header files and documentation for developing with
@@ -162,10 +172,12 @@
 %{prefix}/include/snapper
 
 %package -n snapper-zypp-plugin
-Requires:      snapper = %version
-Requires:      libzypp(plugin:commit) zypp-plugin-python dbus-1-python
-Summary:       A zypp commit plugin for calling snapper
-Group:         System/Packages
+Requires:       dbus-1-python
+Requires:       snapper = %version
+Requires:       zypp-plugin-python
+Requires:       libzypp(plugin:commit)
+Summary:        A zypp commit plugin for calling snapper
+Group:          System/Packages
 
 %description -n snapper-zypp-plugin
 This package contains a plugin for zypp that makes filesystem snapshots with
@@ -184,11 +196,33 @@
 %endif
 /usr/lib/zypp/plugins/commit/snapper.py*
 
+%package -n grub-snapper-plugin
+Requires:       python
+Requires:       python-xattr
+Requires:       snapper = %version
+Supplements:    packageand(snapper-zypp-plugin:grub2)
+Summary:        A snapper plugin for adding snapshot metadata for grub2
+Group:          System/Packages
+
+%description -n grub-snapper-plugin
+This package contains a plugin for snapper that adds metadata to snapshots
+used by grub2.
+
+Authors:
+--------
+    Arvin Schnell <[email protected]>
+
+%files -n grub-snapper-plugin
+%defattr(-,root,root)
+%dir /usr/lib/snapper
+%dir /usr/lib/snapper/plugins
+/usr/lib/snapper/plugins/grub.py*
+
 %package -n pam_snapper
-Requires:      snapper = %version
-Requires:      pam
-Summary:       PAM module for calling snapper
-Group:         System/Packages
+Requires:       pam
+Requires:       snapper = %version
+Summary:        PAM module for calling snapper
+Group:          System/Packages
 
 %description -n pam_snapper
 A PAM module for calling snapper during user login and logout.

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to