tar: bump version

switch to x86
This commit is contained in:
Jerome Duval
2021-01-17 12:20:40 +01:00
parent 95f19cbfc0
commit 4b890dcedf
3 changed files with 51 additions and 3123 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,11 @@
From 25395e3fa0b01a898b6e6ae456c8eef3c66849f1 Mon Sep 17 00:00:00 2001
From a691dbde5db1ae1cb1c000be7e399e95737b061a Mon Sep 17 00:00:00 2001
From: Jonathan Schleifer <js@webkeks.org>
Date: Thu, 20 Mar 2014 14:52:58 +0100
Subject: Implement replace-hardlinks option
diff --git a/src/common.h b/src/common.h
index 501e0d3..60e1ff4 100644
index 5d07956..c70608f 100644
--- a/src/common.h
+++ b/src/common.h
@@ -197,6 +197,8 @@ GLOBAL enum old_files old_files_option;
@@ -18,7 +18,7 @@ index 501e0d3..60e1ff4 100644
GLOBAL const char *listed_incremental_option;
/* Incremental dump level */
diff --git a/src/extract.c b/src/extract.c
index 8276f8f..da0962d 100644
index d6d98cb..f63ee68 100644
--- a/src/extract.c
+++ b/src/extract.c
@@ -32,6 +32,8 @@ static bool we_are_root; /* true if our effective uid == 0 */
@@ -30,12 +30,14 @@ index 8276f8f..da0962d 100644
#define ALL_MODE_BITS ((mode_t) ~ (mode_t) 0)
#if ! HAVE_FCHMOD && ! defined fchmod
@@ -1336,6 +1338,38 @@ extract_link (char *file_name, int typeflag)
@@ -1458,7 +1460,39 @@ extract_link (char *file_name, int typeflag)
char const *link_name;
int rc;
+ if (simulate_hardlinks_option)
+ {
struct delayed_link *dl;
-
+
+ if (simulate_hardlinks_option)
+ {
+ /* symlinks have to be normalized */
+ const char* f = file_name;
+ const char* l = current_stat_info.link_name;
@@ -43,7 +45,7 @@ index 8276f8f..da0962d 100644
+ int p_count = 0;
+ char *link_name = (char*) xmalloc(strlen(current_stat_info.link_name) * 2);
+
+ for (; *f && *l; f++, l++)
+ for (; *f && *l; f++, l++)
+ {
+ if (*f != *l)
+ break;
@@ -69,7 +71,7 @@ index 8276f8f..da0962d 100644
link_name = current_stat_info.link_name;
if (! absolute_names_option && contains_dot_dot (link_name))
@@ -1425,6 +1459,13 @@ extract_symlink (char *file_name, int typeflag)
@@ -1551,6 +1585,13 @@ extract_symlink (char *file_name, int typeflag)
#else
static int warned_once;
@@ -84,19 +86,20 @@ index 8276f8f..da0962d 100644
{
warned_once = 1;
diff --git a/src/tar.c b/src/tar.c
index d66fed8..23027d2 100644
index 728e38b..21098df 100644
--- a/src/tar.c
+++ b/src/tar.c
@@ -449,6 +449,8 @@ static struct argp_option options[] = {
@@ -501,6 +501,9 @@ static struct argp_option options[] = {
{"check-device", CHECK_DEVICE_OPTION, NULL, 0,
N_("check device numbers when creating incremental archives (default)"),
GRID+1 },
GRID_MODIFIER },
+ {"replace-hardlinks", 'Q', 0, 0,
+ N_("replace hardlinks with corresponding symlink when extracting"), GRID+1 },
#undef GRID
+ N_("replace hardlinks with corresponding symlink when extracting"),
+ GRID_MODIFIER },
#define GRID 30
@@ -1728,6 +1730,10 @@ parse_opt (int key, char *arg, struct argp_state *state)
{NULL, 0, NULL, 0,
N_("Overwrite control:"), GRH_OVERWRITE },
@@ -1837,6 +1840,10 @@ parse_opt (int key, char *arg, struct argp_state *state)
set_archive_format (arg);
break;
@@ -107,7 +110,7 @@ index d66fed8..23027d2 100644
case INDEX_FILE_OPTION:
index_file_name = arg;
break;
@@ -2245,6 +2251,7 @@ decode_options (int argc, char **argv)
@@ -2288,6 +2295,7 @@ decode_options (int argc, char **argv)
unquote_option = true;
tar_sparse_major = 1;
tar_sparse_minor = 0;
@@ -116,5 +119,5 @@ index d66fed8..23027d2 100644
savedir_sort_order = SAVEDIR_SORT_NONE;
--
2.28.0
2.30.0

View File

@@ -12,35 +12,43 @@ archives)."
HOMEPAGE="https://www.gnu.org/software/tar/"
COPYRIGHT="1990-2018 Free Software Foundation, Inc."
LICENSE="GNU GPL v3"
REVISION="2"
REVISION="1"
SOURCE_URI="https://ftpmirror.gnu.org/tar/tar-$portVersion.tar.bz2
https://ftp.gnu.org/gnu/tar/tar-$portVersion.tar.bz2"
CHECKSUM_SHA256="e4bb9e08e12e7fa9f11fef544efc85e59ba34538593d9ad38148c7ca2bfbb566"
CHECKSUM_SHA256="85b6953f4bc9666eb7db61b48f150dca21b941d85090171ea8c4f89902e460af"
PATCHES="tar-$portVersion.patchset"
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
PATCHES+="
tar-$portVersion-gcc2.patchset
ARCHITECTURES="!x86_gcc2 x86 x86_64 arm"
SECONDARY_ARCHITECTURES="x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
tar$secondaryArchSuffix = $portVersion compat >= 1
cmd:tar$commandSuffix = $portVersion compat >= 1
"
REQUIRES="
haiku$secondaryArchSuffix
"
if [ "$targetArchitecture" = x86_gcc2 ]; then
REPLACES="
tar
"
fi
ARCHITECTURES="x86_gcc2 x86 x86_64 arm"
PROVIDES="
tar = $portVersion compat >= 1
cmd:tar = $portVersion compat >= 1
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:automake
cmd:autoreconf
cmd:gcc
cmd:ld
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:sed
"
@@ -59,11 +67,11 @@ TEST_REQUIRES+="
"
fi
defineDebugInfoPackage tar $binDir/tar
defineDebugInfoPackage tar$secondaryArchSuffix $commandBinDir/tar
BUILD()
{
runConfigure ./configure \
runConfigure --omit-dirs binDir ./configure --bindir=$commandBinDir \
--disable-nls \
--disable-gcc-warnings \
LDFLAGS="-lnetwork" CFLAGS="-D_BSD_SOURCE" \
@@ -78,5 +86,7 @@ INSTALL()
TEST()
{
#x86_64
#testsuite: 23 24 25 55 98 100 104 105 109 110 112 115 120 123 126 127 132 133 134 137 141 142 154 156 183 failed
make check
}