Skip to contentSkip to conversation

package/git: bump to version 2.39.0

PATCH In review Bagas Sanjaya 2 participants 2 messages Dec 13, 2022 – Dec 18, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/git: bump to version 2.39.0

The git package on Buildroot is quite lagging behind (v2.31.4, released on July 12, 2022 while the baseline v2.31.0 was released on March 15, 2021). Bump the package to v2.39.0 (released December 12, 2022).

While at it, also replace patch fixing uclibc no threads build with two patches cherry-picked from upstream next branch, which fixes the same issue by fixing the handling of flockfile(), funlockfile(), and getc_unlocked() declarations. These patches missed the release but planned for next maintenance release (v2.39.1).

The reason for replacing the patch is when original fix patch was upstreamed [1], Jeff King noted that the build failure root cause was flockfile() is defined regardless of whether uclibc is configured with threads support or not [2].

Release notes for v2.39.0 is available on release announcement on Git mailing list at [3].

[1]: https://lore.kernel.org/git/[email protected]/
[2]: https://lore.kernel.org/git/Y4RAr04vS%[email protected]/
[3]: https://lore.kernel.org/git/[email protected]/

---
 .../git/0001-Fix-build-without-threads.patch  | 100 ----------------
 ...avoid-redefining-system-function-nam.patch | 107 ++++++++++++++++++
 ...undefine-system-names-before-redecla.patch |  55 +++++++++
 package/git/git.hash                          |   2 +-
 package/git/git.mk                            |   4 +-
 5 files changed, 164 insertions(+), 104 deletions(-)
 delete mode 100644 package/git/0001-Fix-build-without-threads.patch
 create mode 100644 package/git/0001-git-compat-util-avoid-redefining-system-function-nam.patch
 create mode 100644 package/git/0002-git-compat-util-undefine-system-names-before-redecla.patch
