Accepting request 512480 from home:cyphar:containers
- Add backport of https://github.com/openSUSE/umoci/pull/157, to fix i586 builds. + i586-0001-fix-mis-usage-of-time.Unix.patch OBS-URL: https://build.opensuse.org/request/show/512480 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/umoci?expand=0&rev=24
This commit is contained in:
parent
f3781ab7f3
commit
bd2d103b0b
209
i586-0001-fix-mis-usage-of-time.Unix.patch
Normal file
209
i586-0001-fix-mis-usage-of-time.Unix.patch
Normal file
@ -0,0 +1,209 @@
|
||||
From 351b92da519b61cb24b5f7f71e5b9cf2c8c7bb02 Mon Sep 17 00:00:00 2001
|
||||
From: Aleksa Sarai <asarai@suse.de>
|
||||
Date: Mon, 24 Jul 2017 07:34:49 +1000
|
||||
Subject: [PATCH] *: fix mis-usage of unix.Stat_t.[AM]tim with time.Unix
|
||||
|
||||
80f787e4853d ("*: replace syscall with unix") did not correctly replace
|
||||
the usage of (*syscall.Stat_t).[AM]tim.Unix() in tests, which resulted
|
||||
in 32-bit builds failing in OBS because we run those tests in a %check
|
||||
section. We need to add CI testing to make sure that we don't miss stuff
|
||||
like this in the future.
|
||||
|
||||
Fixes: 80f787e4853d ("*: replace syscall with unix")
|
||||
Signed-off-by: Aleksa Sarai <asarai@suse.de>
|
||||
---
|
||||
pkg/system/utime_linux_test.go | 48 ++++++++++++++++++++--------------------
|
||||
pkg/unpriv/unpriv_utimes_test.go | 48 ++++++++++++++++++++--------------------
|
||||
2 files changed, 48 insertions(+), 48 deletions(-)
|
||||
|
||||
diff --git a/pkg/system/utime_linux_test.go b/pkg/system/utime_linux_test.go
|
||||
index f4597020626a..719071df61b1 100644
|
||||
--- a/pkg/system/utime_linux_test.go
|
||||
+++ b/pkg/system/utime_linux_test.go
|
||||
@@ -57,10 +57,10 @@ func TestLutimesFile(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
- atimeOld := time.Unix(fiOld.Atim.Sec, fiOld.Atim.Nsec)
|
||||
- mtimeOld := time.Unix(fiOld.Mtim.Sec, fiOld.Mtim.Nsec)
|
||||
- atimeNew := time.Unix(fiNew.Atim.Sec, fiNew.Atim.Nsec)
|
||||
- mtimeNew := time.Unix(fiNew.Mtim.Sec, fiNew.Mtim.Nsec)
|
||||
+ atimeOld := time.Unix(fiOld.Atim.Unix())
|
||||
+ mtimeOld := time.Unix(fiOld.Mtim.Unix())
|
||||
+ atimeNew := time.Unix(fiNew.Atim.Unix())
|
||||
+ mtimeNew := time.Unix(fiNew.Mtim.Unix())
|
||||
|
||||
if atimeOld.Equal(atimeNew) {
|
||||
t.Errorf("atime was not changed at all!")
|
||||
@@ -106,10 +106,10 @@ func TestLutimesDirectory(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
- atimeOld := time.Unix(fiOld.Atim.Sec, fiOld.Atim.Nsec)
|
||||
- mtimeOld := time.Unix(fiOld.Mtim.Sec, fiOld.Mtim.Nsec)
|
||||
- atimeNew := time.Unix(fiNew.Atim.Sec, fiNew.Atim.Nsec)
|
||||
- mtimeNew := time.Unix(fiNew.Mtim.Sec, fiNew.Mtim.Nsec)
|
||||
+ atimeOld := time.Unix(fiOld.Atim.Unix())
|
||||
+ mtimeOld := time.Unix(fiOld.Mtim.Unix())
|
||||
+ atimeNew := time.Unix(fiNew.Atim.Unix())
|
||||
+ mtimeNew := time.Unix(fiNew.Mtim.Unix())
|
||||
|
||||
if atimeOld.Equal(atimeNew) {
|
||||
t.Errorf("atime was not changed at all!")
|
||||
@@ -161,10 +161,10 @@ func TestLutimesSymlink(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
- atimeOld := time.Unix(fiOld.Atim.Sec, fiOld.Atim.Nsec)
|
||||
- mtimeOld := time.Unix(fiOld.Mtim.Sec, fiOld.Mtim.Nsec)
|
||||
- atimeNew := time.Unix(fiNew.Atim.Sec, fiNew.Atim.Nsec)
|
||||
- mtimeNew := time.Unix(fiNew.Mtim.Sec, fiNew.Mtim.Nsec)
|
||||
+ atimeOld := time.Unix(fiOld.Atim.Unix())
|
||||
+ mtimeOld := time.Unix(fiOld.Mtim.Unix())
|
||||
+ atimeNew := time.Unix(fiNew.Atim.Unix())
|
||||
+ mtimeNew := time.Unix(fiNew.Mtim.Unix())
|
||||
|
||||
if atimeOld.Equal(atimeNew) {
|
||||
t.Errorf("atime was not changed at all!")
|
||||
@@ -180,10 +180,10 @@ func TestLutimesSymlink(t *testing.T) {
|
||||
}
|
||||
|
||||
// Make sure that the parent directory was unchanged.
|
||||
- atimeParentOld := time.Unix(fiParentOld.Atim.Sec, fiParentOld.Atim.Nsec)
|
||||
- mtimeParentOld := time.Unix(fiParentOld.Mtim.Sec, fiParentOld.Mtim.Nsec)
|
||||
- atimeParentNew := time.Unix(fiParentNew.Atim.Sec, fiParentNew.Atim.Nsec)
|
||||
- mtimeParentNew := time.Unix(fiParentNew.Mtim.Sec, fiParentNew.Mtim.Nsec)
|
||||
+ atimeParentOld := time.Unix(fiParentOld.Atim.Unix())
|
||||
+ mtimeParentOld := time.Unix(fiParentOld.Mtim.Unix())
|
||||
+ atimeParentNew := time.Unix(fiParentNew.Atim.Unix())
|
||||
+ mtimeParentNew := time.Unix(fiParentNew.Mtim.Unix())
|
||||
|
||||
if !atimeParentOld.Equal(atimeParentNew) {
|
||||
t.Errorf("parent directory atime was changed! old='%s' new='%s'", atimeParentOld, atimeParentNew)
|
||||
@@ -239,10 +239,10 @@ func TestLutimesRelative(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
- atimeOld := time.Unix(fiOld.Atim.Sec, fiOld.Atim.Nsec)
|
||||
- mtimeOld := time.Unix(fiOld.Mtim.Sec, fiOld.Mtim.Nsec)
|
||||
- atimeNew := time.Unix(fiNew.Atim.Sec, fiNew.Atim.Nsec)
|
||||
- mtimeNew := time.Unix(fiNew.Mtim.Sec, fiNew.Mtim.Nsec)
|
||||
+ atimeOld := time.Unix(fiOld.Atim.Unix())
|
||||
+ mtimeOld := time.Unix(fiOld.Mtim.Unix())
|
||||
+ atimeNew := time.Unix(fiNew.Atim.Unix())
|
||||
+ mtimeNew := time.Unix(fiNew.Mtim.Unix())
|
||||
|
||||
if atimeOld.Equal(atimeNew) {
|
||||
t.Errorf("atime was not changed at all!")
|
||||
@@ -258,10 +258,10 @@ func TestLutimesRelative(t *testing.T) {
|
||||
}
|
||||
|
||||
// Make sure that the parent directory was unchanged.
|
||||
- atimeParentOld := time.Unix(fiParentOld.Atim.Sec, fiParentOld.Atim.Nsec)
|
||||
- mtimeParentOld := time.Unix(fiParentOld.Mtim.Sec, fiParentOld.Mtim.Nsec)
|
||||
- atimeParentNew := time.Unix(fiParentNew.Atim.Sec, fiParentNew.Atim.Nsec)
|
||||
- mtimeParentNew := time.Unix(fiParentNew.Mtim.Sec, fiParentNew.Mtim.Nsec)
|
||||
+ atimeParentOld := time.Unix(fiParentOld.Atim.Unix())
|
||||
+ mtimeParentOld := time.Unix(fiParentOld.Mtim.Unix())
|
||||
+ atimeParentNew := time.Unix(fiParentNew.Atim.Unix())
|
||||
+ mtimeParentNew := time.Unix(fiParentNew.Mtim.Unix())
|
||||
|
||||
if !atimeParentOld.Equal(atimeParentNew) {
|
||||
t.Errorf("parent directory atime was changed! old='%s' new='%s'", atimeParentOld, atimeParentNew)
|
||||
diff --git a/pkg/unpriv/unpriv_utimes_test.go b/pkg/unpriv/unpriv_utimes_test.go
|
||||
index 423e808a1da3..ac037e25f50f 100644
|
||||
--- a/pkg/unpriv/unpriv_utimes_test.go
|
||||
+++ b/pkg/unpriv/unpriv_utimes_test.go
|
||||
@@ -56,10 +56,10 @@ func TestLutimesFile(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
- atimeOld := time.Unix(fiOld.Atim.Sec, fiOld.Atim.Nsec)
|
||||
- mtimeOld := time.Unix(fiOld.Mtim.Sec, fiOld.Mtim.Nsec)
|
||||
- atimeNew := time.Unix(fiNew.Atim.Sec, fiNew.Atim.Nsec)
|
||||
- mtimeNew := time.Unix(fiNew.Mtim.Sec, fiNew.Mtim.Nsec)
|
||||
+ atimeOld := time.Unix(fiOld.Atim.Unix())
|
||||
+ mtimeOld := time.Unix(fiOld.Mtim.Unix())
|
||||
+ atimeNew := time.Unix(fiNew.Atim.Unix())
|
||||
+ mtimeNew := time.Unix(fiNew.Mtim.Unix())
|
||||
|
||||
if atimeOld.Equal(atimeNew) {
|
||||
t.Errorf("atime was not changed at all!")
|
||||
@@ -104,10 +104,10 @@ func TestLutimesDirectory(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
- atimeOld := time.Unix(fiOld.Atim.Sec, fiOld.Atim.Nsec)
|
||||
- mtimeOld := time.Unix(fiOld.Mtim.Sec, fiOld.Mtim.Nsec)
|
||||
- atimeNew := time.Unix(fiNew.Atim.Sec, fiNew.Atim.Nsec)
|
||||
- mtimeNew := time.Unix(fiNew.Mtim.Sec, fiNew.Mtim.Nsec)
|
||||
+ atimeOld := time.Unix(fiOld.Atim.Unix())
|
||||
+ mtimeOld := time.Unix(fiOld.Mtim.Unix())
|
||||
+ atimeNew := time.Unix(fiNew.Atim.Unix())
|
||||
+ mtimeNew := time.Unix(fiNew.Mtim.Unix())
|
||||
|
||||
if atimeOld.Equal(atimeNew) {
|
||||
t.Errorf("atime was not changed at all!")
|
||||
@@ -158,10 +158,10 @@ func TestLutimesSymlink(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
- atimeOld := time.Unix(fiOld.Atim.Sec, fiOld.Atim.Nsec)
|
||||
- mtimeOld := time.Unix(fiOld.Mtim.Sec, fiOld.Mtim.Nsec)
|
||||
- atimeNew := time.Unix(fiNew.Atim.Sec, fiNew.Atim.Nsec)
|
||||
- mtimeNew := time.Unix(fiNew.Mtim.Sec, fiNew.Mtim.Nsec)
|
||||
+ atimeOld := time.Unix(fiOld.Atim.Unix())
|
||||
+ mtimeOld := time.Unix(fiOld.Mtim.Unix())
|
||||
+ atimeNew := time.Unix(fiNew.Atim.Unix())
|
||||
+ mtimeNew := time.Unix(fiNew.Mtim.Unix())
|
||||
|
||||
if atimeOld.Equal(atimeNew) {
|
||||
t.Errorf("atime was not changed at all!")
|
||||
@@ -177,10 +177,10 @@ func TestLutimesSymlink(t *testing.T) {
|
||||
}
|
||||
|
||||
// Make sure that the parent directory was unchanged.
|
||||
- atimeParentOld := time.Unix(fiParentOld.Atim.Sec, fiParentOld.Atim.Nsec)
|
||||
- mtimeParentOld := time.Unix(fiParentOld.Mtim.Sec, fiParentOld.Mtim.Nsec)
|
||||
- atimeParentNew := time.Unix(fiParentNew.Atim.Sec, fiParentNew.Atim.Nsec)
|
||||
- mtimeParentNew := time.Unix(fiParentNew.Mtim.Sec, fiParentNew.Mtim.Nsec)
|
||||
+ atimeParentOld := time.Unix(fiParentOld.Atim.Unix())
|
||||
+ mtimeParentOld := time.Unix(fiParentOld.Mtim.Unix())
|
||||
+ atimeParentNew := time.Unix(fiParentNew.Atim.Unix())
|
||||
+ mtimeParentNew := time.Unix(fiParentNew.Mtim.Unix())
|
||||
|
||||
if !atimeParentOld.Equal(atimeParentNew) {
|
||||
t.Errorf("parent directory atime was changed! old='%s' new='%s'", atimeParentOld, atimeParentNew)
|
||||
@@ -236,10 +236,10 @@ func TestLutimesRelative(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
- atimeOld := time.Unix(fiOld.Atim.Sec, fiOld.Atim.Nsec)
|
||||
- mtimeOld := time.Unix(fiOld.Mtim.Sec, fiOld.Mtim.Nsec)
|
||||
- atimeNew := time.Unix(fiNew.Atim.Sec, fiNew.Atim.Nsec)
|
||||
- mtimeNew := time.Unix(fiNew.Mtim.Sec, fiNew.Mtim.Nsec)
|
||||
+ atimeOld := time.Unix(fiOld.Atim.Unix())
|
||||
+ mtimeOld := time.Unix(fiOld.Mtim.Unix())
|
||||
+ atimeNew := time.Unix(fiNew.Atim.Unix())
|
||||
+ mtimeNew := time.Unix(fiNew.Mtim.Unix())
|
||||
|
||||
if atimeOld.Equal(atimeNew) {
|
||||
t.Errorf("atime was not changed at all!")
|
||||
@@ -255,10 +255,10 @@ func TestLutimesRelative(t *testing.T) {
|
||||
}
|
||||
|
||||
// Make sure that the parent directory was unchanged.
|
||||
- atimeParentOld := time.Unix(fiParentOld.Atim.Sec, fiParentOld.Atim.Nsec)
|
||||
- mtimeParentOld := time.Unix(fiParentOld.Mtim.Sec, fiParentOld.Mtim.Nsec)
|
||||
- atimeParentNew := time.Unix(fiParentNew.Atim.Sec, fiParentNew.Atim.Nsec)
|
||||
- mtimeParentNew := time.Unix(fiParentNew.Mtim.Sec, fiParentNew.Mtim.Nsec)
|
||||
+ atimeParentOld := time.Unix(fiParentOld.Atim.Unix())
|
||||
+ mtimeParentOld := time.Unix(fiParentOld.Mtim.Unix())
|
||||
+ atimeParentNew := time.Unix(fiParentNew.Atim.Unix())
|
||||
+ mtimeParentNew := time.Unix(fiParentNew.Mtim.Unix())
|
||||
|
||||
if !atimeParentOld.Equal(atimeParentNew) {
|
||||
t.Errorf("parent directory atime was changed! old='%s' new='%s'", atimeParentOld, atimeParentNew)
|
||||
--
|
||||
2.13.3
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 25 10:42:54 UTC 2017 - asarai@suse.com
|
||||
|
||||
- Add backport of https://github.com/openSUSE/umoci/pull/157, to fix i586
|
||||
builds.
|
||||
+ i586-0001-fix-mis-usage-of-time.Unix.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 22 15:57:44 UTC 2017 - asarai@suse.com
|
||||
|
||||
|
14
umoci.spec
14
umoci.spec
@ -33,6 +33,9 @@ Url: https://github.com/openSUSE/umoci
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Source1: %{name}-%{version}.tar.xz.asc
|
||||
Source2: %{name}.keyring
|
||||
# PATCH-FIX-UPSTREAM: Backport of https://github.com/openSUSE/umoci/pull/157.
|
||||
Patch100: i586-0001-fix-mis-usage-of-time.Unix.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: go >= 1.6
|
||||
BuildRequires: go-go-md2man
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -41,13 +44,14 @@ ExcludeArch: s390x
|
||||
%endif
|
||||
|
||||
%description
|
||||
umoci modifies Open Container images.
|
||||
|
||||
umoci is a manipulation tool for OCI images. In particular, it is an
|
||||
alternative to oci-image-tools provided by the OCI.
|
||||
umoci modifies Open Container images. umoci is a manipulation tool for OCI
|
||||
images. In particular, it is a more complete alternative to oci-image-tools
|
||||
provided by the OCI.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
# https://github.com/openSUSE/umoci/pull/157
|
||||
%patch100 -p1
|
||||
|
||||
%build
|
||||
|
||||
@ -78,7 +82,7 @@ for file in doc/man/*.1; do
|
||||
install -D -m 0644 $file "%{buildroot}/%{_mandir}/man1/$(basename $file)"
|
||||
done
|
||||
|
||||
%fdupes %{buildroot}/%{_prefix}
|
||||
%fdupes %{buildroot}
|
||||
|
||||
%check
|
||||
export GOPATH=$HOME/go
|
||||
|
Loading…
x
Reference in New Issue
Block a user