[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1040623: bookworm-pu: package bup/0.33.2-1+deb12u1



Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: bup@packages.debian.org, rlb@defaultvalue.org
Control: affects -1 + src:bup

Hi,

[ Reason ]
I'd like to update the version of bup in bookworm from 0.33-2 to
0.33.2-1+deb12u1, which incorporates two upstream bugfix releases for a
bug deemed important enough by upstream to issue point releases.

Quoting from the upstream release notes:

0.33.1:

* POSIX1e ACLs should be restored correctly now.  Previously there
  were two problems.

  First, bup incorrectly restored default (`ACL_TYPE_DEFAULT`) ACLs as
  access acls (`ACL_TYPE_ACCESS`).  When both existed, it restored the
  access ACL first and then the default ACL as an access ACL.  Now,
  bup should restore each with the proper type.  This issue only
  affects saves created on platforms where bup currently supports
  ACLs, so presumably mostly just saves created on Linux since the
  current ACL support depends on non-standard functions like
  `acl_extended(3)`.

  Second, bup stored ACLs in the `acl_to_any_text(3)` format with a
  newlne delimiter, when the standard (and `acl_from_text(3)` which
  restore depends on) requires commas.  Now bup uses commas, and
  translates previously created saves during restore when possible.
  If a previously created ACL entry contains a comma, then bup will
  give up, report an error, and skip it.  If nothing else, this could
  cause restores of relevant saves to fail on some platforms.

0.33.2:

* The fix for the POSIX1e ACL issue addressed by 0.33.1 should no
  longer crash due to a missing path argument.

[ Impact ]
See above; without the fix, backed up files with both default and access
ACLs would be restored incorrectly.

[ Tests ]
bup has an extensive test suite that is run by upstream's CI on multiple
platforms, and by the Debian buildd's when a new Debian release is
uploaded. New tests specifically cover this bug. I tested the updated
package on a machine running bookworm.

[ Risks ]
The bug fix is fairly short, but may not make much sense unless you
understand POSIX.1e ACLs. There is a risk with any update to the bup
package that saves or restores might begin erroring out, etc.; this
occurred in the initial upstream fix (0.33.1) which was corrected by the
followup fix (0.33.2). However, bup tries very hard not to lose data,
and the risk of losing data due to this package update is likely to be
much lower than the risk of breaking new saves or restores.

The upstream 0.33.1 and 0.33.2 releases were specifically targeted at
this issue and there aren't any unrelated changes like there would be in
a typical bup release which would contain many changes.

There are no real alternatives here other than not updating the package.
If a user is affected by an incorrect restore due to this bug, they
would need to identify that the ACLs had been incorrectly restored, then
find out about the issue in the old version of bup that they are
running, install a fixed version of bup, and then re-do their restore.
If they don't do so, they might run a system with files with incorrect
ACLs, which could open a security hole.

[ Checklist ]
  [✔] *all* changes are documented in the d/changelog
  [✔] I reviewed all changes and I approve them
  [✔] attach debdiff against the package in (old)stable
  [✔] the issue is verified as fixed in unstable

[ Changes ]
The upstream releases 0.33.1 and 0.33.2 were imported to the Debian
package, containing the bug fix (0.33.1), the updated bug fix (0.33.2),
some related fixes to the test infrastructure, and the test case.

The upstream shortlog:

Rob Browning (17):
      conftest.py: switch to Path to support pytest 7+
      conftest.py: restore support for pytest < 7
      configure: handle relative MAKE paths
      test_get: remove vestigial debug messages
      configure: allow and prefer python3.11-config; ignore 3.6
      buptest init: get quote from shlex not pipes
      test-comparative-split-join: accommodate varying HEAD names
      cirrus: move to freebsd 12.4 to fix rsync-related test failures
      compare-trees: add --features and disallow args with it and -h
      Restore posix1e default acls as default, not access; improve tests
      Fix ACL metadata format; delimit short form entries with commas
      Update docs for 0.33.1 release
      Update base_version for 0.33.1 release
      Update base_version for 0.33.2 development
      correct_posix1e_v1_delimiters: provide path for error messages
      Update docs for 0.33.2 release
      Update base_version for 0.33.2 release

[ Other info ]
Debian bug reports related to this release:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1038609

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1039089
diff -Nru bup-0.33/.cirrus.yml bup-0.33.2/.cirrus.yml
--- bup-0.33/.cirrus.yml	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/.cirrus.yml	2023-07-01 16:08:43.000000000 -0400
@@ -48,7 +48,7 @@
 task:
   name: freebsd check
   freebsd_instance:
-    image: freebsd-12-2-release-amd64
+    image: freebsd-12-4-release-amd64
     cpu: 4
     memory: 4
   script: |
diff -Nru bup-0.33/.github/CONTRIBUTING.md bup-0.33.2/.github/CONTRIBUTING.md
--- bup-0.33/.github/CONTRIBUTING.md	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/.github/CONTRIBUTING.md	2023-07-01 16:08:43.000000000 -0400
@@ -1,3 +1,3 @@
 
-Please see https://github.com/bup/bup/blob/master/HACKING
+Please see https://github.com/bup/bup/blob/main/HACKING
 
diff -Nru bup-0.33/.github/PULL_REQUEST_TEMPLATE bup-0.33.2/.github/PULL_REQUEST_TEMPLATE
--- bup-0.33/.github/PULL_REQUEST_TEMPLATE	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/.github/PULL_REQUEST_TEMPLATE	2023-07-01 16:08:43.000000000 -0400
@@ -11,7 +11,7 @@
 we'll be able to include your work in the project.  See
 ./SIGNED-OFF-BY for the meaning:
 
-  https://github.com/bup/bup/blob/master/SIGNED-OFF-BY
+  https://github.com/bup/bup/blob/main/SIGNED-OFF-BY
 
 After you submit the pull request, someone will eventually redirect it
 to the list for review, and you will of course be included in the
@@ -21,5 +21,5 @@
 equivalent), please post your patches to the list as described in the
 "Submitting Patches" section in ./HACKING:
 
