| Summary: | rubygem-bson-4.2.0 is available | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Upstream Release Monitoring <upstream-release-monitoring> | ||||
| Component: | rubygem-bson | Assignee: | Vít Ondruch <vondruch> | ||||
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rawhide | CC: | dan, tdawson, vondruch, whearn | ||||
| Target Milestone: | --- | Keywords: | FutureFeature, Triaged | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://jira.mongodb.org/browse/RUBY-1173 | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | rubygem-bson-4.2.0-1.fc26 | Doc Type: | Enhancement | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-12-15 15:16:00 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Upstream Release Monitoring
2016-11-30 14:37:51 UTC
Patching or scratch build for rubygem-bson-4.1.1 failed. Created attachment 1226355 [details] Rebase-helper rebase-helper-debug.log log file. See for details and report the eventual error to rebase-helper https://github.com/phracek/rebase-helper/issues. Patches were not touched. All were applied properly BigEndian architectures are not properly supported: https://jira.mongodb.org/browse/RUBY-1173 with an update native-endian.h file
[sharkcz@tyan-openpower-01 bson]$ diff -u native-endian.h.orig native-endian.h
--- native-endian.h.orig 2016-12-07 13:28:27.715599434 +0100
+++ native-endian.h 2016-12-07 13:27:23.605267632 +0100
@@ -36,10 +36,13 @@
#endif
#ifndef BSON_BYTE_ORDER
+# warning BSON_BYTE_ORDER not defined
# if BYTE_ORDER == LITTLE_ENDIAN
# define BSON_BYTE_ORDER 1234
+# warning define BSON_BYTE_ORDER as little
# elif BYTE_ORDER == BIG_ENDIAN
# define BSON_BYTE_ORDER 4321
+# warning define BSON_BYTE_ORDER as big
# endif
#endif
@@ -78,6 +81,7 @@
#endif
#if BSON_BYTE_ORDER == BSON_LITTLE_ENDIAN
+# warning We are little endian
# define BSON_UINT16_TO_BE(v) BSON_UINT16_SWAP_LE_BE(v)
# define BSON_UINT32_FROM_LE(v) ((uint32_t)v)
# define BSON_UINT32_TO_LE(v) ((uint32_t)v)
@@ -90,6 +94,7 @@
# define BSON_DOUBLE_FROM_LE(v) ((double)v)
# define BSON_DOUBLE_TO_LE(v) ((double)v)
#elif BSON_BYTE_ORDER == BSON_BIG_ENDIAN
+# warning We are big endian
# define BSON_UINT16_TO_BE(v) ((uint16_t)v)
# define BSON_UINT32_FROM_LE(v) BSON_UINT32_SWAP_LE_BE(v)
# define BSON_UINT32_TO_LE(v) BSON_UINT32_SWAP_LE_BE(v)
I get following on ppc64 (bug endian), clearly the endian detection doesn't work
[sharkcz@tyan-openpower-01 bson]$ gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -Wall -g -std=c99 -m64 -o native.i -E native.c
In file included from native.c:21:0:
native-endian.h:39:3: warning: #warning BSON_BYTE_ORDER not defined [-Wcpp]
# warning BSON_BYTE_ORDER not defined
^~~~~~~
native-endian.h:42:4: warning: #warning define BSON_BYTE_ORDER as little [-Wcpp]
# warning define BSON_BYTE_ORDER as little
^~~~~~~
native-endian.h:84:3: warning: #warning We are little endian [-Wcpp]
# warning We are little endian
^~~~~~~
The problem is that BYTE_ORDER shouldn't be used, __BYTE_ORDER__ is the correct define to check, see https://bugzilla.redhat.com/show_bug.cgi?id=962091#c48 for more details. --- native-endian.h.orig 2016-12-07 13:28:27.715599434 +0100 +++ native-endian.h 2016-12-07 13:56:53.564406614 +0100 @@ -36,11 +36,18 @@ #endif #ifndef BSON_BYTE_ORDER +#if defined(BYTE_ORDER) # if BYTE_ORDER == LITTLE_ENDIAN # define BSON_BYTE_ORDER 1234 # elif BYTE_ORDER == BIG_ENDIAN # define BSON_BYTE_ORDER 4321 # endif +#elif defined(__BYTE_ORDER__) +# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define BSON_BYTE_ORDER 1234 +# elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define BSON_BYTE_ORDER 4321 +# endif #endif #if defined(__sun) could fix it So far, I made the bson 4.1.1 buildable on all platforms, but 4.2.0 introduces support for Decimal128, which seems to be missing BE support. Waiting for upstream ... fixing the Decimal128 type might be just adding a 16-byte swapping function/macro and using it in rb_bson_byte_buffer_get_decimal128_bytes() and rb_bson_byte_buffer_put_decimal128_bytes(), but let's give upstream a chance :-) vondruch's rubygem-bson-4.2.0-1.fc26 completed http://koji.fedoraproject.org/koji/buildinfo?buildID=825716 |