converted link to branch
OBS-URL: https://build.opensuse.org/package/show/Base:System/tar?expand=0&rev=8
This commit is contained in:
parent
aee19c68c3
commit
d81ef996dc
52
tar-1.22-fortifysourcessigabrt.patch
Normal file
52
tar-1.22-fortifysourcessigabrt.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
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,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
Sun Aug 30 18:36:08 UTC 2009 - aj@suse.de
|
||||||
|
|
||||||
|
12
tar.spec
12
tar.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package tar (Version 1.21)
|
# spec file for package tar (Version 1.21)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -21,13 +21,13 @@
|
|||||||
Name: tar
|
Name: tar
|
||||||
BuildRequires: help2man
|
BuildRequires: help2man
|
||||||
Url: http://www.gnu.org/software/tar/
|
Url: http://www.gnu.org/software/tar/
|
||||||
License: GPL v3 or later
|
License: GPLv3+
|
||||||
Group: System/Base
|
Group: System/Base
|
||||||
Provides: base:/bin/tar
|
Provides: base:/bin/tar
|
||||||
PreReq: %install_info_prereq
|
PreReq: %install_info_prereq
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 1.21
|
Version: 1.21
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: GNU implementation of tar ((t)ape (ar)chiver)
|
Summary: GNU implementation of tar ((t)ape (ar)chiver)
|
||||||
Source0: %name-%version.tar.bz2
|
Source0: %name-%version.tar.bz2
|
||||||
# merged
|
# merged
|
||||||
@ -39,6 +39,7 @@ Patch1: tar-disable-listed02-test.diff
|
|||||||
Patch2: tar-manpage.patch
|
Patch2: tar-manpage.patch
|
||||||
Patch3: tar-wildcards.patch
|
Patch3: tar-wildcards.patch
|
||||||
Patch4: tar-recognize_xz.patch
|
Patch4: tar-recognize_xz.patch
|
||||||
|
Patch5: tar-1.22-fortifysourcessigabrt.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Recommends: xz
|
Recommends: xz
|
||||||
Recommends: tar-lang = %version
|
Recommends: tar-lang = %version
|
||||||
@ -82,6 +83,7 @@ Authors:
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4
|
%patch4
|
||||||
|
%patch5 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
rm -f po/no.* po/ky.*
|
rm -f po/no.* po/ky.*
|
||||||
@ -93,7 +95,9 @@ export CFLAGS="$RPM_OPT_FLAGS %my_cflags"
|
|||||||
export RSH="/usr/bin/rsh"
|
export RSH="/usr/bin/rsh"
|
||||||
./configure --prefix=%_prefix --bindir=%_bindir --mandir=%_mandir \
|
./configure --prefix=%_prefix --bindir=%_bindir --mandir=%_mandir \
|
||||||
--infodir=%_infodir --build=%{_target_cpu}-suse-linux
|
--infodir=%_infodir --build=%{_target_cpu}-suse-linux
|
||||||
make
|
make %{?jobs:-j%jobs};
|
||||||
|
|
||||||
|
%check
|
||||||
#%ifarch %arm
|
#%ifarch %arm
|
||||||
#make check || true
|
#make check || true
|
||||||
#%else
|
#%else
|
||||||
|
Loading…
Reference in New Issue
Block a user