Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libgit2-glib for openSUSE:Factory checked in at 2023-09-20 13:23:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libgit2-glib (Old) and /work/SRC/openSUSE:Factory/.libgit2-glib.new.16627 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libgit2-glib" Wed Sep 20 13:23:04 2023 rev:37 rq:1110832 version:1.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libgit2-glib/libgit2-glib.changes 2022-08-13 22:36:36.782636571 +0200 +++ /work/SRC/openSUSE:Factory/.libgit2-glib.new.16627/libgit2-glib.changes 2023-09-20 13:24:18.136139914 +0200 @@ -1,0 +2,11 @@ +Sun Sep 3 19:50:15 UTC 2023 - Luciano Santos <[email protected]> + +- Update to version 1.2.0: + + diff: fix user_data parameter type. + + ggit_repository_create_commit_from_ids: add safe checks. + + Allow to sign commits. + + Add mailmap support. + + Miscelaneous of bug fixes. +- Drop bogus python3 BuildRequires: python3-base is sufficient. + +------------------------------------------------------------------- Old: ---- libgit2-glib-1.1.0.obscpio New: ---- libgit2-glib-1.2.0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgit2-glib.spec ++++++ --- /var/tmp/diff_new_pack.ygIOY0/_old 2023-09-20 13:24:19.596192222 +0200 +++ /var/tmp/diff_new_pack.ygIOY0/_new 2023-09-20 13:24:19.600192365 +0200 @@ -1,7 +1,7 @@ # # spec file for package libgit2-glib # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2013 Dominique Leuenberger, Amsterdam, The Netherlands. # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: libgit2-glib -Version: 1.1.0 +Version: 1.2.0 Release: 0 Summary: GLib wrapper library around libgit2 License: LGPL-2.1-or-later @@ -28,7 +28,6 @@ BuildRequires: meson BuildRequires: pkgconfig -BuildRequires: python3 BuildRequires: python3-base # Needed to create the vala bindings BuildRequires: vala ++++++ _service ++++++ --- /var/tmp/diff_new_pack.ygIOY0/_old 2023-09-20 13:24:19.624193225 +0200 +++ /var/tmp/diff_new_pack.ygIOY0/_new 2023-09-20 13:24:19.624193225 +0200 @@ -1,9 +1,9 @@ <?xml version="1.0"?> <services> - <service name="obs_scm" mode="disabled"> + <service name="obs_scm" mode="manual"> <param name="scm">git</param> <param name="url">https://gitlab.gnome.org/GNOME/libgit2-glib.git</param> - <param name="revision">v1.1.0</param> + <param name="revision">v1.2.0</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <!-- <param name="changesgenerate">enable</param> @@ -14,6 +14,6 @@ <param name="file">*.tar</param> <param name="compression">xz</param> </service> - <service name="set_version" mode="disabled" /> + <service name="set_version" mode="manual" /> </services> ++++++ libgit2-glib-1.1.0.obscpio -> libgit2-glib-1.2.0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/NEWS new/libgit2-glib-1.2.0/NEWS --- old/libgit2-glib-1.1.0/NEWS 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/NEWS 2023-09-03 10:46:48.000000000 +0200 @@ -1,3 +1,25 @@ +News in 1.2.0 +--------------- +* meson: Use install_symlink +* diff: fix user_data parameter type +* ggit_repository_create_commit_from_ids: add safe checks +* Allow to sign commits +* Add macro GGIT_CHECK_VERSION +* ggit_diff_foreach: Prevent assertions with null callbacks +* Map flags related to conflicts +* meson: Fix vala symlink script +* meson: Replace calls to include_directories by strings +* meson: Use dictionaries in configuration_data objects +* meson: Use generators placeholders +* meson: Replace the package include dir path +* meson: Remove the use of join_paths function +* meson: Simplify introspection detection +* meson: Simplify enum sources generation +* doc: migrate to gi-docgen +* Add mailmap support +* Fix documentation +* Misc bug fixes + News in 1.1.0 --------------- * Add macro GGIT_CHECK_VERSION @@ -243,3 +265,4 @@ News in 0.0.2 ------------- * Initial release + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/README new/libgit2-glib-1.2.0/README --- old/libgit2-glib-1.1.0/README 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/README 2023-09-03 10:46:48.000000000 +0200 @@ -20,8 +20,8 @@ Simple install procedure: - % tar Jxf libgit2-glib-1.1.0.tar.xz # unpack the sources - % cd libgit2-glib-1.1.0 # change to the toplevel directory + % tar Jxf libgit2-glib-1.2.0.tar.xz # unpack the sources + % cd libgit2-glib-1.2.0 # change to the toplevel directory % meson builddir # run meson % ninja -C builddir # build libgit2-glib # [ Become root if necessary ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/libgit2-glib/ggit-commit.c new/libgit2-glib-1.2.0/libgit2-glib/ggit-commit.c --- old/libgit2-glib-1.1.0/libgit2-glib/ggit-commit.c 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/libgit2-glib/ggit-commit.c 2023-09-03 10:46:48.000000000 +0200 @@ -88,6 +88,12 @@ return gcommit; } +const git_commit * +_ggit_commit_get_commit (GgitCommit *commit) +{ + return _ggit_native_get (commit); +} + /** * ggit_commit_get_message_encoding: * @commit: a #GgitCommit. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/libgit2-glib/ggit-commit.h new/libgit2-glib-1.2.0/libgit2-glib/ggit-commit.h --- old/libgit2-glib-1.1.0/libgit2-glib/ggit-commit.h 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/libgit2-glib/ggit-commit.h 2023-09-03 10:46:48.000000000 +0200 @@ -51,6 +51,8 @@ GgitCommit *_ggit_commit_wrap (git_commit *commit, gboolean owned); +const git_commit *_ggit_commit_get_commit (GgitCommit *commit); + const gchar *ggit_commit_get_message_encoding (GgitCommit *commit); const gchar *ggit_commit_get_message (GgitCommit *commit); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/libgit2-glib/ggit-diff.c new/libgit2-glib-1.2.0/libgit2-glib/ggit-diff.c --- old/libgit2-glib-1.1.0/libgit2-glib/ggit-diff.c 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/libgit2-glib/ggit-diff.c 2023-09-03 10:46:48.000000000 +0200 @@ -659,7 +659,7 @@ GgitDiffBinaryCallback binary_cb, GgitDiffHunkCallback hunk_cb, GgitDiffLineCallback line_cb, - gpointer *user_data, + gpointer user_data, GError **error) { gint ret; @@ -731,7 +731,7 @@ ggit_diff_print (GgitDiff *diff, GgitDiffFormatType type, GgitDiffLineCallback print_cb, - gpointer *user_data, + gpointer user_data, GError **error) { gint ret; @@ -886,7 +886,7 @@ GgitDiffBinaryCallback binary_cb, GgitDiffHunkCallback hunk_cb, GgitDiffLineCallback line_cb, - gpointer *user_data, + gpointer user_data, GError **error) { gint ret; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/libgit2-glib/ggit-diff.h new/libgit2-glib-1.2.0/libgit2-glib/ggit-diff.h --- old/libgit2-glib-1.1.0/libgit2-glib/ggit-diff.h 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/libgit2-glib/ggit-diff.h 2023-09-03 10:46:48.000000000 +0200 @@ -84,12 +84,12 @@ GgitDiffBinaryCallback binary_cb, GgitDiffHunkCallback hunk_cb, GgitDiffLineCallback line_cb, - gpointer *user_data, + gpointer user_data, GError **error); void ggit_diff_print (GgitDiff *diff, GgitDiffFormatType type, GgitDiffLineCallback print_cb, - gpointer *user_data, + gpointer user_data, GError **error); gchar *ggit_diff_format_email (GgitDiff *diff, @@ -110,7 +110,7 @@ GgitDiffBinaryCallback binary_cb, GgitDiffHunkCallback hunk_cb, GgitDiffLineCallback line_cb, - gpointer *user_data, + gpointer user_data, GError **error); void ggit_diff_blob_to_buffer (GgitBlob *old_blob, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/libgit2-glib/ggit-mailmap.c new/libgit2-glib-1.2.0/libgit2-glib/ggit-mailmap.c --- old/libgit2-glib-1.1.0/libgit2-glib/ggit-mailmap.c 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/libgit2-glib/ggit-mailmap.c 2023-09-03 10:46:48.000000000 +0200 @@ -94,7 +94,7 @@ _ggit_mailmap_wrap (const git_mailmap *mailmap, gboolean owned) { - GgitSignature *ret; + GgitMailmap *ret; ret = g_object_new (GGIT_TYPE_MAILMAP, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/libgit2-glib/ggit-ref.c new/libgit2-glib-1.2.0/libgit2-glib/ggit-ref.c --- old/libgit2-glib-1.1.0/libgit2-glib/ggit-ref.c 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/libgit2-glib/ggit-ref.c 2023-09-03 10:46:48.000000000 +0200 @@ -263,7 +263,8 @@ * ggit_ref_set_symbolic_target: * @ref: a #GgitRef. * @target: The new target for the reference. - * @log_message: The one line long message to be appended to the reflog. + * @log_message: (nullable): The one line long message to be appended to the + * reflog. * @error: a #GError for error reporting, or %NULL. * * Create a new reference with the same name as the given reference but a @@ -308,7 +309,8 @@ * ggit_ref_set_target: * @ref: a #GgitRef. * @oid: a #GgitOId. - * @log_message: The one line long message to be appended to the reflog. + * @log_message: (nullable): The one line long message to be appended to the + * reflog. * @error: a #GError for error reporting, or %NULL. * * Create a new reference with the same name as the given reference but a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/libgit2-glib/ggit-repository.c new/libgit2-glib-1.2.0/libgit2-glib/ggit-repository.c --- old/libgit2-glib-1.1.0/libgit2-glib/ggit-repository.c 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/libgit2-glib/ggit-repository.c 2023-09-03 10:46:48.000000000 +0200 @@ -3237,6 +3237,10 @@ git_oid **parents_native; gint i; + g_return_val_if_fail (update_ref != NULL, NULL); + g_return_val_if_fail (GGIT_IS_REPOSITORY (repository), NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + parents_native = g_new0 (git_oid *, parent_count); for (i = 0; i < parent_count; ++i) @@ -3259,6 +3263,124 @@ if (ret != GIT_OK) { + _ggit_error_set (error, ret); + return NULL; + } + + return _ggit_oid_wrap (&id); +} + +/** + * ggit_repository_create_commit_buffer: + * @repository: a #GgitRepository. + * @author: author signature. + * @committer: committer signature (and time of commit). + * @message_encoding: (allow-none): message encoding. + * @message: commit message. + * @tree: the tree of objects to commit. + * @parents: (array length=parent_count): parent commits. + * @parent_count: number of parent commits in @parents. + * @error: a #GError for error reporting, or %NULL. + * + * Create a commit as with git_commit_create() but instead of writing it to the objectdb, + * write the contents of the object into a buffer. + * + * Returns: (transfer full) (nullable): the commit object content or %NULL in case of + * an error. + */ +gchar* +ggit_repository_create_commit_buffer(GgitRepository *repository, + GgitSignature *author, + GgitSignature *committer, + const gchar *message_encoding, + const gchar *message, + GgitTree *tree, + GgitCommit **parents, + gint parent_count, + GError **error) +{ + gint ret; + gchar *retval; + git_commit **parents_native; + gint i; + git_buf buf = {0,}; + + g_return_val_if_fail (GGIT_IS_REPOSITORY (repository), NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + parents_native = g_new0 (git_commit *, parent_count); + + for (i = 0; i < parent_count; ++i) + { + parents_native[i] = (git_commit *)_ggit_commit_get_commit (parents[i]); + } + + ret = git_commit_create_buffer (&buf, + _ggit_native_get (repository), + _ggit_native_get (author), + _ggit_native_get (committer), + message_encoding, + message, + _ggit_tree_get_tree (tree), + parent_count, + (git_commit const **)parents_native); + + g_free (parents_native); + + if (ret != GIT_OK) + { + _ggit_error_set (error, ret); + } + + retval = g_strndup (buf.ptr, buf.size); +#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28) + git_buf_dispose (&buf); +#else + git_buf_free (&buf); +#endif + + return retval; +} + +/** + * ggit_repository_create_commit_with_signature: + * @repository: a #GgitRepository. + * @commit_content: the content of the unsigned commit. + * @signature: (nullable): the signature to add to the commit. + * @signature_field: (nullable): which header field should contain this + * signature. Leave `NULL` for the default of "gpgsig". + * @error: a #GError for error reporting, or %NULL. + * + * Given the unsigned commit object's contents, its signature and the header field + * in which to store the signature, attach the signature to the commit and write it + * into the given repositoryCreate a new commit using the (if not NULL) signature + * key and type of key provided. + * + * Returns: (transfer full) (nullable): the #GgitOId of the created commit object, + * or %NULL in case of an error. + * + */ +GgitOId * +ggit_repository_create_commit_with_signature (GgitRepository *repository, + const gchar *commit_content, + const gchar *signature, + const gchar *signature_field, + GError **error) +{ + gint ret; + git_oid id; + + g_return_val_if_fail (GGIT_IS_REPOSITORY (repository), NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + ret = git_commit_create_with_signature (&id, + _ggit_native_get (repository), + commit_content, + signature, + signature_field); + + if (ret != GIT_OK) + { _ggit_error_set (error, ret); return NULL; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/libgit2-glib/ggit-repository.h new/libgit2-glib-1.2.0/libgit2-glib/ggit-repository.h --- old/libgit2-glib-1.1.0/libgit2-glib/ggit-repository.h 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/libgit2-glib/ggit-repository.h 2023-09-03 10:46:48.000000000 +0200 @@ -138,7 +138,8 @@ const gchar *path, GError **error); -GgitOId *ggit_repository_create_commit (GgitRepository *repository, +GgitOId *ggit_repository_create_commit ( + GgitRepository *repository, const gchar *update_ref, GgitSignature *author, GgitSignature *committer, @@ -161,7 +162,26 @@ gint parent_count, GError **error); -GgitOId *ggit_repository_create_tag (GgitRepository *repository, +gchar *ggit_repository_create_commit_buffer ( + GgitRepository *repository, + GgitSignature *author, + GgitSignature *committer, + const gchar *message_encoding, + const gchar *message, + GgitTree *tree, + GgitCommit **parents, + gint parent_count, + GError **error); + +GgitOId *ggit_repository_create_commit_with_signature ( + GgitRepository *repository, + const gchar *commit_content, + const gchar *signature, + const gchar *signature_field, + GError **error); + +GgitOId *ggit_repository_create_tag ( + GgitRepository *repository, const gchar *tag_name, GgitObject *target, GgitSignature *tagger, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/libgit2-glib/ggit-tree.c new/libgit2-glib-1.2.0/libgit2-glib/ggit-tree.c --- old/libgit2-glib-1.1.0/libgit2-glib/ggit-tree.c 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/libgit2-glib/ggit-tree.c 2023-09-03 10:46:48.000000000 +0200 @@ -61,6 +61,12 @@ return gtree; } +const git_tree * +_ggit_tree_get_tree (GgitTree *tree) +{ + return _ggit_native_get (tree); +} + /** * ggit_tree_get_id: * @tree: a #GgitTree. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/libgit2-glib/ggit-tree.h new/libgit2-glib-1.2.0/libgit2-glib/ggit-tree.h --- old/libgit2-glib-1.1.0/libgit2-glib/ggit-tree.h 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/libgit2-glib/ggit-tree.h 2023-09-03 10:46:48.000000000 +0200 @@ -47,6 +47,7 @@ GgitTree *_ggit_tree_wrap (git_tree *tree, gboolean owned); +const git_tree *_ggit_tree_get_tree (GgitTree *tree); GgitOId *ggit_tree_get_id (GgitTree *tree); GgitTreeEntry *ggit_tree_get (GgitTree *tree, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/meson.build new/libgit2-glib-1.2.0/meson.build --- old/libgit2-glib-1.1.0/meson.build 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/meson.build 2023-09-03 10:46:48.000000000 +0200 @@ -1,9 +1,9 @@ project( 'libgit2-glib', 'c', - version: '1.1.0', + version: '1.2.0', default_options: 'buildtype=debugoptimized', license: 'LGPL2+', - meson_version: '>= 0.50.0', + meson_version: '>= 0.61.0', ) libgit2_glib_version = meson.project_version() @@ -136,7 +136,13 @@ assert(enable_gir, 'vapi support was requested, but introspection support is mandatory.') assert(add_languages('vala', required: false), 'vapi support was requested, but vala not found.') - meson.add_install_script('meson_vapi_link.py', libgit2_glib_datadir) + foreach ext : ['vapi', 'deps'] + install_symlink( + 'ggit-1.0.' + ext, + install_dir: libgit2_glib_prefix / libgit2_glib_datadir / 'vala' / 'vapi', + pointing_to: 'libgit2-glib-1.0.' + ext, + ) + endforeach endif # Check for libgit2 ssh support diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-1.1.0/meson_vapi_link.py new/libgit2-glib-1.2.0/meson_vapi_link.py --- old/libgit2-glib-1.1.0/meson_vapi_link.py 2022-07-18 18:55:08.000000000 +0200 +++ new/libgit2-glib-1.2.0/meson_vapi_link.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,27 +0,0 @@ -#!/usr/bin/env python3 - -import os -import shutil -import sys - -prefix = os.environ['MESON_INSTALL_DESTDIR_PREFIX'] if os.environ.get('DESTDIR') else os.environ['MESON_INSTALL_PREFIX'] - -datadir = os.path.join(prefix, sys.argv[1]) - -vapidir = os.path.join(datadir, 'vala', 'vapi') -os.chdir(vapidir) - -# FIXME: meson will not track the creation of these files -# https://github.com/mesonbuild/meson/blob/master/mesonbuild/scripts/uninstall.py#L39 -old = 'ggit-1.0' -new = 'libgit2-glib-1.0' - -for ext in ['vapi', 'deps']: - src = '{}.{}'.format(new, ext) - dest = '{}.{}'.format(old, ext) - try: - os.symlink(src, dest) - except FileExistsError: - pass - except OSError: - shutil.copy(src, dest) ++++++ libgit2-glib.obsinfo ++++++ --- /var/tmp/diff_new_pack.ygIOY0/_old 2023-09-20 13:24:19.788199100 +0200 +++ /var/tmp/diff_new_pack.ygIOY0/_new 2023-09-20 13:24:19.792199244 +0200 @@ -1,5 +1,5 @@ name: libgit2-glib -version: 1.1.0 -mtime: 1658163308 -commit: 274f81c596b7c248407c14d4a7d58d72fb12cedc +version: 1.2.0 +mtime: 1693730808 +commit: f9843757630160f1222ef084a47931c7d0b90fe3
