checked in
OBS-URL: https://build.opensuse.org/package/show/Base:System/tar?expand=0&rev=7
This commit is contained in:
parent
bc5065c98e
commit
aee19c68c3
@ -1,52 +0,0 @@
|
||||
Index: tar-1.21/src/create.c
|
||||
===================================================================
|
||||
--- tar-1.21.orig/src/create.c
|
||||
+++ tar-1.21/src/create.c
|
||||
@@ -532,8 +532,8 @@ start_private_header (const char *name,
|
||||
GID_TO_CHARS (getgid (), header->header.gid);
|
||||
MAJOR_TO_CHARS (0, header->header.devmajor);
|
||||
MINOR_TO_CHARS (0, header->header.devminor);
|
||||
- strncpy (header->header.magic, TMAGIC, TMAGLEN);
|
||||
- strncpy (header->header.version, TVERSION, TVERSLEN);
|
||||
+ memcpy (header->header.magic, TMAGIC, TMAGLEN);
|
||||
+ memcpy (header->header.version, TVERSION, TVERSLEN);
|
||||
return header;
|
||||
}
|
||||
|
||||
@@ -577,7 +577,10 @@ write_gnu_long_link (struct tar_stat_inf
|
||||
GNAME_TO_CHARS (tmpname, header->header.gname);
|
||||
free (tmpname);
|
||||
|
||||
- strcpy (header->header.magic, OLDGNU_MAGIC);
|
||||
+ /* OLDGNU_MAGIC is string with 7 chars + NULL */
|
||||
+ memcpy (header->header.magic, OLDGNU_MAGIC, sizeof(header->header.magic));
|
||||
+ memcpy (header->header.version, OLDGNU_MAGIC+sizeof(header->header.magic),
|
||||
+ sizeof(header->header.version));
|
||||
header->header.typeflag = type;
|
||||
finish_header (st, header, -1);
|
||||
|
||||
@@ -907,15 +910,19 @@ start_header (struct tar_stat_info *st)
|
||||
break;
|
||||
|
||||
case OLDGNU_FORMAT:
|
||||
- case GNU_FORMAT: /*FIXME?*/
|
||||
- /* Overwrite header->header.magic and header.version in one blow. */
|
||||
- strcpy (header->header.magic, OLDGNU_MAGIC);
|
||||
+ case GNU_FORMAT:
|
||||
+ /* OLDGNU_MAGIC is string with 7 chars + NULL */
|
||||
+ memcpy (header->header.magic, OLDGNU_MAGIC,
|
||||
+ sizeof(header->header.magic));
|
||||
+ memcpy (header->header.version,
|
||||
+ OLDGNU_MAGIC+sizeof(header->header.magic),
|
||||
+ sizeof(header->header.version));
|
||||
break;
|
||||
|
||||
case POSIX_FORMAT:
|
||||
case USTAR_FORMAT:
|
||||
- strncpy (header->header.magic, TMAGIC, TMAGLEN);
|
||||
- strncpy (header->header.version, TVERSION, TVERSLEN);
|
||||
+ memcpy (header->header.magic, TMAGIC, TMAGLEN);
|
||||
+ memcpy (header->header.version, TVERSION, TVERSLEN);
|
||||
break;
|
||||
|
||||
default:
|
10
tar.changes
10
tar.changes
@ -1,13 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 6 17:52:57 CET 2009 - jengelh@medozas.de
|
||||
|
||||
- enable parallel building
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 4 21:46:24 CET 2009 - meissner@suse.de
|
||||
|
||||
- fixed FORTIFY_SOURCE=2 issue with gcc 4.5.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Aug 30 18:36:08 UTC 2009 - aj@suse.de
|
||||
|
||||
|
6
tar.spec
6
tar.spec
@ -39,7 +39,6 @@ Patch1: tar-disable-listed02-test.diff
|
||||
Patch2: tar-manpage.patch
|
||||
Patch3: tar-wildcards.patch
|
||||
Patch4: tar-recognize_xz.patch
|
||||
Patch5: tar-1.22-fortifysourcessigabrt.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Recommends: xz
|
||||
Recommends: tar-lang = %version
|
||||
@ -83,7 +82,6 @@ Authors:
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4
|
||||
%patch5 -p1
|
||||
|
||||
%build
|
||||
rm -f po/no.* po/ky.*
|
||||
@ -95,9 +93,7 @@ export CFLAGS="$RPM_OPT_FLAGS %my_cflags"
|
||||
export RSH="/usr/bin/rsh"
|
||||
./configure --prefix=%_prefix --bindir=%_bindir --mandir=%_mandir \
|
||||
--infodir=%_infodir --build=%{_target_cpu}-suse-linux
|
||||
make %{?jobs:-j%jobs};
|
||||
|
||||
%check
|
||||
make
|
||||
#%ifarch %arm
|
||||
#make check || true
|
||||
#%else
|
||||
|
Loading…
Reference in New Issue
Block a user