-  https://github.com/bup/bup/blob/master/HACKING
+  https://github.com/bup/bup/blob/main/HACKING
 
diff -Nru bup-0.33/HACKING bup-0.33.2/HACKING
--- bup-0.33/HACKING	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/HACKING	2023-07-01 16:08:43.000000000 -0400
@@ -4,8 +4,9 @@
 Code Branching Model
 ====================
 
-The master branch is what we consider the main-line of development,
-and the last, non-rc tag on master is the most recent stable release.
+The main branch is the development branch, and stable releases are
+tagged either from there, or from `VERSION.x` branches, created as
+needed, for example `0.33.x`.
 
 Any branch with a "tmp/" prefix might be rebased (often), so keep that
 in mind when using or depending on one.
@@ -64,7 +65,7 @@
 
 In most cases, we try to wait until we have at least one or two
 "Reviewed-by:" replies to a patch posted to the list before
-incorporating it into master, so reviews are an important way to help.
+incorporating it into main, so reviews are an important way to help.
 We also love a good "Tested-by:" -- the more the merrier.
 
 
@@ -108,9 +109,9 @@
 inclusion (see ./SIGNED-OFF-BY).  You can create a "signed off" set of
 patches in ./patches, ready for submission to the list, like this:
 
-    git format-patch -s -o patches origin/master
+    git format-patch -s -o patches origin/main
 
-which will include all of the patches since origin/master on your
+which will include all of the patches since origin/main on your
 current branch.  Then you can send them to the list like this:
 
     git send-email --to bup-list@googlegroups.com --compose patches/*
@@ -120,7 +121,7 @@
 
 It's also possible to handle everything in one step:
 
-    git send-email -s --to bup-list@googlegroups.com --compose origin/master
+    git send-email -s --to bup-list@googlegroups.com --compose origin/main
 
 and you can add --annotate if you'd like to review or edit each patch
 before it's sent.
diff -Nru bup-0.33/README bup-0.33.2/README
--- bup-0.33/README	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/README	2023-07-01 16:08:43.000000000 -0400
@@ -86,6 +86,8 @@
 Notable changes introduced by a release
 =======================================
 
+ - <a href="note/0.33.2-from-0.33.1.md">Changes in 0.33.2 as compared to 0.33.1</a>
+ - <a href="note/0.33.1-from-0.33.md">Changes in 0.33.1 as compared to 0.33</a>
  - <a href="note/0.33-from-0.32.md">Changes in 0.33 as compared to 0.32</a>
  - <a href="note/0.32-from-0.31.md">Changes in 0.32 as compared to 0.31</a>
  - <a href="note/0.31-from-0.30.1.md">Changes in 0.31 as compared to 0.30.1</a>
@@ -103,9 +105,9 @@
 Test status
 ===========
 
-| master |
+| main |
 |--------|
-| [![master branch test status](https://api.cirrus-ci.com/github/bup/bup.svg?branch=master)](https://cirrus-ci.com/github/bup/bup) |
+| [![main branch test status](https://api.cirrus-ci.com/github/bup/bup.svg?branch=main)](https://cirrus-ci.com/github/bup/bup) |
 
 Getting started
 ===============
@@ -119,12 +121,12 @@
     git clone https://github.com/bup/bup
     ```
 
- - This will leave you on the master branch, which is perfect if you
+ - This will leave you on the main branch, which is perfect if you
    would like to help with development, but if you'd just like to use
    bup, please check out the latest stable release like this:
 
     ```sh
-    git checkout 0.33
+    git checkout 0.33.2
     ```
 
    You can see the latest stable release here:
diff -Nru bup-0.33/README.md bup-0.33.2/README.md
--- bup-0.33/README.md	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/README.md	2023-07-01 16:08:43.000000000 -0400
@@ -86,6 +86,8 @@
 Notable changes introduced by a release
 =======================================
 
+ - <a href="note/0.33.2-from-0.33.1.md">Changes in 0.33.2 as compared to 0.33.1</a>
+ - <a href="note/0.33.1-from-0.33.md">Changes in 0.33.1 as compared to 0.33</a>
  - <a href="note/0.33-from-0.32.md">Changes in 0.33 as compared to 0.32</a>
  - <a href="note/0.32-from-0.31.md">Changes in 0.32 as compared to 0.31</a>
  - <a href="note/0.31-from-0.30.1.md">Changes in 0.31 as compared to 0.30.1</a>
@@ -103,9 +105,9 @@
 Test status
 ===========
 
-| master |
+| main |
 |--------|
-| [![master branch test status](https://api.cirrus-ci.com/github/bup/bup.svg?branch=master)](https://cirrus-ci.com/github/bup/bup) |
+| [![main branch test status](https://api.cirrus-ci.com/github/bup/bup.svg?branch=main)](https://cirrus-ci.com/github/bup/bup) |
 
 Getting started
 ===============
@@ -119,12 +121,12 @@
     git clone https://github.com/bup/bup
     ```
 
- - This will leave you on the master branch, which is perfect if you
+ - This will leave you on the main branch, which is perfect if you
    would like to help with development, but if you'd just like to use
    bup, please check out the latest stable release like this:
 
     ```sh
-    git checkout 0.33
+    git checkout 0.33.2
     ```
 
    You can see the latest stable release here:
diff -Nru bup-0.33/config/configure bup-0.33.2/config/configure
--- bup-0.33/config/configure	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/config/configure	2023-07-01 16:08:43.000000000 -0400
@@ -86,6 +86,12 @@
 
 bup-add-cflag-if-supported -Wno-unused-command-line-argument
 
+# Since ./configure changes pwd, fix MAKE if it's relative
+case "$MAKE" in
+    /*) ;;
+    */*) MAKE="../../$MAKE";;
+esac
+
 for make_candidate in make gmake; do
     found_make="$(bup_find_prog "$make_candidate" "$MAKE")"
     if test "$found_make" \
