Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Don't use clearly defined for license info #101

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

apljungquist
Copy link
Contributor

@apljungquist apljungquist commented Oct 15, 2024

I recently struggled with merging a change because the checksums seemed to keep changing. One potential explanation is that the LICENSE file generation is not reproducible; when I test locally only 2/10 runs produce identical license files for all apps. After this change 10/10 runs produce identical license files for all apps.

The problems may coincide with warnings about 429 and 502 responses from clearly defined, but I have not confirmed if there is actually a correlation.

I compared the generated license for the hello_world app and the differences do not seem catastrophic:

  • Some licences have been reordered. These all seem to have had an instantiation of the license template replaced with the template itself.
  • Notices about aho-corasick and memchr being dual licensed have been removed; The MIT license of both remain.
  • A comment about winapi being dual licensed have been removed.

Makefile:

  • Set --fail for good measure; It didn't cause any failures for me either with or without no-clearly-defined meaning I could not observe any improvements. But in theory it should be easier to detect that it was unnecessarily set than the other way around.

about.toml:

  • Set no-clearly-defined because this stops cargo-about from consulting clearly defined, which seems to make the builds reproducible. Other potential benefits from this include lower risk of supply chain attacks and faster builds.

@apljungquist apljungquist requested a review from a team as a code owner October 15, 2024 10:02
I recently struggled with merging a change because the checksums seemed
to keep changing. One potential explanation is that the LICENSE file
generation is not reproducible; when I test locally only 2/10 runs
produce identical license files for all apps. After this change 10/10
runs produce identical license files for all apps.

The problems may coincide with warnings about 429 and 502 responses
from clearly defined, but I have not confirmed if there is actually a
correlation.

There are a couple of issues in `cargo-about` vaguely related to the
problems I see, but they neither directly address the concern of
reproducibility nor seem to be worked by anyone else at the moment:
- 218
- 246

I compared the generated license for the `hello_world` app and the
differences do not seem catastrophic:
- Some licences have been reordered. These all seem to have had an
  instantiation of the license template replaced with the template
  itself.
- Notices about `aho-corasick` and `memchr` being dual licensed have
  been removed; The MIT license of both remain.
- A comment about `winapi` being dual licensed have been removed.

`Makefile`:
- Set `--fail` for good measure; It didn't cause any failures for me
  either with or without `no-clearly-defined` meaning I could not
  observe any improvements. But in theory it should be easier to detect
  that it was unnecessarily set than the other way around.

`about.toml`:
- Set `no-clearly-defined` because this stops `cargo-about` from
  consulting clearly defined, which seems to make the builds
  reproducible. Other potential benefits from this include lower risk
  of supply chain attacks and faster builds.
@apljungquist apljungquist merged commit f404fc7 into main Oct 15, 2024
2 checks passed
@apljungquist apljungquist deleted the no-clearly-defined branch October 15, 2024 11:48
apljungquist added a commit that referenced this pull request Nov 5, 2024
* upstream/main: (48 commits)
  chore: Use workspace dependencies consistently (#126)
  fix(axevent_example): Return `Break` from signal handlers (#125)
  chore(deps): bump ghcr.io/devcontainers/features/common-utils (#124)
  feat(device-manager): Allow unsigned ACAPs (#122)
  feat(acap-build): Enable bypassing `acap-build` (#119)
  chore: streamline CI (#118)
  fix: Don't invalidate Cargo caches (#117)
  fix(acap-ssh-utils): Warn users that commands may break (#114)
  feat: Factor out `acap-build` wrapper to lib crate (#112)
  feat: Add `fleet-manager` program (#111)
  feat: Add edge storage wrapper and example (#108)
  fix: Measure apparent size (#107)
  chore(acap-logging): Bump version (#106)
  fix(cargo-acap-sdk): Set executable bits (#105)
  fix(acap-logging)!: Disable default features for env_logger (#103)
  chore: Track size of apps (#102)
  chore: Don't use clearly defined for license info (#101)
  Update rust toolchain to 1.80.1 (#100)
  fix!: Make builds reproducible in dev-container (#99)
  feat(axevent)!: Use generic callbacks and remove leak (#59)
  ...
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