Bug 1497654 - mkdocs fails due to broken fontawesome-web.svg symlink
Summary: mkdocs fails due to broken fontawesome-web.svg symlink
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mkdocs
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Robin Lee
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1492884
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-02 11:26 UTC by ft
Modified: 2020-08-08 12:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-08 12:27:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description ft 2017-10-02 11:26:08 UTC
Description of problem:

The mkdocs readthedocs theme fails to generate documentation due to a missing font (actually a symlink to a non-existent file):

mkdocs gh-deploy --clean
/usr/lib/python2.7/site-packages/mkdocs/cli.py:85: Warning: Click detected the use of the unicode_literals __future__ import.  This is heavily discouraged because it can introduce subtle bugs in your code.  You should instead use explicit u"" literals for your unicode strings.  For more information see http://click.pocoo.org/python3/
  @common_options
/usr/lib/python2.7/site-packages/mkdocs/cli.py:99: Warning: Click detected the use of the unicode_literals __future__ import.  This is heavily discouraged because it can introduce subtle bugs in your code.  You should instead use explicit u"" literals for your unicode strings.  For more information see http://click.pocoo.org/python3/
  @common_options
/usr/lib/python2.7/site-packages/mkdocs/cli.py:124: Warning: Click detected the use of the unicode_literals __future__ import.  This is heavily discouraged because it can introduce subtle bugs in your code.  You should instead use explicit u"" literals for your unicode strings.  For more information see http://click.pocoo.org/python3/
  @common_options
/usr/lib/python2.7/site-packages/mkdocs/cli.py:144: Warning: Click detected the use of the unicode_literals __future__ import.  This is heavily discouraged because it can introduce subtle bugs in your code.  You should instead use explicit u"" literals for your unicode strings.  For more information see http://click.pocoo.org/python3/
  @common_options
/usr/lib/python2.7/site-packages/mkdocs/cli.py:175: Warning: Click detected the use of the unicode_literals __future__ import.  This is heavily discouraged because it can introduce subtle bugs in your code.  You should instead use explicit u"" literals for your unicode strings.  For more information see http://click.pocoo.org/python3/
  @common_options
/usr/lib/python2.7/site-packages/mkdocs/cli.py:193: Warning: Click detected the use of the unicode_literals __future__ import.  This is heavily discouraged because it can introduce subtle bugs in your code.  You should instead use explicit u"" literals for your unicode strings.  For more information see http://click.pocoo.org/python3/
  @common_options
INFO    -  Cleaning site directory 
INFO    -  Building documentation to directory: /home/ft/c/tbx/k8s-ts-ingress/_docs 
Traceback (most recent call last):
  File "/usr/bin/mkdocs", line 9, in <module>
    load_entry_point('mkdocs==0.14.0', 'console_scripts', 'mkdocs')()
  File "/usr/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/mkdocs/cli.py", line 184, in gh_deploy_command
    build.build(config, clean_site_dir=clean)
  File "/usr/lib/python2.7/site-packages/mkdocs/build.py", line 293, in build
    utils.copy_media_files(theme_dir, config['site_dir'])
  File "/usr/lib/python2.7/site-packages/mkdocs/utils/__init__.py", line 136, in copy_media_files
    copy_file(source_path, output_path)
  File "/usr/lib/python2.7/site-packages/mkdocs/utils/__init__.py", line 83, in copy_file
    shutil.copy(source_path, output_path)
  File "/usr/lib64/python2.7/shutil.py", line 119, in copy
    copyfile(src, dst)
  File "/usr/lib64/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: u'/usr/lib/python2.7/site-packages/mkdocs/themes/readthedocs/fonts/fontawesome-webfont.svg'