@@ -119,7 +125,7 @@
                          "$BUP_PYTHON_CONFIG")
     fi
 else
-    for py_min_ver in 10 9 8 7 6; do
+    for py_min_ver in 11 10 9 8 7; do
         bup_python_config="$(bup_find_prog "python3.$py_min_ver-config" '')"
         test -z "$bup_python_config" || break
     done
diff -Nru bup-0.33/debian/changelog bup-0.33.2/debian/changelog
--- bup-0.33/debian/changelog	2022-12-26 22:27:53.000000000 -0500
+++ bup-0.33.2/debian/changelog	2023-07-08 01:17:38.000000000 -0400
@@ -1,3 +1,50 @@
+bup (0.33.2-1+deb12u1) bookworm; urgency=medium
+
+  * Upstream version 0.33.2, with a fix for a problem that can cause POSIX.1e
+    ACLs to be restored incorrectly.
+
+ -- Robert Edmonds <edmonds@debian.org>  Sat, 08 Jul 2023 01:17:38 -0400
+
+bup (0.33.2-1) unstable; urgency=medium
+
+  [ Rob Browning ]
+  * 0.33.2
+    - Update base_version for 0.33.2 development
+    - correct_posix1e_v1_delimiters: provide path for error messages
+      (Closes: #1039089)
+    - Update docs for 0.33.2 release
+    - Update base_version for 0.33.2 release
+
+  [ Robert Edmonds ]
+  * New upstream version 0.33.2
+  * debian/docs: Include upstream release note '0.33.2-from-0.33.1.md'
+
+ -- Robert Edmonds <edmonds@debian.org>  Sat, 01 Jul 2023 18:51:02 -0400
+
+bup (0.33.1-1) unstable; urgency=medium
+
+  [ Rob Browning ]
+  * 0.33.1
+    - conftest.py: switch to Path to support pytest 7+
+    - conftest.py: restore support for pytest < 7
+    - configure: handle relative MAKE paths
+    - test_get: remove vestigial debug messages
+    - configure: allow and prefer python3.11-config; ignore 3.6
+    - buptest init: get quote from shlex not pipes
+    - test-comparative-split-join: accommodate varying HEAD names
+    - cirrus: move to freebsd 12.4 to fix rsync-related test failures
+    - compare-trees: add --features and disallow args with it and -h
+    - Restore posix1e default acls as default, not access; improve tests
+    - Fix ACL metadata format; delimit short form entries with commas
+    - Update docs for 0.33.1 release
+    - Update base_version for 0.33.1 release
+
+  [ Robert Edmonds ]
+  * New upstream version 0.33.1 (Closes: #1038609)
+  * debian/docs: Include upstream release note '0.33.1-from-0.33.md'
+
+ -- Robert Edmonds <edmonds@debian.org>  Sun, 18 Jun 2023 19:57:44 -0400
+
 bup (0.33-2) unstable; urgency=medium
 
   * Upload to unstable.
diff -Nru bup-0.33/debian/docs bup-0.33.2/debian/docs
--- bup-0.33/debian/docs	2022-12-26 22:27:53.000000000 -0500
+++ bup-0.33.2/debian/docs	2023-07-08 01:17:38.000000000 -0400
@@ -1,2 +1,4 @@
 README
 README.md
+note/0.33.1-from-0.33.md
+note/0.33.2-from-0.33.1.md
diff -Nru bup-0.33/debian/patches/debian-changes bup-0.33.2/debian/patches/debian-changes
--- bup-0.33/debian/patches/debian-changes	2022-12-26 22:27:53.000000000 -0500
+++ bup-0.33.2/debian/patches/debian-changes	2023-07-08 01:17:38.000000000 -0400
@@ -3,8 +3,8 @@
 in some VCS, and exported as a single patch instead of more manageable
 atomic patches.
 
---- bup-0.33.orig/GNUmakefile
-+++ bup-0.33/GNUmakefile
+--- bup-0.33.2.orig/GNUmakefile
++++ bup-0.33.2/GNUmakefile
 @@ -61,7 +61,7 @@ else
    test_tmp := $(CURDIR)/test/tmp
  endif
@@ -23,11 +23,11 @@
    $(current_sampledata)
  
  $(current_sampledata):
---- bup-0.33.orig/lib/bup/source_info.py
-+++ bup-0.33/lib/bup/source_info.py
+--- bup-0.33.2.orig/lib/bup/source_info.py
++++ bup-0.33.2/lib/bup/source_info.py
 @@ -1,3 +1,3 @@
--commit='aa881896348ae487d6912d955be8113d9121e34e'
--date='2022-10-16 16:18:38 -0500'
-+commit='c721009bc9c949dfb4eb10a6cecc4b78716cf2b0'
-+date='2022-12-26 22:28:18 -0500'
+-commit='b1c19fb0142ac4bdc60b07640734e0c2d256f423'
+-date='2023-07-01 15:08:43 -0500'
++commit='61307904e4133b55acf7c2794da47fafecedf5af'
++date='2023-07-08 01:27:47 -0400'
  modified=False
diff -Nru bup-0.33/dev/compare-trees bup-0.33.2/dev/compare-trees
--- bup-0.33/dev/compare-trees	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/dev/compare-trees	2023-07-01 16:08:43.000000000 -0400
@@ -7,7 +7,10 @@
 
 usage() {
 cat <<EOF
-Usage: compare-trees [-h] [-c] [-x] SOURCE DEST
+Usage:
+   compare-trees [-c] [-x] [--] SOURCE DEST
+   compare-trees --features
+   compare-trees -h
 OPTIONS:
   -h
     Display help
@@ -18,50 +21,58 @@
   --times
   --no-times
     Check or don't check timestamps (checking is the default)
+  --features
+    Show enabled features
+  --
+    Don't treat following arguments as options (e.g. compare-trees -- -c dest)
 EOF
 }
 
+show_features=''
 verify_content=" --checksum"
 verify_times=' --times'
 
-while test $# -gt 0; do
-    case "$1" in
-        -h) usage; exit 0;;
-        -c) verify_content=" --checksum"; shift;;
-        -x) verify_content=""; shift;;
-        --times) verify_times=' --times'; shift;;
-        --no-times) verify_times=''; shift;;
-        -*) usage 1>&2; exit 2;;
-        [^-]*) break;;
-    esac
-done
+case "$#/${1:-}" in
+    1/-h) usage; exit 0;;
+    1/--features) show_features=yes; shift;;
+    *)
+        while test $# -gt 0; do
+            case "$1" in
+                -h|--features) usage 1>&2; exit 2;;
+                -c) verify_content=" --checksum"; shift;;
+                -x) verify_content=""; shift;;
+                --times) verify_times=' --times'; shift;;
+                --no-times) verify_times=''; shift;;
+                --) shift; break;;
+                [^-]*) break;;
+            esac
+        done
+esac
 
