Compare commits

..

4 Commits

Author SHA1 Message Date
Igor Gnatenko
82f38e3012
Update to 0.26.8
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-11-03 17:51:44 +01:00
Igor Gnatenko
00396a6776 update URL
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-10-06 20:31:09 +02:00
Igor Gnatenko
f6ad9f4a33
Update to 0.26.7
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-10-06 11:07:19 +02:00
Igor Gnatenko
fb4d3ef343
initial import
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-09-28 12:16:18 +02:00
5 changed files with 86 additions and 369 deletions

40
.gitignore vendored
View File

@ -1,39 +1,3 @@
/v0.18.0.tar.gz
/v0.19.0.tar.gz
/libgit2-0.20.0.tar.gz
/libgit2-0.21.0.tar.gz
/libgit2-0.21.1.tar.gz
/libgit2-0.22.0.tar.gz
/libgit2-0.22.1.tar.gz
/libgit2-0.22.2.tar.gz
/libgit2-0.22.3.tar.gz
/libgit2-0.23.0.tar.gz
/libgit2-0.23.1.tar.gz
/libgit2-0.23.2.tar.gz
/libgit2-0.23.3.tar.gz
/libgit2-0.23.4.tar.gz
/libgit2-0.24.0.tar.gz
/libgit2-0.24.1.tar.gz
/libgit2-0.24.2.tar.gz
/libgit2-0.24.3.tar.gz
/libgit2-0.24.6.tar.gz
/libgit2-0.25.1.tar.gz
/libgit2-0.26.0.tar.gz
/libgit2-0.26.3.tar.gz
/libgit2-0.26.4.tar.gz
/libgit2-0.26.5.tar.gz
/libgit2-0.26.6.tar.gz
/libgit2-0.27.4.tar.gz
/libgit2-0.27.5.tar.gz
/libgit2-0.27.7.tar.gz
/libgit2-0.27.8.tar.gz
/libgit2-0.28.0-rc1.tar.gz
/libgit2-0.28.0.tar.gz
/libgit2-0.28.1.tar.gz
/libgit2-0.28.2.tar.gz
/libgit2-0.28.3.tar.gz
/libgit2-0.28.4.tar.gz
/libgit2-0.99.0.tar.gz
/libgit2-1.0.0.tar.gz
/libgit2-1.0.1.tar.gz
/libgit2-1.1.0.tar.gz
/libgit2-0.26.7.tar.gz
/libgit2-0.26.8.tar.gz

View File

