summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-backup/snapper/files')
-rw-r--r--app-backup/snapper/files/snapper-0.10.1-testsuite.patch (renamed from app-backup/snapper/files/snapper-0.8.15-testsuite.patch)29
-rw-r--r--app-backup/snapper/files/snapper-0.11.0-cron-confd.patch18
-rw-r--r--app-backup/snapper/files/snapper-0.5.6-swap.patch36
-rw-r--r--app-backup/snapper/files/snapper.bash200
4 files changed, 33 insertions, 250 deletions
diff --git a/app-backup/snapper/files/snapper-0.8.15-testsuite.patch b/app-backup/snapper/files/snapper-0.10.1-testsuite.patch
index 237e0705c98d..84ff2ce1978a 100644
--- a/app-backup/snapper/files/snapper-0.8.15-testsuite.patch
+++ b/app-backup/snapper/files/snapper-0.10.1-testsuite.patch
@@ -1,10 +1,10 @@
diff --git a/configure.ac b/configure.ac
-index 839d012..ceac54d 100644
+index 39def82..9b96a32 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -86,6 +86,12 @@ AS_IF([test "x$with_conf" != xno], [SYSCONFIG="${with_conf}"])
-
- CPPFLAGS="${CPPFLAGS} -DCONF_DIR='\"${SYSCONFIG}\"'"
+@@ -174,6 +174,13 @@ if test "x$enable_coverage" = "xyes"; then
+ LDFLAGS="${LDFLAGS} --coverage"
+ fi
+AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests],[Disable internal tests support]),
+ [with_tests=$enableval],[with_tests=yes])
@@ -12,9 +12,10 @@ index 839d012..ceac54d 100644
+if test "x$with_tests" = "xyes"; then
+ AC_DEFINE(ENABLE_TESTS, 1, [Enable internal tests support])
+fi
-
- AC_ARG_ENABLE([btrfs], AC_HELP_STRING([--disable-btrfs],[Disable Btrfs internal snapshots support]),
- [with_btrfs=$enableval],[with_btrfs=yes])
++
+ PKG_CHECK_MODULES(DBUS, dbus-1)
+ PKG_CHECK_MODULES(XML2, libxml-2.0)
+ PKG_CHECK_MODULES(JSONC, json-c, [], [AC_MSG_WARN([Cannot find json-c. Please install libjson-c-devel])])
diff --git a/testsuite-cmp/Makefile.am b/testsuite-cmp/Makefile.am
index 81104bf..9c29477 100644
--- a/testsuite-cmp/Makefile.am
@@ -33,7 +34,7 @@ index 81104bf..9c29477 100644
+endif
diff --git a/testsuite-real/Makefile.am b/testsuite-real/Makefile.am
-index 717313a..527843d 100644
+index a3bb2e3..c4e88f4 100644
--- a/testsuite-real/Makefile.am
+++ b/testsuite-real/Makefile.am
@@ -2,6 +2,7 @@
@@ -41,16 +42,16 @@ index 717313a..527843d 100644
#
+if ENABLE_TESTS
- CXXFLAGS += -std=gnu++0x
+ CXXFLAGS += -std=gnu++11
AM_CPPFLAGS = -I$(top_srcdir)
-@@ -53,3 +54,4 @@ ug_tests_SOURCES = ug-tests.cc
+@@ -56,3 +57,4 @@ ascii_file_SOURCES = ascii-file.cc
EXTRA_DIST = $(test_DATA) $(test_SCRIPTS)
+endif
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
-index d7e30b8..72ef5ee 100644
+index ccb84d3..409e265 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -2,6 +2,7 @@
@@ -61,10 +62,10 @@ index d7e30b8..72ef5ee 100644
AM_CPPFLAGS = -I$(top_srcdir) $(DBUS_CFLAGS)
LDADD = ../snapper/libsnapper.la ../dbus/libdbus.la -lboost_unit_test_framework
-@@ -40,3 +41,4 @@ json_formatter_test_LDADD = -lboost_unit_test_framework ../client/utils/libutils
- getopts_test_LDADD = -lboost_unit_test_framework ../client/utils/libutils.la
+@@ -48,3 +49,4 @@ lvm_utils_test_LDADD = -lboost_unit_test_framework ../snapper/libsnapper.la
+ range_test_LDADD = -lboost_unit_test_framework ../client/utils/libutils.la
- lvm_utils_test_LDADD = -lboost_unit_test_framework ../snapper/libsnapper.la
+ limit_test_LDADD = -lboost_unit_test_framework ../client/utils/libutils.la
+endif
diff --git a/zypp-plugin/testsuite/Makefile.am b/zypp-plugin/testsuite/Makefile.am
index 7b52e13..71cb545 100644
diff --git a/app-backup/snapper/files/snapper-0.11.0-cron-confd.patch b/app-backup/snapper/files/snapper-0.11.0-cron-confd.patch
new file mode 100644
index 000000000000..c1fc5c692c71
--- /dev/null
+++ b/app-backup/snapper/files/snapper-0.11.0-cron-confd.patch
@@ -0,0 +1,18 @@
+diff --git a/scripts/snapper-hourly b/scripts/snapper-hourly
+index 36a41f5..f36d8ec 100755
+--- a/scripts/snapper-hourly
++++ b/scripts/snapper-hourly
+@@ -9,10 +9,10 @@ export PATH
+
+
+ #
+-# get information from /etc/sysconfig/snapper
++# get information from /etc/conf.d/snapper
+ #
+-if [ -f /etc/sysconfig/snapper ] ; then
+- . /etc/sysconfig/snapper
++if [ -f /etc/conf.d/snapper ] ; then
++ . /etc/conf.d/snapper
+ fi
+
+
diff --git a/app-backup/snapper/files/snapper-0.5.6-swap.patch b/app-backup/snapper/files/snapper-0.5.6-swap.patch
deleted file mode 100644
index aa24330d7304..000000000000
--- a/app-backup/snapper/files/snapper-0.5.6-swap.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-commit 22bc1d808ebb6c3958e8231a36b73cd45a7f2c30
-Author: Spencer Janssen <spencerjanssen@gmail.com>
-Date: Mon Dec 3 17:33:49 2018 -0600
-
- Work around btrfs v4.19
-
- Addresses #459
-
-diff --git a/snapper/Btrfs.cc b/snapper/Btrfs.cc
-index cb9f7b3..c05557b 100644
---- a/snapper/Btrfs.cc
-+++ b/snapper/Btrfs.cc
-@@ -41,6 +41,9 @@
- #include <btrfs/send.h>
- #include <btrfs/send-stream.h>
- #include <btrfs/send-utils.h>
-+#ifdef swap
-+#undef swap
-+#endif
- #include <boost/version.hpp>
- #include <boost/thread.hpp>
- #endif
-diff --git a/snapper/BtrfsUtils.cc b/snapper/BtrfsUtils.cc
-index bada3f8..9edc325 100644
---- a/snapper/BtrfsUtils.cc
-+++ b/snapper/BtrfsUtils.cc
-@@ -34,6 +34,9 @@
- #ifdef HAVE_LIBBTRFS
- #include <btrfs/ioctl.h>
- #include <btrfs/send-utils.h>
-+#ifdef swap
-+#undef swap
-+#endif
- #endif
- #include <algorithm>
- #include <functional>
diff --git a/app-backup/snapper/files/snapper.bash b/app-backup/snapper/files/snapper.bash
deleted file mode 100644
index e5ca4134342a..000000000000
--- a/app-backup/snapper/files/snapper.bash
+++ /dev/null
@@ -1,200 +0,0 @@
-_snapper()
-{
- local configdir="/etc/snapper/configs"
- local cur prev words cword
- _init_completion || return
-
- local GLOGAL_SNAPPER_OPTIONS='
- -q --quiet
- -v --verbose
- --utc
- --iso
- -t --table-style
- -c --config
- -r --root
- --no-dbus
- --version
- --help
- '
-
- # see if the user selected a command already
- local COMMANDS=(
- "list-configs" "create-config" "delete-config" "set-config"
- "list" "ls"
- "create" "modify" "delete" "remove" "rm"
- "mount" "umount"
- "status" "diff" "xadiff"
- "undochange" "rollback"
- "setup-quota"
- "cleanup")
-
- local command i
- for (( i=0; i < ${#words[@]}-1; i++ )); do
- if [[ ${COMMANDS[@]} =~ ${words[i]} ]]; then
- command=${words[i]}
- break
- fi
- done
-
- case $prev in
- --version|--help)
- return 0
- ;;
- esac
-
- # supported options per command
- if [[ "$cur" == -* ]]; then
- case $command in
- create-config)
- COMPREPLY=( $( compgen -W '--fstype -f
- --templete -t' -- "$cur" ) )
- return 0
- ;;
- list|ls)
- COMPREPLY=( $( compgen -W '--type -t
- --all-configs -a' -- "$cur" ) )
- return 0
- ;;
- create)
- COMPREPLY=( $( compgen -W '--type -t
- --pre-number
- --print-number -p
- --description -d
- --cleanup-algorithm -c
- --userdata -u
- --command' -- "$cur" ) )
- return 0
- ;;
- modify)
- COMPREPLY=( $( compgen -W '--description -d
- --cleanup-algorithm -c
- --userdata -u' -- "$cur" ) )
- return 0
- ;;
- delete|remove|rm)
- COMPREPLY=( $( compgen -W '--sync -s
- ' -- "$cur" ) )
- return 0
- ;;
- status)
- COMPREPLY=( $( compgen -W '--output -o
- ' -- "$cur" ) )
- return 0
- ;;
- diff)
- COMPREPLY=( $( compgen -W '--input -i
- --diff-cmd
- --extensions -x' -- "$cur" ) )
- return 0
- ;;
- undochange)
- COMPREPLY=( $( compgen -W '--input -i
- ' -- "$cur" ) )
- return 0
- ;;
- rollback)
- COMPREPLY=( $( compgen -W '--print-number -p
- --description -d
- --cleanup-algorithm -c
- --userdata -u' -- "$cur" ) )
- return 0
- ;;
- *)
- COMPREPLY=( $( compgen -W "$GLOGAL_SNAPPER_OPTIONS" -- "$cur" ) )
- return 0
- ;;
- esac
- fi
-
- # specific command arguments
- if [[ -n $command ]]; then
- case $command in
- create-config)
- case "$prev" in
- --fstype|-f)
- COMPREPLY=( $( compgen -W 'btrfs ext4 lvm(xfs) lvm(ext4)
- ' -- "$cur" ) )
- ;;
- esac
- return 0
- ;;
- list)
- case "$prev" in
- --type|-t)
- COMPREPLY=( $( compgen -W 'all single pre-post
- ' -- "$cur" ) )
- ;;
- esac
- return 0
- ;;
- create)
- case "$prev" in
- --type|-t)
- COMPREPLY=( $( compgen -W 'single pre post
- ' -- "$cur" ) )
- ;;
- --pre-number)
- COMPREPLY=( $( compgen -W '
- ' -- "$cur" ) )
- ;;
- --cleanup-algorithm|-c)
- COMPREPLY=( $( compgen -W 'empty-pre-post timeline number
- ' -- "$cur" ) )
- ;;
- esac
- return 0
- ;;
- modify)
- case "$prev" in
- --cleanup-algorithm|-c)
- COMPREPLY=( $( compgen -W 'empty-pre-post timeline number
- ' -- "$cur" ) )
- ;;
- esac
- return 0
- ;;
- status)
- case "$prev" in
- --output|-o)
- COMPREPLY=( $( compgen -f -- "$cur" ) )
- ;;
- esac
- return 0
- ;;
- cleanup)
- case "$prev" in
- empty-pre-post|timeline|number)
- ;;
- *)
- COMPREPLY=( $( compgen -W 'empty-pre-post timeline number
- ' -- "$cur" ) )
- ;;
- esac
- return 0
- ;;
- diff)
- return 0
- ;;
- undochange)
- return 0
- ;;
- rollback)
- case "$prev" in
- --cleanup-algorithm|-c)
- COMPREPLY=( $( compgen -W 'empty-pre-post timeline number
- ' -- "$cur" ) )
- ;;
- esac
- return 0
- ;;
- esac
- fi
-
- # no command yet, show what commands we have
- if [ "$command" = "" ]; then
- COMPREPLY=( $( compgen -W '${COMMANDS[@]} ${GLOGAL_SNAPPER_OPTIONS[@]}' -- "$cur" ) )
- fi
-
- return 0
-} &&
-complete -F _snapper snapper