-if ! test $# -eq 2
-then
+if test $# -ne 2 -a -z "$show_features"; then
     usage 1>&2
     exit 2
 fi
 
-src="$1"
-dest="$2"
-
-tmpfile="$(mktemp /tmp/bup-test-XXXXXXX)" || exit $?
-trap "rm -rf '$tmpfile'" EXIT || exit $?
+src="${1:-}"
+dest="${2:-}"
 
 rsync_opts="-rlpgoD" # --archive, without --times
 rsync_opts="$rsync_opts -niH --delete"
 rsync_opts="$rsync_opts$verify_content"
 rsync_opts="$rsync_opts$verify_times"
 
+comparing_acls=''
 rsync_version=$(rsync --version)
 if [[ ! "$rsync_version" =~ "ACLs" ]] || [[ "$rsync_version" =~ "no ACLs" ]]; then
     echo "Not comparing ACLs (not supported by available rsync)" 1>&2
 else
-    case $OSTYPE in
+    case "$OSTYPE" in
         cygwin|darwin|netbsd)
             echo "Not comparing ACLs (not yet supported on $OSTYPE)" 1>&2
             ;;
         *)
+            comparing_acls=yes
             rsync_opts="$rsync_opts -A"
             ;;
     esac
@@ -74,6 +85,18 @@
     xattrs_available=yes
 fi
 
