add netlink_gcc_go patch and fix minor issues:

review file list and name of the tarball

OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=63
This commit is contained in:
Jordi Massaguer 2016-02-09 11:46:03 +00:00 committed by Git OBS Bridge
parent 5bf2e5da42
commit aadf656db7
2 changed files with 52 additions and 1 deletions

View File

@ -46,6 +46,7 @@ Patch1: gcc5_socket_workaround.patch
Patch2: fix-docker-init.patch
Patch100: gcc-go-patches.patch
Patch101: fix-ppc64le.patch
Patch102: netlink_gcc_go.patch
BuildRequires: audit
BuildRequires: bash-completion
BuildRequires: device-mapper-devel >= 1.2.68
@ -137,7 +138,7 @@ BuildArch: noarch
Test package for docker. It contains the source code and the tests.
%prep
%setup -q -n docker-%{version}
%setup -q -n %{name}-%{version}
%patch0 -p1
# 1330 is Tumbleweed after leap has been released
# gcc5-go in Tumbleweed includes this commit
@ -153,6 +154,7 @@ Test package for docker. It contains the source code and the tests.
%ifnarch %go_arches
%patch100 -p1
%patch101 -p1
%patch102 -p1
%endif
cp %{SOURCE7} .
@ -260,6 +262,7 @@ groupadd -r docker 2>/dev/null || :
%{_bindir}/docker
%{_sbindir}/rcdocker
%{_prefix}/lib/docker/
%{_prefix}/lib/docker/dockerinit
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}.socket
%config %{_sysconfdir}/audit/rules.d/%{name}.rules

48
netlink_gcc_go.patch Normal file
View File

@ -0,0 +1,48 @@
diff --git a/vendor/src/github.com/vishvananda/netlink/link_linux.go b/vendor/src/github.com/vishvananda/netlink/link_linux.go
index 3aa9124..6ad7c2b 100644
--- a/vendor/src/github.com/vishvananda/netlink/link_linux.go
+++ b/vendor/src/github.com/vishvananda/netlink/link_linux.go
@@ -415,11 +415,11 @@ func LinkAdd(link Link) error {
req.Flags |= syscall.IFF_TUN_EXCL
copy(req.Name[:15], base.Name)
req.Flags |= uint16(tuntap.Mode)
- _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, file.Fd(), uintptr(syscall.TUNSETIFF), uintptr(unsafe.Pointer(&req)))
+ _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, file.Fd(), uintptr(syscall_TUNSETIFF), uintptr(unsafe.Pointer(&req)))
if errno != 0 {
return fmt.Errorf("Tuntap IOCTL TUNSETIFF failed, errno %v", errno)
}
- _, _, errno = syscall.Syscall(syscall.SYS_IOCTL, file.Fd(), uintptr(syscall.TUNSETPERSIST), 1)
+ _, _, errno = syscall.Syscall(syscall.SYS_IOCTL, file.Fd(), uintptr(syscall_TUNSETPERSIST), 1)
if errno != 0 {
return fmt.Errorf("Tuntap IOCTL TUNSETPERSIST failed, errno %v", errno)
}
diff --git a/vendor/src/github.com/vishvananda/netlink/link_linux_others.go b/vendor/src/github.com/vishvananda/netlink/link_linux_others.go
new file mode 100644
index 0000000..feb6070
--- /dev/null
+++ b/vendor/src/github.com/vishvananda/netlink/link_linux_others.go
@@ -0,0 +1,9 @@
+// +build linux
+// +build x86_64 arm64 s390x
+
+package netlink
+
+const (
+ syscall_TUNSETIFF = 0x400454ca
+ syscall_TUNSETPERSIST = 0x400454ca
+)
diff --git a/vendor/src/github.com/vishvananda/netlink/link_linux_ppc64le.go b/vendor/src/github.com/vishvananda/netlink/link_linux_ppc64le.go
new file mode 100644
index 0000000..fac7c06
--- /dev/null
+++ b/vendor/src/github.com/vishvananda/netlink/link_linux_ppc64le.go
@@ -0,0 +1,9 @@
+// +build linux
+// +build ppc64le
+
+package netlink
+
+const (
+ syscall_TUNSETIFF = 0x800454ca
+ syscall_TUNSETPERSIST = 0x800454ca
+)