From fb1006cb4ab69200d460e45208f7a3e014bda44a Mon Sep 17 00:00:00 2001 From: Piraty Date: Sun, 30 Jan 2022 14:29:53 +0100 Subject: [PATCH] libgit2: update to 1.5.0. --- common/shlibs | 2 +- ...-remove-ftrunacte-from-libgit2-tests.patch | 25 +++++++++++++++++++ ...test-validate_current_user_ownership.patch | 13 ++++++++++ srcpkgs/libgit2/template | 20 ++++++++++++--- 4 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/libgit2/patches/0001-clar-remove-ftrunacte-from-libgit2-tests.patch create mode 100644 srcpkgs/libgit2/patches/disable-test-validate_current_user_ownership.patch diff --git a/common/shlibs b/common/shlibs index 2c579d7b5a3..925fea2868d 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1328,7 +1328,7 @@ libunwind-ppc64.so.8 libunwind-1.5.0_3 libunwind-setjmp.so.0 libunwind-1.5.0_3 libmicrohttpd.so.12 libmicrohttpd-0.9.73_1 libmicrodns.so.1 libmicrodns-0.2.0_1 -libgit2.so.1.0 libgit2-1.0.1_3 +libgit2.so.1.5 libgit2-1.5.0_1 libgit2-glib-1.0.so.0 libgit2-glib-0.23.4_1 libagg.so.2 agg-2.5_1 libzzip-0.so.13 zziplib-0.13.62_1 diff --git a/srcpkgs/libgit2/patches/0001-clar-remove-ftrunacte-from-libgit2-tests.patch b/srcpkgs/libgit2/patches/0001-clar-remove-ftrunacte-from-libgit2-tests.patch new file mode 100644 index 00000000000..b084896b4e6 --- /dev/null +++ b/srcpkgs/libgit2/patches/0001-clar-remove-ftrunacte-from-libgit2-tests.patch @@ -0,0 +1,25 @@ +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 27f421ad6..7f6fafe77 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) + add_clar_test(libgit2_tests online_customcert -v -sonline::customcert) + add_clar_test(libgit2_tests gitdaemon -v -sonline::push) +-- +2.38.0 + diff --git a/srcpkgs/libgit2/patches/disable-test-validate_current_user_ownership.patch b/srcpkgs/libgit2/patches/disable-test-validate_current_user_ownership.patch new file mode 100644 index 00000000000..1365d1c1489 --- /dev/null +++ b/srcpkgs/libgit2/patches/disable-test-validate_current_user_ownership.patch @@ -0,0 +1,13 @@ +diff --git a/tests/util/path.c b/tests/util/path.c +index 2c39e0887..71a8d6040 100644 +--- a/tests/util/path.c ++++ b/tests/util/path.c +@@ -757,7 +757,7 @@ void test_path__validate_current_user_ownership(void) + cl_git_fail(git_fs_path_owner_is_current_user(&is_cur, "c:\\path\\does\\not\\exist")); + #else + cl_git_pass(git_fs_path_owner_is_current_user(&is_cur, "/")); +- cl_assert_equal_i(is_cur, 0); ++ //cl_assert_equal_i(is_cur, 0); // xbps-src chroot belongs to $USER, not root + + cl_git_fail(git_fs_path_owner_is_current_user(&is_cur, "/path/does/not/exist")); + #endif diff --git a/srcpkgs/libgit2/template b/srcpkgs/libgit2/template index 142d5d122fc..0253f5c9c72 100644 --- a/srcpkgs/libgit2/template +++ b/srcpkgs/libgit2/template @@ -1,8 +1,9 @@ # Template file for 'libgit2' pkgname=libgit2 -version=1.0.1 -revision=3 +version=1.5.0 +revision=1 build_style=cmake +configure_args="-DENABLE_REPRODUCIBLE_BUILDS=ON -DUSE_SSH=ON" hostmakedepends="python3 git pkg-config" makedepends="zlib-devel openssl-devel http-parser-devel libssh2-devel" short_desc="Git linkable library" @@ -10,7 +11,20 @@ maintainer="Orphaned " license="custom:GPL-2.0-or-later WITH GCC-exception-2.0" homepage="https://libgit2.org" distfiles="https://github.com/libgit2/libgit2/archive/v${version}.tar.gz" -checksum=1775427a6098f441ddbaa5bd4e9b8a043c7401e450ed761e69a415530fea81d2 +checksum=8de872a0f201b33d9522b817c92e14edb4efad18dae95cf156cf240b2efff93e + +if [ "$XBPS_CHECK_PKGS" ]; then + configure_args+=" -DBUILD_TESTS=ON" +else + configure_args+=" -DBUILD_TESTS=OFF" +fi + +post_patch() { + # no online tests + vsed \ + -i tests/libgit2/CMakeLists.txt \ + -e '/-sonline/s/^/#/' +} post_install() { vlicense COPYING