Hello community, here is the log from the commit of package fsarchiver for openSUSE:Factory checked in at 2018-07-17 09:42:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fsarchiver (Old) and /work/SRC/openSUSE:Factory/.fsarchiver.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fsarchiver" Tue Jul 17 09:42:48 2018 rev:26 rq:623111 version:0.8.5 Changes: -------- --- /work/SRC/openSUSE:Factory/fsarchiver/fsarchiver.changes 2018-02-21 14:12:45.531407766 +0100 +++ /work/SRC/openSUSE:Factory/.fsarchiver.new/fsarchiver.changes 2018-07-17 09:43:53.356962000 +0200 @@ -1,0 +2,15 @@ +Mon Jul 16 10:50:25 UTC 2018 - [email protected] + +- Use pkgconfig style dependencies +- Drop not needed dependencies + +------------------------------------------------------------------- +Mon Jul 16 09:06:55 UTC 2018 - [email protected] + +- Update to 0.8.5: + * Improved support for extfs filesystems (Contribution from Marcos Mello) + * Fixed build issue with e2fsprogs < 1.41 (Contribution from Marcos Mello) + * Fixed build issue related to xattr.h (Contribution from Lars Wendler) +- Remove fsarchiver-attr.patch: upstreamed + +------------------------------------------------------------------- Old: ---- fsarchiver-0.8.4.tar.gz fsarchiver-attr.patch New: ---- fsarchiver-0.8.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fsarchiver.spec ++++++ --- /var/tmp/diff_new_pack.S9PdzN/_old 2018-07-17 09:43:53.796960388 +0200 +++ /var/tmp/diff_new_pack.S9PdzN/_new 2018-07-17 09:43:53.800960373 +0200 @@ -17,28 +17,27 @@ Name: fsarchiver -Version: 0.8.4 +Version: 0.8.5 Release: 0 Summary: Filesystem Archiver -License: GPL-2.0 +License: GPL-2.0-only Group: Productivity/Archiving/Backup -Url: http://www.fsarchiver.org +URL: http://www.fsarchiver.org Source0: https://github.com/fdupoux/fsarchiver/releases/download/%{version}/%{name}-%{version}.tar.gz Source1: HOWTO # PATCH-FIX-UPSTREAM Remove conflicting uses of reserved identifiers Patch0: fsarchiver-types.patch -Patch1: fsarchiver-attr.patch -BuildRequires: e2fsprogs-devel BuildRequires: libgcrypt-devel -BuildRequires: libtool -BuildRequires: libzstd-devel -BuildRequires: lzo-devel BuildRequires: pkgconfig +BuildRequires: pkgconfig(blkid) BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(ext2fs) BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(lzo2) +BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(zlib) -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description FSArchiver is a system tool that allows you to save the contents of @@ -53,11 +52,9 @@ %prep %setup -q %patch0 -p1 -%patch1 -p1 cp -p %{SOURCE1} . %build -autoreconf -fiv %configure make %{?_smp_mflags} V=1 @@ -65,8 +62,8 @@ %make_install %files -%defattr(-,root,root,-) -%doc ChangeLog COPYING HOWTO NEWS README THANKS internals/ +%license COPYING +%doc ChangeLog HOWTO NEWS README THANKS internals/ %{_sbindir}/%{name} %{_mandir}/man?/* ++++++ fsarchiver-0.8.4.tar.gz -> fsarchiver-0.8.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/ChangeLog new/fsarchiver-0.8.5/ChangeLog --- old/fsarchiver-0.8.4/ChangeLog 2018-02-19 11:34:29.000000000 +0100 +++ new/fsarchiver-0.8.5/ChangeLog 2018-07-10 22:17:25.000000000 +0200 @@ -1,5 +1,9 @@ fsarchiver: Filesystem Archiver for Linux [http://www.fsarchiver.org] ===================================================================== +* 0.8.5 (2018-07-10): + - Improved support for extfs filesystems (Contribution from Marcos Mello) + - Fixed build issue with e2fsprogs < 1.41 (Contribution from Marcos Mello) + - Fixed build issue related to xattr.h (Contribution from Lars Wendler) * 0.8.4 (2018-02-19): - Added support for zstd compression algorithm (New option "-Z") * 0.8.3 (2017-12-22): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/aclocal.m4 new/fsarchiver-0.8.5/aclocal.m4 --- old/fsarchiver-0.8.4/aclocal.m4 2018-02-19 11:38:45.000000000 +0100 +++ new/fsarchiver-0.8.5/aclocal.m4 2018-07-10 22:21:21.000000000 +0200 @@ -21,7 +21,7 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 12 (pkg-config-0.29.2) +# serial 11 (pkg-config-0.29.1) dnl Copyright © 2004 Scott James Remnant <[email protected]>. dnl Copyright © 2012-2015 Dan Nicholson <[email protected]> @@ -63,7 +63,7 @@ dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.2]) +[m4_define([PKG_MACROS_VERSION], [0.29.1]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ @@ -164,7 +164,7 @@ AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $2]) +AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) @@ -174,11 +174,11 @@ See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs @@ -195,7 +195,7 @@ _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full @@ -296,6 +296,74 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR +dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------ +dnl +dnl Prepare a "--with-" configure option using the lowercase +dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and +dnl PKG_CHECK_MODULES in a single macro. +AC_DEFUN([PKG_WITH_MODULES], +[ +m4_pushdef([with_arg], m4_tolower([$1])) + +m4_pushdef([description], + [m4_default([$5], [build with ]with_arg[ support])]) + +m4_pushdef([def_arg], [m4_default([$6], [auto])]) +m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) +m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) + +m4_case(def_arg, + [yes],[m4_pushdef([with_without], [--without-]with_arg)], + [m4_pushdef([with_without],[--with-]with_arg)]) + +AC_ARG_WITH(with_arg, + AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, + [AS_TR_SH([with_]with_arg)=def_arg]) + +AS_CASE([$AS_TR_SH([with_]with_arg)], + [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], + [auto],[PKG_CHECK_MODULES([$1],[$2], + [m4_n([def_action_if_found]) $3], + [m4_n([def_action_if_not_found]) $4])]) + +m4_popdef([with_arg]) +m4_popdef([description]) +m4_popdef([def_arg]) + +])dnl PKG_WITH_MODULES + +dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ----------------------------------------------- +dnl +dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES +dnl check._[VARIABLE-PREFIX] is exported as make variable. +AC_DEFUN([PKG_HAVE_WITH_MODULES], +[ +PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) + +AM_CONDITIONAL([HAVE_][$1], + [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) +])dnl PKG_HAVE_WITH_MODULES + +dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------------------ +dnl +dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after +dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make +dnl and preprocessor variable. +AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], +[ +PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) + +AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], + [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) +])dnl PKG_HAVE_DEFINE_WITH_MODULES + # Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/configure new/fsarchiver-0.8.5/configure --- old/fsarchiver-0.8.4/configure 2018-02-19 11:38:46.000000000 +0100 +++ new/fsarchiver-0.8.5/configure 2018-07-10 22:21:22.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for fsarchiver 0.8.4. +# Generated by GNU Autoconf 2.69 for fsarchiver 0.8.5. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='fsarchiver' PACKAGE_TARNAME='fsarchiver' -PACKAGE_VERSION='0.8.4' -PACKAGE_STRING='fsarchiver 0.8.4' +PACKAGE_VERSION='0.8.5' +PACKAGE_STRING='fsarchiver 0.8.5' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1316,7 +1316,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures fsarchiver 0.8.4 to adapt to many kinds of systems. +\`configure' configures fsarchiver 0.8.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1387,7 +1387,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of fsarchiver 0.8.4:";; + short | recursive ) echo "Configuration of fsarchiver 0.8.5:";; esac cat <<\_ACEOF @@ -1516,7 +1516,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -fsarchiver configure 0.8.4 +fsarchiver configure 0.8.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1881,7 +1881,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by fsarchiver $as_me 0.8.4, which was +It was created by fsarchiver $as_me 0.8.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2230,7 +2230,7 @@ -$as_echo "#define PACKAGE_RELDATE \"2018-02-19\"" >>confdefs.h +$as_echo "#define PACKAGE_RELDATE \"2018-07-10\"" >>confdefs.h $as_echo "#define PACKAGE_FILEFMT \"FsArCh_002\"" >>confdefs.h @@ -2242,7 +2242,7 @@ $as_echo "#define PACKAGE_VERSION_B 8" >>confdefs.h -$as_echo "#define PACKAGE_VERSION_C 4" >>confdefs.h +$as_echo "#define PACKAGE_VERSION_C 5" >>confdefs.h $as_echo "#define PACKAGE_VERSION_D 0" >>confdefs.h @@ -2873,7 +2873,7 @@ # Define the identity of the package. PACKAGE='fsarchiver' - VERSION='0.8.4' + VERSION='0.8.5' cat >>confdefs.h <<_ACEOF @@ -5736,8 +5736,8 @@ pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 -$as_echo_n "checking for liblzma... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZMA" >&5 +$as_echo_n "checking for LZMA... " >&6; } if test -n "$LZMA_CFLAGS"; then pkg_cv_LZMA_CFLAGS="$LZMA_CFLAGS" @@ -5777,7 +5777,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -5804,7 +5804,7 @@ and LZMA_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -6104,8 +6104,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ext2fs" >&5 -$as_echo_n "checking for ext2fs... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXT2FS" >&5 +$as_echo_n "checking for EXT2FS... " >&6; } if test -n "$EXT2FS_CFLAGS"; then pkg_cv_EXT2FS_CFLAGS="$EXT2FS_CFLAGS" @@ -6145,7 +6145,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -6172,7 +6172,7 @@ and EXT2FS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -6195,8 +6195,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err" >&5 -$as_echo_n "checking for com_err... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for COM_ERR" >&5 +$as_echo_n "checking for COM_ERR... " >&6; } if test -n "$COM_ERR_CFLAGS"; then pkg_cv_COM_ERR_CFLAGS="$COM_ERR_CFLAGS" @@ -6236,7 +6236,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -6263,7 +6263,7 @@ and COM_ERR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -6286,8 +6286,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for e2p" >&5 -$as_echo_n "checking for e2p... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for E2P" >&5 +$as_echo_n "checking for E2P... " >&6; } if test -n "$E2P_CFLAGS"; then pkg_cv_E2P_CFLAGS="$E2P_CFLAGS" @@ -6327,7 +6327,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -6354,7 +6354,7 @@ and E2P_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -6377,8 +6377,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for blkid" >&5 -$as_echo_n "checking for blkid... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BLKID" >&5 +$as_echo_n "checking for BLKID... " >&6; } if test -n "$BLKID_CFLAGS"; then pkg_cv_BLKID_CFLAGS="$BLKID_CFLAGS" @@ -6418,7 +6418,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -6445,7 +6445,7 @@ and BLKID_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -6468,8 +6468,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid" >&5 -$as_echo_n "checking for uuid... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UUID" >&5 +$as_echo_n "checking for UUID... " >&6; } if test -n "$UUID_CFLAGS"; then pkg_cv_UUID_CFLAGS="$UUID_CFLAGS" @@ -6509,7 +6509,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -6536,7 +6536,7 @@ and UUID_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -6558,11 +6558,11 @@ fi -ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default" -if test "x$ac_cv_header_attr_xattr_h" = xyes; then : +ac_fn_c_check_header_mongrel "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_xattr_h" = xyes; then : else - as_fn_error $? "attr/xattr.h not found. you may have to install a package called attr, libattr, libattr-devel" "$LINENO" 5 + as_fn_error $? "sys/xattr.h not found." "$LINENO" 5 fi @@ -7313,7 +7313,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by fsarchiver $as_me 0.8.4, which was +This file was extended by fsarchiver $as_me 0.8.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7379,7 +7379,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -fsarchiver config.status 0.8.4 +fsarchiver config.status 0.8.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/configure.ac new/fsarchiver-0.8.5/configure.ac --- old/fsarchiver-0.8.4/configure.ac 2018-02-19 11:37:37.000000000 +0100 +++ new/fsarchiver-0.8.5/configure.ac 2018-07-10 22:17:21.000000000 +0200 @@ -3,12 +3,12 @@ AC_PREREQ(2.59) -AC_INIT([fsarchiver], 0.8.4) -AC_DEFINE([PACKAGE_RELDATE], "2018-02-19", [Define the date of the release]) +AC_INIT([fsarchiver], 0.8.5) +AC_DEFINE([PACKAGE_RELDATE], "2018-07-10", [Define the date of the release]) AC_DEFINE([PACKAGE_FILEFMT], "FsArCh_002", [Define the version of the file format]) AC_DEFINE([PACKAGE_VERSION_A], 0, [Major version number]) AC_DEFINE([PACKAGE_VERSION_B], 8, [Medium version number]) -AC_DEFINE([PACKAGE_VERSION_C], 4, [Minor version number]) +AC_DEFINE([PACKAGE_VERSION_C], 5, [Minor version number]) AC_DEFINE([PACKAGE_VERSION_D], 0, [Patch version number]) AC_CANONICAL_HOST([]) @@ -114,7 +114,7 @@ PKG_CHECK_MODULES([UUID], [uuid]) dnl Check for header files installed with a library -AC_CHECK_HEADER([attr/xattr.h],, [AC_MSG_ERROR([attr/xattr.h not found. you may have to install a package called attr, libattr, libattr-devel])]) +AC_CHECK_HEADER([sys/xattr.h],, [AC_MSG_ERROR([sys/xattr.h not found.])]) dnl Check for standard header files. AC_CHECK_HEADERS([malloc.h unistd.h pthread.h]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/distrib/rpm/fsarchiver.spec new/fsarchiver-0.8.5/distrib/rpm/fsarchiver.spec --- old/fsarchiver-0.8.4/distrib/rpm/fsarchiver.spec 2018-02-19 11:31:33.000000000 +0100 +++ new/fsarchiver-0.8.5/distrib/rpm/fsarchiver.spec 2018-02-20 10:49:53.000000000 +0100 @@ -1,5 +1,5 @@ Name: fsarchiver -Version: 0.8.4 +Version: 0.8.5 Release: 1%{?dist} Summary: Safe and flexible file-system backup/deployment tool diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/src/fs_ext2.c new/fsarchiver-0.8.5/src/fs_ext2.c --- old/fsarchiver-0.8.4/src/fs_ext2.c 2018-02-19 11:32:37.000000000 +0100 +++ new/fsarchiver-0.8.5/src/fs_ext2.c 2018-04-25 07:45:25.000000000 +0200 @@ -51,7 +51,7 @@ }; // These are the features to be passed on the command line (cf "man ext4") -struct s_features mkfeatures[] = // cf e2fsprogs-1.42.3/lib/e2p/feature.c +struct s_features mkfeatures[] = // cf e2fsprogs-1.44.0/lib/e2p/feature.c { {"has_journal", FSA_EXT3_FEATURE_COMPAT_HAS_JOURNAL, E2P_FEATURE_COMPAT, EXTFSTYPE_EXT3, PROGVER(1,39,0)}, {"ext_attr", FSA_EXT2_FEATURE_COMPAT_EXT_ATTR, E2P_FEATURE_COMPAT, EXTFSTYPE_EXT2, PROGVER(1,40,5)}, @@ -66,6 +66,8 @@ {"mmp", FSA_EXT4_FEATURE_INCOMPAT_MMP, E2P_FEATURE_INCOMPAT, EXTFSTYPE_EXT4, PROGVER(1,42,0)}, {"64bit", FSA_EXT4_FEATURE_INCOMPAT_64BIT, E2P_FEATURE_INCOMPAT, EXTFSTYPE_EXT4, PROGVER(1,42,0)}, {"inline_data", FSA_EXT4_FEATURE_INCOMPAT_INLINEDATA, E2P_FEATURE_INCOMPAT, EXTFSTYPE_EXT4, PROGVER(1,43,0)}, + {"ea_inode", FSA_EXT4_FEATURE_INCOMPAT_EA_INODE, E2P_FEATURE_INCOMPAT, EXTFSTYPE_EXT4, PROGVER(1,44,0)}, + {"large_dir", FSA_EXT4_FEATURE_INCOMPAT_LARGEDIR, E2P_FEATURE_INCOMPAT, EXTFSTYPE_EXT4, PROGVER(1,44,0)}, {"large_file", FSA_EXT2_FEATURE_RO_COMPAT_LARGE_FILE, E2P_FEATURE_RO_INCOMPAT, EXTFSTYPE_EXT2, PROGVER(1,40,7)}, {"huge_file", FSA_EXT4_FEATURE_RO_COMPAT_HUGE_FILE, E2P_FEATURE_RO_INCOMPAT, EXTFSTYPE_EXT4, PROGVER(1,41,0)}, {"sparse_super", FSA_EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER, E2P_FEATURE_RO_INCOMPAT, EXTFSTYPE_EXT2, PROGVER(1,8,0)}, @@ -107,19 +109,19 @@ int extfs_get_fstype_from_compat_flags(u32 compat, u32 incompat, u32 ro_compat) { int fstype=EXTFSTYPE_EXT2; - + // distinguish between ext3 and ext2 if (compat & FSA_EXT3_FEATURE_COMPAT_HAS_JOURNAL) fstype=EXTFSTYPE_EXT3; - + // any features which ext2 doesn't understand if ((ro_compat & FSA_EXT2_FEATURE_RO_COMPAT_UNSUPPORTED) || (incompat & FSA_EXT2_FEATURE_INCOMPAT_UNSUPPORTED)) fstype=EXTFSTYPE_EXT3; - + // ext4 has at least one feature which ext3 doesn't understand if ((ro_compat & FSA_EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) || (incompat & FSA_EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) fstype=EXTFSTYPE_EXT4; - + return fstype; } @@ -128,17 +130,17 @@ // to preserve the filesystem attributes, fsa must know all the features including the COMPAT ones if (compat & ~FSA_FEATURE_COMPAT_SUPP) return -1; - + if (incompat & ~FSA_FEATURE_INCOMPAT_SUPP) return -1; - + if (ro_compat & ~FSA_FEATURE_RO_COMPAT_SUPP) return -1; - + // TODO: check journal features /*if (!(flags & EXT2_FLAG_JOURNAL_DEV_OK) && (fs->super->s_feature_incompat & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) goto check_support_for_features_error;*/ - + return 0; } @@ -151,12 +153,15 @@ char buffer[2048]; char command[2048]; char options[2048]; + char uuid[64]; + bool mke2fsuuid=false; char temp[1024]; char progname[64]; u64 e2fstoolsver; int compat_type; s64 devblkcount; u64 devblksize; + u64 devisize; s64 threshold64bit; s64 devsize; u64 temp64; @@ -165,11 +170,12 @@ int res; int i; - // init + // init memset(options, 0, sizeof(options)); + memset(uuid, 0, sizeof(uuid)); snprintf(progname, sizeof(progname), "mke2fs"); strlist_init(&strfeatures); - + // ---- check that mkfs is installed and get its version if (exec_command(command, sizeof(command), NULL, NULL, 0, NULL, 0, "%s -V", progname)!=0) { errprintf("%s not found. please install a recent e2fsprogs on your system or check the PATH.\n", progname); @@ -177,26 +183,27 @@ goto extfs_mkfs_cleanup; } e2fstoolsver=check_prog_version(progname); - + // ---- check what is the extfs block size to use if (dico_get_u64(d, 0, FSYSHEADKEY_FSEXTBLOCKSIZE, &devblksize)!=0) devblksize=4096; + // ---- check what is the extfs inode size to use + if (dico_get_u64(d, 0, FSYSHEADKEY_FSINODESIZE, &devisize)!=0) + devisize=256; + // ---- filesystem revision (good-old-rev or dynamic) if (dico_get_u64(d, 0, FSYSHEADKEY_FSEXTREVISION, &fsextrevision)!=0) fsextrevision=EXT2_DYNAMIC_REV; // don't fail (case of fs conversion to extfs) - + // "mke2fs -q" prevents problems in exec_command when too many output details printed strlcatf(options, sizeof(options), " -q "); - + // "mke2fs -F" removes confirmation prompt when device is a whole disk such as /dev/sda strlcatf(options, sizeof(options), " -F "); - // filesystem revision: good-old-rev or dynamic - strlcatf(options, sizeof(options), " -r %d ", (int)fsextrevision); - strlcatf(options, sizeof(options), " %s ", fsoptions); - + strlcatf(options, sizeof(options), " -b %ld ", (long)devblksize); // ---- set the advanced filesystem settings from the dico @@ -204,32 +211,45 @@ strlcatf(options, sizeof(options), " -L '%.16s' ", mkfslabel); else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 && strlen(buffer)>0) strlcatf(options, sizeof(options), " -L '%.16s' ", buffer); - - if (dico_get_u64(d, 0, FSYSHEADKEY_FSINODESIZE, &temp64)==0) - strlcatf(options, sizeof(options), " -I %ld ", (long)temp64); - + + // ---- determine which UUID must be set on this filesystem + if (strlen(mkfsuuid) > 0) + snprintf(uuid, sizeof(uuid), "%s", mkfsuuid); + else if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, sizeof(buffer))==0) + snprintf(uuid, sizeof(uuid), "%s", buffer); + + // ---- set UUID with mke2fs if supported + if (e2fstoolsver>=PROGVER(1,41,4) && strlen(uuid)==36) + { strlcatf(options, sizeof(options), " -U %s ", uuid); + mke2fsuuid=true; + } + // ---- get original filesystem features (if the original filesystem was an ext{2,3,4}) if (dico_get_u64(d, 0, FSYSHEADKEY_FSEXTFEATURECOMPAT, &features_tab[E2P_FEATURE_COMPAT])!=0 || dico_get_u64(d, 0, FSYSHEADKEY_FSEXTFEATUREINCOMPAT, &features_tab[E2P_FEATURE_INCOMPAT])!=0 || - dico_get_u64(d, 0, FSYSHEADKEY_FSEXTFEATUREROCOMPAT, &features_tab[E2P_FEATURE_RO_INCOMPAT])!=0) + dico_get_u64(d, 0, FSYSHEADKEY_FSEXTFEATUREROCOMPAT, &features_tab[E2P_FEATURE_RO_INCOMPAT])!=0 || + fsextrevision==EXT2_GOOD_OLD_REV) { // dont fail the original filesystem may not be ext{2,3,4}. in that case set defaults features - features_tab[E2P_FEATURE_COMPAT]=EXT2_FEATURE_COMPAT_RESIZE_INODE|EXT2_FEATURE_COMPAT_DIR_INDEX; + // ext2 revision 0 does not have features, set defaults too in case user wants to upgrade it + features_tab[E2P_FEATURE_COMPAT]=EXT2_FEATURE_COMPAT_RESIZE_INODE|\ + EXT2_FEATURE_COMPAT_DIR_INDEX|\ + EXT2_FEATURE_COMPAT_EXT_ATTR; features_tab[E2P_FEATURE_INCOMPAT]=EXT2_FEATURE_INCOMPAT_FILETYPE; features_tab[E2P_FEATURE_RO_INCOMPAT]=EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER; } - + // ---- check that fsarchiver is aware of all the filesystem features used on that filesystem if (extfs_check_compatibility(features_tab[E2P_FEATURE_COMPAT], features_tab[E2P_FEATURE_INCOMPAT], features_tab[E2P_FEATURE_RO_INCOMPAT])!=0) { errprintf("this filesystem has ext{2,3,4} features which are not supported by this fsarchiver version.\n"); ret=-1; goto extfs_mkfs_cleanup; } - + // ---- get original filesystem type origextfstype=extfs_get_fstype_from_compat_flags(features_tab[E2P_FEATURE_COMPAT], features_tab[E2P_FEATURE_INCOMPAT], features_tab[E2P_FEATURE_RO_INCOMPAT]); msgprintf(MSG_VERB2, "the filesystem type determined by the original filesystem features is [%s]\n", format_fstype(origextfstype)); - + // remove all the features not supported by the filesystem to create (conversion = downgrade fs) for (i=0; mkfeatures[i].name; i++) { @@ -248,8 +268,17 @@ features_tab[E2P_FEATURE_COMPAT]|=EXT3_FEATURE_COMPAT_HAS_JOURNAL; } if (origextfstype<EXTFSTYPE_EXT4 && extfstype>=EXTFSTYPE_EXT4) // upgrade ext{2,3} to ext4 - { fsextrevision=EXT2_DYNAMIC_REV; - features_tab[E2P_FEATURE_INCOMPAT]|=EXT3_FEATURE_INCOMPAT_EXTENTS; + { // ext4 default features from mke2fs 1.41: + // extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize + // recent mke2fs versions enable more features, but we are conservative here + fsextrevision=EXT2_DYNAMIC_REV; + devisize=256; + features_tab[E2P_FEATURE_INCOMPAT]|=EXT3_FEATURE_INCOMPAT_EXTENTS|\ + EXT4_FEATURE_INCOMPAT_FLEX_BG; + features_tab[E2P_FEATURE_RO_INCOMPAT]|=EXT4_FEATURE_RO_COMPAT_DIR_NLINK|\ + EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE|\ + EXT4_FEATURE_RO_COMPAT_GDT_CSUM|\ + EXT4_FEATURE_RO_COMPAT_HUGE_FILE; } // get size of the target device @@ -308,14 +337,20 @@ } } } - + + // inode size + strlcatf(options, sizeof(options), " -I %ld ", (long)devisize); + + // filesystem revision: good-old-rev or dynamic + strlcatf(options, sizeof(options), " -r %d ", (int)fsextrevision); + // if extfs revision is dynamic and there are features in the list if (fsextrevision!=EXT2_GOOD_OLD_REV && strlist_count(&strfeatures)>0) { strlist_merge(&strfeatures, temp, sizeof(temp), ','); strlcatf(options, sizeof(options), " -O %s ", temp); msgprintf(MSG_VERB2, "features: mkfs_options+=[-O %s]\n", temp); } - + // ---- check mke2fs version requirement msgprintf(MSG_VERB2, "mke2fs version detected: %s\n", format_prog_version(e2fstoolsver, temp, sizeof(temp))); msgprintf(MSG_VERB2, "mke2fs version required: %s\n", format_prog_version(e2fsprogs_minver[extfstype], temp, sizeof(temp))); @@ -325,13 +360,13 @@ ret=-1; goto extfs_mkfs_cleanup; } - + // ---- extended options if (dico_get_u64(d, 0, FSYSHEADKEY_FSEXTEOPTRAIDSTRIDE, &temp64)==0) strlcatf(options, sizeof(options), " -E stride=%ld ", (long)temp64); if ((dico_get_u64(d, 0, FSYSHEADKEY_FSEXTEOPTRAIDSTRIPEWIDTH, &temp64)==0) && e2fstoolsver>=PROGVER(1,40,7)) strlcatf(options, sizeof(options), " -E stripe-width=%ld ", (long)temp64); - + // ---- execute mke2fs msgprintf(MSG_VERB2, "exec: %s\n", command); if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "%s %s %s", progname, partition, options)!=0 || exitst!=0) @@ -339,23 +374,22 @@ ret=-1; goto extfs_mkfs_cleanup; } - + // ---- use tune2fs to set the other advanced options memset(options, 0, sizeof(options)); - if (strlen(mkfsuuid) > 0) - strlcatf(options, sizeof(options), " -U %s ", mkfsuuid); - else if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, sizeof(buffer))==0 && strlen(buffer)==36) - strlcatf(options, sizeof(options), " -U %s ", buffer); - + + if (!mke2fsuuid && strlen(uuid)==36) + strlcatf(options, sizeof(options), " -U %s ", uuid); + if (dico_get_string(d, 0, FSYSHEADKEY_FSEXTDEFMNTOPT, buffer, sizeof(buffer))==0 && strlen(buffer)>0) strlcatf(options, sizeof(options), " -o %s ", buffer); - + if (dico_get_u64(d, 0, FSYSHEADKEY_FSEXTFSCKMAXMNTCOUNT, &temp64)==0) strlcatf(options, sizeof(options), " -c %ld ", (long)temp64); - + if (dico_get_u64(d, 0, FSYSHEADKEY_FSEXTFSCKCHECKINTERVAL, &temp64)==0) strlcatf(options, sizeof(options), " -i %ldd ", (long)(temp64/86400L)); - + if (options[0]) { if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "tune2fs %s %s", partition, options)!=0 || exitst!=0) @@ -363,10 +397,11 @@ ret=-1; goto extfs_mkfs_cleanup; } - - // run e2fsck to workaround an tune2fs bug in e2fsprogs < 1.41.4 on ext4 + + // if UUID was not set by mke2fs, we have e2fsprogs < 1.41.4 + // tune2fs will mess up ext4 filesystem when changing its UUID // http://marc.info/?l=linux-ext4&m=123246035924487&w=2 - if (extfstype==EXTFSTYPE_EXT4 && e2fstoolsver<PROGVER(1,41,4)) + if (extfstype==EXTFSTYPE_EXT4 && !mke2fsuuid) { if ( ((res=exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "e2fsck -fy %s", partition))!=0) || ((exitst!=0) && (exitst!=1)) ) { errprintf("command [%s] failed with return status=%d\n", command, exitst); @@ -375,7 +410,7 @@ } } } - + extfs_mkfs_cleanup: strlist_destroy(&strfeatures); return ret; @@ -394,14 +429,14 @@ u32 mask, m; int count; int i; - + // ---- open partition if (ext2fs_open(devname, EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SOFTSUPP_FEATURES, use_superblock, use_blocksize, unix_io_manager, &fs)!=0) { errprintf("ext2fs_open(%s) failed\n", devname); return -1; } super=(struct fsa_ext2_sb *)fs->super; - + // --- label memset(label, 0, sizeof(label)); if (super->s_volume_name[0]) @@ -409,7 +444,7 @@ strncpy(label, super->s_volume_name, sizeof(super->s_volume_name)); } dico_add_string(d, 0, FSYSHEADKEY_FSLABEL, label); - + // ---- uuid /*if ((str=e2p_uuid2str(super->s_uuid))!=NULL) dico_add_string(d, 0, FSYSHEADKEY_FSUUID, str);*/ @@ -417,19 +452,19 @@ uuid_unparse_lower((u8*)super->s_uuid, uuid); dico_add_string(d, 0, FSYSHEADKEY_FSUUID, uuid); msgprintf(MSG_DEBUG1, "extfs_uuid=[%s]\n", uuid); - + // ---- block size dico_add_u64(d, 0, FSYSHEADKEY_FSEXTBLOCKSIZE, EXT2_BLOCK_SIZE(super)); - + // ---- filesystem revision (good-old-rev or dynamic) dico_add_u64(d, 0, FSYSHEADKEY_FSEXTREVISION, super->s_rev_level); - + // ---- inode size if (super->s_rev_level >= EXT2_DYNAMIC_REV) dico_add_u64(d, 0, FSYSHEADKEY_FSINODESIZE, super->s_inode_size); else dico_add_u64(d, 0, FSYSHEADKEY_FSINODESIZE, EXT2_GOOD_OLD_INODE_SIZE); // Good old rev - + // ---- extended options if (super->s_raid_stride > 0) { dico_add_u64(d, 0, FSYSHEADKEY_FSEXTEOPTRAIDSTRIDE, super->s_raid_stride); @@ -439,13 +474,13 @@ { dico_add_u64(d, 0, FSYSHEADKEY_FSEXTEOPTRAIDSTRIPEWIDTH, super->s_raid_stripe_width); msgprintf(MSG_DEBUG1, "extfs_raid_stripe_width: %u\n", super->s_raid_stripe_width); } - + // ---- fsck details: max_mount_count and check_interval dico_add_u64(d, 0, FSYSHEADKEY_FSEXTFSCKMAXMNTCOUNT, max(super->s_max_mnt_count,0)); dico_add_u64(d, 0, FSYSHEADKEY_FSEXTFSCKCHECKINTERVAL, super->s_checkinterval); msgprintf(MSG_DEBUG1, "extfs_max_mount_count: %ld\n", (long)max(super->s_max_mnt_count,0)); msgprintf(MSG_DEBUG1, "extfs_check_interval: %ld\n", (long)super->s_checkinterval); - + // ---- default mount options memset(mntopt, 0, sizeof(mntopt)); count=0; @@ -466,26 +501,26 @@ } dico_add_string(d, 0, FSYSHEADKEY_FSEXTDEFMNTOPT, mntopt); msgprintf(MSG_DEBUG1, "default mount options: [%s]\n", mntopt); - + // ---- filesystem features dico_add_u64(d, 0, FSYSHEADKEY_FSEXTFEATURECOMPAT, (u64)super->s_feature_compat); dico_add_u64(d, 0, FSYSHEADKEY_FSEXTFEATUREINCOMPAT, (u64)super->s_feature_incompat); dico_add_u64(d, 0, FSYSHEADKEY_FSEXTFEATUREROCOMPAT, (u64)super->s_feature_ro_compat); - + origextfstype=extfs_get_fstype_from_compat_flags((u64)super->s_feature_compat, (u64)super->s_feature_incompat, (u64)super->s_feature_ro_compat); msgprintf(MSG_DEBUG1, "the filesystem type determined by the features is [%s]\n", format_fstype(origextfstype)); - + // ---- check that fsarchiver is aware of all the filesystem features used on that filesystem if (extfs_check_compatibility((u64)super->s_feature_compat, (u64)super->s_feature_incompat, (u64)super->s_feature_ro_compat)!=0) { errprintf("this filesystem has ext{2,3,4} features which are not supported by this fsarchiver version.\n"); return -1; } - + // ---- minimum fsarchiver version required to restore dico_add_u64(d, 0, FSYSHEADKEY_MINFSAVERSION, FSA_VERSION_BUILD(0, 6, 4, 0)); - + ext2fs_close(fs); - + return 0; } @@ -496,26 +531,26 @@ ext2_filsys fs; int origextfstype; char fsname[32]; - + msgprintf(MSG_DEBUG1, "extfs_mount(partition=[%s], mnt=[%s], fsbuf=[%s])\n", partition, mntbuf, fsbuf); - + if (ext2fs_open(partition, EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SOFTSUPP_FEATURES, use_superblock, use_blocksize, unix_io_manager, &fs)!=0) { msgprintf(MSG_DEBUG1, "ext2fs_open(%s) failed\n", partition); return -1; } - + origextfstype=extfs_get_fstype_from_compat_flags((u64)fs->super->s_feature_compat, (u64)fs->super->s_feature_incompat, (u64)fs->super->s_feature_ro_compat); snprintf(fsname, sizeof(fsname), "%s", format_fstype(origextfstype)); msgprintf(MSG_VERB2, "the filesystem of [%s] type determined by the features is [%s]\n", partition, fsname); - + ext2fs_close(fs); - + if (strcmp(fsname, fsbuf)!=0) { msgprintf(MSG_DEBUG1, "extfs_mount: the filesystem requested [%s] does not match the filesystem detected [%s]\n", fsbuf, fsname); return -1; } - + return generic_mount(partition, mntbuf, fsbuf, "user_xattr,acl", flags); } @@ -530,16 +565,16 @@ int use_blocksize=0; int extfstypedetected; ext2_filsys fs; - + if (ext2fs_open(partition, EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SOFTSUPP_FEATURES, use_superblock, use_blocksize, unix_io_manager, &fs)!=0) return false; - + extfstypedetected=extfs_get_fstype_from_compat_flags((u64)fs->super->s_feature_compat, (u64)fs->super->s_feature_incompat, (u64)fs->super->s_feature_ro_compat); msgprintf(MSG_DEBUG1, "the filesystem type determined by the extfs features is [%s]\n", format_fstype(extfstypedetected)); - + ext2fs_close(fs); - + // if detected is what is tested, say yes return (extfstypedetected==extfstype); } @@ -563,10 +598,10 @@ { if (!reqopt || !badopt) return -1; - + strlist_add(badopt, "nouser_xattr"); strlist_add(badopt, "noacl"); - + return 0; } @@ -581,16 +616,16 @@ char *result; int foundversion; int x, y, z; - + // init memset(options, 0, sizeof(options)); memset(stderrbuf, 0, sizeof(stderrbuf)); - + if (exec_command(command, sizeof(command), NULL, NULL, 0, stderrbuf, sizeof(stderrbuf), "%s -V", prog)!=0) { errprintf("program %s was not found or has bad permissions.\n", prog); return -1; } - + foundversion=false; result=strtok_r(stderrbuf, delims, &saveptr); while (result != NULL && foundversion==false) @@ -599,19 +634,19 @@ else result = strtok_r(NULL, delims, &saveptr); } - + if (foundversion==false) { errprintf("can't parse %s version number: no match\n", prog); return 0; } - + x=y=z=0; sscanf(result, "%1023s %d.%d.%d", temp1, &x, &y, &z); - + if (x==0 && y==0) { errprintf("can't parse %s version number: x=y=0\n", prog); return 0; } - + return PROGVER(x,y,z); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/src/fs_ext2.h new/fsarchiver-0.8.5/src/fs_ext2.h --- old/fsarchiver-0.8.4/src/fs_ext2.h 2018-02-19 11:32:37.000000000 +0100 +++ new/fsarchiver-0.8.5/src/fs_ext2.h 2018-07-10 22:11:34.000000000 +0200 @@ -135,10 +135,25 @@ // FSA_FEATURE_INCOMPAT_SUPP does not include FSA_EXT4_FEATURE_INCOMPAT_ENCRYPT // as it would require special handling to mount an encrypted filesystem -// EXT2_FLAG_SOFTSUPP_FEATURES not defined on old e2fsprogs versions +// old e2fsprogs compatibility glue #ifndef EXT2_FLAG_SOFTSUPP_FEATURES #define EXT2_FLAG_SOFTSUPP_FEATURES 0x8000 -#endif +#endif +#ifndef EXT4_FEATURE_INCOMPAT_FLEX_BG +#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200 +#endif +#ifndef EXT4_FEATURE_RO_COMPAT_HUGE_FILE +#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE 0x0008 +#endif +#ifndef EXT4_FEATURE_RO_COMPAT_GDT_CSUM +#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 +#endif +#ifndef EXT4_FEATURE_RO_COMPAT_DIR_NLINK +#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 +#endif +#ifndef EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE +#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040 +#endif // this struct is incomplete in e2fsprogs-1.39.x/ext2fs.h struct fsa_ext2_sb diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/src/fs_jfs.c new/fsarchiver-0.8.5/src/fs_jfs.c --- old/fsarchiver-0.8.4/src/fs_jfs.c 2018-02-19 11:32:37.000000000 +0100 +++ new/fsarchiver-0.8.5/src/fs_jfs.c 2018-04-02 16:39:56.000000000 +0200 @@ -42,13 +42,13 @@ char buffer[2048]; char options[2048]; int exitst; - - // ---- check mkfs.reiser4 is available - if (exec_command(command, sizeof(command), NULL, NULL, 0, NULL, 0, "mkfs.jfs -V")!=0) - { errprintf("mkfs.jfs not found. please install jfsutils on your system or check the PATH.\n"); + + // ---- check if jfs_mkfs is available + if (exec_command(command, sizeof(command), NULL, NULL, 0, NULL, 0, "jfs_mkfs -V")!=0) + { errprintf("jfs_mkfs not found. please install jfsutils on your system or check the PATH.\n"); return -1; } - + // ---- set the advanced filesystem settings from the dico memset(options, 0, sizeof(options)); @@ -58,19 +58,19 @@ strlcatf(options, sizeof(options), " -L '%s' ", mkfslabel); else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 && strlen(buffer)>0) strlcatf(options, sizeof(options), " -L '%s' ", buffer); - - if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "mkfs.jfs -q %s %s", options, partition)!=0 || exitst!=0) + + if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "jfs_mkfs -q %s %s", options, partition)!=0 || exitst!=0) { errprintf("command [%s] failed\n", command); return -1; } - + // ---- use jfs_tune to set the other advanced options memset(options, 0, sizeof(options)); if (strlen(mkfsuuid) > 0) strlcatf(options, sizeof(options), " -U %s ", mkfsuuid); else if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, sizeof(buffer))==0 && strlen(buffer)==36) strlcatf(options, sizeof(options), " -U %s ", buffer); - + if (options[0]) { if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, "jfs_tune %s %s", partition, options)!=0 || exitst!=0) @@ -78,7 +78,7 @@ return -1; } } - + return 0; } @@ -88,36 +88,36 @@ char uuid[512]; int ret=0; int fd; - + if ((fd=open64(devname, O_RDONLY|O_LARGEFILE))<0) { ret=-1; errprintf("cannot open(%s, O_RDONLY)\n", devname); goto jfs_getinfo_return; } - + if (lseek(fd, JFS_SUPER1_OFF, SEEK_SET)!=JFS_SUPER1_OFF) { ret=-2; errprintf("cannot lseek(fd, JFS_SUPER1_OFF, SEEK_SET) on %s\n", devname); goto jfs_getinfo_close; } - + if (read(fd, &sb, sizeof(sb))!=sizeof(sb)) { ret=-3; errprintf("cannot read the jfs superblock on [%s]\n", devname); goto jfs_getinfo_close; } - + if (strncmp(sb.s_magic, JFS_MAGIC, strlen(JFS_MAGIC)) != 0) { ret=-4; errprintf("magic different from expectations superblock on %s: magic=[%s], expected=[%s]\n", devname, sb.s_magic, JFS_MAGIC); goto jfs_getinfo_close; } msgprintf(MSG_DEBUG1, "jfs_magic=[%s]\n", sb.s_magic); - + // ---- label msgprintf(MSG_DEBUG1, "jfs_label=[%s]\n", sb.s_label); dico_add_string(d, 0, FSYSHEADKEY_FSLABEL, (char*)sb.s_label); - + // ---- uuid /*if ((str=e2p_uuid2str(sb.s_uuid))!=NULL) dico_add_string(d, 0, FSYSHEADKEY_FSUUID, str);*/ @@ -125,10 +125,10 @@ uuid_unparse_lower((u8*)sb.s_uuid, uuid); dico_add_string(d, 0, FSYSHEADKEY_FSUUID, uuid); msgprintf(MSG_DEBUG1, "jfs_uuid=[%s]\n", uuid); - + // ---- minimum fsarchiver version required to restore dico_add_u64(d, 0, FSYSHEADKEY_MINFSAVERSION, FSA_VERSION_BUILD(0, 6, 4, 0)); - + jfs_getinfo_close: close(fd); jfs_getinfo_return: @@ -149,25 +149,25 @@ { struct jfs_superblock sb; int fd; - + if ((fd=open64(devname, O_RDONLY|O_LARGEFILE))<0) return false; - + if (lseek(fd, JFS_SUPER1_OFF, SEEK_SET)!=JFS_SUPER1_OFF) { close(fd); return false; } - + if (read(fd, &sb, sizeof(sb))!=sizeof(sb)) { close(fd); return false; } - + if (strncmp(sb.s_magic, JFS_MAGIC, strlen(JFS_MAGIC)) != 0) { close(fd); return false; } - + close(fd); return true; } @@ -176,6 +176,6 @@ { if (!reqopt || !badopt) return -1; - + return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/src/fs_xfs.c new/fsarchiver-0.8.5/src/fs_xfs.c --- old/fsarchiver-0.8.4/src/fs_xfs.c 2018-02-19 11:32:37.000000000 +0100 +++ new/fsarchiver-0.8.5/src/fs_xfs.c 2018-06-15 22:24:33.000000000 +0200 @@ -231,6 +231,7 @@ // Determine if the "sparse" mkfs option should be enabled (sparse inode allocation) // - starting with linux-4.2 XFS can allocate discontinuous inode chunks // - this feature relies on the new v5 on-disk format but it is optional + // - this feature is enabled by default when using xfsprogs 4.16.0 or later // - this feature will be enabled if the original filesystem was XFSv5 and had it // - this feature is supported since mkfs.xfs 4.2.0, but unfortunately // mkfs.xfs 4.5.0 in RHEL 7.3 carries a custom patch removing the option, @@ -246,7 +247,7 @@ { errprintf("command [%s] failed\n", command); return -1; } - + // ---- use xfs_admin to set the UUID if not already done with mkfs.xfs if (xadmopts[0]) { @@ -255,8 +256,8 @@ return -1; } } - - return 0; + + return 0; } int xfs_getinfo(cdico *d, char *devname) @@ -278,13 +279,13 @@ { ret=-1; goto xfs_read_sb_return; } - + res=read(fd, &sb, sizeof(sb)); if (res!=sizeof(sb)) { ret=-1; goto xfs_read_sb_close; } - + // ---- check it's an XFS file system if (be32_to_cpu(sb.sb_magicnum) != XFS_SB_MAGIC) { ret=-1; @@ -311,7 +312,7 @@ // ---- label msgprintf(MSG_DEBUG1, "xfs_label=[%s]\n", sb.sb_fname); dico_add_string(d, 0, FSYSHEADKEY_FSLABEL, (char*)sb.sb_fname); - + // ---- uuid /*if ((str=e2p_uuid2str(&sb.sb_uuid))!=NULL) dico_add_string(d, 0, FSYSHEADKEY_FSUUID, str);*/ @@ -319,7 +320,7 @@ uuid_unparse_lower((u8*)&sb.sb_uuid, uuid); dico_add_string(d, 0, FSYSHEADKEY_FSUUID, uuid); msgprintf(MSG_DEBUG1, "xfs_uuid=[%s]\n", uuid); - + // ---- block size temp32=be32_to_cpu(sb.sb_blocksize); if ((temp32%512!=0) || (temp32<512) || (temp32>65536)) @@ -351,7 +352,7 @@ // ---- minimum fsarchiver version required to restore dico_add_u64(d, 0, FSYSHEADKEY_MINFSAVERSION, FSA_VERSION_BUILD(0, 6, 20, 0)); - + xfs_read_sb_close: close(fd); xfs_read_sb_return: @@ -372,27 +373,27 @@ { struct xfs_sb sb; int fd; - + if ((fd=open64(devname, O_RDONLY|O_LARGEFILE))<0) { msgprintf(MSG_DEBUG1, "open64(%s) failed\n", devname); return false; } - + memset(&sb, 0, sizeof(sb)); if (read(fd, &sb, sizeof(sb))!=sizeof(sb)) { close(fd); msgprintf(MSG_DEBUG1, "read failed\n"); return false; } - + // ---- check it's an XFS file system if (be32_to_cpu(sb.sb_magicnum) != XFS_SB_MAGIC) { close(fd); msgprintf(MSG_DEBUG1, "(be32_to_cpu(sb.sb_magicnum)=%.8x) != (XFS_SB_MAGIC=%.8x)\n", be32_to_cpu(sb.sb_magicnum), XFS_SB_MAGIC); return false; } - + close(fd); return true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/src/oper_restore.c new/fsarchiver-0.8.5/src/oper_restore.c --- old/fsarchiver-0.8.4/src/oper_restore.c 2018-02-19 11:32:37.000000000 +0100 +++ new/fsarchiver-0.8.5/src/oper_restore.c 2018-02-20 10:49:39.000000000 +0100 @@ -24,7 +24,8 @@ #include <assert.h> #include <string.h> #include <stdlib.h> -#include <attr/xattr.h> +#include <sys/xattr.h> +#include <errno.h> #include <sys/time.h> #include <sys/stat.h> #include <gcrypt.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/src/oper_save.c new/fsarchiver-0.8.5/src/oper_save.c --- old/fsarchiver-0.8.4/src/oper_save.c 2018-02-19 11:32:37.000000000 +0100 +++ new/fsarchiver-0.8.5/src/oper_save.c 2018-02-20 10:49:39.000000000 +0100 @@ -29,7 +29,8 @@ #include <sys/param.h> #include <sys/statvfs.h> #include <sys/stat.h> -#include <attr/xattr.h> +#include <sys/xattr.h> +#include <errno.h> #include <zlib.h> #include <assert.h> #include <gcrypt.h> @@ -59,6 +60,10 @@ #include "error.h" #include "queue.h" +#ifndef ENOATTR +#define ENOATTR ENODATA +#endif + typedef struct s_savear { carchwriter ai; cregmulti regmulti; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/website/content/_index.md new/fsarchiver-0.8.5/website/content/_index.md --- old/fsarchiver-0.8.4/website/content/_index.md 2017-08-22 22:20:32.000000000 +0200 +++ new/fsarchiver-0.8.5/website/content/_index.md 2018-07-10 22:20:05.000000000 +0200 @@ -6,45 +6,45 @@ +++ ## About FSArchiver -FSArchiver is a system tool that allows you to **save the contents of a -file-system to a compressed archive file**. The file-system can be restored on -a partition which has a different size and it can be restored on a different -file-system. Unlike tar/dar, **FSArchiver also creates the file-system when it -extracts the data** to partitions. Everything is **checksummed** in the -archive in order to protect the data. If the archive is corrupt, you just loose -the current file, not the whole archive. Fsarchiver is released under the +FSArchiver is a system tool that allows you to **save the contents of a +file-system to a compressed archive file**. The file-system can be restored on +a partition which has a different size and it can be restored on a different +file-system. Unlike tar/dar, **FSArchiver also creates the file-system when it +extracts the data** to partitions. Everything is **checksummed** in the +archive in order to protect the data. If the archive is corrupt, you just loose +the current file, not the whole archive. Fsarchiver is released under the GPL-v2 license. You should read the [Quick start guide](/quickstart/) if you are using FSArchiver for the first time ## Detailed description -The purpose of this project is to provide a **safe and flexible file-system -backup/deployment tool**. Other open-source file-systems tools such as partimage -already exist. These tools are working at the filesystem blocks level, so it is -not possible to restore the backup to a smaller partition, and restoring to a -bigger partition forces you to resize the filesystem by hand. To have more +The purpose of this project is to provide a **safe and flexible file-system +backup/deployment tool**. Other open-source file-systems tools such as partimage +already exist. These tools are working at the filesystem blocks level, so it is +not possible to restore the backup to a smaller partition, and restoring to a +bigger partition forces you to resize the filesystem by hand. To have more details about it, read [comparison with partimage](/partimage/) -The purpose is to have a **very flexible** program. FSArchiver can extract an -archive to a partition which is *smaller that the original one* as long as -there is enough space to store the data. It can also **restore the data on a -different file-system**, so it can use it when you want to **convert your +The purpose is to have a **very flexible** program. FSArchiver can extract an +archive to a partition which is *smaller that the original one* as long as +there is enough space to store the data. It can also **restore the data on a +different file-system**, so it can use it when you want to **convert your file-system**: you can backup an ext3 file-system, and restore it as a reiserfs. -FSArchiver is working at the file level. It can make an archive of filesystems -(ext4, ext3, xfs, btrfs, reiserfs, ntfs, ...) that the running kernel can mount -with a read-write support. It will **preserve all the standard file attributes** -(permissions, timestamps, symbolic-links, hard-links, -extended-attributes, ...), as long as the kernel has support for it enabled. -It allows to preserve all the windows file attributes (ACL, standard -attributes, ...). It can be used with LVM snapshots in order to +FSArchiver is working at the file level. It can make an archive of filesystems +(ext4, ext3, xfs, btrfs, reiserfs, ntfs, ...) that the running kernel can mount +with a read-write support. It will **preserve all the standard file attributes** +(permissions, timestamps, symbolic-links, hard-links, +extended-attributes, ...), as long as the kernel has support for it enabled. +It allows to preserve all the windows file attributes (ACL, standard +attributes, ...). It can be used with LVM snapshots in order to [make consistent backups of all filesystems](http://www.system-rescue-cd.org/lvm-guide-en/Making-consistent-backups-with-LVM/) including the root filesystem. -FSArchiver has been **packaged by most popular Linux distributions** (Fedora, -Debian, Ubuntu, OpenSUSE, ArchLinux, Gentoo) hence it can be installed very -easily from the standard package repositories using the standard yum / apt-get -/ emerge / pacman commands. It can also be used from SystemRescueCd, as it -comes with all run-time dependencies, so that you can restore your system and +FSArchiver has been **packaged by most popular Linux distributions** (Fedora, +Debian, Ubuntu, OpenSUSE, ArchLinux, Gentoo) hence it can be installed very +easily from the standard package repositories using the standard yum / apt-get +/ emerge / pacman commands. It can also be used from SystemRescueCd, as it +comes with all run-time dependencies, so that you can restore your system and data after a problem. ## Implemented features @@ -70,10 +70,10 @@ * Encryption of the archive using a password. Based on blowfish from libgcrypt. ## Limitations -There are several limitations anyway: it cannot preserve filesystem attributes -that are very specific. For instance, if you create a snapshot in a btrfs -volume (the new-generation file system for linux), FSArchiver won't know -anything about that, and it will just backup the contents seen when you mount +There are several limitations anyway: it cannot preserve filesystem attributes +that are very specific. For instance, if you create a snapshot in a btrfs +volume (the new-generation file system for linux), FSArchiver won't know +anything about that, and it will just backup the contents seen when you mount the partition. FSArchiver is safe when it makes backups of partitions which are not mounted or diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/website/content/changelog/_index.md new/fsarchiver-0.8.5/website/content/changelog/_index.md --- old/fsarchiver-0.8.4/website/content/changelog/_index.md 2018-02-19 11:34:48.000000000 +0100 +++ new/fsarchiver-0.8.5/website/content/changelog/_index.md 2018-07-10 22:21:02.000000000 +0200 @@ -5,7 +5,11 @@ draft = false +++ -* **0.8.4 (2018-02-19):**: +* **0.8.5 (2018-07-10):** + * Improved support for extfs filesystems (Contribution from Marcos Mello) + * Fixed build issue with e2fsprogs < 1.41 (Contribution from Marcos Mello) + * Fixed build issue related to xattr.h (Contribution from Lars Wendler) +* **0.8.4 (2018-02-19):** * Added support for zstd compression algorithm (New option "-Z") * **0.8.3 (2017-12-22):** * Implemented LZ4 compression (Contribution from Cristian Vazquez) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/website/content/installation/_index.md new/fsarchiver-0.8.5/website/content/installation/_index.md --- old/fsarchiver-0.8.4/website/content/installation/_index.md 2018-02-19 11:38:26.000000000 +0100 +++ new/fsarchiver-0.8.5/website/content/installation/_index.md 2018-07-10 22:19:35.000000000 +0200 @@ -43,8 +43,8 @@ To compile the sources, you have to run follow these instructions: #### Download the latest sources -First, you have to download [fsarchiver-0.8.4.tar.gz] -(https://github.com/fdupoux/fsarchiver/releases/download/0.8.4/fsarchiver-0.8.4.tar.gz). +First, you have to download [fsarchiver-0.8.5.tar.gz] +(https://github.com/fdupoux/fsarchiver/releases/download/0.8.5/fsarchiver-0.8.5.tar.gz). Just save it to a temporary directory. #### Extract the sources in a temporary directory @@ -141,13 +141,21 @@ You should use these RPM packages that have been built for RHEL7 based distributions, that is the recommended way for most users: -* [fsarchiver-0.8.4-1.el7.x86_64.rpm](https://github.com/fdupoux/fsarchiver/releases/download/0.8.4/fsarchiver-0.8.4-1.el7.x86_64.rpm) +* [fsarchiver-0.8.5-1.el7.x86_64.rpm](https://github.com/fdupoux/fsarchiver/releases/download/0.8.5/fsarchiver-0.8.5-1.el7.x86_64.rpm) + +NOTE: Installing fsarchiver's rpm requires [EPEL](https://fedoraproject.org/wiki/EPEL) enabled. + +Use the following commands to install: +``` +yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm +yum install https://github.com/fdupoux/fsarchiver/releases/download/0.8.5/fsarchiver-0.8.5-1.el7.x86_64.rpm +``` If you want to compile fsarchiver yourself, use the following instructions: ``` yum install zlib-devel bzip2-devel lzo-devel lz4-devel xz-devel e2fsprogs-devel libgcrypt-devel libattr-devel libblkid-devel -tar xfz fsarchiver-0.8.4.tar.gz -cd fsarchiver-0.8.4 +tar xfz fsarchiver-0.8.5.tar.gz +cd fsarchiver-0.8.5 ./configure --prefix=/usr && make && make install ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fsarchiver-0.8.4/website/content/quickstart/_index.md new/fsarchiver-0.8.5/website/content/quickstart/_index.md --- old/fsarchiver-0.8.4/website/content/quickstart/_index.md 2018-02-19 11:35:54.000000000 +0100 +++ new/fsarchiver-0.8.5/website/content/quickstart/_index.md 2018-07-10 22:20:38.000000000 +0200 @@ -197,7 +197,7 @@ ## Command line and its arguments ``` -====> fsarchiver version 0.8.4 (2018-02-19) - http://www.fsarchiver.org <==== +====> fsarchiver version 0.8.5 (2018-07-10) - http://www.fsarchiver.org <==== Distributed under the GPL v2 license (GNU General Public License v2). * usage: fsarchiver [<options>] <command> <archive> [<dev1> [<dev2> [...]]] <commands>
