From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id CE9BE1F47C for ; Tue, 17 Jan 2023 23:24:15 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=cs.ucla.edu header.i=@cs.ucla.edu header.a=rsa-sha256 header.s=78364E5A-2AF3-11ED-87FA-8298ECA2D365 header.b=cd3uDLP5; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHvJB-0001pm-Rf; Tue, 17 Jan 2023 18:24:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHvJ9-0001pF-8w for bug-gnulib@gnu.org; Tue, 17 Jan 2023 18:23:59 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHvJ7-0003Dh-2V for bug-gnulib@gnu.org; Tue, 17 Jan 2023 18:23:59 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 48A73160069; Tue, 17 Jan 2023 15:23:55 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id eEYVnKgzxheS; Tue, 17 Jan 2023 15:23:54 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2193A160060; Tue, 17 Jan 2023 15:23:54 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.9.2 zimbra.cs.ucla.edu 2193A160060 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=78364E5A-2AF3-11ED-87FA-8298ECA2D365; t=1673997834; bh=IjJT+A3lM0Htszkvdt/MEnw41pke13eZSlvaIJv2lNk=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding; b=cd3uDLP5pTKet+DIic8GKJ4H2knYTZzQnuJl1k74yxlqkzT22V2534G0UH2TZEjFl 7f/Uw6IYR8LJRK2ZnwN9NkWckUCAVxhksuishZUSZen/2PLyj2myRzrjvBJ3BN/Syf LD26RkZ0VVrc7r9Ljs+LfLNo3W3eEq0ywL26OSnc= X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ZcbWVwtn1uLC; Tue, 17 Jan 2023 15:23:54 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id F09C916005E; Tue, 17 Jan 2023 15:23:53 -0800 (PST) From: Paul Eggert To: bug-gnulib@gnu.org, ondrej.valousek.xm@renesas.com Cc: Paul Eggert Subject: [PATCH] qcopy-acl: port to Fedora 9 Date: Tue, 17 Jan 2023 15:23:46 -0800 Message-Id: <20230117232346.502122-1-eggert@cs.ucla.edu> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org It has libattr-2.4.41, which is too old for our code. Problem reported by Po Lu . * m4/xattr.m4 (gl_FUNC_XATTR): Check that we can use ATTR_ACTION_PERMISSIONS, too. Refactor so that there=E2=80=99s a single test program that we compile and link, rather than doing the tests in dribs and drabs. --- ChangeLog | 10 ++++++++++ m4/xattr.m4 | 42 ++++++++++++++++++++++++++---------------- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 111c957c1e..79e9da5d22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2023-01-17 Paul Eggert + + qcopy-acl: port to Fedora 9 + It has libattr-2.4.41, which is too old for our code. + Problem reported by Po Lu . + * m4/xattr.m4 (gl_FUNC_XATTR): Check that we can use + ATTR_ACTION_PERMISSIONS, too. Refactor so that there=E2=80=99s a singl= e + test program that we compile and link, rather than doing the tests + in dribs and drabs. + 2023-01-17 Bruno Haible =20 execute tests: Avoid test failure with GNU make 4.4. diff --git a/m4/xattr.m4 b/m4/xattr.m4 index 6141515652..0e179cc0d1 100644 --- a/m4/xattr.m4 +++ b/m4/xattr.m4 @@ -1,5 +1,5 @@ # xattr.m4 - check for Extended Attributes (Linux) -# serial 5 +# serial 6 =20 # Copyright (C) 2003-2023 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -17,23 +17,33 @@ AC_DEFUN([gl_FUNC_XATTR], AC_SUBST([LIB_XATTR]) =20 if test "$use_xattr" =3D yes; then - AC_CHECK_HEADERS([attr/error_context.h attr/libattr.h]) - use_xattr=3Dno - if test "$ac_cv_header_attr_libattr_h" =3D yes \ - && test "$ac_cv_header_attr_error_context_h" =3D yes; then - xattr_saved_LIBS=3D$LIBS - AC_SEARCH_LIBS([attr_copy_file], [attr], - [test "$ac_cv_search_attr_copy_file" =3D "none requ= ired" || - LIB_XATTR=3D"$ac_cv_search_attr_copy_file"]) - AC_CHECK_FUNCS([attr_copy_file]) - LIBS=3D$xattr_saved_LIBS - if test "$ac_cv_func_attr_copy_file" =3D yes; then - use_xattr=3Dyes - fi - fi - if test $use_xattr =3D no; then + AC_CACHE_CHECK([for xattr library with ATTR_ACTION_PERMISSIONS], + [gl_cv_xattr_lib], + [gl_cv_xattr_lib=3Dno + AC_LANG_CONFTEST( + [AC_LANG_PROGRAM( + [[#include + #include + static int + is_attr_permissions (const char *name, struct error_contex= t *ctx) + { + return attr_copy_action (name, ctx) =3D=3D ATTR_ACTION_P= ERMISSIONS; + } + ]], + [[return attr_copy_fd ("/", 0, "/", 0, is_attr_permissions, = 0); + ]])]) + AC_LINK_IFELSE([], + [gl_cv_xattr_lib=3D'none required'], + [xattr_saved_LIBS=3D$LIBS + LIBS=3D"-lattr $LIBS" + AC_LINK_IFELSE([], [gl_cv_xattr_lib=3D-lattr]) + LIBS=3D$xattr_saved_LIBS])]) + if test "$gl_cv_xattr_lib" =3D no; then AC_MSG_WARN([libattr development library was not found or not usab= le.]) AC_MSG_WARN([AC_PACKAGE_NAME will be built without xattr support.]= ) + use_xattr=3Dno + elif test "$gl_cv_xattr_lib" !=3D 'none required'; then + LIB_XATTR=3D$gl_cv_xattr_lib fi fi if test "$use_xattr" =3D yes; then --=20 2.39.0