*/
+#include "config.h"
+
#include <iostream>
#include <boost/algorithm/string.hpp>
#include <snapper/AppUtil.h>
+#ifdef ENABLE_BTRFS
#include <snapper/BtrfsUtils.h>
+#endif
#include <snapper/FileUtils.h>
#include "utils/HumanString.h"
{
vector<ProxySnapper*> affected_snappers;
+#ifdef ENABLE_BTRFS
+
try
{
Uuid uuid = BtrfsUtils::get_uuid(path);
// free space is available.
}
+#endif
+
if (global_options.verbose())
{
cout << "affected configs:";
AM_CONDITIONAL(ENABLE_ROLLBACK, [test "x$enable_rollback" = "xyes"])
if test "x$enable_rollback" = "xyes"; then
+ if test "x$with_btrfs" != "xyes"; then
+ AC_MSG_ERROR([rollback support needs btrfs support])
+ fi
+
AC_DEFINE(ENABLE_ROLLBACK, 1, [Enable rollback support])
- # libmount is needed for rollback feature
- AC_CHECK_HEADER(libmount/libmount.h,[],[AC_MSG_ERROR([Cannout find libmount headers. Please install libmount-devel])])
+
+ # libmount is needed for rollback feature
+ AC_CHECK_HEADER(libmount/libmount.h,[],[AC_MSG_ERROR([Cannout find libmount headers. Please install libmount-devel])])
fi
AC_ARG_ENABLE([btrfs-quota], AC_HELP_STRING([--disable-btrfs-quota],[Disable btrfs quota support]),
AM_CONDITIONAL(ENABLE_BTRFS_QUOTA, [test "x$enable_btrfs_quota" = "xyes"])
if test "x$enable_btrfs_quota" = "xyes"; then
+ if test "x$with_btrfs" != "xyes"; then
+ AC_MSG_ERROR([btrfs quota support needs btrfs support])
+ fi
+
AC_DEFINE(ENABLE_BTRFS_QUOTA, 1, [Enable btrfs quota support])
fi
+-------------------------------------------------------------------
+Thu Dec 03 10:12:04 CET 2020 - aschnell@suse.com
+
+- fixed compilation with --disable-btrfs (gh#openSUSE/snapper#505)
+
-------------------------------------------------------------------
Tue Nov 24 11:58:44 CET 2020 - aschnell@suse.com
#include "snapper/AsciiFile.h"
#include "snapper/Exception.h"
#include "snapper/Hooks.h"
+#ifdef ENABLE_BTRFS
#include "snapper/Btrfs.h"
#include "snapper/BtrfsUtils.h"
+#endif
#ifdef ENABLE_SELINUX
#include "snapper/Selinux.h"
#endif
FreeSpaceData
Snapper::queryFreeSpaceData() const
{
+#ifdef ENABLE_BTRFS
+
const Btrfs* btrfs = dynamic_cast<const Btrfs*>(getFilesystem());
if (!btrfs)
SN_THROW(FreeSpaceException("free space only supported with btrfs"));
SN_THROW(FreeSpaceException("impossible free space values"));
return free_space_data;
+
+#else
+
+ SN_THROW(QuotaException("not implemented"));
+ __builtin_unreachable();
+
+#endif
}
#include "snapper/AppUtil.h"
#include "snapper/XmlFile.h"
#include "snapper/Filesystem.h"
+#ifdef ENABLE_BTRFS
#include "snapper/Btrfs.h"
+#endif
#include "snapper/Enum.h"
#include "snapper/SnapperTmpl.h"
#include "snapper/SnapperDefines.h"
LDADD = ../snapper/libsnapper.la
-if HAVE_XATTRS
-TMP_XATST = xattrs1 xattrs2 xattrs3 xattrs4
-endif
-
testdir = $(libdir)/snapper/testsuite
test_DATA = CAUTION
test_SCRIPTS = run-all setup-and-run-all
test_PROGRAMS = simple1 permissions1 permissions2 permissions3 owner1 owner2 \
- owner3 directory1 missing-directory1 error1 error2 error4 \
- $(TMP_XATST) test-btrfsutils ug-tests
+ owner3 directory1 missing-directory1 error1 error2 error4 ug-tests
+
+if ENABLE_BTRFS
+test_PROGRAMS += test-btrfsutils
+endif
+
+if HAVE_XATTRS
+test_PROGRAMS += xattrs1 xattrs2 xattrs3 xattrs4
+endif
simple1_SOURCES = simple1.cc common.h common.cc
check_PROGRAMS = sysconfig-get1.test dirname1.test basename1.test \
equal-date.test dbus-escape.test cmp-lt.test humanstring.test \
table.test table-formatter.test csv-formatter.test json-formatter.test \
- getopts.test lvm-utils.test
+ getopts.test
if ENABLE_BTRFS_QUOTA
check_PROGRAMS += qgroup1.test
endif
+if ENABLE_LVM
+check_PROGRAMS += lvm-utils.test
+endif
+
TESTS = $(check_PROGRAMS)
AM_DEFAULT_SOURCE_EXT = .cc