-
Notifications
You must be signed in to change notification settings - Fork 613
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
Enable support for gawk in-place editing #232
Enable support for gawk in-place editing #232
Conversation
I can confirm that after upgrading gawk to version 4.2.1-2 via @dscho Is there a special process for updating the MSYS2 packages? For example, do we just redistribute the upstream package (assuming this one wasn't customized specifically for Git for Windows)? If it needs to be rebuilt, I imagine that's basically just pulling the upstream metadata into MSYS2-packages/gawk, building the package, and verifying that it fixes the issue in question. Which would then simply be turned into a separate PR against |
No, we simply consume most of the MSYS2 packages provided by the MSYS2 project; we do ship our own versions of a couple of them, though, such as OpenSSH (because I really do not want to wait for, or lean on, the good MSYS2 people to pick up critical security updates). You can verify which package version is used in any given Git for Windows version by looking at the And you can see what the current version is in Git for Windows' SDK by looking at https://github.com/git-for-windows/git-sdk-64/tree/master/var/lib/pacman/local; apparently, we override |
I guess the reason is git-for-windows/MSYS2-packages@e65e181 |
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.
Nice! Thanks for picking this up.
In addition to the simplification I suggested in the diff, I'd also like for a change of the commit message: instead of saying "Its omission was reported as item #1972 in the issue tracker." could you say "This fixes git-for-windows/git#1972" at the end of the commit message? That will auto-close that ticket when I merge the PR.
Thanks!
make-file-list.sh
Outdated
@@ -156,6 +156,7 @@ grep -v -e '\.[acho]$' -e '\.l[ao]$' -e '/aclocal/' \ | |||
-e '^/usr/share/perl5/core_perl/TAP/' \ | |||
-e '^/usr/share/vim/vim74/lang/' \ | |||
-e '^/etc/profile.d/git-sdk.sh$' | | |||
grep -v -P '^/usr/share/awk(?!/inplace\.awk$)' | |
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.
How about dropping this?
$ du -hs /usr/share/awk/
54K /usr/share/awk/
That's not really anything to worry over, it will be compressed well by LZMA.
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.
Sounds good to me. :) I'll update the commit to address both items this evening, and force-push the PR branch.
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.
👍
As for the upstream gawk package, I'll try to verify whether or not it already incorporates (or otherwise addresses) git-for-windows/MSYS2-packages@e65e181 and get back to you. |
@dscho It looks to me like your fix from git-for-windows/MSYS2-packages@e65e181 has been effectively incorporated upstream. The only difference I see are:
Unless I'm missing something, neither change is functionally different. So it seems like the best course of action is to simply go back to consuming the upstream gawk package. This presumably this means that we need a SDK update, but I'm not sure if that's enough by itself to pull the new version into the build process. Any suggestions? |
How about leaving |
The one thing it would do—in conjunction with this PR—is allow the awk in-place editing to work. But if you believe this takes things too far outside the Git for Windows scope, I'm happy to go along with your assessment. |
Why? Our current |
That's true, but our current version does not have the supporting shared library in /usr/lib/gawk. It only includes the static libraries, which can't be loaded at runtime. This was an upstream issue with the gawk 4.2.1-1 package, which presumably just carried over into the Git for Windows counterpart, that's fixed in 4.2.1-2. Here's what
After installing the upstream gawk 4.2.1-2, the directory now contains:
Without the shared So we can't really fix the issue without including both pieces. Unless, naturally, this is decided to be outside the scope of Git for Windows, and therefore not worth addressing. |
Okay, that's the piece I was missing. |
FYI I decided to simply re-build |
@dscho So assuming it's OK to pursue switching to the upstream package, I'm having a hard time following how updates to the SDK packages are performed... the structure has changed quite a bit since I last touched it. Can you point me to some information on that front? I'll try to figure out as much as I can, but I'm a bit lost at the moment. |
The default method is to use In your case, once the package is available, the safest way would be |
Oh, and |
Sounds good, and has the benefit (to me 😄) of keeping the PR small and simple. I'll get the changes you requested implemented and pushed ASAP. |
Update the excluded file patterns, so the contents of "/usr/share/awk" will be present in the installer and portable builds. This does not significantly impact the size of the installer, with the full contents of the directory being approximately 50 KB in size. This fixes git-for-windows/git#1972. Signed-off-by: Adric Norris <[email protected]>
@dscho I've made the requested changes to the commit and message, and confirmed that the requested feature works after building a new installer and portable release with your SDK update pulled. Since all appears to be well, I've also removed the WIP prefix from the PR, as I believe it to now be in a mergeable state. The 64-bit installer grew by 18 KB in my testing, which includes approximately 230 KB of shared libraries in |
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.
Looks good, thank you!
The `awk` included in Git for Windows [now includes extensions](#232) such as `inplace`. Signed-off-by: Johannes Schindelin <[email protected]>
Update the excluded file patterns, so the contents of "/usr/share/awk" will be present in the installer and portable builds. This does not significantly impact the size of the installer, with the full contents of the directory being approximately 50 KB in size.
This fixes git-for-windows/git#1972.