Log

Author Commit Date CI Message
Patrick Steinhardt 3956679c 2020-04-03T20:08:02 cmake: remove policies The `CMAKE_MINIUM_REQUIRE()` function not only sets up the minimum required CMake version of a project, but it will also at the same time set the CMake policy version. In effect this means that all policies that have been introduced before the minimum CMake version will be enabled automatically. When updating our minimum required version ebabb88f2 (cmake: update minimum CMake version to v3.5.1, 2019-10-10), we didn't remove any of the policies we've been manually enabling. The newest CMake policy we've been enabling is CMP0054, which was introduced back in CMake v3.1. As a result, we can now just remove all manual calls to `CMAKE_POLICY()`.
Patrick Steinhardt 2e7d4579 2020-04-03T19:59:39 cmake: remove option to add profiling flags We currently have an option that adds options for profiling to both our CFLAGS and LDFLAGS. Having such flags behind various build options is not really sensible at all, since users should instead set up those flags via environment variables supported by CMake itself. Let's remove this option.
Patrick Steinhardt bc02bcd9 2020-04-03T19:51:22 cmake: move modules into the "cmake/" top level dir Our custom CMake module currently live in "cmake/Modules". As the "cmake/" directory doesn't contain anything except the "Modules" directory, it doesn't really make sense to have the additional intermediate directory. So let's instead move the modules one level up into the "cmake/" top level directory.
Patrick Steinhardt 2551b1b0 2020-04-03T19:53:35 cmake: remove support for creating tags We currently have support for generating tags via ctags as part of our build system. We aren't really in the place of supporting any tooling that exists apart from the actual build environment, as doing so adds additional complexity and maintenance burden to our build instructions. This is in fact nicely demonstrated by this particular option, as it hasn't been working anymore since commit e5c9723d0 (cmake: move library build instructions into subdirectory, 2017-06-30). As a result, this commit removes support for building CTags
Patrick Steinhardt 172a2886 2020-06-01T14:04:15 Merge pull request #5529 from libgit2/ethomson/difftest diff::workdir: actually test the buffers
Patrick Steinhardt 1bbdf15d 2020-06-01T13:57:12 Merge pull request #5527 from libgit2/ethomson/config_unreadable Handle unreadable configuration files
Wil Shipley d1409f48 2020-05-06T19:57:07 config: ignore unreadable configuration files Modified `config_file_open()` so it returns 0 if the config file is not readable, which happens on global config files under macOS sandboxing (note that for some reason `access(F_OK)` DOES work with sandboxing, but it is lying). Without this read check sandboxed applications on macOS can not open any repository, because `config_file_read()` will return GIT_ERROR when it cannot read the global /Users/username/.gitconfig file, and the upper layers will just completely abort on GIT_ERROR when attempting to load the global config file, so no repositories can be opened.
Edward Thomson 9df69223 2020-05-23T11:42:19 config: test that unreadable files are treated as notfound
Patrick Steinhardt 89ddd0fc 2020-06-01T13:19:01 Merge pull request #5533 from pjw91/fix-index-write Make git_index_write() generate valid v4 index
Patrick Wang 1a899008 2020-05-26T20:36:13 tests: index::version: write v4 index: re-open repo to read written v4 index The `git_index_free()` merely decrement the reference counter from 2 to 1, and does not "free" the index. Thus, the following `git_repository_index()` merely increase the counter to 2, instead of read index from disk. The written index is not read and parsed, which makes this test case effectively becomes a no-op.
Patrick Wang 8c96d56d 2020-05-26T04:53:09 index: write v4: bugfix: prefix path with strip_len, not same_len According to index-format.txt of git, the path of an entry is prefixed with N, where N indicates the length of bytes to be stripped.
Edward Thomson 3414d470 2020-05-23T16:27:56 diff::workdir: actually test the buffers The static test data is erroneously initialized with a length of 0 for three of the strings. This means the tests are not actually examining those strings. Provide the length.
Edward Thomson 27cb4e0e 2020-05-23T11:02:07 Merge pull request #5522 from pks-t/pks/openssl-cert-memleak OpenSSL certificate memory leak
Edward Thomson e4bdba56 2020-05-23T09:57:22 Merge pull request #5515 from pks-t/pks/flaky-checkout-test tests: checkout: fix flaky test due to mtime race
Edward Thomson 3b7b4d27 2020-05-23T09:40:55 Merge pull request #5523 from libgit2/pks/cmake-sort-reproducible-builds cmake: Sort source files for reproducible builds
Edward Thomson f88e12db 2020-05-23T09:35:53 checkout::index: free the index
Patrick Steinhardt 3f201f75 2020-05-16T13:48:04 checkout: fix file being treated as unmodified due to racy index When trying to determine whether a file changed, we try to avoid heavy operations by fist taking a look at the index, seeing whether the index entry is modified already. This doesn't seem to cut it, though, as we currently have the racy checkout::index::can_disable_pathspec_match test case: sometimes the files get restored to their original contents, sometimes they aren't. The issue is caused by a racy index [1]: in case we modify a file, add it to the index and then modify it again in-place without changing its file, then we may end up with a modified file that has the same stat(3P) info as we've currently got it in its corresponding index entry. The mitigation for this is to treat files with the same mtime as the index are treated as racily modified. We already have this logic in place for the index, but not when doing a checkout. Fix the issue by only consulting the index entry in case it has an older mtime as the index. Previously, the following script reliably had at least 20 failures, while now there is no failure to be observed anymore: ```bash j=0 for i in $(seq 100) do if ! ./libgit2_clar -scheckout::index::can_disable_pathspec_match >/dev/null then j=$(($j + 1)) fi done echo "Failures: $j" ``` [1]: https://git-scm.com/docs/racy-git
Patrick Steinhardt 915f8860 2020-05-16T14:00:11 tests: checkout: fix stylistic issues and static variable The test case checkout::index::can_disable_pathspec_match has some shortcomings when it comes to coding style, which didn't fit our own coding style. Furthermore, it had an unnecessary static local variable. The test has been refactored to address these issues.
Patrick Steinhardt b85eefb4 2020-05-15T19:52:40 cmake: Sort source files for reproducible builds We currently use `FILE(GLOB ...)` in most places to find source and header files. This is problematic in that the order of files returned depends on the operating system's directory iteration order and may thus not be deterministic. As a result, we link object files in unspecified order, which may cause the linker to emit different code across runs. Fix this issue by sorting all code used as input to the libgit2 library to improve the reliability of reproducible builds.
Patrick Steinhardt b43a9e66 2020-05-15T17:46:24 streams: openssl: fix memleak due to us not free'ing certs When creating a `git_cert` from the OpenSSL X509 certificate of a given stream, we do not call `X509_free()` on the certificate, leading to a memory leak as soon as the certificate is requested e.g. by the certificate check callback. Fix the issue by properly calling `X509_free()`.
Edward Thomson b7b872f5 2020-05-12T22:39:27 Merge pull request #5517 from libgit2/pks/futils-symlink-args futils: fix order of declared parameters for `git_futils_fake_symlink`
Patrick Steinhardt a2eca682 2020-05-12T21:35:07 futils: fix order of declared parameters for `git_futils_fake_symlink` While the function `git_futils_fake_symlink` is declared with arguments `new, old`, the implementation uses the reverse order `old, new`. Let's fix the ordering issues to be `new, old` for both, which matches what symlink(3P) has. While at it, we also rename these parameters: `old` and `new` doesn't really make a lot of sense in the context of symlinks, which is why this commit renames them to be called `target` and `path`.
Patrick Steinhardt 3f90fcd6 2020-05-12T21:22:48 Merge pull request #5516 from suhaibmujahid/update-release Check the version in package.json
Suhaib Mujahid f1c1458c 2020-05-12T10:55:14 feat: Check the version in package.json
Edward Thomson 896abfc8 2020-05-12T11:14:10 Merge pull request #5513 from libgit2/pks/tests-fix-32-bit-formatter tests: merge: fix printf formatter on 32 bit arches
Patrick Steinhardt 0cf9b666 2020-05-12T11:41:44 tests: merge: fix printf formatter on 32 bit arches We currently use `PRIuMAX` to print an integer of type `size_t` in merge::trees::rename::cache_recomputation. While this works just fine on 64 bit arches, it doesn't on 32 bit ones. As a result, our nightly builds on x86 and arm32 fail. Fix the issue by using `PRIuZ` instead.
Edward Thomson 51a2bc43 2020-05-12T08:22:31 Merge pull request #5511 from suhaibmujahid/patch-1 Update package.json
Edward Thomson 045efb7b 2020-05-11T21:20:52 Merge pull request #5509 from libgit2/ethomson/assert_macros Introduce GIT_ASSERT macros
Edward Thomson 31ddf163 2020-05-11T21:06:42 Merge pull request #5512 from A-Ovchinnikov-mx/patch-1 README.md: Add instructions for building in MinGW environment
Edward Thomson abe2efe1 2019-12-09T12:37:34 Introduce GIT_ASSERT macros Provide macros to replace usages of `assert`. A true `assert` is punishing as a library. Instead we should do our best to not crash. GIT_ASSERT_ARG(x) will now assert that the given argument complies to some format and sets an error message and returns `-1` if it does not. GIT_ASSERT(x) is for internal usage, and available as an internal consistency check. It will set an error message and return `-1` in the event of failure.
Edward Thomson cbae1c21 2020-04-01T22:12:07 assert: allow non-int returning functions to assert Include GIT_ASSERT_WITH_RETVAL and GIT_ASSERT_ARG_WITH_RETVAL so that functions that do not return int (or more precisely, where `-1` would not be an error code) can assert. This allows functions that return, eg, NULL on an error code to do that by passing the return value (in this example, `NULL`) as a second parameter to the GIT_ASSERT_WITH_RETVAL functions.
Edward Thomson a95096ba 2020-01-12T10:31:07 assert: optionally fall-back to assert(3) Fall back to the system assert(3) in debug builds, which may aide in debugging. "Safe" assertions can be enabled in debug builds by setting GIT_ASSERT_HARD=0. Similarly, hard assertions can be enabled in release builds by setting GIT_ASSERT_HARD to nonzero.
A-Ovchinnikov-mx 4ad36338 2020-05-11T19:10:11 Update README.md Add instructions for building libgit2 in MinGW environment
Suhaib Mujahid 3453c3b1 2020-05-11T05:14:35 Update package.json
Edward Thomson b83bc6d4 2020-05-11T09:18:36 Merge pull request #5510 from phkelley/stash-to-index-crash Fix uninitialized stack memory and NULL ptr dereference in stash_to_index
Philip Kelley 56c95cf6 2020-05-10T21:43:38 Fix uninitialized stack memory and NULL ptr dereference in stash_to_index Caught by static analysis.
Segev Finer d62e44cb 2019-06-03T18:35:08 checkout: Fix removing untracked files by path in subdirectories The checkout code didn't iterate into a subdir if it didn't match the pathspec, but since the pathspec might match files in the subdir we should recurse into it (In contrast to gitignore handling). Fixes #5089
Edward Thomson 2a1d97e6 2020-05-11T00:09:18 Merge pull request #5378 from libgit2/ethomson/checkout_pathspecs Honor GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH for all checkout types
Edward Thomson 63de2128 2020-02-02T20:20:19 checkout: filter pathspecs for _all_ checkout types We were previously applying the pathspec filter for the baseline iterator during checkout, as well as the target tree. This was an oversight; in fact, we should apply the pathspec filter to _all_ checkout targets, not just trees. Add a helper function to set the iterator pathspecs from the given checkout pathspecs, and call it everywhere.
Edward Thomson 8731e1f4 2020-02-02T19:01:15 tests::checkout: only examine test10 and test11.txt The checkout::index::can_disable_pathspec_match test attempts to set a path filter of `test11.txt` and `test12.txt`, but then validates that `test10.txt` and `test11.txt` were left unmodified. Update the test's path filter to match the expectation.
Felix Lapalme 24bd12c4 2020-02-02T01:00:15 Create test case demonstrating checkout bug w/ pathspec match disabled
Edward Thomson 02d27f61 2020-05-10T23:42:43 Merge pull request #5482 from pks-t/pks/coding-style docs: add documentation for our coding style
Edward Thomson d08f72eb 2020-05-10T23:38:48 Merge pull request #5500 from phkelley/enable-control-flow-guard MSVC: Enable Control Flow Guard (CFG)
Edward Thomson 898caead 2020-05-10T19:03:10 Merge pull request #5431 from libgit2/ethomson/hexdump git__hexdump: better mimic `hexdump -C`
Philip Kelley 63f9fbee 2020-04-25T15:37:45 MSVC: Enable Control Flow Guard (CFG) This feature requires Visual Studio 2015 (MSVC_VERSION = 1900) or later. As the minimum required CMake version is currently less than 3.7, GREATER_EQUAL is not available to us and we must invert the result of the LESS operator.
Patrick Steinhardt 66137ff6 2020-04-19T12:08:24 Merge pull request #5383 from ognarb/feature/blame-ignore-whitespace Feature: Allow blame to ignore whitespace change
Carl Schwan 9830ab3d 2020-01-29T02:00:04 blame: add option to ignore whitespace changes
Edward Thomson 918a7d19 2020-04-14T12:26:36 Merge pull request #5487 from niacat/master deps: ntlmclient: use htobe64 on NetBSD too
Patrick Steinhardt ffb6a576 2020-04-04T14:36:27 docs: add documentation for our coding style For years, we've repeatedly had confusion about what our actual coding style is not only for newcomers, but also across the core contributors. This can mostly be attributed to the fact that we do not have any coding conventions written down. This is now a thing of the past with the introduction of a new document that gives an initial overview of our style and most important best practices for both our C codebase as well as for CMake. While the proposed coding style for our C codebase should be rather uncontroversial, the coding style for CMake might be. This can be attributed to multiple facts. First, the CMake code base doesn't really have any uniform coding style and is quite outdated in a lot of places. Second, the proposed coding style actually breaks with our existing one: we currently use all-uppercase function names and variables, but the documented coding style says we use all-lowercase function names but all-uppercase variables. It's common practice in CMake to write variables in all upper-case, and in fact all variables made available by CMake are exactly that. As variables are case-sensitive in CMake, we cannot and shouldn't break with this. In contrast, function calls are case insensitive, and modern CMake always uses all-lowercase ones. I argue we should do the same to get in line with other codebases and to reduce the likelihood of repetitive strain injuries. So especially for CMake, the proposed coding style says something we don't have yet. I'm fine with that, as the document explicitly says that it's what we want to have and not what we have right now.
nia 465e10ce 2020-04-05T18:33:14 deps: ntlmclient: use htobe64 on NetBSD too
Patrick Steinhardt e9b0cfc0 2020-04-05T13:24:13 Merge pull request #5485 from libgit2/ethomson/sysdir_unused sysdir: remove unused git_sysdir_get_str
Edward Thomson b6f18db9 2020-04-05T11:16:29 sysdir: remove unused git_sysdir_get_str
Patrick Steinhardt e56d48be 2020-04-05T12:07:17 Merge pull request #5483 from xSetech/master Fix typo causing removal of symbol 'git_worktree_prune_init_options'
Seth Junot ce2ab78f 2020-04-04T16:35:33 Fix typo causing removal of symbol 'git_worktree_prune_init_options' Commit 0b5ba0d replaced this function with an "option_init" equivallent, but misspelled the replacement function. As a result, this symbol has been missing from libgit2.so ever since.
Patrick Steinhardt ad341eb7 2020-04-04T13:40:14 Merge pull request #5425 from lhchavez/fix-get-delta-base pack: Improve error handling for get_delta_base()
Patrick Steinhardt 5a1ec7ab 2020-04-04T13:37:13 Merge pull request #5480 from libgit2/ethomson/coverity repo::open: ensure we can open the repository
Patrick Steinhardt 7d9b1f07 2020-04-04T13:36:24 Merge pull request #5421 from petersalomonsen/examples-fixes-and-additions examples: additions and fixes
Patrick Steinhardt 966db47d 2020-04-04T13:21:02 Merge pull request #5477 from pks-t/pks/rename-detection-negative-caches merge: cache negative cache results for similarity metrics
Edward Thomson cb0cfc5a 2020-04-03T09:17:52 repo::open: ensure we can open the repository Update the test cases to check the `git_repository_open` return code.
Peter Salomonsen dc2beb7e 2020-02-24T18:30:16 examples: additions and fixes add example for git commit fix example for git add add example for git push
lhchavez 4d4c8e0a 2020-04-02T07:34:55 Re-adding the "delta offset is zero" error case
Patrick Steinhardt dfd7fcc4 2020-04-02T13:26:13 Merge pull request #5388 from bk2204/repo-format-v1 Handle repository format v1
Patrick Steinhardt e1299171 2020-04-02T13:13:52 Merge pull request #5440 from pks-t/pks/cmake-streamlining CMake: backend selection streamlining
Edward Thomson b8eec0b2 2020-04-01T22:22:38 Merge pull request #5461 from pks-t/pks/refdb-fs-unused-header refdb_fs: remove unused header file
Edward Thomson 5d37128d 2020-03-01T10:34:15 git__hexdump: better mimic `hexdump -C`
lhchavez ba59a4a2 2020-04-01T12:34:16 Making get_delta_base() conform to the general error-handling pattern This makes get_delta_base() return the error code as the return value and the delta base as an out-parameter.
lhchavez f3273725 2020-02-25T20:58:09 pack: Improve error handling for get_delta_base() This change moves the responsibility of setting the error upon failures of get_delta_base() to get_delta_base() instead of its callers. That way, the caller chan always check if the return value is negative and mark the whole operation as an error instead of using garbage values, which can lead to crashes if the .pack files are malformed.
Edward Thomson 1c7fb212 2020-04-01T20:00:24 Merge pull request #5466 from pks-t/pks/patch-modechange-with-rename patch: correctly handle mode changes for renames
Edward Thomson 85533f37 2020-04-01T19:59:31 Merge pull request #5474 from pks-t/pks/gitignore-cleanup gitignore: clean up patterns from old times
Edward Thomson 2662da48 2020-04-01T18:03:39 Merge pull request #5478 from pks-t/pks/readme-ci-update README.md: update build matrix to reflect our latest releases
Patrick Steinhardt 541de515 2020-04-01T17:36:13 cmake: streamline backend detection We're currently doing unnecessary work to auto-detect backends even if the functionality is disabled altogether. Let's fix this by removing the extraneous FOO_BACKEND variables, instead letting auto-detection modify the variable itself.
Patrick Steinhardt 7a6c4122 2020-04-01T16:15:38 README.md: update build matrix to reflect our latest releases
Patrick Steinhardt 7d3c7057 2020-04-01T15:49:12 Merge pull request #5471 from pks-t/pks/v1.0 Release v1.0
Patrick Steinhardt 4dfcc50f 2020-04-01T15:16:18 merge: cache negative cache results for similarity metrics When computing renames, we cache the hash signatures for each of the potentially conflicting entries so that we do not need to repeatedly read the file and can at least halfway efficiently determine whether two files are similar enough to be deemed a rename. In order to make the hash signatures meaningful, we require at least four lines of data to be present, resulting in at least four different hashes that can be compared. Files that are deemed too small are not cached at all and will thus be repeatedly re-hashed, which is usually not a huge issue. The issue with above heuristic is in case a file does _not_ have at least four lines, where a line is anything separated by a consecutive run of "\n" or "\0" characters. For example "a\nb" is two lines, but "a\0\0b" is also just two lines. Taken to the extreme, a file that has megabytes of consecutive space- or NUL-only may also be deemed as too small and thus not get cached. As a result, we will repeatedly load its blob, calculate its hash signature just to finally throw it away as we notice it's not of any value. When you've got a comparitively big file that you compare against a big set of potentially renamed files, then the cost simply expodes. The issue can be trivially fixed by introducing negative cache entries. Whenever we determine that a given blob does not have a meaningful representation via a hash signature, we store this negative cache marker and will from then on not hash it again, but also ignore it as a potential rename target. This should help the "normal" case already where you have a lot of small files as rename candidates, but in the above scenario it's savings are extraordinarily high. To verify we do not hit the issue anymore with described solution, this commit adds a test that uses the exact same setup described above with one 50 megabyte blob of '\0' characters and 1000 other files that get renamed. Without the negative cache: $ time ./libgit2_clar -smerge::trees::renames::cache_recomputation >/dev/null real 11m48.377s user 11m11.576s sys 0m35.187s And with the negative cache: $ time ./libgit2_clar -smerge::trees::renames::cache_recomputation >/dev/null real 0m1.972s user 0m1.851s sys 0m0.118s So this represents a ~350-fold performance improvement, but it obviously depends on how many files you have and how big the blob is. The test number were chosen in a way that one will immediately notice as soon as the bug resurfaces.
Patrick Steinhardt 3f066a20 2020-03-30T12:31:11 gitignore: clean up patterns from old times The gitignore file currently has a lot of patterns for files that we shouldn't write anymore since we have migrated to CMake, as everybody is expected to do out-of-source builds anyway. Let's remove them.
Patrick Steinhardt 274b2a01 2020-03-28T10:29:13 version.h: bump version to v1.0.0
Patrick Steinhardt f79027bd 2020-03-28T10:28:36 docs: update changelog for v1.0
Patrick Steinhardt 5f47cb48 2020-03-26T14:16:41 patch: correctly handle mode changes for renames When generating a patch for a renamed file whose mode bits have changed in addition to the rename, then we currently fail to parse the generated patch. Furthermore, when generating a diff we output mode bits after the similarity metric, which is different to how upstream git handles it. Fix both issues by adding another state transition that allows similarity indices after mode changes and by printing mode changes before the similarity index.
Patrick Steinhardt ca782c91 2020-03-26T13:57:31 Merge pull request #5464 from pks-t/pks/refdb-backend-docs refdb_backend: improve callback documentation
Patrick Steinhardt 9a490318 2020-03-26T13:55:05 Merge pull request #5465 from libgit2/ethomson/cred_deprecation credentials: provide backcompat for opaque structs
Edward Thomson fad840d7 2020-03-26T12:03:28 credentials: provide backcompat for opaque structs The credential structures are now opaque and defined in `sys/credential.h`. However, we should continue to provide them for backward compatibility, unless `GIT_DEPRECATED_HARD` is set.
Edward Thomson bba9599a 2020-03-26T11:56:10 Merge pull request #5445 from lhchavez/fix-5443 Fix segfault when calling git_blame_buffer()
Patrick Steinhardt 3bbbe95a 2020-03-26T09:41:09 refdb_backend: improve callback documentation The callbacks are currently sparsely documented, making it really hard to implement a new backend without taking a look at the existing refdb_fs backend. Add documentation to make this task hopefully easier to achieve.
Patrick Steinhardt 9d5016dc 2020-03-26T08:31:42 Merge pull request #5463 from utkarsh2102/spell-fix Fix spelling error
Utkarsh Gupta e7a1fd88 2020-03-26T11:42:47 Fix spelling error Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
Patrick Steinhardt 74e0489a 2020-03-24T19:42:10 refdb_fs: remove unused header file The "refdb_fs.h" header contains a single struct `git_refcache` that is not used anywhere. As a result, we can just delete the header altogether as it doesn't have any purpose and may confuse readers.
lhchavez 62d59467 2020-03-08T02:13:11 Fix segfault when calling git_blame_buffer() This change makes sure that the hunk is not null before trying to dereference it. This avoids segfaults, especially when blaming against a modified buffer (i.e. the index). Fixes: #5443
Edward Thomson dd435711 2020-03-23T10:41:34 Merge pull request #5456 from pks-t/pks/refdb-fs-backend-version refdb_fs: initialize backend version
Edward Thomson 43fb0c29 2020-03-23T10:20:46 Merge pull request #5444 from josharian/issue5428 repository: improve commondir docs
Patrick Steinhardt a2d3316a 2020-03-13T23:01:11 refdb_fs: initialize backend version While the `git_refdb_backend()` struct has a version, we do not initialize it correctly when calling `git_refdb_backend_fs()`. Fix this by adding the call to `git_refdb_init_backend()`.
Edward Thomson 9a102446 2020-03-21T16:49:44 Merge pull request #5455 from pks-t/pks/cmake-install-dirs cmake: use install directories provided via GNUInstallDirs
Edward Thomson 44372ce5 2020-03-18T14:36:04 Merge pull request #5451 from pks-t/pks/docker-curl azure: fix errors due to curl and removal of old VM images
Edward Thomson 153199ae 2020-03-17T09:42:41 ci: don't use --insecure mbedTLS has fixed their certificate. 🎉
Patrick Steinhardt 87fc539f 2020-03-13T22:08:19 cmake: use install directories provided via GNUInstallDirs We currently hand-code logic to configure where to install our artifacts via the `LIB_INSTALL_DIR`, `INCLUDE_INSTALL_DIR` and `BIN_INSTALL_DIR` variables. This is reinventing the wheel, as CMake already provide a way to do that via `CMAKE_INSTALL_<DIR>` paths, e.g. `CMAKE_INSTALL_LIB`. This requires users of libgit2 to know about the discrepancy and will require special hacks for any build systems that handle these variables in an automated way. One such example is Gentoo Linux, which sets up these paths in both the cmake and cmake-utils eclass. So let's stop doing that: the GNUInstallDirs module handles it in a better way for us, especially so as the actual values are dependent on CMAKE_INSTALL_PREFIX. This commit removes our own set of variables and instead refers users to use the standard ones. As a second benefit, this commit also fixes our pkgconfig generation to use the GNUInstallDirs module. We had a bug there where we ignored the CMAKE_INSTALL_PREFIX when configuring the libdir and includedir keys, so if libdir was set to "lib64", then libdir would be an invalid path. With GNUInstallDirs, we can now use `CMAKE_INSTALL_FULL_LIBDIR`, which handles the prefix for us.
Patrick Steinhardt 8621bdda 2020-03-13T22:42:51 azure: docker: use insecure flag to fix curl downloads We currently hve some problems with our curl downloads when building Docker images. It's not quite obvious what the problem is and they seem to occur semi-randomly. To unblock our CI, let's add the "--insecure" flag to curl to ignore any certificate errors. This is intended as a temporary solution only.
Patrick Steinhardt 95f329b4 2020-03-10T21:07:34 azure: upgrade to newer hosted VM images Azure is phasing out old images on March 23rd 2020, but we're currently still using them. So let's upgrade images as following: - Ubuntu 16.04 -> ubuntu-18.04 - macOS 10.13 -> macOS-10.15 - Hosted Windows machines -> vs2017-win2016 Each of them is currently the latest version. As the new Microsoft Windows machine has upgraded to MSVS2017, we need to also adjust our CMake generators to "Visual Studio 15 2017". As this CMake generator doesn't accept the target platform name anymore, we instead need to set it up via either "-A Win32" or "-A x64". [1]: https://devblogs.microsoft.com/devops/removing-older-images-in-azure-pipelines-hosted-pools/
Patrick Steinhardt 5ac33ced 2020-03-10T21:39:39 azure: docurium: fix build failure due to bumped CMake requirements Our Docurium builds currently depend on Debian Jessie, which has CMake v3.0 available. As rugged has bumped its CMake requirements to need at least v3.5 now, the documentation build is thus failing. Fix this by converting our Docurium Docker image to be based on Ubuntu Bionic. We already do base all of our images on Ubuntu, so I don't see any sense in using Debian here. If this was only to speed up builds, we should just go all the way and use some minimal container like Alpine anyway. Also remove cache busters. As we're rebuilding the image every time, it's we really don't need them at all.
Patrick Steinhardt c76c1e87 2020-03-10T20:39:09 azure: docker: consistently silence curl but show errors We currently pass the "--silent" flag to most invocations of curl, but in fact this does not only suppress the progress meter, but also any errors. So let's also pass "--show-error", too.
Patrick Steinhardt f2e43a87 2020-03-10T22:21:20 ntlmclient: silence deprecation warnings for CommonCrypto backend The `CC_MD4()` function has been deprecated in macOS 10.15. Silence this warning for now until we implement a proper fix.
Patrick Steinhardt b1f6481f 2020-03-10T22:07:35 cmake: ignore deprecation notes for Secure Transport The Secure Transport interface we're currently using has been deprecated with macOS 10.15. As we're currently in code freeze, we cannot migrate to newer interfaces. As such, let's disable deprecation warnings for our "schannel.c" stream.