Skip to content

Commit d33053f

Browse files
committed
git-annex: update build flags to enable p2http
This commit introduces two changes in the cabal build command, one is a chore and and one enables additional functionality by adding an optional build flag. 1. remove build dependency constraint Following the TODO in the code comment, the pinned constraint is removed. The underlying issue (yesodweb/yesod/issues/1854) is marked as resolved and issue comments confirm that the bound on wai-extra is no longer needed. 2. add Servant build flag enabling p2http From git-annex.cabal: > Use the servant library, enabling using annex+http urls and > git-annex p2phttp This flag and related features were introduced in git-annex v10.20240731. In practice, git-annex built with this flag is able to push annexed files over http(s). An example context where this is useful are Git forges with annex support, such as https://codeberg.org/forgejo-aneksajo, a soft fork of https://forgejo.org. This introduces additional build dependencies (servant-*, warp-*), managed by cabal. When tested in the homebrew/ubuntu22.04:latest container, this increased the binary size from 123M to 129M. See: - https://git-annex.branchable.com/git-annex-p2phttp/ - https://git-annex.branchable.com/tips/smart_http_server/
1 parent ae1ce3c commit d33053f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Formula/g/git-annex.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ class GitAnnex < Formula
3131

3232
def install
3333
system "cabal", "v2-update"
34-
# Work around https://github.com/yesodweb/yesod/issues/1854 with constraint
35-
# TODO: Remove once fixed upstream
36-
system "cabal", "v2-install", *std_cabal_v2_args, "--flags=+S3", "--constraint=wai-extra<3.1.17"
34+
system "cabal", "v2-install", *std_cabal_v2_args, "--flags=+S3 +Servant"
3735
bin.install_symlink "git-annex" => "git-annex-shell"
3836
end
3937

0 commit comments

Comments
 (0)