Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] libgit2: update to 1.2.0.
@ 2021-10-14  7:10 g4s8
  2021-10-14 16:25 ` q66
                   ` (27 more replies)
  0 siblings, 28 replies; 29+ messages in thread
From: g4s8 @ 2021-10-14  7:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1897 bytes --]

There is a new pull request by g4s8 against master on the void-packages repository

https://github.com/g4s8/void-packages libgit2-1.2.0
https://github.com/void-linux/void-packages/pull/33535

libgit2: update to 1.2.0.
Updated libgit2 to `v1.2.0`, added patch with PR
https://github.com/libgit2/libgit2/pull/6032 of
`git_remote_name_is_valid` fix for https://github.com/libgit2/git2go/issues/834 issue.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me: checked with tests of https://github.com/libgit2/git2go (`libgit2` is a dependency there)
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC) (built, installed and tested)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/33535.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libgit2-1.2.0-33535.patch --]
[-- Type: text/x-diff, Size: 4283 bytes --]

From 01515f6ba53ed118c2bcbf1fd8e38a1f09e1a93d Mon Sep 17 00:00:00 2001
From: Kirill <g4s8.public@gmail.com>
Date: Wed, 13 Oct 2021 14:35:36 +0300
Subject: [PATCH] libgit2: update to 1.2.0.

Updated libgit2 to `v1.2.0`, added patch with PR
https://github.com/libgit2/libgit2/pull/6032 of
`git_remote_name_is_valid` fix.
---
 common/shlibs                                 |  2 +-
 .../extern_git_remote_name_is_valid.patch     | 58 +++++++++++++++++++
 srcpkgs/libgit2/template                      |  6 +-
 3 files changed, 62 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libgit2/patches/extern_git_remote_name_is_valid.patch

diff --git a/common/shlibs b/common/shlibs
index 840fbc0b9a9f..64e4eafdf728 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1315,7 +1315,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.2 libgit2-1.2.0_4
 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/extern_git_remote_name_is_valid.patch b/srcpkgs/libgit2/patches/extern_git_remote_name_is_valid.patch
new file mode 100644
index 000000000000..a84a285da726
--- /dev/null
+++ b/srcpkgs/libgit2/patches/extern_git_remote_name_is_valid.patch
@@ -0,0 +1,58 @@
+From 27f50a66124054518d5febe984bccad02ee0846b Mon Sep 17 00:00:00 2001
+From: Miguel Arroz <750683+arroz@users.noreply.github.com>
+Date: Thu, 2 Sep 2021 18:59:19 -0700
+Subject: [PATCH 1/2] #6028: Check if `threadstate->error_t.message` is not
+ `git_buf__initbuf` before freeing.
+
+This follows the same principle as `buffer.c` where the same check is done before freeing the buffer. It fixes the crash described in #6028.
+---
+ src/threadstate.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/threadstate.c b/src/threadstate.c
+index 6031e8280..e2c08975f 100644
+--- a/src/threadstate.c
++++ b/src/threadstate.c
+@@ -36,7 +36,8 @@ static void threadstate_dispose(git_threadstate *threadstate)
+ 	if (!threadstate)
+ 		return;
+ 
+-	git__free(threadstate->error_t.message);
++    if (threadstate->error_t.message != git_buf__initbuf)
++        git__free(threadstate->error_t.message);
+ 	threadstate->error_t.message = NULL;
+ }
+ 
+-- 
+2.33.0
+
+
+From 62ee779ea4cdd877419571442860a0d29896a59c Mon Sep 17 00:00:00 2001
+From: lhchavez <lhchavez@lhchavez.com>
+Date: Sat, 4 Sep 2021 18:01:10 -0700
+Subject: [PATCH 2/2] remote: Mark `git_remote_name_is_valid` as `GIT_EXTERN`
+
+This change makes `git_remote_name_is_valid` be part of the public
+interface of the library. This is needed for other language bindings to
+be able to find this symbol (like in git2go, when linking against
+libgit2 dynamically).
+---
+ include/git2/remote.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/git2/remote.h b/include/git2/remote.h
+index 1f52fcd94..51a7d1cdc 100644
+--- a/include/git2/remote.h
++++ b/include/git2/remote.h
+@@ -971,7 +971,7 @@ GIT_EXTERN(int) git_remote_rename(
+  * @param remote_name name to be checked.
+  * @return 0 on success or an error code
+  */
+-int git_remote_name_is_valid(int *valid, const char *remote_name);
++GIT_EXTERN(int) git_remote_name_is_valid(int *valid, const char *remote_name);
+ 
+ /**
+ * Delete an existing persisted remote.
+-- 
+2.33.0
+
diff --git a/srcpkgs/libgit2/template b/srcpkgs/libgit2/template
index 2722bd6553f7..463c7cda8c25 100644
--- a/srcpkgs/libgit2/template
+++ b/srcpkgs/libgit2/template
@@ -1,7 +1,7 @@
 # Template file for 'libgit2'
 pkgname=libgit2
-version=1.0.1
-revision=3
+version=1.2.0
+revision=4
 build_style=cmake
 hostmakedepends="python3 git pkg-config"
 makedepends="zlib-devel openssl-devel http-parser-devel libssh2-devel"
@@ -10,7 +10,7 @@ maintainer="q66 <daniel@octaforge.org>"
 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=701a5086a968a46f25e631941b99fc23e4755ca2c56f59371ce1d94b9a0cc643
 
 post_install() {
 	vlicense COPYING

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2022-06-21  2:13 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14  7:10 [PR PATCH] libgit2: update to 1.2.0 g4s8
2021-10-14 16:25 ` q66
2021-10-15  6:39 ` [PR PATCH] [Updated] " g4s8
2021-10-15  7:16 ` g4s8
2021-10-15  7:20 ` g4s8
2021-10-15 13:36 ` [PR REVIEW] " ericonr
2021-10-15 13:36 ` ericonr
2021-10-15 13:36 ` ericonr
2021-10-15 13:40 ` ericonr
2021-10-15 14:13 ` q66
2021-10-15 14:14 ` q66
2021-10-15 14:42 ` g4s8
2021-10-15 15:28 ` q66
2021-10-15 16:35 ` g4s8
2021-10-18  9:13 ` [PR PATCH] [Updated] " g4s8
2021-10-19  6:17 ` g4s8
2021-10-19  6:17 ` g4s8
2021-10-19  6:17 ` g4s8
2021-10-19 13:44 ` q66
2021-10-19 14:10 ` [PR PATCH] [Updated] " g4s8
2021-10-19 15:40 ` g4s8
2021-10-25  7:13 ` g4s8
2021-10-26  5:39 ` g4s8
2021-11-15 14:46 ` g4s8
2021-11-17  9:49 ` g4s8
2021-11-17 15:36 ` q66
2021-11-18  6:34 ` [PR PATCH] [Updated] " g4s8
2022-06-07  2:12 ` github-actions
2022-06-21  2:13 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).