Skip to content

Regularizing the behavior of just vendor #3571

@dfoxfranke

Description

@dfoxfranke

I'm working on some automation intended to make it easier to maintain COSMIC packaging in openSUSE. A current pain point is that every package's just vendor target behaves a little differently from every other:

  1. Some recipes write .cargo/config, some write .cargo/config.toml.
  2. Some such files are in .gitignore, some are checked in, some are neither.
  3. Some recipes include the config file in the vendor tarball, some don't.
  4. cosmic-greeter requires the SOURCE_DATE_EPOCH and SOURCE_GIT_HASH environment variables to be set.

I propose to regularize this behavior as follows:

  1. The file is always named .cargo/config.toml.
  2. It is checked-in if there's anything to check in, otherwise it's ignored.
  3. The file is always included in the vendor tarball.
  4. No packages should have any special requirements such as setting certain environment variables. cosmic-greeter should take git rev-parse HEAD as a default value for SOURCE_GIT_HASH, and git log -1 --format='%ct' as a default value for SOURCE_DATE_EPOCH.

This keeps things simple for packaging because the upstream tarball can be generated using git archive, the vendor tarball can be generated by running just vendor (or make vendor on the packages that use make), and on RPM-based distros the %prep section can be just %autosetup -a1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions