]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
3 years agotests: mark failed_filename and tests static to fix WARNS=6 build 1433/head
Kyle Evans [Tue, 8 Sep 2020 18:58:32 +0000 (13:58 -0500)] 
tests: mark failed_filename and tests static to fix WARNS=6 build

Observed on FreeBSD with a higher WARNS level on bsdcat/tests, these two
variables should be private to test_main.c in order to appease the build.

3 years agoMerge pull request #1422 from crrodriguez/o_tmpfile
Martin Matuška [Sun, 9 Aug 2020 00:43:48 +0000 (02:43 +0200)] 
Merge pull request #1422 from crrodriguez/o_tmpfile

use O_TMPFILE if it works/is supported in __archive_mktemp

3 years agoCI: Run tests on FreeBSD 12.1 and 11.4 via Cirrus CI
Martin Matuska [Wed, 29 Jul 2020 08:10:50 +0000 (10:10 +0200)] 
CI: Run tests on FreeBSD 12.1 and 11.4 via Cirrus CI

3 years agouse O_TMPFILE if it works/is supported in __archive_mktemp 1422/head
Cristian Rodríguez [Mon, 27 Jul 2020 14:11:33 +0000 (10:11 -0400)] 
use O_TMPFILE if it works/is supported in __archive_mktemp

This makes the function safer on linux since the file is warrantied to never
be visible on the filesystem, cannot be linked anywhere unless O_EXCL is
not specified and it is lost forever on any kind of program termination.

3 years agoMerge pull request #1420 from Gei0r/master
Tim Kientzle [Sun, 26 Jul 2020 21:01:43 +0000 (14:01 -0700)] 
Merge pull request #1420 from Gei0r/master

Enable compression level up to 9 for xz, xar, 7zip

3 years agoEnable compression level up to 9 for xz, xar, 7zip 1420/head
Adrian Ebeling [Sun, 26 Jul 2020 08:51:46 +0000 (10:51 +0200)] 
Enable compression level up to 9 for xz, xar, 7zip

3 years agoMerge pull request #1412 from uyjulian/use_standard_header
Martin Matuška [Sat, 25 Jul 2020 09:35:40 +0000 (11:35 +0200)] 
Merge pull request #1412 from uyjulian/use_standard_header

memory.h is a non-standard header, so use stdlib.h instead

3 years agoMerge pull request #1411 from uyjulian/use_standard_format_specifiers
Martin Matuška [Sat, 25 Jul 2020 09:35:15 +0000 (11:35 +0200)] 
Merge pull request #1411 from uyjulian/use_standard_format_specifiers

Use standard format specifiers

3 years agoMerge pull request #1408 from Azq2/patch-1
Martin Matuška [Fri, 17 Jul 2020 00:55:19 +0000 (02:55 +0200)] 
Merge pull request #1408 from Azq2/patch-1

Fix uninitialized size in rar5_read_data

3 years agoUse standard format specifiers 1411/head
uyjulian [Wed, 8 Jul 2020 04:54:12 +0000 (23:54 -0500)] 
Use standard format specifiers

3 years agomemory.h is a non-standard header, so use stdlib.h instead 1412/head
uyjulian [Wed, 8 Jul 2020 04:51:10 +0000 (23:51 -0500)] 
memory.h is a non-standard header, so use stdlib.h instead

3 years agoMerge pull request #1405 from yuyichao/read_format
Martin Matuška [Tue, 7 Jul 2020 22:11:58 +0000 (00:11 +0200)] 
Merge pull request #1405 from yuyichao/read_format

More format supports in archive_read_support_format_by_code

3 years agoInitialize to zero only size + check for null 1408/head
Kirill Zhumarin [Thu, 2 Jul 2020 12:25:35 +0000 (15:25 +0300)] 
Initialize to zero only size + check for null

3 years agoFix uninitialized offset & size in rar5_read_data
Kirill Zhumarin [Thu, 2 Jul 2020 11:37:15 +0000 (14:37 +0300)] 
Fix uninitialized offset & size in rar5_read_data

3 years agoMerge pull request #1404 from yuyichao/set_format_error
Martin Matuška [Wed, 1 Jul 2020 16:30:20 +0000 (18:30 +0200)] 
Merge pull request #1404 from yuyichao/set_format_error

Set an error message for setting invalid format by code on readers

