-
Notifications
You must be signed in to change notification settings - Fork 132
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
brew: improve formula to remove deprecated syntax #76
Conversation
Updates the formula to no longer rely on deprecated plist functionality. Fixes the issue with the service failing due to hardcoded PATH variable for the service. Generates the service manifest dynamically instead of embedding it into the formula. Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
59eefe2
to
e713f31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Volatus, this certainly looks an awful lot neater than the old embedded plist.
At a glance, I have a couple of queries though...
- Does this remove the ability to
brew install --HEAD
, looks like it might, but I am not up to date with homebrew, so maybe there is some default magic nowadays that removes the need to explicitly define where to fetch the head version. - Does the new service replacement for the old embedded plist work as described on the
README
, i.e. run theaws-rotate-iam-keys
command once for each line defined in~/.aws-rotate-iam-keys
? Again, doesn't look like it does, but I may be missing something obvious.
The plist solution was always a hack to make it easy to define multiple scheduled invocations of the aws-rotate-iam-keys
on a mac using launchd rather than cron, it's effectively an embedded script that invokes aws-rotate-iam-keys
as many times as defined in the ~/.aws-rotate-iam-keys
config file. To be fair to the hack, it works pretty well!
Don't think it'd be too difficult to add back in the logic to support I'll see what I can do about running it once per line in the file.. |
Thanks @Volatus, appreciate the contribution:-) I've also remembered the importance of And, the old plist also writes to a custom log file in There should be useful info in the commit history explaining any other oddites in the plist that might need to be copied across to a refactored solution using the nice new syntax from homebrew. Come to think of it, I remember another one... the check for an internet connection before trying to rotate keys, this was based on experience, frequently |
- Restored --HEAD functionality - Restored behavior to make sure script runs for each profile - Restored run-at-load behavior - Swapped out egrep for regular grep for better portability - Changed log path to include the plist name like before Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
cc @mmrwoods I believe just about everything has been addressed. I had to get rid of the pipes to Also, #71 will not be needed once this PR is merged. |
Hi @Volatus, sorry about the delayed response, but thanks for working on this. I ran into some minor issues testing this which would be nice to address before a merge.
|
Hi @Volatus, a couple of other things I forgot to mention... I'm unsure of the new log file location, the previous solution intentionally overwrote a file in I did notice that the head url has now changed to be fixed to the rhyeal git repo. This is probably a good thing as it's far less brittle, but I think it also makes it impossible to I'm not particularly wedded to the existing behaviour for either the log file or the |
Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
63a8948
to
14afe4e
Compare
You're right, I just pushed a fix for this. |
Well I think it's fair to expect that someone forking the repository would also go ahead and change the formula to point to their own repo. In fact I'd say it would be weird for me if I found out that the formula doesn't default to the upstream repo but is dynamic.
This change I can revert, however it makes sense for something installed with brew to log within the brew log directory for consistency. |
@mmrwoods Any updates on this? |
Hi @Volatus, sorry about the radio silence, have been busy with work. RE the head version being repo aware, I agree this might seem strange, but there was a concrete use case for this... before I had write access to this repo I worked on a fork, which my team as their homebrew tap, and then installed using Having said all that, it was very much a hack, so it can be removed. If something like that is needed again, I'll make a better hack :-) RE the log file location, I can see the appeal of moving it to a log directory under |
Got it @mmrwoods. I'll revert the logging change. And in terms of the testing changes of a fork locally, one can use |
Thanks for the tip, that's a lot simpler overall! |
Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
@mmrwoods I've reverted the log path to be same as before. |
Thanks @Volatus, this looks great, really appreciate the contribution you made here. I'm happy to merge this, but I don't think it will actually build a new release as there is an issue the circleci config. @rhyeal Any suggestions? I know like me you are tight for time, in the short term should we just hack this and copy the changes from the template files to the output files? |
Hi @Volatus, sorry there has been no progress on this. As the build process is currently failing, if you could make the same changes to |
@mmrwoods I could try fixing the CI instead but it doesn't load the run page for me. (I assume the run being about a year old is a factor) |
@Volatus Sorry, I've never tried to run the build process on circleci. |
Updates the formula to no longer rely on deprecated plist functionality.
Fixes the issue with the service failing due to hardcoded PATH variable
for the service. Generates the service manifest dynamically instead of
embedding it into the formula.
closes #74
Signed-off-by: Ismayil Mirzali ismayilmirzeli@gmail.com