This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
Kunda1 wrote: ↑Thu Jul 04, 2019 12:05 pm
Does git meta data exist if the tarball is not retrieved from git?
No, if you create a tarball with git archive, it will not contain the .git folder.
But if you start pbuilder from within a git repo (not gbp!) it will put it into the src tar if you not specify to ignore it: https://github.com/reox/FreeCAD_gitpack ... ce/options
Sorry if this is b*llsh*t, but couldn't that be a way to use a git hook among pre-push, pre-receive, update or post-receive ?
So the version.h is updated at push time & not at compile time.
openBrain wrote: ↑Thu Jul 04, 2019 5:31 pm
Sorry if this is b*llsh*t, but couldn't that be a way to use a git hook among pre-push, pre-receive, update or post-receive ?
So the version.h is updated at push time & not at compile time.
This makes sense but if I recall correctly from some time ago that there may be a security concern involved with this approach.
Sure. But at least the commit number used in the version could be managed that way, right ?
EDIT : it's tricky but could hash be written in a file in a different repo/branch and this file being integrated at compile time ?
EDIT2 : even trickier, a pre-push hook that will append to the last commit message the hash (hopefully commit messages aren't took into account into the hash)
openBrain wrote: ↑Thu Jul 04, 2019 6:46 pm
EDIT : it's tricky but could hash be written in a file in a different repo/branch and this file being integrated at compile time ?
this is what the old daily build did. But the repo grows to very large size and traversing all the objects takes a long time...
So yes, IIRC you can create a "update" hook which has the sha1 hash of the pushed commit and you could write this into some other repo and push it server side.
I'm not sure if it would be possible to create a new commit in the same repo inside the hook... I guess that is prone to infinit recursions and disregarded
openBrain wrote: ↑Thu Jul 04, 2019 6:46 pm
EDIT2 : even trickier, a pre-push hook that will append to the last commit message the hash (hopefully commit messages aren't took into account into the hash)
I would never rewrite anything server side - I'm not sure if this is even possible.
openBrain wrote: ↑Thu Jul 04, 2019 6:46 pm
EDIT2 : even trickier, a pre-push hook that will append to the last commit message the hash (hopefully commit messages aren't took into account into the hash)
I would never rewrite anything server side - I'm not sure if this is even possible.
openBrain wrote: ↑Thu Jul 04, 2019 6:46 pm
EDIT2 : even trickier, a pre-push hook that will append to the last commit message the hash (hopefully commit messages aren't took into account into the hash)
I would never rewrite anything server side - I'm not sure if this is even possible.
AFAIK pre-push is client side.
ah sorry
okay but this does not solve the issue. everyone developing for FC must have this hook then, and merges on github would not work with this...
Including build date/time in the packaging output is not an ideal solution, it prevents FreeCAD from ever having reproducible builds. The ideal thing would be some property we get or calculate from the source. We are using a synced copy from the Github repo so the commits should be the same. I noticed the daily build does not have git as a build dependency, so I've added this just now to see what effect it has on today's builds re: the version number.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.