3 years agoMore format supports in archive_read_support_format_by_code and archive_read_set_format 1405/head
Yichao Yu [Sun, 28 Jun 2020 16:34:24 +0000 (12:34 -0400)] 
More format supports in archive_read_support_format_by_code and archive_read_set_format

3 years agoSet an error message for setting invalid format by code on readers 1404/head
Yichao Yu [Sun, 28 Jun 2020 15:29:45 +0000 (11:29 -0400)] 
Set an error message for setting invalid format by code on readers

The error message is consistent with `archive_read_set_format`.
The absense of an error message here also means that the error message
in `archive_read_set_format` is actually never used.

Writer functions does not seem to have the same issue.

3 years agoMerge pull request #1402 from robUx4/winnt-redefine
Martin Matuška [Fri, 19 Jun 2020 14:15:34 +0000 (16:15 +0200)] 
Merge pull request #1402 from robUx4/winnt-redefine

don't force windows versions if they are set in the environment

3 years agoMerge pull request #1395 from pieper/1394-fix-enum-cases
Martin Matuška [Fri, 19 Jun 2020 14:14:11 +0000 (16:14 +0200)] 
Merge pull request #1395 from pieper/1394-fix-enum-cases

Explicitly handle all enum cases in switch

3 years agodon't force windows versions if they are set in the environment 1402/head
Steve Lhomme [Thu, 2 Apr 2020 13:33:40 +0000 (15:33 +0200)] 
don't force windows versions if they are set in the environment

3 years agoCOMP: explicitly handle all enum cases in switch 1395/head
Steve Pieper [Sun, 7 Jun 2020 14:25:31 +0000 (10:25 -0400)] 
COMP: explicitly handle all enum cases in switch

In VisualStudio 2019 error C4061 happens if you don't
have a case statement for every value of an enum.
The default condition is not enough.

This fix avoids error like this:

25>C:\sq5\LibArchive\libarchive\archive_read_support_format_warc.c(344,2): error C4061: enumerator 'WT_NONE' in switch of enum 'warc_type_t' is not explicitly handled by a case label [C:\sq5\LibArchive-build\libarchive\archive.vcxproj]

3 years agoIntroduce archive_read_support_filter_by_code()
Martin Matuska [Tue, 9 Jun 2020 05:09:09 +0000 (07:09 +0200)] 
Introduce archive_read_support_filter_by_code()

Fixes #1258

3 years agoSkip hardlinks pointing to itself and issue a warning
Martin Matuska [Tue, 9 Jun 2020 05:06:32 +0000 (07:06 +0200)] 
Skip hardlinks pointing to itself and issue a warning

Fixes #1381

3 years agoMerge pull request #1347 from evelikov/mtree
Martin Matuška [Tue, 9 Jun 2020 04:22:00 +0000 (06:22 +0200)] 
Merge pull request #1347 from evelikov/mtree

Introduce MTREE digest reader support

3 years agoMerge pull request #1392 from marcespie/errmsg
Martin Matuška [Thu, 4 Jun 2020 22:34:07 +0000 (00:34 +0200)] 
Merge pull request #1392 from marcespie/errmsg

remove unneeded strlen

3 years agoMerge pull request #1391 from marcespie/isint_w
Martin Matuška [Thu, 4 Jun 2020 22:33:43 +0000 (00:33 +0200)] 
Merge pull request #1391 from marcespie/isint_w

isint_w should use long literals

3 years agoMerge pull request #1389 from yuyichao/copy_utf8
Martin Matuška [Thu, 4 Jun 2020 22:33:24 +0000 (00:33 +0200)] 
Merge pull request #1389 from yuyichao/copy_utf8

Complete support for UTF8 encoding conversion

3 years agoremove unneeded strlen 1392/head
Marc Espie [Thu, 4 Jun 2020 15:02:31 +0000 (17:02 +0200)] 
remove unneeded strlen

this is obviously s, no need to recompute it each time

3 years agoisint_w should use long literals 1391/head
Marc Espie [Thu, 4 Jun 2020 14:59:17 +0000 (16:59 +0200)] 
isint_w should use long literals

cut&paste from isint apparently forgot that

3 years agoComplete support for UTF8 encoding conversion 1389/head
Yichao Yu [Sun, 31 May 2020 18:30:10 +0000 (14:30 -0400)] 
Complete support for UTF8 encoding conversion

