[Pkg-ceph-commits] [ceph] 02/03: d/p/32bit-compat.patch: Cherry pick upstream fix for 32 bit compatibility, resolving FTBFS on armhf/i386.
James Downing Page
jamespage at moszumanska.debian.org
Tue Apr 5 16:05:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
jamespage pushed a commit to branch ubuntu-xenial
in repository ceph.
commit ef9356e137073c88be98785711cdb9832ce2d466
Author: James Page <james.page at ubuntu.com>
Date: Tue Apr 5 17:02:58 2016 +0100
d/p/32bit-compat.patch: Cherry pick upstream fix for 32 bit compatibility, resolving FTBFS on armhf/i386.
---
debian/changelog | 2 ++
debian/patches/32bit-compat.patch | 74 +++++++++++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index a6b6b04..d61e2fd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ ceph (10.1.0-0ubuntu1) UNRELEASED; urgency=medium
with OpenSSL due to licensing incompatibilities.
- d/*.symbols: Add new symbols for RC.
- d/python-*.install: Correct wildcards for python module install.
+ - d/p/32bit-compat.patch: Cherry pick upstream fix for 32 bit
+ compatibility, resolving FTBFS on armhf/i386.
* d/rules: Strip rbd-mirror package correctly.
* d/rules: Install upstart and systemd configurations for rbd-mirror.
* d/copyright: Ensure that jerasure and gf-complete are not stripped
diff --git a/debian/patches/32bit-compat.patch b/debian/patches/32bit-compat.patch
new file mode 100644
index 0000000..8c8ae71
--- /dev/null
+++ b/debian/patches/32bit-compat.patch
@@ -0,0 +1,74 @@
+From 778506ed7d0efc9899d419cf31e0bf7e25cf9420 Mon Sep 17 00:00:00 2001
+From: "Adam C. Emerson" <aemerson at redhat.com>
+Date: Thu, 31 Mar 2016 14:50:06 -0400
+Subject: [PATCH 1/2] time: Change temporary variable types in time decode
+
+Since we're decoding 32-bit integers, just use uint32_t and then cast them to
+what utime_t expects.
+
+Fixes: http://tracker.ceph.com/issues/15330
+Signed-off-by: Adam C. Emerson <aemerson at redhat.com>
+---
+ src/common/ceph_time.h | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/common/ceph_time.h b/src/common/ceph_time.h
+index ef187c0..2c7061a 100644
+--- a/src/common/ceph_time.h
++++ b/src/common/ceph_time.h
+@@ -382,10 +382,13 @@ void encode(const std::chrono::time_point<Clock, Duration>& t,
+ template<typename Clock, typename Duration>
+ void decode(std::chrono::time_point<Clock, Duration>& t,
+ bufferlist::iterator& p) {
+- uint32_t s, ns;
++ uint32_t s;
++ uint32_t ns;
+ ::decode(s, p);
+ ::decode(ns, p);
+- struct timespec ts = {s, ns};
++ struct timespec ts = {
++ static_cast<time_t>(s),
++ static_cast<long int>(ns)};
+
+ t = Clock::from_timespec(ts);
+ }
+
+From 8f9e7b0b1db4eaa45cb603eae5b7f1040135de26 Mon Sep 17 00:00:00 2001
+From: "Adam C. Emerson" <aemerson at redhat.com>
+Date: Thu, 31 Mar 2016 16:08:08 -0400
+Subject: [PATCH 2/2] rgw: Do not try to encode or decode time_t
+
+time_t's width varies between machines. Also it fails to compile on 32
+bit linux.
+
+Fixes: http://tracker.ceph.com/issues/15330
+Signed-off-by: Adam C. Emerson <aemerson at redhat.com>
+---
+ src/cls/rgw/cls_rgw_ops.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/cls/rgw/cls_rgw_ops.h b/src/cls/rgw/cls_rgw_ops.h
+index e8a7661..7d8ad2d 100644
+--- a/src/cls/rgw/cls_rgw_ops.h
++++ b/src/cls/rgw/cls_rgw_ops.h
+@@ -180,7 +180,7 @@ struct rgw_cls_link_olh_op {
+ ::encode(olh_epoch, bl);
+ ::encode(log_op, bl);
+ ::encode(bilog_flags, bl);
+- time_t t = ceph::real_clock::to_time_t(unmod_since);
++ uint64_t t = ceph::real_clock::to_time_t(unmod_since);
+ ::encode(t, bl);
+ ::encode(unmod_since, bl);
+ ::encode(high_precision_time, bl);
+@@ -198,9 +198,9 @@ struct rgw_cls_link_olh_op {
+ ::decode(log_op, bl);
+ ::decode(bilog_flags, bl);
+ if (struct_v == 2) {
+- time_t t;
++ uint64_t t;
+ ::decode(t, bl);
+- unmod_since = ceph::real_clock::from_time_t(t);
++ unmod_since = ceph::real_clock::from_time_t(static_cast<time_t>(t));
+ }
+ if (struct_v >= 3) {
+ ::decode(unmod_since, bl);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ceph/ceph.git
More information about the Pkg-ceph-commits
mailing list