From 13bd6e06a054ba84b2b10fcefd470fd752f3afb8 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Fri, 27 Jan 2023 00:47:42 +0000 Subject: [PATCH] Update to 1.5.1 (rhbz#2054093) Add compat copy of 1.4.5. --- .gitignore | 1 + libgit2-remove-ftruncate-test.patch | 22 ++++++++++++++++++++++ libgit2.spec | 12 ++++++++++-- sources | 2 +- 4 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 libgit2-remove-ftruncate-test.patch diff --git a/.gitignore b/.gitignore index 604a780..34e25a1 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ /libgit2-1.3.1.tar.gz /libgit2-1.4.4.tar.gz /libgit2-1.4.5.tar.gz +/libgit2-1.5.1.tar.gz diff --git a/libgit2-remove-ftruncate-test.patch b/libgit2-remove-ftruncate-test.patch new file mode 100644 index 0000000..81c3486 --- /dev/null +++ b/libgit2-remove-ftruncate-test.patch @@ -0,0 +1,22 @@ +From 12d73c418253a5c396465079c2808e07de17a1db Mon Sep 17 00:00:00 2001 +From: Peter Pettersson +Date: Thu, 14 Jul 2022 18:28:58 +0200 +Subject: [PATCH] clar: remove ftrunacte from libgit2 tests + +--- + tests/libgit2/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/libgit2/CMakeLists.txt b/tests/libgit2/CMakeLists.txt +index 27f421ad629..7f6fafe7709 100644 +--- a/tests/libgit2/CMakeLists.txt ++++ b/tests/libgit2/CMakeLists.txt +@@ -65,7 +65,7 @@ endif() + + include(AddClarTest) + add_clar_test(libgit2_tests offline -v -xonline) +-add_clar_test(libgit2_tests invasive -v -score::ftruncate -sfilter::stream::bigfile -sodb::largefiles -siterator::workdir::filesystem_gunk -srepo::init -srepo::init::at_filesystem_root) ++add_clar_test(libgit2_tests invasive -v -sfilter::stream::bigfile -sodb::largefiles -siterator::workdir::filesystem_gunk -srepo::init -srepo::init::at_filesystem_root) + add_clar_test(libgit2_tests online -v -sonline -xonline::customcert -xonline::clone::ssh_auth_methods) + add_clar_test(libgit2_tests online_customcert -v -sonline::customcert) + add_clar_test(libgit2_tests gitdaemon -v -sonline::push) diff --git a/libgit2.spec b/libgit2.spec index 35a90a4..1c4deb3 100644 --- a/libgit2.spec +++ b/libgit2.spec @@ -6,13 +6,16 @@ %endif Name: libgit2 -Version: 1.4.5 +Version: 1.5.1 Release: %autorelease 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/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# https://github.com/libgit2/libgit2/pull/6357 +Patch0: libgit2-remove-ftruncate-test.patch + BuildRequires: gcc BuildRequires: cmake >= 3.5.1 BuildRequires: ninja-build @@ -25,6 +28,7 @@ BuildRequires: openssl-devel BuildRequires: pcre2-devel BuildRequires: python3 BuildRequires: zlib-devel +BuildRequires: libgit2 Provides: bundled(libxdiff) %description @@ -48,7 +52,7 @@ 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 '/-sonline/s/^/#/' tests/libgit2/CMakeLists.txt # Remove bundled libraries rm -vr deps @@ -58,6 +62,7 @@ rm -vr deps -GNinja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DREGEX_BACKEND=pcre2 \ + -DBUILD_CLI=OFF \ -DUSE_HTTP_PARSER=system \ -DUSE_SHA1=HTTPS \ -DUSE_HTTPS=OpenSSL \ @@ -72,12 +77,15 @@ rm -vr deps %install %cmake_install +# Include previous ABI version for temporary binary compatibility +cp -a %{_libdir}/libgit2.so.1.4* %{buildroot}%{_libdir} %check %ctest %files %license COPYING +%{_libdir}/libgit2.so.1.5* %{_libdir}/libgit2.so.1.4* %files devel diff --git a/sources b/sources index 69631f6..0dc26b2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libgit2-1.4.5.tar.gz) = 7768213f62e0d93e368f0164a373b1ebc5390156fba98553e0b658764aac7ff873acf10b0c902aa9dfb961c25067ee39a328024cbd8b0367d3e5dd2dce8f5324 +SHA512 (libgit2-1.5.1.tar.gz) = 04cf389e30cd9fb787704e3c8997acaaeea5c13e1e2f9eaf9f5598d35c2e85f3cf04b47312cae9e7278236ecb089c2d33addd852e38d3c7d2daa87929b077f39