make[1]: *** [docs] Error 1
make[1]: Leaving directory `/home/ft/c/tbx/k8s-ts-ingress'
make: *** [docs] Error 2


% ls -l /usr/lib/python2.7/site-packages/mkdocs/themes/readthedocs/fonts/fontawesome-webfont.svg
lrwxrwxrwx. 1 root root 52 Oct  2 11:29 /usr/lib/python2.7/site-packages/mkdocs/themes/readthedocs/fonts/fontawesome-webfont.svg -> /usr/share/fonts/fontawesome/fontawesome-webfont.svg
% ls -l /usr/share/fonts/fontawesome/fontawesome-webfont.svg
ls: cannot access /usr/share/fonts/fontawesome/fontawesome-webfont.svg: No such file or directory

No package seems to provide this file:

# yum whatprovides /usr/share/fonts/fontawesome/fontawesome-webfont.svg
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.bytemark.co.uk
 * epel: mirror.bytemark.co.uk
 * extras: mirror.bytemark.co.uk
 * ius: mirrors.ircam.fr
 * updates: mirrors.vooservers.com
epel/x86_64/filelists_db                                                                                               | 8.1 MB  00:00:02     
ius/x86_64/filelists_db                                                                                                | 528 kB  00:00:00     
updates/7/x86_64/filelists_db                                                                                          | 1.5 MB  00:00:00     
No matches found

Version-Release number of selected component (if applicable):

mkdocs-0.14.0-10.el7.noarch

How reproducible:

Install mkdocs and build documentation using the readthedocs theme.

Steps to Reproduce:
1. Install mkdocs.
2. Build documentation using the readthedocs theme.
3. Observe error message.

Actual results:

The mkdocs command fails with an error message.

Expected results:

The mkdocs command succeeds.


Additional info:

Comment 1 William Moreno 2017-10-05 18:18:22 UTC
I got this file in my rawhide machine:

[wmoreno@fedora-rawhide fontawesome]$ pwd
/usr/share/fonts/fontawesome
[wmoreno@fedora-rawhide fontawesome]$ ls
FontAwesome.otf  fontawesome-webfont.eot  fontawesome-webfont.svg  fontawesome-webfont.ttf  fontawesome-webfont.woff  fontawesome-webfont.woff2
[wmoreno@fedora-rawhide fontawesome]$ 

This work for me:

[wmoreno@fedora-rawhide ~]$ mkdocs new test
INFO    -  Creating project directory: test 
INFO    -  Writing config file: test/mkdocs.yml 
INFO    -  Writing initial docs: test/docs/index.md 
[wmoreno@fedora-rawhide ~]$ cd test 
[wmoreno@fedora-rawhide test]$ mkdocs build --theme readthedocs
INFO    -  Cleaning site directory 
INFO    -  Building documentation to directory: /home/wmoreno/test/site 
[wmoreno@fedora-rawhide test]$

Comment 2 ft 2017-10-05 18:41:41 UTC
Unfortunately I don't have a Fedora machine to test with.  What package contains that file?

Comment 3 Carl George 2017-10-05 19:28:02 UTC
Looks like EL7's fontawesome-fonts-web-4.1.0 doesn't have all the same files as Fedora's fontawesome-fonts-web-4.7.0.  William, what do you think about changing the spec file to use the bundled fontawesome files on EL7 only?  If you are agreeable to it I can handle the changes.

Comment 4 William Moreno 2017-10-06 00:31:38 UTC
(In reply to Carl George from comment #3)
> Looks like EL7's fontawesome-fonts-web-4.1.0 doesn't have all the same files
> as Fedora's fontawesome-fonts-web-4.7.0.  William, what do you think about
> changing the spec file to use the bundled fontawesome files on EL7 only?  If
> you are agreeable to it I can handle the changes.

OK, thanks if you can take care of this.

Comment 5 Carl George 2017-10-12 13:57:28 UTC
Turns out the missing files exist in upstream fontawesome 4.1.0, they just aren't packaged in RHEL.  See bug 1492884.

Comment 6 Robin Lee 2020-08-08 12:27:37 UTC
fontawesome-fonts-4.1.0-2.el7.noarch fixes this issue


Note You need to log in before you can comment on or make changes to this bug.