diff --git a/ports/tar/tar.patch b/ports/tar/tar.patch index f274f840..e9ca79f6 100644 --- a/ports/tar/tar.patch +++ b/ports/tar/tar.patch @@ -1,15 +1,3 @@ -diff -Paur --no-dereference -- tar.upstream/build-aux/config.sub tar/build-aux/config.sub ---- tar.upstream/build-aux/config.sub -+++ tar/build-aux/config.sub -@@ -1356,7 +1356,7 @@ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* | -aros* \ -+ | -aos* | -aros* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ diff -Paur --no-dereference -- tar.upstream/configure tar/configure --- tar.upstream/configure +++ tar/configure @@ -135,26 +123,37 @@ diff -Paur --no-dereference -- tar.upstream/configure tar/configure +export gl_cv_func_getcwd_null=yes # Only if the OS actually supports this, Sortix does. +export gl_cv_struct_dirent_d_ino=yes # Only if the OS actually supports this, Sortix does. # Guess values for system-dependent variables and create Makefiles. - # Generated by GNU Autoconf 2.69 for GNU tar 1.28. + # Generated by GNU Autoconf 2.71 for GNU tar 1.35. # diff -Paur --no-dereference -- tar.upstream/gnu/getgroups.c tar/gnu/getgroups.c --- tar.upstream/gnu/getgroups.c +++ tar/gnu/getgroups.c -@@ -32,7 +32,7 @@ +@@ -30,7 +30,7 @@ /* Provide a stub that fails with ENOSYS, since there is no group information available on mingw. */ int --getgroups (int n _GL_UNUSED, GETGROUPS_T *groups _GL_UNUSED) -+getgroups (int n _GL_UNUSED, gid_t *groups _GL_UNUSED) +-getgroups (_GL_UNUSED int n, _GL_UNUSED GETGROUPS_T *groups) ++getgroups (_GL_UNUSED int n, _GL_UNUSED gid_t *groups) { errno = ENOSYS; return -1; diff -Paur --no-dereference -- tar.upstream/lib/rtapelib.c tar/lib/rtapelib.c --- tar.upstream/lib/rtapelib.c +++ tar/lib/rtapelib.c -@@ -424,8 +424,10 @@ - } - } +@@ -367,8 +367,10 @@ + + if (!pw) + return "getpwuid"; ++#if !defined(__sortix__) || defined(__SORTIX_HAS_INITGROUPS__) + if (initgroups (pw->pw_name, gid) != 0 && errno != EPERM) + return "initgroups"; ++#endif + if (gid != getegid () && setgid (gid) != 0 && errno != EPERM) + return "setgid"; + if (uid != geteuid () && setuid (uid) != 0 && errno != EPERM) +@@ -452,8 +454,10 @@ + + assume (remote_file); +#if !defined(__sortix__) /* FIXME: Should somewhat validate the decoding, here. */ @@ -163,28 +162,10 @@ diff -Paur --no-dereference -- tar.upstream/lib/rtapelib.c tar/lib/rtapelib.c error (EXIT_ON_EXEC_ERROR, 0, _("Cannot connect to %s: resolve failed"), remote_host); -diff -Paur --no-dereference -- tar.upstream/lib/xattr-at.c tar/lib/xattr-at.c ---- tar.upstream/lib/xattr-at.c -+++ tar/lib/xattr-at.c -@@ -31,6 +31,8 @@ - - #include "openat-priv.h" - -+#if defined(HAVE_XATTRS) && !(defined(__sortix__) && __has_include()) -+ - /* setxattrat */ - #define AT_FUNC_NAME setxattrat - #define AT_FUNC_F1 setxattr -@@ -108,3 +110,5 @@ - #undef AT_FUNC_RESULT - #undef AT_FUNC_POST_FILE_PARAM_DECLS - #undef AT_FUNC_POST_FILE_ARGS -+ -+#endif diff -Paur --no-dereference -- tar.upstream/lib/xattr-at.h tar/lib/xattr-at.h --- tar.upstream/lib/xattr-at.h +++ tar/lib/xattr-at.h -@@ -30,6 +30,7 @@ +@@ -31,6 +31,7 @@ # define ENOATTR ENODATA /* No such attribute */ #endif @@ -192,10 +173,52 @@ diff -Paur --no-dereference -- tar.upstream/lib/xattr-at.h tar/lib/xattr-at.h /* These are the dir-fd-relative variants of the functions without the "at" suffix. For example, setxattrat (AT_FDCWD, path, name, value, size, flags &c) is usually equivalent to setxattr (file, name, value, size, -@@ -70,5 +71,6 @@ +@@ -71,5 +72,6 @@ except when DIR_FD and FILE specify a symlink: llistxattr operates on the symlink, while the listxattrat operates on the referent of the symlink. */ ssize_t llistxattrat (int dir_fd, const char *path, char *list, size_t size); +#endif #endif /* XATTRS_AT_H */ +diff -Paur --no-dereference -- tar.upstream/src/Makefile.in tar/src/Makefile.in +--- tar.upstream/src/Makefile.in ++++ tar/src/Makefile.in +@@ -1263,7 +1263,7 @@ + LIBOBJS = @LIBOBJS@ + LIBPMULTITHREAD = @LIBPMULTITHREAD@ + LIBPTHREAD = @LIBPTHREAD@ +-LIBS = @LIBS@ ++LIBS = @LIBS@ @INTLLIBS@ + LIBUNISTRING_UNICASE_H = @LIBUNISTRING_UNICASE_H@ + LIBUNISTRING_UNICTYPE_H = @LIBUNISTRING_UNICTYPE_H@ + LIBUNISTRING_UNINORM_H = @LIBUNISTRING_UNINORM_H@ +diff -Paur --no-dereference -- tar.upstream/src/checkpoint.c tar/src/checkpoint.c +--- tar.upstream/src/checkpoint.c ++++ tar/src/checkpoint.c +@@ -136,12 +136,15 @@ + } + else if (strcmp (str, "totals") == 0) + alloc_action (cop_totals); ++/* PATCH: Sortix doesn't have sigwait yet. */ ++#if !defined(__sortix__) || defined(__SORTIX_HAS_SIGWAIT__) + else if (strncmp (str, "wait=", 5) == 0) + { + act = alloc_action (cop_wait); + act->v.signal = decode_signal (str + 5); + sigaddset (&sigs, act->v.signal); + } ++#endif + else + FATAL_ERROR ((0, 0, _("%s: unknown checkpoint action"), str)); + } +@@ -428,8 +431,10 @@ + + case cop_wait: + { ++#if !defined(__sortix__) || defined(__SORTIX_HAS_SIGWAIT__) + int n; + sigwait (&sigs, &n); ++#endif + } + } + } diff --git a/ports/tar/tar.port b/ports/tar/tar.port index f9375547..bc005d6f 100644 --- a/ports/tar/tar.port +++ b/ports/tar/tar.port @@ -1,11 +1,12 @@ NAME=tar BUILD_LIBRARIES='libiconv? libintl?' -VERSION=1.28 +VERSION=1.35 DISTNAME=$NAME-$VERSION COMPRESSION=tar.xz ARCHIVE=$DISTNAME.$COMPRESSION -SHA256SUM=64ee8d88ec1b47a0961033493f919d27218c41b580138fd6802327462aff22f2 +SHA256SUM=4d62ff37342ec7aed748535323930c7cf94acf71c3591882b26a7ea50f3edc16 UPSTREAM_SITE=https://ftp.gnu.org/gnu/tar UPSTREAM_ARCHIVE=$ARCHIVE +LICENSE=GPL-3.0-or-later BUILD_SYSTEM=configure MAKE_VARS='V=1'