mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
archivers/libarchive: update to 3.8.5
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
COMMENT= multi-format archive and compression library
|
||||
|
||||
DISTNAME= libarchive-3.8.3
|
||||
SHARED_LIBS= archive 13.3 # 21.1
|
||||
DISTNAME= libarchive-3.8.5
|
||||
SHARED_LIBS= archive 13.3 # 21.5
|
||||
CATEGORIES= archivers
|
||||
HOMEPAGE= https://www.libarchive.org/
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
SHA256 (libarchive-3.8.3.tar.xz) = kOIfK4nxk5HOe5D25I7Z/eU5TSOtMK4lb7gjazi5l4g=
|
||||
SIZE (libarchive-3.8.3.tar.xz) = 5990552
|
||||
SHA256 (libarchive-3.8.5.tar.xz) = 1oBo50vu46DsDdBK7pA31XV/zGUVkabc8bbVQvsVpwM=
|
||||
SIZE (libarchive-3.8.5.tar.xz) = 6009124
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
Index: Makefile.in
|
||||
--- Makefile.in.orig
|
||||
+++ Makefile.in
|
||||
@@ -18466,23 +18466,23 @@ distclean-local:
|
||||
# above.
|
||||
libarchive/test/list.h: $(libarchive_test_SOURCES)
|
||||
$(MKDIR_P) libarchive/test
|
||||
- grep -h '^DEFINE_TEST(' $^ | LC_COLLATE=C sort > $@
|
||||
+ grep -h '^DEFINE_TEST(' $(libarchive_test_SOURCES) | LC_COLLATE=C sort > $@
|
||||
|
||||
tar/test/list.h: $(bsdtar_test_SOURCES)
|
||||
$(MKDIR_P) tar/test
|
||||
- grep -h '^DEFINE_TEST(' $^ | LC_COLLATE=C sort > $@
|
||||
+ grep -h '^DEFINE_TEST(' $(bsdtar_test_SOURCES) | LC_COLLATE=C sort > $@
|
||||
|
||||
cpio/test/list.h: $(bsdcpio_test_SOURCES)
|
||||
$(MKDIR_P) cpio/test
|
||||
- grep -h '^DEFINE_TEST(' $^ | LC_COLLATE=C sort > $@
|
||||
+ grep -h '^DEFINE_TEST(' $(bsdcpio_test_SOURCES) | LC_COLLATE=C sort > $@
|
||||
|
||||
cat/test/list.h: $(bsdcat_test_SOURCES)
|
||||
$(MKDIR_P) cat/test
|
||||
- grep -h '^DEFINE_TEST(' $^ | LC_COLLATE=C sort > $@
|
||||
+ grep -h '^DEFINE_TEST(' $(bsdcat_test_SOURCES) | LC_COLLATE=C sort > $@
|
||||
|
||||
unzip/test/list.h: $(bsdunzip_test_SOURCES)
|
||||
$(MKDIR_P) unzip/test
|
||||
- grep -h '^DEFINE_TEST(' $^ | LC_COLLATE=C sort > $@
|
||||
+ grep -h '^DEFINE_TEST(' $(bsdunzip_test_SOURCES) | LC_COLLATE=C sort > $@
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
@@ -1,61 +0,0 @@
|
||||
https://github.com/libarchive/libarchive/pull/2797
|
||||
|
||||
Index: libarchive/archive_read_disk_posix.c
|
||||
--- libarchive/archive_read_disk_posix.c.orig
|
||||
+++ libarchive/archive_read_disk_posix.c
|
||||
@@ -2018,11 +2018,8 @@ tree_dup(int fd)
|
||||
}
|
||||
#endif /* F_DUPFD_CLOEXEC */
|
||||
new_fd = dup(fd);
|
||||
- if (new_fd != -1) {
|
||||
- __archive_ensure_cloexec_flag(new_fd);
|
||||
- return (new_fd);
|
||||
- }
|
||||
- return (-1);
|
||||
+ __archive_ensure_cloexec_flag(new_fd);
|
||||
+ return (new_fd);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2144,16 +2141,11 @@ tree_reopen(struct tree *t, const char *path, int rest
|
||||
* so try again for execute. The consequences of not opening this are
|
||||
* unhelpful and unnecessary errors later.
|
||||
*/
|
||||
- if (t->initial_dir_fd < 0) {
|
||||
+ if (t->initial_dir_fd < 0)
|
||||
t->initial_dir_fd = open(".", o_flag | O_CLOEXEC);
|
||||
- if (t->initial_dir_fd < 0)
|
||||
- return NULL;
|
||||
- }
|
||||
#endif
|
||||
__archive_ensure_cloexec_flag(t->initial_dir_fd);
|
||||
t->working_dir_fd = tree_dup(t->initial_dir_fd);
|
||||
- if (t->working_dir_fd < 0)
|
||||
- return NULL;
|
||||
return (t);
|
||||
}
|
||||
|
||||
@@ -2359,15 +2351,20 @@ static int
|
||||
tree_dir_next_posix(struct tree *t)
|
||||
{
|
||||
int r;
|
||||
+#if defined(HAVE_FDOPENDIR)
|
||||
+ int fd;
|
||||
+#endif
|
||||
const char *name;
|
||||
size_t namelen;
|
||||
|
||||
if (t->d == NULL) {
|
||||
|
||||
#if defined(HAVE_FDOPENDIR)
|
||||
- int fd = tree_dup(t->working_dir_fd);
|
||||
- if (fd != -1)
|
||||
- t->d = fdopendir(fd);
|
||||
+ if (t->working_dir_fd >= 0) {
|
||||
+ fd = tree_dup(t->working_dir_fd);
|
||||
+ if (fd != -1)
|
||||
+ t->d = fdopendir(fd);
|
||||
+ }
|
||||
#else /* HAVE_FDOPENDIR */
|
||||
if (tree_enter_working_dir(t) == 0) {
|
||||
t->d = opendir(".");
|
||||
@@ -1,14 +0,0 @@
|
||||
https://github.com/libarchive/libarchive/pull/2797
|
||||
|
||||
Index: libarchive/archive_read_support_format_mtree.c
|
||||
--- libarchive/archive_read_support_format_mtree.c.orig
|
||||
+++ libarchive/archive_read_support_format_mtree.c
|
||||
@@ -1254,7 +1254,7 @@ parse_file(struct archive_read *a, struct archive_entr
|
||||
archive_entry_filetype(entry) == AE_IFDIR) {
|
||||
mtree->fd = open(path, O_RDONLY | O_BINARY | O_CLOEXEC);
|
||||
__archive_ensure_cloexec_flag(mtree->fd);
|
||||
- if (mtree->fd < 0 && (
|
||||
+ if (mtree->fd == -1 && (
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
/*
|
||||
* On Windows, attempting to open a file with an
|
||||
@@ -1,26 +0,0 @@
|
||||
https://github.com/libarchive/libarchive/pull/2797
|
||||
|
||||
Index: libarchive/archive_write_disk_posix.c
|
||||
--- libarchive/archive_write_disk_posix.c.orig
|
||||
+++ libarchive/archive_write_disk_posix.c
|
||||
@@ -2561,9 +2561,9 @@ _archive_write_disk_close(struct archive *_a)
|
||||
* for directories. For other file types
|
||||
* we need to verify via fstat() or lstat()
|
||||
*/
|
||||
- if (fd < 0 || p->filetype != AE_IFDIR) {
|
||||
+ if (fd == -1 || p->filetype != AE_IFDIR) {
|
||||
#if HAVE_FSTAT
|
||||
- if (fd >= 0 && (
|
||||
+ if (fd > 0 && (
|
||||
fstat(fd, &st) != 0 ||
|
||||
la_verify_filetype(st.st_mode,
|
||||
p->filetype) == 0)) {
|
||||
@@ -4447,7 +4447,7 @@ fixup_appledouble(struct archive_write_disk *a, const
|
||||
*/
|
||||
fd = open(pathname, O_RDONLY | O_BINARY | O_CLOEXEC);
|
||||
__archive_ensure_cloexec_flag(fd);
|
||||
- if (fd < 0) {
|
||||
+ if (fd == -1) {
|
||||
archive_set_error(&a->archive, errno,
|
||||
"Failed to open a restoring file");
|
||||
ret = ARCHIVE_WARN;
|
||||
Reference in New Issue
Block a user