Bug 2332609 - Review Request: rust-mdbook - Creates a book from markdown files
Summary: Review Request: rust-mdbook - Creates a book from markdown files
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: blinxen
QA Contact: Fedora Extras Quality Assurance
URL: https://crates.io/crates/mdbook
Whiteboard:
Depends On: 2332598
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-12-16 17:20 UTC by Fabio Valentini
Modified: 2025-11-20 14:56 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-11-20 14:31:29 UTC
Type: ---
Embargoed:
h-k-81: fedora-review?


Attachments (Terms of Use)

Description Fabio Valentini 2024-12-16 17:20:45 UTC
Spec URL: https://decathorpe.fedorapeople.org/rust-mdbook.spec
SRPM URL: https://decathorpe.fedorapeople.org/rust-mdbook-0.4.40-1.fc41.src.rpm

Description:
Creates a book from markdown files.

Fedora Account System Username: decathorpe

Comment 1 Fedora Review Service 2024-12-16 17:23:15 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8398363
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2332609-rust-mdbook/fedora-rawhide-x86_64/08398363-rust-mdbook/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 Fabio Valentini 2024-12-16 17:27:39 UTC
I tried my best to correctly document the bundled components (JavaScript, fonts, CSS, etc.).

Note that the bundled JavaScript libraries are BSD-3-Clause or MIT licensed, but no license texts for these two licenses are included (other than the one included in the ace.js file for ace.js itself). Should the upstream project include the upstream license texts for these bundled components? They *do* include the license texts for the bundled fonts (Open Sans and Source Code Pro), so there would be precedent for doing so. I'm not sure how this should be handled.

I looked into whether it would be possible to un-bundle the fonts, but it looks like they're embedded in a format (WOFF2) that is not included in the Fedora packages anyway.

Comment 3 Fabio Valentini 2024-12-16 17:29:42 UTC
Second note: I packaged 0.4.40 intentionally, since 0.4.41+ bump dependencies past what we have in Fedora (notably, handlebars v5 -> v6).

Comment 4 Fabio Valentini 2025-03-15 22:58:47 UTC
Dropping the (for now, problematic) dependency on the "select" crate is straightforward, since it is only used in a single file of integration tests. I have done so for now, until problems with "select" can be dealt with.

Comment 5 blinxen 2025-07-20 13:50:08 UTC
Taking this review

General comments:

* Spec file was generated with rust2rpm
* Dependencies where updated / removed --> OK
* All bundled JS libraries and fonts have a `bundle(..)` requires
* Some tests were disabled because of not published files or missing dependency (`select` crate) --> OK

Issues:

* The favicon in the `theme` directory is published under `CC-BY-4.0` which is missing in the license definition.
* Missing license files for the bundled JS libraries and the font "fontawesome".

> Note that the bundled JavaScript libraries are BSD-3-Clause or MIT licensed, but no license texts for these two licenses are included (other than the one included in the ace.js file for ace.js itself). Should the upstream project include the upstream license texts for these bundled components? They *do* include the license texts for the bundled fonts (Open Sans and Source Code Pro), so there would be precedent for doing so. I'm not sure how this should be handled.

You could try to ask upstream or just include the license texts yourself by including the original license files.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "*No copyright* Mozilla Public License
     2.0", "BSD 3-Clause License", "*No copyright* Apache License 2.0",
     "SIL Open Font License 1.1", "MIT License". 166 files have unknown
     license. Detailed output of licensecheck in /var/lib/copr-
     rpmbuild/results/rust-mdbook/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 60454 bytes in 4 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: The License field must be a valid SPDX expression.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[x]: Reviewer should test that the package builds in mock.
[!]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
[!]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in mdbook ,
     rust-mdbook-devel , rust-mdbook+default-devel , rust-mdbook+search-
     devel , rust-mdbook+serve-devel , rust-mdbook+watch-devel
[?]: Package functions as described.
[!]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.


Rpmlint
-------
Checking: mdbook-0.4.40-1.fc43.x86_64.rpm
          rust-mdbook-devel-0.4.40-1.fc43.noarch.rpm
          rust-mdbook+default-devel-0.4.40-1.fc43.noarch.rpm
          rust-mdbook+search-devel-0.4.40-1.fc43.noarch.rpm
          rust-mdbook+serve-devel-0.4.40-1.fc43.noarch.rpm
          rust-mdbook+watch-devel-0.4.40-1.fc43.noarch.rpm
          rust-mdbook-0.4.40-1.fc43.src.rpm
============================ rpmlint session starts ============================
rpmlint: 2.7.0
configuration:
    /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmpk7a7juoi')]
