[CDRIVER-2078] Don't fetch libbson Sphinx inventory during libmongoc build Created: 07/Mar/17  Updated: 24/Mar/17  Resolved: 24/Mar/17

Status: Closed
Project: C Driver
Component/s: Build, libmongoc
Affects Version/s: 1.6.1
Fix Version/s: 1.6.2

Type: Improvement Priority: Major - P3
Reporter: Remi Collet Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Fedora



 Description   

Until version 1.6.0 man pages was provided in the tarball (and we were using them despite our guildelines prefer we generate everything from sources)

Since version 1.6.1 we have to generate them, fine.

But:

$ make man
mkdir -p doc/man
/usr/bin/sphinx-build -qEW -b man ./doc doc/man
 
Warning, treated as error:
WARNING: intersphinx inventory 'http://mongoc.org/libbson/current/objects.inv' not fetchable due to <class 'requests.exceptions.HTTPError'>: 404 Client Error: Not Found for url: http://mongoc.org/libbson/current/objects.inv

Trivial fix:

sed -e 's|http://mongoc.org/libbson/current|../src/libbson/doc/html|' \
    -i doc/conf.py



 Comments   
Comment by A. Jesse Jiryu Davis [ 24/Mar/17 ]

r1.6:

https://github.com/mongodb/mongo-c-driver/commit/9226f81f27bb07cfe6ab4be520a8cff4358e6294
https://github.com/mongodb/mongo-c-driver/commit/1dfee4555c0fff031b2d4dbbcadfa3be9e485550

Comment by Githook User [ 08/Mar/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-2078 distribute libbson-objects.inv
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/d75e3562088c54e8d4d7fc90253133e156f39082

Comment by Remi Collet [ 08/Mar/17 ]

> In the next release I'll update our sphinx-build configuration so that it's possible to generate the documentation offline.

Thanks

> Do you have what you need now to package 1.6.1?

1.6.1 is built in Fedora 26/rawhide since yesterday (using proposed patch)

Comment by A. Jesse Jiryu Davis [ 08/Mar/17 ]

Sorry about the mess. It seems that I didn't handle mod dates correctly when I updated the tarball, I've replaced it now. The new tarball includes all the HTML and man page docs.

https://github.com/mongodb/mongo-c-driver/releases/download/1.6.1/mongo-c-driver-1.6.1.tar.gz

In the next release I'll update our sphinx-build configuration so that it's possible to generate the documentation offline.

Do you have what you need now to package 1.6.1?

Comment by Githook User [ 08/Mar/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-2078 store libbson's objects.inv locally
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/8a3498751b518a5081c7839aace81e6132d34f31

Comment by Remi Collet [ 08/Mar/17 ]

Something have changed... with new tarball

+ make -j6 all V=1
 cd . && /bin/sh /dev/shm/extras/BUILD/mongo-c-driver-1.6.1/build/autotools/missing automake-1.14 --foreign Makefile
/dev/shm/extras/BUILD/mongo-c-driver-1.6.1/build/autotools/missing: line 81: automake-1.14: command not found
WARNING: 'automake-1.14' is missing on your system.
         You should only need it if you modified 'Makefile.am' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'automake' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>
Makefile:1899: recipe for target 'Makefile.in' failed

BTW, this can be fixed running autoreconf, then still the same error:

+ make -j6 man V=1
mkdir -p doc/man
/usr/bin/sphinx-build -qEW -b man ./doc doc/man
 
Warning, treated as error:
WARNING: intersphinx inventory 'http://mongoc.org/libbson/current/objects.inv' not fetchable due to <class 'requests.exceptions.ConnectionError'>: HTTPConnectionPool(host='mongoc.org', port=80): Max retries exceeded with url: /libbson/current/objects.inv (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f38813d7750>: Failed to establish a new connection: [Errno -2] Name or service not known',))

Which mean I cannot build the man pages (of course, using the upstream ones works, but this is not the best practice for packaging)

Sorry, but IMHO, this bug is not fixed

Comment by A. Jesse Jiryu Davis [ 07/Mar/17 ]

Thanks for reporting this! The bug is that html and man pages are not distributed in the tarball any more. They should be included. I have now replaced libbson-1.6.1.tar.gz and mongo-c-driver-1.6.1.tar.gz on the GitHub release pages with complete tarballs that include the html and man pages.

I had fixed this bug, CDRIVER-2014, but forgot to backport the fix to r1.6 before I released 1.6.1. That fix has now been backported so when we release 1.6.2, the tarballs will be complete and include all the docs.

https://github.com/mongodb/libbson/commit/19728906503e7a2b67d700819efd777e10477cf8
https://github.com/mongodb/mongo-c-driver/commit/8eaff0d55b91c980fc9c127db9400566fc70f2c2

Your proposed fix is interesting: you assume that when we're building libmongoc's docs, that the docs have already been built in the libbson submodule of the current libmongoc repo, so we can use "objects.inv" from there. I've decided to stick with the current solution, which is to download mongoc.org/libbson/current/objects.inv over HTTP instead, but I can see advantages and disadvantages to both solutions.

Meanwhile, you should be able to package libbson and libmongoc on an offline machine, now that they include the docs in their tarballs.

Comment by Remi Collet [ 07/Mar/17 ]

=> https://github.com/mongodb/mongo-c-driver/pull/426

Comment by Remi Collet [ 07/Mar/17 ]

Additional information, using online files is not acceptable for downstream, as all the build are run without internet connection (for various reason, including security, and begin reproducible)

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