Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gnome-autoar for openSUSE:Factory 
checked in at 2021-05-06 22:51:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-autoar (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-autoar.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-autoar"

Thu May  6 22:51:53 2021 rev:8 rq:890149 version:0.3.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-autoar/gnome-autoar.changes        
2021-04-18 21:45:11.368729862 +0200
+++ /work/SRC/openSUSE:Factory/.gnome-autoar.new.2988/gnome-autoar.changes      
2021-05-06 22:52:04.238887238 +0200
@@ -1,0 +2,9 @@
+Fri Apr 30 16:22:18 UTC 2021 - Dominique Leuenberger <dims...@opensuse.org>
+
+- Update to version 0.3.2:
+  + compressor:
+    - Fix hardlink handling for new cpio format.
+    - Fix hardlink detection for remote files.
+  + extractor: Fix extraction of readonly folders.
+
+-------------------------------------------------------------------

Old:
----
  gnome-autoar-0.3.1.tar.xz

New:
----
  gnome-autoar-0.3.2.tar.xz

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

Other differences:
------------------
++++++ gnome-autoar.spec ++++++
--- /var/tmp/diff_new_pack.khDY5c/_old  2021-05-06 22:52:04.610885704 +0200
+++ /var/tmp/diff_new_pack.khDY5c/_new  2021-05-06 22:52:04.610885704 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           gnome-autoar
-Version:        0.3.1
+Version:        0.3.2
 Release:        0
 Summary:        Automatic archives creating and extracting library
 License:        LGPL-2.0-or-later

++++++ gnome-autoar-0.3.1.tar.xz -> gnome-autoar-0.3.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-autoar-0.3.1/Makefile.in 
new/gnome-autoar-0.3.2/Makefile.in
--- old/gnome-autoar-0.3.1/Makefile.in  2021-03-13 08:52:35.000000000 +0100
+++ new/gnome-autoar-0.3.2/Makefile.in  2021-04-30 13:49:57.000000000 +0200
@@ -552,6 +552,7 @@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-autoar-0.3.1/NEWS new/gnome-autoar-0.3.2/NEWS
--- old/gnome-autoar-0.3.1/NEWS 2021-03-13 08:48:12.000000000 +0100
+++ new/gnome-autoar-0.3.2/NEWS 2021-04-30 13:29:31.000000000 +0200
@@ -1,5 +1,10 @@
+Major changes in 0.3.2:
+* compressor: Fix hardlink handling for new cpio format (Ondrej Holy)
+* compressor: Fix hardlink detection for remote files (Ondrej Holy)
+* extractor: Fix extraction of readonly folders (Ondrej Holy)
+
 Major changes in 0.3.1:
-* Disallow symlinks in parents completely when extracting (Ondrej Holy)
+* CVE-2021-28650: Disallow symlinks in parents completely when extracting 
(Ondrej Holy)
 * Make AutoarExtractor documentation clearer (Ondrej Holy)
 * Drop recursive delete on failure to prevent data loss (Ondrej Holy)
 * Add back RAR support (Matthias)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-autoar-0.3.1/configure 
new/gnome-autoar-0.3.2/configure
--- old/gnome-autoar-0.3.1/configure    2021-03-13 08:52:35.000000000 +0100
+++ new/gnome-autoar-0.3.2/configure    2021-04-30 13:49:56.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gnome-autoar 0.3.1.
+# Generated by GNU Autoconf 2.69 for gnome-autoar 0.3.2.
 #
 # Report bugs to 
<https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-autoar>.
 #
@@ -591,8 +591,8 @@
 # Identity of this package.
 PACKAGE_NAME='gnome-autoar'
 PACKAGE_TARNAME='gnome-autoar'
-PACKAGE_VERSION='0.3.1'
-PACKAGE_STRING='gnome-autoar 0.3.1'
+PACKAGE_VERSION='0.3.2'
+PACKAGE_STRING='gnome-autoar 0.3.2'
 
PACKAGE_BUGREPORT='https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-autoar'
 PACKAGE_URL=''
 
@@ -794,6 +794,7 @@
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -898,6 +899,7 @@
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1150,6 +1152,15 @@
   | -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=* \
@@ -1287,7 +1298,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
+               libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1400,7 +1411,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gnome-autoar 0.3.1 to adapt to many kinds of systems.
+\`configure' configures gnome-autoar 0.3.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1440,6 +1451,7 @@
   --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]
@@ -1470,7 +1482,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gnome-autoar 0.3.1:";;
+     short | recursive ) echo "Configuration of gnome-autoar 0.3.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1615,7 +1627,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gnome-autoar configure 0.3.1
+gnome-autoar configure 0.3.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1947,7 +1959,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by gnome-autoar $as_me 0.3.1, which was
+It was created by gnome-autoar $as_me 0.3.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2816,7 +2828,7 @@
 
 # Define the identity of the package.
  PACKAGE='gnome-autoar'
- VERSION='0.3.1'
+ VERSION='0.3.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3096,7 +3108,7 @@
 
 
 
-LIBGNOME_AUTOAR_LT_VERSION=301:0:301
+LIBGNOME_AUTOAR_LT_VERSION=302:0:302
 
 
 LIBGNOME_AUTOAR_API_VERSION=0
@@ -15001,7 +15013,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by gnome-autoar $as_me 0.3.1, which was
+This file was extended by gnome-autoar $as_me 0.3.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15067,7 +15079,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-gnome-autoar config.status 0.3.1
+gnome-autoar config.status 0.3.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-autoar-0.3.1/configure.ac 
new/gnome-autoar-0.3.2/configure.ac
--- old/gnome-autoar-0.3.1/configure.ac 2021-03-13 08:50:53.000000000 +0100
+++ new/gnome-autoar-0.3.2/configure.ac 2021-04-30 13:27:43.000000000 +0200
@@ -6,7 +6,7 @@
 
 m4_define([major_version], [0])
 m4_define([minor_version], [3])
-m4_define([micro_version], [1])
+m4_define([micro_version], [2])
 
 AC_INIT([gnome-autoar],
         [major_version.minor_version.micro_version],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-autoar-0.3.1/docs/Makefile.in 
new/gnome-autoar-0.3.2/docs/Makefile.in
--- old/gnome-autoar-0.3.1/docs/Makefile.in     2021-03-13 08:52:35.000000000 
+0100
+++ new/gnome-autoar-0.3.2/docs/Makefile.in     2021-04-30 13:49:57.000000000 
+0200
@@ -335,6 +335,7 @@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-autoar-0.3.1/docs/reference/Makefile.in 
new/gnome-autoar-0.3.2/docs/reference/Makefile.in
--- old/gnome-autoar-0.3.1/docs/reference/Makefile.in   2021-03-13 
08:52:35.000000000 +0100
+++ new/gnome-autoar-0.3.2/docs/reference/Makefile.in   2021-04-30 
13:49:57.000000000 +0200
@@ -301,6 +301,7 @@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnome-autoar-0.3.1/docs/reference/gnome-autoar-docs.xml 
new/gnome-autoar-0.3.2/docs/reference/gnome-autoar-docs.xml
--- old/gnome-autoar-0.3.1/docs/reference/gnome-autoar-docs.xml 2020-11-13 
11:53:53.000000000 +0100
+++ new/gnome-autoar-0.3.2/docs/reference/gnome-autoar-docs.xml 2021-04-29 
17:05:38.000000000 +0200
@@ -8,9 +8,9 @@
   <bookinfo>
     <title>gnome-autoar Reference Manual</title>
     <releaseinfo>
-       gnome-autoar provides functions, widgets, and gschemas for GNOME
-       applications which want to use archives as a convenient method
-       to transfer directories over the internet.
+        gnome-autoar provides functions and widgets for GNOME
+        applications which want to use archives as a convenient method
+        to transfer directories over the internet.
     </releaseinfo>
   </bookinfo>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-autoar-0.3.1/docs/reference/html/index.html 
new/gnome-autoar-0.3.2/docs/reference/html/index.html
--- old/gnome-autoar-0.3.1/docs/reference/html/index.html       2021-03-13 
08:56:08.000000000 +0100
+++ new/gnome-autoar-0.3.2/docs/reference/html/index.html       2021-04-30 
13:50:04.000000000 +0200
@@ -15,9 +15,9 @@
 <div>
 <div><table class="navigation" id="top" width="100%" cellpadding="2" 
cellspacing="0"><tr><th valign="middle"><p class="title">gnome-autoar Reference 
Manual</p></th></tr></table></div>
 <div><p class="releaseinfo">
-       gnome-autoar provides functions, widgets, and gschemas for GNOME
-       applications which want to use archives as a convenient method
-       to transfer directories over the internet.
+        gnome-autoar provides functions and widgets for GNOME
+        applications which want to use archives as a convenient method
+        to transfer directories over the internet.
     </p></div>
 </div>
 <hr>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-autoar-0.3.1/docs/reference/html/style.css 
new/gnome-autoar-0.3.2/docs/reference/html/style.css
--- old/gnome-autoar-0.3.1/docs/reference/html/style.css        2021-03-13 
08:56:08.000000000 +0100
+++ new/gnome-autoar-0.3.2/docs/reference/html/style.css        2021-04-30 
13:50:04.000000000 +0200
@@ -455,6 +455,11 @@
   }
 }
 
+pre { line-height: 125%; }
+td.linenos pre { color: #000000; background-color: #f0f0f0; padding-left: 5px; 
padding-right: 5px; }
+span.linenos { color: #000000; background-color: #f0f0f0; padding-left: 5px; 
padding-right: 5px; }
+td.linenos pre.special { color: #000000; background-color: #ffffc0; 
padding-left: 5px; padding-right: 5px; }
+span.linenos.special { color: #000000; background-color: #ffffc0; 
padding-left: 5px; padding-right: 5px; }
 .hll { background-color: #ffffcc }
 .c { color: #408080; font-style: italic } /* Comment */
 .err { border: 1px solid #FF0000 } /* Error */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-autoar-0.3.1/gnome-autoar/autoar-compressor.c 
new/gnome-autoar-0.3.2/gnome-autoar/autoar-compressor.c
--- old/gnome-autoar-0.3.1/gnome-autoar/autoar-compressor.c     2021-02-12 
09:58:12.000000000 +0100
+++ new/gnome-autoar-0.3.2/gnome-autoar/autoar-compressor.c     2021-04-29 
17:05:38.000000000 +0200
@@ -851,33 +851,53 @@
     time_t atime, btime, ctime, mtime;
     long atimeu, btimeu, ctimeu, mtimeu;
 
-    atime = g_file_info_get_attribute_uint64 (info, 
G_FILE_ATTRIBUTE_TIME_ACCESS);
-    btime = g_file_info_get_attribute_uint64 (info, 
G_FILE_ATTRIBUTE_TIME_CREATED);
-    ctime = g_file_info_get_attribute_uint64 (info, 
G_FILE_ATTRIBUTE_TIME_CHANGED);
-    mtime = g_file_info_get_attribute_uint64 (info, 
G_FILE_ATTRIBUTE_TIME_MODIFIED);
-
-    atimeu = g_file_info_get_attribute_uint32 (info, 
G_FILE_ATTRIBUTE_TIME_ACCESS_USEC);
-    btimeu = g_file_info_get_attribute_uint32 (info, 
G_FILE_ATTRIBUTE_TIME_CREATED_USEC);
-    ctimeu = g_file_info_get_attribute_uint32 (info, 
G_FILE_ATTRIBUTE_TIME_CHANGED_USEC);
-    mtimeu = g_file_info_get_attribute_uint32 (info, 
G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC);
-
-    archive_entry_set_atime (self->entry, atime, atimeu * 1000);
-    archive_entry_set_birthtime (self->entry, btime, btimeu * 1000);
-    archive_entry_set_ctime (self->entry, ctime, ctimeu * 1000);
-    archive_entry_set_mtime (self->entry, mtime, mtimeu * 1000);
-
-    archive_entry_set_uid (self->entry, g_file_info_get_attribute_uint32 
(info, G_FILE_ATTRIBUTE_UNIX_UID));
-    archive_entry_set_gid (self->entry, g_file_info_get_attribute_uint32 
(info, G_FILE_ATTRIBUTE_UNIX_GID));
-    archive_entry_set_uname (self->entry, g_file_info_get_attribute_string 
(info, G_FILE_ATTRIBUTE_OWNER_USER));
-    archive_entry_set_gname (self->entry, g_file_info_get_attribute_string 
(info, G_FILE_ATTRIBUTE_OWNER_GROUP));
-    archive_entry_set_mode (self->entry, g_file_info_get_attribute_uint32 
(info, G_FILE_ATTRIBUTE_UNIX_MODE));
-  }
-
-  archive_entry_set_size (self->entry, g_file_info_get_attribute_uint64 (info, 
G_FILE_ATTRIBUTE_STANDARD_SIZE));
-  archive_entry_set_dev (self->entry, g_file_info_get_attribute_uint32 (info, 
G_FILE_ATTRIBUTE_UNIX_DEVICE));
-  archive_entry_set_ino64 (self->entry, g_file_info_get_attribute_uint64 
(info, G_FILE_ATTRIBUTE_UNIX_INODE));
-  archive_entry_set_nlink (self->entry, g_file_info_get_attribute_uint32 
(info, G_FILE_ATTRIBUTE_UNIX_NLINK));
-  archive_entry_set_rdev (self->entry, g_file_info_get_attribute_uint32 (info, 
G_FILE_ATTRIBUTE_UNIX_RDEV));
+    if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_ACCESS)) {
+      atime = g_file_info_get_attribute_uint64 (info, 
G_FILE_ATTRIBUTE_TIME_ACCESS);
+      atimeu = g_file_info_get_attribute_uint32 (info, 
G_FILE_ATTRIBUTE_TIME_ACCESS_USEC);
+      archive_entry_set_atime (self->entry, atime, atimeu * 1000);
+    }
+
+    if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_CREATED)) {
+      btime = g_file_info_get_attribute_uint64 (info, 
G_FILE_ATTRIBUTE_TIME_CREATED);
+      btimeu = g_file_info_get_attribute_uint32 (info, 
G_FILE_ATTRIBUTE_TIME_CREATED_USEC);
+      archive_entry_set_birthtime (self->entry, btime, btimeu * 1000);
+    }
+
+    if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_CHANGED)) {
+      ctime = g_file_info_get_attribute_uint64 (info, 
G_FILE_ATTRIBUTE_TIME_CHANGED);
+      ctimeu = g_file_info_get_attribute_uint32 (info, 
G_FILE_ATTRIBUTE_TIME_CHANGED_USEC);
+      archive_entry_set_ctime (self->entry, ctime, ctimeu * 1000);
+    }
+
+    if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_MODIFIED)) {
+      mtime = g_file_info_get_attribute_uint64 (info, 
G_FILE_ATTRIBUTE_TIME_MODIFIED);
+      mtimeu = g_file_info_get_attribute_uint32 (info, 
G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC);
+      archive_entry_set_mtime (self->entry, mtime, mtimeu * 1000);
+    }
+
+    if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_UID))
+      archive_entry_set_uid (self->entry, g_file_info_get_attribute_uint32 
(info, G_FILE_ATTRIBUTE_UNIX_UID));
+    if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_GID))
+      archive_entry_set_gid (self->entry, g_file_info_get_attribute_uint32 
(info, G_FILE_ATTRIBUTE_UNIX_GID));
+    if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_OWNER_USER))
+      archive_entry_set_uname (self->entry, g_file_info_get_attribute_string 
(info, G_FILE_ATTRIBUTE_OWNER_USER));
+    if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_OWNER_GROUP))
+      archive_entry_set_gname (self->entry, g_file_info_get_attribute_string 
(info, G_FILE_ATTRIBUTE_OWNER_GROUP));
+    if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_MODE))
+      archive_entry_set_mode (self->entry, g_file_info_get_attribute_uint32 
(info, G_FILE_ATTRIBUTE_UNIX_MODE));
+  }
+
+  if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_SIZE))
+    archive_entry_set_size (self->entry, g_file_info_get_attribute_uint64 
(info, G_FILE_ATTRIBUTE_STANDARD_SIZE));
+
+  if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_DEVICE))
+    archive_entry_set_dev (self->entry, g_file_info_get_attribute_uint32 
(info, G_FILE_ATTRIBUTE_UNIX_DEVICE));
+  if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_INODE))
+    archive_entry_set_ino64 (self->entry, g_file_info_get_attribute_uint64 
(info, G_FILE_ATTRIBUTE_UNIX_INODE));
+  if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_NLINK))
+    archive_entry_set_nlink (self->entry, g_file_info_get_attribute_uint32 
(info, G_FILE_ATTRIBUTE_UNIX_NLINK));
+  if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_RDEV))
+    archive_entry_set_rdev (self->entry, g_file_info_get_attribute_uint32 
(info, G_FILE_ATTRIBUTE_UNIX_RDEV));
 
   switch (filetype) {
     case G_FILE_TYPE_DIRECTORY:
@@ -943,23 +963,32 @@
                        g_object_ref (file));
 
   {
-    struct archive_entry *entry, *sparse;
+    struct archive_entry *sparse;
 
-    entry = self->entry;
-    archive_entry_linkify (self->resolver, &entry, &sparse);
+     /* Hardlinks are handled in different ways by the archive formats. The
+     * archive_entry_linkify function is a unified interface, which handling
+     * the complexity behind the scene. It assumes that archive_entry instances
+     * have valid nlinks, inode and device values. The inode and device value
+     * is used to match entries. The nlinks value is used to determined if all
+     * references have been found and if the internal references can be
+     * recycled. */
+    if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_DEVICE) &&
+        g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_INODE) &&
+        g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_NLINK))
+      archive_entry_linkify (self->resolver, &self->entry, &sparse);
 
-    if (entry != NULL) {
+    if (self->entry != NULL) {
       GFile *file_to_read;
       const char *pathname_in_entry;
-      pathname_in_entry = archive_entry_pathname (entry);
+      pathname_in_entry = archive_entry_pathname (self->entry);
       file_to_read = g_hash_table_lookup (self->pathname_to_g_file,
                                           pathname_in_entry);
-      autoar_compressor_do_write_data (self, entry, file_to_read);
+      autoar_compressor_do_write_data (self, self->entry, file_to_read);
       /* Entries for non-regular files might have their size attribute
        * different to their actual size on the disk
        */
-      if (archive_entry_filetype (entry) != AE_IFREG &&
-          archive_entry_size (entry) != g_file_info_get_size (info)) {
+      if (archive_entry_filetype (self->entry) != AE_IFREG &&
+          archive_entry_size (self->entry) != g_file_info_get_size (info)) {
         self->completed_size += g_file_info_get_size (info);
         autoar_compressor_signal_progress (self);
       }
@@ -967,12 +996,16 @@
       g_hash_table_remove (self->pathname_to_g_file, pathname_in_entry);
       /* We have registered g_object_unref function to free the GFile object,
        * so we do not have to unref it here. */
+    } else {
+      /* The archive_entry_linkify function stole our entry, so new one has to
+       * be allocated here to not crash on the next file. */
+      self->entry = archive_entry_new ();
     }
 
     if (sparse != NULL) {
       GFile *file_to_read;
       const char *pathname_in_entry;
-      pathname_in_entry = archive_entry_pathname (entry);
+      pathname_in_entry = archive_entry_pathname (self->entry);
       file_to_read = g_hash_table_lookup (self->pathname_to_g_file,
                                           pathname_in_entry);
       autoar_compressor_do_write_data (self, sparse, file_to_read);
@@ -1484,14 +1517,19 @@
       return;
   }
 
-  /* Process the final entry */
+  /* Flush deferred entries, if any, by calling linkify with entry unset. */
   {
     struct archive_entry *entry, *sparse;
-    entry = NULL;
-    archive_entry_linkify (self->resolver, &entry, &sparse);
-    if (entry != NULL) {
-      GFile *file_to_read;
-      const char *pathname_in_entry;
+    GFile *file_to_read;
+    const char *pathname_in_entry;
+
+    while (TRUE) {
+      /* The archive_entry is freed by the archive_entry_linkify function. */
+      entry = NULL;
+      archive_entry_linkify (self->resolver, &entry, &sparse);
+      if (entry == NULL)
+        break;
+
       pathname_in_entry = archive_entry_pathname (entry);
       file_to_read = g_hash_table_lookup (self->pathname_to_g_file,
                                           pathname_in_entry);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-autoar-0.3.1/gnome-autoar/autoar-extractor.c 
new/gnome-autoar-0.3.2/gnome-autoar/autoar-extractor.c
--- old/gnome-autoar-0.3.1/gnome-autoar/autoar-extractor.c      2021-03-12 
16:46:50.000000000 +0100
+++ new/gnome-autoar-0.3.2/gnome-autoar/autoar-extractor.c      2021-04-29 
17:05:38.000000000 +0200
@@ -1204,8 +1204,12 @@
         }
 
         fileandinfo.file = g_object_ref (dest);
-        fileandinfo.info = g_object_ref (info);
+        fileandinfo.info = g_file_info_dup (info);
         g_array_append_val (self->extracted_dir_list, fileandinfo);
+
+        /* Unset folder permissions for now to be sure it is writable. */
+        g_file_info_set_attribute (info, G_FILE_ATTRIBUTE_UNIX_MODE,
+                                   G_FILE_ATTRIBUTE_TYPE_INVALID, NULL);
       }
       break;
     case AE_IFLNK:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-autoar-0.3.1/tests/test-extract-unit.c 
new/gnome-autoar-0.3.2/tests/test-extract-unit.c
--- old/gnome-autoar-0.3.1/tests/test-extract-unit.c    2021-03-12 
16:46:50.000000000 +0100
+++ new/gnome-autoar-0.3.2/tests/test-extract-unit.c    2021-04-29 
17:05:38.000000000 +0200
@@ -1286,6 +1286,50 @@
   assert_reference_and_output_match (extract_test);
 }
 
+/* Be sure that extraction of children from a readonly directory doesn't fail. 
*/
+static void
+test_readonly_directory (void)
+{
+  /* arextract.tar
+   * ????????? arextract
+   *     ????????? arextract.txt
+   *
+   * 1 directories, 1 files
+   *
+   *
+   * ref
+   * ????????? arextract
+   *     ????????? arextract.txt
+   *
+   * 1 directories, 1 files
+   */
+
+  g_autoptr (ExtractTest) extract_test = NULL;
+  g_autoptr (ExtractTestData) data = NULL;
+  g_autoptr (GFile) archive = NULL;
+  g_autoptr (AutoarExtractor) extractor = NULL;
+
+  extract_test = extract_test_new ("test-readonly-directory");
+
+  if (!extract_test) {
+    g_assert_nonnull (extract_test);
+    return;
+  }
+
+  archive = g_file_get_child (extract_test->input, "arextract.tar");
+
+  extractor = autoar_extractor_new (archive, extract_test->output);
+
+  data = extract_test_data_new_for_extract (extractor);
+
+  autoar_extractor_start (extractor, data->cancellable);
+
+  g_assert_cmpuint (data->number_of_files, ==, 2);
+  g_assert_no_error (data->error);
+  g_assert_true (data->completed_signalled);
+  assert_reference_and_output_match (extract_test);
+}
+
 static void
 setup_test_suite (void)
 {
@@ -1324,6 +1368,9 @@
                    test_sanitize_dotdot_parent);
   g_test_add_func ("/autoar-extract/test-sanitize-absolute-path",
                    test_sanitize_absolute_path);
+
+  g_test_add_func ("/autoar-extract/test-readonly-directory",
+                   test_readonly_directory);
 }
 
 int

Reply via email to