tar fix from upstream
This commit is contained in:
parent
9fc0bc41c8
commit
f2f58b5244
33
go1.3beta3-tar-hardlink-fix.patch
Normal file
33
go1.3beta3-tar-hardlink-fix.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
commit a1d093d95dfb888e55f960943bd3ad3d181ec743
|
||||||
|
Author: Vincent Batts <vbatts@hashbangbash.com>
|
||||||
|
Date: Mon Aug 3 12:26:38 2015 -0400
|
||||||
|
|
||||||
|
archive/tar: don't treat multiple file system links as a tar hardlink
|
||||||
|
|
||||||
|
Do not assume that if stat shows multiple links that we should mark the
|
||||||
|
file as a hardlink in the tar format. If the hardlink link was not
|
||||||
|
referenced, this caused a link to "/". On an overlay file system, all
|
||||||
|
files have multiple links.
|
||||||
|
|
||||||
|
The caller must keep the inode references and set TypeLink, Size = 0,
|
||||||
|
and LinkName themselves.
|
||||||
|
|
||||||
|
Change-Id: I873b8a235bc8f8fbb271db74ee54232da36ca013
|
||||||
|
Reviewed-on: https://go-review.googlesource.com/13045
|
||||||
|
Reviewed-by: Ian Lance Taylor <iant@golang.org>
|
||||||
|
|
||||||
|
diff --git a/src/archive/tar/stat_unix.go b/src/archive/tar/stat_unix.go
|
||||||
|
index 27d112f..cb843db 100644
|
||||||
|
--- a/src/archive/tar/stat_unix.go
|
||||||
|
+++ b/src/archive/tar/stat_unix.go
|
||||||
|
@@ -28,10 +28,5 @@ func statUnix(fi os.FileInfo, h *Header) error {
|
||||||
|
h.AccessTime = statAtime(sys)
|
||||||
|
h.ChangeTime = statCtime(sys)
|
||||||
|
// TODO(bradfitz): major/minor device numbers?
|
||||||
|
- if fi.Mode().IsRegular() && sys.Nlink > 1 {
|
||||||
|
- h.Typeflag = TypeLink
|
||||||
|
- h.Size = 0
|
||||||
|
- // TODO(vbatts): Linkname?
|
||||||
|
- }
|
||||||
|
return nil
|
||||||
|
}
|
12
golang.spec
12
golang.spec
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
Name: golang
|
Name: golang
|
||||||
Version: 1.5
|
Version: 1.5
|
||||||
Release: 0.8.beta3%{?dist}
|
Release: 0.9.beta3%{?dist}
|
||||||
Summary: The Go Programming Language
|
Summary: The Go Programming Language
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -82,6 +82,10 @@ Patch214: go1.5beta2-disable-TestCloneNEWUSERAndRemapNoRootDisableSetgroup
|
|||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1248071
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1248071
|
||||||
Patch215: golang/go1.5beta2-increase-elfreserve-for-debug.patch
|
Patch215: golang/go1.5beta2-increase-elfreserve-for-debug.patch
|
||||||
|
|
||||||
|
# upstream commit that fixes hardlinks in archive/tar
|
||||||
|
# should be included in go1.5
|
||||||
|
Patch216: go1.3beta3-tar-hardlink-fix.patch
|
||||||
|
|
||||||
# Having documentation separate was broken
|
# Having documentation separate was broken
|
||||||
Obsoletes: %{name}-docs < 1.1-4
|
Obsoletes: %{name}-docs < 1.1-4
|
||||||
|
|
||||||
@ -220,6 +224,9 @@ end
|
|||||||
# ELFRESERVE
|
# ELFRESERVE
|
||||||
%patch215 -p1
|
%patch215 -p1
|
||||||
|
|
||||||
|
# archive/tar hardlinks
|
||||||
|
%patch216 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# go1.5 bootstrapping. The compiler is written in golang.
|
# go1.5 bootstrapping. The compiler is written in golang.
|
||||||
export GOROOT_BOOTSTRAP=%{goroot}
|
export GOROOT_BOOTSTRAP=%{goroot}
|
||||||
@ -417,6 +424,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 04 2015 Vincent Batts <vbatts@fedoraproject.org> - 1.5-0.9.beta3
|
||||||
|
- pull in upstream archive/tar fix
|
||||||
|
|
||||||
* Thu Jul 30 2015 Vincent Batts <vbatts@fedoraproject.org> - 1.5-0.8.beta3
|
* Thu Jul 30 2015 Vincent Batts <vbatts@fedoraproject.org> - 1.5-0.8.beta3
|
||||||
- updating to go1.5beta3
|
- updating to go1.5beta3
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user