diff --git a/docker.spec b/docker.spec index b3aab48..a17aaf4 100644 --- a/docker.spec +++ b/docker.spec @@ -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 diff --git a/netlink_gcc_go.patch b/netlink_gcc_go.patch new file mode 100644 index 0000000..cccc199 --- /dev/null +++ b/netlink_gcc_go.patch @@ -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 ++)