All the conversions already always go through the MBS form so
simply always convert to MBS before trying to convert to any other encoding
in the `archive_mstring_get_*` functions.

* Do this by calling `archive_mstring_get_mbs` to avoid duplicating code
* Add `struct archive*` parameter to `archive_mstring_get_mbs_l`
* Add test for set/get/update utf8 functions on entry
* Add test for encoding conversion.

Fix #931

3 years agoMerge pull request #1388 from michaelforney/cpio-rdev
Martin Matuška [Sat, 30 May 2020 12:47:40 +0000 (14:47 +0200)] 
Merge pull request #1388 from michaelforney/cpio-rdev

Fix rdev field in cpio format for device nodes

3 years agoMerge pull request #1387 from glebfm/tar2cpio-hardlink-filetype
Martin Matuška [Sat, 30 May 2020 12:46:04 +0000 (14:46 +0200)] 
Merge pull request #1387 from glebfm/tar2cpio-hardlink-filetype

Fix writing of cpio archives containing hardlinks without file type

3 years agoMerge pull request #1383 from goshhhy/master
Martin Matuška [Sat, 30 May 2020 12:44:15 +0000 (14:44 +0200)] 
Merge pull request #1383 from goshhhy/master

configure.ac: check if flags are needed for c99

3 years agoMerge pull request #1382 from mgorny/wrong-prog
Martin Matuška [Sat, 30 May 2020 12:43:31 +0000 (14:43 +0200)] 
Merge pull request #1382 from mgorny/wrong-prog

test_read_append_filter_wrong_program: Do not check stderr

3 years agoFix rdev field in cpio format for device nodes 1388/head
Michael Forney [Fri, 29 May 2020 21:54:05 +0000 (14:54 -0700)] 
Fix rdev field in cpio format for device nodes

Currently, the rdev field is set from archive_entry_dev, which is
the device number of the filesystem containing the device node, not
the device itself. It should instead use archive_entry_rdev.

Here's an example demonstrating the problem:

$ ls -l /dev/null
crw-rw-rw-    1 root     root        1,    3 May 26 02:03 /dev/null
$ bsdtar --format=cpio -cf null.cpio /dev/null
bsdtar: Removing leading '/' from member names
$ bsdtar -tvf null.cpio
crw-rw-rw-  1 0      0         0,6 May 26 02:03 dev/null

3 years agoFix writing of cpio archives containing hardlinks without file type 1387/head
Gleb Fotengauer-Malinovskiy [Fri, 29 May 2020 10:12:29 +0000 (13:12 +0300)] 
Fix writing of cpio archives containing hardlinks without file type

Fixes: https://github.com/libarchive/libarchive/issues/1386
3 years agoconfigure.ac: check if flags are needed for c99 1383/head
goshhhy [Sun, 24 May 2020 23:17:44 +0000 (14:17 -0900)] 
configure.ac: check if flags are needed for c99

some older and more obscure compilers (e.g. mipspro on irix) default to the strictest standard they know instead of the most permissive. since libarchive uses c99 features in several places throughout, but does not pass appropriate cflags to parse c99 code, it will fail to compile from the configure script on these systems. this change will have autoconf check if any flags are needed for the c compiler to accept c99 code, and add them to cflags.

3 years agotest_read_append_filter_wrong_program: Do not check stderr 1382/head
Michał Górny [Sat, 23 May 2020 19:54:53 +0000 (21:54 +0200)] 
test_read_append_filter_wrong_program: Do not check stderr

Do not assert on specific output of bunzip2.  This wrongly assumes
that all systems will be using the reference implementation of bzip2,
and it fails when an implementation with another output is used
(e.g. lbzip2).

Fixes #1380

3 years agotest_write_disk_secure: unify ifdefs for lchmod() test
Martin Matuska [Fri, 22 May 2020 10:36:31 +0000 (12:36 +0200)] 
test_write_disk_secure: unify ifdefs for lchmod() test

3 years agotest_write_disk_secure: properly check if lchmod() is supported
Martin Matuska [Fri, 22 May 2020 09:43:43 +0000 (11:43 +0200)] 
test_write_disk_secure: properly check if lchmod() is supported

Fixes #1379

