Replies: 2 comments 5 replies
-
The build process is almost exactly identical between Linux and macOS (the only difference is Linux uses OpenSSL and macOS uses CommonCrypto), so that seems unlikely. Have you tried testing Git 2.37.3 on Linux built without using Homebrew? |
Beta Was this translation helpful? Give feedback.
-
It could be due to # Set the local time zone
sys_localtime = Pathname("/etc/localtime")
brew_localtime = prefix/"etc/localtime"
(prefix/"etc").install_symlink sys_localtime if sys_localtime.exist? && brew_localtime.exist?
# Set zoneinfo correctly using the system installed zoneinfo
sys_zoneinfo = Pathname("/usr/share/zoneinfo")
brew_zoneinfo = share/"zoneinfo"
share.install_symlink sys_zoneinfo if sys_zoneinfo.exist? && !brew_zoneinfo.exist? Looks a bit suspicious that the conditional differs between two parts. Maybe Can try testing that by modifying formula (related diff below) and then running diff --git a/Formula/glibc.rb b/Formula/glibc.rb
index 7586de2c591..ec933d118a7 100644
--- a/Formula/glibc.rb
+++ b/Formula/glibc.rb
@@ -182,7 +182,7 @@ class Glibc < Formula
# Set the local time zone
sys_localtime = Pathname("/etc/localtime")
brew_localtime = prefix/"etc/localtime"
- (prefix/"etc").install_symlink sys_localtime if sys_localtime.exist? && brew_localtime.exist?
+ (prefix/"etc").install_symlink sys_localtime if sys_localtime.exist? && !brew_localtime.exist?
# Set zoneinfo correctly using the system installed zoneinfo
sys_zoneinfo = Pathname("/usr/share/zoneinfo") Or manually doing the symlink creation (not exactly the same as this will be absolute path as opposed to relative path by Homebrew)
|
Beta Was this translation helpful? Give feedback.
-
I am struggling with
git
installed by Homebrew on Linux (WSL, Ubuntu 20.04), after executingbrew upgrade
without thinking. Somehow the new bottledgit
ignores my timezone ingit commit
and uses GMT (+0000
). I also tried building from source (brew install git --build-from-source
) but the result was the same.For testing independent of my environment, I created a workflow with GitHub Actions (repo). It basically does the following:
git
.git
withbrew install git
.git
from Homebrew.The log shows (
Run git log --pretty=fuller
at the end)As you see, the
git
coming from Homebrew ignores the timezone (+0900
, which I set in the workflow) and uses GMT (+0000
). On the other hand, the same workflow on macOS (actually, the defaultgit
seems to be the brewed one) showsgit
uses the correct timezone+0900
. So, it sounds like there is some problem in the build process ofgit
on Linux??Beta Was this translation helpful? Give feedback.
All reactions