unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Po Lu <luangruo@yahoo.com>, emacs-devel@gnu.org
Subject: Re: master 9912049173: Update from Gnulib by running admin/merge-gnulib
Date: Tue, 17 Jan 2023 15:40:31 -0800	[thread overview]
Message-ID: <332c89a1-0f13-375e-2ec9-ee7d380b16f5@cs.ucla.edu> (raw)
In-Reply-To: <87pmbd8pga.fsf@yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 130 bytes --]

On 1/17/23 01:45, Po Lu wrote:
> Paul, could you please take a look at bug#60843?

I installed the attached; please give it a try.

[-- Attachment #2: 0001-Port-xattr-handling-to-Fedora-9.patch --]
[-- Type: text/x-patch, Size: 2632 bytes --]

From 7ff5c0d7045dd105c604c3f09130693db1200ff9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 17 Jan 2023 15:38:38 -0800
Subject: [PATCH] Port xattr handling to Fedora 9

Problem reported by Po Lu (Bug#60843).
* m4/xattr.m4: Sync from Gnulib.
---
 m4/xattr.m4 | 42 ++++++++++++++++++++++++++----------------
 1 file changed, 26 insertions(+), 16 deletions(-)

diff --git a/m4/xattr.m4 b/m4/xattr.m4
index 6141515652a..0e179cc0d1d 100644
--- a/m4/xattr.m4
+++ b/m4/xattr.m4
@@ -1,5 +1,5 @@
 # xattr.m4 - check for Extended Attributes (Linux)
-# serial 5
+# serial 6
 
 # Copyright (C) 2003-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -17,23 +17,33 @@ AC_DEFUN
   AC_SUBST([LIB_XATTR])
 
   if test "$use_xattr" = yes; then
-    AC_CHECK_HEADERS([attr/error_context.h attr/libattr.h])
-    use_xattr=no
-    if test "$ac_cv_header_attr_libattr_h" = yes \
-        && test "$ac_cv_header_attr_error_context_h" = yes; then
-      xattr_saved_LIBS=$LIBS
-      AC_SEARCH_LIBS([attr_copy_file], [attr],
-                     [test "$ac_cv_search_attr_copy_file" = "none required" ||
-                        LIB_XATTR="$ac_cv_search_attr_copy_file"])
-      AC_CHECK_FUNCS([attr_copy_file])
-      LIBS=$xattr_saved_LIBS
-      if test "$ac_cv_func_attr_copy_file" = yes; then
-        use_xattr=yes
-      fi
-    fi
-    if test $use_xattr = no; then
+    AC_CACHE_CHECK([for xattr library with ATTR_ACTION_PERMISSIONS],
+      [gl_cv_xattr_lib],
+      [gl_cv_xattr_lib=no
+       AC_LANG_CONFTEST(
+         [AC_LANG_PROGRAM(
+            [[#include <attr/error_context.h>
+              #include <attr/libattr.h>
+              static int
+              is_attr_permissions (const char *name, struct error_context *ctx)
+              {
+                return attr_copy_action (name, ctx) == ATTR_ACTION_PERMISSIONS;
+              }
+            ]],
+            [[return attr_copy_fd ("/", 0, "/", 0, is_attr_permissions, 0);
+            ]])])
+       AC_LINK_IFELSE([],
+         [gl_cv_xattr_lib='none required'],
+         [xattr_saved_LIBS=$LIBS
+          LIBS="-lattr $LIBS"
+          AC_LINK_IFELSE([], [gl_cv_xattr_lib=-lattr])
+          LIBS=$xattr_saved_LIBS])])
+    if test "$gl_cv_xattr_lib" = no; then
       AC_MSG_WARN([libattr development library was not found or not usable.])
       AC_MSG_WARN([AC_PACKAGE_NAME will be built without xattr support.])
+      use_xattr=no
+    elif test "$gl_cv_xattr_lib" != 'none required'; then
+      LIB_XATTR=$gl_cv_xattr_lib
     fi
   fi
   if test "$use_xattr" = yes; then
-- 
2.39.0


  reply	other threads:[~2023-01-17 23:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <167366904115.22927.17589789752286856962@vcs2.savannah.gnu.org>
     [not found] ` <20230114040401.8DCA0C00A7F@vcs2.savannah.gnu.org>
2023-01-17  9:45   ` master 9912049173: Update from Gnulib by running admin/merge-gnulib Po Lu
2023-01-17 23:40     ` Paul Eggert [this message]
2023-01-18  0:40       ` Po Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=332c89a1-0f13-375e-2ec9-ee7d380b16f5@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).