Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: cargo

cargo (0.39.0+really0.39.0-0ubuntu1) focal; urgency=medium * Restore Cargo 0.39 now that the rustc update is done. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 13 Nov 2019 22:49:40 +1300 cargo (0.39.0+really0.38.0-0ubuntu1) focal; urgency=medium * Re-upload Cargo 0.38 as Cargo 0.39 blocks the bootstrap of rustc 1.38. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Tue, 12 Nov 2019 14:01:50 +1300 cargo (0.39.0-0ubuntu1) focal; urgency=medium * New upstream release. * d/patches/2001_more_portable_rustflags.patch: Delete, applied upstream. * Refresh other patches. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Tue, 29 Oct 2019 21:09:18 +1300 cargo (0.38.0-0ubuntu1) focal; urgency=medium * New upstream release. * d/patches/0001-Don-t-fail-if-we-can-t-acquire-readonly-lock.patch, d/patches/1001_vendor_serde_atomic-compat.patch: remove, applied upstream * Refresh other patches. * Embed libgit2 at the commit bundled by libgit2 0.8.2 (e3adc99), as it depends on a newer version than that found in Ubuntu today, with some binary test-only files removed. - add debian/libgit2 - update debian/control - update debian/copyright - update debian/rules - update debian/README.source * Hack the libgit2-sys build process to link the bundled libgit2 against the system's libhttp_parser. - add debian/patches/use-system-libhttp-parser.patch - update debian/patches/series * Cherry pick fixes to tests for compatibility with toml 0.5.3. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Fri, 25 Oct 2019 21:45:58 +1300 cargo (0.37.0-3ubuntu2) eoan; urgency=medium * Backport fix causing build failures when $HOME was not writable. - add debian/patches/0001-Don-t-fail-if-we-can-t-acquire-readonly-lock.patch - update debian/patches/series -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Tue, 27 Aug 2019 20:33:21 +1200 cargo (0.37.0-3ubuntu1) eoan; urgency=medium * Merge from Debian unstable. Remaining changes: - Don't use the bootstrap.py script for bootstrapping as it no longer works. - remove debian/bootstrap.py - update debian/make_orig_multi.sh - Disable fetch tests on non x86/x86-64 architectures, as those hit an unreachable!() in test code. Disable the Debian patch that disables these tests on every architecture - add debian/patches/disable-fetch-tests-on-non-x86.patch - update debian/patches/series - Disable test tool_paths::custom_runner which fails every now and again because of a libstd bug (https://github.com/rust-lang/rust/issues/55242) - add debian/patches/disable-tool_paths-custom_runner.patch - update debian/patches/series - Disable the large_conflict_cache test on non-x86 - add debian/patches/disable-large_conflict_cache-test-on-non-x86.patch - update debian/patches/series -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Sat, 17 Aug 2019 13:57:21 +1200

Modifications :
  1. Download patch debian/libgit2/azure-pipelines/setup-osx.sh

    --- 0.37.0-3/debian/libgit2/azure-pipelines/setup-osx.sh 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/azure-pipelines/setup-osx.sh 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,8 @@ +#!/bin/sh + +set -x + +brew update +brew install pkgconfig zlib curl openssl libssh2 ninja + +ln -s /Applications/Xcode.app/Contents/Developer/usr/lib/libLeaksAtExit.dylib /usr/local/lib
  2. Download patch crates/resolver-tests/Cargo.toml

    --- 0.37.0-3/crates/resolver-tests/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/crates/resolver-tests/Cargo.toml 2019-08-20 17:39:12.000000000 +0000 @@ -0,0 +1,12 @@ +[package] +name = "resolver-tests" +version = "0.1.0" +authors = ["Alex Crichton <alex@alexcrichton.com>"] +edition = "2018" + +[dependencies] +cargo = { path = "../.." } +proptest = "0.9.1" +lazy_static = "1.3.0" +varisat = "0.2.1" +atty = "0.2.11"
  3. Download patch debian/libgit2/deps/ntlmclient/unicode_builtin.c
  4. Download patch debian/libgit2/cmake/Modules/IdeSplitSources.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/IdeSplitSources.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/IdeSplitSources.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,22 @@ +# This function splits the sources files up into their appropriate +# subdirectories. This is especially useful for IDEs like Xcode and +# Visual Studio, so that you can navigate into the libgit2_clar project, +# and see the folders within the tests folder (instead of just seeing all +# source and tests in a single folder.) +FUNCTION(IDE_SPLIT_SOURCES target) + IF(MSVC_IDE OR CMAKE_GENERATOR STREQUAL Xcode) + GET_TARGET_PROPERTY(sources ${target} SOURCES) + FOREACH(source ${sources}) + IF(source MATCHES ".*/") + STRING(REPLACE ${libgit2_SOURCE_DIR}/ "" rel ${source}) + IF(rel) + STRING(REGEX REPLACE "/([^/]*)$" "" rel ${rel}) + IF(rel) + STRING(REPLACE "/" "\\\\" rel ${rel}) + SOURCE_GROUP(${rel} FILES ${source}) + ENDIF() + ENDIF() + ENDIF() + ENDFOREACH() + ENDIF() +ENDFUNCTION()
  5. Download patch debian/libgit2/azure-pipelines/coverity.yml

    --- 0.37.0-3/debian/libgit2/azure-pipelines/coverity.yml 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/azure-pipelines/coverity.yml 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,36 @@ +resources: +- repo: self + +jobs: +- job: coverity + displayName: 'Coverity' + pool: + vmImage: 'Ubuntu 16.04' + steps: + - task: Docker@0 + displayName: Build + inputs: + action: 'Run an image' + imageName: 'libgit2/trusty-openssl:latest' + volumes: | + $(Build.SourcesDirectory):/src + $(Build.BinariesDirectory):/build + envVars: | + COVERITY_TOKEN=$(COVERITY_TOKEN) + workDir: '/build' + containerCommand: '/src/azure-pipelines/coverity-build.sh' + detached: false + - task: Docker@0 + displayName: Publish + inputs: + action: 'Run an image' + imageName: 'libgit2/trusty-openssl:latest' + volumes: | + $(Build.SourcesDirectory):/src + $(Build.BinariesDirectory):/build + envVars: | + COVERITY_TOKEN=$(COVERITY_TOKEN) + workDir: '/build' + containerCommand: '/src/azure-pipelines/coverity-publish.sh' + detached: false + continueOnError: true
  6. Download patch debian/libgit2/deps/pcre/pcre_printint.c
  7. Download patch debian/libgit2/deps/ntlmclient/unicode.h

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/unicode.h 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/unicode.h 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,36 @@ +/* + * Copyright (c) Edward Thomson. All rights reserved. + * + * This file is part of ntlmclient, distributed under the MIT license. + * For full terms and copyright information, and for third-party + * copyright information, see the included LICENSE.txt file. + */ + +#ifndef PRIVATE_UNICODE_H__ +#define PRIVATE_UNICODE_H__ + +#include "compat.h" + +#define NTLM_UNICODE_MAX_LEN 2048 + +typedef struct ntlm_unicode_ctx ntlm_unicode_ctx; + +extern ntlm_unicode_ctx *ntlm_unicode_ctx_init(ntlm_client *ntlm); + +bool ntlm_unicode_utf8_to_16( + char **converted, + size_t *converted_len, + ntlm_unicode_ctx *ctx, + const char *string, + size_t string_len); + +bool ntlm_unicode_utf16_to_8( + char **converted, + size_t *converted_len, + ntlm_unicode_ctx *ctx, + const char *string, + size_t string_len); + +extern void ntlm_unicode_ctx_free(ntlm_unicode_ctx *ctx); + +#endif /* PRIVATE_UNICODE_H__ */
  8. Download patch debian/libgit2/cmake/Modules/CheckPrototypeDefinition.c.in

    --- 0.37.0-3/debian/libgit2/cmake/Modules/CheckPrototypeDefinition.c.in 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/CheckPrototypeDefinition.c.in 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,29 @@ +@CHECK_PROTOTYPE_DEFINITION_HEADER@ + +static void cmakeRequireSymbol(int dummy, ...) { + (void) dummy; +} + +static void checkSymbol(void) { +#ifndef @CHECK_PROTOTYPE_DEFINITION_SYMBOL@ + cmakeRequireSymbol(0, &@CHECK_PROTOTYPE_DEFINITION_SYMBOL@); +#endif +} + +@CHECK_PROTOTYPE_DEFINITION_PROTO@ { + return @CHECK_PROTOTYPE_DEFINITION_RETURN@; +} + +#ifdef __CLASSIC_C__ +int main() { + int ac; + char*av[]; +#else +int main(int ac, char *av[]) { +#endif + checkSymbol(); + if (ac > 1000) { + return *av[0]; + } + return 0; +}
  9. Download patch debian/libgit2/deps/pcre/pcre_get.c
  10. Download patch debian/libgit2/cmake/Modules/FindCoreFoundation.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/FindCoreFoundation.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/FindCoreFoundation.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,26 @@ +# Find CoreFoundation.framework +# This will define : +# +# COREFOUNDATION_FOUND +# COREFOUNDATION_LIBRARIES +# COREFOUNDATION_LDFLAGS +# + +FIND_PATH(COREFOUNDATION_INCLUDE_DIR NAMES CoreFoundation.h) +FIND_LIBRARY(COREFOUNDATION_LIBRARIES NAMES CoreFoundation) +IF (COREFOUNDATION_INCLUDE_DIR AND COREFOUNDATION_LIBRARIES) + IF (NOT CoreFoundation_FIND_QUIETLY) + MESSAGE("-- Found CoreFoundation ${COREFOUNDATION_LIBRARIES}") + ENDIF() + SET(COREFOUNDATION_FOUND TRUE) + SET(COREFOUNDATION_LDFLAGS "-framework CoreFoundation") +ENDIF () + +IF (CoreFoundation_FIND_REQUIRED AND NOT COREFOUNDATION_FOUND) + MESSAGE(FATAL "-- CoreFoundation not found") +ENDIF() + +MARK_AS_ADVANCED( + COREFOUNDATION_INCLUDE_DIR + COREFOUNDATION_LIBRARIES +)
  11. Download patch Cargo.toml

    --- 0.37.0-3/Cargo.toml 2019-05-15 19:48:47.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/Cargo.toml 2019-08-20 17:39:12.000000000 +0000 @@ -1,6 +1,6 @@ [package] name = "cargo" -version = "0.37.0" +version = "0.39.0" edition = "2018" authors = ["Yehuda Katz <wycats@gmail.com>", "Carl Lerche <me@carllerche.com>", @@ -19,9 +19,8 @@ path = "src/cargo/lib.rs" [dependencies] atty = "0.2" -byteorder = "1.2" bytesize = "1.0" -crates-io = { path = "src/crates-io", version = "0.25" } +crates-io = { path = "crates/crates-io", version = "0.27" } crossbeam-utils = "0.6" crypto-hash = "0.3.1" curl = { version = "0.4.21", features = ['http2'] } @@ -32,8 +31,8 @@ failure = "0.1.5" filetime = "0.2" flate2 = { version = "1.0.3", features = ['zlib'] } fs2 = "0.4" -git2 = "0.8.0" -git2-curl = "0.9.0" +git2 = "0.9.2" +git2-curl = "0.10.1" glob = "0.3.0" hex = "0.3" home = "0.3" @@ -43,28 +42,30 @@ jobserver = "0.1.13" lazycell = "1.2.0" libc = "0.2" log = "0.4.6" -libgit2-sys = "0.7.9" +libgit2-sys = "0.8.2" memchr = "2.1.3" num_cpus = "1.0" opener = "0.4" -rustfix = "0.4.4" +percent-encoding = "2.0" +remove_dir_all = "0.5.2" +rustfix = "0.4.6" same-file = "1" semver = { version = "0.9.0", features = ["serde"] } serde = { version = "1.0.82", features = ['derive'] } serde_ignored = "0.0.4" serde_json = { version = "1.0.30", features = ["raw_value"] } shell-escape = "0.1.4" +strip-ansi-escapes = "0.1.0" tar = { version = "0.4.18", default-features = false } tempfile = "3.0" termcolor = "1.0" toml = "0.5.0" -url = "1.1" -url_serde = "0.2.0" +url = { version = "2.0", features = ['serde'] } walkdir = "2.2" clap = "2.31.2" unicode-width = "0.1.5" openssl = { version = '0.10.11', optional = true } -im-rc = "12.1.0" +im-rc = "13.0.0" # A noop dependency that changes in the Rust repository, it's a bit of a hack. # See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust` @@ -100,8 +101,7 @@ features = [ ] [dev-dependencies] -bufstream = "0.1" -proptest = "0.9.1" +cargo-test-macro = { path = "crates/cargo-test-macro", version = "0.1.0" } [[bin]] name = "cargo"
  12. Download patch debian/libgit2/cmake/Modules/SelectHTTPSBackend.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/SelectHTTPSBackend.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/SelectHTTPSBackend.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,126 @@ +# Select the backend to use + +# We try to find any packages our backends might use +FIND_PACKAGE(OpenSSL) +FIND_PACKAGE(mbedTLS) +IF (CMAKE_SYSTEM_NAME MATCHES "Darwin") + FIND_PACKAGE(Security) + FIND_PACKAGE(CoreFoundation) +ENDIF() + +# Auto-select TLS backend +IF (USE_HTTPS STREQUAL ON) + message(ON) + IF (SECURITY_FOUND) + IF (SECURITY_HAS_SSLCREATECONTEXT) + SET(HTTPS_BACKEND "SecureTransport") + ELSE() + MESSAGE("-- Security framework is too old, falling back to OpenSSL") + SET(HTTPS_BACKEND "OpenSSL") + ENDIF() + ELSEIF (WINHTTP) + SET(HTTPS_BACKEND "WinHTTP") + ELSEIF(OPENSSL_FOUND) + SET(HTTPS_BACKEND "OpenSSL") + ELSEIF(MBEDTLS_FOUND) + SET(HTTPS_BACKEND "mbedTLS") + ELSE() + MESSAGE(FATAL_ERROR "Unable to autodetect a usable HTTPS backend." + "Please pass the backend name explicitly (-DUSE_HTTPS=backend)") + ENDIF() +ELSEIF(USE_HTTPS) + message(expl) + # HTTPS backend was explicitly set + SET(HTTPS_BACKEND ${USE_HTTPS}) +ELSE() + SET(HTTPS_BACKEND NO) +ENDIF() + +IF(HTTPS_BACKEND) + # Check that we can find what's required for the selected backend + IF (HTTPS_BACKEND STREQUAL "SecureTransport") + IF (NOT COREFOUNDATION_FOUND) + MESSAGE(FATAL_ERROR "Cannot use SecureTransport backend, CoreFoundation.framework not found") + ENDIF() + IF (NOT SECURITY_FOUND) + MESSAGE(FATAL_ERROR "Cannot use SecureTransport backend, Security.framework not found") + ENDIF() + IF (NOT SECURITY_HAS_SSLCREATECONTEXT) + MESSAGE(FATAL_ERROR "Cannot use SecureTransport backend, SSLCreateContext not supported") + ENDIF() + + SET(GIT_SECURE_TRANSPORT 1) + LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${SECURITY_INCLUDE_DIR}) + LIST(APPEND LIBGIT2_LIBS ${COREFOUNDATION_LIBRARIES} ${SECURITY_LIBRARIES}) + LIST(APPEND LIBGIT2_PC_LIBS ${COREFOUNDATION_LDFLAGS} ${SECURITY_LDFLAGS}) + ELSEIF (HTTPS_BACKEND STREQUAL "OpenSSL") + IF (NOT OPENSSL_FOUND) + MESSAGE(FATAL_ERROR "Asked for OpenSSL TLS backend, but it wasn't found") + ENDIF() + + SET(GIT_OPENSSL 1) + LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${OPENSSL_INCLUDE_DIR}) + LIST(APPEND LIBGIT2_LIBS ${OPENSSL_LIBRARIES}) + LIST(APPEND LIBGIT2_PC_LIBS ${OPENSSL_LDFLAGS}) + LIST(APPEND LIBGIT2_PC_REQUIRES "openssl") + ELSEIF(HTTPS_BACKEND STREQUAL "mbedTLS") + IF (NOT MBEDTLS_FOUND) + MESSAGE(FATAL_ERROR "Asked for mbedTLS backend, but it wasn't found") + ENDIF() + + IF(NOT CERT_LOCATION) + MESSAGE("Auto-detecting default certificates location") + IF(CMAKE_SYSTEM_NAME MATCHES Darwin) + # Check for an Homebrew installation + SET(OPENSSL_CMD "/usr/local/opt/openssl/bin/openssl") + ELSE() + SET(OPENSSL_CMD "openssl") + ENDIF() + EXECUTE_PROCESS(COMMAND ${OPENSSL_CMD} version -d OUTPUT_VARIABLE OPENSSL_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) + IF(OPENSSL_DIR) + STRING(REGEX REPLACE "^OPENSSLDIR: \"(.*)\"$" "\\1/" OPENSSL_DIR ${OPENSSL_DIR}) + + SET(OPENSSL_CA_LOCATIONS + "ca-bundle.pem" # OpenSUSE Leap 42.1 + "cert.pem" # Ubuntu 14.04, FreeBSD + "certs/ca-certificates.crt" # Ubuntu 16.04 + "certs/ca.pem" # Debian 7 + ) + FOREACH(SUFFIX IN LISTS OPENSSL_CA_LOCATIONS) + SET(LOC "${OPENSSL_DIR}${SUFFIX}") + IF(NOT CERT_LOCATION AND EXISTS "${OPENSSL_DIR}${SUFFIX}") + SET(CERT_LOCATION ${LOC}) + ENDIF() + ENDFOREACH() + ELSE() + MESSAGE("Unable to find OpenSSL executable. Please provide default certificate location via CERT_LOCATION") + ENDIF() + ENDIF() + + IF(CERT_LOCATION) + IF(NOT EXISTS ${CERT_LOCATION}) + MESSAGE(FATAL_ERROR "Cannot use CERT_LOCATION=${CERT_LOCATION} as it doesn't exist") + ENDIF() + ADD_FEATURE_INFO(CERT_LOCATION ON "using certificates from ${CERT_LOCATION}") + ADD_DEFINITIONS(-DGIT_DEFAULT_CERT_LOCATION="${CERT_LOCATION}") + ENDIF() + + SET(GIT_MBEDTLS 1) + LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${MBEDTLS_INCLUDE_DIR}) + LIST(APPEND LIBGIT2_LIBS ${MBEDTLS_LIBRARIES}) + # mbedTLS has no pkgconfig file, hence we can't require it + # https://github.com/ARMmbed/mbedtls/issues/228 + # For now, pass its link flags as our own + LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES}) + ELSEIF (HTTPS_BACKEND STREQUAL "WinHTTP") + # WinHTTP setup was handled in the WinHTTP-specific block above + ELSE() + MESSAGE(FATAL_ERROR "Asked for backend ${HTTPS_BACKEND} but it wasn't found") + ENDIF() + + SET(GIT_HTTPS 1) + ADD_FEATURE_INFO(HTTPS GIT_HTTPS "using ${HTTPS_BACKEND}") +ELSE() + SET(GIT_HTTPS 0) + ADD_FEATURE_INFO(HTTPS NO "") +ENDIF()
  13. Download patch debian/libgit2/cmake/Modules/FindPkgLibraries.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/FindPkgLibraries.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/FindPkgLibraries.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,28 @@ +INCLUDE(FindPkgConfig) + +# This function will find and set up a pkg-config based module. +# If a pc-file was found, it will resolve library paths to +# absolute paths. Furthermore, the function will automatically +# fall back to use static libraries in case no dynamic libraries +# were found. +FUNCTION(FIND_PKGLIBRARIES prefix package) + PKG_CHECK_MODULES(${prefix} ${package}) + IF(NOT ${prefix}_FOUND) + RETURN() + ENDIF() + + FOREACH(LIBRARY ${${prefix}_LIBRARIES}) + FIND_LIBRARY(${LIBRARY}_RESOLVED ${LIBRARY} PATHS ${${prefix}_LIBRARY_DIRS}) + IF(${${LIBRARY}_RESOLVED} STREQUAL "${LIBRARY}_RESOLVED-NOTFOUND") + MESSAGE(FATAL_ERROR "could not resolve ${LIBRARY}") + ENDIF() + LIST(APPEND RESOLVED_LIBRARIES ${${LIBRARY}_RESOLVED}) + ENDFOREACH(LIBRARY) + + SET(${prefix}_FOUND 1 PARENT_SCOPE) + SET(${prefix}_LIBRARIES ${RESOLVED_LIBRARIES} PARENT_SCOPE) + SET(${prefix}_INCLUDE_DIRS ${${prefix}_INCLUDE_DIRS} PARENT_SCOPE) + SET(${prefix}_LDFLAGS ${${prefix}_LDFLAGS} PARENT_SCOPE) + + MESSAGE(STATUS " Resolved libraries: ${RESOLVED_LIBRARIES}") +ENDFUNCTION()
  14. Download patch debian/libgit2/cmake/Modules/FindPCRE2.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/FindPCRE2.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/FindPCRE2.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,38 @@ +# Copyright (C) 2007-2009 LuaDist. +# Created by Peter Kapec <kapecp@gmail.com> +# Redistribution and use of this file is allowed according to the terms of the MIT license. +# For details see the COPYRIGHT file distributed with LuaDist. +# Note: +# Searching headers and libraries is very simple and is NOT as powerful as scripts +# distributed with CMake, because LuaDist defines directories to search for. +# Everyone is encouraged to contact the author with improvements. Maybe this file +# becomes part of CMake distribution sometimes. + +# - Find pcre +# Find the native PCRE2 headers and libraries. +# +# PCRE2_INCLUDE_DIRS - where to find pcre.h, etc. +# PCRE2_LIBRARIES - List of libraries when using pcre. +# PCRE2_FOUND - True if pcre found. + +# Look for the header file. +FIND_PATH(PCRE2_INCLUDE_DIR NAMES pcre2posix.h) + +# Look for the library. +FIND_LIBRARY(PCRE2_LIBRARY NAMES pcre2-8) +FIND_LIBRARY(PCRE2_POSIX_LIBRARY NAMES pcre2-posix) + +# Handle the QUIETLY and REQUIRED arguments and set PCRE2_FOUND to TRUE if all listed variables are TRUE. +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE2 DEFAULT_MSG PCRE2_LIBRARY PCRE2_POSIX_LIBRARY PCRE2_INCLUDE_DIR) + +# Copy the results to the output variables. +IF(PCRE2_FOUND) + SET(PCRE2_LIBRARIES ${PCRE2_LIBRARY} ${PCRE2_POSIX_LIBRARY}) + SET(PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR}) +ELSE(PCRE2_FOUND) + SET(PCRE2_LIBRARIES) + SET(PCRE2_INCLUDE_DIRS) +ENDIF(PCRE2_FOUND) + +MARK_AS_ADVANCED(PCRE2_INCLUDE_DIRS PCRE2_LIBRARIES)
  15. Download patch debian/libgit2/deps/pcre/pcre_compile.c
  16. Download patch debian/libgit2/deps/ntlmclient/unicode_iconv.c
  17. Download patch debian/libgit2/deps/ntlmclient/ntlm.c
  18. Download patch debian/libgit2/cmake/Modules/FindGSSAPI.cmake
  19. Download patch debian/libgit2/azure-pipelines/coverity-build.sh

    --- 0.37.0-3/debian/libgit2/azure-pipelines/coverity-build.sh 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/azure-pipelines/coverity-build.sh 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,41 @@ +#!/bin/bash + +set -e + +# Environment check +[ -z "$COVERITY_TOKEN" ] && echo "Need to set a coverity token" && exit 1 + +SOURCE_DIR=${SOURCE_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" && dirname $( pwd ) )} +BUILD_DIR=$(pwd) + +case $(uname -m) in + i?86) BITS=32 ;; + amd64|x86_64) BITS=64 ;; +esac +SCAN_TOOL=https://scan.coverity.com/download/cxx/linux${BITS} +TOOL_BASE=$(pwd)/_coverity-scan + +# Install coverity tools +if [ ! -d "$TOOL_BASE" ]; then + echo "Downloading coverity..." + mkdir -p "$TOOL_BASE" + pushd "$TOOL_BASE" + wget -O coverity_tool.tgz $SCAN_TOOL \ + --post-data "project=libgit2&token=$COVERITY_TOKEN" + tar xzf coverity_tool.tgz + popd + TOOL_DIR=$(find "$TOOL_BASE" -type d -name 'cov-analysis*') + ln -s "$TOOL_DIR" "$TOOL_BASE"/cov-analysis +fi + +cp "${SOURCE_DIR}/script/user_nodefs.h" "$TOOL_BASE"/cov-analysis/config/user_nodefs.h + +COV_BUILD="$TOOL_BASE/cov-analysis/bin/cov-build" + +# Configure and build +cmake ${SOURCE_DIR} + +COVERITY_UNSUPPORTED=1 \ + $COV_BUILD --dir cov-int \ + cmake --build . +
  20. Download patch debian/libgit2/AUTHORS

    --- 0.37.0-3/debian/libgit2/AUTHORS 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/AUTHORS 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,78 @@ +The following people contribute or have contributed +to the libgit2 project (sorted alphabetically): + +Alex Budovski +Alexei Sholik +Andreas Ericsson +Anton "antong" Gyllenberg +Ankur Sethi +Arthur Schreiber +Ben Noordhuis +Ben Straub +Benjamin C Meyer +Brian Downing +Brian Lopez +Carlos Martín Nieto +Colin Timmermans +Daniel Huckstep +Dave Borowitz +David Boyce +David Glesser +Dmitry Kakurin +Dmitry Kovega +Emeric Fermas +Emmanuel Rodriguez +Eric Myhre +Erik Aigner +Florian Forster +Holger Weiss +Ingmar Vanhassel +J. David Ibáñez +Jacques Germishuys +Jakob Pfender +Jason Penny +Jason R. McNeil +Jerome Lambourg +Johan 't Hart +John Wiegley +Jonathan "Duke" Leto +Julien Miotte +Julio Espinoza-Sokal +Justin Love +Kelly "kelly.leahy" Leahy +Kirill A. Shutemov +Lambert CLARA +Luc Bertrand +Marc Pegon +Marcel Groothuis +Marco Villegas +Michael "schu" Schubert +Microsoft Corporation +Olivier Ramonat +Peter Drahoš +Pierre Habouzit +Pierre-Olivier Latour +Przemyslaw Pawelczyk +Ramsay Jones +Robert G. Jakabosky +Romain Geissler +Romain Muller +Russell Belfer +Sakari Jokinen +Samuel Charles "Sam" Day +Sarath Lakshman +Sascha Cunz +Sascha Peilicke +Scott Chacon +Sebastian Schuberth +Sergey Nikishin +Shawn O. Pearce +Shuhei Tanuma +Steve Frécinaux +Sven Strickroth +Tim Branyen +Tim Clem +Tim Harder +Torsten Bögershausen +Trent Mick +Vicent Marti
  21. Download patch debian/libgit2/deps/pcre/pcre_jit_compile.c
  22. Download patch crates/cargo-test-macro/src/lib.rs

    --- 0.37.0-3/crates/cargo-test-macro/src/lib.rs 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/crates/cargo-test-macro/src/lib.rs 2019-08-20 17:39:12.000000000 +0000 @@ -0,0 +1,59 @@ +extern crate proc_macro; + +use proc_macro::*; + +#[proc_macro_attribute] +pub fn cargo_test(_attr: TokenStream, item: TokenStream) -> TokenStream { + let span = Span::call_site(); + let mut ret = TokenStream::new(); + ret.extend(Some(TokenTree::from(Punct::new('#', Spacing::Alone)))); + let test = TokenTree::from(Ident::new("test", span)); + ret.extend(Some(TokenTree::from(Group::new( + Delimiter::Bracket, + test.into(), + )))); + + for token in item { + let group = match token { + TokenTree::Group(g) => { + if g.delimiter() == Delimiter::Brace { + g + } else { + ret.extend(Some(TokenTree::Group(g))); + continue; + } + } + other => { + ret.extend(Some(other)); + continue; + } + }; + + let mut new_body = vec![ + TokenTree::from(Ident::new("let", span)), + TokenTree::from(Ident::new("_test_guard", span)), + TokenTree::from(Punct::new('=', Spacing::Alone)), + TokenTree::from(Ident::new("crate", span)), + TokenTree::from(Punct::new(':', Spacing::Joint)), + TokenTree::from(Punct::new(':', Spacing::Alone)), + TokenTree::from(Ident::new("support", span)), + TokenTree::from(Punct::new(':', Spacing::Joint)), + TokenTree::from(Punct::new(':', Spacing::Alone)), + TokenTree::from(Ident::new("paths", span)), + TokenTree::from(Punct::new(':', Spacing::Joint)), + TokenTree::from(Punct::new(':', Spacing::Alone)), + TokenTree::from(Ident::new("init_root", span)), + TokenTree::from(Group::new(Delimiter::Parenthesis, TokenStream::new())), + TokenTree::from(Punct::new(';', Spacing::Alone)), + ] + .into_iter() + .collect::<TokenStream>(); + new_body.extend(group.stream()); + ret.extend(Some(TokenTree::from(Group::new( + group.delimiter(), + new_body, + )))); + } + + return ret; +}
  23. Download patch debian/libgit2/cmake/Modules/FindIconv.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/FindIconv.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/FindIconv.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,45 @@ +# - Try to find Iconv +# Once done this will define +# +# ICONV_FOUND - system has Iconv +# ICONV_INCLUDE_DIR - the Iconv include directory +# ICONV_LIBRARIES - Link these to use Iconv +# + +IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + # Already in cache, be silent + SET(ICONV_FIND_QUIETLY TRUE) +ENDIF() + +FIND_PATH(ICONV_INCLUDE_DIR iconv.h) +CHECK_FUNCTION_EXISTS(iconv_open libc_has_iconv) +FIND_LIBRARY(iconv_lib NAMES iconv libiconv libiconv-2 c) + +IF(ICONV_INCLUDE_DIR AND libc_has_iconv) + SET(ICONV_FOUND TRUE) + SET(ICONV_LIBRARIES "") + IF(NOT ICONV_FIND_QUIETLY) + MESSAGE(STATUS "Found Iconv: provided by libc") + ENDIF(NOT ICONV_FIND_QUIETLY) +ELSEIF(ICONV_INCLUDE_DIR AND iconv_lib) + SET(ICONV_FOUND TRUE) + # split iconv into -L and -l linker options, so we can + # set them for pkg-config + GET_FILENAME_COMPONENT(iconv_path ${iconv_lib} PATH) + GET_FILENAME_COMPONENT(iconv_name ${iconv_lib} NAME_WE) + STRING(REGEX REPLACE "^lib" "" iconv_name ${iconv_name}) + SET(ICONV_LIBRARIES "-L${iconv_path} -l${iconv_name}") + + IF(NOT ICONV_FIND_QUIETLY) + MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") + ENDIF(NOT ICONV_FIND_QUIETLY) +ELSE() + IF(Iconv_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Iconv") + ENDIF(Iconv_FIND_REQUIRED) +ENDIF() + +MARK_AS_ADVANCED( + ICONV_INCLUDE_DIR + ICONV_LIBRARIES +)
  24. Download patch ci/azure-install-rust.yml

    --- 0.37.0-3/ci/azure-install-rust.yml 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/ci/azure-install-rust.yml 2019-08-20 17:39:12.000000000 +0000 @@ -0,0 +1,28 @@ +steps: + - bash: | + set -e + if command -v rustup; then + echo `command -v rustup` `rustup -V` already installed + rustup self update + elif [ "$AGENT_OS" = "Windows_NT" ]; then + curl -sSf -o rustup-init.exe https://win.rustup.rs + rustup-init.exe -y --default-toolchain $TOOLCHAIN + echo "##vso[task.prependpath]$USERPROFILE/.cargo/bin" + else + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN + echo "##vso[task.prependpath]$HOME/.cargo/bin" + fi + displayName: Install rustup + + - bash: | + set -e + rustup update $TOOLCHAIN + rustup default $TOOLCHAIN + displayName: Install rust + + - bash: | + set -ex + rustup -V + rustc -Vv + cargo -V + displayName: Query rust and cargo versions
  25. Download patch debian/libgit2/deps/ntlmclient/ntlm.h

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/ntlm.h 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/ntlm.h 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,174 @@ +/* + * Copyright (c) Edward Thomson. All rights reserved. + * + * This file is part of ntlmclient, distributed under the MIT license. + * For full terms and copyright information, and for third-party + * copyright information, see the included LICENSE.txt file. + */ + +#ifndef PRIVATE_NTLM_H__ +#define PRIVATE_NTLM_H__ + +#include "ntlmclient.h" +#include "unicode.h" +#include "crypt.h" +#include "compat.h" + +#define NTLM_LM_RESPONSE_LEN 24 +#define NTLM_NTLM_RESPONSE_LEN 24 +#define NTLM_NTLM_HASH_LEN 16 +#define NTLM_NTLM2_HASH_LEN 16 + +#define NTLM_SIGNATURE { 'N', 'T', 'L', 'M', 'S', 'S', 'P', 0x00 } + +#define NTLM_LM_PLAINTEXT { 0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 } + +typedef enum { + NTLM_STATE_NEGOTIATE = 0, + NTLM_STATE_CHALLENGE = 1, + NTLM_STATE_RESPONSE = 2, + NTLM_STATE_ERROR = 3, + NTLM_STATE_COMPLETE = 4, +} ntlm_state; + +typedef struct { + unsigned char *buf; + size_t pos; + size_t len; +} ntlm_buf; + +typedef struct { + uint8_t major; + uint8_t minor; + uint16_t build; + uint32_t reserved; +} ntlm_version; + +typedef struct { + uint32_t flags; + uint64_t nonce; + ntlm_version target_version; + + /* The unparsed target information from the server */ + unsigned char *target_info; + size_t target_info_len; + + /* The target information parsed into usable strings */ + char *target; + char *target_server; + char *target_domain; + char *target_server_dns; + char *target_domain_dns; +} ntlm_challenge; + +struct ntlm_client { + ntlm_client_flags flags; + + ntlm_state state; + + /* crypto contexts */ + ntlm_hmac_ctx *hmac_ctx; + ntlm_unicode_ctx *unicode_ctx; + + /* error message as set by the library */ + const char *errmsg; + + char *hostname; + char *hostdomain; + ntlm_version host_version; + + char *target; + + char *username; + char *username_upper; + char *userdomain; + char *password; + + /* strings as converted to utf16 */ + char *target_utf16; + char *username_utf16; + char *username_upper_utf16; + char *userdomain_utf16; + char *hostname_utf16; + char *password_utf16; + + /* timestamp and nonce; only for debugging */ + uint64_t nonce; + uint64_t timestamp; + + size_t username_utf16_len; + size_t username_upper_utf16_len; + size_t userdomain_utf16_len; + size_t hostname_utf16_len; + size_t password_utf16_len; + size_t target_utf16_len; + + unsigned char lm_response[NTLM_LM_RESPONSE_LEN]; + size_t lm_response_len; + + unsigned char ntlm_response[NTLM_NTLM_RESPONSE_LEN]; + size_t ntlm_response_len; + + unsigned char *ntlm2_response; + size_t ntlm2_response_len; + + ntlm_buf negotiate; + ntlm_challenge challenge; + ntlm_buf response; +}; + +typedef enum { + NTLM_ENABLE_HOSTVERSION = (1 << 31), +} ntlm_client_internal_flags; + +typedef enum { + NTLM_TARGET_INFO_END = 0, + NTLM_TARGET_INFO_SERVER = 1, + NTLM_TARGET_INFO_DOMAIN = 2, + NTLM_TARGET_INFO_SERVER_DNS = 3, + NTLM_TARGET_INFO_DOMAIN_DNS = 4, +} ntlm_target_info_type_t; + +typedef enum { + /* Unicode strings are supported in security buffers */ + NTLM_NEGOTIATE_UNICODE = 0x00000001, + + /* OEM (ANSI) strings are supported in security buffers */ + NTLM_NEGOTIATE_OEM = 0x00000002, + + /* Request the target realm from the server */ + NTLM_NEGOTIATE_REQUEST_TARGET = 0x00000004, + + /* NTLM authentication is supported */ + NTLM_NEGOTIATE_NTLM = 0x00000200, + + /* Negotiate domain name */ + NTLM_NEGOTIATE_DOMAIN_SUPPLIED = 0x00001000, + + /* Negotiate workstation (client) name */ + NTLM_NEGOTIATE_WORKSTATION_SUPPLIED = 0x00002000, + + /* Indicates that a local context is available */ + NTLM_NEGOTIATE_LOCAL_CALL = 0x00004000, + + /* Request a dummy signature */ + NTLM_NEGOTIATE_ALWAYS_SIGN = 0x00008000, + + /* Target (server) is a domain */ + NTLM_NEGOTIATE_TYPE_DOMAIN = 0x00010000, + + /* NTLM2 signing and sealing is supported */ + NTLM_NEGOTIATE_NTLM2_SIGN_AND_SEAL = 0x00080000, + + /* A target information block is included */ + NTLM_NEGOTIATE_TARGET_INFO = 0x00800000, + + /* Version information should be provided */ + NTLM_NEGOTIATE_VERSION = 0x01000000, +} ntlm_negotiate_t; + +extern int ntlm_client_set_nonce(ntlm_client *ntlm, uint64_t nonce); +extern int ntlm_client_set_timestamp(ntlm_client *ntlm, uint64_t timestamp); +extern void ntlm_client_set_errmsg(ntlm_client *ntlm, const char *errmsg); + +#endif /* PRIVATE_NTLM_H__ */
  26. Download patch debian/libgit2/deps/pcre/pcre_newline.c
  27. Download patch crates/resolver-tests/src/lib.rs
  28. Download patch crates/crates-io/lib.rs
  29. Download patch debian/control

    --- 0.37.0-3/debian/control 2019-05-31 06:25:04.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/control 2019-10-25 07:20:34.000000000 +0000 @@ -1,6 +1,7 @@ Source: cargo Section: devel -Maintainer: Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> Uploaders: Luca Bruno <lucab@debian.org>, Angus Lees <gus@debian.org>, Ximin Luo <infinity0@debian.org>, @@ -18,7 +19,6 @@ Build-Depends: debhelper (>= 9.20141010) python3:native, libcurl4-gnutls-dev | libcurl4-openssl-dev, libssh2-1-dev, - libgit2-dev (>= 0.27), libhttp-parser-dev, libssl-dev, zlib1g-dev,
  30. Download patch debian/libgit2/deps/ntlmclient/crypt_commoncrypto.c

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/crypt_commoncrypto.c 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/crypt_commoncrypto.c 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * Copyright (c) Edward Thomson. All rights reserved. + * + * This file is part of ntlmclient, distributed under the MIT license. + * For full terms and copyright information, and for third-party + * copyright information, see the included LICENSE.txt file. + */ + +#include <stdlib.h> +#include <stdint.h> +#include <string.h> +#include <fcntl.h> +#include <unistd.h> +#include <errno.h> + +#include <CommonCrypto/CommonCrypto.h> + +#include "ntlm.h" +#include "crypt.h" + +bool ntlm_random_bytes( + ntlm_client *ntlm, + unsigned char *out, + size_t len) +{ + int fd, ret; + size_t total = 0; + + if ((fd = open("/dev/urandom", O_RDONLY)) < 0) { + ntlm_client_set_errmsg(ntlm, strerror(errno)); + return false; + } + + while (total < len) { + if ((ret = read(fd, out, (len - total))) < 0) { + ntlm_client_set_errmsg(ntlm, strerror(errno)); + return false; + } else if (ret == 0) { + ntlm_client_set_errmsg(ntlm, "unexpected eof on random device"); + return false; + } + + total += ret; + } + + close(fd); + return true; +} + +bool ntlm_des_encrypt( + ntlm_des_block *out, + ntlm_des_block *plaintext, + ntlm_des_block *key) +{ + size_t written; + + CCCryptorStatus result = CCCrypt(kCCEncrypt, + kCCAlgorithmDES, kCCOptionECBMode, + key, sizeof(ntlm_des_block), NULL, + plaintext, sizeof(ntlm_des_block), + out, sizeof(ntlm_des_block), &written); + + return (result == kCCSuccess) ? true : false; +} + +bool ntlm_md4_digest( + unsigned char out[CRYPT_MD4_DIGESTSIZE], + const unsigned char *in, + size_t in_len) +{ + return !!CC_MD4(in, in_len, out); +} + +ntlm_hmac_ctx *ntlm_hmac_ctx_init(void) +{ + return calloc(1, sizeof(ntlm_hmac_ctx)); +} + +bool ntlm_hmac_ctx_reset(ntlm_hmac_ctx *ctx) +{ + memset(ctx, 0, sizeof(ntlm_hmac_ctx)); + return true; +} + +bool ntlm_hmac_md5_init( + ntlm_hmac_ctx *ctx, + const unsigned char *key, + size_t key_len) +{ + CCHmacInit(&ctx->native, kCCHmacAlgMD5, key, key_len); + return true; +} + +bool ntlm_hmac_md5_update( + ntlm_hmac_ctx *ctx, + const unsigned char *data, + size_t data_len) +{ + CCHmacUpdate(&ctx->native, data, data_len); + return true; +} + +bool ntlm_hmac_md5_final( + unsigned char *out, + size_t *out_len, + ntlm_hmac_ctx *ctx) +{ + if (*out_len < CRYPT_MD5_DIGESTSIZE) + return false; + + CCHmacFinal(&ctx->native, out); + + *out_len = CRYPT_MD5_DIGESTSIZE; + return true; +} + +void ntlm_hmac_ctx_free(ntlm_hmac_ctx *ctx) +{ + free(ctx); +}
  31. Download patch debian/libgit2/deps/http-parser/CMakeLists.txt

    --- 0.37.0-3/debian/libgit2/deps/http-parser/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/http-parser/CMakeLists.txt 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,5 @@ +FILE(GLOB SRC_HTTP "*.c" "*.h") + +ADD_LIBRARY(http-parser OBJECT ${SRC_HTTP}) + +ENABLE_WARNINGS(implicit-fallthrough=1)
  32. Download patch ci/azure-test-all.yml

    --- 0.37.0-3/ci/azure-test-all.yml 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/ci/azure-test-all.yml 2019-08-20 17:39:12.000000000 +0000 @@ -0,0 +1,28 @@ +steps: +- checkout: self + fetchDepth: 1 + +- template: azure-install-rust.yml + +- bash: rustup target add $OTHER_TARGET + displayName: "Install cross-compile target" + +- bash: sudo apt install gcc-multilib + displayName: "Install gcc-multilib (linux)" + condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) + +# Some tests rely on a clippy command to run, so let's try to install clippy to +# we can be sure to run those tests. +- bash: rustup component add clippy || echo "clippy not available" + displayName: "Install clippy (maybe)" + +# Deny warnings on CI to avoid warnings getting into the codebase, and note the +# `force-system-lib-on-osx` which is intended to fix compile issues on OSX where +# compiling curl from source on OSX yields linker errors on Azure. +# +# Note that the curl issue is traced back to alexcrichton/curl-rust#279 where it +# looks like the OSX version we're actually running on is such that a symbol is +# emitted that's never worked. For now force the system library to be used to +# fix the link errors. +- bash: cargo test --features 'deny-warnings curl/force-system-lib-on-osx' + displayName: "cargo test"
  33. Download patch debian/libgit2/deps/pcre/pcre_exec.c
  34. Download patch debian/libgit2/cmake/Modules/CheckPrototypeDefinition.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/CheckPrototypeDefinition.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/CheckPrototypeDefinition.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,96 @@ +# - Check if the protoype we expect is correct. +# check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE) +# FUNCTION - The name of the function (used to check if prototype exists) +# PROTOTYPE- The prototype to check. +# RETURN - The return value of the function. +# HEADER - The header files required. +# VARIABLE - The variable to store the result. +# Example: +# check_prototype_definition(getpwent_r +# "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)" +# "NULL" +# "unistd.h;pwd.h" +# SOLARIS_GETPWENT_R) +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +#============================================================================= +# Copyright 2005-2009 Kitware, Inc. +# Copyright 2010-2011 Andreas Schneider <asn@cryptomilk.org> +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) +# + +get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) + +function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE) + + if ("${_VARIABLE}" MATCHES "^${_VARIABLE}$") + set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n") + + set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS}) + if (CMAKE_REQUIRED_LIBRARIES) + set(CHECK_PROTOTYPE_DEFINITION_LIBS + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + else(CMAKE_REQUIRED_LIBRARIES) + set(CHECK_PROTOTYPE_DEFINITION_LIBS) + endif(CMAKE_REQUIRED_LIBRARIES) + if (CMAKE_REQUIRED_INCLUDES) + set(CMAKE_SYMBOL_EXISTS_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + else(CMAKE_REQUIRED_INCLUDES) + set(CMAKE_SYMBOL_EXISTS_INCLUDES) + endif(CMAKE_REQUIRED_INCLUDES) + + foreach(_FILE ${_HEADER}) + set(CHECK_PROTOTYPE_DEFINITION_HEADER + "${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n") + endforeach(_FILE) + + set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION}) + set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE}) + set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN}) + + configure_file("${__check_proto_def_dir}/CheckPrototypeDefinition.c.in" + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY) + + file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c _SOURCE) + + try_compile(${_VARIABLE} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS} + "${CHECK_PROTOTYPE_DEFINITION_LIBS}" + "${CMAKE_SYMBOL_EXISTS_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + + if (${_VARIABLE}) + set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}") + message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - True") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n" + "${OUTPUT}\n\n") + else (${_VARIABLE}) + message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False") + set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n" + "${OUTPUT}\n\n${_SOURCE}\n\n") + endif (${_VARIABLE}) + endif("${_VARIABLE}" MATCHES "^${_VARIABLE}$") + +endfunction(CHECK_PROTOTYPE_DEFINITION)
  35. Download patch debian/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS

    --- 0.37.0-3/debian/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,22 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  36. Download patch debian/libgit2/deps/ntlmclient/crypt_commoncrypto.h

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/crypt_commoncrypto.h 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/crypt_commoncrypto.h 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,18 @@ +/* + * Copyright (c) Edward Thomson. All rights reserved. + * + * This file is part of ntlmclient, distributed under the MIT license. + * For full terms and copyright information, and for third-party + * copyright information, see the included LICENSE.txt file. + */ + +#ifndef PRIVATE_CRYPT_COMMONCRYPTO_H__ +#define PRIVATE_CRYPT_COMMONCRYPTO_H__ + +#include <CommonCrypto/CommonCrypto.h> + +typedef struct { + CCHmacContext native; +} ntlm_hmac_ctx; + +#endif /* PRIVATE_CRYPT_COMMONCRYPTO_H__ */
  37. Download patch debian/libgit2/azure-pipelines.yml

    --- 0.37.0-3/debian/libgit2/azure-pipelines.yml 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/azure-pipelines.yml 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,165 @@ +resources: +- repo: self + +trigger: +- master +- maint/* + +jobs: +- job: linux_amd64_trusty_gcc_openssl + displayName: 'Linux (amd64; Trusty; GCC; OpenSSL)' + pool: + vmImage: 'Ubuntu 16.04' + steps: + - template: azure-pipelines/docker.yml + parameters: + imageName: 'libgit2/trusty-amd64:latest' + environmentVariables: | + CC=gcc + CMAKE_GENERATOR=Unix Makefiles + CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind + +- job: linux_amd64_trusty_gcc_mbedtls + displayName: 'Linux (amd64; Trusty; GCC; mbedTLS)' + pool: + vmImage: 'Ubuntu 16.04' + steps: + - template: azure-pipelines/docker.yml + parameters: + imageName: 'libgit2/trusty-amd64:latest' + environmentVariables: | + CC=gcc + CMAKE_GENERATOR=Unix Makefiles + CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind + +- job: linux_amd64_trusty_clang_openssl + displayName: 'Linux (amd64; Trusty; Clang; OpenSSL)' + pool: + vmImage: 'Ubuntu 16.04' + steps: + - template: azure-pipelines/docker.yml + parameters: + imageName: 'libgit2/trusty-amd64:latest' + environmentVariables: | + CC=clang + CMAKE_GENERATOR=Unix Makefiles + CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind + +- job: linux_amd64_trusty_clang_mbedtls + displayName: 'Linux (amd64; Trusty; Clang; mbedTLS)' + pool: + vmImage: 'Ubuntu 16.04' + steps: + - template: azure-pipelines/docker.yml + parameters: + imageName: 'libgit2/trusty-amd64:latest' + environmentVariables: | + CC=clang + CMAKE_GENERATOR=Unix Makefiles + CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind + +- job: macos + displayName: 'macOS' + pool: + vmImage: 'macOS 10.13' + steps: + - bash: . '$(Build.SourcesDirectory)/azure-pipelines/setup-osx.sh' + displayName: Setup + - template: azure-pipelines/bash.yml + parameters: + environmentVariables: + TMPDIR: $(Agent.TempDirectory) + PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig + CMAKE_GENERATOR: Ninja + CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks + SKIP_SSH_TESTS: true + +- job: windows_vs_amd64 + displayName: 'Windows (amd64; Visual Studio)' + pool: Hosted + steps: + - template: azure-pipelines/bash.yml + parameters: + environmentVariables: + CMAKE_GENERATOR: Visual Studio 12 2013 Win64 + CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON + SKIP_SSH_TESTS: true + +- job: windows_vs_x86 + displayName: 'Windows (x86; Visual Studio)' + pool: Hosted + steps: + - template: azure-pipelines/bash.yml + parameters: + environmentVariables: + CMAKE_GENERATOR: Visual Studio 12 2013 + CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS + SKIP_SSH_TESTS: true + +- job: windows_mingw_amd64 + displayName: 'Windows (amd64; MinGW)' + pool: Hosted + steps: + - bash: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.sh' + displayName: Setup + env: + TEMP: $(Agent.TempDirectory) + ARCH: amd64 + - template: azure-pipelines/bash.yml + parameters: + environmentVariables: + BUILD_PATH: $(Agent.TempDirectory)\mingw64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin + CMAKE_GENERATOR: MinGW Makefiles + CMAKE_OPTIONS: -DDEPRECATE_HARD=ON + SKIP_SSH_TESTS: true + +- job: windows_mingw_x86 + displayName: 'Windows (x86; MinGW)' + pool: Hosted + steps: + - bash: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.sh' + displayName: Setup + workingDirectory: '$(Build.BinariesDirectory)' + env: + TEMP: $(Agent.TempDirectory) + ARCH: x86 + - template: azure-pipelines/bash.yml + parameters: + environmentVariables: + BUILD_PATH: $(Agent.TempDirectory)\mingw32\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin + CMAKE_GENERATOR: MinGW Makefiles + CMAKE_OPTIONS: -DDEPRECATE_HARD=ON + SKIP_SSH_TESTS: true + +- job: documentation + displayName: 'Generate Documentation' + pool: + vmImage: 'Ubuntu 16.04' + steps: + - script: | + git config user.name 'Documentation Generation' + git config user.email 'libgit2@users.noreply.github.com' + git branch gh-pages origin/gh-pages + docker run --rm -v $(Build.SourcesDirectory):/src -w /src libgit2/docurium:latest cm doc api.docurium + git checkout gh-pages + cp -R * '$(Build.BinariesDirectory)' + displayName: 'Generate Documentation' + - task: archivefiles@2 + displayName: 'Archive Documentation' + inputs: + rootFolderOrFile: '$(Build.BinariesDirectory)' + includeRootFolder: false + archiveFile: '$(Build.ArtifactStagingDirectory)/api-documentation.zip' + - task: publishbuildartifacts@1 + displayName: 'Upload Documentation Artifact' + inputs: + pathToPublish: '$(Build.ArtifactStagingDirectory)' + artifactName: 'docs' + - script: | + git remote -v + echo 'machine github.com' > ~/.netrc + echo 'login $(GITHUB_USERNAME)' >> ~/.netrc + echo 'password $(GITHUB_PAT)' >> ~/.netrc + git push origin gh-pages + displayName: 'Publish Documentation' + condition: eq(variables['Build.Reason'], 'IndividualCI')
  38. Download patch debian/libgit2/azure-pipelines/setup-mingw.sh

    --- 0.37.0-3/debian/libgit2/azure-pipelines/setup-mingw.sh 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/azure-pipelines/setup-mingw.sh 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,15 @@ +#!/bin/sh -e + +echo "##############################################################################" +echo "## Downloading mingw" +echo "##############################################################################" + +case "$ARCH" in + amd64) + MINGW_URI="https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-x86_64-8.1.0-release-win32-seh-rt_v6-rev0.zip";; + x86) + MINGW_URI="https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-i686-8.1.0-release-win32-sjlj-rt_v6-rev0.zip";; +esac + +curl -s -L "$MINGW_URI" -o "$TEMP"/mingw-"$ARCH".zip +unzip -q "$TEMP"/mingw-"$ARCH".zip -d "$TEMP"
  39. Download patch debian/libgit2/azure-pipelines/nightly.yml
  40. Download patch debian/libgit2/deps/http-parser/http_parser.c
  41. Download patch debian/libgit2/deps/pcre/pcre_internal.h
  42. Download patch crates/resolver-tests/tests/resolve.rs
  43. Download patch debian/libgit2/deps/pcre/pcre_ord2utf8.c

    --- 0.37.0-3/debian/libgit2/deps/pcre/pcre_ord2utf8.c 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/pcre_ord2utf8.c 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,94 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2012 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This file contains a private PCRE function that converts an ordinal +character value into a UTF8 string. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define COMPILE_PCRE8 + +#include "pcre_internal.h" + +/************************************************* +* Convert character value to UTF-8 * +*************************************************/ + +/* This function takes an integer value in the range 0 - 0x10ffff +and encodes it as a UTF-8 character in 1 to 4 pcre_uchars. + +Arguments: + cvalue the character value + buffer pointer to buffer for result - at least 6 pcre_uchars long + +Returns: number of characters placed in the buffer +*/ + +unsigned +int +PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer) +{ +#ifdef SUPPORT_UTF + +register int i, j; + +for (i = 0; i < PRIV(utf8_table1_size); i++) + if ((int)cvalue <= PRIV(utf8_table1)[i]) break; +buffer += i; +for (j = i; j > 0; j--) + { + *buffer-- = 0x80 | (cvalue & 0x3f); + cvalue >>= 6; + } +*buffer = PRIV(utf8_table2)[i] | cvalue; +return i + 1; + +#else + +(void)(cvalue); /* Keep compiler happy; this function won't ever be */ +(void)(buffer); /* called when SUPPORT_UTF is not defined. */ +return 0; + +#endif +} + +/* End of pcre_ord2utf8.c */
  44. Download patch debian/libgit2/deps/ntlmclient/crypt_mbedtls.c

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/crypt_mbedtls.c 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/crypt_mbedtls.c 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,145 @@ +/* + * Copyright (c) Edward Thomson. All rights reserved. + * + * This file is part of ntlmclient, distributed under the MIT license. + * For full terms and copyright information, and for third-party + * copyright information, see the included LICENSE.txt file. + */ + +#include <stdlib.h> +#include <string.h> + +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/des.h" +#include "mbedtls/entropy.h" +#include "mbedtls/md4.h" + +#include "ntlm.h" +#include "crypt.h" + +bool ntlm_random_bytes( + ntlm_client *ntlm, + unsigned char *out, + size_t len) +{ + mbedtls_ctr_drbg_context ctr_drbg; + mbedtls_entropy_context entropy; + bool ret = true; + + const unsigned char personalization[] = { + 0xec, 0xb5, 0xd1, 0x0b, 0x8f, 0x15, 0x1f, 0xc2, + 0xe4, 0x8e, 0xec, 0x36, 0xf7, 0x0a, 0x45, 0x9a, + 0x1f, 0xe1, 0x35, 0x58, 0xb1, 0xcb, 0xfd, 0x8a, + 0x57, 0x5c, 0x75, 0x7d, 0x2f, 0xc9, 0x70, 0xac + }; + + mbedtls_ctr_drbg_init(&ctr_drbg); + mbedtls_entropy_init(&entropy); + + if (mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, + &entropy, personalization, sizeof(personalization)) || + mbedtls_ctr_drbg_random(&ctr_drbg, out, len)) { + ntlm_client_set_errmsg(ntlm, "random generation failed"); + ret = false; + } + + mbedtls_entropy_free(&entropy); + mbedtls_ctr_drbg_free(&ctr_drbg); + + return ret; +} + +bool ntlm_des_encrypt( + ntlm_des_block *out, + ntlm_des_block *plaintext, + ntlm_des_block *key) +{ + mbedtls_des_context ctx; + bool success = false; + + mbedtls_des_init(&ctx); + + if (mbedtls_des_setkey_enc(&ctx, *key) || + mbedtls_des_crypt_ecb(&ctx, *plaintext, *out)) + goto done; + + success = true; + +done: + mbedtls_des_free(&ctx); + return success; +} + +bool ntlm_md4_digest( + unsigned char out[CRYPT_MD4_DIGESTSIZE], + const unsigned char *in, + size_t in_len) +{ + mbedtls_md4_context ctx; + + mbedtls_md4_init(&ctx); + mbedtls_md4_starts(&ctx); + mbedtls_md4_update(&ctx, in, in_len); + mbedtls_md4_finish(&ctx, out); + mbedtls_md4_free(&ctx); + + return true; +} + +ntlm_hmac_ctx *ntlm_hmac_ctx_init(void) +{ + ntlm_hmac_ctx *ctx; + const mbedtls_md_info_t *info = mbedtls_md_info_from_type(MBEDTLS_MD_MD5); + + if ((ctx = calloc(1, sizeof(ntlm_hmac_ctx))) == NULL) + return NULL; + + mbedtls_md_init(&ctx->mbed); + + if (mbedtls_md_setup(&ctx->mbed, info, 1) != 0) { + free(ctx); + return false; + } + + return ctx; +} + +bool ntlm_hmac_ctx_reset(ntlm_hmac_ctx *ctx) +{ + return !mbedtls_md_hmac_reset(&ctx->mbed); +} + +bool ntlm_hmac_md5_init( + ntlm_hmac_ctx *ctx, + const unsigned char *key, + size_t key_len) +{ + return !mbedtls_md_hmac_starts(&ctx->mbed, key, key_len); +} + +bool ntlm_hmac_md5_update( + ntlm_hmac_ctx *ctx, + const unsigned char *in, + size_t in_len) +{ + return !mbedtls_md_hmac_update(&ctx->mbed, in, in_len); +} + +bool ntlm_hmac_md5_final( + unsigned char *out, + size_t *out_len, + ntlm_hmac_ctx *ctx) +{ + if (*out_len < CRYPT_MD5_DIGESTSIZE) + return false; + + return !mbedtls_md_hmac_finish(&ctx->mbed, out); +} + +void ntlm_hmac_ctx_free(ntlm_hmac_ctx *ctx) +{ + if (ctx) { + mbedtls_md_free(&ctx->mbed); + free(ctx); + } +}
  45. Download patch debian/libgit2/deps/http-parser/http_parser.h
  46. Download patch debian/libgit2/deps/pcre/cmake/FindReadline.cmake

    --- 0.37.0-3/debian/libgit2/deps/pcre/cmake/FindReadline.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/cmake/FindReadline.cmake 2019-07-22 10:02:38.000000000 +0000 @@ -0,0 +1,29 @@ +# from http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/FindReadline.cmake +# http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/COPYING-CMAKE-SCRIPTS +# --> BSD licensed +# +# GNU Readline library finder +if(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY) + set(READLINE_FOUND TRUE) +else(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY) + FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h + /usr/include/readline + ) + +# 2008-04-22 The next clause used to read like this: +# +# FIND_LIBRARY(READLINE_LIBRARY NAMES readline) +# FIND_LIBRARY(NCURSES_LIBRARY NAMES ncurses ) +# include(FindPackageHandleStandardArgs) +# FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG NCURSES_LIBRARY READLINE_INCLUDE_DIR READLINE_LIBRARY ) +# +# I was advised to modify it such that it will find an ncurses library if +# required, but not if one was explicitly given, that is, it allows the +# default to be overridden. PH + + FIND_LIBRARY(READLINE_LIBRARY NAMES readline) + include(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG READLINE_INCLUDE_DIR READLINE_LIBRARY ) + + MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY) +endif(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)
  47. Download patch debian/libgit2/cmake/Modules/FindmbedTLS.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/FindmbedTLS.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/FindmbedTLS.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,93 @@ +# - Try to find mbedTLS +# Once done this will define +# +# Read-Only variables +# MBEDTLS_FOUND - system has mbedTLS +# MBEDTLS_INCLUDE_DIR - the mbedTLS include directory +# MBEDTLS_LIBRARY_DIR - the mbedTLS library directory +# MBEDTLS_LIBRARIES - Link these to use mbedTLS +# MBEDTLS_LIBRARY - path to mbedTLS library +# MBEDX509_LIBRARY - path to mbedTLS X.509 library +# MBEDCRYPTO_LIBRARY - path to mbedTLS Crypto library +# +# Hint +# MBEDTLS_ROOT_DIR can be pointed to a local mbedTLS installation. + +SET(_MBEDTLS_ROOT_HINTS + ${MBEDTLS_ROOT_DIR} + ENV MBEDTLS_ROOT_DIR +) + +SET(_MBEDTLS_ROOT_HINTS_AND_PATHS + HINTS ${_MBEDTLS_ROOT_HINTS} + PATHS ${_MBEDTLS_ROOT_PATHS} +) + +FIND_PATH(MBEDTLS_INCLUDE_DIR + NAMES mbedtls/version.h + ${_MBEDTLS_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES include +) + +IF(MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIBRARIES) + # Already in cache, be silent + SET(MBEDTLS_FIND_QUIETLY TRUE) +ENDIF() + +FIND_LIBRARY(MBEDTLS_LIBRARY + NAMES mbedtls libmbedtls + ${_MBEDTLS_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES library +) +FIND_LIBRARY(MBEDX509_LIBRARY + NAMES mbedx509 libmbedx509 + ${_MBEDTLS_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES library +) +FIND_LIBRARY(MBEDCRYPTO_LIBRARY + NAMES mbedcrypto libmbedcrypto + ${_MBEDTLS_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES library +) + +IF(MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIBRARY AND MBEDX509_LIBRARY AND MBEDCRYPTO_LIBRARY) + SET(MBEDTLS_FOUND TRUE) +ENDIF() + +IF(MBEDTLS_FOUND) + # split mbedTLS into -L and -l linker options, so we can set them for pkg-config + GET_FILENAME_COMPONENT(MBEDTLS_LIBRARY_DIR ${MBEDTLS_LIBRARY} PATH) + GET_FILENAME_COMPONENT(MBEDTLS_LIBRARY_FILE ${MBEDTLS_LIBRARY} NAME_WE) + GET_FILENAME_COMPONENT(MBEDX509_LIBRARY_FILE ${MBEDX509_LIBRARY} NAME_WE) + GET_FILENAME_COMPONENT(MBEDCRYPTO_LIBRARY_FILE ${MBEDCRYPTO_LIBRARY} NAME_WE) + STRING(REGEX REPLACE "^lib" "" MBEDTLS_LIBRARY_FILE ${MBEDTLS_LIBRARY_FILE}) + STRING(REGEX REPLACE "^lib" "" MBEDX509_LIBRARY_FILE ${MBEDX509_LIBRARY_FILE}) + STRING(REGEX REPLACE "^lib" "" MBEDCRYPTO_LIBRARY_FILE ${MBEDCRYPTO_LIBRARY_FILE}) + SET(MBEDTLS_LIBRARIES "-L${MBEDTLS_LIBRARY_DIR} -l${MBEDTLS_LIBRARY_FILE} -l${MBEDX509_LIBRARY_FILE} -l${MBEDCRYPTO_LIBRARY_FILE}") + + IF(NOT MBEDTLS_FIND_QUIETLY) + MESSAGE(STATUS "Found mbedTLS:") + FILE(READ ${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h MBEDTLSCONTENT) + STRING(REGEX MATCH "MBEDTLS_VERSION_STRING +\"[0-9|.]+\"" MBEDTLSMATCH ${MBEDTLSCONTENT}) + IF (MBEDTLSMATCH) + STRING(REGEX REPLACE "MBEDTLS_VERSION_STRING +\"([0-9|.]+)\"" "\\1" MBEDTLS_VERSION ${MBEDTLSMATCH}) + MESSAGE(STATUS " version ${MBEDTLS_VERSION}") + ENDIF(MBEDTLSMATCH) + MESSAGE(STATUS " TLS: ${MBEDTLS_LIBRARY}") + MESSAGE(STATUS " X509: ${MBEDX509_LIBRARY}") + MESSAGE(STATUS " Crypto: ${MBEDCRYPTO_LIBRARY}") + ENDIF(NOT MBEDTLS_FIND_QUIETLY) +ELSE(MBEDTLS_FOUND) + IF(MBEDTLS_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find mbedTLS") + ENDIF(MBEDTLS_FIND_REQUIRED) +ENDIF(MBEDTLS_FOUND) + +MARK_AS_ADVANCED( + MBEDTLS_INCLUDE_DIR + MBEDTLS_LIBRARY_DIR + MBEDTLS_LIBRARIES + MBEDTLS_LIBRARY + MBEDX509_LIBRARY + MBEDCRYPTO_LIBRARY +)
  48. Download patch debian/libgit2/azure-pipelines/coverity-publish.sh

    --- 0.37.0-3/debian/libgit2/azure-pipelines/coverity-publish.sh 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/azure-pipelines/coverity-publish.sh 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,33 @@ +#!/bin/bash + +set -e + +# Results check +[ ! -d "cov-int" ] && echo "Coverity directory not found" && exit 1 + +# Upload results +tar czf libgit2.tgz cov-int + +SOURCE_DIR=${SOURCE_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" && dirname $( pwd ) )} +SHA=$(cd ${SOURCE_DIR} && git rev-parse --short HEAD) + +HTML="$(curl \ + --silent \ + --write-out "\n%{http_code}" \ + --form token="$COVERITY_TOKEN" \ + --form email=libgit2@gmail.com \ + --form file=@libgit2.tgz \ + --form version="$SHA" \ + --form description="libgit2 build" \ + https://scan.coverity.com/builds?project=libgit2)" + +# Body is everything up to the last line +BODY="$(echo "$HTML" | head -n-1)" + +# Status code is the last line +STATUS_CODE="$(echo "$HTML" | tail -n1)" + +if [ "${STATUS_CODE}" != "200" -a "${STATUS_CODE}" != "201" ]; then + echo "Received error code ${STATUS_CODE} from Coverity" + exit 1 +fi
  49. Download patch debian/libgit2/deps/ntlmclient/utf8.h
  50. Download patch debian/libgit2/azure-pipelines/bash.yml

    --- 0.37.0-3/debian/libgit2/azure-pipelines/bash.yml 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/azure-pipelines/bash.yml 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,17 @@ +# These are the steps used for building on machines with bash. +steps: +- bash: . '$(Build.SourcesDirectory)/azure-pipelines/build.sh' + displayName: Build + workingDirectory: '$(Build.BinariesDirectory)' + env: ${{ parameters.environmentVariables }} +- bash: . '$(Build.SourcesDirectory)/azure-pipelines/test.sh' + displayName: Test + workingDirectory: '$(Build.BinariesDirectory)' + env: ${{ parameters.environmentVariables }} +- task: PublishTestResults@2 + displayName: Publish Test Results + condition: succeededOrFailed() + inputs: + testResultsFiles: 'results_*.xml' + searchFolder: '$(Build.BinariesDirectory)' + mergeTestResults: true
  51. Download patch debian/libgit2/cmake/Modules/FindPCRE.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/FindPCRE.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/FindPCRE.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,38 @@ +# Copyright (C) 2007-2009 LuaDist. +# Created by Peter Kapec <kapecp@gmail.com> +# Redistribution and use of this file is allowed according to the terms of the MIT license. +# For details see the COPYRIGHT file distributed with LuaDist. +# Note: +# Searching headers and libraries is very simple and is NOT as powerful as scripts +# distributed with CMake, because LuaDist defines directories to search for. +# Everyone is encouraged to contact the author with improvements. Maybe this file +# becomes part of CMake distribution sometimes. + +# - Find pcre +# Find the native PCRE headers and libraries. +# +# PCRE_INCLUDE_DIRS - where to find pcre.h, etc. +# PCRE_LIBRARIES - List of libraries when using pcre. +# PCRE_FOUND - True if pcre found. + +# Look for the header file. +FIND_PATH(PCRE_INCLUDE_DIR NAMES pcreposix.h) + +# Look for the library. +FIND_LIBRARY(PCRE_LIBRARY NAMES pcre) +FIND_LIBRARY(PCRE_POSIX_LIBRARY NAMES pcreposix) + +# Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE. +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_POSIX_LIBRARY PCRE_INCLUDE_DIR) + +# Copy the results to the output variables. +IF(PCRE_FOUND) + SET(PCRE_LIBRARIES ${PCRE_LIBRARY} ${PCRE_POSIX_LIBRARY}) + SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR}) +ELSE(PCRE_FOUND) + SET(PCRE_LIBRARIES) + SET(PCRE_INCLUDE_DIRS) +ENDIF(PCRE_FOUND) + +MARK_AS_ADVANCED(PCRE_INCLUDE_DIRS PCRE_LIBRARIES)
  52. Download patch debian/libgit2/azure-pipelines/setup-linux.sh

    --- 0.37.0-3/debian/libgit2/azure-pipelines/setup-linux.sh 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/azure-pipelines/setup-linux.sh 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,27 @@ +#!/bin/sh + +set -e +set -x + +TMPDIR=${TMPDIR:-/tmp} + +if [ -z "$SKIP_APT" ]; then + apt-get update + apt-get -y install build-essential pkg-config clang cmake openssl libssl-dev libssh2-1-dev libcurl4-gnutls-dev openssh-server +fi + +mkdir -p /var/run/sshd + +if [ "$MBEDTLS" ]; then + MBEDTLS_DIR=${MBEDTLS_DIR:-$(mktemp -d ${TMPDIR}/mbedtls.XXXXXXXX)} + + git clone --depth 10 --single-branch --branch mbedtls-2.6.1 https://github.com/ARMmbed/mbedtls.git ${MBEDTLS_DIR} + cd ${MBEDTLS_DIR} + + CFLAGS=-fPIC cmake -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . + cmake --build . + + if [ -z "$SKIP_MBEDTLS_INSTALL" ]; then + make install + fi +fi
  53. Download patch debian/libgit2/deps/ntlmclient/crypt_mbedtls.h

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/crypt_mbedtls.h 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/crypt_mbedtls.h 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,18 @@ +/* + * Copyright (c) Edward Thomson. All rights reserved. + * + * This file is part of ntlmclient, distributed under the MIT license. + * For full terms and copyright information, and for third-party + * copyright information, see the included LICENSE.txt file. + */ + +#ifndef PRIVATE_CRYPT_MBEDTLS_H__ +#define PRIVATE_CRYPT_MBEDTLS_H__ + +#include "mbedtls/md.h" + +typedef struct { + mbedtls_md_context_t mbed; +} ntlm_hmac_ctx; + +#endif /* PRIVATE_CRYPT_MBEDTLS_H__ */
  54. Download patch debian/libgit2/deps/ntlmclient/crypt.h

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/crypt.h 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/crypt.h 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,64 @@ +/* + * Copyright (c) Edward Thomson. All rights reserved. + * + * This file is part of ntlmclient, distributed under the MIT license. + * For full terms and copyright information, and for third-party + * copyright information, see the included LICENSE.txt file. + */ + +#ifndef PRIVATE_CRYPT_COMMON_H__ +#define PRIVATE_CRYPT_COMMON_H__ + +#if defined(CRYPT_OPENSSL) +# include "crypt_openssl.h" +#elif defined(CRYPT_MBEDTLS) +# include "crypt_mbedtls.h" +#elif defined(CRYPT_COMMONCRYPTO) +# include "crypt_commoncrypto.h" +#else +# error "no crypto support" +#endif + +#define CRYPT_DES_BLOCKSIZE 8 +#define CRYPT_MD4_DIGESTSIZE 16 +#define CRYPT_MD5_DIGESTSIZE 16 + +typedef unsigned char ntlm_des_block[CRYPT_DES_BLOCKSIZE]; + +extern bool ntlm_random_bytes( + ntlm_client *ntlm, + unsigned char *out, + size_t len); + +extern bool ntlm_des_encrypt( + ntlm_des_block *out, + ntlm_des_block *plaintext, + ntlm_des_block *key); + +extern bool ntlm_md4_digest( + unsigned char out[CRYPT_MD4_DIGESTSIZE], + const unsigned char *in, + size_t in_len); + +extern ntlm_hmac_ctx *ntlm_hmac_ctx_init(void); + +extern bool ntlm_hmac_ctx_reset(ntlm_hmac_ctx *ctx); + +extern bool ntlm_hmac_md5_init( + ntlm_hmac_ctx *ctx, + const unsigned char *key, + size_t key_len); + +extern bool ntlm_hmac_md5_update( + ntlm_hmac_ctx *ctx, + const unsigned char *data, + size_t data_len); + +extern bool ntlm_hmac_md5_final( + unsigned char *out, + size_t *out_len, + ntlm_hmac_ctx *ctx); + +extern void ntlm_hmac_ctx_free(ntlm_hmac_ctx *ctx); + +#endif /* PRIVATE_CRYPT_COMMON_H__ */
  55. Download patch debian/libgit2/deps/http-parser/COPYING

    --- 0.37.0-3/debian/libgit2/deps/http-parser/COPYING 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/http-parser/COPYING 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,23 @@ +http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright +Igor Sysoev. + +Additional changes are licensed under the same terms as NGINX and +copyright Joyent, Inc. and other Node contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE.
  56. Download patch debian/libgit2/CMakeLists.txt
  57. Download patch debian/libgit2/cmake/Modules/EnableWarnings.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/EnableWarnings.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/EnableWarnings.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,15 @@ +MACRO(ENABLE_WARNINGS flag) + ADD_C_FLAG_IF_SUPPORTED(-W${flag}) +ENDMACRO() + +MACRO(DISABLE_WARNINGS flag) + ADD_C_FLAG_IF_SUPPORTED(-Wno-${flag}) +ENDMACRO() + +IF(ENABLE_WERROR) + IF(MSVC) + ADD_COMPILE_OPTIONS(-WX) + ELSE() + ADD_C_FLAG_IF_SUPPORTED(-Werror) + ENDIF() +ENDIF()
  58. Download patch CHANGELOG.md
  59. Download patch debian/libgit2/deps/ntlmclient/crypt_openssl.c

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/crypt_openssl.c 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/crypt_openssl.c 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * Copyright (c) Edward Thomson. All rights reserved. + * + * This file is part of ntlmclient, distributed under the MIT license. + * For full terms and copyright information, and for third-party + * copyright information, see the included LICENSE.txt file. + */ + +#include <stdlib.h> +#include <string.h> + +#include <openssl/rand.h> +#include <openssl/des.h> +#include <openssl/md4.h> +#include <openssl/hmac.h> +#include <openssl/err.h> + +#include "ntlm.h" +#include "compat.h" +#include "util.h" +#include "crypt.h" + +bool ntlm_random_bytes( + ntlm_client *ntlm, + unsigned char *out, + size_t len) +{ + int rc = RAND_bytes(out, len); + + if (rc != 1) { + ntlm_client_set_errmsg(ntlm, ERR_lib_error_string(ERR_get_error())); + return false; + } + + return true; +} + +bool ntlm_des_encrypt( + ntlm_des_block *out, + ntlm_des_block *plaintext, + ntlm_des_block *key) +{ + DES_key_schedule keysched; + + memset(out, 0, sizeof(ntlm_des_block)); + + DES_set_key(key, &keysched); + DES_ecb_encrypt(plaintext, out, &keysched, DES_ENCRYPT); + + return true; +} + +bool ntlm_md4_digest( + unsigned char out[CRYPT_MD4_DIGESTSIZE], + const unsigned char *in, + size_t in_len) +{ + MD4(in, in_len, out); + return true; +} + +#if OPENSSL_VERSION_NUMBER < 0x10100000L +static inline void HMAC_CTX_free(HMAC_CTX *ctx) +{ + if (ctx) + HMAC_CTX_cleanup(ctx); + + free(ctx); +} + +static inline int HMAC_CTX_reset(HMAC_CTX *ctx) +{ + HMAC_CTX_cleanup(ctx); + memzero(ctx, sizeof(HMAC_CTX)); + return 1; +} + +static inline HMAC_CTX *HMAC_CTX_new(void) +{ + return calloc(1, sizeof(HMAC_CTX)); +} +#endif + +ntlm_hmac_ctx *ntlm_hmac_ctx_init(void) +{ + return HMAC_CTX_new(); +} + +bool ntlm_hmac_ctx_reset(ntlm_hmac_ctx *ctx) +{ + return HMAC_CTX_reset(ctx); +} + +bool ntlm_hmac_md5_init( + ntlm_hmac_ctx *ctx, + const unsigned char *key, + size_t key_len) +{ + return HMAC_Init_ex(ctx, key, key_len, EVP_md5(), NULL); +} + +bool ntlm_hmac_md5_update( + ntlm_hmac_ctx *ctx, + const unsigned char *in, + size_t in_len) +{ + return HMAC_Update(ctx, in, in_len); +} + +bool ntlm_hmac_md5_final( + unsigned char *out, + size_t *out_len, + ntlm_hmac_ctx *ctx) +{ + unsigned int len; + + if (*out_len < CRYPT_MD5_DIGESTSIZE) + return false; + + if (!HMAC_Final(ctx, out, &len)) + return false; + + *out_len = len; + return true; +} + +void ntlm_hmac_ctx_free(ntlm_hmac_ctx *ctx) +{ + HMAC_CTX_free(ctx); +}
  60. Download patch debian/bootstrap.py
  61. Download patch debian/libgit2/azure-pipelines/test.sh
  62. Download patch debian/libgit2/deps/pcre/pcre_dfa_exec.c
  63. Download patch debian/libgit2/deps/pcre/COPYING

    --- 0.37.0-3/debian/libgit2/deps/pcre/COPYING 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/COPYING 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,5 @@ +PCRE LICENCE + +Please see the file LICENCE in the PCRE distribution for licensing details. + +End
  64. Download patch debian/libgit2/cmake/Modules/FindHTTP_Parser.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/FindHTTP_Parser.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/FindHTTP_Parser.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,39 @@ +# - Try to find http-parser +# +# Defines the following variables: +# +# HTTP_PARSER_FOUND - system has http-parser +# HTTP_PARSER_INCLUDE_DIR - the http-parser include directory +# HTTP_PARSER_LIBRARIES - Link these to use http-parser +# HTTP_PARSER_VERSION_MAJOR - major version +# HTTP_PARSER_VERSION_MINOR - minor version +# HTTP_PARSER_VERSION_STRING - the version of http-parser found + +# Find the header and library +FIND_PATH(HTTP_PARSER_INCLUDE_DIR NAMES http_parser.h) +FIND_LIBRARY(HTTP_PARSER_LIBRARY NAMES http_parser libhttp_parser) + +# Found the header, read version +if (HTTP_PARSER_INCLUDE_DIR AND EXISTS "${HTTP_PARSER_INCLUDE_DIR}/http_parser.h") + FILE(READ "${HTTP_PARSER_INCLUDE_DIR}/http_parser.h" HTTP_PARSER_H) + IF (HTTP_PARSER_H) + STRING(REGEX REPLACE ".*#define[\t ]+HTTP_PARSER_VERSION_MAJOR[\t ]+([0-9]+).*" "\\1" HTTP_PARSER_VERSION_MAJOR "${HTTP_PARSER_H}") + STRING(REGEX REPLACE ".*#define[\t ]+HTTP_PARSER_VERSION_MINOR[\t ]+([0-9]+).*" "\\1" HTTP_PARSER_VERSION_MINOR "${HTTP_PARSER_H}") + SET(HTTP_PARSER_VERSION_STRING "${HTTP_PARSER_VERSION_MAJOR}.${HTTP_PARSER_VERSION_MINOR}") + ENDIF() + UNSET(HTTP_PARSER_H) +ENDIF() + +# Handle the QUIETLY and REQUIRED arguments and set HTTP_PARSER_FOUND +# to TRUE if all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(HTTP_Parser REQUIRED_VARS HTTP_PARSER_INCLUDE_DIR HTTP_PARSER_LIBRARY) + +# Hide advanced variables +MARK_AS_ADVANCED(HTTP_PARSER_INCLUDE_DIR HTTP_PARSER_LIBRARY) + +# Set standard variables +IF (HTTP_PARSER_FOUND) + SET(HTTP_PARSER_LIBRARIES ${HTTP_PARSER_LIBRARY}) + set(HTTP_PARSER_INCLUDE_DIRS ${HTTP_PARSER_INCLUDE_DIR}) +ENDIF()
  65. Download patch debian/libgit2/api.docurium

    --- 0.37.0-3/debian/libgit2/api.docurium 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/api.docurium 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,13 @@ +{ + "name": "libgit2", + "github": "libgit2/libgit2", + "input": "include", + "prefix": "git_", + "output": "docs", + "branch": "gh-pages", + "examples": "examples", + "legacy": { + "input": {"src/git": ["v0.1.0"], + "src/git2": ["v0.2.0", "v0.3.0"]} + } +}
  66. Download patch azure-pipelines.yml

    --- 0.37.0-3/azure-pipelines.yml 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/azure-pipelines.yml 2019-08-20 17:39:12.000000000 +0000 @@ -0,0 +1,91 @@ +trigger: + branches: + include: + - '*' + exclude: + - master +pr: +- master + +jobs: +- job: Linux + pool: + vmImage: ubuntu-16.04 + steps: + - template: ci/azure-test-all.yml + strategy: + matrix: + stable: + TOOLCHAIN: stable + beta: + TOOLCHAIN: beta + nightly: + TOOLCHAIN: nightly + variables: + OTHER_TARGET: i686-unknown-linux-gnu + +- job: macOS + pool: + vmImage: macos-10.13 + steps: + - template: ci/azure-test-all.yml + variables: + TOOLCHAIN: stable + OTHER_TARGET: i686-apple-darwin + +- job: Windows + pool: + vmImage: windows-2019 + steps: + - template: ci/azure-test-all.yml + strategy: + matrix: + x86_64-msvc: + TOOLCHAIN: stable-x86_64-pc-windows-msvc + OTHER_TARGET: i686-pc-windows-msvc +- job: rustfmt + pool: + vmImage: ubuntu-16.04 + steps: + - template: ci/azure-install-rust.yml + - bash: rustup component add rustfmt + displayName: "Install rustfmt" + - bash: cargo fmt --all -- --check + displayName: "Check rustfmt (cargo)" + - bash: cd crates/cargo-test-macro && cargo fmt --all -- --check + displayName: "Check rustfmt (cargo-test-macro)" + - bash: cd crates/crates-io && cargo fmt --all -- --check + displayName: "Check rustfmt (crates-io)" + - bash: cd crates/resolver-tests && cargo fmt --all -- --check + displayName: "Check rustfmt (resolver-tests)" + variables: + TOOLCHAIN: stable + +- job: resolver + pool: + vmImage: ubuntu-16.04 + steps: + - template: ci/azure-install-rust.yml + - bash: cargo test --manifest-path crates/resolver-tests/Cargo.toml + displayName: "Resolver tests" + variables: + TOOLCHAIN: stable + +- job: docs + pool: + vmImage: ubuntu-16.04 + steps: + - template: ci/azure-install-rust.yml + - bash: | + set -e + mkdir mdbook + curl -Lf https://github.com/rust-lang-nursery/mdBook/releases/download/v0.3.1/mdbook-v0.3.1-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook + echo "##vso[task.prependpath]`pwd`/mdbook" + displayName: "Install mdbook" + - bash: cargo doc --no-deps + displayName: "Build documentation" + - bash: cd src/doc && mdbook build --dest-dir ../../target/doc + displayName: "Build mdbook documentation" + variables: + TOOLCHAIN: stable +
  67. Download patch debian/libgit2/deps/pcre/pcre_fullinfo.c
  68. Download patch debian/libgit2/COPYING
  69. Download patch crates/crates-io/Cargo.toml

    --- 0.37.0-3/crates/crates-io/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/crates/crates-io/Cargo.toml 2019-08-20 17:39:12.000000000 +0000 @@ -0,0 +1,24 @@ +[package] +name = "crates-io" +version = "0.27.0" +edition = "2018" +authors = ["Alex Crichton <alex@alexcrichton.com>"] +license = "MIT OR Apache-2.0" +repository = "https://github.com/rust-lang/cargo" +description = """ +Helpers for interacting with crates.io +""" + +[lib] +name = "crates_io" +path = "lib.rs" + +[dependencies] +curl = "0.4" +failure = "0.1.1" +http = "0.1" +percent-encoding = "2.0" +serde = { version = "1.0", features = ['derive'] } +serde_derive = "1.0" +serde_json = "1.0" +url = "2.0"
  70. Download patch debian/libgit2/deps/pcre/pcre_byte_order.c
  71. Download patch debian/libgit2/deps/ntlmclient/util.c

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/util.c 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/util.c 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,21 @@ +/* + * Copyright (c) Edward Thomson. All rights reserved. + * + * This file is part of ntlmclient, distributed under the MIT license. + * For full terms and copyright information, and for third-party + * copyright information, see the included LICENSE.txt file. + */ + +#include <stdlib.h> +#include <stdint.h> + +#include "compat.h" +#include "util.h" + +void memzero(void *data, size_t size) +{ + volatile uint8_t *scan = (volatile uint8_t *)data; + + while (size--) + *scan++ = 0x0; +}
  72. Download patch debian/libgit2/deps/ntlmclient/crypt_openssl.h

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/crypt_openssl.h 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/crypt_openssl.h 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,21 @@ +/* + * Copyright (c) Edward Thomson. All rights reserved. + * + * This file is part of ntlmclient, distributed under the MIT license. + * For full terms and copyright information, and for third-party + * copyright information, see the included LICENSE.txt file. + */ + +#ifndef PRIVATE_CRYPT_OPENSSL_H__ +#define PRIVATE_CRYPT_OPENSSL_H__ + +#include <openssl/hmac.h> + +/* OpenSSL 1.1.0 uses opaque structs, we'll reuse these. */ +#if OPENSSL_VERSION_NUMBER < 0x10100000L +typedef struct hmac_ctx_st ntlm_hmac_ctx; +#else +# define ntlm_hmac_ctx HMAC_CTX +#endif + +#endif /* PRIVATE_CRYPT_OPENSSL_H__ */
  73. Download patch crates/crates-io/LICENSE-APACHE
  74. Download patch debian/libgit2/azure-pipelines/build.sh

    --- 0.37.0-3/debian/libgit2/azure-pipelines/build.sh 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/azure-pipelines/build.sh 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +# +# Environment variables: +# +# SOURCE_DIR: Set to the directory of the libgit2 source (optional) +# If not set, it will be derived relative to this script. + +set -e + +SOURCE_DIR=${SOURCE_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" && dirname $( pwd ) )} +BUILD_DIR=$(pwd) +BUILD_PATH=${BUILD_PATH:=$PATH} +CMAKE=$(which cmake) + +indent() { sed "s/^/ /"; } + +echo "Source directory: ${SOURCE_DIR}" +echo "Build directory: ${BUILD_DIR}" +echo "" + +if [ "$(uname -s)" = "Darwin" ]; then + echo "macOS version:" + sw_vers | indent +fi + +if [ -f "/etc/debian_version" ]; then + echo "Debian version:" + lsb_release -a | indent +fi + +echo "Kernel version:" +uname -a 2>&1 | indent + +echo "CMake version:" +env PATH="$BUILD_PATH" "$CMAKE" --version 2>&1 | indent + +if test -n "$CC"; then + echo "Compiler version:" + "$CC" --version 2>&1 | indent +fi +echo "" + +echo "##############################################################################" +echo "## Configuring build environment" +echo "##############################################################################" + +echo cmake ${SOURCE_DIR} -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G \"${CMAKE_GENERATOR}\" ${CMAKE_OPTIONS} +env PATH="$BUILD_PATH" "$CMAKE" ${SOURCE_DIR} -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G "${CMAKE_GENERATOR}" ${CMAKE_OPTIONS} + +echo "" +echo "##############################################################################" +echo "## Building libgit2" +echo "##############################################################################" + +env PATH="$BUILD_PATH" "$CMAKE" --build .
  75. Download patch debian/libgit2/deps/pcre/pcre_refcount.c

    --- 0.37.0-3/debian/libgit2/deps/pcre/pcre_refcount.c 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/pcre_refcount.c 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,92 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2012 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains the external function pcre_refcount(), which is an +auxiliary function that can be used to maintain a reference count in a compiled +pattern data block. This might be helpful in applications where the block is +shared by different users. */ + + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "pcre_internal.h" + + +/************************************************* +* Maintain reference count * +*************************************************/ + +/* The reference count is a 16-bit field, initialized to zero. It is not +possible to transfer a non-zero count from one host to a different host that +has a different byte order - though I can't see why anyone in their right mind +would ever want to do that! + +Arguments: + argument_re points to compiled code + adjust value to add to the count + +Returns: the (possibly updated) count value (a non-negative number), or + a negative error number +*/ + +#if defined COMPILE_PCRE8 +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION +pcre_refcount(pcre *argument_re, int adjust) +#elif defined COMPILE_PCRE16 +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION +pcre16_refcount(pcre16 *argument_re, int adjust) +#elif defined COMPILE_PCRE32 +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION +pcre32_refcount(pcre32 *argument_re, int adjust) +#endif +{ +REAL_PCRE *re = (REAL_PCRE *)argument_re; +if (re == NULL) return PCRE_ERROR_NULL; +if (re->magic_number != MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC; +if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE; +re->ref_count = (-adjust > re->ref_count)? 0 : + (adjust + re->ref_count > 65535)? 65535 : + re->ref_count + adjust; +return re->ref_count; +} + +/* End of pcre_refcount.c */
  76. Download patch debian/libgit2/deps/pcre/pcreposix.c
  77. Download patch debian/libgit2/deps/ntlmclient/util.h

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/util.h 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/util.h 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,14 @@ +/* + * Copyright (c) Edward Thomson. All rights reserved. + * + * This file is part of ntlmclient, distributed under the MIT license. + * For full terms and copyright information, and for third-party + * copyright information, see the included LICENSE.txt file. + */ + +#ifndef PRIVATE_UTIL_H__ +#define PRIVATE_UTIL_H__ + +extern void memzero(void *data, size_t size); + +#endif /* PRIVATE_UTIL_H__ */
  78. Download patch debian/libgit2/deps/pcre/pcre_chartables.c
  79. Download patch debian/libgit2/deps/ntlmclient/compat.h

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/compat.h 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/compat.h 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * Copyright (c) Edward Thomson. All rights reserved. + * + * This file is part of ntlmclient, distributed under the MIT license. + * For full terms and copyright information, and for third-party + * copyright information, see the included LICENSE.txt file. + */ + +#ifndef PRIVATE_COMPAT_H__ +#define PRIVATE_COMPAT_H__ + +#if defined (_MSC_VER) + typedef unsigned char bool; +# ifndef true +# define true 1 +# endif +# ifndef false +# define false 0 +# endif +#else +# include <stdbool.h> +#endif + +#ifdef __linux__ +# include <endian.h> +# define htonll htobe64 +#endif + +#ifndef MIN +# define MIN(x, y) (((x) < (y)) ? (x) : (y)) +#endif + +#endif /* PRIVATE_COMPAT_H__ */
  80. Download patch crates/crates-io/LICENSE-MIT

    --- 0.37.0-3/crates/crates-io/LICENSE-MIT 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/crates/crates-io/LICENSE-MIT 2019-08-20 17:39:12.000000000 +0000 @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE.
  81. Download patch debian/libgit2/deps/pcre/CMakeLists.txt

    --- 0.37.0-3/debian/libgit2/deps/pcre/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/CMakeLists.txt 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,140 @@ +INCLUDE(CheckIncludeFile) +INCLUDE(CheckFunctionExists) +INCLUDE(CheckTypeSize) + +CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H) +CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H) +CHECK_INCLUDE_FILE(inttypes.h HAVE_INTTYPES_H) +CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H) +CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H) +CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H) +CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H) + +CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY) +CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE) +CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR) +CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL) +CHECK_FUNCTION_EXISTS(strtoq HAVE_STRTOQ) +CHECK_FUNCTION_EXISTS(_strtoi64 HAVE__STRTOI64) + +CHECK_TYPE_SIZE("long long" LONG_LONG) +CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG) + +DISABLE_WARNINGS(unused-function) +DISABLE_WARNINGS(implicit-fallthrough) + +# User-configurable options + +SET(SUPPORT_PCRE8 1) +SET(PCRE_LINK_SIZE "2") +SET(PCRE_PARENS_NEST_LIMIT "250") +SET(PCRE_MATCH_LIMIT "10000000") +SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT") +SET(PCRE_NEWLINE "LF") +SET(NO_RECURSE 1) +SET(PCRE_POSIX_MALLOC_THRESHOLD "10") +SET(BSR_ANYCRLF 0) + +IF (MINGW) + OPTION(NON_STANDARD_LIB_PREFIX + "ON=Shared libraries built in mingw will be named pcre.dll, etc., instead of libpcre.dll, etc." + OFF) + + OPTION(NON_STANDARD_LIB_SUFFIX + "ON=Shared libraries built in mingw will be named libpcre-0.dll, etc., instead of libpcre.dll, etc." + OFF) +ENDIF(MINGW) + +# Prepare build configuration + +SET(pcre_have_long_long 0) +SET(pcre_have_ulong_long 0) + +IF(HAVE_LONG_LONG) + SET(pcre_have_long_long 1) +ENDIF(HAVE_LONG_LONG) + +IF(HAVE_UNSIGNED_LONG_LONG) + SET(pcre_have_ulong_long 1) +ENDIF(HAVE_UNSIGNED_LONG_LONG) + +SET(NEWLINE "") + +IF(PCRE_NEWLINE STREQUAL "LF") + SET(NEWLINE "10") +ENDIF(PCRE_NEWLINE STREQUAL "LF") +IF(PCRE_NEWLINE STREQUAL "CR") + SET(NEWLINE "13") +ENDIF(PCRE_NEWLINE STREQUAL "CR") +IF(PCRE_NEWLINE STREQUAL "CRLF") + SET(NEWLINE "3338") +ENDIF(PCRE_NEWLINE STREQUAL "CRLF") +IF(PCRE_NEWLINE STREQUAL "ANY") + SET(NEWLINE "-1") +ENDIF(PCRE_NEWLINE STREQUAL "ANY") +IF(PCRE_NEWLINE STREQUAL "ANYCRLF") + SET(NEWLINE "-2") +ENDIF(PCRE_NEWLINE STREQUAL "ANYCRLF") + +IF(NEWLINE STREQUAL "") + MESSAGE(FATAL_ERROR "The PCRE_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\", \"ANYCRLF\".") +ENDIF(NEWLINE STREQUAL "") + +# Output files +CONFIGURE_FILE(config.h.in + ${PROJECT_BINARY_DIR}/src/pcre/config.h + @ONLY) + +# Source code + +SET(PCRE_HEADERS ${PROJECT_BINARY_DIR}/src/pcre/config.h) + +SET(PCRE_SOURCES + pcre_byte_order.c + pcre_chartables.c + pcre_compile.c + pcre_config.c + pcre_dfa_exec.c + pcre_exec.c + pcre_fullinfo.c + pcre_get.c + pcre_globals.c + pcre_jit_compile.c + pcre_maketables.c + pcre_newline.c + pcre_ord2utf8.c + pcre_refcount.c + pcre_string_utils.c + pcre_study.c + pcre_tables.c + pcre_ucd.c + pcre_valid_utf8.c + pcre_version.c + pcre_xclass.c +) + +SET(PCREPOSIX_HEADERS pcreposix.h) + +SET(PCREPOSIX_SOURCES pcreposix.c) + +# Fix static compilation with MSVC: https://bugs.exim.org/show_bug.cgi?id=1681 +# This code was taken from the CMake wiki, not from WebM. + +# Build setup + +ADD_DEFINITIONS(-DHAVE_CONFIG_H) + +IF(MSVC) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) +ENDIF(MSVC) + +SET(CMAKE_INCLUDE_CURRENT_DIR 1) + +SET(targets) + +# Libraries +# pcre +INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/src/pcre) +ADD_LIBRARY(pcre OBJECT ${PCRE_HEADERS} ${PCRE_SOURCES} ${PCREPOSIX_SOURCES}) + +# end CMakeLists.txt
  82. Download patch debian/libgit2/deps/ntlmclient/CMakeLists.txt

    --- 0.37.0-3/debian/libgit2/deps/ntlmclient/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/ntlmclient/CMakeLists.txt 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,20 @@ +FILE(GLOB SRC_NTLMCLIENT "ntlm.c" "unicode_builtin.c" "util.c") + +ADD_DEFINITIONS(-DNTLM_STATIC=1) + +DISABLE_WARNINGS(implicit-fallthrough) + +IF (HTTPS_BACKEND STREQUAL "SecureTransport") + ADD_DEFINITIONS(-DCRYPT_COMMONCRYPTO) + SET(SRC_NTLMCLIENT_CRYPTO "crypt_commoncrypto.c") +ELSEIF (HTTPS_BACKEND STREQUAL "OpenSSL") + ADD_DEFINITIONS(-DCRYPT_OPENSSL) + SET(SRC_NTLMCLIENT_CRYPTO "crypt_openssl.c") +ELSEIF (HTTPS_BACKEND STREQUAL "mbedTLS") + ADD_DEFINITIONS(-DCRYPT_MBEDTLS) + SET(SRC_NTLMCLIENT_CRYPTO "crypt_mbedtls.c") +ELSE () + MESSAGE(FATAL_ERROR "Unable to use libgit2's HTTPS backend (${HTTPS_BACKEND}) for NTLM crypto") +ENDIF() + +ADD_LIBRARY(ntlmclient OBJECT ${SRC_NTLMCLIENT} ${SRC_NTLMCLIENT_CRYPTO})
  83. Download patch debian/libgit2/cmake/Modules/SelectHashes.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/SelectHashes.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/SelectHashes.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,66 @@ +# Select a hash backend + +# USE_SHA1=CollisionDetection(ON)/HTTPS/Generic/OFF + +IF(USE_SHA1 STREQUAL ON OR USE_SHA1 STREQUAL "CollisionDetection") + SET(SHA1_BACKEND "CollisionDetection") +ELSEIF(USE_SHA1 STREQUAL "HTTPS") + message("Checking HTTPS backend… ${HTTPS_BACKEND}") + IF(HTTPS_BACKEND STREQUAL "SecureTransport") + SET(SHA1_BACKEND "CommonCrypto") + ELSEIF(HTTPS_BACKEND STREQUAL "WinHTTP") + SET(SHA1_BACKEND "Win32") + ELSEIF(HTTPS_BACKEND) + SET(SHA1_BACKEND ${HTTPS_BACKEND}) + ELSE() + ENDIF() + IF(NOT HTTPS_BACKEND) + SET(SHA1_BACKEND "CollisionDetection") + ENDIF() + message(STATUS "Using SHA1 backend ${SHA1_BACKEND}") +ELSEIF(USE_SHA1 STREQUAL "Generic") + SET(SHA1_BACKEND "Generic") +# ELSEIF(NOT USE_SHA1) +ELSE() + MESSAGE(FATAL_ERROR "Invalid value for USE_SHA1: ${USE_SHA1}") +ENDIF() + +IF(SHA1_BACKEND STREQUAL "CollisionDetection") + SET(GIT_SHA1_COLLISIONDETECT 1) + ADD_DEFINITIONS(-DSHA1DC_NO_STANDARD_INCLUDES=1) + ADD_DEFINITIONS(-DSHA1DC_CUSTOM_INCLUDE_SHA1_C=\"common.h\") + ADD_DEFINITIONS(-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=\"common.h\") + FILE(GLOB SRC_SHA1 hash/sha1/collisiondetect.* hash/sha1/sha1dc/*) +ELSEIF(SHA1_BACKEND STREQUAL "OpenSSL") + # OPENSSL_FOUND should already be set, we're checking HTTPS_BACKEND + + SET(GIT_SHA1_OPENSSL 1) + IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + LIST(APPEND LIBGIT2_PC_LIBS "-lssl") + ELSE() + LIST(APPEND LIBGIT2_PC_REQUIRES "openssl") + ENDIF() + FILE(GLOB SRC_SHA1 hash/sha1/openssl.*) +ELSEIF(SHA1_BACKEND STREQUAL "CommonCrypto") + SET(GIT_SHA1_COMMON_CRYPTO 1) + FILE(GLOB SRC_SHA1 hash/sha1/common_crypto.*) +ELSEIF(SHA1_BACKEND STREQUAL "mbedTLS") + SET(GIT_SHA1_MBEDTLS 1) + FILE(GLOB SRC_SHA1 hash/sha1/mbedtls.*) + LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${MBEDTLS_INCLUDE_DIR}) + LIST(APPEND LIBGIT2_LIBS ${MBEDTLS_LIBRARIES}) + # mbedTLS has no pkgconfig file, hence we can't require it + # https://github.com/ARMmbed/mbedtls/issues/228 + # For now, pass its link flags as our own + LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES}) +ELSEIF(SHA1_BACKEND STREQUAL "Win32") + SET(GIT_SHA1_WIN32 1) + FILE(GLOB SRC_SHA1 hash/sha1/win32.*) +ELSEIF(SHA1_BACKEND STREQUAL "Generic") + FILE(GLOB SRC_SHA1 hash/sha1/generic.*) +# ELSEIF(NOT USE_SHA1) +ELSE() + MESSAGE(FATAL_ERROR "Asked for unknown SHA1 backend: ${SHA1_BACKEND}") +ENDIF() + +ADD_FEATURE_INFO(SHA ON "using ${SHA1_BACKEND}")
  84. Download patch debian/libgit2/deps/pcre/pcreposix.h

    --- 0.37.0-3/debian/libgit2/deps/pcre/pcreposix.h 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/pcreposix.h 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,117 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +#ifndef _PCREPOSIX_H +#define _PCREPOSIX_H + +/* This is the header for the POSIX wrapper interface to the PCRE Perl- +Compatible Regular Expression library. It defines the things POSIX says should +be there. I hope. + + Copyright (c) 1997-2012 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + +/* Have to include stdlib.h in order to ensure that size_t is defined. */ + +#include <stdlib.h> + +#define PCREPOSIX_EXP_DEFN extern +#define PCREPOSIX_EXP_DECL extern + +/* Options, mostly defined by POSIX, but with some extras. */ + +#define PCRE_REG_ICASE 0x0001 /* Maps to PCRE_CASELESS */ +#define PCRE_REG_NEWLINE 0x0002 /* Maps to PCRE_MULTILINE */ +#define PCRE_REG_NOTBOL 0x0004 /* Maps to PCRE_NOTBOL */ +#define PCRE_REG_NOTEOL 0x0008 /* Maps to PCRE_NOTEOL */ +#define PCRE_REG_DOTALL 0x0010 /* NOT defined by POSIX; maps to PCRE_DOTALL */ +#define PCRE_REG_NOSUB 0x0020 /* Maps to PCRE_NO_AUTO_CAPTURE */ +#define PCRE_REG_UTF8 0x0040 /* NOT defined by POSIX; maps to PCRE_UTF8 */ +#define PCRE_REG_STARTEND 0x0080 /* BSD feature: pass subject string by so,eo */ +#define PCRE_REG_NOTEMPTY 0x0100 /* NOT defined by POSIX; maps to PCRE_NOTEMPTY */ +#define PCRE_REG_UNGREEDY 0x0200 /* NOT defined by POSIX; maps to PCRE_UNGREEDY */ +#define PCRE_REG_UCP 0x0400 /* NOT defined by POSIX; maps to PCRE_UCP */ + +/* This is not used by PCRE, but by defining it we make it easier +to slot PCRE into existing programs that make POSIX calls. */ + +#define PCRE_REG_EXTENDED 0 + +/* Error values. Not all these are relevant or used by the wrapper. */ + +enum { + PCRE_REG_ASSERT = 1, /* internal error ? */ + PCRE_REG_BADBR, /* invalid repeat counts in {} */ + PCRE_REG_BADPAT, /* pattern error */ + PCRE_REG_BADRPT, /* ? * + invalid */ + PCRE_REG_EBRACE, /* unbalanced {} */ + PCRE_REG_EBRACK, /* unbalanced [] */ + PCRE_REG_ECOLLATE, /* collation error - not relevant */ + PCRE_REG_ECTYPE, /* bad class */ + PCRE_REG_EESCAPE, /* bad escape sequence */ + PCRE_REG_EMPTY, /* empty expression */ + PCRE_REG_EPAREN, /* unbalanced () */ + PCRE_REG_ERANGE, /* bad range inside [] */ + PCRE_REG_ESIZE, /* expression too big */ + PCRE_REG_ESPACE, /* failed to get memory */ + PCRE_REG_ESUBREG, /* bad back reference */ + PCRE_REG_INVARG, /* bad argument */ + PCRE_REG_NOMATCH /* match failed */ +}; + + +/* The structure representing a compiled regular expression. */ + +typedef struct { + void *re_pcre; + size_t re_nsub; + size_t re_erroffset; +} pcre_regex_t; + +/* The structure in which a captured offset is returned. */ + +typedef int pcre_regoff_t; + +typedef struct { + pcre_regoff_t rm_so; + pcre_regoff_t rm_eo; +} pcre_regmatch_t; + +/* The functions */ + +PCREPOSIX_EXP_DECL int pcre_regcomp(pcre_regex_t *, const char *, int); +PCREPOSIX_EXP_DECL int pcre_regexec(const pcre_regex_t *, const char *, size_t, + pcre_regmatch_t *, int); +PCREPOSIX_EXP_DECL size_t pcre_regerror(int, const pcre_regex_t *, char *, size_t); +PCREPOSIX_EXP_DECL void pcre_regfree(pcre_regex_t *); + +#endif /* End of pcreposix.h */
  85. Download patch debian/libgit2/deps/pcre/pcre_maketables.c

    --- 0.37.0-3/debian/libgit2/deps/pcre/pcre_maketables.c 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/pcre_maketables.c 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,156 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2012 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains the external function pcre_maketables(), which builds +character tables for PCRE in the current locale. The file is compiled on its +own as part of the PCRE library. However, it is also included in the +compilation of dftables.c, in which case the macro DFTABLES is defined. */ + + +#ifndef DFTABLES +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif +# include "pcre_internal.h" +#endif + + +/************************************************* +* Create PCRE character tables * +*************************************************/ + +/* This function builds a set of character tables for use by PCRE and returns +a pointer to them. They are build using the ctype functions, and consequently +their contents will depend upon the current locale setting. When compiled as +part of the library, the store is obtained via PUBL(malloc)(), but when +compiled inside dftables, use malloc(). + +Arguments: none +Returns: pointer to the contiguous block of data +*/ + +#if defined COMPILE_PCRE8 +const unsigned char * +pcre_maketables(void) +#elif defined COMPILE_PCRE16 +const unsigned char * +pcre16_maketables(void) +#elif defined COMPILE_PCRE32 +const unsigned char * +pcre32_maketables(void) +#endif +{ +unsigned char *yield, *p; +int i; + +#ifndef DFTABLES +yield = (unsigned char*)(PUBL(malloc))(tables_length); +#else +yield = (unsigned char*)malloc(tables_length); +#endif + +if (yield == NULL) return NULL; +p = yield; + +/* First comes the lower casing table */ + +for (i = 0; i < 256; i++) *p++ = tolower(i); + +/* Next the case-flipping table */ + +for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i); + +/* Then the character class tables. Don't try to be clever and save effort on +exclusive ones - in some locales things may be different. + +Note that the table for "space" includes everything "isspace" gives, including +VT in the default locale. This makes it work for the POSIX class [:space:]. +From release 8.34 is is also correct for Perl space, because Perl added VT at +release 5.18. + +Note also that it is possible for a character to be alnum or alpha without +being lower or upper, such as "male and female ordinals" (\xAA and \xBA) in the +fr_FR locale (at least under Debian Linux's locales as of 12/2005). So we must +test for alnum specially. */ + +memset(p, 0, cbit_length); +for (i = 0; i < 256; i++) + { + if (isdigit(i)) p[cbit_digit + i/8] |= 1 << (i&7); + if (isupper(i)) p[cbit_upper + i/8] |= 1 << (i&7); + if (islower(i)) p[cbit_lower + i/8] |= 1 << (i&7); + if (isalnum(i)) p[cbit_word + i/8] |= 1 << (i&7); + if (i == '_') p[cbit_word + i/8] |= 1 << (i&7); + if (isspace(i)) p[cbit_space + i/8] |= 1 << (i&7); + if (isxdigit(i))p[cbit_xdigit + i/8] |= 1 << (i&7); + if (isgraph(i)) p[cbit_graph + i/8] |= 1 << (i&7); + if (isprint(i)) p[cbit_print + i/8] |= 1 << (i&7); + if (ispunct(i)) p[cbit_punct + i/8] |= 1 << (i&7); + if (iscntrl(i)) p[cbit_cntrl + i/8] |= 1 << (i&7); + } +p += cbit_length; + +/* Finally, the character type table. In this, we used to exclude VT from the +white space chars, because Perl didn't recognize it as such for \s and for +comments within regexes. However, Perl changed at release 5.18, so PCRE changed +at release 8.34. */ + +for (i = 0; i < 256; i++) + { + int x = 0; + if (isspace(i)) x += ctype_space; + if (isalpha(i)) x += ctype_letter; + if (isdigit(i)) x += ctype_digit; + if (isxdigit(i)) x += ctype_xdigit; + if (isalnum(i) || i == '_') x += ctype_word; + + /* Note: strchr includes the terminating zero in the characters it considers. + In this instance, that is ok because we want binary zero to be flagged as a + meta-character, which in this sense is any character that terminates a run + of data characters. */ + + if (strchr("\\*+?{^.$|()[", i) != 0) x += ctype_meta; + *p++ = x; + } + +return yield; +} + +/* End of pcre_maketables.c */
  86. Download patch debian/libgit2/cmake/Modules/FindStatNsec.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/FindStatNsec.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/FindStatNsec.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,26 @@ +INCLUDE(FeatureSummary) + +CHECK_STRUCT_HAS_MEMBER ("struct stat" st_mtim "sys/types.h;sys/stat.h" + HAVE_STRUCT_STAT_ST_MTIM LANGUAGE C) +CHECK_STRUCT_HAS_MEMBER ("struct stat" st_mtimespec "sys/types.h;sys/stat.h" + HAVE_STRUCT_STAT_ST_MTIMESPEC LANGUAGE C) +CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtime_nsec sys/stat.h + HAVE_STRUCT_STAT_MTIME_NSEC LANGUAGE C) + +IF (HAVE_STRUCT_STAT_ST_MTIM) + CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtim.tv_nsec sys/stat.h + HAVE_STRUCT_STAT_NSEC LANGUAGE C) +ELSEIF (HAVE_STRUCT_STAT_ST_MTIMESPEC) + CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtimespec.tv_nsec sys/stat.h + HAVE_STRUCT_STAT_NSEC LANGUAGE C) +ELSE () + SET( HAVE_STRUCT_STAT_NSEC ON ) +ENDIF() + +IF (HAVE_STRUCT_STAT_NSEC OR WIN32) + OPTION( USE_NSEC "Care about sub-second file mtimes and ctimes" ON ) +ELSE() + SET(USE_NSEC OFF) +ENDIF() + +ADD_FEATURE_INFO(nanoseconds USE_NSEC "whether to use sub-second file mtimes and ctimes")
  87. Download patch debian/libgit2/deps/pcre/pcre.h
  88. Download patch debian/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake

    --- 0.37.0-3/debian/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake 2019-07-22 10:02:38.000000000 +0000 @@ -0,0 +1,58 @@ +# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... ) +# This macro is intended to be used in FindXXX.cmake modules files. +# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and +# it also sets the <UPPERCASED_NAME>_FOUND variable. +# The package is found if all variables listed are TRUE. +# Example: +# +# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) +# +# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and +# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE. +# If it is not found and REQUIRED was used, it fails with FATAL_ERROR, +# independent whether QUIET was used or not. +# If it is found, the location is reported using the VAR1 argument, so +# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out. +# If the second argument is DEFAULT_MSG, the message in the failure case will +# be "Could NOT find LibXml2", if you don't like this message you can specify +# your own custom failure message there. + +MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 ) + + IF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG") + IF (${_NAME}_FIND_REQUIRED) + SET(_FAIL_MESSAGE "Could not find REQUIRED package ${_NAME}") + ELSE (${_NAME}_FIND_REQUIRED) + SET(_FAIL_MESSAGE "Could not find OPTIONAL package ${_NAME}") + ENDIF (${_NAME}_FIND_REQUIRED) + ELSE("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG") + SET(_FAIL_MESSAGE "${_FAIL_MSG}") + ENDIF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG") + + STRING(TOUPPER ${_NAME} _NAME_UPPER) + + SET(${_NAME_UPPER}_FOUND TRUE) + IF(NOT ${_VAR1}) + SET(${_NAME_UPPER}_FOUND FALSE) + ENDIF(NOT ${_VAR1}) + + FOREACH(_CURRENT_VAR ${ARGN}) + IF(NOT ${_CURRENT_VAR}) + SET(${_NAME_UPPER}_FOUND FALSE) + ENDIF(NOT ${_CURRENT_VAR}) + ENDFOREACH(_CURRENT_VAR) + + IF (${_NAME_UPPER}_FOUND) + IF (NOT ${_NAME}_FIND_QUIETLY) + MESSAGE(STATUS "Found ${_NAME}: ${${_VAR1}}") + ENDIF (NOT ${_NAME}_FIND_QUIETLY) + ELSE (${_NAME_UPPER}_FOUND) + IF (${_NAME}_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "${_FAIL_MESSAGE}") + ELSE (${_NAME}_FIND_REQUIRED) + IF (NOT ${_NAME}_FIND_QUIETLY) + MESSAGE(STATUS "${_FAIL_MESSAGE}") + ENDIF (NOT ${_NAME}_FIND_QUIETLY) + ENDIF (${_NAME}_FIND_REQUIRED) + ENDIF (${_NAME_UPPER}_FOUND) +ENDMACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  89. Download patch debian/libgit2/azure-pipelines/docker.yml

    --- 0.37.0-3/debian/libgit2/azure-pipelines/docker.yml 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/azure-pipelines/docker.yml 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,37 @@ +# These are the steps used in a container-based build in VSTS. +steps: +- ${{ if eq(parameters.qemu, 'true') }}: + - script: docker run --rm --privileged multiarch/qemu-user-static:register --reset + displayName: 'Register Docker QEMU' + +- task: docker@0 + displayName: Build + inputs: + action: 'Run an image' + imageName: ${{ parameters.imageName }} + volumes: | + $(Build.SourcesDirectory):/src + $(Build.BinariesDirectory):/build + envVars: ${{ parameters.environmentVariables }} + workDir: '/build' + containerCommand: '/src/azure-pipelines/build.sh' + detached: false +- task: docker@0 + displayName: Test + inputs: + action: 'Run an image' + imageName: ${{ parameters.imageName }} + volumes: | + $(Build.SourcesDirectory):/src + $(Build.BinariesDirectory):/build + envVars: ${{ parameters.environmentVariables }} + workDir: '/build' + containerCommand: '/src/azure-pipelines/test.sh' + detached: false +- task: publishtestresults@2 + displayName: Publish Test Results + condition: succeededOrFailed() + inputs: + testResultsFiles: 'results_*.xml' + searchFolder: '$(Build.BinariesDirectory)' + mergeTestResults: true
  90. Download patch appveyor.yml

    --- 0.37.0-3/appveyor.yml 2019-05-15 19:48:47.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/appveyor.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -environment: - matrix: - - TARGET: x86_64-pc-windows-msvc - OTHER_TARGET: i686-pc-windows-msvc - -install: - - if NOT defined APPVEYOR_PULL_REQUEST_NUMBER if "%APPVEYOR_REPO_BRANCH%" == "master" appveyor exit - - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - - rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain nightly - - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - - if defined OTHER_TARGET rustup target add %OTHER_TARGET% - - rustc -V - - cargo -V - - git submodule update --init - -clone_depth: 1 - -build: false - -test_script: - - cargo test --features=deny-warnings
  91. Download patch debian/libgit2/deps/pcre/pcre_config.c

    --- 0.37.0-3/debian/libgit2/deps/pcre/pcre_config.c 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/pcre_config.c 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,190 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2012 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains the external function pcre_config(). */ + + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +/* Keep the original link size. */ +static int real_link_size = LINK_SIZE; + +#include "pcre_internal.h" + + +/************************************************* +* Return info about what features are configured * +*************************************************/ + +/* This function has an extensible interface so that additional items can be +added compatibly. + +Arguments: + what what information is required + where where to put the information + +Returns: 0 if data returned, negative on error +*/ + +#if defined COMPILE_PCRE8 +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION +pcre_config(int what, void *where) +#elif defined COMPILE_PCRE16 +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION +pcre16_config(int what, void *where) +#elif defined COMPILE_PCRE32 +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION +pcre32_config(int what, void *where) +#endif +{ +switch (what) + { + case PCRE_CONFIG_UTF8: +#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32 + *((int *)where) = 0; + return PCRE_ERROR_BADOPTION; +#else +#if defined SUPPORT_UTF + *((int *)where) = 1; +#else + *((int *)where) = 0; +#endif + break; +#endif + + case PCRE_CONFIG_UTF16: +#if defined COMPILE_PCRE8 || defined COMPILE_PCRE32 + *((int *)where) = 0; + return PCRE_ERROR_BADOPTION; +#else +#if defined SUPPORT_UTF + *((int *)where) = 1; +#else + *((int *)where) = 0; +#endif + break; +#endif + + case PCRE_CONFIG_UTF32: +#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16 + *((int *)where) = 0; + return PCRE_ERROR_BADOPTION; +#else +#if defined SUPPORT_UTF + *((int *)where) = 1; +#else + *((int *)where) = 0; +#endif + break; +#endif + + case PCRE_CONFIG_UNICODE_PROPERTIES: +#ifdef SUPPORT_UCP + *((int *)where) = 1; +#else + *((int *)where) = 0; +#endif + break; + + case PCRE_CONFIG_JIT: +#ifdef SUPPORT_JIT + *((int *)where) = 1; +#else + *((int *)where) = 0; +#endif + break; + + case PCRE_CONFIG_JITTARGET: +#ifdef SUPPORT_JIT + *((const char **)where) = PRIV(jit_get_target)(); +#else + *((const char **)where) = NULL; +#endif + break; + + case PCRE_CONFIG_NEWLINE: + *((int *)where) = NEWLINE; + break; + + case PCRE_CONFIG_BSR: +#ifdef BSR_ANYCRLF + *((int *)where) = 1; +#else + *((int *)where) = 0; +#endif + break; + + case PCRE_CONFIG_LINK_SIZE: + *((int *)where) = real_link_size; + break; + + case PCRE_CONFIG_POSIX_MALLOC_THRESHOLD: + *((int *)where) = POSIX_MALLOC_THRESHOLD; + break; + + case PCRE_CONFIG_PARENS_LIMIT: + *((unsigned long int *)where) = PARENS_NEST_LIMIT; + break; + + case PCRE_CONFIG_MATCH_LIMIT: + *((unsigned long int *)where) = MATCH_LIMIT; + break; + + case PCRE_CONFIG_MATCH_LIMIT_RECURSION: + *((unsigned long int *)where) = MATCH_LIMIT_RECURSION; + break; + + case PCRE_CONFIG_STACKRECURSE: +#ifdef NO_RECURSE + *((int *)where) = 0; +#else + *((int *)where) = 1; +#endif + break; + + default: return PCRE_ERROR_BADOPTION; + } + +return 0; +} + +/* End of pcre_config.c */
  92. Download patch debian/libgit2/deps/pcre/config.h.in

    --- 0.37.0-3/debian/libgit2/deps/pcre/config.h.in 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/config.h.in 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,57 @@ +/* config.h for CMake builds */ + +#cmakedefine HAVE_DIRENT_H 1 +#cmakedefine HAVE_SYS_STAT_H 1 +#cmakedefine HAVE_SYS_TYPES_H 1 +#cmakedefine HAVE_UNISTD_H 1 +#cmakedefine HAVE_WINDOWS_H 1 +#cmakedefine HAVE_STDINT_H 1 +#cmakedefine HAVE_INTTYPES_H 1 + +#cmakedefine HAVE_TYPE_TRAITS_H 1 +#cmakedefine HAVE_BITS_TYPE_TRAITS_H 1 + +#cmakedefine HAVE_BCOPY 1 +#cmakedefine HAVE_MEMMOVE 1 +#cmakedefine HAVE_STRERROR 1 +#cmakedefine HAVE_STRTOLL 1 +#cmakedefine HAVE_STRTOQ 1 +#cmakedefine HAVE__STRTOI64 1 + +#cmakedefine PCRE_STATIC 1 + +#cmakedefine SUPPORT_PCRE8 1 +#cmakedefine SUPPORT_PCRE16 1 +#cmakedefine SUPPORT_PCRE32 1 +#cmakedefine SUPPORT_JIT 1 +#cmakedefine SUPPORT_PCREGREP_JIT 1 +#cmakedefine SUPPORT_UTF 1 +#cmakedefine SUPPORT_UCP 1 +#cmakedefine EBCDIC 1 +#cmakedefine EBCDIC_NL25 1 +#cmakedefine BSR_ANYCRLF 1 +#cmakedefine NO_RECURSE 1 + +#cmakedefine HAVE_LONG_LONG 1 +#cmakedefine HAVE_UNSIGNED_LONG_LONG 1 + +#cmakedefine SUPPORT_LIBBZ2 1 +#cmakedefine SUPPORT_LIBZ 1 +#cmakedefine SUPPORT_LIBEDIT 1 +#cmakedefine SUPPORT_LIBREADLINE 1 + +#cmakedefine SUPPORT_VALGRIND 1 +#cmakedefine SUPPORT_GCOV 1 + +#define NEWLINE @NEWLINE@ +#define POSIX_MALLOC_THRESHOLD @PCRE_POSIX_MALLOC_THRESHOLD@ +#define LINK_SIZE @PCRE_LINK_SIZE@ +#define PARENS_NEST_LIMIT @PCRE_PARENS_NEST_LIMIT@ +#define MATCH_LIMIT @PCRE_MATCH_LIMIT@ +#define MATCH_LIMIT_RECURSION @PCRE_MATCH_LIMIT_RECURSION@ +#define PCREGREP_BUFSIZE @PCREGREP_BUFSIZE@ + +#define MAX_NAME_SIZE 32 +#define MAX_NAME_COUNT 10000 + +/* end config.h for CMake builds */
  93. Download patch debian/libgit2/cmake/Modules/AddCFlagIfSupported.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/AddCFlagIfSupported.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/AddCFlagIfSupported.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,30 @@ +# - Append compiler flag to CMAKE_C_FLAGS if compiler supports it +# ADD_C_FLAG_IF_SUPPORTED(<flag>) +# <flag> - the compiler flag to test +# This internally calls the CHECK_C_COMPILER_FLAG macro. + +INCLUDE(CheckCCompilerFlag) + +MACRO(ADD_C_FLAG _FLAG) + STRING(TOUPPER ${_FLAG} UPCASE) + STRING(REGEX REPLACE "[-=]" "_" UPCASE_PRETTY ${UPCASE}) + STRING(REGEX REPLACE "^_+" "" UPCASE_PRETTY ${UPCASE_PRETTY}) + CHECK_C_COMPILER_FLAG(${_FLAG} IS_${UPCASE_PRETTY}_SUPPORTED) + + IF(IS_${UPCASE_PRETTY}_SUPPORTED) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_FLAG}") + ELSE() + MESSAGE(FATAL_ERROR "Required flag ${_FLAG} is not supported") + ENDIF() +ENDMACRO() + +MACRO(ADD_C_FLAG_IF_SUPPORTED _FLAG) + STRING(TOUPPER ${_FLAG} UPCASE) + STRING(REGEX REPLACE "[-=]" "_" UPCASE_PRETTY ${UPCASE}) + STRING(REGEX REPLACE "^_+" "" UPCASE_PRETTY ${UPCASE_PRETTY}) + CHECK_C_COMPILER_FLAG(${_FLAG} IS_${UPCASE_PRETTY}_SUPPORTED) + + IF(IS_${UPCASE_PRETTY}_SUPPORTED) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_FLAG}") + ENDIF() +ENDMACRO()
  94. Download patch debian/libgit2/cmake/Modules/FindSecurity.cmake

    --- 0.37.0-3/debian/libgit2/cmake/Modules/FindSecurity.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/cmake/Modules/FindSecurity.cmake 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,28 @@ +# Find Security.framework +# This will define : +# +# SECURITY_FOUND +# SECURITY_LIBRARIES +# SECURITY_LDFLAGS +# SECURITY_HAS_SSLCREATECONTEXT +# + +FIND_PATH(SECURITY_INCLUDE_DIR NAMES Security/Security.h) +FIND_LIBRARY(SECURITY_LIBRARIES NAMES Security) +IF (SECURITY_INCLUDE_DIR AND SECURITY_LIBRARIES) + IF (NOT Security_FIND_QUIETLY) + MESSAGE("-- Found Security ${SECURITY_LIBRARIES}") + ENDIF() + SET(SECURITY_FOUND TRUE) + SET(SECURITY_LDFLAGS "-framework Security") + CHECK_LIBRARY_EXISTS("${SECURITY_LIBRARIES}" SSLCreateContext "Security/SecureTransport.h" SECURITY_HAS_SSLCREATECONTEXT) +ENDIF () + +IF (Security_FIND_REQUIRED AND NOT SECURITY_FOUND) + MESSAGE(FATAL "-- Security not found") +ENDIF() + +MARK_AS_ADVANCED( + SECURITY_INCLUDE_DIR + SECURITY_LIBRARIES +)
  95. Download patch debian/libgit2/deps/pcre/pcre_globals.c

    --- 0.37.0-3/debian/libgit2/deps/pcre/pcre_globals.c 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/pcre_globals.c 2019-10-25 07:20:34.000000000 +0000 @@ -0,0 +1,86 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2014 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains global variables that are exported by the PCRE library. +PCRE is thread-clean and doesn't use any global variables in the normal sense. +However, it calls memory allocation and freeing functions via the four +indirections below, and it can optionally do callouts, using the fifth +indirection. These values can be changed by the caller, but are shared between +all threads. + +For MS Visual Studio and Symbian OS, there are problems in initializing these +variables to non-local functions. In these cases, therefore, an indirection via +a local function is used. + +Also, when compiling for Virtual Pascal, things are done differently, and +global variables are not used. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "pcre_internal.h" + +#if defined _MSC_VER || defined __SYMBIAN32__ +static void* LocalPcreMalloc(size_t aSize) + { + return malloc(aSize); + } +static void LocalPcreFree(void* aPtr) + { + free(aPtr); + } +PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = LocalPcreMalloc; +PCRE_EXP_DATA_DEFN void (*PUBL(free))(void *) = LocalPcreFree; +PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = LocalPcreMalloc; +PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = LocalPcreFree; +PCRE_EXP_DATA_DEFN int (*PUBL(callout))(PUBL(callout_block) *) = NULL; +PCRE_EXP_DATA_DEFN int (*PUBL(stack_guard))(void) = NULL; + +#elif !defined VPCOMPAT +PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = malloc; +PCRE_EXP_DATA_DEFN void (*PUBL(free))(void *) = free; +PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = malloc; +PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = free; +PCRE_EXP_DATA_DEFN int (*PUBL(callout))(PUBL(callout_block) *) = NULL; +PCRE_EXP_DATA_DEFN int (*PUBL(stack_guard))(void) = NULL; +#endif + +/* End of pcre_globals.c */
  96. Download patch crates/cargo-test-macro/Cargo.toml

    --- 0.37.0-3/crates/cargo-test-macro/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/crates/cargo-test-macro/Cargo.toml 2019-08-20 17:39:12.000000000 +0000 @@ -0,0 +1,13 @@ +[package] +name = "cargo-test-macro" +version = "0.1.0" +authors = ["Jethro Beekman <jethro@fortanix.com>"] +edition = "2018" +license = "MIT OR Apache-2.0" +homepage = "https://github.com/rust-lang/cargo" +repository = "https://github.com/rust-lang/cargo" +documentation = "https://github.com/rust-lang/cargo" +description = "Helper proc-macro for Cargo's testsuite." + +[lib] +proc-macro = true
  97. Download patch debian/copyright
  98. Download patch debian/libgit2/deps/pcre/pcre_string_utils.c
  99. Download patch debian/libgit2/deps/ntlmclient/ntlmclient.h
  100. Download patch debian/libgit2/deps/pcre/cmake/FindEditline.cmake

    --- 0.37.0-3/debian/libgit2/deps/pcre/cmake/FindEditline.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 0.39.0+really0.39.0-0ubuntu1/debian/libgit2/deps/pcre/cmake/FindEditline.cmake 2019-07-22 10:02:38.000000000 +0000 @@ -0,0 +1,17 @@ +# Modified from FindReadline.cmake (PH Feb 2012) + +if(EDITLINE_INCLUDE_DIR AND EDITLINE_LIBRARY AND NCURSES_LIBRARY) + set(EDITLINE_FOUND TRUE) +else(EDITLINE_INCLUDE_DIR AND EDITLINE_LIBRARY AND NCURSES_LIBRARY) + FIND_PATH(EDITLINE_INCLUDE_DIR readline.h + /usr/include/editline + /usr/include/edit/readline + /usr/include/readline + ) + + FIND_LIBRARY(EDITLINE_LIBRARY NAMES edit) + include(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(Editline DEFAULT_MSG EDITLINE_INCLUDE_DIR EDITLINE_LIBRARY ) + + MARK_AS_ADVANCED(EDITLINE_INCLUDE_DIR EDITLINE_LIBRARY) +endif(EDITLINE_INCLUDE_DIR AND EDITLINE_LIBRARY AND NCURSES_LIBRARY)
  101. ...
  1. cargo