pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/archivers/libarchive/files Merge 784851b7b476f3cb2e124...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c73385e3cfd2
branches: trunk
changeset: 359252:c73385e3cfd2
user: joerg <joerg%pkgsrc.org@localhost>
date: Sun Mar 05 12:15:22 2017 +0000
description:
Merge 784851b7b476f3cb2e1247c0f8913b8726c103d9:
Change Solaris ACL support to use acl() and facl()
This removes dependency on libsec and enables compilation on Solaris 10.
diffstat:
archivers/libarchive/files/configure | 139 +++---
archivers/libarchive/files/configure.ac | 5 +-
archivers/libarchive/files/libarchive/archive_platform.h | 11 +-
archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c | 206 +++++++--
archivers/libarchive/files/libarchive/archive_write_disk_acl.c | 165 ++++--
archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c | 194 ++++++--
archivers/libarchive/files/libarchive/test/test_acl_platform_posix1e.c | 209 +++++++--
archivers/libarchive/files/test_utils/test_common.h | 13 +-
8 files changed, 640 insertions(+), 302 deletions(-)
diffs (truncated from 1886 to 300 lines):
diff -r 59a158e2ec15 -r c73385e3cfd2 archivers/libarchive/files/configure
--- a/archivers/libarchive/files/configure Sun Mar 05 12:05:56 2017 +0000
+++ b/archivers/libarchive/files/configure Sun Mar 05 12:15:22 2017 +0000
@@ -764,7 +764,6 @@
docdir
oldincludedir
includedir
-runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -871,7 +870,6 @@
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1124,15 +1122,6 @@
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
- -runstatedir | --runstatedir | --runstatedi | --runstated \
- | --runstate | --runstat | --runsta | --runst | --runs \
- | --run | --ru | --r)
- ac_prev=runstatedir ;;
- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
- | --run=* | --ru=* | --r=*)
- runstatedir=$ac_optarg ;;
-
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1270,7 +1259,7 @@
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir runstatedir
+ libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1423,7 +1412,6 @@
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -18205,51 +18193,6 @@
# Solaris and derivates ACLs
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
-$as_echo_n "checking for acl_get in -lsec... " >&6; }
-if ${ac_cv_lib_sec_acl_get+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsec $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char acl_get ();
-int
-main ()
-{
-return acl_get ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_sec_acl_get=yes
-else
- ac_cv_lib_sec_acl_get=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
-$as_echo "$ac_cv_lib_sec_acl_get" >&6; }
-if test "x$ac_cv_lib_sec_acl_get" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSEC 1
-_ACEOF
-
- LIBS="-lsec $LIBS"
-
-fi
-
ac_fn_c_check_type "$LINENO" "aclent_t" "ac_cv_type_aclent_t" "#include <sys/acl.h>
"
if test "x$ac_cv_type_aclent_t" = xyes; then :
@@ -18272,7 +18215,7 @@
fi
- for ac_func in acl_get facl_get acl_set facl_set
+ for ac_func in acl facl
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -18284,6 +18227,74 @@
fi
done
+ ac_fn_c_check_decl "$LINENO" "GETACL" "ac_cv_have_decl_GETACL" "#include <sys/acl.h>
+"
+if test "x$ac_cv_have_decl_GETACL" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETACL $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "SETACL" "ac_cv_have_decl_SETACL" "#include <sys/acl.h>
+"
+if test "x$ac_cv_have_decl_SETACL" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SETACL $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "GETACLCNT" "ac_cv_have_decl_GETACLCNT" "#include <sys/acl.h>
+"
+if test "x$ac_cv_have_decl_GETACLCNT" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETACLCNT $ac_have_decl
+_ACEOF
+
+ ac_fn_c_check_decl "$LINENO" "ACE_GETACL" "ac_cv_have_decl_ACE_GETACL" "#include <sys/acl.h>
+"
+if test "x$ac_cv_have_decl_ACE_GETACL" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ACE_GETACL $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "ACE_SETACL" "ac_cv_have_decl_ACE_SETACL" "#include <sys/acl.h>
+"
+if test "x$ac_cv_have_decl_ACE_SETACL" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ACE_SETACL $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "ACE_GETACLCNT" "ac_cv_have_decl_ACE_GETACLCNT" "#include <sys/acl.h>
+"
+if test "x$ac_cv_have_decl_ACE_GETACLCNT" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ACE_GETACLCNT $ac_have_decl
+_ACEOF
+
fi
# Additional requirements
@@ -18312,7 +18323,7 @@
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -18358,7 +18369,7 @@
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -18382,7 +18393,7 @@
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -18427,7 +18438,7 @@
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -18451,7 +18462,7 @@
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
diff -r 59a158e2ec15 -r c73385e3cfd2 archivers/libarchive/files/configure.ac
--- a/archivers/libarchive/files/configure.ac Sun Mar 05 12:05:56 2017 +0000
+++ b/archivers/libarchive/files/configure.ac Sun Mar 05 12:15:22 2017 +0000
@@ -758,10 +758,11 @@
#include <sys/acl.h>])
# Solaris and derivates ACLs
- AC_CHECK_LIB([sec], [acl_get])
AC_CHECK_TYPES([aclent_t], [], [], [[#include <sys/acl.h>]])
AC_CHECK_TYPES([ace_t], [], [], [[#include <sys/acl.h>]])
- AC_CHECK_FUNCS(acl_get facl_get acl_set facl_set)
+ AC_CHECK_FUNCS(acl facl)
+ AC_CHECK_DECLS([GETACL, SETACL, GETACLCNT], [], [], [#include <sys/acl.h>])
+ AC_CHECK_DECLS([ACE_GETACL, ACE_SETACL, ACE_GETACLCNT], [], [], [#include <sys/acl.h>])
fi
# Additional requirements
diff -r 59a158e2ec15 -r c73385e3cfd2 archivers/libarchive/files/libarchive/archive_platform.h
--- a/archivers/libarchive/files/libarchive/archive_platform.h Sun Mar 05 12:05:56 2017 +0000
+++ b/archivers/libarchive/files/libarchive/archive_platform.h Sun Mar 05 12:15:22 2017 +0000
@@ -156,15 +156,20 @@
#endif
/*
- * If this platform has <sys/acl.h>, acl_get(), facl_get(), acl_set(),
+ * If this platform has <sys/acl.h>, acl(), facl() and ACLENT_T
* facl_set() and types aclent_t and ace_t it uses Solaris-style ACL functions
*/
-#if HAVE_SYS_ACL_H && HAVE_ACL_GET && HAVE_FACL_GET && HAVE_ACL_SET && HAVE_FACL_SET && HAVE_ACLENT_T && HAVE_ACE_T
+#if HAVE_SYS_ACL_H && HAVE_ACL && HAVE_FACL && HAVE_ACLENT_T && \
+ HAVE_DECL_GETACL && HAVE_DECL_GETACLCNT && HAVE_DECL_SETACL
#define HAVE_SUN_ACL 1
+#if HAVE_ACE_T && HAVE_DECL_ACE_GETACL && HAVE_DECL_ACE_GETACLCNT && \
+ HAVE_DECL_ACE_SETACL
+#define HAVE_SUN_NFS4_ACL 1
+#endif
#endif
/* Define if platform supports NFSv4 ACLs */
-#if (HAVE_POSIX_ACL && HAVE_ACL_TYPE_NFS4) || HAVE_SUN_ACL || HAVE_DARWIN_ACL
+#if (HAVE_POSIX_ACL && HAVE_ACL_TYPE_NFS4) || HAVE_SUN_NFS4_ACL || HAVE_DARWIN_ACL
#define HAVE_NFS4_ACL 1
#endif
diff -r 59a158e2ec15 -r c73385e3cfd2 archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c
--- a/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c Sun Mar 05 12:05:56 2017 +0000
+++ b/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c Sun Mar 05 12:15:22 2017 +0000
@@ -124,9 +124,7 @@
#endif
/* NFSv4 platform ACL type */
-#if HAVE_SUN_ACL
-#define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACE_T
-#elif HAVE_DARWIN_ACL
+#if HAVE_DARWIN_ACL
#define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACL_TYPE_EXTENDED
#elif HAVE_ACL_TYPE_NFS4
#define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACL_TYPE_NFS4
@@ -435,14 +433,71 @@
#if HAVE_SUN_ACL
static int
-sun_acl_is_trivial(acl_t *, mode_t, int *trivialp);
+sun_acl_is_trivial(void *, int, mode_t, int, int, int *);
+
+static void *
+sunacl_get(int cmd, int *aclcnt, int fd, const char *path)
Home |
Main Index |
Thread Index |
Old Index