+if test "$show_features"; then
+    echo "POSIX ACLs: ${comparing_acls:-no}"
+    echo "Extended attributes (xattrs): ${xattrs_available:-no}"
+fi
+
+if test "$show_features"; then
+    exit 0
+fi
+
+tmpfile="$(mktemp /tmp/bup-test-XXXXXXX)" || exit $?
+trap "rm -rf '$tmpfile'" EXIT || exit $?
+
 # Even in dry-run mode, rsync may fail if -X is specified and the
 # filesystems don't support xattrs.
 
diff -Nru bup-0.33/lib/bup/_helpers.c bup-0.33.2/lib/bup/_helpers.c
--- bup-0.33/lib/bup/_helpers.c	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/lib/bup/_helpers.c	2023-07-01 16:08:43.000000000 -0400
@@ -2076,9 +2076,9 @@
     }
 
     *num = NULL;
-    *txt = acl_to_any_text(acl, "", '\n', TEXT_ABBREVIATE);
+    *txt = acl_to_any_text(acl, "", ',', TEXT_ABBREVIATE);
     if (*txt)
-        *num = acl_to_any_text(acl, "", '\n', TEXT_ABBREVIATE | TEXT_NUMERIC_IDS);
+        *num = acl_to_any_text(acl, "", ',', TEXT_ABBREVIATE | TEXT_NUMERIC_IDS);
 
     if (*txt && *num)
         return 0;
@@ -2142,7 +2142,8 @@
     return ret;
 }
 
-static int bup_apply_acl_string(const char *name, const char *s)
+static int
+bup_apply_acl_string(const char *name, acl_type_t type, const char *s)
 {
     acl_t acl = acl_from_text(s);
     int ret = 0;
@@ -2152,7 +2153,7 @@
         return -1;
     }
 
-    if (acl_set_file(name, ACL_TYPE_ACCESS, acl)) {
+    if (acl_set_file(name, type, acl)) {
         PyErr_SetFromErrno(PyExc_IOError);
         ret = -1;
     }
@@ -2169,10 +2170,10 @@
     if (!PyArg_ParseTuple(args, cstr_argf cstr_argf "|" cstr_argf, &name, &acl, &def))
 	return NULL;
 
-    if (bup_apply_acl_string(name, acl))
+    if (bup_apply_acl_string(name, ACL_TYPE_ACCESS, acl))
         return NULL;
 
-    if (def && bup_apply_acl_string(name, def))
+    if (def && bup_apply_acl_string(name, ACL_TYPE_DEFAULT, def))
         return NULL;
 
     Py_RETURN_NONE;
diff -Nru bup-0.33/lib/bup/metadata.py bup-0.33.2/lib/bup/metadata.py
--- bup-0.33/lib/bup/metadata.py	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/lib/bup/metadata.py	2023-07-01 16:08:43.000000000 -0400
@@ -187,13 +187,14 @@
 _rec_tag_path = 1
 _rec_tag_common_v1 = 2 # times, user, group, type, perms, etc. (legacy/broken)
 _rec_tag_symlink_target = 3
-_rec_tag_posix1e_acl = 4      # getfacl(1), setfacl(1), etc.
+_rec_tag_posix1e_acl_v1 = 4   # (broken \n delimited format, see v2 below)
 _rec_tag_nfsv4_acl = 5        # intended to supplant posix1e? (unimplemented)
 _rec_tag_linux_attr = 6       # lsattr(1) chattr(1)
 _rec_tag_linux_xattr = 7      # getfattr(1) setfattr(1)
 _rec_tag_hardlink_target = 8 # hard link target path
 _rec_tag_common_v2 = 9 # times, user, group, type, perms, etc. (current)
 _rec_tag_common_v3 = 10  # adds optional size to v2
+_rec_tag_posix1e_acl_v2 = 11     # getfacl(1), setfacl(1), etc.
 
 _warned_about_attr_einval = None
 
@@ -545,10 +546,36 @@
         else:
             return None
 
-    def _load_posix1e_acl_rec(self, port):
+    @staticmethod
+    def _correct_posix1e_v1_delimiters(acls, path):
+        assert acls
+        # The v0 format had newline delimiters which are incorrect for
+        # the ACL short text format we request, and which are rejected
+        # with EINVAL by acl_from_text() on some platforms.  For now,
+        # this function assumes (potentially incorrectly) that no
+        # field name (including the user and group names) contains a
+        # newline or comma.  If any field name does, then the results
+        # may be wrong.  (Debian, at least, disallows them.)
+        for i in range(len(acls)):
+            acl = acls[i]
+            if b',' in acl:
+                if path:
+                    msg = f'Unexpected comma in ACL entry; ignoring {acl!r}' \
+                        f' for {path_msg(path)}\n'
+                else:
+                    msg = f'Unexpected comma in ACL entry; ignoring {acl!r}\n'
+                add_error(msg)
+                return None
+            acls[i] = acl.replace(b'\n', b',')
+        return acls
+
+    def _load_posix1e_acl_rec(self, port, *, version):
+        assert version in (1, 2)
         acl_rep = vint.unpack('ssss', vint.read_bvec(port))
         if acl_rep[2] == b'':
             acl_rep = acl_rep[:2]
+        if version == 1:
+            acl_rep = self._correct_posix1e_v1_delimiters(acl_rep, self.path)
         self.posix1e_acl = acl_rep
 
     def _apply_posix1e_acl_rec(self, path, restore_numeric_ids=False):
@@ -800,7 +827,7 @@
                          self._encode_symlink_target()),
                         (_rec_tag_hardlink_target,
                          self._encode_hardlink_target()),
