소스 검색

modifying package: tar-1.13.25 20030409 -> 20031007

Ralf S. Engelschall 22 년 전
부모
커밋
41f7e9371d
2개의 변경된 파일123개의 추가작업 그리고 1개의 파일을 삭제
  1. 120 0
      tar/tar.patch
  2. 3 1
      tar/tar.spec

+ 120 - 0
tar/tar.patch

@@ -0,0 +1,120 @@
+The following patches fix various problems.
+They are derived from RedHat's "tar" package.
+
+Index: src/extract.c
+--- src/extract.c.orig	2001-09-24 20:55:17.000000000 +0200
++++ src/extract.c	2003-10-07 11:46:03.000000000 +0200
+@@ -1019,10 +1019,19 @@
+       {
+ 	struct stat st1, st2;
+ 	int e;
++	size_t skiplinkcrud;
++
++	if (absolute_names_option)
++	  skiplinkcrud = 0;
++	else {
++	  skiplinkcrud = FILESYSTEM_PREFIX_LEN (current_link_name);
++	  while (ISSLASH (current_link_name[skiplinkcrud]))
++	    skiplinkcrud++;
++	}
+ 
+ 	/* MSDOS does not implement links.  However, djgpp's link() actually
+ 	   copies the file.  */
+-	status = link (current_link_name, CURRENT_FILE_NAME);
++	status = link (current_link_name + skiplinkcrud, CURRENT_FILE_NAME);
+ 
+ 	if (status == 0)
+ 	  {
+Index: src/incremen.c
+--- src/incremen.c.orig	2001-08-29 20:20:19.000000000 +0200
++++ src/incremen.c	2003-10-07 11:46:03.000000000 +0200
+@@ -186,8 +186,11 @@
+     struct directory *directory; /* for checking if already already seen */
+     enum children children;
+ 
+-    if (! dirp)
++    if (! dirp) {
+       savedir_error (path);
++      errno = 1;
++      return NULL;
++    }
+     errno = 0;
+ 
+     name_buffer_size = strlen (path) + NAME_FIELD_SIZE;
+Index: src/tar.c
+--- src/tar.c.orig	2001-09-21 02:11:27.000000000 +0200
++++ src/tar.c	2003-10-07 11:46:03.000000000 +0200
+@@ -534,7 +534,7 @@
+       /* Allocate a new argument array, and copy program name in it.  */
+ 
+       new_argc = argc - 1 + strlen (argv[1]);
+-      new_argv = xmalloc (new_argc * sizeof (char *));
++      new_argv = xmalloc ((new_argc + 1) * sizeof (char *));
+       in = argv;
+       out = new_argv;
+       *out++ = *in++;
+@@ -562,6 +562,10 @@
+       while (in < argv + argc)
+ 	*out++ = *in++;
+ 
++      /* K&R standard requires a NULL termination */
++
++      *out = NULL;
++
+       /* Replace the old option list by the new one.  */
+ 
+       argc = new_argc;
+Index: src/misc.c
+--- src/misc.c.orig	2001-08-27 01:14:26.000000000 +0200
++++ src/misc.c	2003-10-07 11:46:03.000000000 +0200
+@@ -214,6 +214,13 @@
+ 	    return 0;
+ 	}
+       while (! ISSLASH (*p));
++
++      do
++	{
++	  if (! *p++)
++	    return 0;
++	}
++      while ( ISSLASH (*p));
+     }
+ }
+ 
+Index: src/create.c
+--- src/create.c.orig	2001-08-29 23:21:02.000000000 +0200
++++ src/create.c	2003-10-07 11:46:03.000000000 +0200
+@@ -1128,6 +1128,16 @@
+     }
+   else if (is_avoided_name (p))
+     return;
++  else if (S_ISSOCK (current_stat.st_mode))
++    {
++      WARN ((0, 0, _("%s: socket ignored"), quotearg_colon (p)));
++      return;
++    }
++  else if (S_ISDOOR (current_stat.st_mode))
++    {
++      WARN ((0, 0, _("%s: door ignored"), quotearg_colon (p)));
++      return;
++    }
+   else
+     {
+       /* Check for multiple links.
+@@ -1507,16 +1517,6 @@
+ 	type = BLKTYPE;
+       else if (S_ISFIFO (current_stat.st_mode))
+ 	type = FIFOTYPE;
+-      else if (S_ISSOCK (current_stat.st_mode))
+-	{
+-	  WARN ((0, 0, _("%s: socket ignored"), quotearg_colon (p)));
+-	  return;
+-	}
+-      else if (S_ISDOOR (current_stat.st_mode))
+-	{
+-	  WARN ((0, 0, _("%s: door ignored"), quotearg_colon (p)));
+-	  return;
+-	}
+       else
+ 	goto unknown;
+     }

+ 3 - 1
tar/tar.spec

@@ -33,11 +33,12 @@ Distribution: OpenPKG [CORE]
 Group:        Archiver
 License:      GPL
 Version:      1.13.25
-Release:      20030409
+Release:      20031007
 
 #   list of sources
 Source0:      ftp://alpha.gnu.org/gnu/tar/tar-%{version}.tar.gz
 Source1:      tar.1
+Patch0:       tar.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -56,6 +57,7 @@ AutoReqProv:  no
 
 %prep
     %setup -q
+    %patch -p0
 
 %build
     echo 'am_cv_func_iconv=${am_cv_func_iconv=no}' >config.cache