checks: 32, packages: 7

mdbook.x86_64: E: script-without-shebang /usr/share/licenses/mdbook/OPEN-SANS-LICENSE.txt
rust-mdbook-devel.noarch: E: script-without-shebang /usr/share/cargo/registry/mdbook-0.4.40/src/theme/favicon.svg
mdbook.x86_64: W: no-manual-page-for-binary mdbook
 7 packages and 0 specfiles checked; 2 errors, 1 warnings, 36 filtered, 2 badness; has taken 0.9 s




Rpmlint (installed packages)
----------------------------
(none): E: there is no installed rpm "rust-mdbook+default-devel".
(none): E: there is no installed rpm "rust-mdbook+watch-devel".
(none): E: there is no installed rpm "rust-mdbook+serve-devel".
(none): E: there is no installed rpm "rust-mdbook-devel".
(none): E: there is no installed rpm "mdbook".
(none): E: there is no installed rpm "rust-mdbook+search-devel".
There are no files to process nor additional arguments.
Nothing to do, aborting.
============================ rpmlint session starts ============================
rpmlint: 2.7.0
configuration:
    /usr/lib/python3.14/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 6

 0 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 filtered, 0 badness; has taken 0.0 s



Source checksums
----------------
https://crates.io/api/v1/crates/mdbook/0.4.40/download#/mdbook-0.4.40.crate :
  CHECKSUM(SHA256) this package     : b45a38e19bd200220ef07c892b0157ad3d2365e5b5a267ca01ad12182491eea5
  CHECKSUM(SHA256) upstream package : b45a38e19bd200220ef07c892b0157ad3d2365e5b5a267ca01ad12182491eea5


Requires
--------
mdbook (rpmlib, GLIBC filtered):
    ld-linux-x86-64.so.2()(64bit)
    libc.so.6()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.3)(64bit)
    libgcc_s.so.1(GCC_4.2.0)(64bit)
    libm.so.6()(64bit)
    rtld(GNU_HASH)

rust-mdbook-devel (rpmlib, GLIBC filtered):
    (crate(anyhow/default) >= 1.0.71 with crate(anyhow/default) < 2.0.0~)
    (crate(chrono) >= 0.4.24 with crate(chrono) < 0.5.0~)
    (crate(chrono/clock) >= 0.4.24 with crate(chrono/clock) < 0.5.0~)
    (crate(clap/cargo) >= 4.3.12 with crate(clap/cargo) < 5.0.0~)
    (crate(clap/default) >= 4.3.12 with crate(clap/default) < 5.0.0~)
    (crate(clap/wrap_help) >= 4.3.12 with crate(clap/wrap_help) < 5.0.0~)
    (crate(clap_complete/default) >= 4.3.2 with crate(clap_complete/default) < 5.0.0~)
    (crate(env_logger/default) >= 0.11.1 with crate(env_logger/default) < 0.12.0~)
    (crate(handlebars/default) >= 5.0.0 with crate(handlebars/default) < 6.0.0~)
    (crate(log/default) >= 0.4.17 with crate(log/default) < 0.5.0~)
    (crate(memchr/default) >= 2.5.0 with crate(memchr/default) < 3.0.0~)
    (crate(once_cell/default) >= 1.17.1 with crate(once_cell/default) < 2.0.0~)
    (crate(opener/default) >= 0.6.0 with crate(opener/default) < 0.8.0~)
    (crate(pulldown-cmark) >= 0.11.0 with crate(pulldown-cmark) < 0.12.0~)
    (crate(pulldown-cmark/html) >= 0.11.0 with crate(pulldown-cmark/html) < 0.12.0~)
    (crate(regex/default) >= 1.8.1 with crate(regex/default) < 2.0.0~)
    (crate(serde/default) >= 1.0.163 with crate(serde/default) < 2.0.0~)
    (crate(serde/derive) >= 1.0.163 with crate(serde/derive) < 2.0.0~)
    (crate(serde_json/default) >= 1.0.96 with crate(serde_json/default) < 2.0.0~)
    (crate(shlex/default) >= 1.3.0 with crate(shlex/default) < 2.0.0~)
    (crate(tempfile/default) >= 3.4.0 with crate(tempfile/default) < 4.0.0~)
    (crate(toml/default) >= 0.5.11 with crate(toml/default) < 0.6.0~)
    (crate(topological-sort/default) >= 0.2.2 with crate(topological-sort/default) < 0.3.0~)
    cargo
    rust

rust-mdbook+default-devel (rpmlib, GLIBC filtered):
    cargo
    crate(mdbook)
    crate(mdbook/search)
    crate(mdbook/serve)
    crate(mdbook/watch)

