diff -pruN 5.2.1-4/aclocal.m4 5.2.2-1/aclocal.m4
--- 5.2.1-4/aclocal.m4	2021-02-01 09:31:49.000000000 +0000
+++ 5.2.2-1/aclocal.m4	2022-03-04 13:24:12.000000000 +0000
@@ -364,6 +364,457 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower
         [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
 ])dnl PKG_HAVE_DEFINE_WITH_MODULES
 
+# po.m4 serial 31 (gettext-0.20.2)
+dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.60])
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+  AC_REQUIRE([AC_PROG_SED])dnl
+  AC_REQUIRE([AM_NLS])dnl
+
+  dnl Release version of the gettext macros. This is used to ensure that
+  dnl the gettext macros and po/Makefile.in.in are in sync.
+  AC_SUBST([GETTEXT_MACRO_VERSION], [0.20])
+
+  dnl Perform the following tests also if --disable-nls has been given,
+  dnl because they are needed for "make dist" to work.
+
+  dnl Search for GNU msgfmt in the PATH.
+  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+  dnl The second test excludes FreeBSD msgfmt.
+  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
+
+  dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([GMSGFMT_015])
+
+  dnl Search for GNU xgettext 0.12 or newer in the PATH.
+  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+  dnl The second test excludes FreeBSD xgettext.
+  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  dnl Remove leftover from FreeBSD xgettext call.
+  rm -f messages.po
+
+  dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([XGETTEXT_015])
+
+  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+  dnl Test whether it is GNU msgmerge >= 0.20.
+  if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then
+    MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt'
+  else
+    dnl Test whether it is GNU msgmerge >= 0.12.
+    if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then
+      MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet'
+    else
+      dnl With these old versions, $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) is
+      dnl slow. But this is not a big problem, as such old gettext versions are
+      dnl hardly in use any more.
+      MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet'
+    fi
+  fi
+  AC_SUBST([MSGMERGE_FOR_MSGFMT_OPTION])
+
+  dnl Support for AM_XGETTEXT_OPTION.
+  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+  AC_CONFIG_COMMANDS([po-directories], [[
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          gt_tab=`printf '\t'`
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done]],
+   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS.
+    OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS"
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+   ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+  # When this code is run, in config.status, two variables have already been
+  # set:
+  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+  # - LINGUAS is the value of the environment variable LINGUAS at configure
+  #   time.
+
+changequote(,)dnl
+  # Adjust a relative srcdir.
+  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+  ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+  # In autoconf-2.13 it is called $ac_given_srcdir.
+  # In autoconf-2.50 it is called $srcdir.
+  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+  case "$ac_given_srcdir" in
+    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+    /*) top_srcdir="$ac_given_srcdir" ;;
+    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  # Find a way to echo strings without interpreting backslash.
+  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+    gt_echo='echo'
+  else
+    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+      gt_echo='printf %s\n'
+    else
+      echo_func () {
+        cat <<EOT
+$*
+EOT
+      }
+      gt_echo='echo_func'
+    fi
+  fi
+
+  # A sed script that extracts the value of VARIABLE from a Makefile.
+  tab=`printf '\t'`
+  sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
+  # Seen the first line of the variable definition.
+  s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
+  ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+  # Set POTFILES to the value of the Makefile variable POTFILES.
+  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+  # Compute POTFILES_DEPS as
+  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+  POTFILES_DEPS=
+  for file in $POTFILES; do
+    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+  done
+  POMAKEFILEDEPS=""
+
+  if test -n "$OBSOLETE_ALL_LINGUAS"; then
+    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+  fi
+  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+    # The LINGUAS file contains the set of available languages.
+    ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+  else
+    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+    ALL_LINGUAS=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+  fi
+  # Compute POFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+  # Compute UPDATEPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+  # Compute DUMMYPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+  # Compute GMOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+  # Compute PROPERTIESFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
+  # Compute CLASSFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
+  # Compute QMFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+  # Compute MSGFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+  # Compute RESOURCESDLLFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+  case "$ac_given_srcdir" in
+    .) srcdirpre= ;;
+    *) srcdirpre='$(srcdir)/' ;;
+  esac
+  POFILES=
+  UPDATEPOFILES=
+  DUMMYPOFILES=
+  GMOFILES=
+  PROPERTIESFILES=
+  CLASSFILES=
+  QMFILES=
+  MSGFILES=
+  RESOURCESDLLFILES=
+  for lang in $ALL_LINGUAS; do
+    POFILES="$POFILES $srcdirpre$lang.po"
+    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+    PROPERTIESFILES="$PROPERTIESFILES \$(srcdir)/\$(DOMAIN)_$lang.properties"
+    CLASSFILES="$CLASSFILES \$(srcdir)/\$(DOMAIN)_$lang.class"
+    QMFILES="$QMFILES $srcdirpre$lang.qm"
+    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+  done
+  # CATALOGS depends on both $ac_dir and the user's LINGUAS
+  # environment variable.
+  INST_LINGUAS=
+  if test -n "$ALL_LINGUAS"; then
+    for presentlang in $ALL_LINGUAS; do
+      useit=no
+      if test "%UNSET%" != "$LINGUAS"; then
+        desiredlanguages="$LINGUAS"
+      else
+        desiredlanguages="$ALL_LINGUAS"
+      fi
+      for desiredlang in $desiredlanguages; do
+        # Use the presentlang catalog if desiredlang is
+        #   a. equal to presentlang, or
+        #   b. a variant of presentlang (because in this case,
+        #      presentlang can be used as a fallback for messages
+        #      which are not translated in the desiredlang catalog).
+        case "$desiredlang" in
+          "$presentlang"*) useit=yes;;
+        esac
+      done
+      if test $useit = yes; then
+        INST_LINGUAS="$INST_LINGUAS $presentlang"
+      fi
+    done
+  fi
+  CATALOGS=
+  JAVACATALOGS=
+  QTCATALOGS=
+  TCLCATALOGS=
+  CSHARPCATALOGS=
+  if test -n "$INST_LINGUAS"; then
+    for lang in $INST_LINGUAS; do
+      CATALOGS="$CATALOGS $lang.gmo"
+      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+      QTCATALOGS="$QTCATALOGS $lang.qm"
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+    done
+  fi
+
+  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+  tab=`printf '\t'`
+  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if test -n "$POMAKEFILEDEPS"; then
+    cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+  fi
+  mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+  XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
+
 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
diff -pruN 5.2.1-4/configure 5.2.2-1/configure
--- 5.2.1-4/configure	2021-02-01 09:31:50.000000000 +0000
+++ 5.2.2-1/configure	2022-03-04 13:24:13.000000000 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for supermin 5.2.1.
+# Generated by GNU Autoconf 2.69 for supermin 5.2.2.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='supermin'
 PACKAGE_TARNAME='supermin'
-PACKAGE_VERSION='5.2.1'
-PACKAGE_STRING='supermin 5.2.1'
+PACKAGE_VERSION='5.2.2'
+PACKAGE_STRING='supermin 5.2.2'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1323,6 +1323,7 @@ infodir
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -1408,6 +1409,7 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1660,6 +1662,15 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1797,7 +1808,7 @@ fi
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+		libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1910,7 +1921,7 @@ if test "$ac_init_help" = "long"; then
   # 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 supermin 5.2.1 to adapt to many kinds of systems.
+\`configure' configures supermin 5.2.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1950,6 +1961,7 @@ Fine tuning of the installation director
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1980,7 +1992,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of supermin 5.2.1:";;
+     short | recursive ) echo "Configuration of supermin 5.2.2:";;
    esac
   cat <<\_ACEOF
 
@@ -2089,7 +2101,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-supermin configure 5.2.1
+supermin configure 5.2.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2794,7 +2806,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by supermin $as_me 5.2.1, which was
+It was created by supermin $as_me 5.2.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3686,7 +3698,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='supermin'
- VERSION='5.2.1'
+ VERSION='5.2.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -7461,6 +7473,9 @@ $as_echo "#define STRERROR_R_CHAR_P 1" >
 fi
 
 
+  XGETTEXT_EXTRA_OPTIONS=
+
+
 
 
 
@@ -11978,6 +11993,13 @@ $as_echo "$ac_cv_lib_error_at_line" >&6;
   fi
 
 
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
+
+
+
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
+
+
 
 
 
@@ -18578,7 +18600,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by supermin $as_me 5.2.1, which was
+This file was extended by supermin $as_me 5.2.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -18644,7 +18666,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-supermin config.status 5.2.1
+supermin config.status 5.2.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -pruN 5.2.1-4/configure.ac 5.2.2-1/configure.ac
--- 5.2.1-4/configure.ac	2021-02-01 09:31:20.000000000 +0000
+++ 5.2.2-1/configure.ac	2022-03-04 13:23:49.000000000 +0000
@@ -20,7 +20,7 @@ dnl Written by Richard W.M. Jones <rjone
 dnl MAJOR = 5 (unless we break the command line again)
 dnl MINOR = even for stable branch, odd for development branch
 dnl RELEASE = increments for each release
-AC_INIT([supermin],[5.2.1])
+AC_INIT([supermin],[5.2.2])
 
 AM_INIT_AUTOMAKE(foreign)
 AC_REQUIRE_AUX_FILE([supermin-test-driver])
diff -pruN 5.2.1-4/debian/changelog 5.2.2-1/debian/changelog
--- 5.2.1-4/debian/changelog	2021-02-07 14:05:21.000000000 +0000
+++ 5.2.2-1/debian/changelog	2022-03-05 09:14:07.000000000 +0000
@@ -1,3 +1,28 @@
+supermin (5.2.2-1) unstable; urgency=medium
+
+  * New upstream version 5.2.2
+  * Add test-only Build-dependency for libguestfs-tools
+  * Drop patch that has been integrated upstream
+
+ -- Hilko Bengen <bengen@debian.org>  Sat, 05 Mar 2022 10:14:07 +0100
+
+supermin (5.2.1-6) unstable; urgency=medium
+
+  * Add kernel build-depends/recommends for x32
+    - (This might fix the FTBFS on x32, not that it matters at this
+      point.)
+  * Require kernel-image-* only for builds including tests.
+
+ -- Hilko Bengen <bengen@debian.org>  Thu, 02 Sep 2021 21:53:27 +0200
+
+supermin (5.2.1-5) unstable; urgency=medium
+
+  [ Simon McVittie ]
+  * d/rules: Specify canonical paths of cpio, mke2fs, zcat
+    (Closes: #992781)
+
+ -- Hilko Bengen <bengen@debian.org>  Mon, 23 Aug 2021 14:26:58 +0200
+
 supermin (5.2.1-4) unstable; urgency=medium
 
   * Fix FTBFS
diff -pruN 5.2.1-4/debian/control 5.2.2-1/debian/control
--- 5.2.1-4/debian/control	2021-02-02 21:58:47.000000000 +0000
+++ 5.2.2-1/debian/control	2022-03-05 09:13:30.000000000 +0000
@@ -14,22 +14,23 @@ Build-Depends: debhelper (>= 12),
  e2fsprogs,
  musl-tools [amd64 arm64 armel armhf i386],
  augeas-tools, libhivex-bin,
- linux-image-alpha-generic [alpha],
- linux-image-marvell [armel] | linux-image-versatile [armel],
- linux-image-armmp [armhf],
- linux-image-arm64 [arm64],
- linux-image-4kc-malta [mips mipsel] | linux-image-5kc-malta [mips mipsel],
- linux-image-5kc-malta [mips64 mips64el],
- linux-image-s390x [s390x],
- linux-image-parisc [hppa],
- linux-image-powerpc [powerpc],
- linux-image-powerpc64 [ppc64],
- linux-image-powerpc64le [ppc64el],
- linux-image-sparc64 [sparc sparc64],
- linux-image-amd64 [amd64],
- linux-image-686-pae [i386] | linux-image-586 [i386] | linux-image-486 [i386],
- linux-image-riscv64 [riscv64],
- linux-image-itanium [ia64] | linux-image-mckinley [ia64],
+ libguestfs-tools <!nocheck>,
+ linux-image-alpha-generic [alpha] <!nocheck>,
+ linux-image-marvell [armel] <!nocheck> | linux-image-versatile [armel] <!nocheck>,
+ linux-image-armmp [armhf] <!nocheck>,
+ linux-image-arm64 [arm64] <!nocheck>,
+ linux-image-4kc-malta [mips mipsel] <!nocheck> | linux-image-5kc-malta [mips mipsel] <!nocheck>,
+ linux-image-5kc-malta [mips64 mips64el] <!nocheck>,
+ linux-image-s390x [s390x] <!nocheck>,
+ linux-image-parisc [hppa] <!nocheck>,
+ linux-image-powerpc [powerpc] <!nocheck>,
+ linux-image-powerpc64 [ppc64] <!nocheck>,
+ linux-image-powerpc64le [ppc64el] <!nocheck>,
+ linux-image-sparc64 [sparc sparc64] <!nocheck>,
+ linux-image-amd64 [amd64 x32] <!nocheck>,
+ linux-image-686-pae [i386] <!nocheck> | linux-image-586 [i386] <!nocheck> | linux-image-486 [i386] <!nocheck>,
+ linux-image-riscv64 [riscv64] <!nocheck>,
+ linux-image-itanium [ia64] <!nocheck> | linux-image-mckinley [ia64] <!nocheck>,
 Standards-Version: 4.3.0
 Homepage: http://people.redhat.com/~rjones/supermin/
 Vcs-Git: https://salsa.debian.org/libvirt-team/supermin.git
@@ -52,7 +53,7 @@ Recommends:
  linux-image-powerpc64 [ppc64],
  linux-image-powerpc64le [ppc64el],
  linux-image-sparc64 [sparc sparc64],
- linux-image-amd64 [amd64],
+ linux-image-amd64 [amd64 x32],
  linux-image-686-pae [i386] | linux-image-586 [i386] | linux-image-486 [i386],
  linux-image-riscv64 [riscv64],
  linux-image-itanium [ia64] | linux-image-mckinley [ia64],
diff -pruN 5.2.1-4/debian/patches/0001-Open-Unix.LargeFile-to-avoid-lstat-Value-too-large-f.patch 5.2.2-1/debian/patches/0001-Open-Unix.LargeFile-to-avoid-lstat-Value-too-large-f.patch
--- 5.2.1-4/debian/patches/0001-Open-Unix.LargeFile-to-avoid-lstat-Value-too-large-f.patch	2021-02-03 10:31:31.000000000 +0000
+++ 5.2.2-1/debian/patches/0001-Open-Unix.LargeFile-to-avoid-lstat-Value-too-large-f.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,176 +0,0 @@
-From: "Richard W.M. Jones" <rjones@redhat.com>
-Date: Mon, 1 Feb 2021 10:07:02 +0000
-Subject: Open Unix.LargeFile to avoid "lstat: Value too large for defined
- data type".
-
-On 32 bit platforms, because OCaml native ints are limited to 31 bits,
-there is a trap in the normal Unix.stat, Unix.lstat functions where
-any field in the stat struct may overflow.  The result is random
-errors like:
-
-  supermin: error: lstat: Value too large for defined data type: /tmp/tmp.Ss9aYEBASm/d2/root
-
-You would probably only see this on armv7.
-
-The OCaml Unix module has a "LargeFile" submodule which fixes this by
-using int64 for some (unfortunately not all) fields.
-
-For more information see the OCaml sources, file
-otherlibs/unix/stat.c, all instances of "EOVERFLOW".
----
- src/format_chroot.ml      | 1 +
- src/format_ext2.ml        | 1 +
- src/format_ext2_initrd.ml | 1 +
- src/format_ext2_kernel.ml | 5 +++--
- src/mode_build.ml         | 1 +
- src/package_handler.ml    | 1 +
- src/ph_dpkg.ml            | 1 +
- src/ph_pacman.ml          | 1 +
- src/ph_rpm.ml             | 1 +
- src/supermin.ml           | 1 +
- src/utils.ml              | 1 +
- 11 files changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/src/format_chroot.ml b/src/format_chroot.ml
-index 346c24b..34606f7 100644
---- a/src/format_chroot.ml
-+++ b/src/format_chroot.ml
-@@ -17,6 +17,7 @@
-  *)
- 
- open Unix
-+open Unix.LargeFile
- open Printf
- 
- open Utils
-diff --git a/src/format_ext2.ml b/src/format_ext2.ml
-index 6348c29..e311ea6 100644
---- a/src/format_ext2.ml
-+++ b/src/format_ext2.ml
-@@ -17,6 +17,7 @@
-  *)
- 
- open Unix
-+open Unix.LargeFile
- open Printf
- 
- open Utils
-diff --git a/src/format_ext2_initrd.ml b/src/format_ext2_initrd.ml
-index 38977e6..6268442 100644
---- a/src/format_ext2_initrd.ml
-+++ b/src/format_ext2_initrd.ml
-@@ -17,6 +17,7 @@
-  *)
- 
- open Unix
-+open Unix.LargeFile
- open Printf
- 
- open Utils
-diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml
-index 98bff3a..3be4413 100644
---- a/src/format_ext2_kernel.ml
-+++ b/src/format_ext2_kernel.ml
-@@ -17,6 +17,7 @@
-  *)
- 
- open Unix
-+open Unix.LargeFile
- open Printf
- 
- open Utils
-@@ -95,8 +96,8 @@ and find_kernel_from_lib_modules debug =
-     let kernels =
-       filter_map (
-         fun kernel_file ->
--          let size = try (stat kernel_file).st_size with Unix_error _ -> 0 in
--          if size < 10000 then None
-+          let size = try (stat kernel_file).st_size with Unix_error _ -> 0L in
-+          if size < 10000_L then None
-           else (
-             let kernel_name = Filename.basename kernel_file in
-             let modpath = Filename.dirname kernel_file in
-diff --git a/src/mode_build.ml b/src/mode_build.ml
-index ed47366..ff7733e 100644
---- a/src/mode_build.ml
-+++ b/src/mode_build.ml
-@@ -17,6 +17,7 @@
-  *)
- 
- open Unix
-+open Unix.LargeFile
- open Printf
- 
- open Utils
-diff --git a/src/package_handler.ml b/src/package_handler.ml
-index 0409438..f0d6db3 100644
---- a/src/package_handler.ml
-+++ b/src/package_handler.ml
-@@ -17,6 +17,7 @@
-  *)
- 
- open Unix
-+open Unix.LargeFile
- open Printf
- 
- open Utils
-diff --git a/src/ph_dpkg.ml b/src/ph_dpkg.ml
-index 1e785de..6d4fce1 100644
---- a/src/ph_dpkg.ml
-+++ b/src/ph_dpkg.ml
-@@ -17,6 +17,7 @@
-  *)
- 
- open Unix
-+open Unix.LargeFile
- open Printf
- 
- open Utils
-diff --git a/src/ph_pacman.ml b/src/ph_pacman.ml
-index 67f7512..50500a5 100644
---- a/src/ph_pacman.ml
-+++ b/src/ph_pacman.ml
-@@ -17,6 +17,7 @@
-  *)
- 
- open Unix
-+open Unix.LargeFile
- open Printf
- 
- open Utils
-diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml
-index 9745efd..183b5f3 100644
---- a/src/ph_rpm.ml
-+++ b/src/ph_rpm.ml
-@@ -17,6 +17,7 @@
-  *)
- 
- open Unix
-+open Unix.LargeFile
- open Printf
- 
- open Utils
-diff --git a/src/supermin.ml b/src/supermin.ml
-index e923111..9f838d9 100644
---- a/src/supermin.ml
-+++ b/src/supermin.ml
-@@ -17,6 +17,7 @@
-  *)
- 
- open Unix
-+open Unix.LargeFile
- open Printf
- 
- open Types
-diff --git a/src/utils.ml b/src/utils.ml
-index b25df88..f5990ef 100644
---- a/src/utils.ml
-+++ b/src/utils.ml
-@@ -17,6 +17,7 @@
-  *)
- 
- open Unix
-+open Unix.LargeFile
- open Printf
- 
- let (+^) = Int64.add
diff -pruN 5.2.1-4/debian/patches/series 5.2.2-1/debian/patches/series
--- 5.2.1-4/debian/patches/series	2021-02-03 10:31:31.000000000 +0000
+++ 5.2.2-1/debian/patches/series	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-0001-Open-Unix.LargeFile-to-avoid-lstat-Value-too-large-f.patch
diff -pruN 5.2.1-4/debian/rules 5.2.2-1/debian/rules
--- 5.2.1-4/debian/rules	2021-02-07 14:04:47.000000000 +0000
+++ 5.2.2-1/debian/rules	2022-03-05 09:13:30.000000000 +0000
@@ -3,6 +3,10 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+cfgflags =
+cfgflags += CPIO=/bin/cpio
+cfgflags += MKE2FS=/sbin/mke2fs
+cfgflags += ZCAT=/bin/zcat
 
 override_dh_auto_configure:
 	dh_auto_configure -- --disable-network-tests $(cfgflags)
diff -pruN 5.2.1-4/examples/Makefile.in 5.2.2-1/examples/Makefile.in
--- 5.2.1-4/examples/Makefile.in	2021-02-01 09:31:50.000000000 +0000
+++ 5.2.2-1/examples/Makefile.in	2022-03-04 13:24:13.000000000 +0000
@@ -874,6 +874,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
diff -pruN 5.2.1-4/init/Makefile.in 5.2.2-1/init/Makefile.in
--- 5.2.1-4/init/Makefile.in	2021-02-01 09:31:50.000000000 +0000
+++ 5.2.2-1/init/Makefile.in	2022-03-04 13:24:13.000000000 +0000
@@ -921,6 +921,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
diff -pruN 5.2.1-4/lib/.gitignore 5.2.2-1/lib/.gitignore
--- 5.2.1-4/lib/.gitignore	1970-01-01 00:00:00.000000000 +0000
+++ 5.2.2-1/lib/.gitignore	2017-03-06 18:20:37.000000000 +0000
@@ -0,0 +1,14 @@
+
+
+/assure.h
+/*.c
+/flexmember.h
+/getprogname.c
+/getprogname.h
+/*.h
+/*.h.in
+/limits.in.h
+/Makefile.am
+/stdalign.in.h
+/sys
+/*.valgrind
diff -pruN 5.2.1-4/lib/Makefile.in 5.2.2-1/lib/Makefile.in
--- 5.2.1-4/lib/Makefile.in	2021-02-01 09:31:50.000000000 +0000
+++ 5.2.2-1/lib/Makefile.in	2022-03-04 13:24:13.000000000 +0000
@@ -1004,6 +1004,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
diff -pruN 5.2.1-4/m4/.gitignore 5.2.2-1/m4/.gitignore
--- 5.2.1-4/m4/.gitignore	1970-01-01 00:00:00.000000000 +0000
+++ 5.2.2-1/m4/.gitignore	2017-03-06 18:20:37.000000000 +0000
@@ -0,0 +1,81 @@
+/00gnulib.m4
+/absolute-header.m4
+/chdir-long.m4
+/closedir.m4
+/close.m4
+/cycle-check.m4
+/d-ino.m4
+/dirent_h.m4
+/dirent-safer.m4
+/dirfd.m4
+/dirname.m4
+/double-slash-root.m4
+/d-type.m4
+/dup2.m4
+/dup.m4
+/errno_h.m4
+/error.m4
+/extensions.m4
+/extern-inline.m4
+/fchdir.m4
+/fcntl_h.m4
+/fcntl.m4
+/fcntl-o.m4
+/fcntl-safer.m4
+/fdopendir.m4
+/filenamecat.m4
+/flexmember.m4
+/fstat.m4
+/fts.m4
+/getcwd.m4
+/getdtablesize.m4
+/getprogname.m4
+/gettimeofday.m4
+/gnulib-common.m4
+/gnulib-comp.m4
+/gnulib-tool.m4
+/include_next.m4
+/i-ring.m4
+/largefile.m4
+/limits-h.m4
+/longlong.m4
+/lstat.m4
+/malloc.m4
+/memchr.m4
+/mempcpy.m4
+/memrchr.m4
+/mmap-anon.m4
+/mode_t.m4
+/msvc-inval.m4
+/msvc-nothrow.m4
+/multiarch.m4
+/off_t.m4
+/onceonly.m4
+/openat.m4
+/opendir.m4
+/open.m4
+/pathmax.m4
+/readdir.m4
+/realloc.m4
+/save-cwd.m4
+/ssize_t.m4
+/stat.m4
+/stdalign.m4
+/stdbool.m4
+/stddef_h.m4
+/stdint.m4
+/stdio_h.m4
+/stdlib_h.m4
+/strdup.m4
+/strerror.m4
+/string_h.m4
+/sys_socket_h.m4
+/sys_stat_h.m4
+/sys_time_h.m4
+/sys_types_h.m4
+/time_h.m4
+/unistd_h.m4
+/unistd-safer.m4
+/warn-on-use.m4
+/wchar_t.m4
+/wint_t.m4
diff -pruN 5.2.1-4/Makefile.am 5.2.2-1/Makefile.am
--- 5.2.1-4/Makefile.am	2016-02-17 16:11:24.000000000 +0000
+++ 5.2.2-1/Makefile.am	2022-03-04 13:27:07.000000000 +0000
@@ -25,6 +25,8 @@ EXTRA_DIST = \
 	bootstrap \
 	HACKING \
 	html/pod.css \
+	lib/.gitignore \
+	m4/.gitignore \
 	m4/gnulib-cache.m4 \
 	README \
 	TODO \
@@ -40,3 +42,32 @@ website: $(HTMLFILES)
 	cp $(HTMLFILES) $(WEBSITEDIR)
 
 CLEANFILES = $(HTMLFILES) pod2*.tmp
+
+#----------------------------------------------------------------------
+# Maintainers only!
+
+# Check no files are missing from EXTRA_DIST rules, and that all
+# generated files have been included in the tarball.  (Note you must
+# have done 'make dist')
+maintainer-check-extra-dist:
+	@zcat $(PACKAGE_NAME)-$(VERSION).tar.gz | tar tf - | sort | \
+	  sed 's,^$(PACKAGE_NAME)-$(VERSION)/,,' > tarfiles
+	@git ls-files | \
+	  grep -v '^\.gnulib' | \
+	  grep -v '^\.gitmodules' | \
+	  sort > gitfiles
+	@comm -13 tarfiles gitfiles > comm-out
+	@echo Checking for differences between EXTRA_DIST and git ...
+	@cat comm-out
+	@[ ! -s comm-out ]
+	@rm tarfiles gitfiles comm-out
+	@echo PASS: EXTRA_DIST tests
+
+# Commit everything in the current directory and set the commit
+# message to the current version number.
+maintainer-commit:
+	git commit -a -m "Version $(VERSION)."
+
+# Tag HEAD with the current version.
+maintainer-tag:
+	git tag -a v$(VERSION) -m "Version $(VERSION)." -f
diff -pruN 5.2.1-4/Makefile.in 5.2.2-1/Makefile.in
--- 5.2.1-4/Makefile.in	2021-02-01 09:31:50.000000000 +0000
+++ 5.2.2-1/Makefile.in	2022-03-04 13:27:09.000000000 +0000
@@ -955,6 +955,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -971,6 +972,8 @@ EXTRA_DIST = \
 	bootstrap \
 	HACKING \
 	html/pod.css \
+	lib/.gitignore \
+	m4/.gitignore \
 	m4/gnulib-cache.m4 \
 	README \
 	TODO \
@@ -1468,6 +1471,35 @@ uninstall-am:
 website: $(HTMLFILES)
 	cp $(HTMLFILES) $(WEBSITEDIR)
 
+#----------------------------------------------------------------------
+# Maintainers only!
+
+# Check no files are missing from EXTRA_DIST rules, and that all
+# generated files have been included in the tarball.  (Note you must
+# have done 'make dist')
+maintainer-check-extra-dist:
+	@zcat $(PACKAGE_NAME)-$(VERSION).tar.gz | tar tf - | sort | \
+	  sed 's,^$(PACKAGE_NAME)-$(VERSION)/,,' > tarfiles
+	@git ls-files | \
+	  grep -v '^\.gnulib' | \
+	  grep -v '^\.gitmodules' | \
+	  sort > gitfiles
+	@comm -13 tarfiles gitfiles > comm-out
+	@echo Checking for differences between EXTRA_DIST and git ...
+	@cat comm-out
+	@[ ! -s comm-out ]
+	@rm tarfiles gitfiles comm-out
+	@echo PASS: EXTRA_DIST tests
+
+# Commit everything in the current directory and set the commit
+# message to the current version number.
+maintainer-commit:
+	git commit -a -m "Version $(VERSION)."
+
+# Tag HEAD with the current version.
+maintainer-tag:
+	git tag -a v$(VERSION) -m "Version $(VERSION)." -f
+
 # 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.
 .NOEXPORT:
diff -pruN 5.2.1-4/src/config.ml 5.2.2-1/src/config.ml
--- 5.2.1-4/src/config.ml	2021-02-01 09:33:08.000000000 +0000
+++ 5.2.2-1/src/config.ml	2022-03-04 13:25:14.000000000 +0000
@@ -18,16 +18,16 @@
  *)
 
 let package_name = "supermin"
-let package_version = "5.2.1"
+let package_version = "5.2.2"
 let host_cpu = "x86_64"
 
 let apt_get = "no"
 let cpio = "/usr/bin/cpio"
 let dnf = "/usr/bin/dnf"
-let dpkg = "no"
-let dpkg_deb = "no"
-let dpkg_query = "no"
-let dpkg_divert = "no"
+let dpkg = "/usr/bin/dpkg"
+let dpkg_deb = "/usr/bin/dpkg-deb"
+let dpkg_query = "/usr/bin/dpkg-query"
+let dpkg_divert = "/usr/bin/dpkg-divert"
 let fakeroot = "/usr/bin/fakeroot"
 let makepkg = "no"
 let pacman = "no"
diff -pruN 5.2.1-4/src/ext2fs-c.c 5.2.2-1/src/ext2fs-c.c
--- 5.2.1-4/src/ext2fs-c.c	2019-12-10 18:44:30.000000000 +0000
+++ 5.2.2-1/src/ext2fs-c.c	2022-03-04 13:22:18.000000000 +0000
@@ -96,8 +96,12 @@ ext2_handle_closed (void)
 }
 
 #define Ext2fs_val(v) (*((struct ext2_data *)Data_custom_val(v)))
+#ifndef Val_none
 #define Val_none Val_int(0)
+#endif
+#ifndef Some_val
 #define Some_val(v) Field(v,0)
+#endif
 
 static void
 ext2_finalize (value fsv)
diff -pruN 5.2.1-4/src/format_chroot.ml 5.2.2-1/src/format_chroot.ml
--- 5.2.1-4/src/format_chroot.ml	2016-12-07 15:09:02.000000000 +0000
+++ 5.2.2-1/src/format_chroot.ml	2022-03-04 13:13:20.000000000 +0000
@@ -17,6 +17,7 @@
  *)
 
 open Unix
+open Unix.LargeFile
 open Printf
 
 open Utils
diff -pruN 5.2.1-4/src/format_ext2_initrd.ml 5.2.2-1/src/format_ext2_initrd.ml
--- 5.2.1-4/src/format_ext2_initrd.ml	2021-02-01 09:30:45.000000000 +0000
+++ 5.2.2-1/src/format_ext2_initrd.ml	2022-03-04 13:13:20.000000000 +0000
@@ -17,6 +17,7 @@
  *)
 
 open Unix
+open Unix.LargeFile
 open Printf
 
 open Utils
diff -pruN 5.2.1-4/src/format_ext2_kernel.ml 5.2.2-1/src/format_ext2_kernel.ml
--- 5.2.1-4/src/format_ext2_kernel.ml	2020-03-10 09:12:29.000000000 +0000
+++ 5.2.2-1/src/format_ext2_kernel.ml	2022-03-04 13:23:30.000000000 +0000
@@ -17,6 +17,7 @@
  *)
 
 open Unix
+open Unix.LargeFile
 open Printf
 
 open Utils
@@ -37,7 +38,7 @@ let rec build_kernel debug host_cpu copy
     | None ->
        if debug >= 1 then
          printf "supermin: kernel: looking for kernels in /lib/modules/*/vmlinuz ...\n%!";
-       match find_kernel_from_lib_modules debug with
+       match find_kernel_from_lib_modules debug host_cpu with
        | Some k -> k
        | None ->
           if debug >= 1 then
@@ -88,15 +89,18 @@ and find_kernel_from_env_vars debug  =
     Some (kernel_env, kernel_name, kernel_version, modpath)
   with Not_found -> None
 
-and find_kernel_from_lib_modules debug =
+and find_kernel_from_lib_modules debug host_cpu =
+  let files = glob "/lib/modules/*/vmlinuz" [GLOB_NOSORT; GLOB_NOESCAPE] in
+  let files = Array.to_list files in
+
+  let files = ignore_unbootable_kernels host_cpu files in
+
   let kernels =
-    let files = glob "/lib/modules/*/vmlinuz" [GLOB_NOSORT; GLOB_NOESCAPE] in
-    let files = Array.to_list files in
     let kernels =
       filter_map (
         fun kernel_file ->
-          let size = try (stat kernel_file).st_size with Unix_error _ -> 0 in
-          if size < 10000 then None
+          let size = try (stat kernel_file).st_size with Unix_error _ -> 0L in
+          if size < 10000_L then None
           else (
             let kernel_name = Filename.basename kernel_file in
             let modpath = Filename.dirname kernel_file in
@@ -113,22 +117,22 @@ and find_kernel_from_lib_modules debug =
   | [] -> None
 
 and find_kernel_from_boot debug host_cpu =
-  let is_arm =
-    String.length host_cpu >= 3 &&
-    host_cpu.[0] = 'a' && host_cpu.[1] = 'r' && host_cpu.[2] = 'm' in
-
   let all_files = Sys.readdir "/boot" in
   let all_files = Array.to_list all_files in
 
   (* In original: ls -1dvr /boot/vmlinuz-*.$arch* 2>/dev/null | grep -v xen *)
   let patterns = patt_of_cpu host_cpu in
-  let files = kernel_filter patterns is_arm all_files in
+  let files = files_matching_globs patterns all_files in
+  let files = ignore_unbootable_kernels host_cpu files in
 
   let files =
     if files <> [] then files
-    else
+    else (
       (* In original: ls -1dvr /boot/vmlinuz-* 2>/dev/null | grep -v xen *)
-      kernel_filter ["vmlinu?-*"] is_arm all_files in
+      let files = files_matching_globs ["vmlinu?-*"] all_files in
+      let files = ignore_unbootable_kernels host_cpu files in
+      files
+    ) in
 
   let files = List.sort (fun a b -> compare_version b a) files in
   let kernels =
@@ -147,16 +151,25 @@ and find_kernel_from_boot debug host_cpu
   | kernel :: _ -> Some kernel
   | [] -> None
 
-and kernel_filter patterns is_arm all_files =
-  let files =
-    List.filter
-      (fun filename ->
-        List.exists
-          (fun patt -> fnmatch patt filename [FNM_NOESCAPE]) patterns
-      ) all_files in
+and files_matching_globs patterns files =
+  List.filter
+    (fun filename ->
+      List.exists
+        (fun patt -> fnmatch patt filename [FNM_NOESCAPE]) patterns
+    ) files
+
+and ignore_unbootable_kernels host_cpu files =
+  let is_arm =
+    String.length host_cpu >= 3 &&
+    host_cpu.[0] = 'a' && host_cpu.[1] = 'r' && host_cpu.[2] = 'm' in
+
   let files =
     List.filter (fun filename -> find filename "xen" = -1) files in
   let files =
+    List.filter (fun filename -> find filename "zfcpdump" = -1) files in
+  let files =
+    List.filter (fun filename -> find filename "+debug" = -1) files in
+  let files =
     if not is_arm then files
     else (
       List.filter (fun filename ->
diff -pruN 5.2.1-4/src/format_ext2.ml 5.2.2-1/src/format_ext2.ml
--- 5.2.1-4/src/format_ext2.ml	2019-07-28 16:37:36.000000000 +0000
+++ 5.2.2-1/src/format_ext2.ml	2022-03-04 13:13:20.000000000 +0000
@@ -17,6 +17,7 @@
  *)
 
 open Unix
+open Unix.LargeFile
 open Printf
 
 open Utils
diff -pruN 5.2.1-4/src/librpm-c.c 5.2.2-1/src/librpm-c.c
--- 5.2.1-4/src/librpm-c.c	2019-08-22 08:29:42.000000000 +0000
+++ 5.2.2-1/src/librpm-c.c	2022-03-04 13:22:18.000000000 +0000
@@ -78,8 +78,12 @@ librpm_raise_multiple_matches (value pkg
 }
 
 #define Librpm_val(v) (*((struct librpm_data *)Data_custom_val(v)))
+#ifndef Val_none
 #define Val_none Val_int(0)
+#endif
+#ifndef Some_val
 #define Some_val(v) Field(v,0)
+#endif
 
 static void
 librpm_finalize (value rpmv)
diff -pruN 5.2.1-4/src/Makefile.am 5.2.2-1/src/Makefile.am
--- 5.2.1-4/src/Makefile.am	2017-08-24 12:28:08.000000000 +0000
+++ 5.2.2-1/src/Makefile.am	2022-03-04 13:22:57.000000000 +0000
@@ -105,9 +105,13 @@ SOURCES_C = \
 
 CLEANFILES = *~ *.cmi *.cmo *.cmx *.o supermin
 
+if HAVE_PERLDOC
+
 man_MANS = \
 	supermin.1
 
+endif
+
 bin_PROGRAMS = supermin
 
 supermin_SOURCES = $(SOURCES_C)
diff -pruN 5.2.1-4/src/Makefile.in 5.2.2-1/src/Makefile.in
--- 5.2.1-4/src/Makefile.in	2021-02-01 09:31:50.000000000 +0000
+++ 5.2.2-1/src/Makefile.in	2022-03-04 13:24:13.000000000 +0000
@@ -960,6 +960,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -1059,8 +1060,8 @@ SOURCES_C = \
 	realpath-c.c
 
 CLEANFILES = *~ *.cmi *.cmo *.cmx *.o supermin format-ext2-init-bin.h
-man_MANS = \
-	supermin.1
+@HAVE_PERLDOC_TRUE@man_MANS = \
+@HAVE_PERLDOC_TRUE@	supermin.1
 
 supermin_SOURCES = $(SOURCES_C)
 nodist_supermin_SOURCES = format-ext2-init-bin.h
diff -pruN 5.2.1-4/src/mode_build.ml 5.2.2-1/src/mode_build.ml
--- 5.2.1-4/src/mode_build.ml	2021-02-01 09:30:45.000000000 +0000
+++ 5.2.2-1/src/mode_build.ml	2022-03-04 13:13:20.000000000 +0000
@@ -17,6 +17,7 @@
  *)
 
 open Unix
+open Unix.LargeFile
 open Printf
 
 open Utils
diff -pruN 5.2.1-4/src/package_handler.ml 5.2.2-1/src/package_handler.ml
--- 5.2.1-4/src/package_handler.ml	2016-03-18 13:15:15.000000000 +0000
+++ 5.2.2-1/src/package_handler.ml	2022-03-04 13:13:20.000000000 +0000
@@ -17,6 +17,7 @@
  *)
 
 open Unix
+open Unix.LargeFile
 open Printf
 
 open Utils
diff -pruN 5.2.1-4/src/ph_dpkg.ml 5.2.2-1/src/ph_dpkg.ml
--- 5.2.1-4/src/ph_dpkg.ml	2016-12-07 15:09:02.000000000 +0000
+++ 5.2.2-1/src/ph_dpkg.ml	2022-03-04 13:13:20.000000000 +0000
@@ -17,6 +17,7 @@
  *)
 
 open Unix
+open Unix.LargeFile
 open Printf
 
 open Utils
diff -pruN 5.2.1-4/src/ph_pacman.ml 5.2.2-1/src/ph_pacman.ml
--- 5.2.1-4/src/ph_pacman.ml	2021-02-01 09:30:45.000000000 +0000
+++ 5.2.2-1/src/ph_pacman.ml	2022-03-04 13:22:11.000000000 +0000
@@ -17,6 +17,7 @@
  *)
 
 open Unix