package/git/0001-Fix-build-without-threads.patch deleted +0 -100
deleted file mode 100644
index 7ce85ffaf8..0000000000
@@ -1,100 +0,0 @@
-From 07d66af3b0800764087c4151d4f6562d4f8cce05 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <[email protected]>
-Date: Mon, 14 Dec 2020 23:00:33 +0100
-Subject: [PATCH] Fix build without threads
-
-Build without threads is broken since version 2.29.0 and
-https://github.com/git/git/commit/15b52a44e0c92a0658e891194a5b0610d1f53afc:
-
-In file included from cache.h:4,
-                 from blame.c:1:
-git-compat-util.h:1238:20: error: static declaration of 'flockfile' follows non-static declaration
- static inline void flockfile(FILE *fh)
-                    ^~~~~~~~~
-In file included from git-compat-util.h:168,
-                 from cache.h:4,
-                 from blame.c:1:
-/nvme/rc-buildroot-test/scripts/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/stdio.h:806:13: note: previous declaration of 'flockfile' was here
- extern void flockfile (FILE *__stream) __THROW;
-             ^~~~~~~~~
-In file included from cache.h:4,
-                 from blame.c:1:
-git-compat-util.h:1242:20: error: static declaration of 'funlockfile' follows non-static declaration
- static inline void funlockfile(FILE *fh)
-                    ^~~~~~~~~~~
-In file included from git-compat-util.h:168,
-                 from cache.h:4,
-                 from blame.c:1:
-/nvme/rc-buildroot-test/scripts/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/stdio.h:813:13: note: previous declaration of 'funlockfile' was here
- extern void funlockfile (FILE *__stream) __THROW;
-             ^~~~~~~~~~~
-
-To avoid this build failure, check if flockfile is available before
-defining flockfile, funlockfile and getc_unlocked
-
-Fixes:
- - http://autobuild.buildroot.org/results/d41638d1ad8e78dd6f654367c905996b838ee649
-
-Signed-off-by: Fabrice Fontaine <[email protected]>
----
- Makefile          | 5 +++++
- configure.ac      | 6 ++++++
- git-compat-util.h | 2 +-
- 3 files changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 6fb86c5862..58d0893a12 100644
---- a/Makefile
-+++ b/Makefile
-@@ -232,6 +232,8 @@ all::
- # Define NO_STRUCT_ITIMERVAL if you don't have struct itimerval
- # This also implies NO_SETITIMER
- #
-+# Define NO_FLOCKFILE if you don't have flockfile()
-+#
- # Define NO_FAST_WORKING_DIRECTORY if accessing objects in pack files is
- # generally faster on your platform than accessing the working directory.
- #
-@@ -1638,6 +1640,9 @@ endif
- ifdef NO_SETITIMER
- 	COMPAT_CFLAGS += -DNO_SETITIMER
- endif
-+ifdef NO_FLOCKFILE
-+	COMPAT_CFLAGS += -DNO_FLOCKFILE
-+endif
- ifdef NO_PREAD
- 	COMPAT_CFLAGS += -DNO_PREAD
- 	COMPAT_OBJS += compat/pread.o
-diff --git a/configure.ac b/configure.ac
-index 66aedb9288..d4295b5c69 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1132,6 +1132,12 @@ GIT_CHECK_FUNC(setitimer,
- [NO_SETITIMER=YesPlease])
- GIT_CONF_SUBST([NO_SETITIMER])
- #
-+# Define NO_FLOCKFILE if you don't have flockfile.
-+GIT_CHECK_FUNC(flockfile,
-+[NO_FLOCKFILE=],
-+[NO_FLOCKFILE=YesPlease])
-+GIT_CONF_SUBST([NO_FLOCKFILE])
-+#
- # Define NO_STRCASESTR if you don't have strcasestr.
- GIT_CHECK_FUNC(strcasestr,
- [NO_STRCASESTR=],
-diff --git a/git-compat-util.h b/git-compat-util.h
-index 7d509c5022..279cdd941e 100644
---- a/git-compat-util.h
-+++ b/git-compat-util.h
-@@ -1236,7 +1236,7 @@ int warn_on_fopen_errors(const char *path);
- # define SHELL_PATH "/bin/sh"
- #endif
- 
--#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
-+#if !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(NO_FLOCKFILE)
- static inline void flockfile(FILE *fh)
- {
- 	; /* nothing */
--- 
-2.29.2
-
package/git/0001-git-compat-util-avoid-redefining-system-function-nam.patch new file +107 -0

107 lines not on this page · raw message

package/git/0002-git-compat-util-undefine-system-names-before-redecla.patch new file +55 -0

55 lines not on this page · raw message

package/git/git.hash +1 -1
index 41afa83f86..57a77b2810 100644
@@ -1,5 +1,5 @@
 # From: https://www.kernel.org/pub/software/scm/git/sha256sums.asc
-sha256  84fc20acf8fbea5cad7d5d7be0dfeb32494f1dac8e6c61675c904d1fd3d8c016  git-2.31.4.tar.xz
+sha256  ba199b13fb5a99ca3dec917b0bd736bc0eb5a9df87737d435eddfdf10d69265b  git-2.39.0.tar.xz
 # Locally calculated
 sha256  5b2198d1645f767585e8a88ac0499b04472164c0d2da22e75ecf97ef443ab32e  COPYING
 sha256  1922f45d2c49e390032c9c0ba6d7cac904087f7cec51af30c2b2ad022ce0e76a  LGPL-2.1
package/git/git.mk +1 -3
index dc587170e8..9918d4c1ef 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-GIT_VERSION = 2.31.4
+GIT_VERSION = 2.39.0
 GIT_SOURCE = git-$(GIT_VERSION).tar.xz
 GIT_SITE = $(BR2_KERNEL_MIRROR)/software/scm/git
 GIT_LICENSE = GPL-2.0, LGPL-2.1+
@@ -12,8 +12,6 @@ GIT_LICENSE_FILES = COPYING LGPL-2.1
 GIT_CPE_ID_VENDOR = git-scm
 GIT_SELINUX_MODULES = apache git xdg
 GIT_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES)
-# We're patching configure.ac
-GIT_AUTORECONF = YES
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 GIT_DEPENDENCIES += host-pkgconf openssl

base-commit: cd95a33511b9d9de6f6885ec75e6f39608238b9d

Signature · 6 lines
An old man doll... just what I always wanted! - Clara

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 38 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Bagas" == Bagas Sanjaya <[email protected]> writes:

The git package on Buildroot is quite lagging behind (v2.31.4, released on July 12, 2022 while the baseline v2.31.0 was released on March 15, 2021). Bump the package to v2.39.0 (released December 12, 2022).

While at it, also replace patch fixing uclibc no threads build with two patches cherry-picked from upstream next branch, which fixes the same issue by fixing the handling of flockfile(), funlockfile(), and getc_unlocked() declarations. These patches missed the release but planned for next maintenance release (v2.39.1).

The reason for replacing the patch is when original fix patch was upstreamed [1], Jeff King noted that the build failure root cause was flockfile() is defined regardless of whether uclibc is configured with threads support or not [2].

Release notes for v2.39.0 is available on release announcement on Git mailing list at [3].

[1]: https://lore.kernel.org/git/[email protected]/
[2]: https://lore.kernel.org/git/Y4RAr04vS%[email protected]/
[3]: https://lore.kernel.org/git/[email protected]/

---
 .../git/0001-Fix-build-without-threads.patch  | 100 ----------------
 ...avoid-redefining-system-function-nam.patch | 107 ++++++++++++++++++
 ...undefine-system-names-before-redecla.patch |  55 +++++++++
 package/git/git.hash                          |   2 +-
 package/git/git.mk                            |   4 +-
 5 files changed, 164 insertions(+), 104 deletions(-)
 delete mode 100644 package/git/0001-Fix-build-without-threads.patch
 create mode 100644 package/git/0001-git-compat-util-avoid-redefining-system-function-nam.patch
 create mode 100644 package/git/0002-git-compat-util-undefine-system-names-before-redecla.patch

+++ b/package/git/0001-git-compat-util-avoid-redefining-system-function-nam.patch

package/git/0001-git-compat-util-avoid-redefining-system-function-nam.patch line 4

Quoted 4 lines
package/git/0001-git-compat-util-avoid-redefining-system-function-nam.patch new file +4 -0
@@ -0,0 +1,107 @@
+From 385f67eb2254edb1fb4cf523e5e3d5a8f123d72c Mon Sep 17 00:00:00 2001
+From: Jeff King <[email protected]>
+Date: Wed, 30 Nov 2022 16:15:14 -0500
+Subject: [PATCH 1/2] git-compat-util: avoid redefining system function names

NIT: The patch numbers tend to get outdated fast, so we use --no-numbered as pointed out by ./utils/check-package:

package/git/0001-git-compat-util-avoid-redefining-system-function-nam.patch:4:
generate your patches with 'git format-patch -N' package/git/0002-git-compat-util-undefine-system-names-before-redecla.patch:4:
generate your patches with 'git format-patch -N'

Committed with that fixed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot