Subject: bug#72800: maint: adjust to Gnulib acl changes

From: Collin Funk <[email-masked]>
Date: Sun, 25 Aug 2024 00:03:36 -0700

Hi,

This patch changes copy_acl to xcopy_acl per Bruno's change in Gnulib
yesterday [1].

Collin

[1] https://lists.gnu.org/archive/html/bug-gnulib/2024-08/msg00146.html

>From 81dc0dfc43c596eddb33ff56529dbfd90b0d5c4c Mon Sep 17 00:00:00 2001
From: Collin Funk <[email-masked]>
Date: Sat, 24 Aug 2024 23:53:26 -0700
Subject: [PATCH 1/2] build: update gnulib submodule to latest

* bootstrap: Sync from Gnulib.
* lib/.gitignore: Ignore more Gnulib files.
* m4/.gitignore: Likewise.
---
 bootstrap      | 16 +++++++++++++++-
 gnulib         |  2 +-
 lib/.gitignore | 28 ++++++++++++++++++++++++++++
 m4/.gitignore  | 44 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 88 insertions(+), 2 deletions(-)

diff --git a/bootstrap b/bootstrap
index d78c8c3..3758683 100755
--- a/bootstrap
+++ b/bootstrap
@@ -37,7 +37,7 @@ medir=`dirname "$me"`
 
 # A library of shell functions for autopull.sh, autogen.sh, and bootstrap.
 
-scriptlibversion=2024-06-29.23; # UTC
+scriptlibversion=2024-07-21.12; # UTC
 
 # Copyright (C) 2003-2024 Free Software Foundation, Inc.
 #
@@ -1255,6 +1255,20 @@ autogen()
     $gnulib_tool $gnulib_tool_options --import $gnulib_modules \
       || die "gnulib-tool failed"
 
+    if test $with_gettext = yes && test ! -f $m4_base/gettext.m4; then
+      # The gnulib-tool invocation has removed $m4_base/gettext.m4, that the
+      # AUTOPOINT invocation had installed. This can occur when the gnulib
+      # module 'gettext' was previously present but is now not present any more.
+      # Repeat the AUTOPOINT invocation and the gnulib-tool invocation.
+
+      echo "$0: $AUTOPOINT --force"
+      $AUTOPOINT --force || return
+
+      echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
+      $gnulib_tool $gnulib_tool_options --import $gnulib_modules \
+        || die "gnulib-tool failed"
+    fi
+
     for file in $gnulib_files; do
       symlink_to_dir "$GNULIB_SRCDIR" $file \
         || die "failed to symlink $file"
diff --git a/gnulib b/gnulib
index 71dd87c..3fef5ed 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 71dd87c3723e9c9dd3ae50d562b9ff04ff0ee660
+Subproject commit 3fef5edc95b855a4ea3326926c69641b2fe205b3
diff --git a/lib/.gitignore b/lib/.gitignore
index e0db893..1cc7443 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -210,7 +210,9 @@
 /time.in.h
 /uchar.h
 /unicase.h
+/unicase/
 /unictype.h
+/unictype/
 /uninorm.h
 /unistd.c
 /unistd.h
@@ -244,3 +246,29 @@
 /xalloc-oversized.h
 /xalloc.h
 /xmalloc.c
+/c32is-impl.h
+/c32isprint.c
+/c32isspace.c
+/c32rtomb.c
+/c32to-impl.h
+/c32tob.c
+/c32tolower.c
+/c32toupper.c
+/iswblank.c
+/iswctype-impl.h
+/iswctype.c
+/iswdigit.c
+/iswpunct.c
+/iswxdigit.c
+/mbrtoc32.c
+/mbszero.c
+/obstack.in.h
+/same-inode.c
+/setlocale_null-unlocked.c
+/uchar.in.h
+/unicase.in.h
+/unictype.in.h
+/uninorm.in.h
+/unitypes.in.h
+/wctype-impl.h
+/wctype.c
diff --git a/m4/.gitignore b/m4/.gitignore
index 973ec19..44aab4a 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -235,3 +235,47 @@
 /semaphore.m4
 /sys_cdefs_h.m4
 /yield.m4
+/c32rtomb.m4
+/chdir-long.m4
+/d-ino.m4
+/dup.m4
+/exponentd.m4
+/exponentf.m4
+/exponentl.m4
+/extensions-aix.m4
+/fchdir.m4
+/fclose.m4
+/fdopendir.m4
+/filenamecat.m4
+/float_h.m4
+/fpieee.m4
+/fstatat.m4
+/getcwd-abort-bug.m4
+/getcwd-path-max.m4
+/isnand.m4
+/isnanf.m4
+/isnanl.m4
+/iswblank.m4
+/iswctype.m4
+/iswdigit.m4
+/iswpunct.m4
+/iswxdigit.m4
+/libunistring-base.m4
+/math_h.m4
+/mbrtoc32.m4
+/nan-mips.m4
+/once.m4
+/openat.m4
+/rewinddir.m4
+/save-cwd.m4
+/signbit.m4
+/snan.m4
+/stpcpy.m4
+/time.m4
+/uchar_h.m4
+/unicase_h.m4
+/unictype_h.m4
+/uninorm_h.m4
+/unistd-safer.m4
+/wctype.m4
+/xgetcwd.m4
-- 
2.46.0

>From e5e940304ca8b1bc857052e29922b6ef1dd6d752 Mon Sep 17 00:00:00 2001
From: Collin Funk <[email-masked]>
Date: Sat, 24 Aug 2024 23:59:32 -0700
Subject: [PATCH 2/2] maint: adjust to Gnulib acl changes

* src/execute.c (closedown): Use xcopy_acl instead of copy_acl.
---
 sed/execute.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sed/execute.c b/sed/execute.c
index 1d38a5c..6245b3d 100644
--- a/sed/execute.c
+++ b/sed/execute.c
@@ -664,9 +664,9 @@ closedown (struct input *input)
       if (fchown (output_fd, input->st.st_uid, input->st.st_gid) == -1)
         ignore_value (fchown (output_fd, -1, input->st.st_gid));
 #endif
-      copy_acl (input->in_file_name, input_fd,
-                input->out_file_name, output_fd,
-                input->st.st_mode);
+      xcopy_acl (input->in_file_name, input_fd,
+                 input->out_file_name, output_fd,
+                 input->st.st_mode);
 
       ck_fclose (input->fp);
       ck_fclose (output_file.fp);
-- 
2.46.0