From 2714d242b53abd55bf6f80aaa38b489f0da04e94 Mon Sep 17 00:00:00 2001 From: Imani Manyara Date: Wed, 4 Nov 2026 20:25:18 -0500 Subject: [PATCH 1/2] Mark the three hand-supplied set licences with a source.md The npm packages for ant-design, eva and pepicons ship no licence file, so a real sync would delete their licence directories. A source.md beside each LICENSE records where the text came from and makes icon-sets-sync's licence sink keep the directory (cbebf08 and later). The sync pin moves to that commit, and SetLicenceTest fails if a marker or a text goes missing. --- .github/workflows/sync-upstream.yml | 4 +- .../assets/svg/licenses/ant-design/source.md | 9 +++++ resources/assets/svg/licenses/eva/source.md | 9 +++++ .../assets/svg/licenses/pepicons/source.md | 9 +++++ tests/Unit/SetLicenceTest.php | 40 +++++++++++++++---- 5 files changed, 62 insertions(+), 9 deletions(-) create mode 100644 resources/assets/svg/licenses/ant-design/source.md create mode 100644 resources/assets/svg/licenses/eva/source.md create mode 100644 resources/assets/svg/licenses/pepicons/source.md diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml index 094e75131..aa1ea2cf8 100644 --- a/.github/workflows/sync-upstream.yml +++ b/.github/workflows/sync-upstream.yml @@ -42,10 +42,10 @@ jobs: permissions: contents: read issues: write - uses: ichava/icon-sets-sync/.github/workflows/sync-pack.yml@06b17d7e08b3ff6505e0224610770adf8689dafe # main 2026-11-04 + uses: ichava/icon-sets-sync/.github/workflows/sync-pack.yml@cbebf086fc3399faec97ce590c47fcbd535425c3 # main 2026-11-04 with: pack: ${{ github.event.repository.name }} - toolkit-ref: 06b17d7e08b3ff6505e0224610770adf8689dafe + toolkit-ref: cbebf086fc3399faec97ce590c47fcbd535425c3 refresh-app-client-id: ${{ vars.REFRESH_APP_CLIENT_ID }} force: ${{ inputs.force == true }} secrets: diff --git a/resources/assets/svg/licenses/ant-design/source.md b/resources/assets/svg/licenses/ant-design/source.md new file mode 100644 index 000000000..b4b1dc7b2 --- /dev/null +++ b/resources/assets/svg/licenses/ant-design/source.md @@ -0,0 +1,9 @@ +# Source of this licence text + +The npm package this set syncs from, `@ant-design/icons-svg 4.6.0`, ships no licence file, so the text here was supplied by hand. This file marks the directory as hand-maintained: icon-sets-sync's licence sink never deletes or overwrites a licence directory that holds a `source.md`, and reports the set as hand-supplied instead of missing (the recipe records the gap as `licence_missing`). + +| File | Copied from | SHA-256 | +|---|---|---| +| `LICENSE` | [ant-design/ant-design-icons `LICENSE` at commit `7f2516ac91`, the commit that set `packages/icons-svg` to 4.6.0](https://github.com/ant-design/ant-design-icons/blob/7f2516ac91/LICENSE) (MIT) | `5d367fb0a07340571542eb4ee8eb1add62d37b71bad6786a57c2e9a86bf76c70` | + +Read on 2026-11-04 and reproduced byte for byte. When the set moves to a new upstream version, re-read the licence at the matching ref and update this table, `upstream.sets.ant-design.license` in `config.json`, `tests/Unit/SetLicenceTest.php` and `ATTRIBUTION.md` together. If the npm package starts shipping its own licence file, the sync warns and keeps this directory; compare the texts, then either keep it or delete this file so the sync copies upstream's. diff --git a/resources/assets/svg/licenses/eva/source.md b/resources/assets/svg/licenses/eva/source.md new file mode 100644 index 000000000..036382f2d --- /dev/null +++ b/resources/assets/svg/licenses/eva/source.md @@ -0,0 +1,9 @@ +# Source of this licence text + +The npm package this set syncs from, `eva-icons 1.1.3`, ships no licence file, so the text here was supplied by hand. This file marks the directory as hand-maintained: icon-sets-sync's licence sink never deletes or overwrites a licence directory that holds a `source.md`, and reports the set as hand-supplied instead of missing (the recipe records the gap as `licence_missing`). + +| File | Copied from | SHA-256 | +|---|---|---| +| `LICENSE` | [akveo/eva-icons `LICENSE.txt` at tag `v1.1.3`](https://github.com/akveo/eva-icons/blob/v1.1.3/LICENSE.txt) (MIT) | `4788c563f8871931bce41ede59379a5277ac1a473e289f9100924149ce8bd311` | + +Read on 2026-11-04 and reproduced byte for byte. When the set moves to a new upstream version, re-read the licence at the matching ref and update this table, `upstream.sets.eva.license` in `config.json`, `tests/Unit/SetLicenceTest.php` and `ATTRIBUTION.md` together. If the npm package starts shipping its own licence file, the sync warns and keeps this directory; compare the texts, then either keep it or delete this file so the sync copies upstream's. diff --git a/resources/assets/svg/licenses/pepicons/source.md b/resources/assets/svg/licenses/pepicons/source.md new file mode 100644 index 000000000..6c596e715 --- /dev/null +++ b/resources/assets/svg/licenses/pepicons/source.md @@ -0,0 +1,9 @@ +# Source of this licence text + +The npm package this set syncs from, `pepicons 3.1.6`, ships no licence file, so the text here was supplied by hand. This file marks the directory as hand-maintained: icon-sets-sync's licence sink never deletes or overwrites a licence directory that holds a `source.md`, and reports the set as hand-supplied instead of missing (the recipe records the gap as `licence_missing`). + +| File | Copied from | SHA-256 | +|---|---|---| +| `LICENSE` | [CyCraft/pepicons `LICENSE` at tag `v3.1.6`](https://github.com/CyCraft/pepicons/blob/v3.1.6/LICENSE) (CC-BY-4.0) | `dbb19cb7bda19afef40f19094a668dfe61375cfd57c49d33c660bdb76676b5c5` | + +Read on 2026-11-04 and reproduced byte for byte. When the set moves to a new upstream version, re-read the licence at the matching ref and update this table, `upstream.sets.pepicons.license` in `config.json`, `tests/Unit/SetLicenceTest.php` and `ATTRIBUTION.md` together. If the npm package starts shipping its own licence file, the sync warns and keeps this directory; compare the texts, then either keep it or delete this file so the sync copies upstream's. diff --git a/tests/Unit/SetLicenceTest.php b/tests/Unit/SetLicenceTest.php index 2cb8ae9c8..1e719d556 100644 --- a/tests/Unit/SetLicenceTest.php +++ b/tests/Unit/SetLicenceTest.php @@ -44,10 +44,10 @@ function extras_licence_hashes(): array * deletes that directory and writes upstream's licence files back under their * upstream names on every real sync, so anything else there would be lost and a * renamed file would be written back under upstream's name. The three sets whose npm package - * ships no licence (ant-design, eva, pepicons) are not covered yet: the sink deletes - * their directory on a real sync unless it holds a SOURCE.md, and that marker is - * still to be added. Names here are what a dry run of each - * set's recipe reports as would_write (icon-sets-sync 06b17d7, 2026-11-04). + * ships no licence (ant-design, eva, pepicons) hold a hand-supplied text beside a + * source.md, which makes the sink keep the directory as it is (icon-sets-sync + * cbebf08 and later). Names here are what a dry run of each set's recipe reports as + * would_write, plus that marker for the three (2026-11-04). * * @return array> */ @@ -63,12 +63,12 @@ function extras_licence_files(): array 'siemens-ix' => ['LICENSE.md'], 'garden' => ['LICENSE.md'], 'coolicons' => ['LICENSE'], - 'eva' => ['LICENSE'], - 'ant-design' => ['LICENSE'], + 'eva' => ['LICENSE', 'source.md'], + 'ant-design' => ['LICENSE', 'source.md'], 'health-icons' => ['LICENSE'], 'devicon' => ['LICENSE'], 'fluent-emoji' => ['LICENSE'], - 'pepicons' => ['LICENSE'], + 'pepicons' => ['LICENSE', 'source.md'], 'game-icons' => ['license.txt'], 'coreui' => ['LICENSE'], 'pinhead' => ['LICENSE'], @@ -132,6 +132,32 @@ function extras_config(): array } }); +/** @return list sets whose npm package ships no licence, so the text is hand-supplied */ +function extras_hand_supplied_sets(): array +{ + return ['ant-design', 'eva', 'pepicons']; +} + +it(description: 'marks every hand-supplied licence with a source.md that records its text', closure: function () { + // Without the marker, a real sync deletes the directory: the npm package + // ships no licence, so the sink would have nothing to write back. + expect(extras_hand_supplied_sets())->toHaveCount(3); + + foreach (extras_hand_supplied_sets() as $set) { + $dir = extras_root() . "/resources/assets/svg/licenses/{$set}"; + // Exact names from the directory listing: is_file() would accept any + // casing on a case-insensitive filesystem, and the sink does not. + $names = scandir($dir) ?: []; + expect(in_array('source.md', $names, true))->toBeTrue("licenses/{$set}/source.md is missing; a sync would delete the hand-supplied text"); + expect(in_array('LICENSE', $names, true))->toBeTrue("licenses/{$set}/LICENSE is missing"); + + $marker = (string) file_get_contents("{$dir}/source.md"); + expect($marker)->toContain('`LICENSE`') + ->and($marker)->toContain((string) hash_file('sha256', "{$dir}/LICENSE")) + ->and($marker)->toContain(extras_licence_hashes()[$set]); + } +}); + it(description: 'ships the full Apache-2.0 text for Noto Emoji outside the directory the sync replaces', closure: function () { $file = extras_root() . '/resources/assets/svg/pack-licenses/noto-emoji/LICENSE-2.0.txt'; From 40d60d7b9ad31240a3181aca6f135573b8992557 Mon Sep 17 00:00:00 2001 From: Imani Manyara Date: Wed, 4 Nov 2026 20:26:38 -0500 Subject: [PATCH 2/2] Record the licence marker and the cbebf08 pin in the changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fff929c5b..8b4192319 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to `ichava/icon-sets-extras` follow [Keep a Changelog](https ### Changed +- **The hand-supplied licences of `ant-design`, `eva` and `pepicons` are marked with a `source.md`** beside each `LICENSE`, recording the upstream file, ref and SHA-256. Their npm packages ship no licence file, so without the marker a real sync would delete those directories. The upstream sync runs icon-sets-sync `cbebf08` (icon-sets-sync#89), up from `06b17d7`, the first commit whose licence sink accepts the lowercase marker. `SetLicenceTest` fails if a marker or a text goes missing. - **Licence files carry upstream's names, so the first sync of each set rewrites nothing** (icon-sets-sync#88). Game Icons' text is `licenses/game-icons/license.txt`, Zendesk Garden's and Siemens iX's are `LICENSE.md`, and SVG Logos' is `LICENSE.txt`, as their upstreams ship them; they had been renamed to `LICENSE`, which a sync would have written back under the upstream name. The bytes, and so the recorded SHA-256s, are unchanged. - **Radix Icons records `0.0.17` at `upstream.sets.radix-icons.current_version`**, the `website@0.0.17` archive tag the recipe fetches and stamps, instead of `1.3.2`, the version of `packages/radix-icons` inside that tag (still named in `ref`). With `1.3.2` recorded, the sync would have compared the wrong number with upstream's tags and rewritten the field on its first run. - **Noto Emoji's full Apache-2.0 text moved to `resources/assets/svg/pack-licenses/noto-emoji/LICENSE-2.0.txt`.** Upstream's `2D/svg/` ships only the short notice (`LICENSE`), so the full text the pack added for Apache-2.0 section 4(a) sat in a directory the sync replaces with upstream's files, and the first sync would have deleted it. `ATTRIBUTION.md` points at the new path.