-                        (_rec_tag_posix1e_acl, self._encode_posix1e_acl()),
+                        (_rec_tag_posix1e_acl_v2, self._encode_posix1e_acl()),
                         (_rec_tag_linux_attr, self._encode_linux_attr()),
                         (_rec_tag_linux_xattr, self._encode_linux_xattr())])
         for tag, data in records:
@@ -836,8 +863,10 @@
                     result._load_symlink_target_rec(port)
                 elif tag == _rec_tag_hardlink_target:
                     result._load_hardlink_target_rec(port)
-                elif tag == _rec_tag_posix1e_acl:
-                    result._load_posix1e_acl_rec(port)
+                elif tag == _rec_tag_posix1e_acl_v2:
+                    result._load_posix1e_acl_rec(port, version=2)
+                elif tag == _rec_tag_posix1e_acl_v1:
+                    result._load_posix1e_acl_rec(port, version=1)
                 elif tag == _rec_tag_linux_attr:
                     result._load_linux_attr_rec(port)
                 elif tag == _rec_tag_linux_xattr:
diff -Nru bup-0.33/lib/bup/source_info.py bup-0.33.2/lib/bup/source_info.py
--- bup-0.33/lib/bup/source_info.py	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/lib/bup/source_info.py	2023-07-01 16:08:43.000000000 -0400
@@ -1,3 +1,3 @@
-commit='aa881896348ae487d6912d955be8113d9121e34e'
-date='2022-10-16 16:18:38 -0500'
+commit='b1c19fb0142ac4bdc60b07640734e0c2d256f423'
+date='2023-07-01 15:08:43 -0500'
 modified=False
diff -Nru bup-0.33/lib/bup/version.py bup-0.33.2/lib/bup/version.py
--- bup-0.33/lib/bup/version.py	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/lib/bup/version.py	2023-07-01 16:08:43.000000000 -0400
@@ -22,7 +22,7 @@
 
 # The ~ in a version is a Debian-style "always less than" marker:
 # https://www.debian.org/doc/debian-policy/ch-controlfields.html#version
-base_version = b'0.33'
+base_version = b'0.33.2'
 
 version = base_version
 if version.endswith(b'~'):
diff -Nru bup-0.33/note/0.33.1-from-0.33.md bup-0.33.2/note/0.33.1-from-0.33.md
--- bup-0.33/note/0.33.1-from-0.33.md	1969-12-31 19:00:00.000000000 -0500
+++ bup-0.33.2/note/0.33.1-from-0.33.md	2023-07-01 16:08:43.000000000 -0400
@@ -0,0 +1,41 @@
+
+Notable changes in 0.33.1 since 0.33
+====================================
+
+Bugs
+----
+
+* POSIX1e ACLs should be restored correctly now.  Previously there
+  were two problems.
+
+  First, bup incorrectly restored default (`ACL_TYPE_DEFAULT`) ACLs as
+  access acls (`ACL_TYPE_ACCESS`).  When both existed, it restored the
+  access ACL first and then the default ACL as an access ACL.  Now,
+  bup should restore each with the proper type.  This issue only
+  affects saves created on platforms where bup currently supports
+  ACLs, so presumably mostly just saves created on Linux since the
+  current ACL support depends on non-standard functions like
+  `acl_extended(3)`.
+
+  Second, bup stored ACLs in the `acl_to_any_text(3)` format with a
+  newlne delimiter, when the standard (and `acl_from_text(3)` which
+  restore depends on) requires commas.  Now bup uses commas, and
+  translates previously created saves during restore when possible.
+  If a previously created ACL entry contains a comma, then bup will
+  give up, report an error, and skip it.  If nothing else, this could
+  cause restores of relevant saves to fail on some platforms.
+
+Build and install
+-----------------
+
+* `MAKE=path ./configure ...` now supports relative `path`s.
+
+* `./configure` will now look for `python3.11-config`, and won't look
+  for `python3.6-config` (bup requires 3.7+).
+
+* pytest 7 is now supported.
+
+Thanks to (at least)
+====================
+
+Greg Troxel, Johannes Berg, Moritz Lell, and Rob Browning
diff -Nru bup-0.33/note/0.33.2-from-0.33.1.md bup-0.33.2/note/0.33.2-from-0.33.1.md
--- bup-0.33/note/0.33.2-from-0.33.1.md	1969-12-31 19:00:00.000000000 -0500
+++ bup-0.33.2/note/0.33.2-from-0.33.1.md	2023-07-01 16:08:43.000000000 -0400
@@ -0,0 +1,14 @@
+
+Notable changes in 0.33.2 since 0.33.1
+======================================
+
+Bugs
+----
+
+* The fix for the POSIX1e ACL issue addressed by 0.33.1 should no
+  longer crash due to a missing path argument.
+
+Thanks to (at least)
+====================
+
+Johannes Berg, Phil Sutter, Rob Browning, and Robert Edmonds
diff -Nru bup-0.33/test/ext/conftest.py bup-0.33.2/test/ext/conftest.py
--- bup-0.33/test/ext/conftest.py	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/test/ext/conftest.py	2023-07-01 16:08:43.000000000 -0400
@@ -1,4 +1,5 @@
 