@ -1,76 +0,0 @@
From d62e44cb8218840a0291fb5fbb7c5106e1e35a12 Mon Sep 17 00:00:00 2001
From: Segev Finer <segev@codeocean.com>
Date: Mon, 3 Jun 2019 18:35:08 +0300
Subject: [PATCH] checkout: Fix removing untracked files by path in
subdirectories
The checkout code didn't iterate into a subdir if it didn't match the
pathspec, but since the pathspec might match files in the subdir we
should recurse into it (In contrast to gitignore handling).
Fixes #5089
---
src/checkout.c | 9 +++++++--
tests/checkout/head.c | 26 ++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/src/checkout.c b/src/checkout.c
index f0dd736dc..59ff873dd 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -371,8 +371,13 @@ static int checkout_action_wd_only(
if (!git_pathspec__match(
pathspec, wd->path,
(data->strategy & GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH) != 0,
- git_iterator_ignore_case(workdir), NULL, NULL))
- return git_iterator_advance(wditem, workdir);
+ git_iterator_ignore_case(workdir), NULL, NULL)) {
+
+ if (wd->mode == GIT_FILEMODE_TREE)
+ return git_iterator_advance_into(wditem, workdir);
+ else
+ return git_iterator_advance(wditem, workdir);
+ }
/* check if item is tracked in the index but not in the checkout diff */
if (data->index != NULL) {
diff --git a/tests/checkout/head.c b/tests/checkout/head.c
index 799123086..5b3a034e7 100644
--- a/tests/checkout/head.c
+++ b/tests/checkout/head.c
@@ -109,6 +109,32 @@ void test_checkout_head__do_not_remove_untracked_file_in_subdir(void)
cl_assert(git_path_isfile("testrepo/tracked/subdir/untracked"));
}
+void test_checkout_head__do_remove_untracked_paths(void)
+{
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
+ git_index *index;
+ char *paths[] = {"tracked/untracked"};
+
+ cl_git_pass(p_mkdir("testrepo/tracked", 0755));
+ cl_git_pass(p_mkdir("testrepo/tracked/subdir", 0755));
+ cl_git_mkfile("testrepo/tracked/tracked", "tracked\n");
+ cl_git_mkfile("testrepo/tracked/untracked", "untracked\n");
+
+ cl_git_pass(git_repository_index(&index, g_repo));
+ cl_git_pass(git_index_add_bypath(index, "tracked/tracked"));
+ cl_git_pass(git_index_write(index));
+
+ git_index_free(index);
+
+ opts.checkout_strategy = GIT_CHECKOUT_FORCE | GIT_CHECKOUT_REMOVE_UNTRACKED;
+ opts.paths.strings = paths;
+ opts.paths.count = 1;
+ cl_git_pass(git_checkout_head(g_repo, &opts));
+
+ cl_assert(git_path_isfile("testrepo/tracked/tracked"));
+ cl_assert(!git_path_isfile("testrepo/tracked/untracked"));
+}
+
void test_checkout_head__do_remove_tracked_subdir(void)
{
git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
--
2.27.0

View File

@ -0,0 +1,64 @@
From dc2e099a5da3cddc0d575b7c3c88af47eb53d8b3 Mon Sep 17 00:00:00 2001
From: Edward Thomson <ethomson@edwardthomson.com>
Date: Thu, 13 Sep 2018 13:27:07 +0100
Subject: [PATCH] tests: don't run buf::oom on 32-bit systems
On a 32-bit Linux systems, the value large enough to make malloc
guarantee a failure is also large enough that valgrind considers it
"fishy". Skip this test on those systems entirely.
(cherry picked from commit 415a8ae9c9b6ac18f0524b6af8e58408b426457d)
---
tests/buf/oom.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tests/buf/oom.c b/tests/buf/oom.c
index 16a03cc1a..86f5e7239 100644
--- a/tests/buf/oom.c
+++ b/tests/buf/oom.c
@@ -11,12 +11,8 @@
*/
#if defined(GIT_ARCH_64) && defined(__linux__)
# define TOOBIG 0x0fffffffffffffff
-#elif defined(__linux__)
-# define TOOBIG 0x0fffffff
#elif defined(GIT_ARCH_64)
# define TOOBIG 0xffffffffffffff00
-#else
-# define TOOBIG 0xffffff00
#endif
/**
@@ -25,13 +21,18 @@
* will fail. And because the git_buf_grow() wrapper always
* sets mark_oom, the code in git_buf_try_grow() will free
* the internal buffer and set it to git_buf__oom.
- *
+ *
* We initialized the internal buffer to (the static variable)
* git_buf__initbuf. The purpose of this test is to make sure
* that we don't try to free the static buffer.
+ *
+ * Skip this test entirely on 32-bit platforms; a buffer large enough
+ * to guarantee malloc failures is so large that valgrind considers
+ * it likely to be an error.
*/
void test_buf_oom__grow(void)
{
+#ifdef GIT_ARCH_64
git_buf buf = GIT_BUF_INIT;
git_buf_clear(&buf);
@@ -40,6 +41,9 @@ void test_buf_oom__grow(void)
cl_assert(git_buf_oom(&buf));
git_buf_free(&buf);
+#else
+ cl_skip();
+#endif
}
void test_buf_oom__grow_by(void)
--
2.19.1

View File

@ -1,34 +1,26 @@
# libssh2 is not available on RHEL
%if 0%{?rhel}
%bcond_with libssh2
%else
%bcond_without libssh2
%endif
Name: libgit2
Version: 1.1.0
Release: 6%{?dist}
Version: 0.26.8
Release: 1%{?dist}
Summary: C implementation of the Git core methods as a library with a solid API
License: GPLv2 with exceptions
URL: https://libgit2.org/
Source0: https://github.com/libgit2/libgit2/archive/v%{version}/%{name}-%{version}.tar.gz
# https://github.com/libgit2/libgit2/commit/415a8ae9c9b6ac18f0524b6af8e58408b426457d
Patch0001: 0001-tests-don-t-run-buf-oom-on-32-bit-systems.patch
BuildRequires: gcc
BuildRequires: cmake >= 3.5.1
BuildRequires: cmake >= 2.8
BuildRequires: ninja-build
BuildRequires: http-parser-devel
BuildRequires: libcurl-devel
%if %{with libssh2}
BuildRequires: libssh2-devel
%endif
BuildRequires: openssl-devel
BuildRequires: pcre2-devel
BuildRequires: python3
BuildRequires: zlib-devel
Provides: bundled(libxdiff)
%description
libgit2 is a portable, pure C implementation of the Git core methods
libgit2 is a portable, pure C implementation of the Git core methods
provided as a re-entrant linkable library with a solid API, allowing
you to write native speed custom Git applications in any language
with bindings.
@ -48,23 +40,15 @@ developing applications that use %{name}.
find examples -name ".gitignore" -delete -print
# Don't run "online" tests
sed -i '/-sonline/s/^/#/' tests/CMakeLists.txt
sed -i '/ADD_TEST(online/s/^/#/' CMakeLists.txt
# Remove bundled libraries
rm -vr deps
rm -frv deps
%build
%cmake . -B%{_target_platform} \
-GNinja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DREGEX_BACKEND=pcre2 \
-DUSE_HTTP_PARSER=system \
-DUSE_SHA1=HTTPS \
-DUSE_HTTPS=OpenSSL \
-DUSE_NTLMCLIENT=OFF \
%if %{without libssh2}
-DUSE_SSH=OFF \
%endif
%{nil}
%ninja_build -C %{_target_platform}
@ -74,244 +58,25 @@ rm -vr deps
%check
%ninja_test -C %{_target_platform}
%ldconfig_scriptlets
%files
%license COPYING
%{_libdir}/libgit2.so.*
%{_libdir}/%{name}.so.*
%files devel
%doc AUTHORS docs examples README.md
%{_libdir}/libgit2.so
%{_libdir}/pkgconfig/libgit2.pc
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/git2.h
%{_includedir}/git2/
%changelog
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 1.1.0-6
- Rebuilt with OpenSSL 3.0.0
* Sat Nov 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.26.8-1
- Update to 0.26.8
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Sat Oct 06 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.26.7-1
- Update to 0.26.7
* Thu Mar 18 2021 Kamil Dudka <kdudka@redhat.com> - 1.1.0-4
- make the run-time dependency on libssh2 optional
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Dec 28 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.1.0-2
- Rebuild
* Mon Dec 28 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.1.0-1
- Update to 1.1.0
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jun 15 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.0.1-2
- Fix removing untracked files by path in subdirectories
* Thu Jun 04 2020 Pete Walter <pwalter@fedoraproject.org> - 1.0.1-1
- Update to 1.0.1
* Wed Apr 15 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.0.0-2
- Rebuild for http-parser 2.9.4
* Wed Apr 15 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.0.0-1
- Update to 1.0.0
* Tue Mar 03 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.99.0-2
- Fix broken deps for pcre2
* Mon Mar 02 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.99.0-1
- Update to 0.99.0
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.28.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Dec 11 09:00:52 CET 2019 Igor Gnatenko <ingnatenkobrain@fedoraproject.org> - 0.28.4-1
- Update to 0.28.4
* Fri Sep 13 2019 Pete Walter <pwalter@fedoraproject.org> - 0.28.3-1
- Update to 0.28.3
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.28.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Jul 14 13:34:04 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.28.2-2
- Obsolete libgit2_0.28
* Thu Jun 06 14:22:16 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.28.2-1
- Update to 0.28.2
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 28 2019 Pete Walter <pwalter@fedoraproject.org> - 0.27.8-1
- Update to 0.27.8
* Fri Oct 26 2018 Pete Walter <pwalter@fedoraproject.org> - 0.27.7-1
- Update to 0.27.7
* Mon Oct 08 2018 Pete Walter <pwalter@fedoraproject.org> - 0.27.5-1
- Update to 0.27.5
* Fri Aug 10 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.27.4-1
- Update to 0.27.4
- Update upstream URL
* Tue Aug 07 2018 Pete Walter <pwalter@fedoraproject.org> - 0.26.6-1
- Update to 0.26.6
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jul 10 2018 Pete Walter <pwalter@fedoraproject.org> - 0.26.5-1
- Update to 0.26.5 (CVE-2018-10887, CVE-2018-10888)
* Mon Jun 25 2018 Pete Walter <pwalter@fedoraproject.org> - 0.26.4-1
- Update to 0.26.4 (CVE-2018-11235)
* Mon Mar 12 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.26.3-1
- Update to 0.26.3
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.26.0-4
- Switch to %%ldconfig_scriptlets
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Jul 08 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.26.0-1
- Update to 0.26.0
* Tue Feb 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.25.1-3
- Backport patch to fix pkgconfig file under g-ir-scanner
* Tue Feb 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.25.1-2
- Bump release for rebuild
* Tue Feb 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.25.1-1
- Update to 0.25.1 (RHBZ #1395926)
* Tue Jan 10 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.24.6-1
- Update to 0.24.6 (RHBZ #1411857)
* Thu Nov 03 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.24.3-1
- Update to 0.24.3 (RHBZ #1391480)
- Add support for OpenSSL 1.1.0 (RHBZ #1383753)
* Mon Oct 10 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.24.2-2
- Backport patch for CVE-2016-8568, CVE-2016-8569
* Tue Oct 04 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.24.2-1
- Update to 0.24.2 (RHBZ #1381398)
* Wed Apr 13 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.24.1-1
- Update to 0.24.1
* Sun Mar 20 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.24.0-1
- Update to 0.24.0 (RHBZ #1310638)
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sun Nov 22 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.23.4-1
- Update to 0.23.4 (RHBZ #1281633)
* Tue Oct 06 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.23.3-1
- Update to 0.23.3 (RHBZ #1260324)
* Tue Sep 08 2015 Igor Gnatenko <ignatenko@src.gnome.org> - 0.23.2-1
- Update to 0.23.2
* Wed Sep 02 2015 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.23.1-1
- Update to 0.23.1
- Add curl support
* Thu Jul 30 2015 Igor Gnatenko <ignatenko@src.gnome.org> - 0.23.0-1
- Update to 0.23.0
* Fri Jul 03 2015 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.22.3-1
- Update to 0.22.3
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Mar 24 2015 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.22.2-1
- Update to 0.22.2
* Sat Feb 14 2015 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.22.1-1
- Update to 0.22.1
* Mon Jan 19 2015 Ignacio Casal Quinteiro <icq@gnome.org> - 0.22.0-1
- Update to 0.22.0
* Fri Dec 26 2014 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.21.3-1
- Update to 0.21.3
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Wed Aug 06 2014 Christopher Meng <rpm@cicku.me> - 0.21.1-1
- Update to 0.21.1
* Fri Jul 18 2014 Yaakov Selkowitz <yselkowi@redhat.com> - 0.21.0-2
- Fix memory alignment issues on arm, aarch64, ppc64le (#1115905)
* Sat Jun 21 2014 Christopher Meng <rpm@cicku.me> - 0.21.0-1
- Update to 0.21.0
* Fri Jun 06 2014 Karsten Hopp <karsten@redhat.com> 0.20.0-4
- temporarily disable checks on ppc64 and s390x (Bugzilla 1105552)
* Thu Mar 27 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 0.20.0-3
- Fix build requirement on libssh2-devel. (RHBZ#1039433)
* Tue Mar 25 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 0.20.0-2
- Build with the bundled xdiff.
- Disable a failing test. (libgit2#2199)
- Add missing build requirement on libssh2. (RHBZ#1039433)
- Build a thread-safe libgit2.
* Sun Nov 24 2013 Ignacio Casal Quinteiro <icq@gnome.org> - 0.20.0-1
- 0.20.0
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.19.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Jun 25 2013 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.19.0-1
- 0.19.0
* Wed Jun 19 2013 Dan Horák <dan[at]danny.cz> - 0.18.0-5
- Add htonl() and friends declarations on non-x86 arches
- Rebuilt with fixed libxdiff for big endian arches
* Thu May 30 2013 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.18.0-4
- Update the http-parser patch
- Skip tests that require network connectivity
* Thu May 30 2013 Tom Callaway <spot@fedoraproject.org> - 0.18.0-3
- use system libxdiff instead of bundled copy
* Fri May 24 2013 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.18.0-2
- Remove unnecessary CMake build flags
- Fix the pkgconfig file
* Thu May 02 2013 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.18.0-1
- Update to version 0.18.0
- Unbundle the http-parser library
* Fri Oct 19 2012 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.17.0-2
- Use make for building and installation
- Specify minimum CMake version
- Remove useless OpenSSL build dependency
- Move development documentation to the -devel package
- Add code examples to the -devel package
* Thu Oct 18 2012 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.17.0-1
- Initial package.
* Fri Sep 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.26.6-1
- Initial package

View File

@ -1 +1 @@
SHA512 (libgit2-1.1.0.tar.gz) = 347bb68900181b44fa58a0417506c91383adb965607fce049a5b4c57ac9cc286e0a140d164c339b50fb6cd6951f47757c2917a2df44ba004bfaa4fb643946bb8
SHA512 (libgit2-0.26.8.tar.gz) = efb9229b2882ac36910d75778d7431bec40f3529f2ad2dd6a950d5580ceb0d4dd798242a422ea6cbb880f515df4dfbb7055a65dd5a8106696d3d458851fca56e