rust-mdbook+search-devel (rpmlib, GLIBC filtered):
    (crate(ammonia/default) >= 4.0.0 with crate(ammonia/default) < 5.0.0~)
    (crate(elasticlunr-rs/default) >= 3.0.2 with crate(elasticlunr-rs/default) < 4.0.0~)
    cargo
    crate(mdbook)

rust-mdbook+serve-devel (rpmlib, GLIBC filtered):
    (crate(futures-util/default) >= 0.3.28 with crate(futures-util/default) < 0.4.0~)
    (crate(tokio/default) >= 1.28.1 with crate(tokio/default) < 2.0.0~)
    (crate(tokio/macros) >= 1.28.1 with crate(tokio/macros) < 2.0.0~)
    (crate(tokio/rt-multi-thread) >= 1.28.1 with crate(tokio/rt-multi-thread) < 2.0.0~)
    (crate(warp) >= 0.3.6 with crate(warp) < 0.4.0~)
    (crate(warp/websocket) >= 0.3.6 with crate(warp/websocket) < 0.4.0~)
    cargo
    crate(mdbook)

rust-mdbook+watch-devel (rpmlib, GLIBC filtered):
    (crate(ignore/default) >= 0.4.20 with crate(ignore/default) < 0.5.0~)
    (crate(notify-debouncer-mini/default) >= 0.4.1 with crate(notify-debouncer-mini/default) < 0.5.0~)
    (crate(notify/default) >= 6.1.1 with crate(notify/default) < 7.0.0~)
    (crate(pathdiff/default) >= 0.2.1 with crate(pathdiff/default) < 0.3.0~)
    (crate(walkdir/default) >= 2.3.3 with crate(walkdir/default) < 3.0.0~)
    cargo
    crate(mdbook)



Provides
--------
mdbook:
    bundled(ace.js)
    bundled(clipboard.js)
    bundled(elasticlunr.js)
    bundled(font(fontawesome))
    bundled(font(opensans))
    bundled(font(sourcecodepro))
    bundled(highlight.js)
    bundled(mark.js)
    mdbook
    mdbook(x86-64)

rust-mdbook-devel:
    bundled(ace.js)
    bundled(clipboard.js)
    bundled(elasticlunr.js)
    bundled(font(fontawesome))
    bundled(font(opensans))
    bundled(font(sourcecodepro))
    bundled(highlight.js)
    bundled(mark.js)
    crate(mdbook)
    rust-mdbook-devel

rust-mdbook+default-devel:
    crate(mdbook/default)
    rust-mdbook+default-devel

rust-mdbook+search-devel:
    crate(mdbook/search)
    rust-mdbook+search-devel

rust-mdbook+serve-devel:
    crate(mdbook/serve)
    rust-mdbook+serve-devel

rust-mdbook+watch-devel:
    crate(mdbook/watch)
    rust-mdbook+watch-devel



Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/bin/fedora-review --no-colors --prebuilt --rpm-spec --name rust-mdbook --mock-config /var/lib/copr-rpmbuild/results/configs/child.cfg
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: Ocaml, C/C++, PHP, fonts, Java, Haskell, Perl, SugarActivity, Python, R
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comment 6 Jens Petersen 2025-10-21 11:59:50 UTC
BTW fontawesome4-fonts and fontawesome-6-fonts are packaged in fedora.
Dunno if they could be used? Though from the meta provides it appears
additional fonts are bundled too (open-sans and source-code-pro), also in fedora.
Or are they using webfont?  Wonder to what extent they are required.

Comment 7 Fabio Valentini 2025-10-22 21:25:53 UTC
Last I looked, mdbook required those fonts in formats that are not available in Fedora packages.

Comment 8 Fabio Valentini 2025-11-20 14:31:29 UTC
*sigh*

Finally taking some time to look into this issue, I noticed that the mdbook project has undergone quite a big restructuring leading up to the recent v0.5.0 major release - it's now split into ~10 crates instead of being just one crate, so packaging v0.4.40 the way I did it for this package review doesn't *really* make sense IMO :(

It should be easier to review since all the subcomponents are smaller (and as far as I can tell, the missing license files for the favicon and JS libraries issues are still present), but I don't have time to put out 10 new package reviews right now.

Thank you all for your input, but I'm going to have to close this request until I have more time to work on packaging mdbook v0.5 - or somebody else wants to pick it up.

Comment 9 Fabio Valentini 2025-11-20 14:56:51 UTC
In the meantime - filed https://github.com/rust-lang/mdBook/issues/2956 upstream.


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