diff -Nru swapspace-1.17/aclocal.m4 swapspace-1.18/aclocal.m4 --- swapspace-1.17/aclocal.m4 2020-05-21 21:59:36.000000000 +0000 +++ swapspace-1.18/aclocal.m4 2022-10-08 22:35:58.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.3 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,7 +332,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -371,7 +371,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -398,7 +400,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -595,7 +597,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -616,7 +618,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -637,7 +639,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -680,7 +682,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -701,12 +703,7 @@ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -719,7 +716,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -748,7 +745,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -795,7 +792,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -814,7 +811,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -895,7 +892,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -955,7 +952,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -983,7 +980,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1002,7 +999,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru swapspace-1.17/configure swapspace-1.18/configure --- swapspace-1.17/configure 2020-05-21 21:59:37.000000000 +0000 +++ swapspace-1.18/configure 2022-10-08 22:35:58.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for swapspace 1.17. +# Generated by GNU Autoconf 2.69 for swapspace 1.18. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -266,7 +266,7 @@ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and tookmund@gmail.com + $as_echo "$0: Please tell bug-autoconf@gnu.org and jacob@tookmund.com $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do @@ -580,9 +580,9 @@ # Identity of this package. PACKAGE_NAME='swapspace' PACKAGE_TARNAME='swapspace' -PACKAGE_VERSION='1.17' -PACKAGE_STRING='swapspace 1.17' -PACKAGE_BUGREPORT='tookmund@gmail.com' +PACKAGE_VERSION='1.18' +PACKAGE_STRING='swapspace 1.18' +PACKAGE_BUGREPORT='jacob@tookmund.com' PACKAGE_URL='https://github.com/Tookmund/swapspace' ac_unique_file="src" @@ -1280,7 +1280,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 swapspace 1.17 to adapt to many kinds of systems. +\`configure' configures swapspace 1.18 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1347,7 +1347,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of swapspace 1.17:";; + short | recursive ) echo "Configuration of swapspace 1.18:";; esac cat <<\_ACEOF @@ -1380,7 +1380,7 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . swapspace home page: . _ACEOF ac_status=$? @@ -1444,7 +1444,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -swapspace configure 1.17 +swapspace configure 1.18 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1604,7 +1604,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## --------------------------------- ## -## Report this to tookmund@gmail.com ## +## Report this to jacob@tookmund.com ## ## --------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; @@ -1867,7 +1867,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by swapspace $as_me 1.17, which was +It was created by swapspace $as_me 1.18, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2420,12 +2420,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -2730,7 +2725,7 @@ # Define the identity of the package. PACKAGE='swapspace' - VERSION='1.17' + VERSION='1.18' cat >>confdefs.h <<_ACEOF @@ -5527,7 +5522,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by swapspace $as_me 1.17, which was +This file was extended by swapspace $as_me 1.18, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5587,14 +5582,14 @@ Configuration commands: $config_commands -Report bugs to . +Report bugs to . swapspace home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -swapspace config.status 1.17 +swapspace config.status 1.18 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -6404,7 +6399,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } diff -Nru swapspace-1.17/configure.ac swapspace-1.18/configure.ac --- swapspace-1.17/configure.ac 2020-05-21 21:49:30.000000000 +0000 +++ swapspace-1.18/configure.ac 2022-10-08 22:31:01.000000000 +0000 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([swapspace], [1.17], [tookmund@gmail.com],[swapspace],[https://github.com/Tookmund/swapspace]) +AC_INIT([swapspace], [1.18], [jacob@tookmund.com],[swapspace],[https://github.com/Tookmund/swapspace]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src]) AC_CONFIG_HEADERS([src/config.h]) diff -Nru swapspace-1.17/debian/changelog swapspace-1.18/debian/changelog --- swapspace-1.17/debian/changelog 2020-05-21 22:05:16.000000000 +0000 +++ swapspace-1.18/debian/changelog 2023-01-22 20:50:16.000000000 +0000 @@ -1,3 +1,10 @@ +swapspace (1.18-1) unstable; urgency=medium + + * New upstream version + * Bump standards version to 4.6.2, no changes required + + -- Jacob Adams Sun, 22 Jan 2023 15:50:16 -0500 + swapspace (1.17-1) unstable; urgency=medium * New upstream version diff -Nru swapspace-1.17/debian/control swapspace-1.18/debian/control --- swapspace-1.17/debian/control 2020-05-21 22:05:16.000000000 +0000 +++ swapspace-1.18/debian/control 2023-01-22 20:50:16.000000000 +0000 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Jacob Adams Build-Depends: debhelper (>= 13), debhelper-compat (= 13) -Standards-Version: 4.5.0 +Standards-Version: 4.6.2 Rules-Requires-Root: no Homepage: https://github.com/Tookmund/Swapspace Vcs-Git: https://salsa.debian.org/tookmund/swapspace-deb.git diff -Nru swapspace-1.17/debian/upstream/signing-key.asc swapspace-1.18/debian/upstream/signing-key.asc --- swapspace-1.17/debian/upstream/signing-key.asc 2020-05-21 22:04:51.000000000 +0000 +++ swapspace-1.18/debian/upstream/signing-key.asc 2023-01-22 20:50:16.000000000 +0000 @@ -24,86 +24,76 @@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7QerPEw7i+fNjgb7P4Y3zVMS4/Dtct/8kCF9YSMlXIWJmJ/nMx/Mp+MGIw +ax2plgODNhxTSt8J4kGj28d4wP53vaOrL9E2c7KqV51H5/hFM7p2k0jXRxzGR5bo +s8+Vma15qZV5LBTOAh1xfD4URbeQM+AAhdlcvzKwOZhEt1GC4Bheh/rR8cINHZFb +nbxHpCvnamLNN5O/3K+6xjsXSpHR9/dCS+QHYnL6jXhJ2EQt0iW7xRpeeOVt0sRd +fjmpfZv5uFVuxZgl7+Zi4Cs0RU7ijPHCQkrmnP8ZJtmvwkSC59bfad/KDWzX3yVz +DfSiPzoVy/9nMuNmSEX4EXx68fv4Spc4GmFbYYHgEjVOb4ivegz2CdJQOwbE5ZRa +0gGSQ+gkMaN2aJzQQ8ts++IAGuC1gePd3VAqJjlzRwPe5hhu33KWL0w= +=q1vY -----END PGP PUBLIC KEY BLOCK----- diff -Nru swapspace-1.17/debian/watch swapspace-1.18/debian/watch --- swapspace-1.17/debian/watch 2020-05-21 22:04:51.000000000 +0000 +++ swapspace-1.18/debian/watch 2023-01-22 20:46:50.000000000 +0000 @@ -1,3 +1,5 @@ version=4 -opts=pgpsigurlmangle=s/$/.sig/ \ - https://github.com/tookmund/swapspace/releases .*/download/v?(\d\S+)/swapspace-.*\.tar\.gz +opts=downloadurlmangle=s/archive\/refs\/tags\/v(.*)\.tar\.gz/releases\/download\/v$1\/@PACKAGE@-$1\.tar\.gz/,\ +pgpsigurlmangle=s/$/.sig/,\ +filenamemangle=s/.*\/v(.*)/swapspace-$1/ \ +https://github.com/tookmund/swapspace/tags .*/archive/refs/tags/v([\d\.]+)\.tar\.gz diff -Nru swapspace-1.17/doc/release.md swapspace-1.18/doc/release.md --- swapspace-1.17/doc/release.md 1970-01-01 00:00:00.000000000 +0000 +++ swapspace-1.18/doc/release.md 2022-01-22 23:26:55.000000000 +0000 @@ -0,0 +1,31 @@ +# Swapspace release process +1. TEST! See below. +2. Update version number in NEWS with new features and changes. +3. Commit just the NEWS file as "Version x.xx" +4. Tag the previous commit as "vx.xx" and sign it using: `git tag -s vx.xx` + +## Swapspace test scenarios + +This list contains all the tests that should be run before a release +of Swapspace, to avoid situations like the 1.15-1.16 release snafu. + +Make sure to bump the version number and `make distcheck`, +then move that tarball to the test machine. + +### Scenarios +1. `hog` should be used to trigger swapspace to eventually create a swapfile. + +Eventually, I would like to test more scenarios with more complexity, +but this would all need to be automated first. + +Make sure to run `swapspace -e` between tests! + +### Filesystems +Use `blkid` to check which partition is which. + +1. btrfs (first thing to test, since it requires more complex support) + 1. Set compression flag set on the swapfile directory + 2. Unset NOCOW flag on the swapfile directory +2. ext4 +3. xfs +4. f2fs diff -Nru swapspace-1.17/Makefile.in swapspace-1.18/Makefile.in --- swapspace-1.17/Makefile.in 2020-05-21 21:59:37.000000000 +0000 +++ swapspace-1.18/Makefile.in 2022-10-08 22:35:58.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -224,6 +224,8 @@ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -566,6 +568,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -608,6 +614,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -623,7 +631,7 @@ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -787,7 +795,7 @@ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-tags \ + dist-zstd distcheck distclean distclean-generic distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-local install-dvi install-dvi-am \ diff -Nru swapspace-1.17/NEWS swapspace-1.18/NEWS --- swapspace-1.17/NEWS 2020-05-21 21:25:24.000000000 +0000 +++ swapspace-1.18/NEWS 2022-10-08 22:34:57.000000000 +0000 @@ -1,3 +1,9 @@ +v1.18 +===== ++ Support BTRFS via inode attributes ++ Handle misconfiguration of inode attributes on swapfile directory ++ Use available memory provided by the kernel if present + v1.17 ===== + Automatically fall back to slow swapfiles, removing --zero manual option diff -Nru swapspace-1.17/README swapspace-1.18/README --- swapspace-1.17/README 2020-05-21 21:13:45.000000000 +0000 +++ swapspace-1.18/README 2021-06-15 20:59:36.000000000 +0000 @@ -8,7 +8,7 @@ Where to start -------------- -If you cloned this repo be sure to run `autoreconf` to make the configure script. +If you cloned this repo be sure to run `autoreconf -i` to make the configure script. If you downloaded a tarball from github the configure script should be there already. For detailed installation instructions see `INSTALL`, but it usually just diff -Nru swapspace-1.17/src/Makefile.in swapspace-1.18/src/Makefile.in --- swapspace-1.17/src/Makefile.in 2020-05-21 21:59:37.000000000 +0000 +++ swapspace-1.18/src/Makefile.in 2022-10-08 22:35:58.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -150,8 +150,8 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. diff -Nru swapspace-1.17/src/memory.c swapspace-1.18/src/memory.c --- swapspace-1.17/src/memory.c 2018-04-13 17:56:20.000000000 +0000 +++ swapspace-1.18/src/memory.c 2022-10-08 22:31:01.000000000 +0000 @@ -39,7 +39,7 @@ /// Upper bound to percentage of memory/swap space kept available static int upper_freelimit=60; -/// Configuration item: target percentage of available space after adding swap +/// Configuration item: target percentage of available space after adding swap static int freetarget=30; /// Configuration item: what percentage of buffer space do we consider "free"? @@ -50,6 +50,9 @@ /// Configuration item: what percentage of cache space do we consider "free"? static int cache_elasticity=80; +// Track whether MemAvailable is present in /proc/meminfo +static bool kernel_mem_available = false; + #ifndef NO_CONFIG char *set_freetarget(long long pct) { @@ -204,6 +207,7 @@ { memsize_t MemTotal, MemFree, + MemAvailable, Buffers, Cached, Dirty, @@ -233,6 +237,11 @@ { if (strcmp(inf->entry+3, "Total")==0) st->MemTotal = inf->value; else if (strcmp(inf->entry+3, "Free")==0) st->MemFree = inf->value; + else if (strcmp(inf->entry+3, "Available")==0) + { + kernel_mem_available = true; + st->MemAvailable = inf->value; + } } break; case 'S': @@ -268,7 +277,7 @@ log_perr(LOG_ERR, inf.entry, inf.value); return false; } - + if (unlikely(!s->MemTotal)) { logm(LOG_ERR, @@ -345,11 +354,15 @@ * Pressure") which says how much of the non-dirty part of Cache should be * considered in-use. */ - return st->MemFree + - st->SwapFree + - st->SwapCached + - buffers_free(st) + - cache_free(st); + if (kernel_mem_available) { + return st->MemAvailable + st->SwapFree; + } else { + return st->MemFree + + st->SwapFree + + st->SwapCached + + buffers_free(st) + + cache_free(st); + } } static inline memsize_t space_total(const struct memstate *st) @@ -396,11 +409,11 @@ * freespace and totalspace by some constant p, and multiplying by this same p * afterwards: * - * x/p = (100*freespace/p - freetarget*totalspace/p) / (freetarget-100) + * x/p = (100*freespace/p - freetarget*totalspace/p) / (freetarget-100) * - * The natural choice for p is 100, since it gives up the exact minimum + * The natural choice for p is 100, since it gives up the exact minimum * precision while ensuring that both 100*freespace/p and (given that - * freetarget<100) freetarget*totalspace/p remain within the range of + * freetarget<100) freetarget*totalspace/p remain within the range of * representable numbers, assuming that freespace and totalspace were * themselves representable to begin with. * @@ -500,5 +513,3 @@ pf, upper_freelimit); } - - diff -Nru swapspace-1.17/src/opts.c swapspace-1.18/src/opts.c --- swapspace-1.17/src/opts.c 2020-05-21 21:26:52.000000000 +0000 +++ swapspace-1.18/src/opts.c 2022-10-08 22:26:58.000000000 +0000 @@ -41,6 +41,7 @@ static const char copyright[] = "\n" "Copyright (c) 2004-2006 Software Industry Promotion Agency of Thailand\n" "Copyright (c) 2010 Jeroen T. Vermeulen\n" + "Copyright (c) 2014-2021 Jacob Adams\n" "Written by Jeroen T. Vermeulen\n" "This program is free software, and is available for use under the GNU\n" "General Public License (GPL).\n" diff -Nru swapspace-1.17/src/swaps.c swapspace-1.18/src/swaps.c --- swapspace-1.17/src/swaps.c 2020-05-21 21:55:27.000000000 +0000 +++ swapspace-1.18/src/swaps.c 2022-01-22 23:26:55.000000000 +0000 @@ -3,7 +3,7 @@ Copyright (C) 2005,2006, Software Industry Industry Promotion Agency (SIPA) Copyright (C) 2010, Jeroen T. Vermeulen -Copyright (C) 2019, Jacob Adams +Copyright (C) 2019,2021, Jacob Adams Written by Jeroen T. Vermeulen. Swapspace is free software; you can redistribute it and/or modify @@ -55,7 +55,7 @@ #define O_LARGEFILE 0 #endif -// Don't follow symlinks, if possible; they may pose a security risk +// Don't follow symlinks, if possible; they may pose a security risk #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif @@ -157,8 +157,6 @@ return false; } - swappath_len = strlen(swappath); - #ifndef NO_CONFIG // Get rid of any "/./", "//", and "/../" clutter that might be in swappath. // This is needed because we want to recognize our swapfiles in /proc/swaps, @@ -169,6 +167,8 @@ return false; } + swappath_len = strlen(swappath); + // Remove trailing slash, if any if (swappath[swappath_len-1] == '/') { @@ -180,28 +180,86 @@ logm(LOG_ERR, "Not supported: swap path contains whitespace"); return false; } +#else + swappath_len = strlen(swappath); #endif + return swapdir_config(); +} + + +/// Configure permissions and attributes correctly on the swap directory +bool swapdir_config(void) { + int fd = open(swappath, O_RDONLY); + if (fd < 0) { + log_perr(LOG_ERR, "Unable to open swap directory", errno); + return false; + } struct stat swapdirstat; mode_t mode = S_IFDIR | S_IRUSR | S_IWUSR | S_IXUSR; - if (stat(swappath, &swapdirstat) < 0) + if (fstat(fd, &swapdirstat) < 0) { - log_perr(LOG_ERR, "Unable to stat swap path", errno); + log_perr(LOG_ERR, "Unable to stat swap directory", errno); return false; } if (swapdirstat.st_mode != mode) { - logm(LOG_WARNING, "Swap file directory permissions wrong, fixing"); + logm(LOG_WARNING, "Swap directory permissions wrong, fixing"); if (verbose) { logm(LOG_DEBUG, "Actual: %o\nExpected: %o", swapdirstat.st_mode, mode); } if (chmod(swappath, mode) < 0) { - log_perr(LOG_ERR, "Unable to change swap file directory permissions", errno); + log_perr(LOG_ERR, "Unable to change swap directory permissions", errno); return false; } } + int attr; + int err = ioctl(fd, FS_IOC_GETFLAGS, &attr); + if (err != 0) + { + // Don't worry about attributes if they're not supported + if(errno != ENOTSUP) + { + log_perr(LOG_NOTICE, "Unable to get swap path attributes, " + "may not be able to create swap files", errno); + } + return true; + } + + + // Unset compression, if set + if (attr & FS_COMPR_FL) + { + if (verbose) + { + logm(LOG_NOTICE, "Compression set on swap directory, fixing"); + } + attr &= ~FS_COMPR_FL; + err = ioctl(fd, FS_IOC_SETFLAGS, &attr); + if (err != 0 && errno != ENOTSUP) + { + log_perr(LOG_NOTICE, "Unable to unset compression, " + "may not be able to create swap files", errno); + } + } + + // Ensure NOCOW is set, though only needed for btrfs + if (!(attr & FS_NOCOW_FL)) + { + if (verbose) + { + logm(LOG_NOTICE, "NOCOW not set on swap directory, fixing"); + } + attr |= FS_NOCOW_FL; + err = ioctl(fd, FS_IOC_SETFLAGS, &attr); + if (err != 0 && errno != ENOTSUP) + { + log_perr(LOG_NOTICE, "Unable to set NOCOW, " + "may not be able to create swap files", errno); + } + } return true; } @@ -235,14 +293,6 @@ /// Can we allocate swapfiles using posix_allocate on this filesystem? static bool pfalloc_ok = true; -/* Store filesystem type so we don't check everytime we allocate a swapfile - * __fsword_t is a glibc-internal type, but the docs claim unsigned int is fine - */ -static unsigned int fstype = 0; - -/// Does the filesystem support the NOCOW attribute? -static bool nocow_ok = true; - /// Print status information to stdout void dump_stats(void) { @@ -433,70 +483,11 @@ return bytes; } -/// Ensure COW updates don't apply to swapfiles. -/* Only needed to BTRFS and other COW filesystems. - * But can't hurt to apply everywhere. - */ -int set_no_cow(int fd) -{ - int attr; - int err; - - err = ioctl(fd, FS_IOC_GETFLAGS, &attr); - if (err != 0) - { - if (errno == ENOTSUP) - { - nocow_ok = false; - logm(LOG_NOTICE, "Filesystem does not support attributes!"); - } - else return err; - } - attr |= FS_NOCOW_FL; - err = ioctl(fd, FS_IOC_SETFLAGS, &attr); - if (err != 0) - { - if (errno == ENOTSUP) - { - nocow_ok = false; - logm(LOG_NOTICE, "NOCOW attribute not supported!"); - } - else return err; - } - return 0; -} - - -/// Handle filesystem-specific operations needed for swapfiles -/* Some filesystems, like BTRFS, require special operations to be performed on - * files before they can be used as swapfiles - * Clobbers localbuf if special operations are performed - */ -void specialfs(const char path[]) -{ - int err; - /* All swapfiles exist on the same filesystem, so we should only need to - * call this once - */ - if (fstype == 0) - { - struct statfs buf; - err = statfs(path, &buf); - if (err == 0) fstype = buf.f_type; - else log_perr_str(LOG_WARNING, "Could not detect filesystem", path, errno); - } - if (fstype == BTRFS_SUPER_MAGIC) - { - err = runcommandformat("%s property set '%s' compression none", "btrfs", path); - if (err != 0) logm(LOG_WARNING, "Could not disable BTRFS compression! Return Code: %d", err); - } -} - /// Create file to be used as swap. Clobbers localbuf. /** * @param filename File to be created * @param size Desired size in bytes (but already rounded to page size) - * @return Size of new swapfile, which may differ from requested size. Zero + * @return Size of new swapfile, which may differ from requested size. Zero * indicates failure, in which case the file is deleted. */ static memsize_t make_swapfile(const char file[], memsize_t size) @@ -519,21 +510,13 @@ return 0; } - if (nocow_ok) - { - int err = set_no_cow(fd); - if (unlikely(err != 0)) log_perr_str(LOG_WARNING, "Could not disable COW", file, errno); - } - - specialfs(file); - if (unlikely(!fill_swapfile(file, fd, size))) { size = 0; unlink(file); } close(fd); - + return size; } @@ -595,7 +578,7 @@ #ifndef NO_CONFIG if (!quiet) logm(LOG_INFO, "Found old swapfile '%d'", seqno); #endif - const memsize_t size = filesize(d->d_name); + const memsize_t size = filesize(d->d_name); if (likely(size > min_swapsize && enable_swapfile(d->d_name))) { swapfiles[seqno].size = size; diff -Nru swapspace-1.17/src/swaps.h swapspace-1.18/src/swaps.h --- swapspace-1.17/src/swaps.h 2018-04-13 17:56:20.000000000 +0000 +++ swapspace-1.18/src/swaps.h 2022-01-22 23:25:28.000000000 +0000 @@ -93,5 +93,6 @@ #endif bool to_swapdir(void); +bool swapdir_config(void); #endif