Skip to content

majestic-fonts: Ubuntu Font Licence, and a licence file legal-info collects - #2710

Merged
openipc-ai merged 2 commits into
masterfrom
majestic-fonts-licence
Oct 28, 2026
Merged

openipc-ai merged 2 commits into
masterfrom
majestic-fonts-licence

Conversation

@openipc-ai

@openipc-ai openipc-ai commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Raised by the Qodo review on #2705: majestic-fonts declares a licence file it does not ship. The finding was right about the file and wrong about the symptom. Nothing fails. The licence was simply never collected, and the licence it named was wrong.

What was wrong

  • MAJESTIC_FONTS_LICENSE = MIT. The font is Ubuntu Mono, which is under the Ubuntu Font Licence 1.0.
  • MAJESTIC_FONTS_LICENSE_FILES = LICENSE, but files/ has only the .ttf.
  • make legal-info passed anyway. With no _VERSION, Buildroot leaves _SOURCE empty, and its legal-info rule skips licence collection for such packages ("Packages without a source are assumed to be part of Buildroot"). So on all 102 defconfigs that enable this package, the manifest said MIT and no licence text was saved.

Provenance

UbuntuMono-Regular.ttf is named "OpenIPC Mono" inside. Of its 170 mapped glyphs, every one has the same outline, point for point, as upstream Ubuntu Mono Regular (google/fonts ufl/ubuntumono/UbuntuMono-Regular.ttf). Upstream's copyright field reads "Copyright 2011 Canonical Ltd. Licensed under the Ubuntu Font Licence 1.0". The licence text comes verbatim from canonical/Ubuntu-fonts LICENCE.txt, which is identical to the UFL.txt in google/fonts.

