From 2b1a8d39b45489c261ca41916fbfc5fa95735589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Thu, 15 Oct 2020 16:04:45 +0200 Subject: [PATCH] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/libgit2#e62c539ed572052f0044c2fd8f710c97c38cd74b --- .gitignore | 38 +++ ...oving-untracked-files-by-path-in-sub.patch | 76 +++++ libgit2.spec | 290 ++++++++++++++++++ sources | 1 + 4 files changed, 405 insertions(+) create mode 100644 0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch create mode 100644 libgit2.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..7b19a8a 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,38 @@ +/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 diff --git a/0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch b/0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch new file mode 100644 index 0000000..652da3d --- /dev/null +++ b/0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch @@ -0,0 +1,76 @@ +From d62e44cb8218840a0291fb5fbb7c5106e1e35a12 Mon Sep 17 00:00:00 2001 +From: Segev Finer +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 + diff --git a/libgit2.spec b/libgit2.spec new file mode 100644 index 0000000..7605388 --- /dev/null +++ b/libgit2.spec @@ -0,0 +1,290 @@ +Name: libgit2 +Version: 1.0.1 +Release: 3%{?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/extrawurst/gitui/issues/128 +# https://github.com/libgit2/libgit2/commit/d62e44cb8218840a0291fb5fbb7c5106e1e35a12 +Patch0001: 0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch + +BuildRequires: gcc +BuildRequires: cmake >= 3.5.1 +BuildRequires: ninja-build +BuildRequires: http-parser-devel +BuildRequires: libcurl-devel +BuildRequires: libssh2-devel +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 +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. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description devel +This package contains libraries and header files for +developing applications that use %{name}. + +%prep +%autosetup -p1 + +# Remove VCS files from examples +find examples -name ".gitignore" -delete -print + +# Don't run "online" tests +sed -i '/-sonline/s/^/#/' tests/CMakeLists.txt + +# Remove bundled libraries +rm -vr 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 \ + %{nil} +%ninja_build -C %{_target_platform} + +%install +%ninja_install -C %{_target_platform} + +%check +%ninja_test -C %{_target_platform} + +%files +%license COPYING +%{_libdir}/libgit2.so.* + +%files devel +%doc AUTHORS docs examples README.md +%{_libdir}/libgit2.so +%{_libdir}/pkgconfig/libgit2.pc +%{_includedir}/git2.h +%{_includedir}/git2/ + +%changelog +* Tue Jul 28 2020 Fedora Release Engineering - 1.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jun 15 2020 Igor Raits - 1.0.1-2 +- Fix removing untracked files by path in subdirectories + +* Thu Jun 04 2020 Pete Walter - 1.0.1-1 +- Update to 1.0.1 + +* Wed Apr 15 2020 Igor Raits - 1.0.0-2 +- Rebuild for http-parser 2.9.4 + +* Wed Apr 15 2020 Igor Raits - 1.0.0-1 +- Update to 1.0.0 + +* Tue Mar 03 2020 Igor Raits - 0.99.0-2 +- Fix broken deps for pcre2 + +* Mon Mar 02 2020 Igor Raits - 0.99.0-1 +- Update to 0.99.0 + +* Wed Jan 29 2020 Fedora Release Engineering - 0.28.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Dec 11 09:00:52 CET 2019 Igor Gnatenko - 0.28.4-1 +- Update to 0.28.4 + +* Fri Sep 13 2019 Pete Walter - 0.28.3-1 +- Update to 0.28.3 + +* Thu Jul 25 2019 Fedora Release Engineering - 0.28.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Jul 14 13:34:04 CEST 2019 Igor Gnatenko - 0.28.2-2 +- Obsolete libgit2_0.28 + +* Thu Jun 06 14:22:16 CEST 2019 Igor Gnatenko - 0.28.2-1 +- Update to 0.28.2 + +* Fri Feb 01 2019 Fedora Release Engineering - 0.27.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jan 28 2019 Pete Walter - 0.27.8-1 +- Update to 0.27.8 + +* Fri Oct 26 2018 Pete Walter - 0.27.7-1 +- Update to 0.27.7 + +* Mon Oct 08 2018 Pete Walter - 0.27.5-1 +- Update to 0.27.5 + +* Fri Aug 10 2018 Igor Gnatenko - 0.27.4-1 +- Update to 0.27.4 +- Update upstream URL + +* Tue Aug 07 2018 Pete Walter - 0.26.6-1 +- Update to 0.26.6 + +* Fri Jul 13 2018 Fedora Release Engineering - 0.26.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jul 10 2018 Pete Walter - 0.26.5-1 +- Update to 0.26.5 (CVE-2018-10887, CVE-2018-10888) + +* Mon Jun 25 2018 Pete Walter - 0.26.4-1 +- Update to 0.26.4 (CVE-2018-11235) + +* Mon Mar 12 2018 Igor Gnatenko - 0.26.3-1 +- Update to 0.26.3 + +* Wed Feb 07 2018 Fedora Release Engineering - 0.26.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Feb 02 2018 Igor Gnatenko - 0.26.0-4 +- Switch to %%ldconfig_scriptlets + +* Thu Aug 03 2017 Fedora Release Engineering - 0.26.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.26.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Jul 08 2017 Igor Gnatenko - 0.26.0-1 +- Update to 0.26.0 + +* Tue Feb 07 2017 Igor Gnatenko - 0.25.1-3 +- Backport patch to fix pkgconfig file under g-ir-scanner + +* Tue Feb 07 2017 Igor Gnatenko - 0.25.1-2 +- Bump release for rebuild + +* Tue Feb 07 2017 Igor Gnatenko - 0.25.1-1 +- Update to 0.25.1 (RHBZ #1395926) + +* Tue Jan 10 2017 Igor Gnatenko - 0.24.6-1 +- Update to 0.24.6 (RHBZ #1411857) + +* Thu Nov 03 2016 Igor Gnatenko - 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 - 0.24.2-2 +- Backport patch for CVE-2016-8568, CVE-2016-8569 + +* Tue Oct 04 2016 Igor Gnatenko - 0.24.2-1 +- Update to 0.24.2 (RHBZ #1381398) + +* Wed Apr 13 2016 Igor Gnatenko - 0.24.1-1 +- Update to 0.24.1 + +* Sun Mar 20 2016 Igor Gnatenko - 0.24.0-1 +- Update to 0.24.0 (RHBZ #1310638) + +* Thu Feb 04 2016 Fedora Release Engineering - 0.23.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sun Nov 22 2015 Igor Gnatenko - 0.23.4-1 +- Update to 0.23.4 (RHBZ #1281633) + +* Tue Oct 06 2015 Igor Gnatenko - 0.23.3-1 +- Update to 0.23.3 (RHBZ #1260324) + +* Tue Sep 08 2015 Igor Gnatenko - 0.23.2-1 +- Update to 0.23.2 + +* Wed Sep 02 2015 Veeti Paananen - 0.23.1-1 +- Update to 0.23.1 +- Add curl support + +* Thu Jul 30 2015 Igor Gnatenko - 0.23.0-1 +- Update to 0.23.0 + +* Fri Jul 03 2015 Veeti Paananen - 0.22.3-1 +- Update to 0.22.3 + +* Wed Jun 17 2015 Fedora Release Engineering - 0.22.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Mar 24 2015 Veeti Paananen - 0.22.2-1 +- Update to 0.22.2 + +* Sat Feb 14 2015 Veeti Paananen - 0.22.1-1 +- Update to 0.22.1 + +* Mon Jan 19 2015 Ignacio Casal Quinteiro - 0.22.0-1 +- Update to 0.22.0 + +* Fri Dec 26 2014 Veeti Paananen - 0.21.3-1 +- Update to 0.21.3 + +* Sun Aug 17 2014 Fedora Release Engineering - 0.21.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Wed Aug 06 2014 Christopher Meng - 0.21.1-1 +- Update to 0.21.1 + +* Fri Jul 18 2014 Yaakov Selkowitz - 0.21.0-2 +- Fix memory alignment issues on arm, aarch64, ppc64le (#1115905) + +* Sat Jun 21 2014 Christopher Meng - 0.21.0-1 +- Update to 0.21.0 + +* Fri Jun 06 2014 Karsten Hopp 0.20.0-4 +- temporarily disable checks on ppc64 and s390x (Bugzilla 1105552) + +* Thu Mar 27 2014 Mathieu Bridon - 0.20.0-3 +- Fix build requirement on libssh2-devel. (RHBZ#1039433) + +* Tue Mar 25 2014 Mathieu Bridon - 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 - 0.20.0-1 +- 0.20.0 + +* Sat Aug 03 2013 Fedora Release Engineering - 0.19.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jun 25 2013 Veeti Paananen - 0.19.0-1 +- 0.19.0 + +* Wed Jun 19 2013 Dan HorĂ¡k - 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 - 0.18.0-4 +- Update the http-parser patch +- Skip tests that require network connectivity + +* Thu May 30 2013 Tom Callaway - 0.18.0-3 +- use system libxdiff instead of bundled copy + +* Fri May 24 2013 Veeti Paananen - 0.18.0-2 +- Remove unnecessary CMake build flags +- Fix the pkgconfig file + +* Thu May 02 2013 Veeti Paananen - 0.18.0-1 +- Update to version 0.18.0 +- Unbundle the http-parser library + +* Fri Oct 19 2012 Veeti Paananen - 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 - 0.17.0-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..14fb899 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (libgit2-1.0.1.tar.gz) = 7c307822b22e3771e5e908b115600310f7901b3250287532c498003b25a5b1e007bfa23592f16ec4d83c1567a9213710526f78cab7c120316e9a8fc74c5e57a9