Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Committing binaries when executing git fat via python processor. #64

Open
henrydobson opened this issue Aug 4, 2016 · 7 comments
Open

Comments

@henrydobson
Copy link

Hi guys,

git fat is commonly used in the macOS sys admin community and I'm working on a project that users a python processor to automatically git add, commit, fat push and regular push however git fat is seemingly being completely bypassed and the result is the newly added binaries are being committed.

Here's the project: https://github.com/henrydobson/ygini-recipes/tree/master/GitFatCommitAndPush

If I run the subprocess call commands directly in bash at the correct point in the workflow, git fat works perfectly. Not sure what I'm missing... Can you help?

H

@abraithwaite
Copy link

Would you happen to have your filter and hook configs available to share?

@henrydobson
Copy link
Author

No hooks and here's my attributes file:

*.pkg filter=fat -crlf
*.mpkg filter=fat -crlf
*.dmg filter=fat -crlf
*.zip filter=fat -crlf
*.gz filter=fat -crlf
*.deb filter=fat -crlf
*.png filter=fat -crlf

@abraithwaite
Copy link

Okay, then we'll still need some more info.

Can you provide the git status of the repository and the logs of both situations (running from the python script vs shell) then another git status after each case?

@henrydobson
Copy link
Author

henrydobson commented Aug 12, 2016

Hi Alan,

So I hope this is all useful information... https://gist.github.com/henrydobson/6cbe3ef15341480ac2a4eae75819452e

I've included what you asked for using the following:
git status
git logs --stat -1 (post commit)
git logs -p -1 -- (list of fat files) (post commit)
Exports from Console for the AutoPkgr logs

If you need anything else, please let me know!

@abraithwaite
Copy link

This is an excellent log! Thanks!

However I forgot one thing. Can you export GIT_TRACE=1 before running those commands? It would be very helpful if you could set it for the Munki script as well. It'll tell us exactly what git commands are being run.

Sorry for the extra hassle.

@henrydobson
Copy link
Author

henrydobson commented Aug 15, 2016

No problem!

I've revised the original and put the output whilst GIT_TRACE=1 at the top.

https://gist.github.com/henrydobson/6cbe3ef15341480ac2a4eae75819452e

Edit: I realised I had forgotten to alter the processor to collect the trace output... and that's the important bit! As you can see from the logs, git-fat is not found. I can confirm that if the PATH is managed to add git-fat's parent directory, the processor works!

@abraithwaite
Copy link

The only thing I can think of at this point is the git that Munki is using is different from your system git. It doesn't look like the GIT_TRACE environment variable made it into the context of the munki plugin either.

It's possible that the version of git that munki is using doesn't support git-filters yet. That's my best bet given the current information. If you can figure out a way to get that data, then we might be able to move forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants