Closed Bug 2085771 Opened 23 days ago Closed 22 days ago

PACKAGE_METADATA_FIXUPS needs fixups for jni and other new dependencies

Categories

(Application Services :: General, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: janerik, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 external file)

Bug 2084735 pulled in a few transitive dependencies, which in turn break the dependency summary generation:

$ tools/regenerate_dependency_summaries.sh

python3 ./tools/dependency_summary.py > ./DEPENDENCIES.md
+ python3 ./tools/dependency_summary.py
Traceback (most recent call last):
  File "/Users/jer/mozilla/src/application-services/./tools/dependency_summary.py", line 1649, in <module>
    print_dependency_summary_markdown(deps, file=output)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/Users/jer/mozilla/src/application-services/./tools/dependency_summary.py", line 1510, in print_dependency_summary_markdown
    sections = group_dependencies_for_printing(deps)
  File "/Users/jer/mozilla/src/application-services/./tools/dependency_summary.py", line 1425, in group_dependencies_for_printing
    for info in deps:
                ^^^^
  File "/Users/jer/mozilla/src/application-services/./tools/dependency_summary.py", line 1136, in get_dependency_summary
    yield self.get_license_info(id)
          ~~~~~~~~~~~~~~~~~~~~~^^^^
  File "/Users/jer/mozilla/src/application-services/./tools/dependency_summary.py", line 1249, in get_license_info
    licenseFile = self._find_license_file(id, chosenLicense, pkgInfo)
  File "/Users/jer/mozilla/src/application-services/./tools/dependency_summary.py", line 1325, in _find_license_file
    raise RuntimeError(err)
RuntimeError: Could not find license file for 'jni-macros'.
{'name': 'jni-macros', 'version': '0.22.4', 'id': 'registry+https://github.com/rust-lang/crates.io-index#jni-macros@0.22.4', 'license': 'MIT OR Apache-2.0', 'license_file': None, 'description': 'Procedural macros for the jni crate', 'source': 'registry+https://github.com/rust-lang/crates.io-index', 'dependencies': [{'name': 'proc-macro2', 'source': 'registry+https://github.com/rust-lang/crates.io-index', 'req': '^1.0', 'kind': None, 'rename': None, 'optional': False, 'uses_default_features': True, 'features': [], 'target': None, 'registry': None}, {'name': 'quote', 'source': 'registry+https://github.com/rust-lang/crates.io-index', 'req': '^1.0', 'kind': None, 'rename': None, 'optional': False, 'uses_default_features': True, 'features': [], 'target': None, 'registry': None}, {'name': 'simd_cesu8', 'source': 'registry+https://github.com/rust-lang/crates.io-index', 'req': '^1.0.1', 'kind': None, 'rename': None, 'optional': False, 'uses_default_features': True, 'features': [], 'target': None, 'registry': None}, {'name': 'syn', 'source': 'registry+https://github.com/rust-lang/crates.io-index', 'req': '^2.0', 'kind': None, 'rename': None, 'optional': False, 'uses_default_features':True, 'features': ['full'], 'target': None, 'registry': None}, {'name': 'javac', 'source': 'registry+https://github.com/rust-lang/crates.io-index', 'req': '^0.1.0', 'kind': 'dev', 'rename': None, 'optional': False, 'uses_default_features': True, 'features': [], 'target': None, 'registry': None}, {'name': 'rusty-fork', 'source': 'registry+https://github.com/rust-lang/crates.io-index', 'req': '^0.3.0', 'kind': 'dev', 'rename': None, 'optional': False, 'uses_default_features': True, 'features': [], 'target': None, 'registry': None}, {'name': 'thiserror', 'source': 'registry+https://github.com/rust-lang/crates.io-index', 'req': '^2', 'kind': 'dev', 'rename': None, 'optional': False, 'uses_default_features': True, 'features': [], 'target': None, 'registry': None}, {'name': 'trybuild', 'source': 'registry+https://github.com/rust-lang/crates.io-index', 'req': '^1', 'kind': 'dev', 'rename': None, 'optional': False, 'uses_default_features': True, 'features': [], 'target': None, 'registry': None}, {'name': 'rustc_version', 'source': 'registry+https://github.com/rust-lang/crates.io-index', 'req': '^0.4', 'kind': 'build', 'rename': None, 'optional': False, 'uses_default_features': True, 'features': [], 'target': None, 'registry': None}], 'targets': [{'kind': ['proc-macro'], 'crate_types': ['proc-macro'], 'name': 'jni_macros', 'src_path': '/Users/jer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jni-macros-0.22.4/src/lib.rs', 'edition': '2024', 'doc': True, 'doctest': False, 'test': True}, {'kind': ['custom-build'], 'crate_types': ['bin'], 'name': 'build-script-build', 'src_path': '/Users/jer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jni-macros-0.22.4/build.rs', 'edition': '2024', 'doc': False, 'doctest': False, 'test': False}], 'features': {}, 'manifest_path': '/Users/jer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jni-macros-0.22.4/Cargo.toml', 'metadata': None, 'publish': None, 'authors': [], 'categories': ['api-bindings', 'development-tools::procedural-macro-helpers'], 'keywords': ['jni', 'java', 'jvm', 'android', 'ndk'], 'readme': 'README.md', 'repository': 'https://github.com/jni-rs/jni-rs', 'homepage': None, 'documentation': None, 'edition': '2024', 'links': None, 'default_run': None, 'rust_version': None}Please locate the correct license file and add it to `PACKAGE_METADATA_FIXUPS`.
You may need to poke around in the source repository at https://github.com/jni-rs/jni-rs

fixing it for jni (and its -macro crates) with:

    "jni": {
        "license_file": {
            "fixup": "https://raw.githubusercontent.com/jni-rs/jni-rs/refs/tags/v0.22.4/LICENSE-APACHE"
        }
    },
    "jni-macros": {
        "license_file": {
            "fixup": "https://raw.githubusercontent.com/jni-rs/jni-rs/refs/tags/v0.22.4/LICENSE-APACHE"
        }
    },
    "jni-sys-macros": {
        "license_file": {
            "fixup": "https://raw.githubusercontent.com/jni-rs/jni-rs/refs/tags/v0.22.4/LICENSE-APACHE"
        }
    },

still fails with other errors (it seems the order is not deterministic, so which error pops up is a bit random):

RuntimeError: Could not infer license URL for 'dunce'.
Please locate the correct license URL and add it to `PACKAGE_METADATA_FIXUPS`.
You may need to poke around in the source repository at https://gitlab.com/kornelski/dunce for a Apache-2.0 license file named LICENSE.

or

RuntimeError: Could not determine acceptable license for registry+https://github.com/rust-lang/crates.io-index#aws-lc-rs@1.18.2; license is 'ISC AND (Apache-2.0 OR ISC)'

The dependency summary task was always a requirement for landing Glean updates, so https://github.com/mozilla/application-services/pull/7688 will likely fail CI now.

Blocks: 2085018

(via GitHub webhook, authenticated as shared-secret)

Status: NEW → RESOLVED
Closed: 22 days ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: