-
Notifications
You must be signed in to change notification settings - Fork 253
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
The second call to date in build.bash fails on Mac OS #570
Comments
I see two date calls in build.bash: 1:
2:
Number (2) fails? Could you show the error? Also, (2) should only be called if SOURCE_DATE_EPOCH is set. |
(2) is definitely GNU-only -- Apple's BSD date doesn't have a Aforementioned builtins:
|
I confirm that the second line is the culprit. The first is ok. date --utc --date="@${SOURCE_DATE_EPOCH}" +%Y-%m-%d |
Ok, but, who sets $SOURCE_DATE_EPOCH ? |
I have no clue :) – it is definitely not me, so probably somewhere in the build process. |
Probably this: Homebrew/brew#11141 That's also why the older formula worked ( https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gocryptfs.rb ) |
yes. it might be set by cmake. |
GNU date syntax does not work on macos. Fixes #570
Can you see if this build.bash works? |
ping @GaelC92 |
Hi, I have been quite busy lately, but I’ll check and get back to you.
… Le 25 sept. 2021 à 20:45, rfjakob ***@***.***> a écrit :
ping @GaelC92 <https://github.com/GaelC92>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#570 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFU4HZNTZYILICFX6P2Y2ZTUDYKDFANCNFSM46AQEUMQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hello @rfjakob , I was able to build it successfully from the source : ./gocryptfs -version |
Thanks for testing! Merged to master. |
the date binary of Os X is not fully compliant with gnu date, and build fails.
as quick fix, one can install gdate with brew install coreutils, and patch the build.bash formula with brew edit.
here is my full formula for those willing to try the 2.0b4
class Gocryptfs < Formula
desc "Encrypted overlay filesystem written in Go"
homepage "https://nuetzlich.net/gocryptfs/"
url "https://github.com/rfjakob/gocryptfs/releases/download/v2.0-beta4/gocryptfs_v2.0-beta4_src-deps.tar.gz"
sha256 "d28c6b6a749e9f66745bd9a595b853b1ffde7ca3b2e82e0a41e9b3c40e7ebddd"
license "MIT"
depends_on "go" => :build
depends_on "pkg-config" => :build
depends_on "[email protected]"
on_macos do
end
on_linux do
depends_on "libfuse"
end
def install
inreplace "./build.bash",
"date ",
"/usr/local/bin/gdate "
end
test do
(testpath/"encdir").mkpath
pipe_output("#{bin}/gocryptfs -init #{testpath}/encdir", "password", 0)
assert_predicate testpath/"encdir/gocryptfs.conf", :exist?
end
end
The text was updated successfully, but these errors were encountered: