Accepting request 1163862 from home:fstrba:branches:devel:languages:python
Fix build in factory with libgit2 1.8.x OBS-URL: https://build.opensuse.org/request/show/1163862 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=86
This commit is contained in:
parent
e6cad68a57
commit
9ca5fe6c63
133
pygit2-Upgrade_to_libgit2_v1_8_0.patch
Normal file
133
pygit2-Upgrade_to_libgit2_v1_8_0.patch
Normal file
@ -0,0 +1,133 @@
|
||||
--- pygit2-1.14.1/build.sh 2024-03-31 00:04:31.748162119 +0100
|
||||
+++ pygit2-1.14.1/build.sh 2024-03-31 00:04:44.734562399 +0100
|
||||
@@ -22,14 +22,14 @@
|
||||
#
|
||||
# sh build.sh
|
||||
#
|
||||
-# Build libgit2 1.7.2 (will use libssh2 if available), then build pygit2
|
||||
+# Build libgit2 1.8.0 (will use libssh2 if available), then build pygit2
|
||||
# inplace:
|
||||
#
|
||||
-# LIBGIT2_VERSION=1.7.2 sh build.sh
|
||||
+# LIBGIT2_VERSION=1.8.0 sh build.sh
|
||||
#
|
||||
-# Build libssh2 1.11.0 and libgit2 1.7.2, then build pygit2 inplace:
|
||||
+# Build libssh2 1.11.0 and libgit2 1.8.0, then build pygit2 inplace:
|
||||
#
|
||||
-# LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.2 sh build.sh
|
||||
+# LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.8.0 sh build.sh
|
||||
#
|
||||
# Build inplace and run the tests:
|
||||
#
|
||||
--- pygit2-1.14.1/Makefile 2024-03-31 00:04:31.748162119 +0100
|
||||
+++ pygit2-1.14.1/Makefile 2024-03-31 00:04:44.734562399 +0100
|
||||
@@ -1,7 +1,7 @@
|
||||
.PHONY: build html
|
||||
|
||||
build:
|
||||
- OPENSSL_VERSION=3.1.5 LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.2 sh build.sh
|
||||
+ OPENSSL_VERSION=3.1.5 LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.8.0 sh build.sh
|
||||
|
||||
html: build
|
||||
make -C docs html
|
||||
--- pygit2-1.14.1/pygit2/decl/config.h 2024-03-31 00:04:31.751495384 +0100
|
||||
+++ pygit2-1.14.1/pygit2/decl/config.h 2024-03-31 00:04:44.734562399 +0100
|
||||
@@ -6,17 +6,19 @@
|
||||
GIT_CONFIG_LEVEL_XDG = 3,
|
||||
GIT_CONFIG_LEVEL_GLOBAL = 4,
|
||||
GIT_CONFIG_LEVEL_LOCAL = 5,
|
||||
- GIT_CONFIG_LEVEL_APP = 6,
|
||||
- GIT_CONFIG_HIGHEST_LEVEL = -1,
|
||||
+ GIT_CONFIG_LEVEL_WORKTREE = 6,
|
||||
+ GIT_CONFIG_LEVEL_APP = 7,
|
||||
+ GIT_CONFIG_HIGHEST_LEVEL = -1
|
||||
} git_config_level_t;
|
||||
|
||||
typedef struct git_config_entry {
|
||||
const char *name;
|
||||
const char *value;
|
||||
+ const char *backend_type;
|
||||
+ const char *origin_path;
|
||||
unsigned int include_depth;
|
||||
git_config_level_t level;
|
||||
void (*free)(struct git_config_entry *entry);
|
||||
- void *payload;
|
||||
} git_config_entry;
|
||||
|
||||
void git_config_entry_free(git_config_entry *);
|
||||
--- pygit2-1.14.1/pygit2/decl/remote.h 2024-03-31 00:04:31.751495384 +0100
|
||||
+++ pygit2-1.14.1/pygit2/decl/remote.h 2024-03-31 00:04:44.734562399 +0100
|
||||
@@ -57,6 +57,7 @@
|
||||
git_proxy_options proxy_opts;
|
||||
git_remote_redirect_t follow_redirects;
|
||||
git_strarray custom_headers;
|
||||
+ git_strarray remote_push_options;
|
||||
} git_push_options;
|
||||
|
||||
int git_push_options_init(
|
||||
@@ -80,7 +81,8 @@
|
||||
int version;
|
||||
git_remote_callbacks callbacks;
|
||||
git_fetch_prune_t prune;
|
||||
- int update_fetchhead;
|
||||
+ unsigned int update_fetchhead : 1,
|
||||
+ report_unchanged : 1;
|
||||
git_remote_autotag_option_t download_tags;
|
||||
git_proxy_options proxy_opts;
|
||||
int depth;
|
||||
--- pygit2-1.14.1/pygit2/enums.py 2024-03-31 00:04:31.751495384 +0100
|
||||
+++ pygit2-1.14.1/pygit2/enums.py 2024-03-31 00:05:38.713455156 +0100
|
||||
@@ -65,16 +65,16 @@
|
||||
"Normal blame, the default"
|
||||
|
||||
TRACK_COPIES_SAME_FILE = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_FILE
|
||||
- "Not yet implemented and reserved for future use (as of libgit2 1.7.1)."
|
||||
+ "Not yet implemented and reserved for future use (as of libgit2 1.8.0)."
|
||||
|
||||
TRACK_COPIES_SAME_COMMIT_MOVES = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES
|
||||
- "Not yet implemented and reserved for future use (as of libgit2 1.7.1)."
|
||||
+ "Not yet implemented and reserved for future use (as of libgit2 1.8.0)."
|
||||
|
||||
TRACK_COPIES_SAME_COMMIT_COPIES = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES
|
||||
- "Not yet implemented and reserved for future use (as of libgit2 1.7.1)."
|
||||
+ "Not yet implemented and reserved for future use (as of libgit2 1.8.0)."
|
||||
|
||||
TRACK_COPIES_ANY_COMMIT_COPIES = _pygit2.GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES
|
||||
- "Not yet implemented and reserved for future use (as of libgit2 1.7.1)."
|
||||
+ "Not yet implemented and reserved for future use (as of libgit2 1.8.0)."
|
||||
|
||||
FIRST_PARENT = _pygit2.GIT_BLAME_FIRST_PARENT
|
||||
"Restrict the search of commits to those reachable following only the first parents."
|
||||
@@ -251,6 +251,9 @@
|
||||
LOCAL = _pygit2.GIT_CONFIG_LEVEL_LOCAL
|
||||
"Repository specific configuration file; $WORK_DIR/.git/config on non-bare repos"
|
||||
|
||||
+ WORKTREE = _pygit2.GIT_CONFIG_LEVEL_WORKTREE
|
||||
+ 'Worktree specific configuration file; $GIT_DIR/config.worktree'
|
||||
+
|
||||
APP = _pygit2.GIT_CONFIG_LEVEL_APP
|
||||
"Application specific configuration file; freely defined by applications"
|
||||
|
||||
--- pygit2-1.14.1/src/pygit2.c 2024-03-31 00:04:31.754828649 +0100
|
||||
+++ pygit2-1.14.1/src/pygit2.c 2024-03-31 00:04:44.734562399 +0100
|
||||
@@ -792,6 +792,7 @@
|
||||
ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_XDG);
|
||||
ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_GLOBAL);
|
||||
ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_LOCAL);
|
||||
+ ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_WORKTREE);
|
||||
ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_APP);
|
||||
ADD_CONSTANT_INT(m, GIT_CONFIG_HIGHEST_LEVEL);
|
||||
|
||||
--- pygit2-1.14.1/src/types.h 2024-03-31 00:04:31.754828649 +0100
|
||||
+++ pygit2-1.14.1/src/types.h 2024-03-31 00:04:44.734562399 +0100
|
||||
@@ -33,8 +33,8 @@
|
||||
#include <git2.h>
|
||||
#include <git2/sys/filter.h>
|
||||
|
||||
-#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 7)
|
||||
-#error You need a compatible libgit2 version (1.7.x)
|
||||
+#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 8)
|
||||
+#error You need a compatible libgit2 version (1.8.x)
|
||||
#endif
|
||||
|
||||
/*
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 30 23:08:16 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Added patch:
|
||||
* pygit2-Upgrade_to_libgit2_v1_8_0.patch
|
||||
+ Backport of upstream commit to build with libgit2 1.8.x
|
||||
+ Apply only if libgit2-devel >= 1.8
|
||||
+ Fixes build in Factory
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 1 10:14:35 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -25,6 +25,7 @@ Summary: Python bindings for libgit2
|
||||
License: GPL-2.0-only
|
||||
URL: https://github.com/libgit2/pygit2
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pygit2/pygit2-%{version}.tar.gz
|
||||
Patch0: pygit2-Upgrade_to_libgit2_v1_8_0.patch
|
||||
BuildRequires: %{python_module cached-property}
|
||||
BuildRequires: %{python_module cffi >= 1.4.0}
|
||||
BuildRequires: %{python_module devel}
|
||||
@ -46,7 +47,10 @@ Requires: python-cached-property
|
||||
Bindings for libgit2, a linkable C library for the Git version-control system.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n pygit2-%{version}
|
||||
%setup -q -n pygit2-%{version}
|
||||
%if %{?pkg_vcmp:%pkg_vcmp libgit2-devel >= 1.8}%{!?pkg_vcmp:0}
|
||||
%patch -P 0 -p1
|
||||
%endif
|
||||
|
||||
# do not add options to pytest
|
||||
rm pytest.ini
|
||||
|
Loading…
Reference in New Issue
Block a user