Hello community, here is the log from the commit of package snapper for openSUSE:Factory checked in at 2013-11-29 07:05:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-11-07 09:04:02.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.snapper.new/snapper.changes 2013-11-29 07:05:11.000000000 +0100 @@ -1,0 +2,6 @@ +Mon Nov 25 11:38:43 CET 2013 - [email protected] + +- allow to configure snapshotting from zypp-plugin depending on + package list (fate#316203) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ snapper.spec ++++++ --- /var/tmp/diff_new_pack.eyM94v/_old 2013-11-29 07:05:12.000000000 +0100 +++ /var/tmp/diff_new_pack.eyM94v/_new 2013-11-29 07:05:12.000000000 +0100 @@ -99,7 +99,9 @@ %defattr(-,root,root) %{prefix}/bin/snapper %{prefix}/sbin/snapperd -%doc %{_mandir}/*/snapper*.* +%doc %{_mandir}/*/snapper.8* +%doc %{_mandir}/*/snapperd.8* +%doc %{_mandir}/*/snapper-configs.5* %config(noreplace) %{_sysconfdir}/logrotate.d/snapper /etc/cron.hourly/suse.de-snapper /etc/cron.daily/suse.de-snapper @@ -173,9 +175,10 @@ %package -n snapper-zypp-plugin Requires: dbus-1-python +Requires: python-xml Requires: snapper = %version Requires: zypp-plugin-python -Requires: libzypp(plugin:commit) +Requires: libzypp(plugin:commit) = 1 Summary: A zypp commit plugin for calling snapper Group: System/Packages @@ -189,12 +192,15 @@ %files -n snapper-zypp-plugin %defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/snapper/zypp-plugin.conf %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* +%doc %{_mandir}/*/snapper-zypp-plugin.8* +%doc %{_mandir}/*/snapper-zypp-plugin.conf.5* %package -n grub-snapper-plugin Requires: python @@ -236,6 +242,6 @@ /%{_lib}/security/pam_snapper.so %dir /usr/lib/pam_snapper /usr/lib/pam_snapper/*.sh -%doc %{_mandir}/*/pam_snapper*.* +%doc %{_mandir}/*/pam_snapper.8* %changelog ++++++ snapper-0.1.7.tar.bz2 ++++++ ++++ 7780 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/README new/snapper-0.1.7/README --- old/snapper-0.1.7/README 1970-01-01 01:00:00.000000000 +0100 +++ new/snapper-0.1.7/README 2013-11-19 17:40:27.000000000 +0100 @@ -0,0 +1,8 @@ + +Snapper is a tool for Linux filesystem snapshot management. Apart from the +obvious creation and deletion of snapshots, it can compare snapshots and +revert differences between snapshots. In simple terms, this allows root and +non-root users to view older versions of files and revert changes. + +For more information visit http://snapper.io/. + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/configure.ac new/snapper-0.1.7/configure.ac --- old/snapper-0.1.7/configure.ac 2013-10-11 16:20:30.000000000 +0200 +++ new/snapper-0.1.7/configure.ac 2013-11-22 16:57:19.000000000 +0100 @@ -144,6 +144,8 @@ doc/snapper.xml:doc/snapper.xml.in doc/snapperd.xml:doc/snapperd.xml.in doc/snapper-configs.xml:doc/snapper-configs.xml.in + doc/snapper-zypp-plugin.xml:doc/snapper-zypp-plugin.xml.in + doc/snapper-zypp-plugin.conf.xml:doc/snapper-zypp-plugin.conf.xml.in doc/pam_snapper.xml:doc/pam_snapper.xml.in po/Makefile testsuite/Makefile diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/data/Makefile.am new/snapper-0.1.7/data/Makefile.am --- old/snapper-0.1.7/data/Makefile.am 2013-02-28 18:38:53.000000000 +0100 +++ new/snapper-0.1.7/data/Makefile.am 2013-11-25 11:05:58.000000000 +0100 @@ -3,7 +3,8 @@ # EXTRA_DIST = sysconfig.snapper base.txt lvm.txt x11.txt snapper.logrotate \ - default-config org.opensuse.Snapper.conf org.opensuse.Snapper.service + default-config org.opensuse.Snapper.conf org.opensuse.Snapper.service \ + zypp-plugin.conf install-data-local: install -D -m 644 snapper.logrotate $(DESTDIR)/etc/logrotate.d/snapper @@ -15,3 +16,4 @@ install -D -m 644 x11.txt $(DESTDIR)/etc/snapper/filters/x11.txt install -D -m 644 org.opensuse.Snapper.conf $(DESTDIR)/etc/dbus-1/system.d/org.opensuse.Snapper.conf install -D -m 644 org.opensuse.Snapper.service $(DESTDIR)/usr/share/dbus-1/system-services/org.opensuse.Snapper.service + install -D -m 644 zypp-plugin.conf $(DESTDIR)/etc/snapper/zypp-plugin.conf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/data/zypp-plugin.conf new/snapper-0.1.7/data/zypp-plugin.conf --- old/snapper-0.1.7/data/zypp-plugin.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/snapper-0.1.7/data/zypp-plugin.conf 2013-11-26 17:51:23.000000000 +0100 @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<snapper-zypp-plugin-conf> + + <!-- List of solvables. If the zypp commit transaction includes any solvable + listed below, snapper will create pre and post snapshots. The match + attribute defines whether the pattern is a Unix shell-style wildcard + ("w") or a regular expression ("re"). If any of the matching solvables + 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">glibc</solvable> + <solvable match="w" important="true">systemd</solvable> + <solvable match="w" important="true">udev</solvable> + <solvable match="w">*</solvable> + </solvables> + +</snapper-zypp-plugin-conf> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/doc/Makefile.am new/snapper-0.1.7/doc/Makefile.am --- old/snapper-0.1.7/doc/Makefile.am 2013-07-09 10:27:18.000000000 +0200 +++ new/snapper-0.1.7/doc/Makefile.am 2013-11-22 17:52:13.000000000 +0100 @@ -2,7 +2,8 @@ # Makefile.am for snapper/doc # -man_MANS = snapper.8 snapperd.8 snapper-configs.5 +man_MANS = snapper.8 snapperd.8 snapper-configs.5 snapper-zypp-plugin.8 \ + snapper-zypp-plugin.conf.5 if HAVE_PAM man_MANS += pam_snapper.8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/doc/snapper-zypp-plugin.conf.xml.in new/snapper-0.1.7/doc/snapper-zypp-plugin.conf.xml.in --- old/snapper-0.1.7/doc/snapper-zypp-plugin.conf.xml.in 1970-01-01 01:00:00.000000000 +0100 +++ new/snapper-0.1.7/doc/snapper-zypp-plugin.conf.xml.in 2013-11-26 10:45:16.000000000 +0100 @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<refentry id='snapper-zypp-plugin.conf5'> + + <refentryinfo> + <date>2013-11-22</date> + </refentryinfo> + + <refmeta> + <refentrytitle>snapper-zypp-plugin.conf</refentrytitle> + <manvolnum>5</manvolnum> + <refmiscinfo class='date'>2013-11-22</refmiscinfo> + <refmiscinfo class='version'>@VERSION@</refmiscinfo> + <refmiscinfo class='manual'>Filesystem Snapshot Management</refmiscinfo> + </refmeta> + + <refnamediv> + <refname>snapper-zypp-plugin.conf</refname> + <refpurpose>Configuration file for snapper-zypp-plugin</refpurpose> + </refnamediv> + + <refsect1 id='description'> + <title>DESCRIPTION</title> + <para>The file <filename>/etc/snapper/zypp-plugin.conf</filename> contains + the configuation for snapper-zypp-plugin.</para> + + <para>The file uses XML syntax. For the XML structure have a look at the + provided default config.</para> + </refsect1> + + <refsect1 id='homepage'> + <title>HOMEPAGE</title> + <para><ulink url='http://snapper.io/'>http://snapper.io/</ulink></para> + </refsect1> + + <refsect1 id='authors'> + <title>AUTHORS</title> + <para>Arvin Schnell <email>[email protected]</email></para> + </refsect1> + + <refsect1 id='see_also'> + <title>SEE ALSO</title> + <para> + <citerefentry><refentrytitle>snapper-zypp-plugin</refentrytitle><manvolnum>8</manvolnum></citerefentry> + </para> + </refsect1> + +</refentry> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/doc/snapper-zypp-plugin.xml.in new/snapper-0.1.7/doc/snapper-zypp-plugin.xml.in --- old/snapper-0.1.7/doc/snapper-zypp-plugin.xml.in 1970-01-01 01:00:00.000000000 +0100 +++ new/snapper-0.1.7/doc/snapper-zypp-plugin.xml.in 2013-11-26 10:35:11.000000000 +0100 @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8"?> +<refentry id='snapper-zypp-plugin8'> + + <refentryinfo> + <date>2013-11-22</date> + </refentryinfo> + + <refmeta> + <refentrytitle>snapper-zypp-plugin</refentrytitle> + <manvolnum>8</manvolnum> + <refmiscinfo class='date'>2013-11-22</refmiscinfo> + <refmiscinfo class='version'>@VERSION@</refmiscinfo> + <refmiscinfo class='manual'>Filesystem Snapshot Management</refmiscinfo> + </refmeta> + + <refnamediv> + <refname>snapper-zypp-plugin</refname> + <refpurpose>Snapper plugin for libzypp</refpurpose> + </refnamediv> + + <refsect1 id='description'> + <title>DESCRIPTION</title> + <para>With the snapper-zypp-plugin, snapper can create snapshots whenever + libzypp, and thus e.g. zypper and YaST, installs, updates or removes + packages. </para> + </refsect1> + + <refsect1 id='files'> + <title>FILES</title> + <variablelist> + <varlistentry> + <term><filename>/etc/snapper/zypp-plugin.conf</filename></term> + <listitem> + <para>Configuration file. New in version 0.1.8.</para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + <refsect1 id='homepage'> + <title>HOMEPAGE</title> + <para><ulink url='http://snapper.io/'>http://snapper.io/</ulink></para> + </refsect1> + + <refsect1 id='authors'> + <title>AUTHORS</title> + <para>Arvin Schnell <email>[email protected]</email></para> + </refsect1> + + <refsect1 id='see_also'> + <title>SEE ALSO</title> + <para> + <citerefentry><refentrytitle>snapper-zypp-plugin.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, + <citerefentry><refentrytitle>snapper</refentrytitle><manvolnum>8</manvolnum></citerefentry>, + <citerefentry><refentrytitle>zypper</refentrytitle><manvolnum>8</manvolnum></citerefentry>, + <citerefentry><refentrytitle>YaST</refentrytitle><manvolnum>8</manvolnum></citerefentry> + </para> + </refsect1> + +</refentry> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/doc/snapper.xml.in new/snapper-0.1.7/doc/snapper.xml.in --- old/snapper-0.1.7/doc/snapper.xml.in 2013-09-06 16:28:04.000000000 +0200 +++ new/snapper-0.1.7/doc/snapper.xml.in 2013-10-31 11:25:16.000000000 +0100 @@ -555,6 +555,7 @@ <title>SEE ALSO</title> <para> <citerefentry><refentrytitle>snapper-configs</refentrytitle><manvolnum>5</manvolnum></citerefentry>, + <citerefentry><refentrytitle>pam_snapper</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>lvm</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>attr</refentrytitle><manvolnum>5</manvolnum></citerefentry> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/examples/c++-lib/Create.cc new/snapper-0.1.7/examples/c++-lib/Create.cc --- old/snapper-0.1.7/examples/c++-lib/Create.cc 2013-10-09 13:45:49.000000000 +0200 +++ new/snapper-0.1.7/examples/c++-lib/Create.cc 2013-10-25 10:57:47.000000000 +0200 @@ -1,4 +1,6 @@ +#include <unistd.h> +#include <sys/types.h> #include <stdlib.h> #include <iostream> @@ -12,7 +14,7 @@ { Snapper* sh = new Snapper(); - sh->createSingleSnapshot("test"); + sh->createSingleSnapshot(getuid(), "test", "number", map<string, string>()); delete sh; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/examples/c++-lib/SnapTest.cc new/snapper-0.1.7/examples/c++-lib/SnapTest.cc --- old/snapper-0.1.7/examples/c++-lib/SnapTest.cc 2013-10-09 13:45:51.000000000 +0200 +++ new/snapper-0.1.7/examples/c++-lib/SnapTest.cc 2013-10-25 11:41:28.000000000 +0200 @@ -84,11 +84,11 @@ print_snap_info( j, snap.end() ); string desc = j->getDescription(); desc += " 1"; - j->setDescription(desc); + sh->modifySnapshot(j, desc, j->getCleanup(), j->getUserdata()); j = snap.findPost(s); print_snap_info( j, snap.end() ); desc.erase( desc.size()-2 ); - j->setDescription(desc); + sh->modifySnapshot(j, desc, j->getCleanup(), j->getUserdata()); // testing handling userdata j = snap.findPost(s); @@ -98,11 +98,11 @@ sm["key1"] = "value1"; sm["key2"] = "value2"; sm["key3"] = "value3"; - j->setUserdata( sm ); + sh->modifySnapshot(j, j->getDescription(), j->getCleanup(), sm); map<string,string> sn=j->getUserdata(); print_smap_info( sn ); sn.clear(); - j->setUserdata( sn ); + sh->modifySnapshot(j, j->getDescription(), j->getCleanup(), sn); print_smap_info( j->getUserdata() ); // testing compare functionality diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/missing new/snapper-0.1.7/missing --- old/snapper-0.1.7/missing 2013-10-24 17:46:46.000000000 +0200 +++ new/snapper-0.1.7/missing 2013-11-27 16:42:09.000000000 +0100 @@ -1,10 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-01-06.18; # UTC +scriptversion=2012-06-26.16; # UTC -# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard <[email protected]>, 1996. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,61 +29,33 @@ exit 1 fi -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, 'missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi +case $1 in -msg="missing on your system" + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file 'aclocal.m4' - autoconf touch file 'configure' - autoheader touch file 'config.h.in' - autom4te touch the output file, or create a stub one - automake touch all 'Makefile.in' files - bison create 'y.tab.[ch]', if possible, from existing .[ch] - flex create 'lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create 'lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create 'y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. @@ -98,228 +70,141 @@ ;; -*) - echo 1>&2 "$0: Unknown '$1' option" + echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; +# Run the given program, remember its exit status. +"$@"; st=$? - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running '$TOOL --version' or '$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified 'acinclude.m4' or '${configure_ac}'. You might want - to install the Automake and Perl packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified '${configure_ac}'. You might want to install the - Autoconf and GNU m4 packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified 'acconfig.h' or '${configure_ac}'. You might want - to install the Autoconf and GNU m4 packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; +# If it succeeded, we are done. +test $st -eq 0 && exit 0 - automake*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. - You might want to install the Automake and Perl packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: '$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get '$1' as part of Autoconf from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: '$1' $msg. You should only need it if - you modified a '.y' file. You may need the Bison package - in order for those modifications to take effect. You can get - Bison from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified a '.l' file. You may need the Flex package - in order for those modifications to take effect. You can get - Flex from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - Help2man package in order for those modifications to take - effect. You can get Help2man from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified a '.texi' or '.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy 'make' (AIX, - DU, IRIX). You might want to install the Texinfo package or - the GNU make package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: '$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the 'README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing '$1' program." - exit 1 - ;; -esac +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi -exit 0 +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'automa4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/pam/Makefile.am new/snapper-0.1.7/pam/Makefile.am --- old/snapper-0.1.7/pam/Makefile.am 2013-06-04 10:19:10.000000000 +0200 +++ new/snapper-0.1.7/pam/Makefile.am 2013-10-25 17:38:26.000000000 +0200 @@ -4,7 +4,7 @@ if HAVE_PAM -AM_CFLAGS = -D_GNU_SOURCE +AM_CFLAGS = -D_GNU_SOURCE -Wwrite-strings INCLUDES = -I$(top_srcdir) $(DBUS_CFLAGS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 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 2013-10-15 16:25:42.000000000 +0200 +++ new/snapper-0.1.7/scripts/grub-plugin.py 2013-11-25 14:29:30.000000000 +0100 @@ -1,9 +1,31 @@ #!/usr/bin/python +# +# Copyright (c) [2011-2013] Novell, Inc. +# +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, contact Novell, Inc. +# +# To contact Novell about this file by physical or electronic mail, you may +# find current contact information at www.novell.com. +# +# Author: Arvin Schnell <[email protected]> +# + 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/snapper-0.1.7/scripts/zypp-plugin.py new/snapper-0.1.7/scripts/zypp-plugin.py --- old/snapper-0.1.7/scripts/zypp-plugin.py 2013-10-08 13:22:32.000000000 +0200 +++ new/snapper-0.1.7/scripts/zypp-plugin.py 2013-11-27 16:41:27.000000000 +0100 @@ -1,50 +1,226 @@ #!/usr/bin/python +# +# Copyright (c) [2011-2013] Novell, Inc. +# +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, contact Novell, Inc. +# +# To contact Novell about this file by physical or electronic mail, you may +# find current contact information at www.novell.com. +# +# Author: Arvin Schnell <[email protected]> +# + from os import readlink, getppid from os.path import basename -from sys import stderr +import fnmatch +import re +import logging from dbus import SystemBus, Interface +import xml.dom.minidom as minidom +import xml.parsers.expat as expat +import json from zypp_plugin import Plugin + +class Solvable: + + def __init__(self, pattern, important): + self.pattern = re.compile(pattern) + self.important = important + + def __repr__(self): + return "pattern:%s important:%s" % (self.pattern, self.important) + + def match(self, name): + return self.pattern.match(name) + + + +class Config: + + def __init__(self): + self.solvables = [] + self.load_file("/etc/snapper/zypp-plugin.conf") + + + def load_file(self, filename): + try: + self.load_dom(minidom.parse(filename)) + except IOError: + logging.error("failed to open %s" % filename) + except expat.ExpatError: + logging.error("failed to parse %s" % filename) + except: + logging.error("failed to load %s" % filename) + + + def load_dom(self, dom): + try: + for tmp1 in dom.getElementsByTagName("solvables"): + for tmp2 in tmp1.getElementsByTagName("solvable"): + + pattern = tmp2.childNodes[0].data + match = tmp2.getAttribute("match") + important = tmp2.getAttribute("important") == "true" + + if not match in [ "w", "re" ]: + logging.error("unknown match attribute %s" % match) + continue + + if match == "w": + pattern = fnmatch.translate(pattern) + + self.solvables.append(Solvable(pattern, important)) + + except: + pass + + + class MyPlugin(Plugin): + def __init__(self): + Plugin.__init__(self) + self.num1 = self.num2 = None + self.description = "" + self.cleanup = "number" + self.userdata = {} + + + def parse_userdata(self, s): + userdata = {} + for kv in s.split(","): + k, v = kv.split("=", 1) + k = k.strip() + if not k: + raise ValueError + userdata[k] = v.strip() + return userdata + + + def get_userdata(self, headers): + try: + return self.parse_userdata(headers['userdata']) + except KeyError: + pass + except ValueError: + logging.error("invalid userdata") + return {} + + + def get_solvables(self, body, todo): + tmp = json.loads(body) + tsl = tmp["TransactionStepList"] + solvables = set() + for ts in tsl: + if "type" in ts: + if todo or "stage" in ts: + solvables.add(ts["solvable"]["n"]) + return solvables + + + def match_solvables(self, names): + found = important = False + for name in names: + for solvable in config.solvables: + if solvable.match(name): + found = True + important = important or solvable.important + if found and important: + return True, True + return found, important + + + def PLUGINBEGIN(self, headers, body): + + logging.info("PLUGINBEGIN") + + logging.debug("headers: %s" % headers) + + self.description = "zypp(%s)" % basename(readlink("/proc/%d/exe" % getppid())) + self.userdata = self.get_userdata(headers) + + self.ack() + + + def COMMITBEGIN(self, headers, body): + + logging.info("COMMITBEGIN") + + solvables = self.get_solvables(body, True) + logging.debug("solvables: %s" % solvables) + + found, important = self.match_solvables(solvables) + logging.info("found: %s, important: %s" % (found, important)) + + if found or important: + + self.userdata["important"] = "yes" if important else "no" + + logging.info("creating pre snapshot") + self.num1 = snapper.CreatePreSnapshot("root", self.description, self.cleanup, + self.userdata) + logging.debug("created pre snapshot %d" % self.num1) + + self.ack() + + + def COMMITEND(self, headers, body): + + logging.info("COMMITEND") + + if self.num1: + + solvables = self.get_solvables(body, False) + logging.debug("solvables: %s" % solvables) + + found, important = self.match_solvables(solvables) + logging.info("found: %s, important: %s" % (found, important)) + + if found or important: - def parse_userdata(self, s): - ud = {} - for kv in s.split(","): - k, v = kv.split("=", 1) - k = k.strip() - if not k: - raise ValueError - ud[k] = v.strip() - return ud + self.userdata["important"] = "yes" if important else "no" + snapper.SetSnapshot("root", self.num1, self.description, self.cleanup, + self.userdata) - def PLUGINBEGIN(self, headers, body): + logging.info("creating post snapshot") + self.num2 = snapper.CreatePostSnapshot("root", self.num1, "", self.cleanup, + self.userdata) + logging.debug("created post snapshot %d" % self.num2) - exe = basename(readlink("/proc/%d/exe" % getppid())) + else: - self.userdata = {} + logging.info("deleting pre snapshot") + snapper.DeleteSnapshots("root", [ self.num1 ]) + logging.debug("deleted pre snapshot %d" % self.num1) - try: - self.userdata = self.parse_userdata(headers['userdata']) - except KeyError: - pass - except ValueError: - stderr.write("invalid userdata") + self.ack() - self.num1 = snapper.CreatePreSnapshot("root", "zypp(%s)" % exe, "number", self.userdata) - self.ack() + def PLUGINEND(self, headers, body): + logging.info("PLUGINEND") - def PLUGINEND(self, headers, body): + self.ack() - self.num2 = snapper.CreatePostSnapshot("root", self.num1, "", "number", self.userdata) - self.ack() +config = Config() bus = SystemBus() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 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-10-15 17:38:42.000000000 +0200 +++ new/snapper-0.1.7/snapper.spec.in 2013-11-25 16:29:38.000000000 +0100 @@ -99,7 +99,9 @@ %defattr(-,root,root) %{prefix}/bin/snapper %{prefix}/sbin/snapperd -%doc %{_mandir}/*/snapper*.* +%doc %{_mandir}/*/snapper.8* +%doc %{_mandir}/*/snapperd.8* +%doc %{_mandir}/*/snapper-configs.5* %config(noreplace) %{_sysconfdir}/logrotate.d/snapper /etc/cron.hourly/suse.de-snapper /etc/cron.daily/suse.de-snapper @@ -173,9 +175,10 @@ %package -n snapper-zypp-plugin Requires: dbus-1-python +Requires: libzypp(plugin:commit) = 1 +Requires: python-xml Requires: snapper = %version Requires: zypp-plugin-python -Requires: libzypp(plugin:commit) Summary: A zypp commit plugin for calling snapper Group: System/Packages @@ -189,12 +192,15 @@ %files -n snapper-zypp-plugin %defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/snapper/zypp-plugin.conf %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* +%doc %{_mandir}/*/snapper-zypp-plugin.8* +%doc %{_mandir}/*/snapper-zypp-plugin.conf.5* %package -n grub-snapper-plugin Requires: python @@ -236,6 +242,6 @@ /%{_lib}/security/pam_snapper.so %dir /usr/lib/pam_snapper /usr/lib/pam_snapper/*.sh -%doc %{_mandir}/*/pam_snapper*.* +%doc %{_mandir}/*/pam_snapper.8* %changelog -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