+open Unix.LargeFile
 open Printf
 
 open Utils
@@ -219,7 +220,10 @@ let pacman_download_all_packages pkgs di
   let cmd =
     sprintf "
       umask 0000
-      for f in %s/*.pkg.tar.*; do tar -xf \"$f\" -C %s; done
+      for f in %s/*.pkg.tar.*; do
+        [[ $f == *.sig ]] && continue
+        tar -xf \"$f\" -C %s
+      done
     "
       (quote tdir) (quote dir) in
   if !settings.debug >= 2 then printf "%s" cmd;
diff -pruN 5.2.1-4/src/ph_rpm.ml 5.2.2-1/src/ph_rpm.ml
--- 5.2.1-4/src/ph_rpm.ml	2021-02-01 09:30:45.000000000 +0000
+++ 5.2.2-1/src/ph_rpm.ml	2022-03-04 13:13:20.000000000 +0000
@@ -17,6 +17,7 @@
  *)
 
 open Unix
+open Unix.LargeFile
 open Printf
 
 open Utils
diff -pruN 5.2.1-4/src/supermin.ml 5.2.2-1/src/supermin.ml
--- 5.2.1-4/src/supermin.ml	2021-02-01 09:30:45.000000000 +0000
+++ 5.2.2-1/src/supermin.ml	2022-03-04 13:13:20.000000000 +0000
@@ -17,6 +17,7 @@
  *)
 
 open Unix
+open Unix.LargeFile
 open Printf
 
 open Types
diff -pruN 5.2.1-4/src/utils.ml 5.2.2-1/src/utils.ml
--- 5.2.1-4/src/utils.ml	2019-12-10 18:46:03.000000000 +0000
+++ 5.2.2-1/src/utils.ml	2022-03-04 13:13:20.000000000 +0000
@@ -17,6 +17,7 @@
  *)
 
 open Unix
+open Unix.LargeFile
 open Printf
 
 let (+^) = Int64.add
diff -pruN 5.2.1-4/tests/Makefile.in 5.2.2-1/tests/Makefile.in
--- 5.2.1-4/tests/Makefile.in	2021-02-01 09:31:50.000000000 +0000
+++ 5.2.2-1/tests/Makefile.in	2022-03-04 13:24:13.000000000 +0000
@@ -1082,6 +1082,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
