Hide Forgot
Latest upstream release: 4.2.0 Current version/release in rawhide: 4.1.1-1.fc26 URL: http://bsonspec.org Please consult the package updates policy before you issue an update to a stable branch: https://fedoraproject.org/wiki/Updates_Policy More information about the service that created this bug can be found at: https://fedoraproject.org/wiki/Upstream_release_monitoring Please keep in mind that with any upstream change, there may also be packaging changes that need to be made. Specifically, please remember that it is your responsibility to review the new version to ensure that the licensing is still correct and that no non-free or legally problematic items have been added upstream. Based on the information from anitya: https://release-monitoring.org/project/4252/
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