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:
- Some recipes write
.cargo/config, some write .cargo/config.toml.
- Some such files are in
.gitignore, some are checked in, some are neither.
- Some recipes include the config file in the vendor tarball, some don't.
cosmic-greeter requires the SOURCE_DATE_EPOCH and SOURCE_GIT_HASH environment variables to be set.
I propose to regularize this behavior as follows:
- The file is always named
.cargo/config.toml.
- It is checked-in if there's anything to check in, otherwise it's ignored.
- The file is always included in the vendor tarball.
- 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.
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 vendortarget behaves a little differently from every other:.cargo/config, some write.cargo/config.toml..gitignore, some are checked in, some are neither.cosmic-greeterrequires theSOURCE_DATE_EPOCHandSOURCE_GIT_HASHenvironment variables to be set.I propose to regularize this behavior as follows:
.cargo/config.toml.cosmic-greetershould takegit rev-parse HEADas a default value forSOURCE_GIT_HASH, andgit log -1 --format='%ct'as a default value forSOURCE_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 runningjust vendor(ormake vendoron the packages that usemake), and on RPM-based distros the%prepsection can be just%autosetup -a1.