Compare commits

...

11 Commits
f31 ... rawhide

Author SHA1 Message Date
Sahana Prasad
e16f348ab1 Rebuilt with OpenSSL 3.0.0 2021-09-14 19:06:06 +02:00
Fedora Release Engineering
a42969342f - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 11:27:34 +00:00
Kamil Dudka
9642d1a969 make the run-time dependency on libssh2 optional 2021-03-18 17:15:36 +01:00
Fedora Release Engineering
b8681828d9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 17:08:36 +00:00
Igor Raits
60426eb85c
Rebuild
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2020-12-28 18:55:46 +01:00
Igor Raits
04872ae579
Update to 1.1.0
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2020-12-28 17:44:07 +01:00
Fedora Release Engineering
e62c539ed5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 04:43:48 +00:00
Igor Raits
120fe87648
Fix removing untracked files by path in subdirectories
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2020-06-15 14:39:42 +02:00
Pete Walter
a25515cceb Update to 1.0.1 2020-06-04 11:52:11 +01:00
Igor Raits
e3151b3f27
Rebuild for http-parser 2.9.4
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2020-04-15 17:51:43 +02:00
Igor Raits
f37fab884c
Update to 1.0.0
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2020-04-15 08:51:48 +02:00
5 changed files with 127 additions and 89 deletions

3
.gitignore vendored
View File

@ -34,3 +34,6 @@
/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

View File

@ -1,81 +0,0 @@
From fbda0575b133a57d8f5d264742098994c7624c99 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= <kloczko.tomasz@gmail.com>
Date: Wed, 19 Feb 2020 12:54:19 +0000
Subject: [PATCH] Fix #5410: fix installing libgit2.pc in wrong location
Remove using custom PKG_BUILD_PREFIu, PKG_BUILD_LIBDIR and
PKG_BUILD_INCLUDEDIR variables.
Use cmake CMAKE_INSTALL_PREFIX, LIB_INSTALL_DIR, INCLUDE_INSTALL_DIR instead.
This patch fixes install libgit2.pc file in correct location and simpifies
cmake module.
---
cmake/Modules/PkgBuildConfig.cmake | 39 +++---------------------------
1 file changed, 4 insertions(+), 35 deletions(-)
diff --git a/cmake/Modules/PkgBuildConfig.cmake b/cmake/Modules/PkgBuildConfig.cmake
index 1c0079eb0..e4c574431 100644
--- a/cmake/Modules/PkgBuildConfig.cmake
+++ b/cmake/Modules/PkgBuildConfig.cmake
@@ -1,10 +1,5 @@
# pkg-config file generation
#
-# Uses the following globals:
-# - PKG_BUILD_PREFIX: the build location (aka prefix). Defaults to CMAKE_INSTALL_PREFIX
-# - PKG_BUILD_LIBDIR: the libdir location. Defaults to ${prefix}/lib.
-# - PKG_BUILD_INCLUDEDIR: the includedir location. Defaults to ${prefix}/include.
-#
function(pkg_build_config)
set(options)
@@ -29,37 +24,11 @@ function(pkg_build_config)
message(FATAL_ERROR "Missing VERSION argument")
endif()
- if (DEFINED PKG_BUILD_PREFIX)
- set(PKGCONFIG_PREFIX "${PKG_BUILD_PREFIX}")
- else()
- set(PKGCONFIG_PREFIX "${CMAKE_INSTALL_PREFIX}")
- endif()
-
- if(DEFINED PKG_BUILD_LIBDIR)
- if (IS_ABSOLUTE ${PKG_BUILD_LIBDIR})
- set(PKGCONFIG_LIBDIR ${PKG_BUILD_LIBDIR})
- else()
- set(PKGCONFIG_LIBDIR "\${prefix}/${PKG_BUILD_LIBDIR}")
- endif()
- else()
- set(PKGCONFIG_LIBDIR "\${prefix}/lib")
- endif()
-
- if(DEFINED PKG_BUILD_INCLUDEDIR)
- if (IS_ABSOLUTE ${PKG_BUILD_INCLUDEDIR})
- set(PKGCONFIG_INCLUDEDIR ${PKG_BUILD_INCLUDEDIR})
- else()
- set(PKGCONFIG_INCLUDEDIR "\${prefix}/${PKG_BUILD_INCLUDEDIR}")
- endif()
- else()
- set(PKGCONFIG_INCLUDEDIR "\${prefix}/include")
- endif()
-
# Write .pc "header"
file(WRITE "${PKGCONFIG_FILE}"
- "prefix=\"${PKGCONFIG_PREFIX}\"\n"
- "libdir=\"${PKGCONFIG_LIBDIR}\"\n"
- "includedir=\"${PKGCONFIG_INCLUDEDIR}\"\n"
+ "prefix=\"${CMAKE_INSTALL_PREFIX}\"\n"
+ "libdir=\"${LIB_INSTALL_DIR}\"\n"
+ "includedir=\"${INCLUDE_INSTALL_DIR}\"\n"
"\n"
"Name: ${PKGCONFIG_NAME}\n"
"Description: ${PKGCONFIG_DESCRIPTION}\n"
@@ -105,6 +74,6 @@ function(pkg_build_config)
# Install .pc file
install(FILES "${PKGCONFIG_FILE}"
- DESTINATION "${PKGCONFIG_PREFIX}/${PKGCONFIG_LIBDIR}/pkgconfig"
+ DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
)
endfunction()
--
2.25.1

View File

@ -0,0 +1,76 @@
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

@ -1,24 +1,31 @@
# libssh2 is not available on RHEL
%if 0%{?rhel}
%bcond_with libssh2
%else
%bcond_without libssh2
%endif
Name: libgit2
Version: 0.99.0
Release: 2%{?dist}
Version: 1.1.0
Release: 6%{?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
Patch0001: 0001-Fix-5410-fix-installing-libgit2.pc-in-wrong-location.patch
BuildRequires: gcc
BuildRequires: cmake >= 3.5.1
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)
Obsoletes: libgit2_0.28 < 0.28.3-2
%description
libgit2 is a portable, pure C implementation of the Git core methods
@ -29,7 +36,6 @@ with bindings.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: libgit2_0.28-devel < 0.28.3-2
%description devel
This package contains libraries and header files for
@ -38,8 +44,6 @@ developing applications that use %{name}.
%prep
%autosetup -p1
sed -i -e '/LIBGIT2_PC_REQUIRES/s/libpcre2/libpcre2-8/' src/CMakeLists.txt
# Remove VCS files from examples
find examples -name ".gitignore" -delete -print
@ -58,6 +62,9 @@ rm -vr deps
-DUSE_SHA1=HTTPS \
-DUSE_HTTPS=OpenSSL \
-DUSE_NTLMCLIENT=OFF \
%if %{without libssh2}
-DUSE_SSH=OFF \
%endif
%{nil}
%ninja_build -C %{_target_platform}
@ -79,6 +86,39 @@ rm -vr deps
%{_includedir}/git2/
%changelog
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 1.1.0-6
- Rebuilt with OpenSSL 3.0.0
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* 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

View File

@ -1 +1 @@
SHA512 (libgit2-0.99.0.tar.gz) = e38e18da0e6ed1e5c8198c9eb2c362b21da2d0b9c8bc23309d2f70183549f4b9f23a6db8ce5f1f0f24b373e6427039c2a845b62dd74f91b02cfe8954f961a91b
SHA512 (libgit2-1.1.0.tar.gz) = 347bb68900181b44fa58a0417506c91383adb965607fce049a5b4c57ac9cc286e0a140d164c339b50fb6cd6951f47757c2917a2df44ba004bfaa4fb643946bb8