+from pathlib import Path
 from subprocess import CalledProcessError
 import pytest, subprocess, sys
 
@@ -8,6 +9,9 @@
 # Handle all test-* files as wvtest protocol subprocesses
 # cf. https://docs.pytest.org/en/latest/example/nonpython.html
 
+# version_tuple was added in 7
+use_node_path = hasattr(pytest, 'version_tuple')
+
 class BupSubprocFailure(Exception):
     def __init__(self, msg, cmd, status, failures):
         super(BupSubprocFailure, self).__init__(msg)
@@ -74,10 +78,13 @@
 def pytest_collect_file(parent, path):
     base = path.basename
     if base.startswith('test-') and not base.endswith('~'):
-        try:
-            item = BupSubprocTestFile.from_parent(parent, fspath=path)
-        except AttributeError:
-            item = BupSubprocTestFile(path, parent)
+        if use_node_path:
+            item = BupSubprocTestFile.from_parent(parent, path=Path(path))
+        else:
+            try:
+                item = BupSubprocTestFile.from_parent(parent, fspath=path)
+            except AttributeError:
+                item = BupSubprocTestFile(path, parent)
         if base == 'test-release-archive':
             item.add_marker(pytest.mark.release)
         return item
diff -Nru bup-0.33/test/ext/test-comparative-split-join bup-0.33.2/test/ext/test-comparative-split-join
--- bup-0.33/test/ext/test-comparative-split-join	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/test/ext/test-comparative-split-join	2023-07-01 16:08:43.000000000 -0400
@@ -107,6 +107,11 @@
         # The bloom filter includes the (differing) idx names
         WVPASS rm {other,this}-bup/objects/pack/bup.bloom
     fi
+    WVPASS test "ref: refs/heads/main" = "$(< other-bup/HEAD)" \
+           -o "ref: refs/heads/master" = "$(< other-bup/HEAD)"
+    WVPASS test "ref: refs/heads/main" = "$(< this-bup/HEAD)" \
+           -o "ref: refs/heads/master" = "$(< this-bup/HEAD)"
+    WVPASS rm {other,this}-bup/HEAD
     WVPASS "$top/dev/compare-trees" --no-times other-bup/ this-bup/
 
     WVPASS cd "$orig_dir"