4 years agoRelease Dockerfile: add missing dependency on zlib1g-dev
Martin Matuska [Wed, 20 May 2020 01:16:09 +0000 (03:16 +0200)] 
Release Dockerfile: add missing dependency on zlib1g-dev

4 years agoLibarchive 3.4.4dev
Martin Matuska [Wed, 20 May 2020 00:18:08 +0000 (02:18 +0200)] 
Libarchive 3.4.4dev

4 years agoLibarchive 3.4.3 v3.4.3
Martin Matuska [Tue, 19 May 2020 23:48:25 +0000 (01:48 +0200)] 
Libarchive 3.4.3

4 years agoMerge pull request #1378 from stefan-baranoff/issue-1377-passphrase-memory-leak
Martin Matuška [Tue, 19 May 2020 08:20:51 +0000 (10:20 +0200)] 
Merge pull request #1378 from stefan-baranoff/issue-1377-passphrase-memory-leak

Fix memory leak from passphrase callback

4 years agoFix memory leak from passphrase callback 1378/head
Stefan Baranoff [Tue, 19 May 2020 00:57:14 +0000 (00:57 +0000)] 
Fix memory leak from passphrase callback

There is a bug in the linked list implementation for passphrases. The insert to
head function does not account for the tail==head case and causes a leak. The
first entry into the list is lost when the second entry is added. The second
and beyond entries are are released properly, but the first is lost entirely.

4 years agoMerge pull request #1376 from AdamKorcz/master
Martin Matuška [Fri, 8 May 2020 21:19:51 +0000 (23:19 +0200)] 
Merge pull request #1376 from AdamKorcz/master

Moved oss-fuzz files from oss-fuzz to Libarchives repository

4 years agoMoved oss-fuzz files from oss-fuzz to Libarchives repository 1376/head
Adam Korczynski [Wed, 6 May 2020 11:35:59 +0000 (12:35 +0100)] 
Moved oss-fuzz files from oss-fuzz to Libarchives repository

4 years agoAdd test for #1357 (detection of pzstd compressed files)
Martin Matuska [Thu, 30 Apr 2020 17:28:04 +0000 (19:28 +0200)] 
Add test for #1357 (detection of pzstd compressed files)

4 years agoMerge pull request #1357 from mako2580/master
Martin Matuška [Thu, 30 Apr 2020 17:22:26 +0000 (19:22 +0200)] 
Merge pull request #1357 from mako2580/master

zstd: Add support for files created with pzstd

4 years agoMerge pull request #1360 from EricAustinYu/master
Martin Matuška [Thu, 30 Apr 2020 08:03:10 +0000 (10:03 +0200)] 
Merge pull request #1360 from EricAustinYu/master

Remove unreachable code in RAR reader

4 years agoFix retrieving incorrect member from struct statfs
Martin Matuska [Thu, 30 Apr 2020 01:46:05 +0000 (03:46 +0200)] 
Fix retrieving incorrect member from struct statfs

Fixes #1355

4 years agotar reader: update handling of RHT.security.selinux xattr
Martin Matuska [Thu, 16 Apr 2020 02:10:30 +0000 (04:10 +0200)] 
tar reader: update handling of RHT.security.selinux xattr

Add test for PR #1348
Rename test_read_pax_schily_xattr to test_read_pax_xattr_schily

4 years agoMerge pull request #1372 from evelikov/single-child
Martin Matuška [Thu, 30 Apr 2020 01:39:48 +0000 (03:39 +0200)] 
Merge pull request #1372 from evelikov/single-child

Cleanup child handling

4 years agoMerge pull request #1371 from evelikov/digest-ifdef
Martin Matuška [Thu, 30 Apr 2020 01:35:03 +0000 (03:35 +0200)] 
Merge pull request #1371 from evelikov/digest-ifdef

Remove #ifdef chain in __archive_digest init

4 years agoMerge pull request #1365 from AdamKorcz/master
Martin Matuška [Thu, 30 Apr 2020 01:31:42 +0000 (03:31 +0200)] 
Merge pull request #1365 from AdamKorcz/master

Added seed corpus

