Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package snapper for openSUSE:Factory checked in at 2021-11-22 23:08:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/snapper (Old) and /work/SRC/openSUSE:Factory/.snapper.new.1895 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "snapper" Mon Nov 22 23:08:08 2021 rev:133 rq: version:0.9.0 Changes: -------- --- /work/SRC/openSUSE:Factory/snapper/snapper.changes 2021-11-20 02:38:58.764811985 +0100 +++ /work/SRC/openSUSE:Factory/.snapper.new.1895/snapper.changes 2021-11-22 23:08:09.773130963 +0100 @@ -2,7 +1,0 @@ -Tue Sep 21 13:30:29 CEST 2021 - aschn...@suse.com - -- look for most configuration files in /etc/snapper and - /usr/share/snapper (bsc#1189601) -- version 0.9.1 - -------------------------------------------------------------------- Old: ---- snapper-0.9.1.tar.bz2 snapper-Debian_11.0.dsc snapper-xUbuntu_21.10.dsc New: ---- snapper-0.9.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ snapper.spec ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:10.325129110 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:10.325129110 +0100 @@ -32,7 +32,7 @@ %bcond_with coverage Name: snapper -Version: 0.9.1 +Version: 0.9.0 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: snapper-%{version}.tar.bz2 @@ -226,11 +226,10 @@ %{_libdir}/libsnapper.so.* %dir %{_sysconfdir}/snapper %dir %{_sysconfdir}/snapper/configs -%dir %{_datadir}/snapper -%dir %{_datadir}/snapper/config-templates -%{_datadir}/snapper/config-templates/default -%dir %{_datadir}/snapper/filters -%{_datadir}/snapper/filters/*.txt +%dir %{_sysconfdir}/snapper/config-templates +%config(noreplace) %{_sysconfdir}/snapper/config-templates/default +%dir %{_sysconfdir}/snapper/filters +%config(noreplace) %{_sysconfdir}/snapper/filters/*.txt %doc %dir %{_defaultdocdir}/snapper %doc %{_defaultdocdir}/snapper/AUTHORS %doc %{_defaultdocdir}/snapper/COPYING @@ -240,18 +239,6 @@ %config(noreplace) %{_sysconfdir}/sysconfig/snapper %endif -%pre -n libsnapper5 -# Migration from /etc/snapper to /usr/share/snapper -for i in config-templates/default filters/base.txt filters/lvm.txt filters/x11.txt ; do - test -f /etc/snapper/${i}.rpmsave && mv -v /etc/snapper/${i}.rpmsave /etc/snapper/${i}.rpmsave.old ||: -done - -%posttrans -n libsnapper5 -# Migration from /etc/snapper to /usr/share/snapper -for i in config-templates/default filters/base.txt filters/lvm.txt filters/x11.txt ; do - test -f /etc/snapper/${i}.rpmsave && mv -v /etc/snapper/${i}.rpmsave /etc/snapper/${i} ||: -done - %post -n libsnapper5 /sbin/ldconfig %if 0%{?suse_version} @@ -301,7 +288,7 @@ %files -n snapper-zypp-plugin %defattr(-,root,root) -%{_datadir}/snapper/zypp-plugin.conf +%config(noreplace) %{_sysconfdir}/snapper/zypp-plugin.conf %if 0%{?suse_version} < 1210 %dir /usr/lib/zypp %dir /usr/lib/zypp/plugins @@ -311,18 +298,6 @@ %doc %{_mandir}/*/snapper-zypp-plugin.8* %doc %{_mandir}/*/snapper-zypp-plugin.conf.5* -%pre -n snapper-zypp-plugin -# Migration from /etc/snapper to /usr/share/snapper -for i in zypp-plugin.conf ; do - test -f /etc/snapper/${i}.rpmsave && mv -v /etc/snapper/${i}.rpmsave /etc/snapper/${i}.rpmsave.old ||: -done - -%posttrans -n snapper-zypp-plugin -# Migration from /etc/snapper to /usr/share/snapper -for i in zypp-plugin.conf ; do - test -f /etc/snapper/${i}.rpmsave && mv -v /etc/snapper/${i}.rpmsave /etc/snapper/${i} ||: -done - %package -n pam_snapper Requires: pam Requires: snapper = %version ++++++ debian.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debian/changelog new/debian/changelog --- old/debian/changelog 2021-11-10 01:00:00.000000000 +0100 +++ new/debian/changelog 2021-06-22 02:00:00.000000000 +0200 @@ -1,9 +1,3 @@ -snapper (0.9.1) stable; urgency=low - - * Updated to version 0.9.1 - - -- Arvin Schnell <aschn...@suse.com> Wed, 22 Sep 2021 09:16:12 +0000 - snapper (0.9.0) stable; urgency=low * Updated to version 0.9.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debian/libsnapper.install new/debian/libsnapper.install --- old/debian/libsnapper.install 2021-11-10 01:00:00.000000000 +0100 +++ new/debian/libsnapper.install 2021-06-22 02:00:00.000000000 +0200 @@ -1,6 +1,6 @@ +etc/snapper/config-templates etc/snapper/configs +etc/snapper/filters etc/sysconfig/snapper -usr/share/snapper/config-templates -usr/share/snapper/filters usr/lib/libsnapper.so.* usr/share/doc/packages/snapper diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debian/snapper-zypp-plugin.install new/debian/snapper-zypp-plugin.install --- old/debian/snapper-zypp-plugin.install 2021-11-10 01:00:00.000000000 +0100 +++ new/debian/snapper-zypp-plugin.install 2021-06-22 02:00:00.000000000 +0200 @@ -1,2 +1,2 @@ usr/lib/zypp/plugins/commit/snapper-zypp-plugin -usr/share/snapper/zypp-plugin.conf +etc/snapper/zypp-plugin.conf ++++++ snapper-0.9.1.tar.bz2 -> snapper-0.9.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/Makefile.am new/snapper-0.9.0/Makefile.am --- old/snapper-0.9.1/Makefile.am 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/Makefile.am 2021-06-22 02:00:00.000000000 +0200 @@ -16,7 +16,6 @@ DEBIAN_FLAVOURS = \ Debian_9.0 \ Debian_10.0 \ - Debian_11.0 \ Debian_Unstable UBUNTU_FLAVOURS = \ @@ -28,8 +27,7 @@ xUbuntu_19.10 \ xUbuntu_20.04 \ xUbuntu_20.10 \ - xUbuntu_21.04 \ - xUbuntu_21.10 + xUbuntu_21.04 RASPBIAN_FLAVOURS = \ Raspbian_10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/Makefile.in new/snapper-0.9.0/Makefile.in --- old/snapper-0.9.1/Makefile.in 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -406,7 +406,6 @@ DEBIAN_FLAVOURS = \ Debian_9.0 \ Debian_10.0 \ - Debian_11.0 \ Debian_Unstable UBUNTU_FLAVOURS = \ @@ -418,8 +417,7 @@ xUbuntu_19.10 \ xUbuntu_20.04 \ xUbuntu_20.10 \ - xUbuntu_21.04 \ - xUbuntu_21.10 + xUbuntu_21.04 RASPBIAN_FLAVOURS = \ Raspbian_10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/VERSION new/snapper-0.9.0/VERSION --- old/snapper-0.9.1/VERSION 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/VERSION 2021-06-22 02:00:00.000000000 +0200 @@ -1 +1 @@ -0.9.1 +0.9.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/client/installation-helper.cc new/snapper-0.9.0/client/installation-helper.cc --- old/snapper-0.9.1/client/installation-helper.cc 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/client/installation-helper.cc 2021-06-22 02:00:00.000000000 +0200 @@ -73,7 +73,7 @@ try { - SysconfigFile config(locate_file("default", ETC_CONFIG_TEMPLATE_DIR, USR_CONFIG_TEMPLATE_DIR)); + SysconfigFile config(CONFIG_TEMPLATE_DIR "/" "default"); config.setName(tmp_mount.getFullname() + CONFIGS_DIR "/" "root"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/data/Makefile.am new/snapper-0.9.0/data/Makefile.am --- old/snapper-0.9.1/data/Makefile.am 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/data/Makefile.am 2021-06-22 02:00:00.000000000 +0200 @@ -11,14 +11,12 @@ install -D -m 644 snapper.logrotate $(DESTDIR)/etc/logrotate.d/snapper install -d -m 755 $(DESTDIR)/etc/snapper/configs + install -D -m 644 default-config $(DESTDIR)/etc/snapper/config-templates/default - install -d -m 755 $(DESTDIR)/usr/share/snapper/config-templates - install -D -m 644 default-config $(DESTDIR)/usr/share/snapper/config-templates/default - - install -d -m 755 $(DESTDIR)/usr/share/snapper/filters - install -D -m 644 base.txt $(DESTDIR)/usr/share/snapper/filters/base.txt - install -D -m 644 lvm.txt $(DESTDIR)/usr/share/snapper/filters/lvm.txt - install -D -m 644 x11.txt $(DESTDIR)/usr/share/snapper/filters/x11.txt + install -d -m 755 $(DESTDIR)/etc/snapper/filters + install -D -m 644 base.txt $(DESTDIR)/etc/snapper/filters/base.txt + install -D -m 644 lvm.txt $(DESTDIR)/etc/snapper/filters/lvm.txt + install -D -m 644 x11.txt $(DESTDIR)/etc/snapper/filters/x11.txt install -D -m 644 org.opensuse.Snapper.conf $(DESTDIR)/usr/share/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 @@ -34,5 +32,5 @@ endif if HAVE_ZYPP - install -D -m 644 zypp-plugin.conf $(DESTDIR)/usr/share/snapper/zypp-plugin.conf + install -D -m 644 zypp-plugin.conf $(DESTDIR)/etc/snapper/zypp-plugin.conf endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/data/Makefile.in new/snapper-0.9.0/data/Makefile.in --- old/snapper-0.9.1/data/Makefile.in 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/data/Makefile.in 2021-06-22 02:00:00.000000000 +0200 @@ -476,14 +476,12 @@ install -D -m 644 snapper.logrotate $(DESTDIR)/etc/logrotate.d/snapper install -d -m 755 $(DESTDIR)/etc/snapper/configs + install -D -m 644 default-config $(DESTDIR)/etc/snapper/config-templates/default - install -d -m 755 $(DESTDIR)/usr/share/snapper/config-templates - install -D -m 644 default-config $(DESTDIR)/usr/share/snapper/config-templates/default - - install -d -m 755 $(DESTDIR)/usr/share/snapper/filters - install -D -m 644 base.txt $(DESTDIR)/usr/share/snapper/filters/base.txt - install -D -m 644 lvm.txt $(DESTDIR)/usr/share/snapper/filters/lvm.txt - install -D -m 644 x11.txt $(DESTDIR)/usr/share/snapper/filters/x11.txt + install -d -m 755 $(DESTDIR)/etc/snapper/filters + install -D -m 644 base.txt $(DESTDIR)/etc/snapper/filters/base.txt + install -D -m 644 lvm.txt $(DESTDIR)/etc/snapper/filters/lvm.txt + install -D -m 644 x11.txt $(DESTDIR)/etc/snapper/filters/x11.txt install -D -m 644 org.opensuse.Snapper.conf $(DESTDIR)/usr/share/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 @@ -496,7 +494,7 @@ @ENABLE_SYSTEMD_TRUE@ install -D -m 644 boot.timer $(DESTDIR)/usr/lib/systemd/system/snapper-boot.timer @ENABLE_SYSTEMD_TRUE@ install -D -m 644 snapperd.service $(DESTDIR)/usr/lib/systemd/system/snapperd.service -@HAVE_ZYPP_TRUE@ install -D -m 644 zypp-plugin.conf $(DESTDIR)/usr/share/snapper/zypp-plugin.conf +@HAVE_ZYPP_TRUE@ install -D -m 644 zypp-plugin.conf $(DESTDIR)/etc/snapper/zypp-plugin.conf # 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.9.1/doc/snapper-zypp-plugin.conf.xml.in new/snapper-0.9.0/doc/snapper-zypp-plugin.conf.xml.in --- old/snapper-0.9.1/doc/snapper-zypp-plugin.conf.xml.in 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/doc/snapper-zypp-plugin.conf.xml.in 2021-06-22 02:00:00.000000000 +0200 @@ -2,13 +2,13 @@ <refentry id='snapper-zypp-plugin.conf5'> <refentryinfo> - <date>2021-09-21</date> + <date>2013-11-22</date> </refentryinfo> <refmeta> <refentrytitle>snapper-zypp-plugin.conf</refentrytitle> <manvolnum>5</manvolnum> - <refmiscinfo class='date'>2021-09-21</refmiscinfo> + <refmiscinfo class='date'>2013-11-22</refmiscinfo> <refmiscinfo class='version'>@VERSION@</refmiscinfo> <refmiscinfo class='manual'>Filesystem Snapshot Management</refmiscinfo> </refmeta> @@ -20,10 +20,8 @@ <refsect1 id='description'> <title>DESCRIPTION</title> - <para>The file <filename>/etc/snapper/zypp-plugin.conf</filename> - or as a fallback - <filename>/usr/share/snapper/zypp-plugin.conf</filename> contains the - configuation for snapper-zypp-plugin.</para> + <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> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/doc/snapper-zypp-plugin.xml.in new/snapper-0.9.0/doc/snapper-zypp-plugin.xml.in --- old/snapper-0.9.1/doc/snapper-zypp-plugin.xml.in 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/doc/snapper-zypp-plugin.xml.in 2021-06-22 02:00:00.000000000 +0200 @@ -2,13 +2,13 @@ <refentry id='snapper-zypp-plugin8'> <refentryinfo> - <date>2021-09-21</date> + <date>2013-11-22</date> </refentryinfo> <refmeta> <refentrytitle>snapper-zypp-plugin</refentrytitle> <manvolnum>8</manvolnum> - <refmiscinfo class='date'>2021-09-21</refmiscinfo> + <refmiscinfo class='date'>2013-11-22</refmiscinfo> <refmiscinfo class='version'>@VERSION@</refmiscinfo> <refmiscinfo class='manual'>Filesystem Snapshot Management</refmiscinfo> </refmeta> @@ -34,12 +34,6 @@ <para>Configuration file. New in version 0.1.8.</para> </listitem> </varlistentry> - <varlistentry> - <term><filename>/usr/share/snapper/zypp-plugin.conf</filename></term> - <listitem> - <para>Fallback configuration file. New in version 0.9.1.</para> - </listitem> - </varlistentry> </variablelist> </refsect1> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/doc/snapper.xml.in new/snapper-0.9.0/doc/snapper.xml.in --- old/snapper-0.9.1/doc/snapper.xml.in 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/doc/snapper.xml.in 2021-06-22 02:00:00.000000000 +0200 @@ -2,13 +2,13 @@ <refentry id='snapper8' xmlns:xlink="http://www.w3.org/1999/xlink"> <refentryinfo> - <date>2021-09-21</date> + <date>2020-06-15</date> </refentryinfo> <refmeta> <refentrytitle>snapper</refentrytitle> <manvolnum>8</manvolnum> - <refmiscinfo class='date'>2021-09-21</refmiscinfo> + <refmiscinfo class='date'>2020-06-15</refmiscinfo> <refmiscinfo class='version'>@VERSION@</refmiscinfo> <refmiscinfo class='manual'>Filesystem Snapshot Management</refmiscinfo> </refmeta> @@ -175,13 +175,11 @@ e.g. <filename>/etc/mtab</filename>. Such files should never be reverted. To help users, snapper allows one to ignore these files.</para> - <para>Filters are read from the files - <filename>/etc/snapper/filters/*.txt</filename> and - <filename>/usr/share/snapper/filters/*.txt</filename>, where - for files with the same name the former location has precedence. - Each line in those files specifies a pattern. When snapper - computes the difference between two snapshots it ignores all - files and directories matching any of those patterns by using + <para>Each line in all + files <filename>/etc/snapper/filters/*.txt</filename> specifies a + pattern. When snapper computes the difference between two snapshots it + ignores all files and directories matching any of those patterns by + using <citerefentry role="nolink"><refentrytitle>fnmatch</refentrytitle><manvolnum>3</manvolnum></citerefentry> with the flag FNM_LEADING_DIR.</para> @@ -861,24 +859,12 @@ </listitem> </varlistentry> <varlistentry> - <term><filename>/usr/share/snapper/config-templates</filename></term> - <listitem> - <para>Fallback directory containing configuration templates.</para> - </listitem> - </varlistentry> - <varlistentry> <term><filename>/etc/snapper/filters/*.txt</filename></term> <listitem> <para>Filter files.</para> </listitem> </varlistentry> <varlistentry> - <term><filename>/usr/share/snapper/filters/*.txt</filename></term> - <listitem> - <para>Fallback filter files.</para> - </listitem> - </varlistentry> - <varlistentry> <term><filename>/var/log/snapper.log</filename></term> <listitem> <para>Logfile. Please include this file in bug reports.</para> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/snapper/AppUtil.cc new/snapper-0.9.0/snapper/AppUtil.cc --- old/snapper-0.9.1/snapper/AppUtil.cc 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/snapper/AppUtil.cc 2021-06-22 02:00:00.000000000 +0200 @@ -56,10 +56,10 @@ } - vector<string> + list<string> glob(const string& path, int flags) { - vector<string> ret; + list<string> ret; glob_t globbuf; if (glob(path.c_str(), flags, 0, &globbuf) == 0) @@ -176,21 +176,6 @@ } - string - locate_file(const string& f, const char* p1, const char* p2) - { - string f1 = string(p1) + "/" + f; - if (access(f1.c_str(), R_OK) == 0) - return f1; - - string f2 = string(p2) + "/" + f; - if (access(f2.c_str(), R_OK) == 0) - return f2; - - throw runtime_error(sformat("file '%s' not found in '%s' nor '%s'", f.c_str(), p1, p2)); - } - - unsigned pagesize() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/snapper/AppUtil.h new/snapper-0.9.0/snapper/AppUtil.h --- old/snapper-0.9.1/snapper/AppUtil.h 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/snapper/AppUtil.h 2021-06-22 02:00:00.000000000 +0200 @@ -33,6 +33,7 @@ #include <sstream> #include <locale> #include <string> +#include <list> #include <map> #include <vector> #include <stdexcept> @@ -42,13 +43,14 @@ namespace snapper { using std::string; + using std::list; using std::map; using std::vector; bool checkDir(const string& Path_Cv); - vector<string> glob(const string& path, int flags); + list<string> glob(const string& path, int flags); bool clonefile(int src_fd, int dest_fd); bool copyfile(int src_fd, int dest_fd); @@ -66,12 +68,6 @@ string basename(const string& name); - /** - * Locate the file f first in p1 and second in p2. - */ - string locate_file(const string& f, const char* p1, const char* p2); - - struct MtabData { string device; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/snapper/AppUtil2.cc new/snapper-0.9.0/snapper/AppUtil2.cc --- old/snapper-0.9.1/snapper/AppUtil2.cc 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/snapper/AppUtil2.cc 2021-06-22 02:00:00.000000000 +0200 @@ -21,7 +21,7 @@ // This tiny file is separated from AppUtil.cc to allow setting specific -// defines. Unsetting _GNU_SOURCE in AppUtil.cc causes many errors. See +// defines. Unsetting _GNU_SOURCE in AppUtil.cc causes may errors. See // https://github.com/openSUSE/snapper/pull/581. // Defines to get the XSI-compliant strerror_r. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/snapper/Btrfs.cc new/snapper-0.9.0/snapper/Btrfs.cc --- old/snapper-0.9.1/snapper/Btrfs.cc 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/snapper/Btrfs.cc 2021-06-22 02:00:00.000000000 +0200 @@ -478,11 +478,8 @@ } catch (const IOErrorException& e) { - SN_CAUGHT(e); - // TODO the openInfoDir above logs an error although when this // function is used from nextNumber the failure is ok - return false; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/snapper/Enum.cc new/snapper-0.9.0/snapper/Enum.cc --- old/snapper-0.9.1/snapper/Enum.cc 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/snapper/Enum.cc 2021-06-22 02:00:00.000000000 +0200 @@ -27,8 +27,11 @@ namespace snapper { - const vector<string> EnumInfo<SnapshotType>::names({ + static const string snapshot_type_names[] = { "single", "pre", "post" - }); + }; + + const vector<string> EnumInfo<SnapshotType>::names(snapshot_type_names, snapshot_type_names + + lengthof(snapshot_type_names)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/snapper/Filesystem.cc new/snapper-0.9.0/snapper/Filesystem.cc --- old/snapper-0.9.1/snapper/Filesystem.cc 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/snapper/Filesystem.cc 2021-06-22 02:00:00.000000000 +0200 @@ -57,7 +57,7 @@ vector<string> Filesystem::filter_mount_options(const vector<string>& options) { - static const char* ign_opts[] = { + static const char* ign_opt[] = { "ro", "rw", "exec", "noexec", "suid", "nosuid", "dev", "nodev", "atime", "noatime", "diratime", "nodiratime", @@ -66,8 +66,8 @@ vector<string> ret = options; - for (const char* ign_opt : ign_opts) - ret.erase(remove(ret.begin(), ret.end(), ign_opt), ret.end()); + for (size_t i = 0; i < lengthof(ign_opt); ++i) + ret.erase(remove(ret.begin(), ret.end(), ign_opt[i]), ret.end()); return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/snapper/Snapper.cc new/snapper-0.9.0/snapper/Snapper.cc --- old/snapper-0.9.1/snapper/Snapper.cc 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/snapper/Snapper.cc 2021-06-22 02:00:00.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2011-2015] Novell, Inc. - * Copyright (c) [2016-2021] SUSE LLC + * Copyright (c) [2016-2020] SUSE LLC * * All Rights Reserved. * @@ -158,29 +158,12 @@ void Snapper::loadIgnorePatterns() { - const vector<string> etc_files = glob(ETC_FILTERS_DIR "/*.txt", GLOB_NOSORT); - const vector<string> usr_files = glob(USR_FILTERS_DIR "/*.txt", GLOB_NOSORT); - - // all files from /etc - vector<string> files = etc_files; - - // files from /usr where no corresponding file in /etc exists - for (const string& usr_file : usr_files) - { - string b1 = basename(usr_file); - - if (none_of(etc_files.begin(), etc_files.end(), [&b1](const string& etc_file) { - string b2 = basename(etc_file); - return b1 == b2; - })) - files.push_back(usr_file); - } - - for (const string& file : files) + const list<string> files = glob(FILTERS_DIR "/*.txt", GLOB_NOSORT); + for (list<string>::const_iterator it = files.begin(); it != files.end(); ++it) { try { - AsciiFileReader asciifile(file); + AsciiFileReader asciifile(*it); string line; while (asciifile.getline(line)) @@ -352,13 +335,7 @@ } } - string template_file; - - try - { - template_file = locate_file(template_name, ETC_CONFIG_TEMPLATE_DIR, USR_CONFIG_TEMPLATE_DIR); - } - catch (...) + if (access(string(CONFIG_TEMPLATE_DIR "/" + template_name).c_str(), R_OK) != 0) { SN_THROW(CreateConfigFailedException("cannot access template config")); } @@ -397,7 +374,7 @@ try { - SysconfigFile config(template_file); + SysconfigFile config(CONFIG_TEMPLATE_DIR "/" + template_name); config.setName(CONFIGS_DIR "/" + config_name); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/snapper/SnapperDefines.h new/snapper-0.9.0/snapper/SnapperDefines.h --- old/snapper-0.9.1/snapper/SnapperDefines.h 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/snapper/SnapperDefines.h 2021-06-22 02:00:00.000000000 +0200 @@ -30,12 +30,9 @@ #define SYSCONFIG_FILE CONF_DIR "/snapper" #define CONFIGS_DIR "/etc/snapper/configs" +#define CONFIG_TEMPLATE_DIR "/etc/snapper/config-templates" -#define ETC_CONFIG_TEMPLATE_DIR "/etc/snapper/config-templates" -#define USR_CONFIG_TEMPLATE_DIR "/usr/share/snapper/config-templates" - -#define ETC_FILTERS_DIR "/etc/snapper/filters" -#define USR_FILTERS_DIR "/usr/share/snapper/filters" +#define FILTERS_DIR "/etc/snapper/filters" #define DEV_DIR "/dev" #define DEV_MAPPER_DIR "/dev/mapper" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/snapper/SnapperTmpl.h new/snapper-0.9.0/snapper/SnapperTmpl.h --- old/snapper-0.9.1/snapper/SnapperTmpl.h 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/snapper/SnapperTmpl.h 2021-06-22 02:00:00.000000000 +0200 @@ -116,6 +116,10 @@ return find_if(l.begin(), l.end(), pred) != l.end(); } + + template <class T, unsigned int sz> + inline unsigned int lengthof(T (&)[sz]) { return sz; } + } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/snapper/XmlFile.h new/snapper-0.9.0/snapper/XmlFile.h --- old/snapper-0.9.1/snapper/XmlFile.h 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/snapper/XmlFile.h 2021-06-22 02:00:00.000000000 +0200 @@ -36,7 +36,6 @@ namespace snapper { using std::string; - using std::list; class XmlFile : private boost::noncopyable diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/snapper.spec.in new/snapper-0.9.0/snapper.spec.in --- old/snapper-0.9.1/snapper.spec.in 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/snapper.spec.in 2021-06-22 02:00:00.000000000 +0200 @@ -226,11 +226,10 @@ %{_libdir}/libsnapper.so.* %dir %{_sysconfdir}/snapper %dir %{_sysconfdir}/snapper/configs -%dir %{_datadir}/snapper -%dir %{_datadir}/snapper/config-templates -%{_datadir}/snapper/config-templates/default -%dir %{_datadir}/snapper/filters -%{_datadir}/snapper/filters/*.txt +%dir %{_sysconfdir}/snapper/config-templates +%config(noreplace) %{_sysconfdir}/snapper/config-templates/default +%dir %{_sysconfdir}/snapper/filters +%config(noreplace) %{_sysconfdir}/snapper/filters/*.txt %doc %dir %{_defaultdocdir}/snapper %doc %{_defaultdocdir}/snapper/AUTHORS %doc %{_defaultdocdir}/snapper/COPYING @@ -240,18 +239,6 @@ %config(noreplace) %{_sysconfdir}/sysconfig/snapper %endif -%pre -n libsnapper@LIBVERSION_MAJOR@ -# Migration from /etc/snapper to /usr/share/snapper -for i in config-templates/default filters/base.txt filters/lvm.txt filters/x11.txt ; do - test -f /etc/snapper/${i}.rpmsave && mv -v /etc/snapper/${i}.rpmsave /etc/snapper/${i}.rpmsave.old ||: -done - -%posttrans -n libsnapper@LIBVERSION_MAJOR@ -# Migration from /etc/snapper to /usr/share/snapper -for i in config-templates/default filters/base.txt filters/lvm.txt filters/x11.txt ; do - test -f /etc/snapper/${i}.rpmsave && mv -v /etc/snapper/${i}.rpmsave /etc/snapper/${i} ||: -done - %post -n libsnapper@LIBVERSION_MAJOR@ /sbin/ldconfig %if 0%{?suse_version} @@ -301,7 +288,7 @@ %files -n snapper-zypp-plugin %defattr(-,root,root) -%{_datadir}/snapper/zypp-plugin.conf +%config(noreplace) %{_sysconfdir}/snapper/zypp-plugin.conf %if 0%{?suse_version} < 1210 %dir /usr/lib/zypp %dir /usr/lib/zypp/plugins @@ -311,18 +298,6 @@ %doc %{_mandir}/*/snapper-zypp-plugin.8* %doc %{_mandir}/*/snapper-zypp-plugin.conf.5* -%pre -n snapper-zypp-plugin -# Migration from /etc/snapper to /usr/share/snapper -for i in zypp-plugin.conf ; do - test -f /etc/snapper/${i}.rpmsave && mv -v /etc/snapper/${i}.rpmsave /etc/snapper/${i}.rpmsave.old ||: -done - -%posttrans -n snapper-zypp-plugin -# Migration from /etc/snapper to /usr/share/snapper -for i in zypp-plugin.conf ; do - test -f /etc/snapper/${i}.rpmsave && mv -v /etc/snapper/${i}.rpmsave /etc/snapper/${i} ||: -done - %package -n pam_snapper Requires: pam Requires: snapper = %version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.9.1/zypp-plugin/snapper_zypp_plugin.cc new/snapper-0.9.0/zypp-plugin/snapper_zypp_plugin.cc --- old/snapper-0.9.1/zypp-plugin/snapper_zypp_plugin.cc 2021-11-10 01:00:00.000000000 +0100 +++ new/snapper-0.9.0/zypp-plugin/snapper_zypp_plugin.cc 2021-06-22 02:00:00.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) [2019-2021] SUSE LLC + * Copyright (c) [2019-2020] SUSE LLC * * All Rights Reserved. * @@ -68,29 +68,27 @@ } // Normally the only configuration this program needs is -// the zypp-plugin.conf file in /etc/snapper or /usr/share/snapper. +// the /etc/snapper/zypp-plugin.conf file. // But for testing we need more places to inject mocks. // This is done with SNAPPER_ZYPP_PLUGIN_* environment variables. // (Using argv is not useful since libzypp does not use it in the // plugin protocol.) -class ProgramOptions -{ - +class ProgramOptions { public: - string plugin_config; - string snapper_config = "root"; - DBusBusType bus = DBUS_BUS_SYSTEM; + string snapper_config; + DBusBusType bus; ProgramOptions() + : plugin_config("/etc/snapper/zypp-plugin.conf") + , snapper_config("root") + , bus(DBUS_BUS_SYSTEM) { const char* s; s = getenv("SNAPPER_ZYPP_PLUGIN_CONFIG"); if (s) plugin_config = s; - else - plugin_config = locate_file("zypp-plugin.conf", "/etc/snapper", "/usr/share/snapper"); s = getenv("SNAPPER_ZYPP_PLUGIN_SNAPPER_CONFIG"); if (s) @@ -100,7 +98,6 @@ if (s) bus = DBUS_BUS_SESSION; } - }; class SnapperZyppPlugin : public ZyppCommitPlugin { ++++++ snapper-Debian_10.0.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:10.909127151 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:10.909127151 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -9207fe474f5af47d0621faae026547e2 639804 snapper-0.9.1.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-Debian_9.0.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:10.941127044 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:10.941127044 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -9207fe474f5af47d0621faae026547e2 639804 snapper-0.9.1.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-Debian_Unstable.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:10.957126990 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:10.961126976 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -9207fe474f5af47d0621faae026547e2 639804 snapper-0.9.1.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-Raspbian_10.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:10.985126896 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:10.985126896 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any ++++++ snapper-xUbuntu_17.04.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:11.001126842 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:11.001126842 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -9207fe474f5af47d0621faae026547e2 639804 snapper-0.9.1.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_17.10.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:11.017126789 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:11.017126789 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -9207fe474f5af47d0621faae026547e2 639804 snapper-0.9.1.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_18.04.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:11.037126721 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:11.037126721 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -9207fe474f5af47d0621faae026547e2 639804 snapper-0.9.1.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_18.10.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:11.057126654 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:11.057126654 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -9207fe474f5af47d0621faae026547e2 639804 snapper-0.9.1.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_19.04.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:11.093126533 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:11.093126533 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -9207fe474f5af47d0621faae026547e2 639804 snapper-0.9.1.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_19.10.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:11.133126399 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:11.137126386 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -9207fe474f5af47d0621faae026547e2 639804 snapper-0.9.1.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_20.04.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:11.177126252 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:11.177126252 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -9207fe474f5af47d0621faae026547e2 639804 snapper-0.9.1.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_20.10.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:11.217126117 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:11.217126117 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -9207fe474f5af47d0621faae026547e2 639804 snapper-0.9.1.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2 ++++++ snapper-xUbuntu_21.04.dsc ++++++ --- /var/tmp/diff_new_pack.XqHlu2/_old 2021-11-22 23:08:11.237126050 +0100 +++ /var/tmp/diff_new_pack.XqHlu2/_new 2021-11-22 23:08:11.237126050 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: snapper -Version: 0.9.1-1 +Version: 0.9.0-1 Binary: snapper Maintainer: Arvin Schnell <aschn...@suse.com> Architecture: any @@ -11,4 +11,4 @@ # 423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz # Files: -9207fe474f5af47d0621faae026547e2 639804 snapper-0.9.1.tar.bz2 +2eef45af33426414604d8f03467c0e6c 638839 snapper-0.9.0.tar.bz2