[CDRIVER-3496] Fix rpm-package-build Evergreen task Created: 18/Jan/20  Updated: 28/Oct/23  Resolved: 30/Jan/20

Status: Closed
Project: C Driver
Component/s: Build, packaging
Affects Version/s: 1.16.0
Fix Version/s: 1.16.1

Type: Bug Priority: Major - P3
Reporter: Roberto Sanchez Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The recent documentation fixes in commit eebc738efd2a976cd1014ba1dc6edf5045f0af04 have caused a breakage of the rpm-package-build task in Evergreen.  In particular, that task runs its own make dist inside of the build chroot environment, which now fails with this error:

 [2020/01/16 23:20:09.571] Generating mongo-c-driver-1.17.0.tar.gz
[2020/01/16 23:20:09.571] Error copying file "/tmp/mongoc/cmake-build/src/libbson/doc/html/_static/language_data.js" to "mongo-c-driver-1.17.0/src/libbson/doc/html/_static/language_data.js".
[2020/01/16 23:20:09.571] CMake Error at /tmp/mongoc/build/cmake/make_dist/MakeDist.cmake:64 (message):
[2020/01/16 23:20:09.571]   Copy of
[2020/01/16 23:20:09.571]   /tmp/mongoc/cmake-build/src/libbson/doc/html/_static/language_data.js to
[2020/01/16 23:20:09.571]   dist dir 'mongo-c-driver-1.17.0' failed.
[2020/01/16 23:20:09.571] Call Stack (most recent call first):
[2020/01/16 23:20:09.571]   /tmp/mongoc/build/cmake/make_dist/MakeDist.cmake:103 (make_dist)
[2020/01/16 23:20:09.572] make[3]: *** [CMakeFiles/dist.dir/build.make:2148: mongo-c-driver-1.17.0.tar.gz] Error 1
[2020/01/16 23:20:09.573] make[2]: *** [CMakeFiles/Makefile2:73: CMakeFiles/dist.dir/all] Error 2
[2020/01/16 23:20:09.573] make[1]: *** [CMakeFiles/Makefile2:80: CMakeFiles/dist.dir/rule] Error 2
[2020/01/16 23:20:09.582] Finish: chroot ['/bin/sh', '-c', '(\n  set -o xtrace ;\n  [ -d cmake-build ] || mkdir cmake-build ;\n  cd cmake-build ;\n  /usr/bin/cmake -DENABLE_MAN_PAGES=ON -DENABLE_HTML_DOCS=ON -DENABLE_ZLIB=BUNDLED -DENABLE_BSON=ON .. ;\n  make -j 8 dist\n  )']
[2020/01/16 23:20:09.925] make: *** [Makefile:186: dist] Error 2
[2020/01/16 23:20:09.925] Command failed: command encountered problem: error waiting on process '47787ef1-26b9-4620-895b-f6b2988af779': exit status 2
[2020/01/16 23:20:09.925] Task completed - FAILURE.

 

It may be that we need to update the targeted Fedora environment to get a newer version of sphinx or that we need to reconsider how the list of documentation files to include in the dist tarball is maintained.



 Comments   
Comment by Githook User [ 30/Jan/20 ]

Author:

{'username': 'kevinAlbs', 'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com'}

Message: CDRIVER-3496 vendor basic theme from Sphinx 1.7

Otherwise the produced _static files differ from different versions of
Sphinx. To include built docs in the dist, we need to explicitly list
the static files.
Branch: r1.16
https://github.com/mongodb/mongo-c-driver/commit/7353402e40cfae181d2be6c3d15f308f067e871e

Comment by Githook User [ 30/Jan/20 ]

Author:

{'username': 'kevinAlbs', 'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com'}

Message: CDRIVER-3496 update spec.patch

Temporarily remove dependency of libmongocrypt until we can test with
new enough Fedora in evergreen. Otherwise build_snapshot_rpm.sh fails
to install the dependency 'cmake(mongocrypt)'
Branch: r1.16
https://github.com/mongodb/mongo-c-driver/commit/757f95aaa559c3fe263477c56c45e77791acde09

Comment by Githook User [ 30/Jan/20 ]

Author:

{'name': 'Kevin Albertson', 'username': 'kevinAlbs', 'email': 'kevin.albertson@mongodb.com'}

Message: CDRIVER-3496 vendor basic theme from Sphinx 1.7

Otherwise the produced _static files differ from different versions of
Sphinx. To include built docs in the dist, we need to explicitly list
the static files.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/6108dde48c58fe6d3256fc3eb91bc78843d9f4b3

Comment by Githook User [ 30/Jan/20 ]

Author:

{'name': 'Kevin Albertson', 'username': 'kevinAlbs', 'email': 'kevin.albertson@mongodb.com'}

Message: CDRIVER-3496 update spec.patch

Temporarily remove dependency of libmongocrypt until we can test with
new enough Fedora in evergreen. Otherwise build_snapshot_rpm.sh fails
to install the dependency 'cmake(mongocrypt)'
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/da2dbbd85452009c467f2d809bc034b25aa31ef6

Comment by Kevin Albertson [ 19/Jan/20 ]

I suspect the additions to the static file lists to the CMakeLists.txt in src/libmongoc/doc/html and src/libbson/doc/html produced the failures. Link

Some quick observations:

  • Removing language_data.js from CMakeLists.txt (as it was before) may make the task pass, though an evergreen patch with that change failed due to the RPM spec file failing to apply. But, if language_data.js is not included, the search no longer functions.
  • Different versions of sphinx produce different files in _static. E.g. sphinx 1.8.3 produces jquery-3.2.1.js whereas sphinx 2.3.1 produces jquery-3.4.1.js. I vendored the readable theme (in build/sphinx/readable) to prevent inconsistencies. But perhaps we should vendor the basic theme, which the readable theme is based off of. And maybe that would prevent the differences in _static files.

Here's a branch with the basic theme vendored, with language_data.js included in the dist:
https://github.com/kevinAlbs/mongo-c-driver/tree/fix-dist If the spec file can be successfully applied in the patch build, perhaps this will resolve the issue.

Generated at Wed Feb 07 21:18:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.