4 years agofix typo in README.md (#1373)
Terrell Russell [Sun, 26 Apr 2020 00:50:23 +0000 (20:50 -0400)] 
fix typo in README.md (#1373)

4 years agoRemove CloseHandle() from __archive_write_program_free 1372/head
Emil Velikov [Sat, 25 Apr 2020 14:46:41 +0000 (15:46 +0100)] 
Remove CloseHandle() from __archive_write_program_free

The call to CloseHandle() is asymmetric and wrong.

The handle is created during the __achive_create_child() call in
__archive_write_program_open() aka the filter open callback.

While CloseHandle() is already called in the filter close callback aka
__archive_write_program_close().

Remove the incorrect call to CloseHandle() from the bidder free callback

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
4 years agoCall OpenProcess() from within __archive_create_child()
Emil Velikov [Sat, 25 Apr 2020 14:42:45 +0000 (15:42 +0100)] 
Call OpenProcess() from within __archive_create_child()

Move the Windows specific to the Windows version of the helper, making
the existing code shorter and simpler.

This means that the child "handle" type will vary across the two
platforms - something that we've already been doing with waitpid.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
4 years agoChange __archive_create_child() signature
Emil Velikov [Sat, 25 Apr 2020 12:56:12 +0000 (13:56 +0100)] 
Change __archive_create_child() signature

Change the function to return an int - ARCHIVE_OK or ARCHIVE_FAILED,
taking the child as an output argument.

This will allow us to simplify the existing code and have move platform
specifics in the platform files - posix and windows

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
4 years agoMoved the corpus file to the contrib dir 1365/head
Adam Korczynski [Sat, 25 Apr 2020 16:19:29 +0000 (17:19 +0100)] 
Moved the corpus file to the contrib dir

4 years agoRemove #ifdef chain in __archive_digest init 1371/head
Emil Velikov [Sat, 14 Mar 2020 13:31:31 +0000 (13:31 +0000)] 
Remove #ifdef chain in __archive_digest init

Follow the approach set by the crypto and use the exact same name for
the respective functions. This is perfectly fine, since only one
provider can be used (built) at given time.

As a result, we can kill off the excessively long ifdef chain, making
the more more manageable and shorter.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
4 years agoMerge pull request #1363 from aseprite/dont-test-lzma-if-not-needed
Martin Matuška [Fri, 24 Apr 2020 01:47:42 +0000 (03:47 +0200)] 
Merge pull request #1363 from aseprite/dont-test-lzma-if-not-needed

Don't even try HAVE_LZMA_STREAM_ENCODER_MT if ENABLE_LZMA is disabled

4 years agoMerge pull request #1364 from aseprite/macos-no-deprecated
Martin Matuška [Fri, 24 Apr 2020 01:47:05 +0000 (03:47 +0200)] 
Merge pull request #1364 from aseprite/macos-no-deprecated

Disable error using deprecated functions on macOS 10.15 to calculate MD5

4 years agoMerge pull request #1362 from aseprite/libarchive.pc-in-binary-dir
Martin Matuška [Fri, 24 Apr 2020 01:45:39 +0000 (03:45 +0200)] 
Merge pull request #1362 from aseprite/libarchive.pc-in-binary-dir

Create libarchive.pc inside the cmake build dir

4 years agoMerge pull request #1361 from aseprite/fix-msvc-warning-flags
Martin Matuška [Fri, 24 Apr 2020 01:44:45 +0000 (03:44 +0200)] 
Merge pull request #1361 from aseprite/fix-msvc-warning-flags

Use /w1nnnn instead of /wennnn to enable warnings on MSVC Debug mode

4 years agoMerge pull request #1367 from zoulasc/master
Martin Matuška [Fri, 24 Apr 2020 01:43:16 +0000 (03:43 +0200)] 
Merge pull request #1367 from zoulasc/master

Fix issues in acl tests

4 years agoMake variable const since it is assigned from a string literal 1367/head
Christos Zoulas [Wed, 22 Apr 2020 15:00:26 +0000 (11:00 -0400)] 
Make variable const since it is assigned from a string literal

4 years agoAdd missing breaks
Christos Zoulas [Wed, 22 Apr 2020 15:00:13 +0000 (11:00 -0400)] 
Add missing breaks

4 years agoAdded seed corpus
Adam Korczynski [Tue, 21 Apr 2020 17:23:53 +0000 (18:23 +0100)] 
Added seed corpus

4 years agoUse /w1nnnn instead of /wennnn to enable warnings on MSVC Debug mode 1361/head
David Capello [Sat, 18 Apr 2020 18:09:43 +0000 (15:09 -0300)] 
Use /w1nnnn instead of /wennnn to enable warnings on MSVC Debug mode

On MSVC /wennnn treats the specific warning number nnnn as an error:
https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level

But we want to enable this only when ENABLE_WERROR is defined (so the
general /WX flag is enough to treat all warnings as errors instead of
using /we).

4 years agoDisable error using deprecated functions on macOS 10.15 to calculate MD5 1364/head
David Capello [Thu, 10 Oct 2019 23:34:52 +0000 (20:34 -0300)] 
Disable error using deprecated functions on macOS 10.15 to calculate MD5

4 years agoDon't even try HAVE_LZMA_STREAM_ENCODER_MT if ENABLE_LZMA is disabled 1363/head
David Capello [Sat, 24 Jun 2017 16:35:57 +0000 (13:35 -0300)] 
Don't even try HAVE_LZMA_STREAM_ENCODER_MT if ENABLE_LZMA is disabled

4 years agoCreate libarchive.pc inside the cmake build dir 1362/head
David Capello [Wed, 14 Jun 2017 23:19:20 +0000 (20:19 -0300)] 
Create libarchive.pc inside the cmake build dir

In case that we don't have write access in the source dir, we have to
write generated files in the build dir.

4 years agoMerge pull request #1348 from mikhailnov/rh-selinux
Martin Matuška [Thu, 16 Apr 2020 00:20:24 +0000 (02:20 +0200)] 
Merge pull request #1348 from mikhailnov/rh-selinux

Support RHT.security.selinux from GNU tar

4 years agoMerge pull request #1359 from hjmallon/pr.neg_zstd_2
Martin Matuška [Thu, 16 Apr 2020 00:07:23 +0000 (02:07 +0200)] 
Merge pull request #1359 from hjmallon/pr.neg_zstd_2

zstd: Improve version checking

4 years agoRemove unreachable code in RAR reader 1360/head
Eric Yu [Tue, 14 Apr 2020 16:22:54 +0000 (11:22 -0500)] 
Remove unreachable code in RAR reader

4 years agozstd: Improve version checking 1359/head
Harry Mallon [Tue, 14 Apr 2020 13:37:28 +0000 (14:37 +0100)] 
zstd: Improve version checking

4 years agoMerge pull request #1352 from hjmallon/pr.negative_zstd
Martin Matuška [Fri, 10 Apr 2020 00:50:53 +0000 (02:50 +0200)] 
Merge pull request #1352 from hjmallon/pr.negative_zstd

zstd: Support negative compression-levels

4 years agoMerge pull request #1356 from robUx4/svfs-variable
Martin Matuška [Fri, 10 Apr 2020 00:48:24 +0000 (02:48 +0200)] 
Merge pull request #1356 from robUx4/svfs-variable

Fix stavfs variable name

4 years agozstd: Add support for files created with pzstd 1357/head
Matúš Olekšák [Wed, 8 Apr 2020 18:48:16 +0000 (20:48 +0200)] 
zstd: Add support for files created with pzstd

4 years agozstd: Support negative compression-levels 1352/head
Harry Mallon [Wed, 11 Mar 2020 12:47:49 +0000 (12:47 +0000)] 
zstd: Support negative compression-levels

4 years agoconsistently use svfs for statvfs variables 1356/head
Steve Lhomme [Mon, 6 Apr 2020 06:19:44 +0000 (08:19 +0200)] 
consistently use svfs for statvfs variables

So it cannot be misinterpreted as a statfs which uses the sfs variable name.

4 years agoMerge pull request #1354 from robUx4/local-mode_t-fix
Martin Matuška [Fri, 3 Apr 2020 21:32:04 +0000 (23:32 +0200)] 
Merge pull request #1354 from robUx4/local-mode_t-fix

archive_entry: use the proper define for mode_t

4 years agoarchive_entry: use the proper define for mode_t 1354/head
Steve Lhomme [Fri, 27 Mar 2020 15:26:07 +0000 (16:26 +0100)] 
archive_entry: use the proper define for mode_t

This is the define set in archive_entry.h to use the right mode_t type per
platform. "mode_t" may not be available at all.

This is also how these functions are declared in archive_entry.h

4 years agoMerge pull request #1350 from josch/master
Martin Matuška [Sat, 28 Mar 2020 07:49:04 +0000 (08:49 +0100)] 
Merge pull request #1350 from josch/master

libarchive/archive_entry_stat.3: typo nlinks -> nlink

4 years agoMerge pull request #1342 from hjmallon/pr.fix_high_zstd
Martin Matuška [Sat, 28 Mar 2020 07:45:36 +0000 (08:45 +0100)] 
Merge pull request #1342 from hjmallon/pr.fix_high_zstd

Fixes for using zstd binary

4 years agoCI: build Windows version with xz 5.2.5
Martin Matuska [Sat, 28 Mar 2020 07:23:28 +0000 (08:23 +0100)] 
CI: build Windows version with xz 5.2.5

4 years agolibarchive/archive_entry_stat.3: typo nlinks -> nlink 1350/head
Johannes 'josch' Schauer [Mon, 23 Mar 2020 10:21:55 +0000 (11:21 +0100)] 
libarchive/archive_entry_stat.3: typo nlinks -> nlink

4 years agoSupport RHT.security.selinux from GNU tar 1348/head
Mikhail Novosyolov [Thu, 19 Mar 2020 22:13:23 +0000 (01:13 +0300)] 
Support RHT.security.selinux from GNU tar

4 years agoAdd tests for the digest query API 1347/head
Emil Velikov [Thu, 27 Feb 2020 19:56:57 +0000 (19:56 +0000)] 
Add tests for the digest query API

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
4 years agoPopulate the digests from the mtree reader
Emil Velikov [Fri, 13 Mar 2020 18:35:50 +0000 (18:35 +0000)] 
Populate the digests from the mtree reader

With this in place all the functionality is in place and the API is
working as expected.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
4 years agoIntroduce internal archive_entry_set_digest()
Emil Velikov [Fri, 13 Mar 2020 19:21:55 +0000 (19:21 +0000)] 
Introduce internal archive_entry_set_digest()

To be used by the mtree reader, to populate the internal digest storage.
The function is deliberately not part of the user interface, since it's
interactions are not defined yet.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
4 years agoIntroduce public digest getter API
Emil Velikov [Thu, 27 Feb 2020 19:00:03 +0000 (19:00 +0000)] 
Introduce public digest getter API

Allow applications to query the digests stored in the MTREE. Which they
can use at a later stage to perform integrity checks as needed.

Note: no digests are wired yet.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
4 years agoIntroduce internal storage for entry digests
Justin Brewer [Thu, 15 Nov 2018 00:36:56 +0000 (18:36 -0600)] 
Introduce internal storage for entry digests

This commits introduces the basic internal storage for digests. Those
will be used to expose a set/get API, which users can utilise for
integrity checking.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
4 years agoFactor out digests struct to archive_entry_private.h
Emil Velikov [Thu, 27 Feb 2020 13:46:04 +0000 (13:46 +0000)] 
Factor out digests struct to archive_entry_private.h

Factor our the md5/rmd160... digests struct, moving it to the private
header. This way we can reuse it within the mtree read code.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
4 years agozstd: Fix support for compression-level>=20 when using binary 1342/head
Harry Mallon [Wed, 11 Mar 2020 12:14:36 +0000 (12:14 +0000)] 
zstd: Fix support for compression-level>=20 when using binary

* Requires '--ultra' argument

4 years agozstd: Use --no-check with binary to match library default
Harry Mallon [Wed, 11 Mar 2020 12:06:51 +0000 (12:06 +0000)] 
zstd: Use --no-check with binary to match library default

4 years agoSafe writes: improve error handling
Martin Matuska [Mon, 2 Mar 2020 07:55:44 +0000 (08:55 +0100)] 
Safe writes: improve error handling

Print message if creation of temporary file fails.
When rename of temporary file fails, exit with ARCHIVE_FAILED.
Reword message on failed rename.
Revert d84ec3f and 85b9f66, call archive_set_error()w before unlinking.

4 years agoAdd archive_write_disk_windows.c counterpart to previous commit
Martin Matuska [Mon, 2 Mar 2020 01:58:57 +0000 (02:58 +0100)] 
Add archive_write_disk_windows.c counterpart to previous commit

4 years agoStore errno when unlinking after rename on safe write failed
Martin Matuska [Mon, 2 Mar 2020 01:45:50 +0000 (02:45 +0100)] 
Store errno when unlinking after rename on safe write failed