debian/0000755000000000000000000000000013346474062007177 5ustar debian/source.lintian-overrides0000644000000000000000000000006112205172626014046 0ustar libgit2: source-contains-prebuilt-windows-binary debian/changelog0000644000000000000000000000444513346474062011060 0ustar libgit2 (0.19.0-2ubuntu0.4) trusty-security; urgency=medium * SECURITY UPDATE: Out of bounds read - debian/patches/CVE-2018-10887-1.patch: delta: Fix sign-extension of big left-shift - debian/patches/CVE-2018-10887-2.patch: delta: fix overflow when computing limit - debian/patches/CVE-2018-10888.patch fix out-of-bounds read of delta - debian/patches/fix-umask-fragility.patch: Fix umask issues in unit tests so that build can complete successfully. (needed to successfully build) - debian/patches/pool_alloc_sizes.patch: Round up pool alloc sizes for alignment (needed to successfully build on armhf) - CVE-2018-10887, CVE-2018-10888 -- Mike Salvatore Wed, 05 Sep 2018 12:52:25 -0400 libgit2 (0.19.0-2) experimental; urgency=low * Added correct dependencies to development package. (Closes: #715173) * Standards upgrade to version 3.9.4. * Multi-arch support. * Manually specified symbols instead of relying on regex. -- Russell Sim Wed, 20 Aug 2013 22:33:20 +1000 libgit2 (0.19.0-1) experimental; urgency=low * Enable threading. (Closes: #700181) -- Russell Sim Tue, 02 Jul 2013 19:43:00 +1000 libgit2 (0.18.0-2) experimental; urgency=low * Disable online tests. Thanks to Felix Geyer for the heads up. (Closes: #712300) -- Russell Sim Mon, 17 Jun 2013 23:11:15 +1000 libgit2 (0.18.0-1) experimental; urgency=low [ Russell Sim ] * Added examples to dev package. [ Carlos Martín Nieto ] * Build-Depend on python-minimal instead of -all * BUILD_TESTS isn't used in this project [ Russell Sim ] * New upstream release 0.18.0. -- Russell Sim Tue, 30 Apr 2013 00:55:09 +1000 libgit2 (0.17.0-1) experimental; urgency=low * New Upstream Release. * debian/patches/build_static.patch: Enables building as both static and dynamic library. * debian/rules: Added CMAKE_BUILD_TYPE=RelWithDebInfo to rules file. * debian/compat: Updated to 9, adds support for hardening. -- Russell Sim Sun, 20 May 2012 21:34:12 +1000 libgit2 (0.16.0-1) experimental; urgency=low * Initial release (Closes: #614517) -- Russell Sim Tue, 06 Mar 2012 23:03:20 +1100 debian/compat0000644000000000000000000000000212205172626010367 0ustar 9 debian/libgit2-dev.examples0000644000000000000000000000001312205172626013033 0ustar examples/* debian/rules0000755000000000000000000000264112205172626010254 0ustar #!/usr/bin/make -f # -*- makefile -*- # This rules file has 2 streams, the build-debian-devel stream builds # the static library and the bulid-debian-release builds the dynamic # library. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) override_dh_auto_configure: dh_auto_configure --builddirectory=build-debian-release -- \ -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ -DTHREADSAFE:BOOL=ON \ -DBUILD_CLAR:BOOL=ON \ -DLIB_INSTALL_DIR:STRING=lib/$(DEB_HOST_MULTIARCH) dh_auto_configure --builddirectory=build-debian-devel -- \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DTHREADSAFE:BOOL=ON \ -DBUILD_CLAR:BOOL=OFF \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DLIB_INSTALL_DIR:STRING=lib/$(DEB_HOST_MULTIARCH) override_dh_makeshlibs: dh_makeshlibs -V 'libgit2-0 (>= 0.19.0)' override_dh_auto_build : dh_auto_build --builddirectory=build-debian-release dh_auto_build --builddirectory=build-debian-devel override_dh_auto_install : dh_auto_install --builddirectory=build-debian-release dh_auto_install --builddirectory=build-debian-devel override_dh_strip: dh_strip --dbg-package=libgit2-dbg override_dh_installexamples: dh_installexamples --exclude .gitignore %: dh $@ --parallel --buildsystem cmake --dbg-package=libgit2-dbg --builddirectory=build-debian-release dh $@ --parallel --buildsystem cmake --builddirectory=build-debian-devel debian/patches/0000755000000000000000000000000013346474425010631 5ustar debian/patches/fix-umask-fragility.patch0000644000000000000000000005031313344033422015532 0ustar Backport of: From c9fa4f555ad32b2f959eb6af7503ba99b04a97fa Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Wed, 4 Sep 2013 11:42:48 -0700 Subject: [PATCH 01/10] Update clar --- tests-clar/checkout/checkout_helpers.c | 4 +- tests-clar/clar.c | 138 +++++++++++++++++-------- tests-clar/clar.h | 23 +++-- tests-clar/clar/sandbox.h | 6 +- tests-clar/diff/submodules.c | 5 +- 5 files changed, 117 insertions(+), 59 deletions(-) --- a/tests-clar/checkout/checkout_helpers.c +++ b/tests-clar/checkout/checkout_helpers.c @@ -74,8 +74,8 @@ static void check_file_contents_internal if (strip_cr) strip_cr_from_buf(&buf); - clar__assert_equal_i((int)expected_len, (int)buf.size, file, line, "strlen(expected_content) != strlen(actual_content)", 1); - clar__assert_equal_s(expected_content, buf.ptr, file, line, msg, 1); + clar__assert_equal(file, line, "strlen(expected_content) != strlen(actual_content)", 1, PRIuZ, expected_len, (size_t)buf.size); + clar__assert_equal(file, line, msg, 1, "%s", expected_content, buf.ptr); } void check_file_contents_at_line( --- a/tests-clar/clar.c +++ b/tests-clar/clar.c @@ -24,28 +24,59 @@ # define _MAIN_CC __cdecl -# define stat(path, st) _stat(path, st) -# define mkdir(path, mode) _mkdir(path) -# define chdir(path) _chdir(path) -# define access(path, mode) _access(path, mode) -# define strdup(str) _strdup(str) -# define strcasecmp(a,b) _stricmp(a,b) +# ifndef stat +# define stat(path, st) _stat(path, st) +# endif +# ifndef mkdir +# define mkdir(path, mode) _mkdir(path) +# endif +# ifndef chdir +# define chdir(path) _chdir(path) +# endif +# ifndef access +# define access(path, mode) _access(path, mode) +# endif +# ifndef strdup +# define strdup(str) _strdup(str) +# endif +# ifndef strcasecmp +# define strcasecmp(a,b) _stricmp(a,b) +# endif # ifndef __MINGW32__ # pragma comment(lib, "shell32") -# define strncpy(to, from, to_size) strncpy_s(to, to_size, from, _TRUNCATE) -# define W_OK 02 -# define S_ISDIR(x) ((x & _S_IFDIR) != 0) -# define snprint_eq(buf,sz,fmt,a,b) _snprintf_s(buf,sz,_TRUNCATE,fmt,a,b) +# ifndef strncpy +# define strncpy(to, from, to_size) strncpy_s(to, to_size, from, _TRUNCATE) +# endif +# ifndef W_OK +# define W_OK 02 +# endif +# ifndef S_ISDIR +# define S_ISDIR(x) ((x & _S_IFDIR) != 0) +# endif +# define p_snprintf(buf,sz,fmt,...) _snprintf_s(buf,sz,_TRUNCATE,fmt,__VA_ARGS__) # else -# define snprint_eq snprintf +# define p_snprintf snprintf +# endif + +# ifndef PRIuZ +# define PRIuZ "Iu" +# endif +# ifndef PRIxZ +# define PRIxZ "Ix" # endif typedef struct _stat STAT_T; #else # include /* waitpid(2) */ # include # define _MAIN_CC -# define snprint_eq snprintf +# define p_snprintf snprintf +# ifndef PRIuZ +# define PRIuZ "zu" +# endif +# ifndef PRIxZ +# define PRIxZ "zx" +# endif typedef struct stat STAT_T; #endif @@ -406,45 +437,66 @@ void clar__assert( clar__fail(file, line, error_msg, description, should_abort); } -void clar__assert_equal_s( - const char *s1, - const char *s2, +void clar__assert_equal( const char *file, int line, const char *err, - int should_abort) + int should_abort, + const char *fmt, + ...) { - int match = (s1 == NULL || s2 == NULL) ? (s1 == s2) : (strcmp(s1, s2) == 0); - - if (!match) { - char buf[4096]; - - if (s1 && s2) { - int pos; - for (pos = 0; s1[pos] == s2[pos] && s1[pos] && s2[pos]; ++pos) - /* find differing byte offset */; - snprint_eq(buf, sizeof(buf), "'%s' != '%s' (at byte %d)", s1, s2, pos); - } else { - snprint_eq(buf, sizeof(buf), "'%s' != '%s'", s1, s2); + va_list args; + char buf[4096]; + int is_equal = 1; + + va_start(args, fmt); + + if (!strcmp("%s", fmt)) { + const char *s1 = va_arg(args, const char *); + const char *s2 = va_arg(args, const char *); + is_equal = (!s1 || !s2) ? (s1 == s2) : !strcmp(s1, s2); + + if (!is_equal) { + if (s1 && s2) { + int pos; + for (pos = 0; s1[pos] == s2[pos] && s1[pos] && s2[pos]; ++pos) + /* find differing byte offset */; + p_snprintf(buf, sizeof(buf), "'%s' != '%s' (at byte %d)", + s1, s2, pos); + } else { + p_snprintf(buf, sizeof(buf), "'%s' != '%s'", s1, s2); + } + } + } + else if (!strcmp(PRIuZ, fmt) || !strcmp(PRIxZ, fmt)) { + size_t sz1 = va_arg(args, size_t), sz2 = va_arg(args, size_t); + is_equal = (sz1 == sz2); + if (!is_equal) { + int offset = p_snprintf(buf, sizeof(buf), fmt, sz1); + strncat(buf, " != ", sizeof(buf) - offset); + p_snprintf(buf + offset + 4, sizeof(buf) - offset - 4, fmt, sz2); + } + } + else if (!strcmp("%p", fmt)) { + void *p1 = va_arg(args, void *), *p2 = va_arg(args, void *); + is_equal = (p1 == p2); + if (!is_equal) + p_snprintf(buf, sizeof(buf), "%p != %p", p1, p2); + } + else { + int i1 = va_arg(args, int), i2 = va_arg(args, int); + is_equal = (i1 == i2); + if (!is_equal) { + int offset = p_snprintf(buf, sizeof(buf), fmt, i1); + strncat(buf, " != ", sizeof(buf) - offset); + p_snprintf(buf + offset + 4, sizeof(buf) - offset - 4, fmt, i2); } - - clar__fail(file, line, err, buf, should_abort); } -} -void clar__assert_equal_i( - int i1, - int i2, - const char *file, - int line, - const char *err, - int should_abort) -{ - if (i1 != i2) { - char buf[128]; - snprint_eq(buf, sizeof(buf), "%d != %d", i1, i2); + va_end(args); + + if (!is_equal) clar__fail(file, line, err, buf, should_abort); - } } void cl_set_cleanup(void (*cleanup)(void *), void *opaque) --- a/tests-clar/clar.h +++ b/tests-clar/clar.h @@ -57,15 +57,17 @@ void cl_fixture_cleanup(const char *fixt /** * Typed assertion macros */ -#define cl_assert_equal_s(s1,s2) clar__assert_equal_s((s1),(s2),__FILE__,__LINE__,"String mismatch: " #s1 " != " #s2, 1) -#define cl_assert_equal_s_(s1,s2,note) clar__assert_equal_s((s1),(s2),__FILE__,__LINE__,"String mismatch: " #s1 " != " #s2 " (" #note ")", 1) +#define cl_assert_equal_s(s1,s2) clar__assert_equal(__FILE__,__LINE__,"String mismatch: " #s1 " != " #s2, 1, "%s", (s1), (s2)) +#define cl_assert_equal_s_(s1,s2,note) clar__assert_equal(__FILE__,__LINE__,"String mismatch: " #s1 " != " #s2 " (" #note ")", 1, "%s", (s1), (s2)) -#define cl_assert_equal_i(i1,i2) clar__assert_equal_i((i1),(i2),__FILE__,__LINE__,#i1 " != " #i2, 1) -#define cl_assert_equal_i_(i1,i2,note) clar__assert_equal_i((i1),(i2),__FILE__,__LINE__,#i1 " != " #i2 " (" #note ")", 1) +#define cl_assert_equal_i(i1,i2) clar__assert_equal(__FILE__,__LINE__,#i1 " != " #i2, 1, "%d", (int)(i1), (int)(i2)) +#define cl_assert_equal_i_(i1,i2,note) clar__assert_equal(__FILE__,__LINE__,#i1 " != " #i2 " (" #note ")", 1, "%d", (i1), (i2)) +#define cl_assert_equal_i_fmt(i1,i2,fmt) clar__assert_equal(__FILE__,__LINE__,#i1 " != " #i2, 1, (fmt), (int)(i1), (int)(i2)) -#define cl_assert_equal_b(b1,b2) clar__assert_equal_i(!!(b1),!!(b2),__FILE__,__LINE__,#b1 " != " #b2, 1) +#define cl_assert_equal_b(b1,b2) clar__assert_equal(__FILE__,__LINE__,#b1 " != " #b2, 1, "%d", (int)((b1) != 0),(int)((b2) != 0)) + +#define cl_assert_equal_p(p1,p2) clar__assert_equal(__FILE__,__LINE__,"Pointer mismatch: " #p1 " != " #p2, 1, "%p", (p1), (p2)) -#define cl_assert_equal_p(p1,p2) cl_assert((p1) == (p2)) void clar__fail( const char *file, @@ -82,7 +84,12 @@ void clar__assert( const char *description, int should_abort); -void clar__assert_equal_s(const char *,const char *,const char *,int,const char *,int); -void clar__assert_equal_i(int,int,const char *,int,const char *,int); +void clar__assert_equal( + const char *file, + int line, + const char *err, + int should_abort, + const char *fmt, + ...); #endif --- a/tests-clar/clar/sandbox.h +++ b/tests-clar/clar/sandbox.h @@ -43,10 +43,8 @@ find_tmp_path(char *buffer, size_t lengt } #else - DWORD env_len; - - if ((env_len = GetEnvironmentVariable("CLAR_TMP", buffer, length)) > 0 && - env_len < length) + DWORD env_len = GetEnvironmentVariable("CLAR_TMP", buffer, (DWORD)length); + if (env_len > 0 && env_len < (DWORD)length) return 0; if (GetTempPath((DWORD)length, buffer)) --- a/tests-clar/checkout/index.c +++ b/tests-clar/checkout/index.c @@ -229,6 +229,7 @@ void test_checkout_index__options_dir_mo struct stat st; git_oid oid; git_commit *commit; + mode_t um; cl_git_pass(git_reference_name_to_id(&oid, g_repo, "refs/heads/dir")); cl_git_pass(git_commit_lookup(&commit, g_repo, &oid)); @@ -240,12 +241,15 @@ void test_checkout_index__options_dir_mo cl_git_pass(git_checkout_index(g_repo, NULL, &opts)); + /* umask will influence actual directory creation mode */ + (void)p_umask(um = p_umask(022)); + cl_git_pass(p_stat("./testrepo/a", &st)); - cl_assert_equal_i(st.st_mode & 0777, 0701); + cl_assert_equal_i_fmt(st.st_mode, (GIT_FILEMODE_TREE | 0701) & ~um, "%07o"); /* File-mode test, since we're on the 'dir' branch */ cl_git_pass(p_stat("./testrepo/a/b.txt", &st)); - cl_assert_equal_i(st.st_mode & 0777, 0755); + cl_assert_equal_i_fmt(st.st_mode, GIT_FILEMODE_BLOB_EXECUTABLE, "%07o"); git_commit_free(commit); #endif @@ -263,7 +267,7 @@ void test_checkout_index__options_overri cl_git_pass(git_checkout_index(g_repo, NULL, &opts)); cl_git_pass(p_stat("./testrepo/new.txt", &st)); - cl_assert_equal_i(st.st_mode & 0777, 0700); + cl_assert_equal_i_fmt(st.st_mode & GIT_MODE_PERMS_MASK, 0700, "%07o"); #endif } --- a/tests-clar/clar_libgit2.h +++ b/tests-clar/clar_libgit2.h @@ -29,7 +29,7 @@ void cl_git_report_failure(int, const char *, int, const char *); -#define cl_assert_equal_sz(sz1,sz2) cl_assert_equal_i((int)sz1, (int)(sz2)) +#define cl_assert_equal_sz(sz1,sz2) clar__assert_equal(__FILE__,__LINE__,#sz1 " != " #sz2, 1, PRIuZ, (size_t)(sz1), (size_t)(sz2)) /* * Some utility macros for building long strings @@ -71,5 +71,6 @@ int cl_git_remove_placeholders(const cha /* config setting helpers */ void cl_repo_set_bool(git_repository *repo, const char *cfg, int value); +int cl_repo_get_bool(git_repository *repo, const char *cfg); #endif --- a/tests-clar/repo/init.c +++ b/tests-clar/repo/init.c @@ -10,10 +10,17 @@ enum repo_mode { }; static git_repository *_repo = NULL; +static mode_t g_umask = 0; void test_repo_init__initialize(void) { _repo = NULL; + + /* load umask if not already loaded */ + if (!g_umask) { + g_umask = p_umask(022); + (void)p_umask(g_umask); + } } static void cleanup_repository(void *path) @@ -263,7 +270,6 @@ void test_repo_init__reinit_doesnot_over void test_repo_init__reinit_overwrites_filemode(void) { - git_config *config; int expected, current_value; #ifdef GIT_WIN32 @@ -284,13 +290,10 @@ void test_repo_init__reinit_overwrites_f /* Reinit the repository */ cl_git_pass(git_repository_init(&_repo, "overwrite.git", 1)); - git_repository_config(&config, _repo); /* Ensure the "core.filemode" config value has been reset */ - cl_git_pass(git_config_get_bool(¤t_value, config, "core.filemode")); + current_value = cl_repo_get_bool(_repo, "core.filemode"); cl_assert_equal_i(expected, current_value); - - git_config_free(config); } void test_repo_init__sets_logAllRefUpdates_according_to_type_of_repository(void) @@ -361,6 +364,8 @@ void test_repo_init__extended_1(void) cl_fixture_cleanup("root"); } +#define CLEAR_FOR_CORE_FILEMODE(M) ((M) &= ~0177) + static void assert_hooks_match( const char *template_dir, const char *repo_dir, @@ -377,14 +382,20 @@ static void assert_hooks_match( cl_git_pass(git_buf_joinpath(&actual, repo_dir, hook_path)); cl_git_pass(git_path_lstat(actual.ptr, &st)); - cl_assert(expected_st.st_size == st.st_size); + cl_assert_equal_sz(expected_st.st_size, st.st_size); - if (!core_filemode) { - expected_st.st_mode = expected_st.st_mode & ~0111; - st.st_mode = st.st_mode & ~0111; - } + if (GIT_MODE_TYPE(expected_st.st_mode) != GIT_FILEMODE_LINK) { + mode_t expected_mode = + GIT_MODE_TYPE(expected_st.st_mode) | + (GIT_PERMS_FOR_WRITE(expected_st.st_mode) & ~g_umask); + + if (!core_filemode) { + CLEAR_FOR_CORE_FILEMODE(expected_mode); + CLEAR_FOR_CORE_FILEMODE(st.st_mode); + } - cl_assert_equal_i((int)expected_st.st_mode, (int)st.st_mode); + cl_assert_equal_i_fmt(expected_mode, st.st_mode, "%07o"); + } git_buf_free(&expected); git_buf_free(&actual); @@ -402,24 +413,19 @@ static void assert_mode_seems_okay( git_buf_free(&full); if (!core_filemode) { - expect_mode = expect_mode & ~0111; - st.st_mode = st.st_mode & ~0111; + CLEAR_FOR_CORE_FILEMODE(expect_mode); + CLEAR_FOR_CORE_FILEMODE(st.st_mode); expect_setgid = false; } - if (S_ISGID != 0) { - if (expect_setgid) - cl_assert((st.st_mode & S_ISGID) != 0); - else - cl_assert((st.st_mode & S_ISGID) == 0); - } + if (S_ISGID != 0) + cl_assert_equal_b(expect_setgid, (st.st_mode & S_ISGID) != 0); - if ((expect_mode & 0111) != 0) - cl_assert((st.st_mode & 0111) != 0); - else - cl_assert((st.st_mode & 0111) == 0); + cl_assert_equal_b( + GIT_PERMS_IS_EXEC(expect_mode), GIT_PERMS_IS_EXEC(st.st_mode)); - cl_assert((expect_mode & 0170000) == (st.st_mode & 0170000)); + cl_assert_equal_i_fmt( + GIT_MODE_TYPE(expect_mode), GIT_MODE_TYPE(st.st_mode), "%07o"); } void test_repo_init__extended_with_template(void) @@ -427,6 +433,7 @@ void test_repo_init__extended_with_templ git_buf expected = GIT_BUF_INIT; git_buf actual = GIT_BUF_INIT; git_repository_init_options opts = GIT_REPOSITORY_INIT_OPTIONS_INIT; + int filemode; cl_set_cleanup(&cleanup_repository, "templated.git"); @@ -450,13 +457,15 @@ void test_repo_init__extended_with_templ git_buf_free(&expected); git_buf_free(&actual); + filemode = cl_repo_get_bool(_repo, "core.filemode"); + assert_hooks_match( cl_fixture("template"), git_repository_path(_repo), - "hooks/update.sample", true); + "hooks/update.sample", filemode); assert_hooks_match( cl_fixture("template"), git_repository_path(_repo), - "hooks/link.sample", true); + "hooks/link.sample", filemode); } void test_repo_init__extended_with_template_and_shared_mode(void) @@ -464,7 +473,6 @@ void test_repo_init__extended_with_templ git_buf expected = GIT_BUF_INIT; git_buf actual = GIT_BUF_INIT; git_repository_init_options opts = GIT_REPOSITORY_INIT_OPTIONS_INIT; - git_config *config; int filemode = true; const char *repo_path = NULL; @@ -480,9 +488,7 @@ void test_repo_init__extended_with_templ cl_assert(!git_repository_is_bare(_repo)); cl_assert(!git__suffixcmp(git_repository_path(_repo), "/init_shared_from_tpl/.git/")); - cl_git_pass(git_repository_config(&config, _repo)); - cl_git_pass(git_config_get_bool(&filemode, config, "core.filemode")); - git_config_free(config); + filemode = cl_repo_get_bool(_repo, "core.filemode"); cl_git_pass(git_futils_readbuffer( &expected, cl_fixture("template/description"))); --- a/tests-clar/core/mkdir.c +++ b/tests-clar/core/mkdir.c @@ -115,9 +115,9 @@ static void check_mode(mode_t expected, { #ifdef GIT_WIN32 /* chmod on Win32 doesn't support exec bit, not group/world bits */ - cl_assert((expected & 0600) == (actual & 0777)); + cl_assert_equal_i_fmt((expected & 0600), (actual & 0777), "%07o"); #else - cl_assert(expected == (actual & 0777)); + cl_assert_equal_i_fmt(expected, (actual & 0777), "%07o"); #endif } --- a/tests-clar/clar_libgit2.c +++ b/tests-clar/clar_libgit2.c @@ -343,3 +343,13 @@ void cl_repo_set_bool(git_repository *re cl_git_pass(git_config_set_bool(config, cfg, value != 0)); git_config_free(config); } + +int cl_repo_get_bool(git_repository *repo, const char *cfg) +{ + int val = 0; + git_config *config; + cl_git_pass(git_repository_config(&config, repo)); + cl_git_pass(git_config_get_bool(&val, config, cfg));; + git_config_free(config); + return val; +} --- a/src/checkout.c +++ b/src/checkout.c @@ -693,17 +693,14 @@ static int buffer_to_file( buffer, path, file_open_flags, file_mode)) < 0) return error; - if (st != NULL && (error = p_stat(path, st)) < 0) { - giterr_set(GITERR_OS, "Error while statting '%s'", path); - return error; - } + if (st != NULL && (error = p_stat(path, st)) < 0) + giterr_set(GITERR_OS, "Error statting '%s'", path); - if ((file_mode & 0100) != 0 && (error = p_chmod(path, file_mode)) < 0) { + else if (GIT_PERMS_IS_EXEC(file_mode) && + (error = p_chmod(path, file_mode)) < 0) giterr_set(GITERR_OS, "Failed to set permissions on '%s'", path); - return error; - } - return 0; + return error; } static int blob_content_to_file( --- a/src/diff_print.c +++ b/src/diff_print.c @@ -7,7 +7,7 @@ #include "common.h" #include "diff.h" #include "diff_patch.h" -#include "buffer.h" +#include "fileops.h" typedef struct { git_diff_list *diff; @@ -46,7 +46,7 @@ static char diff_pick_suffix(int mode) { if (S_ISDIR(mode)) return '/'; - else if (mode & 0100) /* -V536 */ + else if (GIT_PERMS_IS_EXEC(mode)) /* -V536 */ /* in git, modes are very regular, so we must have 0100755 mode */ return '*'; else --- a/src/fileops.c +++ b/src/fileops.c @@ -110,7 +110,7 @@ git_off_t git_futils_filesize(git_file f mode_t git_futils_canonical_mode(mode_t raw_mode) { if (S_ISREG(raw_mode)) - return S_IFREG | GIT_CANONICAL_PERMS(raw_mode); + return S_IFREG | GIT_PERMS_CANONICAL(raw_mode); else if (S_ISLNK(raw_mode)) return S_IFLNK; else if (S_ISGITLINK(raw_mode)) @@ -953,7 +953,7 @@ static int _cp_r_callback(void *ref, git mode_t usemode = from_st.st_mode; if ((info->flags & GIT_CPDIR_SIMPLE_TO_MODE) != 0) - usemode = (usemode & 0111) ? 0777 : 0666; + usemode = GIT_PERMS_FOR_WRITE(usemode); error = git_futils_cp(from->ptr, info->to.ptr, usemode); } --- a/src/fileops.h +++ b/src/fileops.h @@ -223,9 +223,13 @@ extern int git_futils_open_ro(const char */ extern git_off_t git_futils_filesize(git_file fd); +#define GIT_PERMS_IS_EXEC(MODE) (((MODE) & 0111) != 0) +#define GIT_PERMS_CANONICAL(MODE) (GIT_PERMS_IS_EXEC(MODE) ? 0755 : 0644) +#define GIT_PERMS_FOR_WRITE(MODE) (GIT_PERMS_IS_EXEC(MODE) ? 0777 : 0666) + #define GIT_MODE_PERMS_MASK 0777 -#define GIT_CANONICAL_PERMS(MODE) (((MODE) & 0100) ? 0755 : 0644) -#define GIT_MODE_TYPE(MODE) ((MODE) & ~GIT_MODE_PERMS_MASK) +#define GIT_MODE_TYPE_MASK 0170000 +#define GIT_MODE_TYPE(MODE) ((MODE) & GIT_MODE_TYPE_MASK) #define GIT_MODE_ISBLOB(MODE) (GIT_MODE_TYPE(MODE) == GIT_MODE_TYPE(GIT_FILEMODE_BLOB)) /** --- a/src/index.c +++ b/src/index.c @@ -269,7 +269,7 @@ static unsigned int index_create_mode(un if (S_ISDIR(mode) || (mode & S_IFMT) == (S_IFLNK | S_IFDIR)) return (S_IFLNK | S_IFDIR); - return S_IFREG | ((mode & 0100) ? 0755 : 0644); + return S_IFREG | GIT_PERMS_CANONICAL(mode); } static unsigned int index_merge_mode( --- a/src/tree.c +++ b/src/tree.c @@ -10,7 +10,7 @@ #include "tree.h" #include "git2/repository.h" #include "git2/object.h" -#include "path.h" +#include "fileops.h" #include "tree-cache.h" #include "index.h" @@ -29,19 +29,19 @@ static bool valid_filemode(const int fil GIT_INLINE(git_filemode_t) normalize_filemode(git_filemode_t filemode) { /* Tree bits set, but it's not a commit */ - if (filemode & GIT_FILEMODE_TREE && !(filemode & 0100000)) + if (GIT_MODE_TYPE(filemode) == GIT_FILEMODE_TREE) return GIT_FILEMODE_TREE; - /* If any of the x bits is set */ - if (filemode & 0111) + /* If any of the x bits are set */ + if (GIT_PERMS_IS_EXEC(filemode)) return GIT_FILEMODE_BLOB_EXECUTABLE; /* 16XXXX means commit */ - if ((filemode & GIT_FILEMODE_COMMIT) == GIT_FILEMODE_COMMIT) + if (GIT_MODE_TYPE(filemode) == GIT_FILEMODE_COMMIT) return GIT_FILEMODE_COMMIT; /* 12XXXX means commit */ - if ((filemode & GIT_FILEMODE_LINK) == GIT_FILEMODE_LINK) + if (GIT_MODE_TYPE(filemode) == GIT_FILEMODE_LINK) return GIT_FILEMODE_LINK; /* Otherwise, return a blob */ --- a/tests-clar/index/addall.c +++ b/tests-clar/index/addall.c @@ -1,6 +1,7 @@ #include "clar_libgit2.h" #include "../status/status_helpers.h" #include "posix.h" +#include "fileops.h" git_repository *g_repo = NULL; @@ -108,8 +109,10 @@ static void check_stat_data(git_index *i cl_assert(st.st_size == entry->file_size); cl_assert(st.st_uid == entry->uid); cl_assert(st.st_gid == entry->gid); - cl_assert_equal_b(st.st_mode & ~0777, entry->mode & ~0777); - cl_assert_equal_b(st.st_mode & 0111, entry->mode & 0111); + cl_assert_equal_i_fmt( + GIT_MODE_TYPE(st.st_mode), GIT_MODE_TYPE(entry->mode), "%07o"); + cl_assert_equal_b( + GIT_PERMS_IS_EXEC(st.st_mode), GIT_PERMS_IS_EXEC(entry->mode)); } else { /* most things will still match */ cl_assert(st.st_size != entry->file_size); debian/patches/series0000644000000000000000000000021713346473756012054 0ustar disable_online_tests.patch CVE-2018-10887-1.patch CVE-2018-10887-2.patch CVE-2018-10888.patch fix-umask-fragility.patch pool_alloc_sizes.patch debian/patches/CVE-2018-10888.patch0000644000000000000000000001204313344230365013334 0ustar Backport of: From 9844d38bed10e9ff17174434b3421b227ae710f3 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 29 Jun 2018 09:11:02 +0200 Subject: [PATCH] delta: fix out-of-bounds read of delta When computing the offset and length of the delta base, we repeatedly increment the `delta` pointer without checking whether we have advanced past its end already, which can thus result in an out-of-bounds read. Fix this by repeatedly checking whether we have reached the end. Add a test which would cause Valgrind to produce an error. Reported-by: Riccardo Schirone Test-provided-by: Riccardo Schirone --- src/delta.c | 18 ++++++++++-------- tests/delta/apply.c | 9 +++++++++ 2 files changed, 19 insertions(+), 8 deletions(-) --- a/tests/delta/apply.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "clar_libgit2.h" - -#include "delta-apply.h" - -void test_delta_apply__read_at_off(void) -{ - unsigned char base[16] = { 0 }, delta[] = { 0x10, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x00, 0x00 }; - void *out; - size_t outlen; - - cl_git_fail(git__delta_apply(&out, &outlen, base, sizeof(base), delta, sizeof(delta))); -} --- a/src/delta-apply.c +++ b/src/delta-apply.c @@ -88,15 +88,17 @@ int git__delta_apply( /* cmd is a copy instruction; copy from the base. */ size_t off = 0, len = 0, end; - if (cmd & 0x01) off = *delta++; - if (cmd & 0x02) off |= *delta++ << 8; - if (cmd & 0x04) off |= *delta++ << 16; - if (cmd & 0x08) off |= ((unsigned) *delta++ << 24UL); +#define ADD_DELTA(o, shift) { if (delta < delta_end) (o) |= ((unsigned) *delta++ << shift); else goto fail; } + if (cmd & 0x01) ADD_DELTA(off, 0UL); + if (cmd & 0x02) ADD_DELTA(off, 8UL); + if (cmd & 0x04) ADD_DELTA(off, 16UL); + if (cmd & 0x08) ADD_DELTA(off, 24UL); - if (cmd & 0x10) len = *delta++; - if (cmd & 0x20) len |= *delta++ << 8; - if (cmd & 0x40) len |= *delta++ << 16; + if (cmd & 0x10) ADD_DELTA(len, 0UL); + if (cmd & 0x20) ADD_DELTA(len, 8UL); + if (cmd & 0x40) ADD_DELTA(len, 16UL); if (!len) len = 0x10000; +#undef ADD_DELTA if (GIT_ADD_SIZET_OVERFLOW(&end, off, len) || base_len < end || res_sz < len) --- a/src/common.h +++ b/src/common.h @@ -10,6 +10,11 @@ #include "git2/common.h" #include "cc-compat.h" +/** Support for gcc/clang __has_builtin intrinsic */ +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif + #include #include #include @@ -102,6 +107,10 @@ GIT_INLINE(void) git__init_structure(voi } #define GIT_INIT_STRUCTURE(S,V) git__init_structure(S, sizeof(*S), V) +/** Check for additive overflow, setting an error if would occur. */ +#define GIT_ADD_SIZET_OVERFLOW(out, one, two) \ + (git__add_sizet_overflow(out, one, two) ? (giterr_set_oom(), 1) : 0) + /* NOTE: other giterr functions are in the public errors.h header file */ #include "util.h" --- a/src/util.h +++ b/src/util.h @@ -339,4 +339,43 @@ GIT_INLINE(void) git__memzero(void *data #endif } +/* Use clang/gcc compiler intrinsics whenever possible */ +#if (SIZE_MAX == UINT_MAX) && __has_builtin(__builtin_uadd_overflow) +# define git__add_sizet_overflow(out, one, two) \ + __builtin_uadd_overflow(one, two, out) +# define git__multiply_sizet_overflow(out, one, two) \ + __builtin_umul_overflow(one, two, out) +#elif (SIZE_MAX == ULONG_MAX) && __has_builtin(__builtin_uaddl_overflow) +# define git__add_sizet_overflow(out, one, two) \ + __builtin_uaddl_overflow(one, two, out) +# define git__multiply_sizet_overflow(out, one, two) \ + __builtin_umull_overflow(one, two, out) +#else + +/** + * Sets `one + two` into `out`, unless the arithmetic would overflow. + * @return true if the result fits in a `size_t`, false on overflow. + */ +GIT_INLINE(bool) git__add_sizet_overflow(size_t *out, size_t one, size_t two) +{ + if (SIZE_MAX - one < two) + return true; + *out = one + two; + return false; +} + +/** + * Sets `one * two` into `out`, unless the arithmetic would overflow. + * @return true if the result fits in a `size_t`, false on overflow. + */ +GIT_INLINE(bool) git__multiply_sizet_overflow(size_t *out, size_t one, size_t two) +{ + if (one && SIZE_MAX / one < two) + return true; + *out = one * two; + return false; +} + +#endif + #endif /* INCLUDE_util_h__ */ --- /dev/null +++ b/tests-clar/delta/apply.c @@ -0,0 +1,33 @@ +#include "clar_libgit2.h" + +#include "delta-apply.h" + +void test_delta_apply__read_at_off(void) +{ + unsigned char base[16] = { 0 }, delta[] = { 0x10, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x00, 0x00 }; + void *out; + size_t outlen; + + git_rawobj raw_obj = { + base, + sizeof(base), + GIT_OBJ_BLOB + }; + + cl_git_fail(git__delta_apply(&raw_obj, base, sizeof(base), delta, sizeof(delta))); +} + +void test_delta_apply__read_after_limit(void) +{ + unsigned char base[16] = { 0 }, delta[] = { 0x10, 0x70, 0xff }; + void *out; + size_t outlen; + + git_rawobj raw_obj = { + base, + sizeof(base), + GIT_OBJ_BLOB + }; + + cl_git_fail(git__delta_apply(&raw_obj, base, sizeof(base), delta, sizeof(delta))); +} debian/patches/build_static.patch0000644000000000000000000000271712205172626014316 0ustar Build both static and shared libraries. diff --git a/CMakeLists.txt b/CMakeLists.txt index bfbabc0..891d2af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,6 @@ SET(INSTALL_LIB lib CACHE PATH "Where to install libraries to.") SET(INSTALL_INC include CACHE PATH "Where to install headers to.") # Build options -OPTION (BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON) OPTION (THREADSAFE "Build libgit2 as threadsafe" OFF) OPTION (BUILD_CLAR "Build Tests using the Clar suite" ON) OPTION (TAGS "Generate tags" OFF) @@ -110,7 +109,8 @@ ELSE() ENDIF () # Compile and link libgit2 -ADD_LIBRARY(git2 ${SRC} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${WIN_RC}) +ADD_LIBRARY(git2 SHARED ${SRC} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${WIN_RC}) +ADD_LIBRARY(git2static STATIC ${SRC} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${WIN_RC}) IF (WIN32) TARGET_LINK_LIBRARIES(git2 ws2_32) @@ -120,11 +120,12 @@ ENDIF () TARGET_LINK_LIBRARIES(git2 ${CMAKE_THREAD_LIBS_INIT}) SET_TARGET_PROPERTIES(git2 PROPERTIES VERSION ${LIBGIT2_VERSION_STRING}) +SET_TARGET_PROPERTIES(git2static PROPERTIES OUTPUT_NAME git2) SET_TARGET_PROPERTIES(git2 PROPERTIES SOVERSION ${LIBGIT2_VERSION_MAJOR}) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libgit2.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libgit2.pc @ONLY) # Install -INSTALL(TARGETS git2 +INSTALL(TARGETS git2 git2static RUNTIME DESTINATION ${INSTALL_BIN} LIBRARY DESTINATION ${INSTALL_LIB} ARCHIVE DESTINATION ${INSTALL_LIB} debian/patches/pool_alloc_sizes.patch0000644000000000000000000000432113346473756015220 0ustar From 5fa8cda981940eaef54b55abe4fcba09b4e18e12 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Mon, 30 Jun 2014 12:05:25 -0700 Subject: [PATCH] Round up pool alloc sizes for alignment To make sure that items returned from pool allocations are aligned on nice boundaries, this rounds up all pool allocation sizes to a multiple of 8. This adds a small amount of overhead to each item. The rounding up could be made optional with an extra parameter to the pool initialization that turned on rounding only for pools where item alignment actually matters, but I think for the extra code and complexity that would be involved, that it makes sense just to burn a little bit of extra memory and enable this all the time. --- src/pool.c | 2 +- tests-clar/core/pool.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pool.c b/src/pool.c index 146f118b4c..a516ff9eb1 100644 --- a/src/pool.c +++ b/src/pool.c @@ -146,7 +146,7 @@ GIT_INLINE(void) pool_remove_page( void *git_pool_malloc(git_pool *pool, uint32_t items) { git_pool_page *scan = pool->open, *prev; - uint32_t size = items * pool->item_size; + uint32_t size = ((items * pool->item_size) + 7) & ~7; void *ptr = NULL; pool->has_string_alloc = 0; diff --git a/tests/core/pool.c b/tests/core/pool.c index 351d0c20f9..a7ec8801bd 100644 --- a/tests-clar/core/pool.c +++ b/tests-clar/core/pool.c @@ -38,19 +38,19 @@ void test_core_pool__1(void) cl_assert(git_pool_malloc(&p, i) != NULL); /* with fixed page size, allocation must end up with these values */ - cl_assert(git_pool__open_pages(&p) == 1); - cl_assert(git_pool__full_pages(&p) == 505); + cl_assert_equal_i(1, git_pool__open_pages(&p)); + cl_assert_equal_i(507, git_pool__full_pages(&p)); git_pool_clear(&p); - cl_git_pass(git_pool_init(&p, 1, 4100)); + cl_git_pass(git_pool_init(&p, 1, 4120)); for (i = 2010; i > 0; i--) cl_assert(git_pool_malloc(&p, i) != NULL); /* with fixed page size, allocation must end up with these values */ - cl_assert(git_pool__open_pages(&p) == 1); - cl_assert(git_pool__full_pages(&p) == 492); + cl_assert_equal_i(1, git_pool__open_pages(&p)); + cl_assert_equal_i(492, git_pool__full_pages(&p)); git_pool_clear(&p); } debian/patches/CVE-2018-10887-1.patch0000644000000000000000000001060713344004663013475 0ustar Backport of: From 3f461902dc1072acb8b7607ee65d0a0458ffac2a Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 29 Jun 2018 07:45:18 +0200 Subject: [PATCH] delta: fix sign-extension of big left-shift Our delta code was originally adapted from JGit, which itself adapted it from git itself. Due to this heritage, we inherited a bug from git.git in how we compute the delta offset, which was fixed upstream in 48fb7deb5 (Fix big left-shifts of unsigned char, 2009-06-17). As explained by Linus: Shifting 'unsigned char' or 'unsigned short' left can result in sign extension errors, since the C integer promotion rules means that the unsigned char/short will get implicitly promoted to a signed 'int' due to the shift (or due to other operations). This normally doesn't matter, but if you shift things up sufficiently, it will now set the sign bit in 'int', and a subsequent cast to a bigger type (eg 'long' or 'unsigned long') will now sign-extend the value despite the original expression being unsigned. One example of this would be something like unsigned long size; unsigned char c; size += c << 24; where despite all the variables being unsigned, 'c << 24' ends up being a signed entity, and will get sign-extended when then doing the addition in an 'unsigned long' type. Since git uses 'unsigned char' pointers extensively, we actually have this bug in a couple of places. In our delta code, we inherited such a bogus shift when computing the offset at which the delta base is to be found. Due to the sign extension we can end up with an offset where all the bits are set. This can allow an arbitrary memory read, as the addition in `base_len < off + len` can now overflow if `off` has all its bits set. Fix the issue by casting the result of `*delta++ << 24UL` to an unsigned integer again. Add a test with a crafted delta that would actually succeed with an out-of-bounds read in case where the cast wouldn't exist. Reported-by: Riccardo Schirone Test-provided-by: Riccardo Schirone --- src/delta.c | 32 +++++++++++++++----------------- tests/delta/apply.c | 12 ++++++++++++ tests/diff/binary.c | 1 + 3 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 tests/delta/apply.c --- /dev/null +++ b/tests/delta/apply.c @@ -0,0 +1,12 @@ +#include "clar_libgit2.h" + +#include "delta-apply.h" + +void test_delta_apply__read_at_off(void) +{ + unsigned char base[16] = { 0 }, delta[] = { 0x10, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x00, 0x00 }; + void *out; + size_t outlen; + + cl_git_fail(git__delta_apply(&out, &outlen, base, sizeof(base), delta, sizeof(delta))); +} --- a/src/delta-apply.c +++ b/src/delta-apply.c @@ -60,7 +60,8 @@ int git__delta_apply( size_t base_sz, res_sz; unsigned char *res_dp; - /* Check that the base size matches the data we were given; + /* + * Check that the base size matches the data we were given; * if not we would underflow while accessing data from the * base object, resulting in data corruption or segfault. */ @@ -84,28 +85,28 @@ int git__delta_apply( while (delta < delta_end) { unsigned char cmd = *delta++; if (cmd & 0x80) { - /* cmd is a copy instruction; copy from the base. - */ + /* cmd is a copy instruction; copy from the base. */ size_t off = 0, len = 0; if (cmd & 0x01) off = *delta++; if (cmd & 0x02) off |= *delta++ << 8; if (cmd & 0x04) off |= *delta++ << 16; - if (cmd & 0x08) off |= *delta++ << 24; + if (cmd & 0x08) off |= ((unsigned) *delta++ << 24UL); if (cmd & 0x10) len = *delta++; if (cmd & 0x20) len |= *delta++ << 8; if (cmd & 0x40) len |= *delta++ << 16; - if (!len) len = 0x10000; + if (!len) len = 0x10000; - if (base_len < off + len || res_sz < len) + if (base_len < off + len || res_sz < len) goto fail; memcpy(res_dp, base + off, len); res_dp += len; res_sz -= len; } else if (cmd) { - /* cmd is a literal insert instruction; copy from + /* + * cmd is a literal insert instruction; copy from * the delta stream itself. */ if (delta_end - delta < cmd || res_sz < cmd) @@ -116,8 +117,7 @@ int git__delta_apply( res_sz -= cmd; } else { - /* cmd == 0 is reserved for future encodings. - */ + /* cmd == 0 is reserved for future encodings. */ goto fail; } } debian/patches/disable_online_tests.patch0000644000000000000000000000050412205172626016031 0ustar Disable online tests. diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bd25aa..f44190e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -349,7 +349,7 @@ IF (BUILD_CLAR) ENDIF () ENABLE_TESTING() - ADD_TEST(libgit2_clar libgit2_clar -ionline) + ADD_TEST(libgit2_clar libgit2_clar -xonline) ENDIF () IF (TAGS) debian/patches/CVE-2018-10887-2.patch0000644000000000000000000000303413344004656013474 0ustar Backport of: From c1577110467b701dcbcf9439ac225ea851b47d22 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 5 Jul 2018 13:30:46 +0200 Subject: [PATCH] delta: fix overflow when computing limit When checking whether a delta base offset and length fit into the base we have in memory already, we can trigger an overflow which breaks the check. This would subsequently result in us reading memory from out of bounds of the base. The issue is easily fixed by checking for overflow when adding `off` and `len`, thus guaranteeting that we are never indexing beyond `base_len`. This corresponds to the git patch 8960844a7 (check patch_delta bounds more carefully, 2006-04-07), which adds these overflow checks. Reported-by: Riccardo Schirone --- src/delta.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/src/delta-apply.c +++ b/src/delta-apply.c @@ -87,7 +87,7 @@ int git__delta_apply( unsigned char cmd = *delta++; if (cmd & 0x80) { /* cmd is a copy instruction; copy from the base. */ - size_t off = 0, len = 0; + size_t off = 0, len = 0, end; if (cmd & 0x01) off = *delta++; if (cmd & 0x02) off |= *delta++ << 8; @@ -99,8 +99,10 @@ int git__delta_apply( if (cmd & 0x40) len |= *delta++ << 16; if (!len) len = 0x10000; - if (base_len < off + len || res_sz < len) + if (GIT_ADD_SIZET_OVERFLOW(&end, off, len) || + base_len < end || res_sz < len) goto fail; + memcpy(res_dp, base + off, len); res_dp += len; res_sz -= len; debian/control0000644000000000000000000000336713344004716010604 0ustar Source: libgit2 Section: libs Priority: extra Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Russell Sim Build-Depends: debhelper (>= 9.20120417), python-minimal (>= 2.4.0), cmake, libz-dev, libssl-dev, ca-certificates Standards-Version: 3.9.4 Homepage: http://libgit2.github.com/ Vcs-Git: git://anonscm.debian.org/users/arrsim-guest/libgit2.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=users/arrsim-guest/libgit2.git;a=summary Package: libgit2-dev Architecture: any Section: libdevel Multi-Arch: same Depends: libgit2-0 (= ${binary:Version}), libz-dev, libssl-dev, ${shlibs:Depends}, ${misc:Depends} Description: low-level Git library (development files) libgit2 is a portable, pure C implementation of the Git distributed version control system core methods provided as a re-entrant link-able library with a solid API. . This package contains the development files for libgit2. Package: libgit2-0 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: low-level Git library libgit2 is a portable, pure C implementation of the Git distributed version control system core methods provided as a re-entrant link-able library with a solid API. Package: libgit2-dbg Section: debug Architecture: any Multi-Arch: same Depends: libgit2-0 (= ${binary:Version}), ${misc:Depends} Description: libgit2 library and debugging symbols libgit2 is a portable, pure C implementation of the Git distributed version control system core methods provided as a re-entrant link-able library with a solid API. . This package contains detached debugging symbols. . Most people will not need this package. debian/source/0000755000000000000000000000000012205172626010471 5ustar debian/source/format0000644000000000000000000000001412205172626011677 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000001565612205172626011141 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: libgit2 Source: http://libgit2.github.com/ Files: * Copyright: Copyright (C) 2009-2012 the libgit2 contributors License: GPL-2 with linking exception libgit2 is Copyright (C) 2009-2011 the libgit2 contributors, unless otherwise stated. See the AUTHORS file for details. . Note that the only valid version of the GPL as far as this project is concerned is _this_ particular version of the license (ie v2, not v2.2 or v3.x or whatever), unless explicitly otherwise stated. . LINKING EXCEPTION . In addition to the permissions in the GNU General Public License, the authors give you unlimited permission to link the compiled version of this library into combinations with other programs, and to distribute those combinations without any restriction coming from the use of this file. (The General Public License restrictions do apply in other respects; for example, they cover modification of the file, and distribution when not linked into a combined executable.) . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". . ---------------------------------------------------------------------- . The priority queue implementation is based on code licensed under the Apache 2.0 license: . Copyright 2010 Volkan Yazıcı Copyright 2006-2010 The Apache Software Foundation . The full text of the Apache 2.0 license is available at: . http://www.apache.org/licenses/LICENSE-2.0 Files: tests-clar/clar Copyright: Copyright (C) 2011 by Vicent Marti License: MIT The Clar framework is licensed under the MIT license: . Copyright (C) 2011 by Vicent Marti . 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. Files: deps/http-parser/* Copyright: Igor Sysoev, Joyent, Inc. and other Node contributors License: MIT http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright Igor Sysoev and licensed under the MIT license. . 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. Files: deps/zlib/* Copyright: Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler License: Zlib This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. . Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: . 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. . Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu Files: deps/regex/* Copyright: Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006,2008 Free Software Foundation, Inc. License: LGPL-2.1 Free Software Foundation, Inc. This file is part of the GNU C Library. . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. . The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Files: debian/* Copyright: 2011 Russell Sim License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/libgit2-dbg.lintian-overrides0000644000000000000000000000004312205172626014634 0ustar libgit2-dbg: no-upstream-changelog debian/watch0000644000000000000000000000013212205172626010216 0ustar version=3 https://github.com/libgit2/libgit2/tags /libgit2/libgit2/archive/v(.+)\.tar\.gz debian/libgit2-0.lintian-overrides0000644000000000000000000000004112205172626014235 0ustar libgit2-0: no-upstream-changelog debian/libgit2-dev.lintian-overrides0000644000000000000000000000004312205172626014656 0ustar libgit2-dev: no-upstream-changelog debian/libgit2-0.symbols0000644000000000000000000004325412205172626012304 0ustar libgit2.so.0 libgit2-0 #MINVER# git_attr_add_macro@Base 0.17.0 git_attr_cache_flush@Base 0.17.0 git_attr_foreach@Base 0.17.0 git_attr_get@Base 0.17.0 git_attr_get_many@Base 0.17.0 git_attr_value@Base 0.18.0 git_blob_create_frombuffer@Base 0.17.0 git_blob_create_fromchunks@Base 0.18.0 git_blob_create_fromdisk@Base 0.17.0 git_blob_create_fromworkdir@Base 0.18.0 git_blob_free@Base 0.19.0 git_blob_id@Base 0.19.0 git_blob_is_binary@Base 0.18.0 git_blob_lookup@Base 0.19.0 git_blob_lookup_prefix@Base 0.19.0 git_blob_owner@Base 0.19.0 git_blob_rawcontent@Base 0.17.0 git_blob_rawsize@Base 0.17.0 git_branch_create@Base 0.17.0 git_branch_delete@Base 0.17.0 git_branch_foreach@Base 0.18.0 git_branch_is_head@Base 0.18.0 git_branch_lookup@Base 0.18.0 git_branch_move@Base 0.17.0 git_branch_name@Base 0.18.0 git_branch_remote_name@Base 0.18.0 git_branch_set_upstream@Base 0.18.0 git_branch_upstream@Base 0.18.0 git_branch_upstream_name@Base 0.18.0 git_checkout_head@Base 0.18.0 git_checkout_index@Base 0.18.0 git_checkout_tree@Base 0.18.0 git_clone@Base 0.18.0 git_commit_author@Base 0.17.0 git_commit_committer@Base 0.17.0 git_commit_create@Base 0.17.0 git_commit_create_from_oids@Base 0.19.0 git_commit_create_v@Base 0.17.0 git_commit_free@Base 0.19.0 git_commit_id@Base 0.17.0 git_commit_lookup@Base 0.19.0 git_commit_lookup_prefix@Base 0.19.0 git_commit_message@Base 0.17.0 git_commit_message_encoding@Base 0.17.0 git_commit_nth_gen_ancestor@Base 0.18.0 git_commit_owner@Base 0.19.0 git_commit_parent@Base 0.17.0 git_commit_parent_id@Base 0.18.0 git_commit_parentcount@Base 0.17.0 git_commit_time@Base 0.17.0 git_commit_time_offset@Base 0.17.0 git_commit_tree@Base 0.17.0 git_commit_tree_id@Base 0.18.0 git_config_add_backend@Base 0.18.0 git_config_add_file_ondisk@Base 0.17.0 git_config_delete_entry@Base 0.18.0 git_config_find_global@Base 0.17.0 git_config_find_system@Base 0.17.0 git_config_find_xdg@Base 0.18.0 git_config_foreach@Base 0.17.0 git_config_foreach_match@Base 0.18.0 git_config_free@Base 0.17.0 git_config_get_bool@Base 0.17.0 git_config_get_entry@Base 0.18.0 git_config_get_int32@Base 0.17.0 git_config_get_int64@Base 0.17.0 git_config_get_mapped@Base 0.17.0 git_config_get_multivar@Base 0.17.0 git_config_get_string@Base 0.17.0 git_config_lookup_map_value@Base 0.18.0 git_config_new@Base 0.17.0 git_config_open_default@Base 0.18.0 git_config_open_global@Base 0.19.0 git_config_open_level@Base 0.18.0 git_config_open_ondisk@Base 0.17.0 git_config_parse_bool@Base 0.18.0 git_config_parse_int32@Base 0.18.0 git_config_parse_int64@Base 0.18.0 git_config_refresh@Base 0.18.0 git_config_set_bool@Base 0.17.0 git_config_set_int32@Base 0.17.0 git_config_set_int64@Base 0.17.0 git_config_set_multivar@Base 0.17.0 git_config_set_string@Base 0.17.0 git_cred_userpass@Base 0.18.0 git_cred_userpass_plaintext_new@Base 0.18.0 git_diff_blob_to_buffer@Base 0.18.0 git_diff_blobs@Base 0.17.0 git_diff_find_similar@Base 0.18.0 git_diff_foreach@Base 0.17.0 git_diff_get_patch@Base 0.18.0 git_diff_index_to_workdir@Base 0.18.0 git_diff_list_free@Base 0.17.0 git_diff_merge@Base 0.17.0 git_diff_num_deltas@Base 0.18.0 git_diff_num_deltas_of_type@Base 0.18.0 git_diff_patch_delta@Base 0.18.0 git_diff_patch_free@Base 0.18.0 git_diff_patch_from_blob_and_buffer@Base 0.19.0 git_diff_patch_from_blobs@Base 0.19.0 git_diff_patch_get_hunk@Base 0.18.0 git_diff_patch_get_line_in_hunk@Base 0.18.0 git_diff_patch_line_stats@Base 0.18.0 git_diff_patch_num_hunks@Base 0.18.0 git_diff_patch_num_lines_in_hunk@Base 0.18.0 git_diff_patch_print@Base 0.18.0 git_diff_patch_to_str@Base 0.18.0 git_diff_print_compact@Base 0.17.0 git_diff_print_patch@Base 0.17.0 git_diff_print_raw@Base 0.19.0 git_diff_status_char@Base 0.18.0 git_diff_tree_to_index@Base 0.18.0 git_diff_tree_to_tree@Base 0.17.0 git_diff_tree_to_workdir@Base 0.18.0 git_graph_ahead_behind@Base 0.18.0 git_ignore_add_rule@Base 0.18.0 git_ignore_clear_internal_rules@Base 0.18.0 git_ignore_path_is_ignored@Base 0.18.0 git_index_add@Base 0.17.0 git_index_add_all@Base 0.19.0 git_index_add_bypath@Base 0.18.0 git_index_caps@Base 0.18.0 git_index_clear@Base 0.17.0 git_index_conflict_add@Base 0.18.0 git_index_conflict_cleanup@Base 0.18.0 git_index_conflict_get@Base 0.18.0 git_index_conflict_iterator_free@Base 0.19.0 git_index_conflict_iterator_new@Base 0.19.0 git_index_conflict_next@Base 0.19.0 git_index_conflict_remove@Base 0.18.0 git_index_entry_stage@Base 0.17.0 git_index_entrycount@Base 0.17.0 git_index_find@Base 0.17.0 git_index_free@Base 0.17.0 git_index_get_byindex@Base 0.18.0 git_index_get_bypath@Base 0.18.0 git_index_has_conflicts@Base 0.18.0 git_index_name_add@Base 0.19.0 git_index_name_clear@Base 0.19.0 git_index_name_entrycount@Base 0.19.0 git_index_name_get_byindex@Base 0.19.0 git_index_new@Base 0.18.0 git_index_open@Base 0.17.0 git_index_owner@Base 0.18.0 git_index_read@Base 0.17.0 git_index_read_tree@Base 0.17.0 git_index_remove@Base 0.17.0 git_index_remove_all@Base 0.19.0 git_index_remove_bypath@Base 0.18.0 git_index_remove_directory@Base 0.18.0 git_index_reuc_add@Base 0.18.0 git_index_reuc_clear@Base 0.18.0 git_index_reuc_entrycount@Base 0.18.0 git_index_reuc_find@Base 0.18.0 git_index_reuc_get_byindex@Base 0.18.0 git_index_reuc_get_bypath@Base 0.18.0 git_index_reuc_remove@Base 0.18.0 git_index_set_caps@Base 0.18.0 git_index_update_all@Base 0.19.0 git_index_write@Base 0.17.0 git_index_write_tree@Base 0.18.0 git_index_write_tree_to@Base 0.18.0 git_indexer_stream_add@Base 0.17.0 git_indexer_stream_finalize@Base 0.17.0 git_indexer_stream_free@Base 0.17.0 git_indexer_stream_hash@Base 0.17.0 git_indexer_stream_new@Base 0.17.0 git_libgit2_capabilities@Base 0.18.0 git_libgit2_opts@Base 0.18.0 git_libgit2_version@Base 0.17.0 git_merge_base@Base 0.17.0 git_merge_base_many@Base 0.18.0 git_merge_head_free@Base 0.19.0 git_merge_head_from_fetchhead@Base 0.19.0 git_merge_head_from_oid@Base 0.19.0 git_merge_head_from_ref@Base 0.19.0 git_merge_trees@Base 0.19.0 git_message_prettify@Base 0.18.0 git_note_create@Base 0.17.0 git_note_default_ref@Base 0.17.0 git_note_foreach@Base 0.17.0 git_note_free@Base 0.17.0 git_note_iterator_free@Base 0.18.0 git_note_iterator_new@Base 0.18.0 git_note_message@Base 0.17.0 git_note_next@Base 0.18.0 git_note_oid@Base 0.17.0 git_note_read@Base 0.17.0 git_note_remove@Base 0.17.0 git_object__size@Base 0.17.0 git_object_dup@Base 0.18.0 git_object_free@Base 0.17.0 git_object_id@Base 0.17.0 git_object_lookup@Base 0.17.0 git_object_lookup_prefix@Base 0.17.0 git_object_owner@Base 0.17.0 git_object_peel@Base 0.18.0 git_object_string2type@Base 0.17.0 git_object_type2string@Base 0.17.0 git_object_type@Base 0.17.0 git_object_typeisloose@Base 0.17.0 git_odb_add_alternate@Base 0.17.0 git_odb_add_backend@Base 0.17.0 git_odb_add_disk_alternate@Base 0.18.0 git_odb_backend_loose@Base 0.17.0 git_odb_backend_malloc@Base 0.18.0 git_odb_backend_one_pack@Base 0.18.0 git_odb_backend_pack@Base 0.17.0 git_odb_exists@Base 0.17.0 git_odb_foreach@Base 0.18.0 git_odb_free@Base 0.17.0 git_odb_get_backend@Base 0.19.0 git_odb_hash@Base 0.17.0 git_odb_hashfile@Base 0.17.0 git_odb_new@Base 0.17.0 git_odb_num_backends@Base 0.19.0 git_odb_object_data@Base 0.17.0 git_odb_object_free@Base 0.17.0 git_odb_object_id@Base 0.17.0 git_odb_object_size@Base 0.17.0 git_odb_object_type@Base 0.17.0 git_odb_open@Base 0.17.0 git_odb_open_rstream@Base 0.17.0 git_odb_open_wstream@Base 0.17.0 git_odb_read@Base 0.17.0 git_odb_read_header@Base 0.17.0 git_odb_read_prefix@Base 0.17.0 git_odb_refresh@Base 0.18.0 git_odb_write@Base 0.17.0 git_odb_write_pack@Base 0.18.0 git_oid_allocfmt@Base 0.17.0 git_oid_cmp@Base 0.19.0 git_oid_cpy@Base 0.17.0 git_oid_fmt@Base 0.17.0 git_oid_fromraw@Base 0.17.0 git_oid_fromstr@Base 0.17.0 git_oid_fromstrn@Base 0.17.0 git_oid_fromstrp@Base 0.18.0 git_oid_iszero@Base 0.17.0 git_oid_ncmp@Base 0.17.0 git_oid_nfmt@Base 0.19.0 git_oid_pathfmt@Base 0.17.0 git_oid_shorten_add@Base 0.17.0 git_oid_shorten_free@Base 0.17.0 git_oid_shorten_new@Base 0.17.0 git_oid_strcmp@Base 0.19.0 git_oid_streq@Base 0.17.0 git_oid_tostr@Base 0.17.0 git_packbuilder_foreach@Base 0.18.0 git_packbuilder_free@Base 0.18.0 git_packbuilder_insert@Base 0.18.0 git_packbuilder_insert_commit@Base 0.19.0 git_packbuilder_insert_tree@Base 0.18.0 git_packbuilder_new@Base 0.18.0 git_packbuilder_object_count@Base 0.18.0 git_packbuilder_set_threads@Base 0.18.0 git_packbuilder_write@Base 0.18.0 git_packbuilder_written@Base 0.18.0 git_push_add_refspec@Base 0.18.0 git_push_finish@Base 0.18.0 git_push_free@Base 0.18.0 git_push_new@Base 0.18.0 git_push_set_options@Base 0.18.0 git_push_status_foreach@Base 0.18.0 git_push_unpack_ok@Base 0.18.0 git_push_update_tips@Base 0.18.0 git_refdb_backend_fs@Base 0.18.0 git_refdb_compress@Base 0.18.0 git_refdb_free@Base 0.18.0 git_refdb_new@Base 0.18.0 git_refdb_open@Base 0.18.0 git_refdb_set_backend@Base 0.18.0 git_reference__alloc@Base 0.18.0 git_reference__alloc_symbolic@Base 0.19.0 git_reference_cmp@Base 0.17.0 git_reference_create@Base 0.18.0 git_reference_delete@Base 0.17.0 git_reference_dwim@Base 0.19.0 git_reference_foreach@Base 0.17.0 git_reference_foreach_glob@Base 0.18.0 git_reference_foreach_name@Base 0.19.0 git_reference_free@Base 0.17.0 git_reference_has_log@Base 0.18.0 git_reference_is_branch@Base 0.18.0 git_reference_is_remote@Base 0.18.0 git_reference_is_valid_name@Base 0.18.0 git_reference_iterator_free@Base 0.19.0 git_reference_iterator_glob_new@Base 0.19.0 git_reference_iterator_new@Base 0.19.0 git_reference_list@Base 0.17.0 git_reference_lookup@Base 0.17.0 git_reference_name@Base 0.17.0 git_reference_name_to_id@Base 0.18.0 git_reference_next@Base 0.19.0 git_reference_next_name@Base 0.19.0 git_reference_normalize_name@Base 0.18.0 git_reference_owner@Base 0.17.0 git_reference_peel@Base 0.18.0 git_reference_rename@Base 0.17.0 git_reference_resolve@Base 0.17.0 git_reference_set_target@Base 0.17.0 git_reference_shorthand@Base 0.19.0 git_reference_symbolic_create@Base 0.18.0 git_reference_symbolic_set_target@Base 0.18.0 git_reference_symbolic_target@Base 0.18.0 git_reference_target@Base 0.17.0 git_reference_target_peel@Base 0.19.0 git_reference_type@Base 0.17.0 git_reflog_append@Base 0.18.0 git_reflog_delete@Base 0.17.0 git_reflog_drop@Base 0.18.0 git_reflog_entry_byindex@Base 0.17.0 git_reflog_entry_committer@Base 0.17.0 git_reflog_entry_id_new@Base 0.18.0 git_reflog_entry_id_old@Base 0.18.0 git_reflog_entry_message@Base 0.18.0 git_reflog_entrycount@Base 0.17.0 git_reflog_free@Base 0.17.0 git_reflog_read@Base 0.17.0 git_reflog_rename@Base 0.17.0 git_reflog_write@Base 0.17.0 git_refspec_direction@Base 0.19.0 git_refspec_dst@Base 0.17.0 git_refspec_dst_matches@Base 0.18.0 git_refspec_force@Base 0.18.0 git_refspec_rtransform@Base 0.18.0 git_refspec_src@Base 0.17.0 git_refspec_src_matches@Base 0.17.0 git_refspec_string@Base 0.19.0 git_refspec_transform@Base 0.17.0 git_remote_add_fetch@Base 0.19.0 git_remote_add_push@Base 0.19.0 git_remote_autotag@Base 0.18.0 git_remote_check_cert@Base 0.18.0 git_remote_clear_refspecs@Base 0.19.0 git_remote_connect@Base 0.17.0 git_remote_connected@Base 0.17.0 git_remote_create@Base 0.18.0 git_remote_create_inmemory@Base 0.18.0 git_remote_disconnect@Base 0.17.0 git_remote_download@Base 0.17.0 git_remote_free@Base 0.17.0 git_remote_get_fetch_refspecs@Base 0.19.0 git_remote_get_push_refspecs@Base 0.19.0 git_remote_get_refspec@Base 0.19.0 git_remote_is_valid_name@Base 0.18.0 git_remote_list@Base 0.17.0 git_remote_load@Base 0.17.0 git_remote_ls@Base 0.17.0 git_remote_name@Base 0.17.0 git_remote_pushurl@Base 0.18.0 git_remote_refspec_count@Base 0.19.0 git_remote_remove_refspec@Base 0.19.0 git_remote_rename@Base 0.18.0 git_remote_save@Base 0.17.0 git_remote_set_autotag@Base 0.18.0 git_remote_set_callbacks@Base 0.18.0 git_remote_set_cred_acquire_cb@Base 0.18.0 git_remote_set_pushurl@Base 0.18.0 git_remote_set_transport@Base 0.18.0 git_remote_set_update_fetchhead@Base 0.18.0 git_remote_set_url@Base 0.18.0 git_remote_stats@Base 0.18.0 git_remote_stop@Base 0.18.0 git_remote_supported_url@Base 0.17.0 git_remote_update_fetchhead@Base 0.18.0 git_remote_update_tips@Base 0.17.0 git_remote_url@Base 0.17.0 git_remote_valid_url@Base 0.17.0 git_repository__cleanup@Base 0.19.0 git_repository_config@Base 0.17.0 git_repository_detach_head@Base 0.18.0 git_repository_discover@Base 0.17.0 git_repository_fetchhead_foreach@Base 0.18.0 git_repository_free@Base 0.17.0 git_repository_get_namespace@Base 0.19.0 git_repository_hashfile@Base 0.18.0 git_repository_head@Base 0.17.0 git_repository_head_detached@Base 0.17.0 git_repository_head_orphan@Base 0.17.0 git_repository_index@Base 0.17.0 git_repository_init@Base 0.17.0 git_repository_init_ext@Base 0.18.0 git_repository_is_bare@Base 0.17.0 git_repository_is_empty@Base 0.17.0 git_repository_is_shallow@Base 0.19.0 git_repository_merge_cleanup@Base 0.18.0 git_repository_mergehead_foreach@Base 0.18.0 git_repository_message@Base 0.18.0 git_repository_message_remove@Base 0.18.0 git_repository_new@Base 0.19.0 git_repository_odb@Base 0.17.0 git_repository_open@Base 0.17.0 git_repository_open_bare@Base 0.19.0 git_repository_open_ext@Base 0.17.0 git_repository_path@Base 0.17.0 git_repository_refdb@Base 0.18.0 git_repository_set_config@Base 0.17.0 git_repository_set_head@Base 0.18.0 git_repository_set_head_detached@Base 0.18.0 git_repository_set_index@Base 0.17.0 git_repository_set_namespace@Base 0.19.0 git_repository_set_odb@Base 0.17.0 git_repository_set_refdb@Base 0.18.0 git_repository_set_workdir@Base 0.17.0 git_repository_state@Base 0.18.0 git_repository_workdir@Base 0.17.0 git_repository_wrap_odb@Base 0.18.0 git_reset@Base 0.18.0 git_reset_default@Base 0.18.0 git_revparse@Base 0.18.0 git_revparse_ext@Base 0.19.0 git_revparse_single@Base 0.18.0 git_revwalk_free@Base 0.17.0 git_revwalk_hide@Base 0.17.0 git_revwalk_hide_glob@Base 0.17.0 git_revwalk_hide_head@Base 0.17.0 git_revwalk_hide_ref@Base 0.17.0 git_revwalk_new@Base 0.17.0 git_revwalk_next@Base 0.17.0 git_revwalk_push@Base 0.17.0 git_revwalk_push_glob@Base 0.17.0 git_revwalk_push_head@Base 0.17.0 git_revwalk_push_range@Base 0.18.0 git_revwalk_push_ref@Base 0.17.0 git_revwalk_repository@Base 0.17.0 git_revwalk_reset@Base 0.17.0 git_revwalk_sorting@Base 0.17.0 git_signature_dup@Base 0.17.0 git_signature_free@Base 0.17.0 git_signature_new@Base 0.17.0 git_signature_now@Base 0.17.0 git_smart_subtransport_git@Base 0.18.0 git_smart_subtransport_http@Base 0.18.0 git_stash_drop@Base 0.18.0 git_stash_foreach@Base 0.18.0 git_stash_save@Base 0.18.0 git_status_byindex@Base 0.19.0 git_status_file@Base 0.17.0 git_status_foreach@Base 0.17.0 git_status_foreach_ext@Base 0.17.0 git_status_list_entrycount@Base 0.19.0 git_status_list_free@Base 0.19.0 git_status_list_new@Base 0.19.0 git_status_should_ignore@Base 0.17.0 git_strarray_copy@Base 0.17.0 git_strarray_free@Base 0.17.0 git_submodule_add_finalize@Base 0.18.0 git_submodule_add_setup@Base 0.18.0 git_submodule_add_to_index@Base 0.18.0 git_submodule_fetch_recurse_submodules@Base 0.18.0 git_submodule_foreach@Base 0.17.0 git_submodule_head_id@Base 0.18.0 git_submodule_ignore@Base 0.18.0 git_submodule_index_id@Base 0.18.0 git_submodule_init@Base 0.18.0 git_submodule_location@Base 0.18.0 git_submodule_lookup@Base 0.17.0 git_submodule_name@Base 0.18.0 git_submodule_open@Base 0.18.0 git_submodule_owner@Base 0.18.0 git_submodule_path@Base 0.18.0 git_submodule_reload@Base 0.18.0 git_submodule_reload_all@Base 0.18.0 git_submodule_save@Base 0.18.0 git_submodule_set_fetch_recurse_submodules@Base 0.18.0 git_submodule_set_ignore@Base 0.18.0 git_submodule_set_update@Base 0.18.0 git_submodule_set_url@Base 0.18.0 git_submodule_status@Base 0.18.0 git_submodule_sync@Base 0.18.0 git_submodule_update@Base 0.18.0 git_submodule_url@Base 0.18.0 git_submodule_wd_id@Base 0.18.0 git_tag_annotation_create@Base 0.19.0 git_tag_create@Base 0.17.0 git_tag_create_frombuffer@Base 0.17.0 git_tag_create_lightweight@Base 0.17.0 git_tag_delete@Base 0.17.0 git_tag_foreach@Base 0.18.0 git_tag_free@Base 0.19.0 git_tag_id@Base 0.17.0 git_tag_list@Base 0.17.0 git_tag_list_match@Base 0.17.0 git_tag_lookup@Base 0.19.0 git_tag_lookup_prefix@Base 0.19.0 git_tag_message@Base 0.17.0 git_tag_name@Base 0.17.0 git_tag_owner@Base 0.19.0 git_tag_peel@Base 0.17.0 git_tag_tagger@Base 0.17.0 git_tag_target@Base 0.17.0 git_tag_target_id@Base 0.18.0 git_tag_target_type@Base 0.18.0 git_threads_init@Base 0.17.0 git_threads_shutdown@Base 0.17.0 git_trace_set@Base 0.18.0 git_transport_dummy@Base 0.18.0 git_transport_local@Base 0.18.0 git_transport_new@Base 0.18.0 git_transport_smart@Base 0.18.0 git_tree_entry_byindex@Base 0.17.0 git_tree_entry_byname@Base 0.17.0 git_tree_entry_byoid@Base 0.18.0 git_tree_entry_bypath@Base 0.18.0 git_tree_entry_cmp@Base 0.18.0 git_tree_entry_dup@Base 0.18.0 git_tree_entry_filemode@Base 0.18.0 git_tree_entry_free@Base 0.18.0 git_tree_entry_id@Base 0.17.0 git_tree_entry_name@Base 0.17.0 git_tree_entry_to_object@Base 0.17.0 git_tree_entry_type@Base 0.17.0 git_tree_entrycount@Base 0.17.0 git_tree_free@Base 0.19.0 git_tree_id@Base 0.17.0 git_tree_lookup@Base 0.19.0 git_tree_lookup_prefix@Base 0.19.0 git_tree_owner@Base 0.18.0 git_tree_walk@Base 0.17.0 git_treebuilder_clear@Base 0.17.0 git_treebuilder_create@Base 0.17.0 git_treebuilder_entrycount@Base 0.18.0 git_treebuilder_filter@Base 0.17.0 git_treebuilder_free@Base 0.17.0 git_treebuilder_get@Base 0.17.0 git_treebuilder_insert@Base 0.17.0 git_treebuilder_remove@Base 0.17.0 git_treebuilder_write@Base 0.17.0 giterr_clear@Base 0.17.0 giterr_last@Base 0.17.0 giterr_set_oom@Base 0.18.0 giterr_set_str@Base 0.18.0 debian/docs0000644000000000000000000000000012205172626010032 0ustar debian/libgit2-dev.install0000644000000000000000000000010712205172626012667 0ustar /usr/include /usr/lib/*/lib*.a /usr/lib/*/lib*.so /usr/lib/*/pkgconfig debian/tests/0000755000000000000000000000000012205172626010333 5ustar debian/tests/libgit2_test.c0000644000000000000000000000035112205172626013071 0ustar #include #include int main (int argc, char** argv) { int major = 0; int minor = 0; int rev = 0; git_libgit2_version(&major, &minor, &rev); printf("Version %d.%d.%d\n", major, minor, rev); return 0; }; debian/tests/CMakeLists.txt0000644000000000000000000000157712205172626013105 0ustar CMAKE_MINIMUM_REQUIRED (VERSION 2.8) PROJECT (libgit2_test) ADD_EXECUTABLE (libgit2_test libgit2_test.c) FIND_PACKAGE(PkgConfig) PKG_CHECK_MODULES(PC_LIBGIT2 libgit2) SET(LIBGIT2_DEFINITIONS ${PC_LIBGIT_CFLAGS_OTHER}) FIND_PATH(LIBGIT2_INCLUDE_DIR git2.h HINTS ${PC_LIBGIT_INCLUDEDIR} ${PC_LIBGIT_INCLUDE_DIRS} PATH_SUFFIXES libgit2 ) FIND_LIBRARY(LIBGIT2_LIBRARY NAMES git2 libgit2 HINTS ${PC_LIBGIT_LIBDIR} ${PC_LIBGIT_LIBRARY_DIRS} ) SET(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARY} ) SET(LIBGIT2_INCLUDE_DIRS ${LIBGIT2_INCLUDE_DIR} ) INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibGit2 DEFAULT_MSG LIBGIT2_LIBRARY LIBGIT2_INCLUDE_DIR) mark_as_advanced(LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARY ) include_directories(${LIBGIT2_INCLUDE_DIR}) target_link_libraries (libgit2_test ${LIBGIT2_LIBRARY}) debian/libgit2-0.install0000644000000000000000000000002412205172626012246 0ustar /usr/lib/*/lib*so.*