summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-01-24 16:59:41 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-02-24 12:14:20 +0100
commit8c5a7b8dc317307f494a83a8d985f5c5ee09a3a4 (patch)
tree214486b1f9b57bf3d81758fcce24c8ea5eedd319 /etc
parentb86388107fda2094060a5e9470728b7be9d750c9 (diff)
downloadjustbuild-8c5a7b8dc317307f494a83a8d985f5c5ee09a3a4.tar.gz
libgit2: Update to v1.5.0
Changes to build description: - new USE_SHA256 flag - removed "Generic" option for USE_SHA1 - updated to the new source code structure (split "src/git2" into "src/libgit2" and "src/util")
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/CC/TARGETS.git23
-rw-r--r--etc/import.prebuilt/TARGETS.git24
-rw-r--r--etc/import/TARGETS.git235
-rw-r--r--etc/import/include/git2/TARGETS.git216
-rw-r--r--etc/import/src/TARGETS.git2723
-rw-r--r--etc/import/src/libgit2/TARGETS.git2265
-rw-r--r--etc/import/src/util/TARGETS.git2472
-rw-r--r--etc/patches/libgit2_v1.2.0_fix-proxy-settings.patch78
-rw-r--r--etc/patches/libgit2_v1.5.0_fix-fake-repo.patch (renamed from etc/patches/libgit2_v1.2.0_fix-fake-repo.patch)85
-rw-r--r--etc/repos.json10
10 files changed, 850 insertions, 841 deletions
diff --git a/etc/defaults/CC/TARGETS.git2 b/etc/defaults/CC/TARGETS.git2
index 459d21ba..7708eb78 100644
--- a/etc/defaults/CC/TARGETS.git2
+++ b/etc/defaults/CC/TARGETS.git2
@@ -65,6 +65,9 @@
, "-Wformat-security"
, "-Wmissing-declarations"
, "-Wno-implicit-fallthrough"
+ , "-Wno-sign-compare"
+ , "-Wno-unused-parameter"
+ , "-Wno-uninitialized"
]
]
}
diff --git a/etc/import.prebuilt/TARGETS.git2 b/etc/import.prebuilt/TARGETS.git2
index 1578852d..ceb3f09d 100644
--- a/etc/import.prebuilt/TARGETS.git2
+++ b/etc/import.prebuilt/TARGETS.git2
@@ -3,8 +3,8 @@
, "hdrs": ["git2.h", ["TREE", null, "git2"]]
, "private-ldflags":
[ "-lgit2"
- , "-lgit2_os_unix"
- , "-lgit2_hash_openssl"
+ , "-lutil_os_unix"
+ , "-lutil_hash_openssl"
, "-lgit2_pcre"
, "-lgit2_http_parser"
, "-lpthread"
diff --git a/etc/import/TARGETS.git2 b/etc/import/TARGETS.git2
index 7b0e0503..c4fbebf2 100644
--- a/etc/import/TARGETS.git2
+++ b/etc/import/TARGETS.git2
@@ -28,6 +28,7 @@
, "USE_NTLMCLIENT"
, "USE_GSSAPI"
, "USE_SHA1"
+ , "USE_SHA256"
, "USE_HTTPS"
, "USE_HTTP_PARSER"
, "USE_BUNDLED_ZLIB"
@@ -65,9 +66,17 @@
, "\"mbedTLS\": link against mbedTLS (from system or open name)"
, "\"Win32\": link against Windows' SHA1 implementation (always from system)"
, "\"CommonCrypto\": build with shipped common_crypto implementation"
- , "\"Generic\": build with shipped SHA1 implementation"
, "\"HTTPS\": inherit from ~USE_HTTPS~, or fall back to \"CollisionDetection\""
]
+ , "USE_SHA256":
+ [ "true: use \"Builtin\""
+ , "\"Builtin\": build with shipped RFC 6234 implementation"
+ , "\"OpenSSL\": link against OpenSSL compat library (from system or open name)"
+ , "\"mbedTLS\": link against mbedTLS (from system or open name)"
+ , "\"Win32\": link against Windows' SHA1 implementation (always from system)"
+ , "\"CommonCrypto\": build with shipped common_crypto implementation"
+ , "\"HTTPS\": inherit from ~USE_HTTPS~, or fall back to \"Builtin\""
+ ]
, "WINHTTP": ["boolean. use \"WinHTTP\" if \"USE_HTTPS\" is true"]
}
}
@@ -89,6 +98,7 @@
, "USE_NTLMCLIENT"
, "USE_GSSAPI"
, "USE_SHA1"
+ , "USE_SHA256"
, "USE_HTTPS"
, "USE_HTTP_PARSER"
, "USE_BUNDLED_ZLIB"
@@ -119,6 +129,7 @@
, ["USE_SSH", {"type": "var", "name": "USE_SSH", "default": true}]
, ["USE_GSSAPI", {"type": "var", "name": "USE_GSSAPI", "default": true}]
, ["USE_SHA1", {"type": "var", "name": "USE_SHA1", "default": true}]
+ , ["USE_SHA256", {"type": "var", "name": "USE_SHA256", "default": true}]
, ["USE_HTTPS", {"type": "var", "name": "USE_HTTPS", "default": true}]
, [ "WINHTTP"
, { "type": "var"
@@ -189,6 +200,27 @@
, "default": {"type": "var", "name": "USE_SHA1"}
}
]
+ , [ "USE_SHA256"
+ , { "type": "case*"
+ , "expr": {"type": "var", "name": "USE_SHA256"}
+ , "case":
+ [ [true, "Builtin"]
+ , [ "HTTPS"
+ , { "type": "case*"
+ , "expr": {"type": "var", "name": "USE_HTTPS"}
+ , "case":
+ [ ["SecureTransport", "CommonCrypto"]
+ , ["WinHTTP", "Win32"]
+ , [false, "Builtin"]
+ , [null, "Builtin"]
+ ]
+ , "default": {"type": "var", "name": "USE_HTTPS"}
+ }
+ ]
+ ]
+ , "default": {"type": "var", "name": "USE_SHA256"}
+ }
+ ]
]
, "body":
{ "type": "env"
@@ -204,6 +236,7 @@
, "USE_NTLMCLIENT"
, "USE_GSSAPI"
, "USE_SHA1"
+ , "USE_SHA256"
, "USE_HTTPS"
, "USE_HTTP_PARSER"
, "USE_BUNDLED_ZLIB"
diff --git a/etc/import/include/git2/TARGETS.git2 b/etc/import/include/git2/TARGETS.git2
index 00d78cb0..34448f2b 100644
--- a/etc/import/include/git2/TARGETS.git2
+++ b/etc/import/include/git2/TARGETS.git2
@@ -14,6 +14,7 @@
, "USE_NTLMCLIENT"
, "USE_GSSAPI"
, "USE_SHA1"
+ , "USE_SHA256"
, "USE_HTTPS"
]
, "target": "feature_header"
@@ -130,6 +131,16 @@
, ["mbedTLS", [["GIT_SHA1_MBEDTLS", 1]]]
]
}
+ , { "type": "case*"
+ , "expr": {"type": "var", "name": "USE_SHA256"}
+ , "case":
+ [ ["Builtin", [["GIT_SHA256_BUILTIN", 1]]]
+ , ["Win32", [["GIT_SHA256_WIN32", 1]]]
+ , ["CommonCrypto", [["GIT_SHA256_COMMON_CRYPTO", 1]]]
+ , ["OpenSSL", [["GIT_SHA256_OPENSSL", 1]]]
+ , ["mbedTLS", [["GIT_SHA256_MBEDTLS", 1]]]
+ ]
+ }
]
}
]
@@ -146,7 +157,7 @@
, "sys/repository.h":
{ "type": ["@", "rules", "patch", "file"]
, "src": [["FILE", null, "sys/repository.h"]]
- , "patch": [["@", "patches", "", "libgit2_v1.2.0_fix-fake-repo.patch"]]
+ , "patch": [["@", "patches", "", "libgit2_v1.5.0_fix-fake-repo.patch"]]
, "patch-part": ["a", "include", "git2", "sys", "repository.h"]
}
, "TREE":
@@ -173,6 +184,7 @@
, "deprecated.h"
, "describe.h"
, "diff.h"
+ , "email.h"
, "errors.h"
, "filter.h"
, "global.h"
@@ -226,6 +238,7 @@
, "sys/credential.h"
, "sys/cred.h"
, "sys/diff.h"
+ , "sys/email.h"
, "sys/filter.h"
, "sys/hashsig.h"
, "sys/index.h"
@@ -238,6 +251,7 @@
, "sys/refdb_backend.h"
, "sys/reflog.h"
, "sys/refs.h"
+ , "sys/remote.h"
, "sys/repository.h"
, "sys/stream.h"
, "sys/transport.h"
diff --git a/etc/import/src/TARGETS.git2 b/etc/import/src/TARGETS.git2
index e488bc89..2e96ce6c 100644
--- a/etc/import/src/TARGETS.git2
+++ b/etc/import/src/TARGETS.git2
@@ -1,542 +1,4 @@
-{ "git2_private_headers":
- { "type": ["@", "rules", "data", "staged"]
- , "srcs":
- [ "alloc.h"
- , "annotated_commit.h"
- , "apply.h"
- , "array.h"
- , "assert_safe.h"
- , "attrcache.h"
- , "attr_file.h"
- , "attr.h"
- , "bitvec.h"
- , "blame_git.h"
- , "blame.h"
- , "blob.h"
- , "branch.h"
- , "buffer.h"
- , "cache.h"
- , "cc-compat.h"
- , "checkout.h"
- , "clone.h"
- , "commit.h"
- , "commit_graph.h"
- , "commit_list.h"
- , "common.h"
- , "config_backend.h"
- , "config_entries.h"
- , "config.h"
- , "config_parse.h"
- , "delta.h"
- , "diff_driver.h"
- , "diff_file.h"
- , "diff_generate.h"
- , "diff.h"
- , "diff_parse.h"
- , "diff_tform.h"
- , "diff_xdiff.h"
- , "errors.h"
- , "fetch.h"
- , "fetchhead.h"
- , "filebuf.h"
- , "filter.h"
- , "futils.h"
- , "hash.h"
- , "idxmap.h"
- , "ignore.h"
- , "indexer.h"
- , "index.h"
- , "integer.h"
- , "iterator.h"
- , "khash.h"
- , "libgit2.h"
- , "mailmap.h"
- , "map.h"
- , "merge_driver.h"
- , "merge.h"
- , "message.h"
- , "midx.h"
- , "mwindow.h"
- , "net.h"
- , "netops.h"
- , "notes.h"
- , "object.h"
- , "odb.h"
- , "offmap.h"
- , "oidarray.h"
- , "oid.h"
- , "oidmap.h"
- , "pack.h"
- , "pack-objects.h"
- , "parse.h"
- , "patch_generate.h"
- , "patch.h"
- , "patch_parse.h"
- , "path.h"
- , "pathspec.h"
- , "pool.h"
- , "posix.h"
- , "pqueue.h"
- , "proxy.h"
- , "push.h"
- , "reader.h"
- , "refdb.h"
- , "reflog.h"
- , "refs.h"
- , "refspec.h"
- , "regexp.h"
- , "remote.h"
- , "repository.h"
- , "repo_template.h"
- , "revwalk.h"
- , "runtime.h"
- , "settings.h"
- , "signature.h"
- , "sortedcache.h"
- , "status.h"
- , "stream.h"
- , "strmap.h"
- , "strnlen.h"
- , "submodule.h"
- , "sysdir.h"
- , "tag.h"
- , "thread.h"
- , "threadstate.h"
- , "trace.h"
- , "transaction.h"
- , "tree-cache.h"
- , "tree.h"
- , "userdiff.h"
- , "utf8.h"
- , "util.h"
- , "varint.h"
- , "vector.h"
- , "wildmatch.h"
- , "worktree.h"
- , "zstream.h"
- , "allocators/failalloc.h"
- , "allocators/stdalloc.h"
- , "allocators/win32_leakcheck.h"
- , "hash/sha1.h"
- , "hash/sha1/collisiondetect.h"
- , "hash/sha1/common_crypto.h"
- , "hash/sha1/generic.h"
- , "hash/sha1/mbedtls.h"
- , "hash/sha1/openssl.h"
- , "hash/sha1/win32.h"
- , "hash/sha1/sha1dc/sha1.h"
- , "hash/sha1/sha1dc/ubc_check.h"
- , "streams/mbedtls.h"
- , "streams/openssl.h"
- , "streams/openssl_dynamic.h"
- , "streams/openssl_legacy.h"
- , "streams/registry.h"
- , "streams/socket.h"
- , "streams/stransport.h"
- , "streams/tls.h"
- , "transports/auth.h"
- , "transports/auth_negotiate.h"
- , "transports/auth_ntlm.h"
- , "transports/httpclient.h"
- , "transports/http.h"
- , "transports/smart.h"
- , "transports/ssh.h"
- , "unix/posix.h"
- , "unix/pthread.h"
- , "win32/dir.h"
- , "win32/error.h"
- , "win32/findfile.h"
- , "win32/mingw-compat.h"
- , "win32/msvc-compat.h"
- , "win32/path_w32.h"
- , "win32/posix.h"
- , "win32/precompiled.h"
- , "win32/reparse.h"
- , "win32/thread.h"
- , "win32/utf-conv.h"
- , "win32/version.h"
- , "win32/w32_buffer.h"
- , "win32/w32_common.h"
- , "win32/w32_leakcheck.h"
- , "win32/w32_util.h"
- , "win32/win32-compat.h"
- , "xdiff/xdiff.h"
- , "xdiff/xdiffi.h"
- , "xdiff/xemit.h"
- , "xdiff/xinclude.h"
- , "xdiff/xmacros.h"
- , "xdiff/xprepare.h"
- , "xdiff/xtypes.h"
- , "xdiff/xutils.h"
- , ["include", "git2_public_headers"]
- ]
- }
-, "git2_os_unix":
- { "type": ["@", "rules", "CC", "library"]
- , "arguments_config": ["OS", "THREADSAFE"]
- , "name": ["git2_os_unix"]
- , "pure C": ["yes"]
- , "srcs": ["unix/map.c", "unix/realpath.c"]
- , "private-hdrs": ["git2_private_headers"]
- , "private-ldflags":
- { "type": "++"
- , "$1":
- [ { "type": "if"
- , "cond": {"type": "var", "name": "THREADSAFE"}
- , "then": ["-lpthread"]
- }
- , { "type": "case"
- , "expr": {"type": "var", "name": "OS"}
- , "case":
- { "solaris": ["-lsocket", "-lnsl"]
- , "sunos": ["-lsocket", "-lnsl"]
- , "haiku": ["-lnetwork"]
- }
- }
- ]
- }
- }
-, "git2_os_win32":
- { "type": ["@", "rules", "CC", "library"]
- , "name": ["git2_os_win32"]
- , "pure C": ["yes"]
- , "srcs":
- [ "win32/dir.c"
- , "win32/error.c"
- , "win32/findfile.c"
- , "win32/map.c"
- , "win32/path_w32.c"
- , "win32/posix_w32.c"
- , "win32/precompiled.c"
- , "win32/thread.c"
- , "win32/utf-conv.c"
- , "win32/w32_buffer.c"
- , "win32/w32_leakcheck.c"
- , "win32/w32_util.c"
- ]
- , "private-hdrs": ["git2_private_headers"]
- , "private-ldflags": ["-lws2_32"]
- }
-, "git2_os":
- { "type": ["@", "rules", "CC", "library"]
- , "arguments_config": ["OS"]
- , "deps":
- { "type": "if"
- , "cond":
- {"type": "==", "$1": {"type": "var", "name": "OS"}, "$2": "windows"}
- , "then": ["git2_os_win32"]
- , "else": ["git2_os_unix"]
- }
- }
-, "git2_hash_collision_detection":
- { "type": ["@", "rules", "CC", "library"]
- , "name": ["git2_hash_collision_detection"]
- , "pure C": ["yes"]
- , "private-defines":
- [ "SHA1DC_NO_STANDARD_INCLUDES=1"
- , "SHA1DC_CUSTOM_INCLUDE_SHA1_C=\"common.h\""
- , "SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=\"common.h\""
- ]
- , "srcs":
- [ "hash/sha1/collisiondetect.c"
- , "hash/sha1/sha1dc/sha1.c"
- , "hash/sha1/sha1dc/ubc_check.c"
- ]
- , "private-hdrs": ["git2_private_headers"]
- }
-, "git2_hash_openssl":
- { "type": ["@", "rules", "CC", "library"]
- , "arguments_config": ["USE_SYSTEM_LIBS"]
- , "name": ["git2_hash_openssl"]
- , "pure C": ["yes"]
- , "srcs": ["hash/sha1/openssl.c"]
- , "private-hdrs": ["git2_private_headers"]
- , "private-ldflags":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": ["-lssl"]
- }
- , "deps":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": []
- , "else": [["@", "ssl", "", "crypto"]]
- }
- }
-, "git2_hash_common_crypto":
- { "type": ["@", "rules", "CC", "library"]
- , "arguments_config": ["USE_SYSTEM_LIBS"]
- , "name": ["git2_hash_common_crypto"]
- , "pure C": ["yes"]
- , "srcs": ["hash/sha1/common_crypto.c"]
- , "private-hdrs": ["git2_private_headers"]
- , "private-ldflags":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": ["-lcommon_crypto"]
- }
- , "deps":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": []
- , "else": [["@", "common_crypto", "", "crypto"]]
- }
- }
-, "git2_hash_mbedtls":
- { "type": ["@", "rules", "CC", "library"]
- , "arguments_config": ["USE_SYSTEM_LIBS"]
- , "name": ["git2_hash_mbedtls"]
- , "pure C": ["yes"]
- , "srcs": ["hash/sha1/mbedtls.c"]
- , "private-hdrs": ["git2_private_headers"]
- , "private-ldflags":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": ["-lmbedtls"]
- }
- , "deps":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": []
- , "else": [["@", "mbedtls", "", "crypto"]]
- }
- }
-, "git2_hash_win32":
- { "type": ["@", "rules", "CC", "library"]
- , "name": ["git2_hash_win32"]
- , "pure C": ["yes"]
- , "srcs": ["hash/sha1/win32.c"]
- , "private-hdrs": ["git2_private_headers"]
- }
-, "git2_hash_generic":
- { "type": ["@", "rules", "CC", "library"]
- , "name": ["git2_hash_generic"]
- , "pure C": ["yes"]
- , "srcs": ["hash/sha1/generic.c"]
- , "private-hdrs": ["git2_private_headers"]
- }
-, "git2_hash":
- { "type": ["@", "rules", "CC", "library"]
- , "arguments_config": ["USE_SHA1"]
- , "deps":
- { "type": "case*"
- , "expr": {"type": "var", "name": "USE_SHA1"}
- , "case":
- [ ["CollisionDetection", ["git2_hash_collision_detection"]]
- , ["OpenSSL", ["git2_hash_openssl"]]
- , ["CommonCrypto", ["git2_hash_common_crypto"]]
- , ["mbedTLS", ["git2_hash_mbedtls"]]
- , ["Win32", ["git2_hash_win32"]]
- , ["Generic", ["git2_hash_generic"]]
- ]
- , "default":
- {"type": "fail", "msg": "Asked for unknown SHA1 backend in `USE_SHA1`"}
- }
- }
-, "git2_regex":
- { "type": ["@", "rules", "CC", "library"]
- , "arguments_config": ["USE_SYSTEM_LIBS", "REGEX_BACKEND"]
- , "name": ["git2_regex"]
- , "private-ldflags":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then":
- { "type": "case"
- , "expr": {"type": "var", "name": "REGEX_BACKEND"}
- , "case": {"pcre2": ["-lpcre2-8"], "pcre": ["-lpcre"]}
- }
- }
- , "deps":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then":
- { "type": "case*"
- , "expr": {"type": "var", "name": "REGEX_BACKEND"}
- , "case":
- [ ["builtin", [["deps/pcre", "git2_pcre"]]]
- , [null, [["deps/pcre", "git2_pcre"]]]
- ]
- }
- , "else":
- { "type": "case*"
- , "expr": {"type": "var", "name": "REGEX_BACKEND"}
- , "case":
- [ ["pcre2", [["@", "pcre2", "", "pcre2"]]]
- , ["pcre", [["@", "pcre", "", "pcre"]]]
- , ["builtin", [["deps/pcre", "git2_pcre"]]]
- , [null, [["deps/pcre", "git2_pcre"]]]
- ]
- }
- }
- }
-, "git2_compress":
- { "type": ["@", "rules", "CC", "library"]
- , "arguments_config": ["USE_SYSTEM_LIBS", "USE_BUNDLED_ZLIB"]
- , "name": ["git2_compress"]
- , "private-ldflags":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_BUNDLED_ZLIB"}
- , "then": []
- , "else":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": ["-lz"]
- }
- }
- , "deps":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_BUNDLED_ZLIB"}
- , "then":
- {"type": "fail", "msg": "bundled zlib from deps/zlib not supported yet."}
- , "else":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": []
- , "else": [["@", "zlib", "", "zlib"]]
- }
- }
- }
-, "git2_ssh":
- { "type": ["@", "rules", "CC", "library"]
- , "arguments_config": ["USE_SYSTEM_LIBS", "USE_SSH"]
- , "name": ["git2_ssh"]
- , "private-ldflags":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SSH"}
- , "then":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": ["-lssh2"]
- }
- }
- , "deps":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SSH"}
- , "then":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": []
- , "else": [["@", "ssh2", "", "ssh"]]
- }
- }
- }
-, "git2_http_parser":
- { "type": ["@", "rules", "CC", "library"]
- , "arguments_config": ["USE_SYSTEM_LIBS", "USE_HTTP_PARSER"]
- , "name": ["git2_http_parser"]
- , "private-ldflags":
- { "type": "case*"
- , "expr": {"type": "var", "name": "USE_HTTP_PARSER"}
- , "case":
- [ [ "system"
- , { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": ["-lhttp_parser"]
- }
- ]
- ]
- }
- , "deps":
- { "type": "case*"
- , "expr": {"type": "var", "name": "USE_HTTP_PARSER"}
- , "case":
- [ [ "system"
- , { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": []
- , "else": [["@", "http_parser", "", "http_parser"]]
- }
- ]
- ]
- , "default": [["deps/http-parser", "git2_http_parser"]]
- }
- }
-, "git2_gssapi":
- { "type": ["@", "rules", "CC", "library"]
- , "arguments_config": ["OS", "USE_SYSTEM_LIBS", "USE_GSSAPI"]
- , "name": ["git2_gssapi"]
- , "private-ldflags":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then":
- { "type": "case*"
- , "expr": {"type": "var", "name": "USE_GSSAPI"}
- , "case":
- [ [ true
- , { "type": "case*"
- , "expr": {"type": "var", "name": "OS"}
- , "case": [["darwin", ["-framework", "GSS"]]]
- , "default": ["-lgssapi"]
- }
- ]
- , ["gssapi", ["-lgssapi"]]
- , ["GSS.framework", ["-framework", "GSS"]]
- ]
- }
- }
- , "deps":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": []
- , "else":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_GSSAPI"}
- , "then": [["@", "gssapi", "", "gssapi"]]
- }
- }
- }
-, "git2_https":
- { "type": ["@", "rules", "CC", "library"]
- , "arguments_config": ["OS", "USE_SYSTEM_LIBS", "USE_HTTPS"]
- , "name": ["git2_http"]
- , "private-ldflags":
- { "type": "case*"
- , "expr": {"type": "var", "name": "USE_HTTPS"}
- , "case": [["WinHTTP", ["-lwinhttp"]]]
- , "default":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then":
- { "type": "case*"
- , "expr": {"type": "var", "name": "USE_HTTPS"}
- , "case":
- [ ["OpenSSL", ["-lssl"]]
- , ["mbedTLS", ["-lmbedtls"]]
- , [ "SecureTransport"
- , ["-framework", "CoreFoundation", "-framework", "Security"]
- ]
- ]
- }
- }
- }
- , "deps":
- { "type": "if"
- , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
- , "then": []
- , "else":
- { "type": "case*"
- , "expr": {"type": "var", "name": "USE_HTTPS"}
- , "case":
- [ ["OpenSSL", [["@", "ssl", "", "ssl"]]]
- , ["mbedTLS", [["@", "mbedtls", "", "ssl"]]]
- , ["SecureTransport", [["@", "secure_transport", "", "ssl"]]]
- ]
- }
- }
- }
-, "repository.c":
- { "type": ["@", "rules", "patch", "file"]
- , "src": [["FILE", null, "repository.c"]]
- , "patch": [["@", "patches", "", "libgit2_v1.2.0_fix-fake-repo.patch"]]
- , "patch-part": ["a", "src", "repository.c"]
- }
-, "remote.c":
- { "type": ["@", "rules", "patch", "file"]
- , "src": [["FILE", null, "remote.c"]]
- , "patch": [["@", "patches", "", "libgit2_v1.2.0_fix-proxy-settings.patch"]]
- , "patch-part": ["a", "src", "remote.c"]
- }
-, "git2internal":
+{ "git2internal":
{ "type": ["@", "rules", "CC", "library"]
, "arguments_config": ["OS", "ARCH", "TARGET_ARCH"]
, "name": ["git2"]
@@ -560,178 +22,19 @@
}
, "case": {"arm": ["-Wno-atomic-alignment"]}
}
- , "srcs":
- [ "alloc.c"
- , "annotated_commit.c"
- , "apply.c"
- , "attr.c"
- , "attrcache.c"
- , "attr_file.c"
- , "blame.c"
- , "blame_git.c"
- , "blob.c"
- , "branch.c"
- , "buffer.c"
- , "cache.c"
- , "checkout.c"
- , "cherrypick.c"
- , "clone.c"
- , "commit.c"
- , "commit_graph.c"
- , "commit_list.c"
- , "config.c"
- , "config_cache.c"
- , "config_entries.c"
- , "config_file.c"
- , "config_mem.c"
- , "config_parse.c"
- , "config_snapshot.c"
- , "crlf.c"
- , "date.c"
- , "delta.c"
- , "describe.c"
- , "diff.c"
- , "diff_driver.c"
- , "diff_file.c"
- , "diff_generate.c"
- , "diff_parse.c"
- , "diff_print.c"
- , "diff_stats.c"
- , "diff_tform.c"
- , "diff_xdiff.c"
- , "errors.c"
- , "fetch.c"
- , "fetchhead.c"
- , "filebuf.c"
- , "filter.c"
- , "futils.c"
- , "graph.c"
- , "hash.c"
- , "hashsig.c"
- , "ident.c"
- , "idxmap.c"
- , "ignore.c"
- , "index.c"
- , "indexer.c"
- , "iterator.c"
- , "libgit2.c"
- , "mailmap.c"
- , "merge.c"
- , "merge_driver.c"
- , "merge_file.c"
- , "message.c"
- , "midx.c"
- , "mwindow.c"
- , "net.c"
- , "netops.c"
- , "notes.c"
- , "object_api.c"
- , "object.c"
- , "odb.c"
- , "odb_loose.c"
- , "odb_mempack.c"
- , "odb_pack.c"
- , "offmap.c"
- , "oidarray.c"
- , "oid.c"
- , "oidmap.c"
- , "pack.c"
- , "pack-objects.c"
- , "parse.c"
- , "patch.c"
- , "patch_generate.c"
- , "patch_parse.c"
- , "path.c"
- , "pathspec.c"
- , "pool.c"
- , "posix.c"
- , "pqueue.c"
- , "proxy.c"
- , "push.c"
- , "reader.c"
- , "rebase.c"
- , "refdb.c"
- , "refdb_fs.c"
- , "reflog.c"
- , "refs.c"
- , "refspec.c"
- , "regexp.c"
- , "remote.c"
- , "repository.c"
- , "reset.c"
- , "revert.c"
- , "revparse.c"
- , "revwalk.c"
- , "runtime.c"
- , "signature.c"
- , "sortedcache.c"
- , "stash.c"
- , "status.c"
- , "strarray.c"
- , "strmap.c"
- , "submodule.c"
- , "sysdir.c"
- , "tag.c"
- , "thread.c"
- , "threadstate.c"
- , "trace.c"
- , "trailer.c"
- , "transaction.c"
- , "transport.c"
- , "tree.c"
- , "tree-cache.c"
- , "tsort.c"
- , "utf8.c"
- , "util.c"
- , "varint.c"
- , "vector.c"
- , "wildmatch.c"
- , "worktree.c"
- , "zstream.c"
- , "allocators/failalloc.c"
- , "allocators/stdalloc.c"
- , "allocators/win32_leakcheck.c"
- , "streams/mbedtls.c"
- , "streams/openssl.c"
- , "streams/openssl_dynamic.c"
- , "streams/openssl_legacy.c"
- , "streams/registry.c"
- , "streams/socket.c"
- , "streams/stransport.c"
- , "streams/tls.c"
- , "transports/auth.c"
- , "transports/auth_negotiate.c"
- , "transports/auth_ntlm.c"
- , "transports/credential.c"
- , "transports/credential_helpers.c"
- , "transports/git.c"
- , "transports/http.c"
- , "transports/httpclient.c"
- , "transports/local.c"
- , "transports/smart.c"
- , "transports/smart_pkt.c"
- , "transports/smart_protocol.c"
- , "transports/ssh.c"
- , "transports/winhttp.c"
- , "xdiff/xdiffi.c"
- , "xdiff/xemit.c"
- , "xdiff/xhistogram.c"
- , "xdiff/xmerge.c"
- , "xdiff/xpatience.c"
- , "xdiff/xprepare.c"
- , "xdiff/xutils.c"
- ]
+ , "srcs": [["src/util", "util_sources"], ["src/libgit2", "libgit2_sources"]]
, "hdrs": [["include", "git2_public_headers"]]
- , "private-hdrs": ["git2_private_headers"]
- , "deps":
- [ "git2_os"
- , "git2_hash"
- , "git2_regex"
- , "git2_compress"
- , "git2_ssh"
- , "git2_http_parser"
- , "git2_gssapi"
- , "git2_https"
+ , "private-hdrs": [["src/libgit2", "libgit2_private_headers"]]
+ , "deps":
+ [ ["src/util", "util_os"]
+ , ["src/util", "util_sha1"]
+ , ["src/util", "util_sha256"]
+ , ["src/util", "util_regex"]
+ , ["src/util", "util_compress"]
+ , ["src/util", "util_ssh"]
+ , ["src/util", "util_http_parser"]
+ , ["src/util", "util_gssapi"]
+ , ["src/util", "util_https"]
]
}
}
diff --git a/etc/import/src/libgit2/TARGETS.git2 b/etc/import/src/libgit2/TARGETS.git2
new file mode 100644
index 00000000..aca7d2ea
--- /dev/null
+++ b/etc/import/src/libgit2/TARGETS.git2
@@ -0,0 +1,265 @@
+{ "libgit2_private_headers":
+ { "type": ["@", "rules", "data", "staged"]
+ , "srcs":
+ [ "annotated_commit.h"
+ , "apply.h"
+ , "attr.h"
+ , "attr_file.h"
+ , "attrcache.h"
+ , "blame.h"
+ , "blame_git.h"
+ , "blob.h"
+ , "branch.h"
+ , "buf.h"
+ , "cache.h"
+ , "checkout.h"
+ , "clone.h"
+ , "commit.h"
+ , "commit_graph.h"
+ , "commit_list.h"
+ , "common.h"
+ , "config.h"
+ , "config_backend.h"
+ , "config_entries.h"
+ , "config_parse.h"
+ , "delta.h"
+ , "diff.h"
+ , "diff_driver.h"
+ , "diff_file.h"
+ , "diff_generate.h"
+ , "diff_parse.h"
+ , "diff_stats.h"
+ , "diff_tform.h"
+ , "diff_xdiff.h"
+ , "email.h"
+ , "errors.h"
+ , "fetch.h"
+ , "fetchhead.h"
+ , "filter.h"
+ , "idxmap.h"
+ , "ignore.h"
+ , "index.h"
+ , "indexer.h"
+ , "iterator.h"
+ , "libgit2.h"
+ , "mailmap.h"
+ , "merge.h"
+ , "merge_driver.h"
+ , "midx.h"
+ , "mwindow.h"
+ , "netops.h"
+ , "notes.h"
+ , "object.h"
+ , "odb.h"
+ , "offmap.h"
+ , "oid.h"
+ , "oidarray.h"
+ , "oidmap.h"
+ , "pack-objects.h"
+ , "pack.h"
+ , "parse.h"
+ , "patch.h"
+ , "patch_generate.h"
+ , "patch_parse.h"
+ , "path.h"
+ , "pathspec.h"
+ , "proxy.h"
+ , "push.h"
+ , "reader.h"
+ , "refdb.h"
+ , "reflog.h"
+ , "refs.h"
+ , "refspec.h"
+ , "remote.h"
+ , "repo_template.h"
+ , "repository.h"
+ , "revwalk.h"
+ , "settings.h"
+ , "signature.h"
+ , "status.h"
+ , "stream.h"
+ , "submodule.h"
+ , "sysdir.h"
+ , "tag.h"
+ , "threadstate.h"
+ , "trace.h"
+ , "transaction.h"
+ , "tree-cache.h"
+ , "tree.h"
+ , "userdiff.h"
+ , "worktree.h"
+ , "streams/mbedtls.h"
+ , "streams/openssl.h"
+ , "streams/openssl_dynamic.h"
+ , "streams/openssl_legacy.h"
+ , "streams/registry.h"
+ , "streams/socket.h"
+ , "streams/stransport.h"
+ , "streams/tls.h"
+ , "transports/auth.h"
+ , "transports/auth_negotiate.h"
+ , "transports/auth_ntlm.h"
+ , "transports/http.h"
+ , "transports/httpclient.h"
+ , "transports/smart.h"
+ , "transports/ssh.h"
+ , "xdiff/git-xdiff.h"
+ , "xdiff/xdiff.h"
+ , "xdiff/xdiffi.h"
+ , "xdiff/xemit.h"
+ , "xdiff/xinclude.h"
+ , "xdiff/xmacros.h"
+ , "xdiff/xprepare.h"
+ , "xdiff/xtypes.h"
+ , "xdiff/xutils.h"
+ , ["src/util", "util_private_headers"]
+ ]
+ }
+, "repository.c":
+ { "type": ["@", "rules", "patch", "file"]
+ , "src": [["FILE", null, "repository.c"]]
+ , "patch": [["@", "patches", "", "libgit2_v1.5.0_fix-fake-repo.patch"]]
+ , "patch-part": ["a", "src", "libgit2", "repository.c"]
+ }
+, "libgit2_sources":
+ { "type": ["@", "rules", "data", "staged"]
+ , "srcs":
+ [ "annotated_commit.c"
+ , "apply.c"
+ , "attr.c"
+ , "attr_file.c"
+ , "attrcache.c"
+ , "blame.c"
+ , "blame_git.c"
+ , "blob.c"
+ , "branch.c"
+ , "buf.c"
+ , "cache.c"
+ , "checkout.c"
+ , "cherrypick.c"
+ , "clone.c"
+ , "commit.c"
+ , "commit_graph.c"
+ , "commit_list.c"
+ , "config.c"
+ , "config_cache.c"
+ , "config_entries.c"
+ , "config_file.c"
+ , "config_mem.c"
+ , "config_parse.c"
+ , "config_snapshot.c"
+ , "crlf.c"
+ , "delta.c"
+ , "describe.c"
+ , "diff.c"
+ , "diff_driver.c"
+ , "diff_file.c"
+ , "diff_generate.c"
+ , "diff_parse.c"
+ , "diff_print.c"
+ , "diff_stats.c"
+ , "diff_tform.c"
+ , "diff_xdiff.c"
+ , "email.c"
+ , "errors.c"
+ , "fetch.c"
+ , "fetchhead.c"
+ , "filter.c"
+ , "graph.c"
+ , "hashsig.c"
+ , "ident.c"
+ , "idxmap.c"
+ , "ignore.c"
+ , "index.c"
+ , "indexer.c"
+ , "iterator.c"
+ , "libgit2.c"
+ , "mailmap.c"
+ , "merge.c"
+ , "merge_driver.c"
+ , "merge_file.c"
+ , "message.c"
+ , "midx.c"
+ , "mwindow.c"
+ , "netops.c"
+ , "notes.c"
+ , "object.c"
+ , "object_api.c"
+ , "odb.c"
+ , "odb_loose.c"
+ , "odb_mempack.c"
+ , "odb_pack.c"
+ , "offmap.c"
+ , "oid.c"
+ , "oidarray.c"
+ , "oidmap.c"
+ , "pack-objects.c"
+ , "pack.c"
+ , "parse.c"
+ , "patch.c"
+ , "patch_generate.c"
+ , "patch_parse.c"
+ , "path.c"
+ , "pathspec.c"
+ , "proxy.c"
+ , "push.c"
+ , "reader.c"
+ , "rebase.c"
+ , "refdb.c"
+ , "refdb_fs.c"
+ , "reflog.c"
+ , "refs.c"
+ , "refspec.c"
+ , "remote.c"
+ , "repository.c"
+ , "reset.c"
+ , "revert.c"
+ , "revparse.c"
+ , "revwalk.c"
+ , "signature.c"
+ , "stash.c"
+ , "status.c"
+ , "strarray.c"
+ , "submodule.c"
+ , "sysdir.c"
+ , "tag.c"
+ , "threadstate.c"
+ , "trace.c"
+ , "trailer.c"
+ , "transaction.c"
+ , "transport.c"
+ , "tree-cache.c"
+ , "tree.c"
+ , "worktree.c"
+ , "streams/mbedtls.c"
+ , "streams/openssl.c"
+ , "streams/openssl_dynamic.c"
+ , "streams/openssl_legacy.c"
+ , "streams/registry.c"
+ , "streams/socket.c"
+ , "streams/stransport.c"
+ , "streams/tls.c"
+ , "transports/auth.c"
+ , "transports/auth_negotiate.c"
+ , "transports/auth_ntlm.c"
+ , "transports/credential.c"
+ , "transports/credential_helpers.c"
+ , "transports/git.c"
+ , "transports/http.c"
+ , "transports/httpclient.c"
+ , "transports/local.c"
+ , "transports/smart.c"
+ , "transports/smart_pkt.c"
+ , "transports/smart_protocol.c"
+ , "transports/ssh.c"
+ , "transports/winhttp.c"
+ , "xdiff/xdiffi.c"
+ , "xdiff/xemit.c"
+ , "xdiff/xhistogram.c"
+ , "xdiff/xmerge.c"
+ , "xdiff/xpatience.c"
+ , "xdiff/xprepare.c"
+ , "xdiff/xutils.c"
+ ]
+ }
+}
diff --git a/etc/import/src/util/TARGETS.git2 b/etc/import/src/util/TARGETS.git2
new file mode 100644
index 00000000..281d9c46
--- /dev/null
+++ b/etc/import/src/util/TARGETS.git2
@@ -0,0 +1,472 @@
+{ "util_private_headers":
+ { "type": ["@", "rules", "data", "staged"]
+ , "srcs":
+ [ "alloc.h"
+ , "array.h"
+ , "assert_safe.h"
+ , "bitvec.h"
+ , "cc-compat.h"
+ , "date.h"
+ , "filebuf.h"
+ , "fs_path.h"
+ , "futils.h"
+ , "git2_util.h"
+ , "hash.h"
+ , "integer.h"
+ , "khash.h"
+ , "map.h"
+ , "net.h"
+ , "pool.h"
+ , "posix.h"
+ , "pqueue.h"
+ , "rand.h"
+ , "regexp.h"
+ , "runtime.h"
+ , "sortedcache.h"
+ , "str.h"
+ , "strmap.h"
+ , "strnlen.h"
+ , "thread.h"
+ , "utf8.h"
+ , "util.h"
+ , "varint.h"
+ , "vector.h"
+ , "wildmatch.h"
+ , "zstream.h"
+ , "allocators/failalloc.h"
+ , "allocators/stdalloc.h"
+ , "allocators/win32_leakcheck.h"
+ , "hash/builtin.h"
+ , "hash/collisiondetect.h"
+ , "hash/common_crypto.h"
+ , "hash/mbedtls.h"
+ , "hash/openssl.h"
+ , "hash/sha.h"
+ , "hash/win32.h"
+ , "hash/sha1dc/sha1.h"
+ , "hash/sha1dc/ubc_check.h"
+ , "hash/rfc6234/sha.h"
+ , "unix/posix.h"
+ , "unix/pthread.h"
+ , "win32/dir.h"
+ , "win32/error.h"
+ , "win32/findfile.h"
+ , "win32/mingw-compat.h"
+ , "win32/msvc-compat.h"
+ , "win32/path_w32.h"
+ , "win32/posix.h"
+ , "win32/precompiled.h"
+ , "win32/reparse.h"
+ , "win32/thread.h"
+ , "win32/utf-conv.h"
+ , "win32/version.h"
+ , "win32/w32_buffer.h"
+ , "win32/w32_common.h"
+ , "win32/w32_leakcheck.h"
+ , "win32/w32_util.h"
+ , "win32/win32-compat.h"
+ , ["include", "git2_public_headers"]
+ ]
+ }
+, "util_os_unix":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["OS", "THREADSAFE"]
+ , "name": ["util_os_unix"]
+ , "pure C": ["yes"]
+ , "srcs": ["unix/map.c", "unix/realpath.c"]
+ , "private-hdrs": ["util_private_headers"]
+ , "private-ldflags":
+ { "type": "++"
+ , "$1":
+ [ { "type": "if"
+ , "cond": {"type": "var", "name": "THREADSAFE"}
+ , "then": ["-lpthread"]
+ }
+ , { "type": "case"
+ , "expr": {"type": "var", "name": "OS"}
+ , "case":
+ { "solaris": ["-lsocket", "-lnsl"]
+ , "sunos": ["-lsocket", "-lnsl"]
+ , "haiku": ["-lnetwork"]
+ }
+ }
+ ]
+ }
+ }
+, "util_os_win32":
+ { "type": ["@", "rules", "CC", "library"]
+ , "name": ["util_os_win32"]
+ , "pure C": ["yes"]
+ , "srcs":
+ [ "win32/dir.c"
+ , "win32/error.c"
+ , "win32/findfile.c"
+ , "win32/map.c"
+ , "win32/path_w32.c"
+ , "win32/posix_w32.c"
+ , "win32/precompiled.c"
+ , "win32/thread.c"
+ , "win32/utf-conv.c"
+ , "win32/w32_buffer.c"
+ , "win32/w32_leakcheck.c"
+ , "win32/w32_util.c"
+ ]
+ , "private-hdrs": ["util_private_headers"]
+ , "private-ldflags": ["-lws2_32"]
+ }
+, "util_hash_collision_detection":
+ { "type": ["@", "rules", "CC", "library"]
+ , "name": ["util_hash_collision_detection"]
+ , "pure C": ["yes"]
+ , "private-defines":
+ [ "SHA1DC_NO_STANDARD_INCLUDES=1"
+ , "SHA1DC_CUSTOM_INCLUDE_SHA1_C=\"git2_util.h\""
+ , "SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=\"git2_util.h\""
+ ]
+ , "srcs":
+ ["hash/collisiondetect.c", "hash/sha1dc/sha1.c", "hash/sha1dc/ubc_check.c"]
+ , "private-hdrs": ["util_private_headers"]
+ }
+, "util_hash_openssl":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["USE_SYSTEM_LIBS"]
+ , "name": ["util_hash_openssl"]
+ , "pure C": ["yes"]
+ , "srcs": ["hash/openssl.c"]
+ , "private-hdrs": ["util_private_headers"]
+ , "private-ldflags":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": ["-lssl"]
+ }
+ , "deps":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": []
+ , "else": [["@", "ssl", "", "crypto"]]
+ }
+ }
+, "util_hash_common_crypto":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["USE_SYSTEM_LIBS"]
+ , "name": ["util_hash_common_crypto"]
+ , "pure C": ["yes"]
+ , "srcs": ["hash/common_crypto.c"]
+ , "private-hdrs": ["util_private_headers"]
+ , "private-ldflags":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": ["-lcommon_crypto"]
+ }
+ , "deps":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": []
+ , "else": [["@", "common_crypto", "", "crypto"]]
+ }
+ }
+, "util_hash_mbedtls":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["USE_SYSTEM_LIBS"]
+ , "name": ["util_hash_mbedtls"]
+ , "pure C": ["yes"]
+ , "srcs": ["hash/mbedtls.c"]
+ , "private-hdrs": ["util_private_headers"]
+ , "private-ldflags":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": ["-lmbedtls"]
+ }
+ , "deps":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": []
+ , "else": [["@", "mbedtls", "", "crypto"]]
+ }
+ }
+, "util_hash_win32":
+ { "type": ["@", "rules", "CC", "library"]
+ , "name": ["util_hash_win32"]
+ , "pure C": ["yes"]
+ , "srcs": ["hash/win32.c"]
+ , "private-hdrs": ["util_private_headers"]
+ }
+, "util_hash_builtin":
+ { "type": ["@", "rules", "CC", "library"]
+ , "name": ["util_hash_builtin"]
+ , "pure C": ["yes"]
+ , "srcs": ["hash/builtin.c", "hash/rfc6234/sha224-256.c"]
+ , "private-hdrs": ["util_private_headers"]
+ }
+, "util_os":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["OS"]
+ , "deps":
+ { "type": "if"
+ , "cond":
+ {"type": "==", "$1": {"type": "var", "name": "OS"}, "$2": "windows"}
+ , "then": ["util_os_win32"]
+ , "else": ["util_os_unix"]
+ }
+ }
+, "util_sha1":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["USE_SHA1"]
+ , "deps":
+ { "type": "case*"
+ , "expr": {"type": "var", "name": "USE_SHA1"}
+ , "case":
+ [ ["CollisionDetection", ["util_hash_collision_detection"]]
+ , ["OpenSSL", ["util_hash_openssl"]]
+ , ["CommonCrypto", ["util_hash_common_crypto"]]
+ , ["mbedTLS", ["util_hash_mbedtls"]]
+ , ["Win32", ["util_hash_win32"]]
+ , ["Generic", ["util_hash_generic"]]
+ ]
+ , "default":
+ {"type": "fail", "msg": "Asked for unknown SHA1 backend in `USE_SHA1`"}
+ }
+ }
+, "util_sha256":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["USE_SHA256"]
+ , "deps":
+ { "type": "case*"
+ , "expr": {"type": "var", "name": "USE_SHA256"}
+ , "case":
+ [ ["Builtin", ["util_hash_builtin"]]
+ , ["OpenSSL", ["util_hash_openssl"]]
+ , ["CommonCrypto", ["util_hash_common_crypto"]]
+ , ["mbedTLS", ["util_hash_mbedtls"]]
+ , ["Win32", ["util_hash_win32"]]
+ ]
+ , "default":
+ { "type": "fail"
+ , "msg": "Asked for unknown SHA256 backend in `USE_SHA256`"
+ }
+ }
+ }
+, "util_regex":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["USE_SYSTEM_LIBS", "REGEX_BACKEND"]
+ , "name": ["util_regex"]
+ , "private-ldflags":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then":
+ { "type": "case"
+ , "expr": {"type": "var", "name": "REGEX_BACKEND"}
+ , "case": {"pcre2": ["-lpcre2-8"], "pcre": ["-lpcre"]}
+ }
+ }
+ , "deps":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then":
+ { "type": "case*"
+ , "expr": {"type": "var", "name": "REGEX_BACKEND"}
+ , "case":
+ [ ["builtin", [["deps/pcre", "git2_pcre"]]]
+ , [null, [["deps/pcre", "git2_pcre"]]]
+ ]
+ }
+ , "else":
+ { "type": "case*"
+ , "expr": {"type": "var", "name": "REGEX_BACKEND"}
+ , "case":
+ [ ["pcre2", [["@", "pcre2", "", "pcre2"]]]
+ , ["pcre", [["@", "pcre", "", "pcre"]]]
+ , ["builtin", [["deps/pcre", "git2_pcre"]]]
+ , [null, [["deps/pcre", "git2_pcre"]]]
+ ]
+ }
+ }
+ }
+, "util_compress":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["USE_SYSTEM_LIBS", "USE_BUNDLED_ZLIB"]
+ , "name": ["util_compress"]
+ , "private-ldflags":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_BUNDLED_ZLIB"}
+ , "then": []
+ , "else":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": ["-lz"]
+ }
+ }
+ , "deps":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_BUNDLED_ZLIB"}
+ , "then":
+ {"type": "fail", "msg": "bundled zlib from deps/zlib not supported yet."}
+ , "else":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": []
+ , "else": [["@", "zlib", "", "zlib"]]
+ }
+ }
+ }
+, "util_ssh":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["USE_SYSTEM_LIBS", "USE_SSH"]
+ , "name": ["util_ssh"]
+ , "private-ldflags":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SSH"}
+ , "then":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": ["-lssh2"]
+ }
+ }
+ , "deps":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SSH"}
+ , "then":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": []
+ , "else": [["@", "ssh2", "", "ssh"]]
+ }
+ }
+ }
+, "util_http_parser":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["USE_SYSTEM_LIBS", "USE_HTTP_PARSER"]
+ , "name": ["util_http_parser"]
+ , "private-ldflags":
+ { "type": "case*"
+ , "expr": {"type": "var", "name": "USE_HTTP_PARSER"}
+ , "case":
+ [ [ "system"
+ , { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": ["-lhttp_parser"]
+ }
+ ]
+ ]
+ }
+ , "deps":
+ { "type": "case*"
+ , "expr": {"type": "var", "name": "USE_HTTP_PARSER"}
+ , "case":
+ [ [ "system"
+ , { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": []
+ , "else": [["@", "http_parser", "", "http_parser"]]
+ }
+ ]
+ ]
+ , "default": [["deps/http-parser", "git2_http_parser"]]
+ }
+ }
+, "util_gssapi":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["OS", "USE_SYSTEM_LIBS", "USE_GSSAPI"]
+ , "name": ["util_gssapi"]
+ , "private-ldflags":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then":
+ { "type": "case*"
+ , "expr": {"type": "var", "name": "USE_GSSAPI"}
+ , "case":
+ [ [ true
+ , { "type": "case*"
+ , "expr": {"type": "var", "name": "OS"}
+ , "case": [["darwin", ["-framework", "GSS"]]]
+ , "default": ["-lgssapi"]
+ }
+ ]
+ , ["gssapi", ["-lgssapi"]]
+ , ["GSS.framework", ["-framework", "GSS"]]
+ ]
+ }
+ }
+ , "deps":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": []
+ , "else":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_GSSAPI"}
+ , "then": [["@", "gssapi", "", "gssapi"]]
+ }
+ }
+ }
+, "util_https":
+ { "type": ["@", "rules", "CC", "library"]
+ , "arguments_config": ["OS", "USE_SYSTEM_LIBS", "USE_HTTPS"]
+ , "name": ["util_https"]
+ , "private-ldflags":
+ { "type": "case*"
+ , "expr": {"type": "var", "name": "USE_HTTPS"}
+ , "case": [["WinHTTP", ["-lwinhttp"]]]
+ , "default":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then":
+ { "type": "case*"
+ , "expr": {"type": "var", "name": "USE_HTTPS"}
+ , "case":
+ [ ["OpenSSL", ["-lssl"]]
+ , ["mbedTLS", ["-lmbedtls"]]
+ , [ "SecureTransport"
+ , ["-framework", "CoreFoundation", "-framework", "Security"]
+ ]
+ ]
+ }
+ }
+ }
+ , "deps":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"}
+ , "then": []
+ , "else":
+ { "type": "case*"
+ , "expr": {"type": "var", "name": "USE_HTTPS"}
+ , "case":
+ [ ["OpenSSL", [["@", "ssl", "", "ssl"]]]
+ , ["mbedTLS", [["@", "mbedtls", "", "ssl"]]]
+ , ["SecureTransport", [["@", "secure_transport", "", "ssl"]]]
+ ]
+ }
+ }
+ }
+, "util_sources":
+ { "type": ["@", "rules", "data", "staged"]
+ , "srcs":
+ [ "alloc.c"
+ , "date.c"
+ , "filebuf.c"
+ , "fs_path.c"
+ , "futils.c"
+ , "hash.c"
+ , "net.c"
+ , "pool.c"
+ , "posix.c"
+ , "pqueue.c"
+ , "rand.c"
+ , "regexp.c"
+ , "runtime.c"
+ , "sortedcache.c"
+ , "str.c"
+ , "strmap.c"
+ , "thread.c"
+ , "tsort.c"
+ , "utf8.c"
+ , "util.c"
+ , "varint.c"
+ , "vector.c"
+ , "wildmatch.c"
+ , "zstream.c"
+ , "allocators/failalloc.c"
+ , "allocators/stdalloc.c"
+ , "allocators/win32_leakcheck.c"
+ ]
+ }
+}
diff --git a/etc/patches/libgit2_v1.2.0_fix-proxy-settings.patch b/etc/patches/libgit2_v1.2.0_fix-proxy-settings.patch
deleted file mode 100644
index 775ba392..00000000
--- a/etc/patches/libgit2_v1.2.0_fix-proxy-settings.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 9488139554c486fd0691d4b90fb6aff479c0421d Mon Sep 17 00:00:00 2001
-From: Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com>
-Date: Mon, 23 Jan 2023 17:19:02 +0100
-Subject: [PATCH] Correct handling of no_proxy .gitconfig options to match git
- behavior
-
-Explicitly removing the need for a proxy for specific remotes in the
-.gitconfig file via
-~~~
-[http <URL>]
- proxy =
-~~~
-results in an `error code 12: malformed URL ''` error. Expected
-behavior is to treat remotes for which such .gitconfig entries exist
-the same as if no proxy settings have been found at all.
-
-This issue was found in libgit2 v1.2.0.
-
-This commit fixes the issue.
----
- src/remote.c | 18 ++++++++++++++++--
- 1 file changed, 16 insertions(+), 2 deletions(-)
-
-diff --git a/src/remote.c b/src/remote.c
-index 7dddea93a..6021c27d4 100644
---- a/src/remote.c
-+++ b/src/remote.c
-@@ -887,6 +887,7 @@ static int http_proxy_config(char **out, git_remote *remote, git_net_url *url)
- git_config *cfg;
- git_buf buf = GIT_BUF_INIT;
- git_net_url lookup_url = GIT_NET_URL_INIT;
-+ char *tmp_out = NULL;
- int error;
-
- if ((error = git_net_url_dup(&lookup_url, url)) < 0 ||
-@@ -898,8 +899,14 @@ static int http_proxy_config(char **out, git_remote *remote, git_net_url *url)
- git_buf_clear(&buf);
-
- if ((error = git_buf_printf(&buf, "remote.%s.proxy", remote->name)) < 0 ||
-- (error = lookup_config(out, cfg, buf.ptr)) != GIT_ENOTFOUND)
-+ (error = lookup_config(&tmp_out, cfg, buf.ptr)) != GIT_ENOTFOUND) {
-+ /* only non-empty entries should be passed as proxy url */
-+ if (!tmp_out || strcmp(tmp_out, "")) {
-+ *out = git__strdup(tmp_out);
-+ GIT_ERROR_CHECK_ALLOC(*out);
-+ }
- goto done;
-+ }
- }
-
- while (true) {
-@@ -908,8 +915,14 @@ static int http_proxy_config(char **out, git_remote *remote, git_net_url *url)
- if ((error = git_buf_puts(&buf, "http.")) < 0 ||
- (error = git_net_url_fmt(&buf, &lookup_url)) < 0 ||
- (error = git_buf_puts(&buf, ".proxy")) < 0 ||
-- (error = lookup_config(out, cfg, buf.ptr)) != GIT_ENOTFOUND)
-+ (error = lookup_config(&tmp_out, cfg, buf.ptr)) != GIT_ENOTFOUND) {
-+ /* only non-empty entries should be passed as proxy url */
-+ if (!tmp_out || strcmp(tmp_out, "")) {
-+ *out = git__strdup(tmp_out);
-+ GIT_ERROR_CHECK_ALLOC(*out);
-+ }
- goto done;
-+ }
-
- if (! lookup_url.path[0])
- break;
-@@ -924,6 +937,7 @@ static int http_proxy_config(char **out, git_remote *remote, git_net_url *url)
- done:
- git_buf_dispose(&buf);
- git_net_url_dispose(&lookup_url);
-+ git__free(tmp_out);
- return error;
- }
-
---
-2.30.2
-
diff --git a/etc/patches/libgit2_v1.2.0_fix-fake-repo.patch b/etc/patches/libgit2_v1.5.0_fix-fake-repo.patch
index 22490c12..0da7c1bd 100644
--- a/etc/patches/libgit2_v1.2.0_fix-fake-repo.patch
+++ b/etc/patches/libgit2_v1.5.0_fix-fake-repo.patch
@@ -1,4 +1,4 @@
-From 1a4497d0aa05b48c40d939713a48bdf78dfa29e9 Mon Sep 17 00:00:00 2001
+From 19711a9a2a557f24df34ad16046f3daffaeab0e8 Mon Sep 17 00:00:00 2001
From: Oliver Reiche <oliver.reiche@huawei.com>
Date: Wed, 3 Aug 2022 16:27:58 +0200
Subject: [PATCH] Do not register fake repository as owner of ODB
@@ -13,14 +13,14 @@ used to create fake repositories in other threads.
Consequently, operations on fake repositories will interact
with the ODB's cache instead of the repository's cache.
---
- include/git2/sys/repository.h | 3 ++-
- src/repository.c | 16 +++++++++-------
- tests/odb/backend/nobackend.c | 2 +-
- tests/repo/setters.c | 23 ++++++++++++++++++++++-
+ include/git2/sys/repository.h | 3 ++-
+ src/libgit2/repository.c | 16 +++++++++-------
+ tests/libgit2/odb/backend/nobackend.c | 2 +-
+ tests/libgit2/repo/setters.c | 23 ++++++++++++++++++++++-
4 files changed, 34 insertions(+), 10 deletions(-)
diff --git a/include/git2/sys/repository.h b/include/git2/sys/repository.h
-index 892be6692..33bc5051f 100644
+index 892be669266..33bc5051f31 100644
--- a/include/git2/sys/repository.h
+++ b/include/git2/sys/repository.h
@@ -97,9 +97,10 @@ GIT_EXTERN(int) git_repository_set_config(git_repository *repo, git_config *conf
@@ -32,17 +32,17 @@ index 892be6692..33bc5051f 100644
*/
-GIT_EXTERN(int) git_repository_set_odb(git_repository *repo, git_odb *odb);
+GIT_EXTERN(int) git_repository_set_odb(git_repository *repo, git_odb *odb, bool set_owner);
-
+
/**
* Set the Reference Database Backend for this repository
-diff --git a/src/repository.c b/src/repository.c
-index aae0c910b..13e1ca29e 100644
---- a/src/repository.c
-+++ b/src/repository.c
-@@ -86,10 +86,12 @@ git_buf git_repository__reserved_names_posix[] = {
+diff --git a/src/libgit2/repository.c b/src/libgit2/repository.c
+index df41f581c22..c31e5509edb 100644
+--- a/src/libgit2/repository.c
++++ b/src/libgit2/repository.c
+@@ -89,10 +89,12 @@ git_str git_repository__reserved_names_posix[] = {
};
size_t git_repository__reserved_names_posix_len = 1;
-
+
-static void set_odb(git_repository *repo, git_odb *odb)
+static void set_odb(git_repository *repo, git_odb *odb, bool set_owner)
{
@@ -53,70 +53,70 @@ index aae0c910b..13e1ca29e 100644
+ }
GIT_REFCOUNT_INC(odb);
}
-
-@@ -150,7 +152,7 @@ int git_repository__cleanup(git_repository *repo)
-
+
+@@ -153,7 +155,7 @@ int git_repository__cleanup(git_repository *repo)
+
set_config(repo, NULL);
set_index(repo, NULL);
- set_odb(repo, NULL);
+ set_odb(repo, NULL, /*set_owner=*/true);
set_refdb(repo, NULL);
-
+
return 0;
-@@ -762,7 +764,7 @@ static int _git_repository_open_ext_from_env(
+@@ -880,7 +882,7 @@ static int _git_repository_open_ext_from_env(
goto error;
-
+
if (odb)
- git_repository_set_odb(repo, odb);
+ git_repository_set_odb(repo, odb, /*set_owner=*/true);
-
+
error = git__getenv(&alts_buf, "GIT_ALTERNATE_OBJECT_DIRECTORIES");
if (error == GIT_ENOTFOUND) {
-@@ -973,7 +975,7 @@ int git_repository_wrap_odb(git_repository **repo_out, git_odb *odb)
+@@ -1098,7 +1100,7 @@ int git_repository_wrap_odb(git_repository **repo_out, git_odb *odb)
repo = repository_alloc();
GIT_ERROR_CHECK_ALLOC(repo);
-
+
- git_repository_set_odb(repo, odb);
+ git_repository_set_odb(repo, odb, /*set_owner=*/false);
*repo_out = repo;
-
+
return 0;
-@@ -1184,12 +1186,12 @@ int git_repository_odb(git_odb **out, git_repository *repo)
+@@ -1305,12 +1307,12 @@ int git_repository_odb(git_odb **out, git_repository *repo)
return 0;
}
-
+
-int git_repository_set_odb(git_repository *repo, git_odb *odb)
+int git_repository_set_odb(git_repository *repo, git_odb *odb, bool set_owner)
{
GIT_ASSERT_ARG(repo);
GIT_ASSERT_ARG(odb);
-
+
- set_odb(repo, odb);
+ set_odb(repo, odb, set_owner);
return 0;
}
-
-diff --git a/tests/odb/backend/nobackend.c b/tests/odb/backend/nobackend.c
-index 7484d423b..d46a7fed9 100644
---- a/tests/odb/backend/nobackend.c
-+++ b/tests/odb/backend/nobackend.c
-@@ -16,7 +16,7 @@ void test_odb_backend_nobackend__initialize(void)
+
+diff --git a/tests/libgit2/odb/backend/nobackend.c b/tests/libgit2/odb/backend/nobackend.c
+index 7d9394c6f33..4ba563223c4 100644
+--- a/tests/libgit2/odb/backend/nobackend.c
++++ b/tests/libgit2/odb/backend/nobackend.c
+@@ -17,7 +17,7 @@ void test_odb_backend_nobackend__initialize(void)
cl_git_pass(git_refdb_new(&refdb, _repo));
-
+
git_repository_set_config(_repo, config);
- git_repository_set_odb(_repo, odb);
+ git_repository_set_odb(_repo, odb, /*set_owner=*/true);
git_repository_set_refdb(_repo, refdb);
-
+
/* The set increases the refcount and we don't want them anymore */
-diff --git a/tests/repo/setters.c b/tests/repo/setters.c
-index 1fac627f6..e0e0d3696 100644
---- a/tests/repo/setters.c
-+++ b/tests/repo/setters.c
+diff --git a/tests/libgit2/repo/setters.c b/tests/libgit2/repo/setters.c
+index 66ec7706c2b..099a6fb3b3e 100644
+--- a/tests/libgit2/repo/setters.c
++++ b/tests/libgit2/repo/setters.c
@@ -94,7 +94,28 @@ void test_repo_setters__setting_a_new_odb_on_a_repo_which_already_loaded_one_pro
- cl_git_pass(git_odb_open(&new_odb, "./testrepo.git/objects"));
+ cl_git_pass(git_odb__open(&new_odb, "./testrepo.git/objects", NULL));
cl_assert(((git_refcount *)new_odb)->refcount.val == 1);
-
+
- git_repository_set_odb(repo, new_odb);
+ git_repository_set_odb(repo, new_odb, /*set_owner=*/true);
+ cl_assert(((git_refcount *)new_odb)->refcount.val == 2);
@@ -141,8 +141,5 @@ index 1fac627f6..e0e0d3696 100644
+
+ git_repository_set_odb(repo, new_odb, /*set_owner=*/false);
cl_assert(((git_refcount *)new_odb)->refcount.val == 2);
-
- git_repository_free(repo);
---
-2.30.2
+ git_repository_free(repo); \ No newline at end of file
diff --git a/etc/repos.json b/etc/repos.json
index a41f61d9..4724cb41 100644
--- a/etc/repos.json
+++ b/etc/repos.json
@@ -384,11 +384,11 @@
, "com_github_libgit2_libgit2":
{ "repository":
{ "type": "archive"
- , "content": "8e2e6a6faa3708b448ad891fbd3aa7673c65bcd2"
- , "fetch": "https://github.com/libgit2/libgit2/archive/refs/tags/v1.2.0.tar.gz"
- , "sha256": "701a5086a968a46f25e631941b99fc23e4755ca2c56f59371ce1d94b9a0cc643"
- , "sha512": "428188de153fdf8ff5bf78949f4a3a89fba57b87a8b641f92fed501df6a8cfdb72e0ffe0bf61a98adf210a2867134eb4421ea4b8d8219331aabc3daddd92f5fc"
- , "subdir": "libgit2-1.2.0"
+ , "content": "3673ddf85118955a7611a93968f9d1af35e7815c"
+ , "fetch": "https://github.com/libgit2/libgit2/archive/refs/tags/v1.5.0.tar.gz"
+ , "sha256": "8de872a0f201b33d9522b817c92e14edb4efad18dae95cf156cf240b2efff93e"
+ , "sha512": "7a32b27cd32bd03ce7be6c127317f82a4ac6f16615c3234699676781f4858d057edb0410b2fe36fd2e634b00748a8b0be17f23809e09a7602ba48185134300f7"
+ , "subdir": "libgit2-1.5.0"
}
, "target_root": "import targets"
, "target_file_name": "TARGETS.git2"