Update bundled libarchive from upstream or remove it

Bug #1681721 reported by Alexey Kopytov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Status tracked in 2.4
2.3
Fix Released
High
Vasily Nemkov
2.4
Fix Released
High
Vasily Nemkov

Bug Description

XtraBackup fails to build with GCC 7 with -Werror. One of the reasons is
GCC 7 being more pedantic about fall-through code in the switch()
statement in libarchive:

[64%] Building C object
storage/innobase/xtrabackup/src/libarchive/libarchive/CMakeFiles/archive_static.dir/archive_read_support_format_iso9660.c.o
/home/software/percona-xtrabackup-2.4.6/storage/innobase/xtrabackup/src/libarchive/libarchive/archive_read_support_format_iso9660.c:
In function ‘parse_rockridge’:
/home/software/percona-xtrabackup-2.4.6/storage/innobase/xtrabackup/src/libarchive/libarchive/archive_read_support_format_iso9660.c:2030:7:
error: this statement may fall through [-Werror=implicit-fallthrough=]
    if (p[0] == 'S' && p[1] == 'T'
       ^
/home/software/percona-xtrabackup-2.4.6/storage/innobase/xtrabackup/src/libarchive/libarchive/archive_read_support_format_iso9660.c:2045:3:
note: here
   case 'T':
   ^~~~

Apparently this particular code has been fixed upstream a long time ago,
see:
https://github.com/libarchive/libarchive/commit/baa7279089c8545bc0bdd264af5726942055bdb3

I see the following ways to fix that (from trivial to more invasive):

1. Merge libarchive upstream

2. Get rid of the bundled libarchive. There were reasons to have a
modified bundled libarchive, but chances are they are long gone. See bug
#1088315
and bug #977998. I have some vague memories about the
particular problem in #977998 being fixed upstream.

3. Get rid of libarchive and the tar streaming format altogether. tar
streaming has too many limitations anyway, perhaps it's time to
deprecate it?

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

I think we should remove streaming in tar format, but it will be done in the next major release. For 2.3 and 2.4 I'll investigate 1 and 2.

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Looks like GCC 7 won't released anytime soon...

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Build fails on zesty as well which using GCC 6.3

Revision history for this message
Vasily Nemkov (vasily.nemkov) wrote :

Going to update libarchive source bundled with xtrabackup to the most recent version, 3.3.1.

Why we can't get rid of it:
CentOS 6 has libarchive version 2.8.3-7.
And we need SCHILY pax attributes removed, which was done in v3.0.2 (https://github.com/libarchive/libarchive/commit/de60ddd06dab4d9dabd385bb25aae90e41d430b4)
(For details on SCHILY-attributes removal, please see https://bugs.launchpad.net/percona-xtrabackup/+bug/977998/comments/6)

Revision history for this message
Vasily Nemkov (vasily.nemkov) wrote :

libarachive versions in supported distributives:
CentOS 6 - 2.8.3-7 #http://mirror.centos.org/centos/6/os/x86_64/Packages/
CentOS 7 - 3.1.2-10 #http://mirror.centos.org/centos/7/os/x86_64/Packages/

Debian 7 Wheezy - 3.0.4-3 #https://packages.debian.org/wheezy/libarchive12
Debian 8 Jessie - 3.1.2-11 #https://packages.debian.org/jessie/libarchive13

Ubuntu 14.04 Trusty - 3.1.2-7 #https://packages.ubuntu.com/trusty/libarchive13
Ubuntu 16.04 Xenial 3.1.2-11 #https://packages.ubuntu.com/xenial/libarchive13

Revision history for this message
Vasily Nemkov (vasily.nemkov) wrote :
Revision history for this message
Vasily Nemkov (vasily.nemkov) wrote :
Revision history for this message
Vasily Nemkov (vasily.nemkov) wrote :
Revision history for this message
Vasily Nemkov (vasily.nemkov) wrote :

Merged into 2.4

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-502

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.