Change

  • LICENSE = UFL-1.0, and a new files/LICENSE holding the Canonical copyright line and the licence.
  • SITE_METHOD = local + VERSION = 0.12 (the font's own version string). The custom EXTRACT_CMDS goes, because the local method copies the same directory.
  • majestic-fonts.hash pins LICENSE.
  • The licence is installed beside the font as /usr/share/fonts/truetype/UbuntuMono-Regular.LICENSE, because the UFL wants it with every copy and the image is a copy. It is 4860 bytes, about 2.1 KB once xz-compressed.

Evidence

This changes no camera's behaviour. The font file is byte-identical to before. The only addition is a text file nothing reads, and the board builds here measure its size against each flash cap. The evidence is from the build tree (fh8852v100_lite):

$ make BOARD=fh8852v100_lite br-majestic-fonts-legal-info      # before
>>> majestic-fonts  Collecting legal info
$ find output/legal-info -type f                               # nothing

$ make BOARD=fh8852v100_lite br-majestic-fonts-legal-info      # after
>>> majestic-fonts 0.12 Collecting legal info
output/legal-info/licenses/majestic-fonts-0.12/LICENSE
"majestic-fonts","0.12","UFL-1.0","LICENSE","majestic-fonts-0.12.tar.gz",...
.warnings: majestic-fonts: sources not saved (local packages not handled)

$ sha256sum output/per-package/majestic-fonts/target/usr/share/fonts/truetype/UbuntuMono-Regular.ttf
ea7900104a9b2f682761a91293cd1c33e66c30cbf6069ad10d2567206e49d27e    # = files/UbuntuMono-Regular.ttf, unchanged

The one remaining warning is Buildroot's standard one for local packages.

Not done here: the font's own name-table copyright field still reads -. The stand-alone licence file now carries the notice, which is one of the ways the UFL accepts.

…llects

The package declared MIT and a LICENSE file it did not have. Both were
wrong, and neither was ever noticed: with no version, Buildroot gives the
package no source name, treats it as part of Buildroot itself, and its
legal-info skips licence collection. So `make legal-info` did not fail.
It recorded MIT for this font on 102 images and saved no licence text.

The font is Ubuntu Mono. UbuntuMono-Regular.ttf, named "OpenIPC Mono"
inside, has 170 mapped glyphs, and every outline matches upstream Ubuntu
Mono Regular point for point (google/fonts ufl/ubuntumono). Upstream's
name table says "Copyright 2011 Canonical Ltd. Licensed under the Ubuntu
Font Licence 1.0".

- LICENSE = UFL-1.0, and files/LICENSE carries that copyright line and
  the licence, verbatim from canonical/Ubuntu-fonts LICENCE.txt;
- the package is a local-site package versioned 0.12, the font's own
  version, so legal-info collects the file. The custom extract step
  goes, because the local method copies the same directory;
- majestic-fonts.hash pins the licence file.

What lands on a camera is unchanged: the package still installs one
file, /usr/share/fonts/truetype/UbuntuMono-Regular.ttf, byte-identical
(sha256 ea790010...e49d27e before and after).
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Correct majestic-fonts licence and collect it in legal-info

🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Correct the font’s declared licence from MIT to Ubuntu Font Licence 1.0.
• Add the copyright notice and licence text so Buildroot can collect them for legal-info.
• Version the local package without changing the font installed on cameras.
Diagram

graph TD
  Files["Bundled font files"] -->|local copy| Package["majestic-fonts package"] -->|licence metadata| Legal["Buildroot legal-info"]
  Package -->|font only| Target["Camera image"]
  Hash["Licence hash"] -->|verifies text| Legal
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Include the licence in camera images
  • ➕ Makes the copyright notice and licence available alongside the distributed font.
  • ➖ Changes image contents and goes beyond the legal-info correction.

Recommendation: Use the versioned local-package approach for this PR: it lets Buildroot collect the bundled licence while preserving the installed font. Separately assess whether images distributing the font should also carry the notice and licence; legal-info collection alone does not put them on cameras.

Files changed (3) +108 / -5

Bug fix (1) +5 / -5
majestic-fonts.mkCorrect licence metadata and enable collection +5/-5

Correct licence metadata and enable collection

• Declares UFL-1.0 and versions the package as 0.12 using Buildroot’s local site method instead of custom extraction. The target install command remains unchanged, so it still installs only the font.

general/package/majestic-fonts/majestic-fonts.mk

Documentation (1) +101 / -0
LICENSEAdd Ubuntu Font Licence and copyright notice +101/-0

Add Ubuntu Font Licence and copyright notice

• Adds the Canonical copyright notice, font provenance note, and Ubuntu Font Licence 1.0 text. Buildroot can now collect the licence file named by the package.

general/package/majestic-fonts/files/LICENSE

Other (1) +2 / -0
majestic-fonts.hashPin the bundled licence text +2/-0

Pin the bundled licence text

• Adds a SHA-256 hash for LICENSE so Buildroot can verify the collected file.

general/package/majestic-fonts/majestic-fonts.hash

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Camera images omit the font licence ✓ Resolved
Description
The package now declares UFL-1.0 and adds the required notice, but its install commands still copy
only UbuntuMono-Regular.ttf into the target filesystem. Every firmware image that distributes this
font therefore lacks the stand-alone licence text required by the licence terms, even though
legal-info collects it separately.
Code

general/package/majestic-fonts/majestic-fonts.mk[R11-12]

+MAJESTIC_FONTS_LICENSE = UFL-1.0
+MAJESTIC_FONTS_LICENSE_FILES = LICENSE
Evidence
The newly added licence identifies the installed font and states the Canonical copyright. The UFL
text requires each copy of the font to contain the copyright notice and licence, allowing these to
be stand-alone text files, while the package's target install recipe copies only the TTF; Buildroot
legal-info output is not part of the target firmware image.

general/package/majestic-fonts/files/LICENSE[1-6]
general/package/majestic-fonts/files/LICENSE[49-53]
general/package/majestic-fonts/majestic-fonts.mk[11-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The package declares UFL-1.0 and collects `LICENSE` for legal-info, but the target installation copies only the font. Firmware images that distribute the font therefore do not include the stand-alone copyright notice and licence required by UFL-1.0.
### Fix Focus Areas
- general/package/majestic-fonts/majestic-fonts.mk[11-17]
- general/package/majestic-fonts/files/LICENSE[1-6]
### Recommended Fix
Install `LICENSE` alongside `UbuntuMono-Regular.ttf` in the target filesystem, using an appropriate readable location and mode, while retaining the legal-info metadata and hash.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

The Ubuntu Font Licence wants the notice and the licence with every copy
of the font. The image is a copy, so the text now goes beside it as
/usr/share/fonts/truetype/UbuntuMono-Regular.LICENSE: 4860 bytes, about
2.1 KB once xz-compressed. The font file itself is unchanged.
@openipc-ai
openipc-ai merged commit a740a14 into master Oct 28, 2026
123 checks passed
@openipc-ai
openipc-ai deleted the majestic-fonts-licence branch October 28, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant