Hello community,

here is the log from the commit of package libarchive for openSUSE:Factory 
checked in at 2020-09-10 22:46:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libarchive (Old)
 and      /work/SRC/openSUSE:Factory/.libarchive.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libarchive"

Thu Sep 10 22:46:16 2020 rev:40 rq:832905 version:3.4.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/libarchive/libarchive.changes    2020-05-26 
17:13:46.387254874 +0200
+++ /work/SRC/openSUSE:Factory/.libarchive.new.4249/libarchive.changes  
2020-09-10 22:46:28.511737012 +0200
@@ -1,0 +2,6 @@
+Mon Sep  7 17:17:45 UTC 2020 - Andreas Stieger <[email protected]>
+
+- fix build with binutils submitted to Factory, adding upstream
+  libarchive-3.4.3-fix_test_write_disk_secure.patch
+
+-------------------------------------------------------------------

New:
----
  libarchive-3.4.3-fix_test_write_disk_secure.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libarchive.spec ++++++
--- /var/tmp/diff_new_pack.GDnkLe/_old  2020-09-10 22:46:31.519739784 +0200
+++ /var/tmp/diff_new_pack.GDnkLe/_new  2020-09-10 22:46:31.519739784 +0200
@@ -43,6 +43,7 @@
 Source1000:     baselibs.conf
 Patch1:         lib-suffix.patch
 Patch2:         fix-soversion.patch
+Patch3:         libarchive-3.4.3-fix_test_write_disk_secure.patch
 BuildRequires:  cmake
 BuildRequires:  libacl-devel
 BuildRequires:  libbz2-devel

++++++ libarchive-3.4.3-fix_test_write_disk_secure.patch ++++++
>From 56c095bef0a892dbaf18e45efbec2087d6878a54 Mon Sep 17 00:00:00 2001
From: Martin Matuska <[email protected]>
Date: Fri, 22 May 2020 11:43:43 +0200
Subject: [PATCH] test_write_disk_secure: properly check if lchmod() is
 supported

Fixes #1379
---
 libarchive/test/test_write_disk_secure.c | 33 +++++++++++++++++++++---
 1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/libarchive/test/test_write_disk_secure.c 
b/libarchive/test/test_write_disk_secure.c
index 7cd66c41..ff2922a3 100644
--- a/libarchive/test/test_write_disk_secure.c
+++ b/libarchive/test/test_write_disk_secure.c
@@ -40,6 +40,9 @@ DEFINE_TEST(test_write_disk_secure)
        struct archive *a;
        struct archive_entry *ae;
        struct stat st;
+#if defined(HAVE_LCHMOD) && defined(HAVE_SYMLINK)
+       int working_lchmod;
+#endif
 
        /* Start with a known umask. */
        assertUmask(UMASK);
@@ -251,10 +254,32 @@ DEFINE_TEST(test_write_disk_secure)
        assert(0 == lstat("link_to_dir", &st));
        failure("link_to_dir: st.st_mode=%o", st.st_mode);
        assert(S_ISLNK(st.st_mode));
-#if HAVE_LCHMOD
-       /* Systems that lack lchmod() can't set symlink perms, so skip this. */
-       failure("link_to_dir: st.st_mode=%o", st.st_mode);
-       assert((st.st_mode & 07777) == 0755);
+#if defined(HAVE_SYMLINK) && defined(HAVE_LCHMOD) && \
+    defined(S_IRUSR) && defined(S_IWUSR) && defined(S_IXUSR)
+       /* Verify if we are able to lchmod() */
+       if (symlink("dir", "testlink_to_dir") == 0) {
+               if (lchmod("testlink_to_dir",
+                   S_IRUSR | S_IWUSR | S_IXUSR) != 0) {
+                       switch (errno) {
+                               case ENOTSUP:
+                               case ENOSYS:
+#if ENOTSUP != EOPNOTSUPP
+                               case EOPNOTSUPP:
+#endif
+                                       working_lchmod = 0;
+                                       break;
+                               default:
+                                       working_lchmod = 1;
+                       }
+               } else
+                       working_lchmod = 1;
+       } else
+               working_lchmod = 0;
+
+       if (working_lchmod) {
+               failure("link_to_dir: st.st_mode=%o", st.st_mode);
+               assert((st.st_mode & 07777) == 0755);
+       }
 #endif
 
        assert(0 == lstat("dir/filea", &st));
-- 
2.28.0




Reply via email to