openSUSE / obs-service-tar_scm

An OBS source service: fetches code from any SCM and archives it
GNU General Public License v2.0
31 stars 105 forks source link

make included .git reproducible #452

Open JanZerebecki opened 1 year ago

JanZerebecki commented 1 year ago

When in including vcs data, the .git can be different depending on what was done to it.

Make the archived on reproducible, by cloning a temporary copy of it. That should take care of differences in the .git/config due to local temporary changes. But, not sure if there is an easy way to make git produce consistent pack files.

To make the content reproducible in face of new changes in the repo, make a list of the heads that are considered and store it in the info to be commited to the package source. On verifying reproducibility check that branches are ancestors and tags are not modified. Then modify a temporary copy of the repo to have the heads at that state and make another clone or a git-gc run to get reproducible pack files.

The reason I want to include the .git is that it is the preferred form of modification.