metadata for from-git builds
Open, Needs TriagePublic


It would be handy to somehow build metadata of from-git builds

  • blocks of each contributing source
    • where they were put in the source tree
    • which VCS type they are from
    • VCS url
    • VCS branch (if applicable?)
    • what the VCS revision was (git hash)

Putting a file into the actual source tarball would be tricky to do architecturally. Putting it in debian/ might be a possibility though.

Related Objects

sitter created this task.Sep 22 2016, 11:58 AM
johanneszarl added a subscriber: johanneszarl.EditedSep 22 2016, 12:30 PM

Putting it into debian/, and having debian/rules make it available to the actual build system in a suitable form would certainly work for my usecase (version information for the kphotoalbum build system).

The last (annotated) tag would also be handy information to have (git describe --abbrev=0).

Edit: The format should be easily consumable from a shell script or makefile, so better not too fancy...

Considering T3719 it may be best to simply --depth=1 and retain the .git directory altogether. Otherwise to implement that task we'd have to do client-side cloning.

@johanneszarl do you really need the tag or could you simply use a shortref of HEAD?

Tag would be nice, but implementing a fallback to the shortref is ok for me. The important part is to identify the exact commit to branch master...