diff -Nru bup-0.33/test/ext/test-meta-acls bup-0.33.2/test/ext/test-meta-acls
--- bup-0.33/test/ext/test-meta-acls	1969-12-31 19:00:00.000000000 -0500
+++ bup-0.33.2/test/ext/test-meta-acls	2023-07-01 16:08:43.000000000 -0400
@@ -0,0 +1,124 @@
+#!/usr/bin/env bash
+. wvtest.sh
+. wvtest-bup.sh
+. dev/lib.sh
+
+set -o pipefail
+
+if ! command -v getfacl > /dev/null || ! command -v setfacl > /dev/null; then
+    WVSKIP "No getfacl and setfacl; skipping test-meta-acls"
+    exit 0
+fi
+
+top="$(WVPASS pwd)" || exit $?
+
+bup() { "$top/bup" "$@"; }
+compare-trees() { "$top/dev/compare-trees" "$@"; }
+id-other-than() { "$top/dev/id-other-than" "$@"; }
+
+if ! bup features | grep -qi 'posix acls: yes'; then
+    WVSKIP "bup features missing POSIX ACLs; skipping test-meta-acls"
+    exit 0
+fi
+
+if ! compare-trees --features | grep -qi 'posix acls: yes'; then
+    WVSKIP "compare-trees --features missing POSIX ACLs; skipping test-meta-acls"
+    exit 0
+fi
+
+tmpdir="$(WVPASS wvmktempdir)" || exit $?
+bup_dir="$tmpdir/bup"
+export BUP_DIR="$bup_dir"
+
+uid=$(WVPASS id -un) || exit $?
+other_uinfo="$(id-other-than --user "$uid")" || exit $?
+other_user="${other_uinfo%%:*}"
+other_uid="${other_uinfo##*:}"
+
+gid=$(WVPASS id -gn) || exit $?
+other_ginfo="$(id-other-than --group "$gid")" || exit $?
+other_group="${other_ginfo%%:*}"
+other_gid="${other_ginfo##*:}"
+
+WVPASS cd "$tmpdir"
+
+WVPASS mkdir src
+WVPASS touch src/u-r
+
+if ! setfacl -m "u:$other_user:r" src/u-r; then
+    WVSKIP "setfacl $top/testfile failed; skipping test-meta-acls"
+    exit 0
+fi
+
+WVSTART "Basic ACL support (setup)"
+
+# file ACL_USER access acl(5)
+for perm in r rw rwx; do
+    WVPASS touch src/u-"$perm"
+    WVPASS setfacl -m "u:$other_user:$perm" src/u-"$perm"
+done
+# file ACL_GROUP access acl(5)
+for perm in r rw rwx; do
+    WVPASS touch src/g-"$perm"
+    WVPASS setfacl -m "g:$other_group:$perm" src/g-"$perm"
+done
+
+# directory ACL_USER access acl(5)
+for perm in r rw rwx; do
+    WVPASS mkdir src/d-u-"$perm"
+    WVPASS setfacl -m "u:$other_user:$perm" src/d-u-"$perm"
+done
+# directory ACL_GROUP access acl(5)
+for perm in r rw rwx; do
+    WVPASS mkdir src/d-g-"$perm"
+    WVPASS setfacl -m "g:$other_group:$perm" src/d-g-"$perm"
+done
+
+# directory ACL_USER default acl(5)
+for perm in r rw rwx; do
+    WVPASS mkdir src/d-def-u-"$perm"
+    WVPASS setfacl -d -m "u:$other_user:$perm" src/d-def-u-"$perm"
+done
+# directory ACL_GROUP default acl(5)
+for perm in r rw rwx; do
+    WVPASS mkdir src/d-def-g-"$perm"
+    WVPASS setfacl -d -m "g:$other_group:$perm" src/d-def-g-"$perm"
+done
+
+# directory ACL_USER access and default acl(5)
+for perm in r rw rwx; do
+    WVPASS mkdir src/d-both-u-"$perm"
+    WVPASS setfacl -m "u:$other_user:$perm" src/d-both-u-"$perm"
+    WVPASS setfacl -d -m "u:$other_user:$perm" src/d-both-u-"$perm"
+done
+# directory ACL_GROUP access and default acl(5)
+for perm in r rw rwx; do
+    WVPASS mkdir src/d-both-g-"$perm"
+    WVPASS setfacl -m "g:$other_group:$perm" src/d-both-g-"$perm"
+    WVPASS setfacl -d -m "g:$other_group:$perm" src/d-both-g-"$perm"
+done
+
+test-save-restore()
+{
+    WVPASS test "$#" -eq 2
+    local saver="$1" restorer="$2"
+    WVPASS rm -rf "$bup_dir" dest
+    WVPASS "$saver" init
+    WVPASS "$saver" index -u src
+    WVPASS "$saver" save --strip -n acls src
+    WVPASS "$restorer" restore -C dest acls/latest/.
+    WVPASS compare-trees src/ dest/
+}
+
+WVSTART "Basic ACL support (save and restore)"
+test-save-restore bup bup
+
+if test -z "$BUP_TEST_OTHER_BUP"; then
+    # FIXME: need ability to "skip", without skipping this entire file
+    WVMSG 'BUP_TEST_OTHER_BUP not set; skipping cross-version test'
+else
+    test-save-restore "$BUP_TEST_OTHER_BUP" bup
+fi
+
+cd "$top"
+WVPASS rm -rf "$tmpdir"
diff -Nru bup-0.33/test/ext/test_get.py bup-0.33.2/test/ext/test_get.py
--- bup-0.33/test/ext/test_get.py	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/test/ext/test_get.py	2023-07-01 16:08:43.000000000 -0400
@@ -164,7 +164,6 @@
 def validate_save(dest_name, restore_subpath, commit_id, tree_id, orig_value,
                   get_out):
     out = get_out.splitlines()
-    print('blarg: out', repr(out), file=sys.stderr)
     wvpasseq(2, len(out))
     get_tree_id = out[0]
     get_commit_id = out[1]
@@ -292,8 +291,6 @@
             wvpasseq(b'', exr.out.strip())
 
 def _test_replace(get_disposition, src_info):
-    print('blarg:', repr(src_info), file=sys.stderr)
-
     wvstart(get_disposition + ' --replace to root fails')
     for item in (b'.tag/tinyfile',
                  b'src/latest' + src_info['tinyfile-path'],
diff -Nru bup-0.33/test/lib/buptest/__init__.py bup-0.33.2/test/lib/buptest/__init__.py
--- bup-0.33/test/lib/buptest/__init__.py	2022-10-16 17:18:38.000000000 -0400
+++ bup-0.33.2/test/lib/buptest/__init__.py	2023-07-01 16:08:43.000000000 -0400
@@ -2,7 +2,7 @@
 from __future__ import absolute_import, print_function
 from collections import namedtuple
 from os.path import abspath, basename, dirname, realpath
-from pipes import quote
+from shlex import quote
 from subprocess import PIPE, Popen
 from traceback import extract_stack
 import errno, os, subprocess, sys, tempfile

Reply to: