openSUSE Commits
Threads by month
- ----- 2024 -----
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
December 2022
- 1 participants
- 2263 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package OpenImageIO for openSUSE:Factory checked in at 2022-12-30 11:08:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/OpenImageIO (Old)
and /work/SRC/openSUSE:Factory/.OpenImageIO.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "OpenImageIO"
Fri Dec 30 11:08:31 2022 rev:33 rq:1045735 version:2.4.6.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/OpenImageIO/OpenImageIO.changes 2022-11-05 14:47:11.502741760 +0100
+++ /work/SRC/openSUSE:Factory/.OpenImageIO.new.1563/OpenImageIO.changes 2022-12-30 11:08:53.417230387 +0100
@@ -1,0 +2,47 @@
+Mon Dec 26 11:54:05 UTC 2022 - Hans-Peter Jansen <hpj(a)urpla.net>
+
+- update to 2.4.6.0
+ * make_texture / maketx : ensure proper setting of certain
+ metadata when
+ * using a texture as a source to build another texture. #3634
+ * Build: Make sure use of ${PROJECT_NAME} doesn't occur before
+ the call to
+ * project(). #3651
+ * Fix null pointer dereference when OCIO no configuration is
+ found. #3652
+ * Support for building against OpenColorIO 2.2. #3662
+ * Fixes to subtle bugs when ImageBuf is used with IOProxy. #3666
+ * oiiotool: Fix problems with --point when there is no alpha
+ channel. #3684
+ * oiiotool: --dumpdata fix channel name output. #3687
+ * BMP: Fix possible write errors, fixes TALOS-2022-1653 /
+ CVE-2022-43594,
+ * CVE-2022-43595. #3673
+ * DPX: Fix possible write errors, fixes TALOS-2022-1651 /
+ CVE-2022-43592 and
+ * TALOS-2022-1652 / CVE-2022-43593. #3672
+ * IFF files: Add IOProxy support. #3647
+ * IFF: Fix possible write errors, fixes TALOS-2022-1654 /
+ CVE-2022-43596,
+ * TALOS-2022-1655 / CVE-2022-43597 CVE-2022-43598,
+ TALOS-2022-1656 /
+ * CVE-2022-43599 CVE-2022-43602 #3676
+ * PSD: Fix thumbnail extraction. #3668
+ * PSD: when reading, don't reject padded thumbnails. #3677
+ * Raw: Update Exif orientation if user flip is set. #3669
+ * Zfile write safety, fixes TALOS-2022-1657 / CVE-2022-43603.
+ #3670
+ * filesystem.h: new Filesystem::is_executable() and
+ find_program(). #3638
+ * filesystem.h: Change IOMemReader constructor to take a const
+ buffer
+ * pointer. #3665
+ * strutil.h: new trimmed_whitspace(). #3636
+ * New OIIO::print() exposes Strutil::print() in the main OIIO
+ namespace.
+ * #3667
+ * Testing: improved testing of oiiotool #3637 #3643 #3649,
+ Strutil #3655
+- Remove Fix-OIIO_SUPPORTED_RELEASE.patch (integrated by upstream)
+
+-------------------------------------------------------------------
Old:
----
Fix-OIIO_SUPPORTED_RELEASE.patch
oiio-2.4.5.0.tar.gz
New:
----
oiio-2.4.6.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ OpenImageIO.spec ++++++
--- /var/tmp/diff_new_pack.0ybdKB/_old 2022-12-30 11:08:56.873251048 +0100
+++ /var/tmp/diff_new_pack.0ybdKB/_new 2022-12-30 11:08:56.877251072 +0100
@@ -35,7 +35,7 @@
%define so_ver 2_4
%define major_minor_ver 2.4
Name: OpenImageIO
-Version: 2.4.5.0
+Version: 2.4.6.0
Release: 0
Summary: Library for Reading and Writing Images
License: BSD-3-Clause
@@ -44,8 +44,6 @@
Source0: https://github.com/OpenImageIO/oiio/archive/refs/tags/v%{version}.tar.gz#/o…
# this contains the actual test images, only used during build
Source1: oiio-images-%{images_ts}.tar.xz
-# PATCH-FIX-UPSTREAM -- Rebased https://patch-diff.githubusercontent.com/raw/OpenImageIO/oiio/pull/3651.pat…
-Patch0: Fix-OIIO_SUPPORTED_RELEASE.patch
# NOTE: Please don't uncomment a build requirement unless you have submitted the package to factory and it exists
#BuildRequires: Field3D-devel
BuildRequires: cmake >= 3.12
++++++ oiio-2.4.5.0.tar.gz -> oiio-2.4.6.0.tar.gz ++++++
/work/SRC/openSUSE:Factory/OpenImageIO/oiio-2.4.5.0.tar.gz /work/SRC/openSUSE:Factory/.OpenImageIO.new.1563/oiio-2.4.6.0.tar.gz differ: char 49, line 2
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package opencv for openSUSE:Factory checked in at 2022-12-30 11:08:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/opencv (Old)
and /work/SRC/openSUSE:Factory/.opencv.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "opencv"
Fri Dec 30 11:08:29 2022 rev:98 rq:1045729 version:4.7.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/opencv/opencv.changes 2022-08-27 11:50:07.629847852 +0200
+++ /work/SRC/openSUSE:Factory/.opencv.new.1563/opencv.changes 2022-12-30 11:08:50.053210276 +0100
@@ -1,0 +2,55 @@
+Thu Dec 29 09:59:55 UTC 2022 - Stefan Br��ns <stefan.bruens(a)rwth-aachen.de>
+
+- update to 4.7.0, highlights below, for details check
+ https://github.com/opencv/opencv/wiki/ChangeLog#version470
+ Highlights of this release:
+ * DNN:
+ + New ONNX layers: Scatter and ScatterND, Tile, ReduceL1,
+ ReduceMin and more.
+ + Signinficant performance optimization for convolutions.
+ Winograd algoritm implementation.
+ + Element-wise operation (add, sub, mul, div, ...):
+ Broadcasting.
+ + OpenVino 2022.1 support.
+ + CANN backend support.
+ * Algorithms:
+ + ArUco markers and April tags support including ChAruco and
+ diamond boards detection and calibration.
+ + QR code detection and decoding quality imrovement. Alignment
+ markers support. Benchmark for QR codes: link
+ + Nanotrack v2 tracker based on neural networks.
+ + Stackblur algoruthm implementation.
+ * Multimedia:
+ + FFmpeg 5.x support.
+ + CUDA 12.0 support. Hardware accelerated video codecs support
+ on NVIDIA platforms with modern Video Codec SDK (NVCUVID and
+ NVENCODEAPI).
+ + CV_16UC1 read/write video support with FFmpeg.
+ + Orientation meta support on Mac with native media API.
+ + New iterator-based API for multi-page image formats.
+ + libSPNG support for PNG format.
+ + SIMD acceleration for self-built libJPEG-Turbo
+ + H264/H265 support on Android. Multiple fixes for video
+ decoder, endcoder and camera memory layout.
+ * G-API
+ + Exposed all core APIs to Python, including stateful kernels.
+ * Optimization:
+ + New universal intrinsics backend for scalable vector
+ instructions. The first scalable implementation for
+ RISC-V RVV 1.0.
+ + DNN module patches:
+ - Improved layers / supported more models:
+ * Scatter and ScatterND #22529, Tile #22809
+ * Fixes in Slice (support negative step #22898)
+ * Support some reduce layers of ONNX #21601
+ - Added CANN backend support #22634. Link to the manual:
+ https://github.com/opencv/opencv/wiki/Huawei-CANN-Backend.
+ - Added bacthed NMS for multi-class object detection #22857
+ - Accelerating convolution, especially for ARM CPU.
+ - Winograd's convolution optimization
+ + And many other contributions:
+ + Added n-dimensional flip to core #22898
+ + Add StackBlur for imgproc #20379
+- Removed upstream opencv-ffmpeg5.patch
+
+-------------------------------------------------------------------
Old:
----
opencv-4.6.0.tar.gz
opencv-ffmpeg5.patch
opencv_contrib-4.6.0.tar.gz
New:
----
opencv-4.7.0.tar.gz
opencv_contrib-4.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ opencv.spec ++++++
--- /var/tmp/diff_new_pack.FfnNs0/_old 2022-12-30 11:08:52.945227565 +0100
+++ /var/tmp/diff_new_pack.FfnNs0/_new 2022-12-30 11:08:52.953227613 +0100
@@ -22,7 +22,7 @@
%endif
%define libname lib%{name}
-%define soname 406
+%define soname 407
# disabled by default as many fail
%bcond_with tests
%bcond_without gapi
@@ -30,7 +30,7 @@
%bcond_without python3
%bcond_without openblas
Name: opencv
-Version: 4.6.0
+Version: 4.7.0
Release: 0
Summary: Collection of algorithms for computer vision
# GPL-2.0 AND Apache-2.0 files are in 3rdparty/ittnotify which is not build
@@ -40,8 +40,6 @@
Source0: https://github.com/opencv/opencv/archive/%{version}.tar.gz#/%{name}-%{versi…
# Several modules from the opencv_contrib package
Source1: https://github.com/opencv/opencv_contrib/archive/%{version}.tar.gz#/opencv_…
-# PATCH-FIX-UPSTREAM FFmpeg 5 include fix
-Patch0: opencv-ffmpeg5.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: libeigen3-devel
++++++ opencv-4.6.0.tar.gz -> opencv-4.7.0.tar.gz ++++++
/work/SRC/openSUSE:Factory/opencv/opencv-4.6.0.tar.gz /work/SRC/openSUSE:Factory/.opencv.new.1563/opencv-4.7.0.tar.gz differ: char 13, line 1
++++++ opencv_contrib-4.6.0.tar.gz -> opencv_contrib-4.7.0.tar.gz ++++++
/work/SRC/openSUSE:Factory/opencv/opencv_contrib-4.6.0.tar.gz /work/SRC/openSUSE:Factory/.opencv.new.1563/opencv_contrib-4.7.0.tar.gz differ: char 28, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package gnome-firmware for openSUSE:Factory checked in at 2022-12-30 11:08:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-firmware (Old)
and /work/SRC/openSUSE:Factory/.gnome-firmware.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnome-firmware"
Fri Dec 30 11:08:28 2022 rev:7 rq:1045731 version:43.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-firmware/gnome-firmware.changes 2022-09-17 20:10:49.601241105 +0200
+++ /work/SRC/openSUSE:Factory/.gnome-firmware.new.1563/gnome-firmware.changes 2022-12-30 11:08:47.437194637 +0100
@@ -1,0 +2,9 @@
+Thu Dec 29 10:36:21 UTC 2022 - Dominique Leuenberger <dimstar(a)opensuse.org>
+
+- Update to version 43.1:
+ + Add GPU symbol.
+ + Change layout of GUIDs from PreferenceGroup to ExpanderRow.
+ + Fix compile failure with -Dsystemd=false.
+ + Updated translations.
+
+-------------------------------------------------------------------
Old:
----
gnome-firmware-43.0.obscpio
New:
----
gnome-firmware-43.1.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnome-firmware.spec ++++++
--- /var/tmp/diff_new_pack.qg9f3R/_old 2022-12-30 11:08:48.205199229 +0100
+++ /var/tmp/diff_new_pack.qg9f3R/_new 2022-12-30 11:08:48.209199253 +0100
@@ -17,7 +17,7 @@
Name: gnome-firmware
-Version: 43.0
+Version: 43.1
Release: 0
Summary: Install firmware on devices
License: GPL-2.0-or-later
++++++ _service ++++++
--- /var/tmp/diff_new_pack.qg9f3R/_old 2022-12-30 11:08:48.237199420 +0100
+++ /var/tmp/diff_new_pack.qg9f3R/_new 2022-12-30 11:08:48.241199444 +0100
@@ -5,7 +5,7 @@
<param name="url">https://gitlab.gnome.org/World/gnome-firmware.git</param>
<param name="scm">git</param>
<param name="versionformat">@PARENT_TAG@</param>
- <param name="revision">refs/tags/43.0</param>
+ <param name="revision">refs/tags/43.1</param>
</service>
<service mode="manual" name="set_version"/>
<service name="tar" mode="buildtime"/>
++++++ gnome-firmware-43.0.obscpio -> gnome-firmware-43.1.obscpio ++++++
++++ 6146 lines of diff (skipped)
++++++ gnome-firmware.obsinfo ++++++
--- /var/tmp/diff_new_pack.qg9f3R/_old 2022-12-30 11:08:48.393200353 +0100
+++ /var/tmp/diff_new_pack.qg9f3R/_new 2022-12-30 11:08:48.397200377 +0100
@@ -1,5 +1,5 @@
name: gnome-firmware
-version: 43.0
-mtime: 1663319550
-commit: 16d1970046ffefa78579ad67d4cf36e979aa5565
+version: 43.1
+mtime: 1670439552
+commit: aa1562cab91d4dc15d5f9c4efa091cbb49fbf2c3
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package octave for openSUSE:Factory checked in at 2022-12-30 11:08:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave (Old)
and /work/SRC/openSUSE:Factory/.octave.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "octave"
Fri Dec 30 11:08:26 2022 rev:83 rq:1045724 version:7.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/octave/octave.changes 2022-11-26 18:45:36.667268962 +0100
+++ /work/SRC/openSUSE:Factory/.octave.new.1563/octave.changes 2022-12-30 11:08:45.853185168 +0100
@@ -1,0 +2,5 @@
+Mon Dec 19 15:19:25 UTC 2022 - pgajdos(a)suse.com
+
+- GraphicsMagick will be removed from Factory
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ octave.spec ++++++
--- /var/tmp/diff_new_pack.33vPF2/_old 2022-12-30 11:08:46.665190022 +0100
+++ /var/tmp/diff_new_pack.33vPF2/_new 2022-12-30 11:08:46.665190022 +0100
@@ -34,8 +34,13 @@
%bcond_without java
# Image processing library
+%if 0%{suse_version} >= 1550
+# Default variant - ImageMagick
+%bcond_without imagemagick
+%else
# Default variant - GraphicsMagick
%bcond_with imagemagick
+%endif
# Sound IO
%bcond_without sound
@@ -86,7 +91,7 @@
# required for help/doc called from the tests
BuildRequires: makeinfo
%if %{with imagemagick}
-BuildRequires: pkgconfig(ImageMagick++)
+BuildRequires: pkgconfig(Magick++)
%else
BuildRequires: pkgconfig(GraphicsMagick++)
%endif
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ibus-typing-booster for openSUSE:Factory checked in at 2022-12-30 11:08:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ibus-typing-booster (Old)
and /work/SRC/openSUSE:Factory/.ibus-typing-booster.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ibus-typing-booster"
Fri Dec 30 11:08:25 2022 rev:96 rq:1045723 version:2.19.12
Changes:
--------
--- /work/SRC/openSUSE:Factory/ibus-typing-booster/ibus-typing-booster.changes 2022-11-29 13:27:50.407301821 +0100
+++ /work/SRC/openSUSE:Factory/.ibus-typing-booster.new.1563/ibus-typing-booster.changes 2022-12-30 11:08:44.453176799 +0100
@@ -1,0 +2,7 @@
+Thu Dec 29 11:489:34 UTC 2022 - maiku.fabian(a)gmail.com
+
+- Update to 2.19.12
+- Try not to fail if the database contains invalid UTF-8 or is otherwise malformed
+ (Resolves: https://github.com/mike-fabian/ibus-typing-booster/issues/409)
+
+-------------------------------------------------------------------
Old:
----
ibus-typing-booster-2.19.10.tar.gz
New:
----
ibus-typing-booster-2.19.12.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ibus-typing-booster.spec ++++++
--- /var/tmp/diff_new_pack.gD5yon/_old 2022-12-30 11:08:45.201181270 +0100
+++ /var/tmp/diff_new_pack.gD5yon/_new 2022-12-30 11:08:45.209181318 +0100
@@ -15,7 +15,7 @@
#
Name: ibus-typing-booster
-Version: 2.19.10
+Version: 2.19.12
Release: 0
Summary: An input completion utility
License: GPL-3.0+
++++++ ibus-typing-booster-2.19.10.tar.gz -> ibus-typing-booster-2.19.12.tar.gz ++++++
/work/SRC/openSUSE:Factory/ibus-typing-booster/ibus-typing-booster-2.19.10.tar.gz /work/SRC/openSUSE:Factory/.ibus-typing-booster.new.1563/ibus-typing-booster-2.19.12.tar.gz differ: char 106, line 2
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package libqt5-qtwebengine for openSUSE:Factory checked in at 2022-12-30 11:08:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libqt5-qtwebengine (Old)
and /work/SRC/openSUSE:Factory/.libqt5-qtwebengine.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libqt5-qtwebengine"
Fri Dec 30 11:08:20 2022 rev:86 rq:1045739 version:5.15.12
Changes:
--------
--- /work/SRC/openSUSE:Factory/libqt5-qtwebengine/libqt5-qtwebengine.changes 2022-10-10 18:44:56.670917984 +0200
+++ /work/SRC/openSUSE:Factory/.libqt5-qtwebengine.new.1563/libqt5-qtwebengine.changes 2022-12-30 11:08:28.761082987 +0100
@@ -1,0 +2,40 @@
+Thu Dec 29 15:26:07 UTC 2022 - christophe(a)krop.fr
+
+- Update to version 5.15.12:
+ * Bump version to 5.15.12
+ * Update Chromium:
+ * Bump V8_PATCH_LEVEL
+ * Fixup for patch for CVE-2022-3200 on OpenSuse 15.1
+ * Fixup the patch for CVE-2022-3200 on 87-based / 5.15
+ * [Backport] CVE-2022-3038: Use after free in Network Service
+ * [Backport] CVE-2022-3040: Use after free in Layout
+ * [Backport] CVE-2022-3041: Use after free in WebSQL
+ * [Backport] CVE-2022-3046: Use after free in Browser Tag
+ * [Backport] CVE-2022-3075: Insufficient data validation in Mojo
+ * [Backport] CVE-2022-3196: Use after free in PDF
+ * [Backport] CVE-2022-3197: Use after free in PDF
+ * [Backport] CVE-2022-3198: Use after free in PDF
+ * [Backport] CVE-2022-3199: Use after free in Frames.
+ * [Backport] CVE-2022-3200: Heap buffer overflow in Internals
+ * [Backport] CVE-2022-3201: Insufficient validation of untrusted
+ input in Developer Tools (1/2)
+ * [Backport] CVE-2022-3201: Insufficient validation of untrusted
+ input in Developer Tools (2/2)
+ * [Backport] CVE-2022-3304: Use after free in CSS
+ * [Backport] CVE-2022-3370: Use after free in Custom Elements
+ * [Backport] CVE-2022-3373: Out of bounds write in V8
+ * [Backport] CVE-2022-3445: Use after free in Skia.
+ * [Backport] CVE-2022-3446 and CVE-2022-35737
+ * [Backport] CVE-2022-3885: Use after free in V8
+ * [Backport] CVE-2022-3887: Use after free in Web Workers
+ * [Backport] CVE-2022-3889: Type Confusion in V8
+ * [Backport] CVE-2022-3890: Heap buffer overflow in Crashpad
+ * [Backport] CVE-2022-4174: Type Confusion in V8
+ * [Backport] CVE-2022-4180: Use after free in Mojo
+ * [Backport] CVE-2022-4181: Use after free in Forms
+ * [Backport] CVE-2022-4262: Type Confusion in V8
+ * [Backport] Security bug 1356308
+ * [Backport] Security bug 1378916
+ * [Backport] Security bugs 1346938 and 1338114
+
+-------------------------------------------------------------------
Old:
----
qtwebengine-everywhere-src-5.15.11.tar.xz
New:
----
qtwebengine-everywhere-src-5.15.12.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libqt5-qtwebengine.spec ++++++
--- /var/tmp/diff_new_pack.yKxQnk/_old 2022-12-30 11:08:36.421128781 +0100
+++ /var/tmp/diff_new_pack.yKxQnk/_new 2022-12-30 11:08:36.429128828 +0100
@@ -35,15 +35,15 @@
%global _qtwebengine_dictionaries_dir %{_libqt5_datadir}/qtwebengine_dictionaries
Name: libqt5-qtwebengine
-Version: 5.15.11
+Version: 5.15.12
Release: 0
Summary: Qt 5 WebEngine Library
License: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
Group: Development/Libraries/X11
URL: https://www.qt.io
%define base_name libqt5
-%define real_version 5.15.11
-%define so_version 5.15.11
+%define real_version 5.15.12
+%define so_version 5.15.12
%define tar_version qtwebengine-everywhere-src-%{version}
Source: %{tar_version}.tar.xz
# Use a git snapshot for catapult to build with python3 (git rev: b7e9d5899)
++++++ _service ++++++
--- /var/tmp/diff_new_pack.yKxQnk/_old 2022-12-30 11:08:36.477129115 +0100
+++ /var/tmp/diff_new_pack.yKxQnk/_new 2022-12-30 11:08:36.481129139 +0100
@@ -1,11 +1,11 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="changesgenerate">enable</param>
- <param name="version">5.15.11</param>
+ <param name="version">5.15.12</param>
<param name="url">git://code.qt.io/qt/qtwebengine.git</param>
<param name="scm">git</param>
<param name="filename">qtwebengine-everywhere-src</param>
- <param name="revision">v5.15.11-lts</param>
+ <param name="revision">v5.15.12-lts</param>
</service>
<service name="tar_scm" mode="disabled">
<param name="changesgenerate">disable</param>
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.yKxQnk/_old 2022-12-30 11:08:36.501129259 +0100
+++ /var/tmp/diff_new_pack.yKxQnk/_new 2022-12-30 11:08:36.505129283 +0100
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://code.qt.io/qt/qtwebengine.git</param>
- <param name="changesrevision">3d23b379a7c0a87922f9f5d9600fde8c4e58f1fd</param></service></servicedata>
+ <param name="changesrevision">4ea03a0affbfd6ff36a7defd391b7ca139d18c8e</param></service></servicedata>
(No newline at EOF)
++++++ catapult-git.tar.xz ++++++
/work/SRC/openSUSE:Factory/libqt5-qtwebengine/catapult-git.tar.xz /work/SRC/openSUSE:Factory/.libqt5-qtwebengine.new.1563/catapult-git.tar.xz differ: char 15, line 1
++++++ qtwebengine-everywhere-src-5.15.11.tar.xz -> qtwebengine-everywhere-src-5.15.12.tar.xz ++++++
/work/SRC/openSUSE:Factory/libqt5-qtwebengine/qtwebengine-everywhere-src-5.15.11.tar.xz /work/SRC/openSUSE:Factory/.libqt5-qtwebengine.new.1563/qtwebengine-everywhere-src-5.15.12.tar.xz differ: char 15, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package fluidsynth for openSUSE:Factory checked in at 2022-12-30 11:08:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fluidsynth (Old)
and /work/SRC/openSUSE:Factory/.fluidsynth.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fluidsynth"
Fri Dec 30 11:08:18 2022 rev:70 rq:1045719 version:2.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/fluidsynth/fluidsynth.changes 2022-09-27 20:13:06.977719250 +0200
+++ /work/SRC/openSUSE:Factory/.fluidsynth.new.1563/fluidsynth.changes 2022-12-30 11:08:25.969066296 +0100
@@ -1,0 +2,10 @@
+Thu Dec 29 11:01:45 UTC 2022 - Tom Mbrt <tom.mbrt(a)googlemail.com>
+
+- Update to 2.3.1
+ * Prevent MIDI player from finishing prematurely
+ * Fix a crash when enumerating rawmidi ALSA devices
+ * Restore systemd sandboxing options and make it work with user units
+ * Handle conflict with pipewire systemd daemon
+- Fix bsc#1204236 by turning systemd service into user service
+
+-------------------------------------------------------------------
Old:
----
fluidsynth-2.3.0.tar.gz
New:
----
fluidsynth-2.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ fluidsynth.spec ++++++
--- /var/tmp/diff_new_pack.7vHWGs/_old 2022-12-30 11:08:26.541069716 +0100
+++ /var/tmp/diff_new_pack.7vHWGs/_new 2022-12-30 11:08:26.545069739 +0100
@@ -18,7 +18,7 @@
%define sover 3
Name: fluidsynth
-Version: 2.3.0
+Version: 2.3.1
Release: 0
Summary: A Real-Time Software Synthesizer That Uses Soundfont(tm)
License: LGPL-2.1-or-later
@@ -40,10 +40,7 @@
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(sndfile)
Recommends: fluid-soundfont-gm
-Requires(pre): %fillup_prereq
-Requires(pre): group(audio)
-Requires(pre): shadow
-%{?systemd_requires}
+%{?systemd_ordering}
%description
FluidSynth (formerly IIWU Synth) is a real-time software synthesizer
@@ -90,23 +87,21 @@
%cmake_install
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
install -Dpm0644 %{SOURCE1} %{buildroot}%{_fillupdir}/sysconfig.%{name}
-install -Dpm0644 build/fluidsynth.service %{buildroot}%{_unitdir}/%{name}.service
+install -Dpm0644 build/fluidsynth.service %{buildroot}%{_userunitdir}/%{name}.service
mkdir %{buildroot}%{_sbindir}
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%pre
-getent passwd %{name} >/dev/null || useradd -rc 'FluidSynth GM daemon' -s /bin/false -d %{_localstatedir}/lib/%{name} -g audio %{name}
-%service_add_pre %{name}.service
+%systemd_user_pre %{name}.service
%post
-%fillup_only
-%service_add_post %{name}.service
+%systemd_user_post %{name}.service
%preun
-%service_del_preun %{name}.service
+%systemd_user_preun %{name}.service
%postun
-%service_del_postun %{name}.service
+%systemd_user_postun %{name}.service
%post -n libfluidsynth%{sover} -p /sbin/ldconfig
%postun -n libfluidsynth%{sover} -p /sbin/ldconfig
@@ -119,7 +114,7 @@
%{_fillupdir}/sysconfig.%{name}
%{_mandir}/man1/%{name}.1%{?ext_man}
%{_sbindir}/rc%{name}
-%{_unitdir}/%{name}.service
+%{_userunitdir}/%{name}.service
%files devel
%{_includedir}/%{name}
++++++ fluidsynth-2.3.0.tar.gz -> fluidsynth-2.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.azure/azure-pipelines-mac.yml new/fluidsynth-2.3.1/.azure/azure-pipelines-mac.yml
--- old/fluidsynth-2.3.0/.azure/azure-pipelines-mac.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.azure/azure-pipelines-mac.yml 2022-12-28 12:43:59.000000000 +0100
@@ -85,11 +85,11 @@
#11_0_universal_unixlibs:
# macPortsUrl: 'https://github.com/macports/macports-base/releases/download/v2.7.2/MacPorts…'
# imageName: 'macos-11'
- # CMakeFlags: '-Denable-sdl2=0 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -Denable-framework=0 -DLIB_SUFFIX=""'
+ # CMakeFlags: '-Denable-sdl2=0 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -Denable-framework=0
12_0_universal_unixlibs:
macPortsUrl: 'https://github.com/macports/macports-base/releases/download/v2.7.2/MacPorts…'
imageName: 'macos-12'
- CMakeFlags: '-Denable-sdl2=0 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -Denable-framework=0 -DLIB_SUFFIX=""'
+ CMakeFlags: '-Denable-sdl2=0 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -Denable-framework=0'
pool:
vmImage: $(imageName)
steps:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.azure/azure-pipelines-vcpkg.yml new/fluidsynth-2.3.1/.azure/azure-pipelines-vcpkg.yml
--- old/fluidsynth-2.3.0/.azure/azure-pipelines-vcpkg.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.azure/azure-pipelines-vcpkg.yml 2022-12-28 12:43:59.000000000 +0100
@@ -31,7 +31,7 @@
toolset: 'v142'
generator: 'Visual Studio 16 2019'
configuration: 'RelWithDebInfo'
- VCPKG_REVISION: 'e809a42f87565e803b2178a0c11263f462d1800a'
+ VCPKG_REVISION: 'acc3bcf76b84ae5041c86ab55fe138ae7b8255c7'
jobs:
- job: vcpkg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.azure/cmake-android.yml new/fluidsynth-2.3.1/.azure/cmake-android.yml
--- old/fluidsynth-2.3.0/.azure/cmake-android.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.azure/cmake-android.yml 2022-12-28 12:43:59.000000000 +0100
@@ -47,7 +47,7 @@
-DCMAKE_STAGING_PREFIX=${PREFIX} \
-DCMAKE_VERBOSE_MAKEFILE=1 \
-DBUILD_SHARED_LIBS=1 \
- -DLIB_SUFFIX="" \
+ -DLIB_SUFFIX= \
${{ parameters.cmakeArgs }} ..
make -j$((`nproc`+1))
${{ parameters.installCommand }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.circleci/config.yml new/fluidsynth-2.3.1/.circleci/config.yml
--- old/fluidsynth-2.3.0/.circleci/config.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.circleci/config.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,67 +0,0 @@
-version: 2.1
-orbs:
- android: circleci/android(a)0.2.1
-jobs:
- build:
- working_directory: ~/code
- docker:
- - image: circleci/android:api-30
- environment:
- JVM_OPTS: -Xmx3200m
- steps:
- - run:
- name: Setup Git email and user for Cerbero
- command: git config --global user.email "ci(a)beatscratch.io" && git config --global user.name "CI testing"
- # - android/install-ndk:
- # ndk-version: android-ndk-r18b
- # ndk-sha: 500679655da3a86aecf67007e8ab230ea9b4dd7b
- - run:
- name: Install FluidSynth build dependencies
- command: sudo apt-get update && sudo apt-get install autotools-dev automake autoconf libtool g++ autopoint make cmake
- bison flex yasm pkg-config libpulse-dev
- python3-dev gettext build-essential pkg-config curl
- libasound2-dev dpkg-dev
- debhelper build-essential devscripts fakeroot transfig gperf libdbus-glib-1-dev
- wget glib-networking libxtst-dev libxrandr-dev
- git intltool ccache python3-setuptools autogen maven make
- - checkout
- - run:
- name: Build Cerbero and Oboe
- working_directory: doc/android
- command: |
- export TERM=dumb
- export VERBOSE=1
- echo Starting `nproc` parallel jobs
- make -f Makefile.android prepare
- - run:
- name: Link Cerbero NDK for build
- command: |
- mkdir -p /home/circleci/android-sdk-linux
- echo "android-ndk-21 content"
- ls /home/circleci/code/doc/android/external/cerbero/build/android-ndk-21
- ln -s /home/circleci/code/doc/android/external/cerbero/build/android-ndk-21 /home/circleci/android-sdk-linux/ndk-bundle
- echo "/home/circleci/android-sdk-linux/ndk-bundle content"
- ls /home/circleci/android-sdk-linux/ndk-bundle
- - run:
- name: Build FluidSynth Android
- working_directory: doc/android
- command: |
- export TERM=dumb
- make -f Makefile.android
- - run:
- name: Show directory contents
- working_directory: doc/android
- command: |
- ls -R
- mv ./external/cerbero/build/logs dist/
- cp ./external/cerbero/build/sources/android_armv7/glib-2.62.6/_builddir/meson*.txt dist/armeabi-v7a/
- cp ./external/cerbero/build/sources/android_arm64/glib-2.62.6/_builddir/meson*.txt dist/arm64-v8a/
- cp ./external/cerbero/build/sources/android_x86/glib-2.62.6/_builddir/meson*.txt dist/x86/
- cp ./external/cerbero/build/sources/android_x86_64/glib-2.62.6/_builddir/meson*.txt dist/x86_64/
- - run:
- name: Zip FluidSynth Android Distribution
- working_directory: doc/android
- command: zip -r android-dist.zip dist
- - store_artifacts:
- path: doc/android/android-dist.zip
- destination: android-dist.zip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.github/workflows/api_doc_build.yml new/fluidsynth-2.3.1/.github/workflows/api_doc_build.yml
--- old/fluidsynth-2.3.0/.github/workflows/api_doc_build.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.github/workflows/api_doc_build.yml 2022-12-28 12:43:59.000000000 +0100
@@ -13,7 +13,7 @@
runs-on: ubuntu-22.04
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
persist-credentials: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.github/workflows/codeql-analysis.yml new/fluidsynth-2.3.1/.github/workflows/codeql-analysis.yml
--- old/fluidsynth-2.3.0/.github/workflows/codeql-analysis.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.github/workflows/codeql-analysis.yml 2022-12-28 12:43:59.000000000 +0100
@@ -39,11 +39,11 @@
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v1
+ uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -51,10 +51,13 @@
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
+ - name: Install Dependencies
+ run: sudo -E apt-get -yq --no-install-suggests --no-install-recommends install cmake-data cmake libglib2.0-0 libsndfile-dev libasound2-dev libjack-dev portaudio19-dev libsdl2-dev libpulse-dev libdbus-1-dev libinstpatch-dev libreadline-dev
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@v1
+ uses: github/codeql-action/autobuild@v2
# ������ Command-line programs to run using the OS shell.
# ���� https://git.io/JvXDl
@@ -68,4 +71,4 @@
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v1
+ uses: github/codeql-action/analyze@v2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.github/workflows/linux.yml new/fluidsynth-2.3.1/.github/workflows/linux.yml
--- old/fluidsynth-2.3.0/.github/workflows/linux.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.github/workflows/linux.yml 2022-12-28 12:43:59.000000000 +0100
@@ -43,7 +43,7 @@
# clang11 is covered by openSUSE Leap 15.3
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- name: Add apt-get repositories
run: |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.github/workflows/sonarcloud.yml new/fluidsynth-2.3.1/.github/workflows/sonarcloud.yml
--- old/fluidsynth-2.3.0/.github/workflows/sonarcloud.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.github/workflows/sonarcloud.yml 2022-12-28 12:43:59.000000000 +0100
@@ -21,9 +21,9 @@
name: SonarCloud Workflow
jobs:
sonarcloud:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
@@ -36,7 +36,7 @@
run: sudo apt-get update -y
- name: Install Dependencies
- run: sudo -E apt-get -yq --no-install-suggests --no-install-recommends install cmake-data cmake libglib2.0-0 libsndfile-dev libasound2-dev libjack-dev portaudio19-dev libsdl2-dev libpulse-dev libdbus-1-dev libsystemd-dev libinstpatch-dev libreadline-dev lcov gcovr ggcov
+ run: sudo -E apt-get -yq --no-install-suggests --no-install-recommends install cmake-data cmake libglib2.0-0 libsndfile-dev libasound2-dev libjack-dev portaudio19-dev libsdl2-dev libpulse-dev libdbus-1-dev libsystemd-dev libinstpatch-dev libreadline-dev lcov gcovr
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/.obs/workflows.yml new/fluidsynth-2.3.1/.obs/workflows.yml
--- old/fluidsynth-2.3.0/.obs/workflows.yml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/.obs/workflows.yml 2022-12-28 12:43:59.000000000 +0100
@@ -1,6 +1,18 @@
-workflow:
+main_workflow:
steps:
- branch_package:
source_project: home:derselbst:anmp
source_package: fluidsynth
target_project: home:derselbst:anmp:github-ci
+ filters:
+ event: pull_request
+rebuild_master:
+ steps:
+ - rebuild_package:
+ project: home:derselbst:anmp
+ package: fluidsynth
+ filters:
+ event: push
+ branches:
+ only:
+ - master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/AUTHORS new/fluidsynth-2.3.1/AUTHORS
--- old/fluidsynth-2.3.0/AUTHORS 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/AUTHORS 2022-12-28 12:43:59.000000000 +0100
@@ -125,6 +125,8 @@
soundfonts, added support for DLS soundfonts, fixed various bugs, implemented
unit tests and CI builds for Windows, Linux, MacOSX and BSD.
+* Fabian Greffrath added initial support of vorbis-compressed sf3 sound fonts.
+
* Growing list of individuals who contributed bug fixes, corrections and minor features:
Nicolas Boulicault for ALSA sequencer midi.portname setting.
Werner Schweer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/CMakeLists.txt new/fluidsynth-2.3.1/CMakeLists.txt
--- old/fluidsynth-2.3.0/CMakeLists.txt 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/CMakeLists.txt 2022-12-28 12:43:59.000000000 +0100
@@ -41,7 +41,7 @@
# FluidSynth package version
set ( FLUIDSYNTH_VERSION_MAJOR 2 )
set ( FLUIDSYNTH_VERSION_MINOR 3 )
-set ( FLUIDSYNTH_VERSION_MICRO 0 )
+set ( FLUIDSYNTH_VERSION_MICRO 1 )
set ( VERSION "${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}" )
set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )
@@ -56,7 +56,7 @@
# This is not exactly the same algorithm as the libtool one, but the results are the same.
set ( LIB_VERSION_CURRENT 3 )
set ( LIB_VERSION_AGE 1 )
-set ( LIB_VERSION_REVISION 3 )
+set ( LIB_VERSION_REVISION 4 )
set ( LIB_VERSION_INFO
"${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/README.md new/fluidsynth-2.3.1/README.md
--- old/fluidsynth-2.3.0/README.md 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/README.md 2022-12-28 12:43:59.000000000 +0100
@@ -14,7 +14,7 @@
FluidSynth generates audio by reading and handling MIDI events from MIDI input devices by using a [SoundFont](https://github.com/FluidSynth/fluidsynth/wiki/SoundFont). It is the software analogue of a MIDI synthesizer. FluidSynth can also play MIDI files.
-[![SonarQube Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=FluidSynth_fluidsynth&metric=alert_status)](https://sonarcloud.io/dashboard?id=FluidSynth_fluidsynth) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/FluidSynth/fluidsynth.svg?lo… [![OHLOH Project Stats](https://www.openhub.net/p/fluidsynth/widgets/project_thin_badge?form…
+[![SonarQube Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=FluidSynth_fluidsynth&metric=alert_status)](https://sonarcloud.io/dashboard?id=FluidSynth_fluidsynth) [![OHLOH Project Stats](https://www.openhub.net/p/fluidsynth/widgets/project_thin_badge?form…
## Documentation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/cmake_admin/FluidUnitTest.cmake new/fluidsynth-2.3.1/cmake_admin/FluidUnitTest.cmake
--- old/fluidsynth-2.3.0/cmake_admin/FluidUnitTest.cmake 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/cmake_admin/FluidUnitTest.cmake 2022-12-28 12:43:59.000000000 +0100
@@ -13,9 +13,9 @@
# use the local include path to look for fluidsynth.h, as we cannot be sure fluidsynth is already installed
target_include_directories(${_test}
PUBLIC
- $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include> # include auto generated headers
- $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include> # include "normal" public (sub-)headers
- $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src> # include private headers
+ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> # include auto generated headers
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> # include "normal" public (sub-)headers
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src> # include private headers
$<TARGET_PROPERTY:libfluidsynth-OBJ,INCLUDE_DIRECTORIES> # include all other header search paths needed by libfluidsynth (esp. glib)
)
@@ -34,7 +34,7 @@
set_target_properties(${_util} PROPERTIES EXCLUDE_FROM_ALL TRUE)
# append no-op generator expression to avoid VS or XCode from adding per-config subdirectories
- set_target_properties(${_util} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/test/utils/$<0:>)
+ set_target_properties(${_util} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/test/utils/$<0:>)
# import necessary compile flags and dependency libraries
if ( FLUID_CPPFLAGS )
@@ -45,9 +45,9 @@
# use the local include path to look for fluidsynth.h, as we cannot be sure fluidsynth is already installed
target_include_directories(${_util}
PUBLIC
- $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include> # include auto generated headers
- $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include> # include "normal" public (sub-)headers
- $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src> # include private headers
+ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> # include auto generated headers
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> # include "normal" public (sub-)headers
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src> # include private headers
$<TARGET_PROPERTY:libfluidsynth-OBJ,INCLUDE_DIRECTORIES> # include all other header search paths needed by libfluidsynth (esp. glib)
)
@@ -61,25 +61,38 @@
# the content with the file given in _expected_output
macro ( ADD_FLUID_SF_DUMP_TEST _sfname)
- set( test_args "${CMAKE_SOURCE_DIR}/sf2/${_sfname} ${_sfname}.yml" )
+ set( test_args "${PROJECT_SOURCE_DIR}/sf2/${_sfname} ${_sfname}.yml" )
ADD_TEST(${_sfname}_dump_test
${CMAKE_COMMAND}
- -Dtest_cmd=${CMAKE_BINARY_DIR}/test/utils/dump_sfont${CMAKE_EXECUTABLE_SUFFIX}
+ -Dtest_cmd=${PROJECT_BINARY_DIR}/test/utils/dump_sfont${CMAKE_EXECUTABLE_SUFFIX}
-Dtest_args=${test_args}
-Dtest_output=${_sfname}.yml
- -Dexpected_output=${CMAKE_SOURCE_DIR}/sf2/${_sfname}.yml
- -P ${CMAKE_SOURCE_DIR}/cmake_admin/RunOutputTest.cmake
+ -Dexpected_output=${PROJECT_SOURCE_DIR}/sf2/${_sfname}.yml
+ -P ${PROJECT_SOURCE_DIR}/cmake_admin/RunOutputTest.cmake
)
endmacro ( ADD_FLUID_SF_DUMP_TEST )
macro ( ADD_FLUID_DEMO _demo )
- ADD_EXECUTABLE(${_demo} ${_demo}.c )
+
+ if ( ${ARGC} GREATER 1 )
+ string( TOLOWER "${ARGV1}" _LANGEXT )
+ else ()
+ set( _LANGEXT "c" )
+ endif ()
+
+ ADD_EXECUTABLE(${_demo} ${_demo}.${_LANGEXT} )
# only build this unit test when explicitly requested by "make check"
set_target_properties(${_demo} PROPERTIES EXCLUDE_FROM_ALL TRUE)
+ # request C++11 features only for the C++ example(s)
+ if ( "${_LANGEXT}" STREQUAL "cxx" )
+ target_compile_features( ${_demo} PUBLIC cxx_std_11 )
+ set_target_properties( ${_demo} PROPERTIES CXX_EXTENSIONS OFF )
+ endif()
+
# import necessary compile flags and dependency libraries
if ( FLUID_CPPFLAGS )
set_target_properties ( ${_demo} PROPERTIES COMPILE_FLAGS ${FLUID_CPPFLAGS} )
@@ -89,9 +102,9 @@
# use the local include path to look for fluidsynth.h, as we cannot be sure fluidsynth is already installed
target_include_directories(${_demo}
PUBLIC
- $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include> # include auto generated headers
- $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include> # include "normal" public (sub-)headers
- $<TARGET_PROPERTY:libfluidsynth,INCLUDE_DIRECTORIES> # include all other header search paths needed by libfluidsynth (esp. glib)
+ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> # include auto generated headers
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> # include "normal" public (sub-)headers
+ $<TARGET_PROPERTY:libfluidsynth,INCLUDE_DIRECTORIES> # include all other header search paths needed by libfluidsynth (esp. glib)
)
# append the current unit test to check-target as dependency
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/doc/examples/CMakeLists.txt new/fluidsynth-2.3.1/doc/examples/CMakeLists.txt
--- old/fluidsynth-2.3.0/doc/examples/CMakeLists.txt 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/doc/examples/CMakeLists.txt 2022-12-28 12:43:59.000000000 +0100
@@ -27,4 +27,5 @@
ADD_FLUID_DEMO ( fluidsynth_fx )
ADD_FLUID_DEMO ( fluidsynth_metronome )
ADD_FLUID_DEMO ( fluidsynth_simple )
-
+ADD_FLUID_DEMO ( fluidsynth_instruments )
+ADD_FLUID_DEMO ( fluidsynth_enumsettings CXX )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/doc/examples/fluidsynth_enumsettings.cxx new/fluidsynth-2.3.1/doc/examples/fluidsynth_enumsettings.cxx
--- old/fluidsynth-2.3.0/doc/examples/fluidsynth_enumsettings.cxx 1970-01-01 01:00:00.000000000 +0100
+++ new/fluidsynth-2.3.1/doc/examples/fluidsynth_enumsettings.cxx 2022-12-28 12:43:59.000000000 +0100
@@ -0,0 +1,97 @@
+/* FluidSynth Enum Settings - An example of using fluidsynth in C++
+ * This source uses C++11 features (nullptr, lambda expressions, ...)
+ *
+ * This code is in the public domain.
+ *
+ * To compile:
+ * g++ -o fluidsynth_enumsettings -lfluidsynth fluidsynth_enumsettings.cpp
+ *
+ * To run:
+ * fluidsynth_enumsettings
+ *
+ * [Pedro L��pez-Cabanillas <plcl(a)users.sf.net>]
+ */
+
+#include <list>
+#include <string>
+#include <iostream>
+#include <iomanip>
+#include <fluidsynth.h>
+
+int main(int argc, char**)
+{
+ fluid_settings_t* settings = nullptr;
+ void* context = nullptr;
+
+ std::cout << "C++ enum settings of FluidSynth v" << fluid_version_str() << std::endl;
+
+ if (argc > 1) {
+ std::cerr << "Usage: fluidsynth_enumsettings" << std::endl;
+ return 1;
+ }
+
+ /* Create the settings object. This example uses the default values for the settings. */
+ settings = new_fluid_settings();
+ if (settings == NULL) {
+ std::cerr << "Failed to create the settings" << std::endl;
+ return 2;
+ }
+
+ std::cout << std::left << std::setw(35) << "Setting" << std::setw(16) << "Type" << std::setw(16) << "Value" << "Options" << std::endl;
+ std::cout << std::left << std::setw(35) << "-------" << std::setw(16) << "----" << std::setw(16) << "-----" << "-------" << std::endl;
+
+ context = settings;
+ fluid_settings_foreach(settings, context, [](void *inner_context, const char *name, int type) {
+ int ok = 0;
+ double dValue{0.0};
+ int iValue{0};
+ char *psValue = nullptr;
+ fluid_settings_t* inner_settings = (fluid_settings_t*) inner_context;
+ std::cout << std::left << std::setw(35) << name;
+ switch (type) {
+ case FLUID_NO_TYPE:
+ std::cout << std::setw(16) << "Undefined";
+ break;
+ case FLUID_NUM_TYPE:
+ ok = fluid_settings_getnum(inner_settings, name, &dValue);
+ if (ok == FLUID_OK) {
+ std::cout << std::setw(16) << "Numeric" << std::setw(16) << dValue;
+ }
+ break;
+ case FLUID_INT_TYPE:
+ ok = fluid_settings_getint(inner_settings, name, &iValue);
+ if (ok == FLUID_OK) {
+ std::cout << std::setw(16) << "Integer" << std::setw(16) << iValue;
+ }
+ break;
+ case FLUID_STR_TYPE:
+ ok = fluid_settings_dupstr(inner_settings, name, &psValue);
+ if (ok == FLUID_OK) {
+ std::cout << std::setw(16) << "String" << std::setw(16) << psValue;
+ fluid_free(psValue);
+ }
+ break;
+ case FLUID_SET_TYPE:
+ std::cout << std::setw(16) << "Set";
+ break;
+ }
+ std::list<std::string> options;
+ fluid_settings_foreach_option(inner_settings, name, &options, [](void *context2, const char *, const char *option2){
+ std::list<std::string> *options_list = (std::list<std::string> *) context2;
+ if (!options_list->empty()) {
+ options_list->push_back(", ");
+ }
+ options_list->push_back(option2);
+ });
+ if (!options.empty()) {
+ for(auto it=options.begin(); it != options.end(); ++it) {
+ std::cout << *it;
+ }
+ }
+ std::cout << std::endl;
+ });
+ std::cout << "done" << std::endl;
+
+ delete_fluid_settings(settings);
+ return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/doc/examples/fluidsynth_instruments.c new/fluidsynth-2.3.1/doc/examples/fluidsynth_instruments.c
--- old/fluidsynth-2.3.0/doc/examples/fluidsynth_instruments.c 1970-01-01 01:00:00.000000000 +0100
+++ new/fluidsynth-2.3.1/doc/examples/fluidsynth_instruments.c 2022-12-28 12:43:59.000000000 +0100
@@ -0,0 +1,77 @@
+/* FluidSynth Instruments - An example of using fluidsynth >= 2.x
+ *
+ * This code is in the public domain.
+ *
+ * To compile:
+ * gcc -o fluidsynth_instruments fluidsynth_instruments.c -lfluidsynth
+ *
+ * To run:
+ * fluidsynth_instruments soundfont
+ *
+ * [Pedro L��pez-Cabanillas <plcl(a)users.sf.net>]
+ */
+
+#include <stdio.h>
+#include <fluidsynth.h>
+
+int main(int argc, char** argv)
+{
+ fluid_settings_t* settings = NULL;
+ fluid_synth_t* synth = NULL;
+ fluid_sfont_t* sfont = NULL;
+ int err = 0, sfid = -1;
+
+ if (argc != 2) {
+ fprintf(stderr, "Usage: fluidsynth_instr [soundfont]\n");
+ return 1;
+ }
+
+ /* Create the settings object. This example uses the default
+ * values for the settings. */
+ settings = new_fluid_settings();
+ if (settings == NULL) {
+ fprintf(stderr, "Failed to create the settings\n");
+ err = 2;
+ goto cleanup;
+ }
+
+ /* Create the synthesizer */
+ synth = new_fluid_synth(settings);
+ if (synth == NULL) {
+ fprintf(stderr, "Failed to create the synthesizer\n");
+ err = 3;
+ goto cleanup;
+ }
+
+ /* Load the soundfont */
+ sfid = fluid_synth_sfload(synth, argv[1], 1);
+ if (sfid == -1) {
+ fprintf(stderr, "Failed to load the SoundFont\n");
+ err = 4;
+ goto cleanup;
+ }
+
+ /* Enumeration of banks and programs */
+ sfont = fluid_synth_get_sfont_by_id(synth, sfid);
+ if (sfont != NULL) {
+ fluid_preset_t *preset;
+ fluid_sfont_iteration_start(sfont);
+ while ((preset = fluid_sfont_iteration_next(sfont)) != NULL) {
+ int bank = fluid_preset_get_banknum(preset);
+ int prog = fluid_preset_get_num(preset);
+ const char* name = fluid_preset_get_name(preset);
+ printf("bank: %d prog: %d name: %s\n", bank, prog, name);
+ }
+ }
+
+ printf("done\n");
+
+ cleanup:
+ if (synth) {
+ delete_fluid_synth(synth);
+ }
+ if (settings) {
+ delete_fluid_settings(settings);
+ }
+ return err;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/doc/fluidsettings.xml new/fluidsynth-2.3.1/doc/fluidsettings.xml
--- old/fluidsynth-2.3.0/doc/fluidsettings.xml 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/doc/fluidsettings.xml 2022-12-28 12:43:59.000000000 +0100
@@ -179,7 +179,7 @@
<ul>
<li>gs: (default) CC0 becomes the bank number, CC32 is ignored.</li>
<li>gm: ignores CC0 and CC32 messages.</li>
- <li>xg: CC32 becomes the bank number, CC0 toggles between melodic or drum channel.</li>
+ <li>xg: if CC0<120 then channel is set to melodic and CC32 is the bank number. If CC0>=120 then channel is set to drum and the bank number is set to 128 (CC32 is ignored).</li>
<li>mma: bank is calculated as CC0*128+CC32.</li>
</ul>
</desc>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/doc/fluidsynth-v20-devdoc.txt new/fluidsynth-2.3.1/doc/fluidsynth-v20-devdoc.txt
--- old/fluidsynth-2.3.0/doc/fluidsynth-v20-devdoc.txt 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/doc/fluidsynth-v20-devdoc.txt 2022-12-28 12:43:59.000000000 +0100
@@ -8,8 +8,8 @@
\author David Henningsson
\author Tom Moebert
\author Copyright © 2003-2022 Peter Hanappe, Conrad Berh��rster, Antoine Schmitt, Pedro L��pez-Cabanillas, Josh Green, David Henningsson, Tom Moebert
-\version Revision 2.3.0
-\date 2022-09-19
+\version Revision 2.3.1
+\date 2022-12-28
All the source code examples in this document are in the public domain; you can use them as you please. This document is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this license, visit https://creativecommons.org/licenses/by-sa/3.0/ . The FluidSynth library is distributed under the GNU Lesser General Public License. A copy of the GNU Lesser General Public License is contained in the FluidSynth package; if not, visit https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/doc/ladspa.md new/fluidsynth-2.3.1/doc/ladspa.md
--- old/fluidsynth-2.3.0/doc/ladspa.md 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/doc/ladspa.md 2022-12-28 12:43:59.000000000 +0100
@@ -99,10 +99,11 @@
mono effect send signals (as determined by the reverb and chorus send
generators for each voice) into the LADSPA effects.
-Please note that if you run FluidSynth with the internal reverb and chorus
-effects active (which is the default), then those effects are already mixed
-into the Main:L and Main:R channels. Fore more details, please see the "Signal
-Flow" section below.
+Please note that if you run FluidSynth 2.3.0 with the internal reverb and chorus
+effects active (which is the default), then those effects are mixed
+into the Main:L and Main:R channels after LADSPA has been invoked. Before FluidSynth 2.3.0
+the internal effects had been already mixed into Main channels at the time when LADSPA is invoked.
+Fore more details, please see the "Signal Flow" section below.
For host port setups in multi-channel configurations, please see the
"Multi-Channel Output" section below.
@@ -210,7 +211,7 @@
# Signal Flow
-The LADSPA effects unit runs immediately after the internal reverb and chorus
+The LADSPA effects unit runs immediately before the internal reverb and chorus
effects have been processed. When no effects have been configured, the LADSPA
engine is dormant and uses no additional system resources.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/fluidsynth.conf.in new/fluidsynth-2.3.1/fluidsynth.conf.in
--- old/fluidsynth-2.3.0/fluidsynth.conf.in 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/fluidsynth.conf.in 2022-12-28 12:43:59.000000000 +0100
@@ -2,4 +2,4 @@
#SOUND_FONT=@DEFAULT_SOUNDFONT@
# Additional optional parameters (may be useful, see 'man fluidsynth' for further info)
-#OTHER_OPTS='-a alsa -m alsa_seq -r 48000'
+#OTHER_OPTS='-a alsa -m alsa_seq -p FluidSynth\ GM -r 48000'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/fluidsynth.service.in new/fluidsynth-2.3.1/fluidsynth.service.in
--- old/fluidsynth-2.3.0/fluidsynth.service.in 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/fluidsynth.service.in 2022-12-28 12:43:59.000000000 +0100
@@ -2,9 +2,21 @@
Description=FluidSynth Daemon
Documentation=man:fluidsynth(1)
After=sound.target
+After=pipewire.service
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
+ProtectHome=read-only
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+# end of automatic additions
+# required in order for the above sandboxing options to work on a user unit
+PrivateUsers=yes
Type=notify
NotifyAccess=main
EnvironmentFile=@FLUID_DAEMON_ENV_FILE@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/audio.h new/fluidsynth-2.3.1/include/fluidsynth/audio.h
--- old/fluidsynth-2.3.0/include/fluidsynth/audio.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/audio.h 2022-12-28 12:43:59.000000000 +0100
@@ -120,7 +120,7 @@
/** @endlifecycle */
FLUIDSYNTH_API int fluid_audio_driver_register(const char **adrivers);
-/* @} */
+/** @} */
/**
* @defgroup file_renderer File Renderer
@@ -146,7 +146,7 @@
FLUIDSYNTH_API int fluid_file_renderer_process_block(fluid_file_renderer_t *dev);
FLUIDSYNTH_API int fluid_file_set_encoding_quality(fluid_file_renderer_t *dev, double q);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/event.h new/fluidsynth-2.3.1/include/fluidsynth/event.h
--- old/fluidsynth-2.3.0/include/fluidsynth/event.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/event.h 2022-12-28 12:43:59.000000000 +0100
@@ -135,7 +135,7 @@
FLUIDSYNTH_API int fluid_event_get_pitch(fluid_event_t *evt);
FLUIDSYNTH_API double fluid_event_get_scale(fluid_event_t *evt);
FLUIDSYNTH_API unsigned int fluid_event_get_sfont_id(fluid_event_t *evt);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/gen.h new/fluidsynth-2.3.1/include/fluidsynth/gen.h
--- old/fluidsynth-2.3.0/include/fluidsynth/gen.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/gen.h 2022-12-28 12:43:59.000000000 +0100
@@ -125,7 +125,7 @@
@warning This symbol is not part of the public API and ABI
stability guarantee and may change at any time! */
};
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/ladspa.h new/fluidsynth-2.3.1/include/fluidsynth/ladspa.h
--- old/fluidsynth-2.3.0/include/fluidsynth/ladspa.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/ladspa.h 2022-12-28 12:43:59.000000000 +0100
@@ -59,7 +59,7 @@
const char *port_name, float val);
FLUIDSYNTH_API int fluid_ladspa_effect_link(fluid_ladspa_fx_t *fx, const char *effect_name,
const char *port_name, const char *name);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/log.h new/fluidsynth-2.3.1/include/fluidsynth/log.h
--- old/fluidsynth-2.3.0/include/fluidsynth/log.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/log.h 2022-12-28 12:43:59.000000000 +0100
@@ -88,7 +88,7 @@
__attribute__ ((format (printf, 2, 3)))
#endif
;
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/midi.h new/fluidsynth-2.3.1/include/fluidsynth/midi.h
--- old/fluidsynth-2.3.0/include/fluidsynth/midi.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/midi.h 2022-12-28 12:43:59.000000000 +0100
@@ -93,7 +93,7 @@
* @endcode
*/
typedef int (*handle_midi_tick_func_t)(void *data, int tick);
-/* @} */
+/** @} */
/**
* @defgroup midi_events MIDI Events
@@ -139,7 +139,7 @@
void *data, int size, int dynamic);
FLUIDSYNTH_API int fluid_midi_event_get_lyrics(fluid_midi_event_t *evt,
void **data, int *size);
-/* @} */
+/** @} */
/**
* @defgroup midi_router MIDI Router
@@ -196,7 +196,7 @@
FLUIDSYNTH_API int fluid_midi_router_handle_midi_event(void *data, fluid_midi_event_t *event);
FLUIDSYNTH_API int fluid_midi_dump_prerouter(void *data, fluid_midi_event_t *event);
FLUIDSYNTH_API int fluid_midi_dump_postrouter(void *data, fluid_midi_event_t *event);
-/* @} */
+/** @} */
/**
* @defgroup midi_driver MIDI Driver
@@ -227,7 +227,7 @@
FLUIDSYNTH_API void delete_fluid_midi_driver(fluid_midi_driver_t *driver);
/** @endlifecycle */
-/* @} */
+/** @} */
/**
* @defgroup midi_player MIDI File Player
@@ -285,7 +285,7 @@
FLUIDSYNTH_API int fluid_player_get_bpm(fluid_player_t *player);
FLUIDSYNTH_API int fluid_player_get_midi_tempo(fluid_player_t *player);
FLUIDSYNTH_API int fluid_player_seek(fluid_player_t *player, int ticks);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/misc.h new/fluidsynth-2.3.1/include/fluidsynth/misc.h
--- old/fluidsynth-2.3.0/include/fluidsynth/misc.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/misc.h 2022-12-28 12:43:59.000000000 +0100
@@ -68,7 +68,7 @@
FLUIDSYNTH_API int fluid_is_soundfont(const char *filename);
FLUIDSYNTH_API int fluid_is_midifile(const char *filename);
FLUIDSYNTH_API void fluid_free(void* ptr);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/mod.h new/fluidsynth-2.3.1/include/fluidsynth/mod.h
--- old/fluidsynth-2.3.0/include/fluidsynth/mod.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/mod.h 2022-12-28 12:43:59.000000000 +0100
@@ -96,7 +96,7 @@
FLUIDSYNTH_API int fluid_mod_has_dest(const fluid_mod_t *mod, int gen);
FLUIDSYNTH_API void fluid_mod_clone(fluid_mod_t *mod, const fluid_mod_t *src);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/seq.h new/fluidsynth-2.3.1/include/fluidsynth/seq.h
--- old/fluidsynth-2.3.0/include/fluidsynth/seq.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/seq.h 2022-12-28 12:43:59.000000000 +0100
@@ -83,7 +83,7 @@
FLUIDSYNTH_API unsigned int fluid_sequencer_get_tick(fluid_sequencer_t *seq);
FLUIDSYNTH_API void fluid_sequencer_set_time_scale(fluid_sequencer_t *seq, double scale);
FLUIDSYNTH_API double fluid_sequencer_get_time_scale(fluid_sequencer_t *seq);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/seqbind.h new/fluidsynth-2.3.1/include/fluidsynth/seqbind.h
--- old/fluidsynth-2.3.0/include/fluidsynth/seqbind.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/seqbind.h 2022-12-28 12:43:59.000000000 +0100
@@ -36,7 +36,7 @@
fluid_seq_id_t fluid_sequencer_register_fluidsynth(fluid_sequencer_t *seq, fluid_synth_t *synth);
FLUIDSYNTH_API
int fluid_sequencer_add_midi_event_to_buffer(void *data, fluid_midi_event_t *event);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/settings.h new/fluidsynth-2.3.1/include/fluidsynth/settings.h
--- old/fluidsynth-2.3.0/include/fluidsynth/settings.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/settings.h 2022-12-28 12:43:59.000000000 +0100
@@ -185,7 +185,7 @@
FLUIDSYNTH_API
void fluid_settings_foreach(fluid_settings_t *settings, void *data,
fluid_settings_foreach_t func);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/sfont.h new/fluidsynth-2.3.1/include/fluidsynth/sfont.h
--- old/fluidsynth-2.3.0/include/fluidsynth/sfont.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/sfont.h 2022-12-28 12:43:59.000000000 +0100
@@ -353,7 +353,7 @@
FLUIDSYNTH_API int fluid_sample_set_loop(fluid_sample_t *sample, unsigned int loop_start, unsigned int loop_end);
FLUIDSYNTH_API int fluid_sample_set_pitch(fluid_sample_t *sample, int root_key, int fine_tune);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/shell.h new/fluidsynth-2.3.1/include/fluidsynth/shell.h
--- old/fluidsynth-2.3.0/include/fluidsynth/shell.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/shell.h 2022-12-28 12:43:59.000000000 +0100
@@ -47,7 +47,7 @@
FLUIDSYNTH_API fluid_ostream_t fluid_get_stdout(void);
FLUIDSYNTH_API char *fluid_get_userconf(char *buf, int len);
FLUIDSYNTH_API char *fluid_get_sysconf(char *buf, int len);
-/* @} */
+/** @} */
/**
@@ -78,7 +78,7 @@
FLUIDSYNTH_API
int fluid_source(fluid_cmd_handler_t *handler, const char *filename);
-/* @} */
+/** @} */
/**
@@ -106,7 +106,7 @@
FLUIDSYNTH_API void delete_fluid_shell(fluid_shell_t *shell);
/** @endlifecycle */
-/* @} */
+/** @} */
/**
@@ -141,7 +141,7 @@
FLUIDSYNTH_API int fluid_server_join(fluid_server_t *server);
/** @endlifecycle */
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/synth.h new/fluidsynth-2.3.1/include/fluidsynth/synth.h
--- old/fluidsynth-2.3.0/include/fluidsynth/synth.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/synth.h 2022-12-28 12:43:59.000000000 +0100
@@ -55,7 +55,7 @@
FLUIDSYNTH_API double fluid_synth_get_cpu_load(fluid_synth_t *synth);
FLUID_DEPRECATED FLUIDSYNTH_API const char *fluid_synth_error(fluid_synth_t *synth);
-/* @} */
+/** @} */
/**
* @defgroup midi_messages MIDI Channel Messages
@@ -102,7 +102,7 @@
FLUIDSYNTH_API int fluid_synth_set_gen(fluid_synth_t *synth, int chan,
int param, float value);
FLUIDSYNTH_API float fluid_synth_get_gen(fluid_synth_t *synth, int chan, int param);
-/* @} MIDI Channel Messages */
+/** @} MIDI Channel Messages */
/**
@@ -124,7 +124,7 @@
FLUIDSYNTH_API void fluid_synth_start_voice(fluid_synth_t *synth, fluid_voice_t *voice);
FLUIDSYNTH_API void fluid_synth_get_voicelist(fluid_synth_t *synth,
fluid_voice_t *buf[], int bufsize, int ID);
-/* @} Voice Control */
+/** @} Voice Control */
/**
@@ -148,7 +148,7 @@
const char *name);
FLUIDSYNTH_API int fluid_synth_set_bank_offset(fluid_synth_t *synth, int sfont_id, int offset);
FLUIDSYNTH_API int fluid_synth_get_bank_offset(fluid_synth_t *synth, int sfont_id);
-/* @} Soundfont Management */
+/** @} Soundfont Management */
/**
@@ -183,7 +183,7 @@
FLUIDSYNTH_API int fluid_synth_get_reverb_group_damp(fluid_synth_t *synth, int fx_group, double *damping);
FLUIDSYNTH_API int fluid_synth_get_reverb_group_width(fluid_synth_t *synth, int fx_group, double *width);
FLUIDSYNTH_API int fluid_synth_get_reverb_group_level(fluid_synth_t *synth, int fx_group, double *level);
- /* @} Reverb */
+ /** @} Reverb */
/**
@@ -233,7 +233,7 @@
FLUIDSYNTH_API int fluid_synth_get_chorus_group_speed(fluid_synth_t *synth, int fx_group, double *speed);
FLUIDSYNTH_API int fluid_synth_get_chorus_group_depth(fluid_synth_t *synth, int fx_group, double *depth_ms);
FLUIDSYNTH_API int fluid_synth_get_chorus_group_type(fluid_synth_t *synth, int fx_group, int *type);
-/* @} Chorus */
+/** @} Chorus */
/**
* @defgroup synthesis_params Synthesis Parameters
@@ -286,7 +286,7 @@
FLUIDSYNTH_API int fluid_synth_add_default_mod(fluid_synth_t *synth, const fluid_mod_t *mod, int mode);
FLUIDSYNTH_API int fluid_synth_remove_default_mod(fluid_synth_t *synth, const fluid_mod_t *mod);
-/* @} Synthesis Parameters */
+/** @} Synthesis Parameters */
/**
@@ -316,7 +316,7 @@
int fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog);
FLUIDSYNTH_API int fluid_synth_tuning_dump(fluid_synth_t *synth, int bank, int prog,
char *name, int len, double *pitch);
-/* @} MIDI Tuning */
+/** @} MIDI Tuning */
/**
@@ -357,7 +357,7 @@
FLUIDSYNTH_API int fluid_synth_process(fluid_synth_t *synth, int len,
int nfx, float *fx[],
int nout, float *out[]);
-/* @} Audio Rendering */
+/** @} Audio Rendering */
/**
@@ -391,7 +391,7 @@
};
FLUIDSYNTH_API int fluid_synth_set_custom_filter(fluid_synth_t *, int type, int flags);
-/* @} IIR Filter */
+/** @} IIR Filter */
@@ -519,7 +519,7 @@
FLUIDSYNTH_API int fluid_synth_get_breath_mode(fluid_synth_t *synth,
int chan, int *breathmode);
/** @} Breath Mode */
-/* @} MIDI Channel Setup */
+/** @} MIDI Channel Setup */
/** @ingroup settings */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/types.h new/fluidsynth-2.3.1/include/fluidsynth/types.h
--- old/fluidsynth-2.3.0/include/fluidsynth/types.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/types.h 2022-12-28 12:43:59.000000000 +0100
@@ -76,7 +76,7 @@
typedef long long fluid_long_long_t;
#endif
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/version.h.in new/fluidsynth-2.3.1/include/fluidsynth/version.h.in
--- old/fluidsynth-2.3.0/include/fluidsynth/version.h.in 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/version.h.in 2022-12-28 12:43:59.000000000 +0100
@@ -38,7 +38,7 @@
FLUIDSYNTH_API void fluid_version(int *major, int *minor, int *micro);
FLUIDSYNTH_API char* fluid_version_str(void);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/include/fluidsynth/voice.h new/fluidsynth-2.3.1/include/fluidsynth/voice.h
--- old/fluidsynth-2.3.0/include/fluidsynth/voice.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/include/fluidsynth/voice.h 2022-12-28 12:43:59.000000000 +0100
@@ -68,7 +68,7 @@
FLUIDSYNTH_API int fluid_voice_is_sostenuto(const fluid_voice_t *voice);
FLUIDSYNTH_API int fluid_voice_optimize_sample(fluid_sample_t *s);
FLUIDSYNTH_API void fluid_voice_update_param(fluid_voice_t *voice, int gen);
-/* @} */
+/** @} */
#ifdef __cplusplus
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/drivers/fluid_alsa.c new/fluidsynth-2.3.1/src/drivers/fluid_alsa.c
--- old/fluidsynth-2.3.0/src/drivers/fluid_alsa.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/drivers/fluid_alsa.c 2022-12-28 12:43:59.000000000 +0100
@@ -645,7 +645,7 @@
while((err == 0) && (card >= 0))
{
int device = -1;
- snd_ctl_t *ctl;
+ snd_ctl_t *ctl = NULL;
char card_name[32];
FLUID_SNPRINTF(card_name, sizeof(card_name), "hw:%d", card);
@@ -707,7 +707,12 @@
}
}
- snd_ctl_close(ctl);
+ if(ctl)
+ {
+ snd_ctl_close(ctl);
+ ctl = NULL;
+ }
+
err = snd_card_next(&card);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/gentables/gen_conv.c new/fluidsynth-2.3.1/src/gentables/gen_conv.c
--- old/fluidsynth-2.3.0/src/gentables/gen_conv.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/gentables/gen_conv.c 2022-12-28 12:43:59.000000000 +0100
@@ -18,14 +18,14 @@
static void fluid_conversion_config(void)
{
int i;
- double x;
+ long double x;
for(i = 0; i < FLUID_CENTS_HZ_SIZE; i++)
{
// 6,875 is just a factor that we already multiply into the lookup table to save
// that multiplication in fluid_ct2hz_real()
// 6.875 Hz because 440Hz / 2^6
- fluid_ct2hz_tab[i] = 6.875 * powl(2.0, (double) i / 1200.0);
+ fluid_ct2hz_tab[i] = 6.875L * powl(2.0L, i / 1200.0L);
}
/* centibels to amplitude conversion
@@ -35,7 +35,7 @@
*/
for(i = 0; i < FLUID_CB_AMP_SIZE; i++)
{
- fluid_cb2amp_tab[i] = powl(10.0, (double) i / -200.0);
+ fluid_cb2amp_tab[i] = powl(10.0L, i / -200.0L);
}
/* initialize the conversion tables (see fluid_mod.c
@@ -54,17 +54,17 @@
for(i = 1; i < FLUID_VEL_CB_SIZE - 1; i++)
{
- x = (-200.0 / FLUID_PEAK_ATTENUATION) * log((double)(i * i) / ((FLUID_VEL_CB_SIZE - 1) * (FLUID_VEL_CB_SIZE - 1))) / M_LN10;
- fluid_convex_tab[i] = (1.0 - x);
+ x = (-200.0L * 2 / FLUID_PEAK_ATTENUATION) * logl(i / (FLUID_VEL_CB_SIZE - 1.0L)) / M_LN10;
+ fluid_convex_tab[i] = (1.0L - x);
fluid_concave_tab[(FLUID_VEL_CB_SIZE - 1) - i] = x;
}
/* initialize the pan conversion table */
- x = M_PI / 2.0 / (FLUID_PAN_SIZE - 1.0);
+ x = M_PI / 2.0L / (FLUID_PAN_SIZE - 1.0L);
for(i = 0; i < FLUID_PAN_SIZE; i++)
{
- fluid_pan_tab[i] = sin(i * x);
+ fluid_pan_tab[i] = sinl(i * x);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/midi/fluid_midi.c new/fluidsynth-2.3.1/src/midi/fluid_midi.c
--- old/fluidsynth-2.3.0/src/midi/fluid_midi.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/midi/fluid_midi.c 2022-12-28 12:43:59.000000000 +0100
@@ -1687,6 +1687,8 @@
player->deltatime = 4.0;
player->cur_msec = 0;
player->cur_ticks = 0;
+ player->end_msec = -1;
+ player->end_pedals_disabled = 0;
player->last_callback_ticks = -1;
fluid_atomic_int_set(&player->seek_ticks, -1);
fluid_player_set_playback_callback(player, fluid_synth_handle_midi_event, synth);
@@ -2177,6 +2179,36 @@
fluid_atomic_int_set(&player->seek_ticks, -1); /* clear seek_ticks */
}
+ /* Once we've run out of MIDI events, keep playing until no voices are active */
+ if(status == FLUID_PLAYER_DONE && fluid_synth_get_active_voice_count(player->synth) > 0)
+ {
+ /* The first time we notice we've run out of MIDI events but there are still active voices, disable all hold pedals */
+ if(!player->end_pedals_disabled)
+ {
+ for(i = 0; i < synth->midi_channels; i++)
+ {
+ fluid_synth_cc(player->synth, i, SUSTAIN_SWITCH, 0);
+ fluid_synth_cc(player->synth, i, SOSTENUTO_SWITCH, 0);
+ }
+
+ player->end_pedals_disabled = 1;
+ }
+
+ status = FLUID_PLAYER_PLAYING;
+ }
+
+ /* Once no voices are active, if end_msec hasn't been scheduled, schedule it so we wait for reverb, etc to finish */
+ if(status == FLUID_PLAYER_DONE && player->end_msec < 0)
+ {
+ player->end_msec = msec + FLUID_PLAYER_STOP_GRACE_MS;
+ }
+ /* If end_msec has been scheduled and is in the future, keep playing */
+ if (player->end_msec >= 0 && msec < (unsigned int) player->end_msec)
+ {
+ status = FLUID_PLAYER_PLAYING;
+ }
+
+ /* Once there's no reason to keep playing, we're actually done */
if(status == FLUID_PLAYER_DONE)
{
FLUID_LOG(FLUID_DBG, "%s: %d: Duration=%.3f sec", __FILE__,
@@ -2225,12 +2257,15 @@
fluid_sample_timer_reset(player->synth, player->sample_timer);
}
- /* If we're at the end of the playlist and there are no loops left, loop once */
- if(player->currentfile == NULL && player->loop == 0)
- {
- player->loop = 1;
- }
-
+ /* If we're at the end of the playlist and there are no loops left, loop once */
+ if(player->currentfile == NULL && player->loop == 0)
+ {
+ player->loop = 1;
+ }
+
+ player->end_msec = -1;
+ player->end_pedals_disabled = 0;
+
fluid_atomic_int_set(&player->status, FLUID_PLAYER_PLAYING);
return FLUID_OK;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/midi/fluid_midi.h new/fluidsynth-2.3.1/src/midi/fluid_midi.h
--- old/fluidsynth-2.3.0/src/midi/fluid_midi.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/midi/fluid_midi.h 2022-12-28 12:43:59.000000000 +0100
@@ -306,6 +306,8 @@
int begin_msec; /* the time (msec) of the beginning of the file */
int start_msec; /* the start time of the last tempo change */
int cur_msec; /* the current time */
+ int end_msec; /* when >=0, playback is extended until this time (for, e.g., reverb) */
+ char end_pedals_disabled; /* 1 once the pedals have been released after the last midi event, 0 otherwise */
/* sync mode: indicates the tempo mode the player is driven by (see fluid_player_set_tempo()):
1, the player is driven by internal tempo (miditempo). This is the default.
0, the player is driven by external tempo (exttempo)
@@ -330,6 +332,8 @@
int channel_isplaying[MAX_NUMBER_OF_CHANNELS]; /* flags indicating channels on which notes have played */
};
+#define FLUID_PLAYER_STOP_GRACE_MS 2000
+
void fluid_player_settings(fluid_settings_t *settings);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/synth/fluid_synth.c new/fluidsynth-2.3.1/src/synth/fluid_synth.c
--- old/fluidsynth-2.3.0/src/synth/fluid_synth.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/synth/fluid_synth.c 2022-12-28 12:43:59.000000000 +0100
@@ -1969,7 +1969,7 @@
* @param len Length of data in buffer
* @param response Buffer to store response to or NULL to ignore
* @param response_len IN/OUT parameter, in: size of response buffer, out:
- * amount of data written to response buffer (if FLUID_FAILED is returned and
+ * amount of data written to response buffer (if #FLUID_FAILED is returned and
* this value is non-zero, it indicates the response buffer is too small)
* @param handled Optional location to store boolean value if message was
* recognized and handled or not (set to TRUE if it was handled)
@@ -1977,12 +1977,20 @@
* command (useful for checking if a SYSEX message would be handled)
* @return #FLUID_OK on success, #FLUID_FAILED otherwise
* @since 1.1.0
- */
-/* SYSEX format (0xF0 and 0xF7 not passed to this function):
- * Non-realtime: 0xF0 0x7E <DeviceId> [BODY] 0xF7
- * Realtime: 0xF0 0x7F <DeviceId> [BODY] 0xF7
- * Tuning messages: 0xF0 0x7E/0x7F <DeviceId> 0x08 <sub ID2> [BODY] <ChkSum> 0xF7
- * GS DT1 messages: 0xF0 0x41 <DeviceId> 0x42 0x12 [ADDRESS (3 bytes)] [DATA] <ChkSum> 0xF7
+ * @note When Fluidsynth receives an XG System Mode ON message, it compares the @p synth 's deviceID
+ * directly with the deviceID of the SysEx message. This is contrary to the XG spec (page 42), which
+ * requires to only compare the lower nibble. However, following the XG spec seems to break drum channels
+ * for a lot of MIDI files out there and therefore we've decided for this customization. If you rely on
+ * XG System Mode ON messages, make sure to set the setting \ref settings_synth_device-id to match the
+ * deviceID provided in the SysEx message (in most cases, this will be <code>deviceID=16</code>).
+ *
+ * @code
+ * SYSEX format (0xF0 and 0xF7 bytes shall not be passed to this function):
+ * Non-realtime: 0xF0 0x7E <DeviceId> [BODY] 0xF7
+ * Realtime: 0xF0 0x7F <DeviceId> [BODY] 0xF7
+ * Tuning messages: 0xF0 0x7E/0x7F <DeviceId> 0x08 <sub ID2> [BODY] <ChkSum> 0xF7
+ * GS DT1 messages: 0xF0 0x41 <DeviceId> 0x42 0x12 [ADDRESS (3 bytes)] [DATA] <ChkSum> 0xF7
+ * @endcode
*/
int
fluid_synth_sysex(fluid_synth_t *synth, const char *data, int len,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/synth/fluid_voice.c new/fluidsynth-2.3.1/src/synth/fluid_voice.c
--- old/fluidsynth-2.3.0/src/synth/fluid_voice.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/synth/fluid_voice.c 2022-12-28 12:43:59.000000000 +0100
@@ -906,7 +906,7 @@
* - the delay into a sample delay
*/
fluid_clip(x, -16000.0f, 4500.0f);
- x = (4.0f * FLUID_BUFSIZE * fluid_act2hz(x) / voice->output_rate);
+ x = (4.0f * FLUID_BUFSIZE * fluid_ct2hz_real(x) / voice->output_rate);
UPDATE_RVOICE_ENVLFO_R1(fluid_lfo_set_incr, modlfo, x);
break;
@@ -917,7 +917,7 @@
* - the delay into a sample delay
*/
fluid_clip(x, -16000.0f, 4500.0f);
- x = 4.0f * FLUID_BUFSIZE * fluid_act2hz(x) / voice->output_rate;
+ x = 4.0f * FLUID_BUFSIZE * fluid_ct2hz_real(x) / voice->output_rate;
UPDATE_RVOICE_ENVLFO_R1(fluid_lfo_set_incr, viblfo, x);
break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/utils/fluid_conv.c new/fluidsynth-2.3.1/src/utils/fluid_conv.c
--- old/fluidsynth-2.3.0/src/utils/fluid_conv.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/utils/fluid_conv.c 2022-12-28 12:43:59.000000000 +0100
@@ -48,7 +48,7 @@
{
if(FLUID_UNLIKELY(cents < 0))
{
- return (fluid_real_t) 1.0;
+ return fluid_act2hz(cents);
}
else
{
@@ -231,10 +231,11 @@
return 6900.f + (1200.f / FLUID_M_LN2) * FLUID_LOGF(f / 440.0f));
}
*/
-fluid_real_t
-fluid_act2hz(fluid_real_t c)
+double
+fluid_act2hz(double c)
{
- return 8.176f * FLUID_POW(2.f, c / 1200.f);
+ // do not use FLUID_POW, otherwise the unit tests will fail when compiled in single precision
+ return 8.1757989156437073336828122976032719176391831357 * pow(2.f, c / 1200.f);
}
/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/src/utils/fluid_conv.h new/fluidsynth-2.3.1/src/utils/fluid_conv.h
--- old/fluidsynth-2.3.0/src/utils/fluid_conv.h 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/src/utils/fluid_conv.h 2022-12-28 12:43:59.000000000 +0100
@@ -31,7 +31,7 @@
fluid_real_t fluid_tc2sec_delay(fluid_real_t tc);
fluid_real_t fluid_tc2sec_attack(fluid_real_t tc);
fluid_real_t fluid_tc2sec_release(fluid_real_t tc);
-fluid_real_t fluid_act2hz(fluid_real_t c);
+double fluid_act2hz(double c);
fluid_real_t fluid_pan(fluid_real_t c, int left);
fluid_real_t fluid_balance(fluid_real_t balance, int left);
fluid_real_t fluid_concave(fluid_real_t val);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/test/test_ct2hz.c new/fluidsynth-2.3.1/test/test_ct2hz.c
--- old/fluidsynth-2.3.0/test/test_ct2hz.c 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/test/test_ct2hz.c 2022-12-28 12:43:59.000000000 +0100
@@ -1,40 +1,44 @@
#include "test.h"
#include "utils/fluid_conv.h"
+#include "utils/fluid_conv_tables.h"
#include "utils/fluid_sys.h"
// this test makes sure FLUID_SNPRINTF uses a proper C99 compliant implementation
-int float_eq(fluid_real_t x, fluid_real_t y)
+int float_eq(double x, double y)
{
- static const float EPS = 1e-5;
+ static const double EPS = 1e-3;
FLUID_LOG(FLUID_INFO, "Comparing %.9f and %.9f", x, y);
- return FLUID_FABS(x-y) < EPS;
+ return fabs(x-y) < EPS;
}
int main(void)
{
+ int i;
// 440 * 2^((x-6900)/1200) where x is the cent value given to ct2hz()
-
- TEST_ASSERT(float_eq(fluid_ct2hz_real(38099), 2.9510849101059895e10));
-
- TEST_ASSERT(float_eq(fluid_ct2hz_real(13500), 19912.12696));
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(13500), 19912.12695821317828712777723687254894626098));
TEST_ASSERT(float_eq(fluid_ct2hz_real(12900), 14080));
- TEST_ASSERT(float_eq(fluid_ct2hz_real(12899), 14071.86942));
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(12899), 14071.86942151064095341800489737387241797607));
- TEST_ASSERT(float_eq(fluid_ct2hz_real(12700), 12543.85395));
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(12700), 12543.85395141597741074238497471441611245995));
TEST_ASSERT(float_eq(fluid_ct2hz_real(6900), 440));
TEST_ASSERT(float_eq(fluid_ct2hz_real(5700), 220));
TEST_ASSERT(float_eq(fluid_ct2hz_real(4500), 110));
- TEST_ASSERT(float_eq(fluid_ct2hz_real(901), 13.75794461));
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(901), 13.7579446057151293153308979171569743434390204));
TEST_ASSERT(float_eq(fluid_ct2hz_real(900), 13.75));
- TEST_ASSERT(float_eq(fluid_ct2hz_real(899), 13.74205998));
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(899), 13.7420599819439853060722704075916722831797578));
- TEST_ASSERT(float_eq(fluid_ct2hz_real(1), 8.180522806));
- TEST_ASSERT(float_eq(fluid_ct2hz_real(0), 8.175798916)); // often referred to as Absolute zero in the SF2 spec
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(1), 8.1805228064648688650522010380302841769481091116));
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(0), 8.1757989156437073336828122976032719176391831357)); // often referred to as Absolute zero in the SF2 spec
+ // Test the entire possible range: from lowest permitted value of MODLFOFREQ up to filter fc limit
+ for(i = -16000; i < 13500; i++)
+ {
+ TEST_ASSERT(float_eq(fluid_ct2hz_real(i), fluid_act2hz(i)));
+ }
return EXIT_SUCCESS;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.3.0/test-android/build-scripts/build-call-cmake.sh new/fluidsynth-2.3.1/test-android/build-scripts/build-call-cmake.sh
--- old/fluidsynth-2.3.0/test-android/build-scripts/build-call-cmake.sh 2022-09-20 19:41:20.000000000 +0200
+++ new/fluidsynth-2.3.1/test-android/build-scripts/build-call-cmake.sh 2022-12-28 12:43:59.000000000 +0100
@@ -41,7 +41,6 @@
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_STAGING_PREFIX=${PREFIX} \
-DBUILD_SHARED_LIBS=1 \
- -DLIB_SUFFIX="" \
$parameters_cmakeArgs ..
#-DCMAKE_VERBOSE_MAKEFILE=1 \
make -j$((`nproc`+1)) || (popd && popd && exit 1)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package vim for openSUSE:Factory checked in at 2022-12-30 11:08:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vim (Old)
and /work/SRC/openSUSE:Factory/.vim.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vim"
Fri Dec 30 11:08:16 2022 rev:332 rq:1045717 version:9.0.1107
Changes:
--------
--- /work/SRC/openSUSE:Factory/vim/vim.changes 2022-12-20 20:19:53.777683985 +0100
+++ /work/SRC/openSUSE:Factory/.vim.new.1563/vim.changes 2022-12-30 11:08:24.105055153 +0100
@@ -1,0 +2,32 @@
+Wed Dec 28 17:06:17 UTC 2022 - Ond��ej S��kup <mimi.vx(a)gmail.com>
+
+- Updated to version 9.0.1107, fixes the following problems
+ * build fails if the compiler doesn't allow for a declaration right after
+ "case".
+ * ASAN complains about NULL argument.
+ * Can add text property with negative ID before virtual text property.
+ * With the +vartabs feature indent folding may use wrong 'tabstop'.
+ * Leaking memory when defining a user command fails.
+ * The "kitty" terminfo entry is not widespread, resulting in the kitty
+ terminal not working properly.
+ * Using "->" with split lines does not always work.
+ * Some jsonc files are not recognized.
+ * Empty and comment lines in a class cause an error.
+ * Code handling low level MS-Windows events cannot be tested.
+ * Compiler warns for uninitialized variable.
+ * Display wrong in Windows terminal after exiting Vim.
+ * Autocommand test sometimes fails.
+ * Clang warns for unused variable.
+ * unnessary assignment
+ * FHIR Shorthand files are not recognized.
+ * Assignment to non-existing member causes a crash. (Yegappan Lakshmanan)
+ * Search error message doesn't show used pattern.
+ * Using freed memory of object member. (Yegappan Lakshmanan)
+ * Compiler warning when HAS_MESSAGE_WINDOW is not defined.
+ * Using freed memory when declaration fails. (Yegappan Lakshmanan)
+ * Reallocating hashtab when the size didn't change.
+ * Tests are failing.
+ * Code uses too much indent.
+ * Trying to resize a hashtab may cause a problem.
+
+-------------------------------------------------------------------
Old:
----
vim-9.0.1075.tar.gz
New:
----
vim-9.0.1107.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ vim.spec ++++++
--- /var/tmp/diff_new_pack.SlZl4t/_old 2022-12-30 11:08:25.293062255 +0100
+++ /var/tmp/diff_new_pack.SlZl4t/_new 2022-12-30 11:08:25.297062278 +0100
@@ -17,7 +17,7 @@
%define pkg_version 9.0
-%define patchlevel 1075
+%define patchlevel 1107
%define patchlevel_compact %{patchlevel}
%define VIM_SUBDIR vim90
%define site_runtimepath %{_datadir}/vim/site
++++++ vim-9.0.1075.tar.gz -> vim-9.0.1107.tar.gz ++++++
/work/SRC/openSUSE:Factory/vim/vim-9.0.1075.tar.gz /work/SRC/openSUSE:Factory/.vim.new.1563/vim-9.0.1107.tar.gz differ: char 30, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package libbpf for openSUSE:Factory checked in at 2022-12-30 11:08:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libbpf (Old)
and /work/SRC/openSUSE:Factory/.libbpf.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libbpf"
Fri Dec 30 11:08:14 2022 rev:14 rq:1045707 version:1.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/libbpf/libbpf.changes 2022-11-09 12:56:14.443943804 +0100
+++ /work/SRC/openSUSE:Factory/.libbpf.new.1563/libbpf.changes 2022-12-30 11:08:18.237020072 +0100
@@ -1,0 +2,44 @@
+Thu Dec 22 07:08:39 UTC 2022 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to v1.1.0:
+ User space-side features and APIs:
+ * user-space ring buffer (BPF_MAP_TYPE_USER_RINGBUF) support;
+ * new documentation page listing all recognized SEC() definitions;
+ * BTF dedup improvements:
+ * unambiguous fwd declaration resolution for structs and unions;
+ * better handling of some corner cases with identical structs and arrays;
+ * mixed enum and enum64 forward declaration resolution logic;
+ * bpf_{link,btf,pro,mapg}_get_fd_by_id_opts() and bpf_get_fd_by_id_opts()
+ APIs;
+ * libbpf supports loading raw BTF for BPF CO-RE from known search paths;
+ * support for new cgroup local storage (BPF_MAP_TYPE_CGRP_STORAGE);
+ * libbpf will only add BPF_F_MMAPABLE flag for data maps with global
+ (i.e., non-static) vars;
+ * latest Linux UAPI headers with lots of changes synced into
+ include/uapi/linux.
+ BPF-side features and APIs;
+ * BPF_PROG2() macro added that supports struct-by-value arguments;
+ * new BPF helpers:
+ * bpf_user_ringbuf_drain();
+ * cgrp_storage_get() and cgrp_storage_delete().
+ Bug fixes
+ * better handling of padding corner cases;
+ * btf__align_of() determines packed structs better now;
+ * improved handling of enums of non-standard sizes;
+ * USDT spec parsing improvements;
+ * overflow handling fixes for ringbufs;
+ * Makefile fixes to support cross-compilation for 32-bit targets;
+ * fix crash if SEC("freplace") programs don't have attach_prog_fd set;
+ * better handling of file existence checks when running as non-root with
+ enhanced capabilities;
+ * a bunch of small fixes:
+ * ELF handling improvements;
+ * fix memory leak in USDT argument parsing logic;
+ * fix NULL dereferences in few corner cases;
+ * improved netlink attribute iteration handling.
+- drop libbpf-Use-elf_getshdrnum-instead-of-e_shnum.patch,
+ libbpf-Fix-use-after-free-in-btf_dump_name_dups.patch,
+ libbpf-Fix-memory-leak-in-parse_usdt_arg.patch
+ libbpf-Fix-null-pointer-dereference-in-find_prog_by_.patch (upstream)
+
+-------------------------------------------------------------------
Old:
----
libbpf-1.0.1.tar.gz
libbpf-Fix-memory-leak-in-parse_usdt_arg.patch
libbpf-Fix-null-pointer-dereference-in-find_prog_by_.patch
libbpf-Fix-use-after-free-in-btf_dump_name_dups.patch
libbpf-Use-elf_getshdrnum-instead-of-e_shnum.patch
New:
----
libbpf-1.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libbpf.spec ++++++
--- /var/tmp/diff_new_pack.VBlQMN/_old 2022-12-30 11:08:18.701022846 +0100
+++ /var/tmp/diff_new_pack.VBlQMN/_new 2022-12-30 11:08:18.705022870 +0100
@@ -19,17 +19,13 @@
%define sover_major 1
%define libname libbpf%{sover_major}
Name: libbpf
-Version: 1.0.1
+Version: 1.1.0
Release: 0
Summary: C library for managing eBPF programs and maps
License: LGPL-2.1-only
URL: https://github.com/libbpf/libbpf
Source: https://github.com/libbpf/libbpf/archive/v%{version}.tar.gz#/%{name}-%{vers…
Source99: baselibs.conf
-Patch1: libbpf-Fix-use-after-free-in-btf_dump_name_dups.patch
-Patch2: libbpf-Fix-memory-leak-in-parse_usdt_arg.patch
-Patch3: libbpf-Use-elf_getshdrnum-instead-of-e_shnum.patch
-Patch4: libbpf-Fix-null-pointer-dereference-in-find_prog_by_.patch
BuildRequires: libelf-devel
BuildRequires: linux-glibc-devel >= 4.5
BuildRequires: zlib-devel
++++++ libbpf-1.0.1.tar.gz -> libbpf-1.1.0.tar.gz ++++++
++++ 157137 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package librepo for openSUSE:Factory checked in at 2022-12-30 11:08:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/librepo (Old)
and /work/SRC/openSUSE:Factory/.librepo.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "librepo"
Fri Dec 30 11:08:13 2022 rev:18 rq:1045671 version:1.15.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/librepo/librepo.changes 2022-10-17 14:57:19.242049025 +0200
+++ /work/SRC/openSUSE:Factory/.librepo.new.1563/librepo.changes 2022-12-30 11:08:15.589004242 +0100
@@ -1,0 +2,9 @@
+Wed Dec 28 16:50:53 UTC 2022 - Andreas Stieger <andreas.stieger(a)gmx.de>
+
+- update to 1.15.1:
+ * Add API support for waiting on network in an event driven
+ manner
+ * OpenPGP API extension and fixes
+- lincense updated to LGPL-2.1-or-later
+
+-------------------------------------------------------------------
Old:
----
librepo-1.14.5.tar.gz
New:
----
librepo-1.15.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ librepo.spec ++++++
--- /var/tmp/diff_new_pack.X57fFf/_old 2022-12-30 11:08:17.485015576 +0100
+++ /var/tmp/diff_new_pack.X57fFf/_new 2022-12-30 11:08:17.513015744 +0100
@@ -37,10 +37,10 @@
%define devname %{name}-devel
Name: librepo
-Version: 1.14.5
+Version: 1.15.1
Release: 0
Summary: Repodata downloading library
-License: LGPL-2.0-or-later
+License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
URL: https://github.com/rpm-software-management/librepo
++++++ librepo-1.14.5.tar.gz -> librepo-1.15.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librepo-1.14.5/CMakeLists.txt new/librepo-1.15.1/CMakeLists.txt
--- old/librepo-1.14.5/CMakeLists.txt 2022-09-09 12:32:23.000000000 +0200
+++ new/librepo-1.15.1/CMakeLists.txt 2022-12-09 13:47:26.000000000 +0100
@@ -28,7 +28,7 @@
# Find necessare libraries
FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(GLIB2 glib-2.0>=2.28 REQUIRED)
+PKG_CHECK_MODULES(GLIB2 glib-2.0>=2.28 gio-2.0 REQUIRED)
PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED libcrypto openssl)
PKG_CHECK_MODULES(LIBXML2 libxml-2.0 REQUIRED)
FIND_PACKAGE(CURL 7.52.0 REQUIRED)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librepo-1.14.5/VERSION.cmake new/librepo-1.15.1/VERSION.cmake
--- old/librepo-1.14.5/VERSION.cmake 2022-09-09 12:32:23.000000000 +0200
+++ new/librepo-1.15.1/VERSION.cmake 2022-12-09 13:47:26.000000000 +0100
@@ -1,3 +1,3 @@
SET(LIBREPO_MAJOR "1")
-SET(LIBREPO_MINOR "14")
-SET(LIBREPO_PATCH "5")
+SET(LIBREPO_MINOR "15")
+SET(LIBREPO_PATCH "1")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librepo-1.14.5/librepo/gpg.c new/librepo-1.15.1/librepo/gpg.c
--- old/librepo-1.14.5/librepo/gpg.c 2022-09-09 12:32:23.000000000 +0200
+++ new/librepo-1.15.1/librepo/gpg.c 2022-12-09 13:47:26.000000000 +0100
@@ -1,5 +1,6 @@
/* librepo - A library providing (libcURL like) API to downloading repository
* Copyright (C) 2012 Tomas Mlcoch
+ * Copyright (C) 2022 Jaroslav Rohel <jrohel(a)redhat.com>
*
* Licensed under the GNU Lesser General Public License Version 2.1
*
@@ -19,12 +20,10 @@
*/
#include <assert.h>
-#include <glib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
-#include <string.h>
#include <gpgme.h>
#include <unistd.h>
@@ -32,6 +31,21 @@
#include "util.h"
#include "gpg.h"
+struct tLrGpgSubkey {
+ gboolean has_next; // FALSE if this is the last subkey in the list
+ char *id; // subkey id
+ char *fingerprint; // fingerprint of the subkey in hex digit form
+ long int timestamp; // creation timestamp, -1 if invalid, 0 if not available
+ gboolean can_sign; // TRUE if subkey can be used for signing
+};
+
+struct tLrGpgKey {
+ gboolean has_next; // FALSE if this is the last subkey in the list
+ char **uids; // NULL terminated array of user IDs strings
+ LrGpgSubkey *subkeys; // list of subkeys associated with the key. The first subkey is the primary key
+ char *raw_key; // key in ACII-Armor format
+};
+
/*
* Creates the '/run/user/$UID' directory if it doesn't exist. If this
* directory exists, gpgagent will create its sockets under
@@ -52,7 +66,9 @@
* [2] https://bugzilla.redhat.com/show_bug.cgi?id=1769831
* [3] https://github.com/rpm-software-management/microdnf/issues/50
*/
-void ensure_socket_dir_exists() {
+static void
+lr_gpg_ensure_socket_dir_exists()
+{
char dirname[32];
snprintf(dirname, sizeof(dirname), "/run/user/%u", getuid());
int res = mkdir(dirname, 0700);
@@ -61,22 +77,16 @@
}
}
-gboolean
-lr_gpg_check_signature_fd(int signature_fd,
- int data_fd,
- const char *home_dir,
- GError **err)
+static gpgme_ctx_t
+lr_gpg_context_init(const char *home_dir, GError **err)
{
- gpgme_error_t gpgerr;
- gpgme_ctx_t context;
- gpgme_data_t signature_data;
- gpgme_data_t data_data;
- gpgme_verify_result_t result;
- gpgme_signature_t sig;
-
assert(!err || *err == NULL);
- // Initialization
+ lr_gpg_ensure_socket_dir_exists();
+
+ gpgme_ctx_t context;
+ gpgme_error_t gpgerr;
+
gpgme_check_version(NULL);
gpgerr = gpgme_engine_check_version(GPGME_PROTOCOL_OpenPGP);
if (gpgerr != GPG_ERR_NO_ERROR) {
@@ -85,7 +95,7 @@
g_set_error(err, LR_GPG_ERROR, LRE_GPGNOTSUPPORTED,
"gpgme_engine_check_version() error: %s",
gpgme_strerror(gpgerr));
- return FALSE;
+ return NULL;
}
gpgerr = gpgme_new(&context);
@@ -93,7 +103,7 @@
g_debug("%s: gpgme_new: %s", __func__, gpgme_strerror(gpgerr));
g_set_error(err, LR_GPG_ERROR, LRE_GPGERROR,
"gpgme_new() error: %s", gpgme_strerror(gpgerr));
- return FALSE;
+ return NULL;
}
gpgerr = gpgme_set_protocol(context, GPGME_PROTOCOL_OpenPGP);
@@ -102,25 +112,44 @@
g_set_error(err, LR_GPG_ERROR, LRE_GPGERROR,
"gpgme_set_protocol() error: %s", gpgme_strerror(gpgerr));
gpgme_release(context);
- return FALSE;
+ return NULL;
}
if (home_dir) {
gpgerr = gpgme_ctx_set_engine_info(context, GPGME_PROTOCOL_OpenPGP,
NULL, home_dir);
if (gpgerr != GPG_ERR_NO_ERROR) {
- g_debug("%s: gpgme_ctx_set_engine_info: %s", __func__,
- gpgme_strerror(gpgerr));
+ g_debug("%s: gpgme_ctx_set_engine_info: %s", __func__, gpgme_strerror(gpgerr));
g_set_error(err, LR_GPG_ERROR, LRE_GPGERROR,
"gpgme_ctx_set_engine_info() error: %s",
gpgme_strerror(gpgerr));
gpgme_release(context);
- return FALSE;
+ return NULL;
}
}
gpgme_set_armor(context, 1);
+ return context;
+}
+
+gboolean
+lr_gpg_check_signature_fd(int signature_fd,
+ int data_fd,
+ const char *home_dir,
+ GError **err)
+{
+ gpgme_error_t gpgerr;
+ gpgme_data_t signature_data;
+ gpgme_data_t data_data;
+ gpgme_verify_result_t result;
+ gpgme_signature_t sig;
+
+ gpgme_ctx_t context = lr_gpg_context_init(home_dir, err);
+ if (!context) {
+ return FALSE;
+ }
+
gpgerr = gpgme_data_new_from_fd(&signature_data, signature_fd);
if (gpgerr != GPG_ERR_NO_ERROR) {
g_debug("%s: gpgme_data_new_from_fd: %s",
@@ -235,73 +264,54 @@
}
gboolean
-lr_gpg_import_key(const char *key_fn, const char *home_dir, GError **err)
+lr_gpg_import_key_from_memory(const char *key, size_t key_len, const char *home_dir, GError **err)
{
+ gpgme_ctx_t context = lr_gpg_context_init(home_dir, err);
+ if (!context) {
+ return FALSE;
+ }
+
gpgme_error_t gpgerr;
- int key_fd;
- gpgme_ctx_t context;
gpgme_data_t key_data;
- assert(!err || *err == NULL);
-
- ensure_socket_dir_exists();
-
- // Initialization
- gpgme_check_version(NULL);
- gpgerr = gpgme_engine_check_version(GPGME_PROTOCOL_OpenPGP);
+ gpgerr = gpgme_data_new_from_mem(&key_data, key, key_len, 0);
if (gpgerr != GPG_ERR_NO_ERROR) {
- g_debug("%s: gpgme_engine_check_version: %s",
+ g_debug("%s: gpgme_data_new_from_mem: %s",
__func__, gpgme_strerror(gpgerr));
- g_set_error(err, LR_GPG_ERROR, LRE_GPGNOTSUPPORTED,
- "gpgme_engine_check_version() error: %s",
- gpgme_strerror(gpgerr));
- return FALSE;
- }
-
- gpgerr = gpgme_new(&context);
- if (gpgerr != GPG_ERR_NO_ERROR) {
- g_debug("%s: gpgme_new: %s", __func__, gpgme_strerror(gpgerr));
g_set_error(err, LR_GPG_ERROR, LRE_GPGERROR,
- "gpgme_new() error: %s", gpgme_strerror(gpgerr));
+ "gpgme_data_new_from_mem(_, _, %ld, 0) error: %s",
+ (unsigned long)key_len, gpgme_strerror(gpgerr));
+ gpgme_release(context);
return FALSE;
}
- gpgerr = gpgme_set_protocol(context, GPGME_PROTOCOL_OpenPGP);
+ gpgerr = gpgme_op_import(context, key_data);
if (gpgerr != GPG_ERR_NO_ERROR) {
- g_debug("%s: gpgme_set_protocol: %s", __func__, gpgme_strerror(gpgerr));
+ g_debug("%s: gpgme_op_import: %s", __func__, gpgme_strerror(gpgerr));
g_set_error(err, LR_GPG_ERROR, LRE_GPGERROR,
- "gpgme_set_protocol() error: %s", gpgme_strerror(gpgerr));
+ "gpgme_op_import() error: %s", gpgme_strerror(gpgerr));
+ gpgme_data_release(key_data);
gpgme_release(context);
return FALSE;
}
- if (home_dir) {
- gpgerr = gpgme_ctx_set_engine_info(context, GPGME_PROTOCOL_OpenPGP,
- NULL, home_dir);
- if (gpgerr != GPG_ERR_NO_ERROR) {
- g_debug("%s: gpgme_ctx_set_engine_info: %s", __func__, gpgme_strerror(gpgerr));
- g_set_error(err, LR_GPG_ERROR, LRE_GPGERROR,
- "gpgme_ctx_set_engine_info() error: %s",
- gpgme_strerror(gpgerr));
- gpgme_release(context);
- return FALSE;
- }
- }
-
- gpgme_set_armor(context, 1);
+ gpgme_data_release(key_data);
+ gpgme_release(context);
- // Key import
+ return TRUE;
+}
- key_fd = open(key_fn, O_RDONLY);
- if (key_fd == -1) {
- g_debug("%s: Opening key: %s", __func__, g_strerror(errno));
- g_set_error(err, LR_GPG_ERROR, LRE_IO,
- "Error while opening key %s: %s",
- key_fn, g_strerror(errno));
- gpgme_release(context);
+gboolean
+lr_gpg_import_key_from_fd(int key_fd, const char *home_dir, GError **err)
+{
+ gpgme_ctx_t context = lr_gpg_context_init(home_dir, err);
+ if (!context) {
return FALSE;
}
+ gpgme_error_t gpgerr;
+ gpgme_data_t key_data;
+
gpgerr = gpgme_data_new_from_fd(&key_data, key_fd);
if (gpgerr != GPG_ERR_NO_ERROR) {
g_debug("%s: gpgme_data_new_from_fd: %s",
@@ -310,24 +320,267 @@
"gpgme_data_new_from_fd(_, %d) error: %s",
key_fd, gpgme_strerror(gpgerr));
gpgme_release(context);
- close(key_fd);
return FALSE;
}
gpgerr = gpgme_op_import(context, key_data);
- gpgme_data_release(key_data);
if (gpgerr != GPG_ERR_NO_ERROR) {
g_debug("%s: gpgme_op_import: %s", __func__, gpgme_strerror(gpgerr));
g_set_error(err, LR_GPG_ERROR, LRE_GPGERROR,
"gpgme_op_import() error: %s", gpgme_strerror(gpgerr));
+ gpgme_data_release(key_data);
gpgme_release(context);
- close(key_fd);
return FALSE;
}
+ gpgme_data_release(key_data);
+ gpgme_release(context);
+
+ return TRUE;
+}
+
+gboolean
+lr_gpg_import_key(const char *key_fn, const char *home_dir, GError **err)
+{
+ assert(!err || *err == NULL);
+
+ int key_fd = open(key_fn, O_RDONLY);
+ if (key_fd == -1) {
+ g_debug("%s: Opening key: %s", __func__, g_strerror(errno));
+ g_set_error(err, LR_GPG_ERROR, LRE_IO,
+ "Error while opening key %s: %s",
+ key_fn, g_strerror(errno));
+ return FALSE;
+ }
+
+ gboolean ret = lr_gpg_import_key_from_fd(key_fd, home_dir, err);
+
close(key_fd);
+ return ret;
+}
+
+LrGpgKey *
+lr_gpg_list_keys(gboolean export_keys, const char *home_dir, GError **err)
+{
+ gpgme_error_t gpgerr;
+
+ gpgme_ctx_t context = lr_gpg_context_init(home_dir, err);
+ if (!context) {
+ return NULL;
+ }
+
+ GArray * keys = g_array_new(FALSE, FALSE, sizeof(LrGpgKey));
+
+ gpgerr = gpgme_op_keylist_start(context, NULL, 0);
+ while (gpg_err_code(gpgerr) == GPG_ERR_NO_ERROR) {
+ gpgme_key_t key;
+ gpgerr = gpgme_op_keylist_next(context, &key);
+ if (gpgerr) {
+ break;
+ }
+
+ GArray * subkeys = g_array_new(FALSE, FALSE, sizeof(LrGpgSubkey));
+ gpgme_subkey_t subkey = key->subkeys;
+ while (subkey) {
+ LrGpgSubkey lr_subkey;
+ lr_subkey.has_next = FALSE;
+ lr_subkey.id = g_strdup(subkey->keyid);
+ lr_subkey.fingerprint = g_strdup(subkey->fpr);
+ lr_subkey.timestamp = subkey->timestamp;
+ lr_subkey.can_sign = subkey->can_sign;
+ g_array_append_val(subkeys, lr_subkey);
+ subkey = subkey->next;
+ }
+ // All subkeys in the list except the last one are followed by another subkey
+ if (subkeys->len > 0) {
+ for (guint i = 0; i < subkeys->len - 1; ++i) {
+ g_array_index(subkeys, LrGpgSubkey, i).has_next = TRUE;
+ }
+ }
+
+ LrGpgKey lr_key;
+ lr_key.has_next = FALSE;
+
+ GPtrArray * uid_strings = g_ptr_array_new();
+ for (gpgme_user_id_t uids = key->uids; uids; uids = uids->next) {
+ if (!uids->uid) {
+ continue;
+ }
+ g_ptr_array_add(uid_strings, g_strdup(uids->uid));
+ }
+
+ gpgme_key_release(key);
+
+ g_ptr_array_add(uid_strings, NULL); // add terminating NULL
+ lr_key.uids = (char **)g_ptr_array_free(uid_strings, FALSE);
+
+ lr_key.subkeys = (LrGpgSubkey *)(subkeys->len > 0 ? g_array_free(subkeys, FALSE) : g_array_free(subkeys, TRUE));
+ lr_key.raw_key = NULL;
+ g_array_append_val(keys, lr_key);
+ }
+ // All keys in the list except the last one are followed by another key
+ for (guint i = 0; i < keys->len - 1; ++i) {
+ g_array_index(keys, LrGpgKey, i).has_next = TRUE;
+ }
+
+ if (gpg_err_code(gpgerr) != GPG_ERR_EOF) {
+ g_debug("%s: gpgme_op_keylist_: %s",
+ __func__, gpgme_strerror(gpgerr));
+ g_set_error(err, LR_GPG_ERROR, LRE_GPGERROR,
+ "gpgme_op_keylist_ error: %s",
+ gpgme_strerror(gpgerr));
+ lr_gpg_keys_free((LrGpgKey *)g_array_free(keys, FALSE));
+ gpgme_release(context);
+ return NULL;
+ }
+
+ gpgme_op_keylist_end(context);
+
+ LrGpgKey *lr_keys = (LrGpgKey *)(keys->len > 0 ? g_array_free(keys, FALSE) : g_array_free(keys, TRUE));
+
+ if (export_keys) {
+ for (LrGpgKey *lr_key = lr_keys; lr_key; ++lr_key) {
+ LrGpgSubkey *lr_subkey = lr_key->subkeys;
+ if (!lr_subkey) {
+ g_info("%s: Missing data to export key. Damaged key? Skipping the key", __func__);
+ if (!lr_key->has_next) {
+ break;
+ }
+ continue;
+ }
+
+ gpgme_data_t key_data;
+ gpgerr = gpgme_data_new(&key_data);
+ if (gpgerr != GPG_ERR_NO_ERROR) {
+ g_debug("%s: gpgme_data_new: %s", __func__, gpgme_strerror(gpgerr));
+ g_set_error(err, LR_GPG_ERROR, LRE_GPGERROR,
+ "gpgme_data_new() error: %s", gpgme_strerror(gpgerr));
+ lr_gpg_keys_free(lr_keys);
+ gpgme_release(context);
+ return NULL;
+ }
+
+ gpgerr = gpgme_op_export(context, lr_subkey->fingerprint, 0, key_data);
+ if (gpgerr != GPG_ERR_NO_ERROR) {
+ g_debug("%s: gpgme_op_export: %s", __func__, gpgme_strerror(gpgerr));
+ g_set_error(err, LR_GPG_ERROR, LRE_GPGERROR,
+ "gpgme_op_export() error: %s", gpgme_strerror(gpgerr));
+ gpgme_data_release(key_data);
+ lr_gpg_keys_free(lr_keys);
+ gpgme_release(context);
+ return NULL;
+ }
+
+ off_t key_size = gpgme_data_seek(key_data, 0, SEEK_CUR);
+ gpgerr = gpgme_data_rewind(key_data);
+ if (gpgerr != GPG_ERR_NO_ERROR) {
+ g_debug("%s: gpgme_data_rewind: %s", __func__, gpgme_strerror(gpgerr));
+ g_set_error(err, LR_GPG_ERROR, LRE_GPGERROR,
+ "gpgme_data_rewind() error: %s", gpgme_strerror(gpgerr));
+ gpgme_data_release(key_data);
+ lr_gpg_keys_free(lr_keys);
+ gpgme_release(context);
+ return NULL;
+ }
+
+ lr_key->raw_key = g_malloc0(key_size + 1);
+ ssize_t readed = gpgme_data_read(key_data, lr_key->raw_key, key_size);
+ if (readed == -1) {
+ g_debug("%s: gpgme_data_read: %s", __func__, gpgme_strerror(gpgerr));
+ g_set_error(err, LR_GPG_ERROR, LRE_GPGERROR,
+ "gpgme_data_read() error: %s", gpgme_strerror(gpgerr));
+ gpgme_data_release(key_data);
+ lr_gpg_keys_free(lr_keys);
+ gpgme_release(context);
+ return NULL;
+ }
+ if (readed != key_size) {
+ g_warning("%s: Error exporting key \"%s\": gpgme_data_read: Key size is %ld but readed %ld. "
+ "Skipping the key",
+ __func__, lr_key->subkeys->fingerprint, (long)key_size, (long)readed);
+ g_free(lr_key->raw_key);
+ lr_key->raw_key = NULL;
+ }
+
+ gpgme_data_release(key_data);
+
+ if (!lr_key->has_next) {
+ break;
+ }
+ }
+ }
+
gpgme_release(context);
+ return lr_keys;
+}
- return TRUE;
+const LrGpgKey *
+lr_gpg_key_get_next(const LrGpgKey *key) {
+ return key->has_next ? ++key : NULL;
+}
+
+char * const *
+lr_gpg_key_get_userids(const LrGpgKey *key) {
+ return key->uids;
+}
+
+const char *
+lr_gpg_key_get_raw_key(const LrGpgKey *key) {
+ return key->raw_key;
+}
+
+const LrGpgSubkey *
+lr_gpg_key_get_subkeys(const LrGpgKey *key) {
+ return key->subkeys;
+}
+
+static void
+lr_gpg_subkeys_free(LrGpgSubkey *subkeys) {
+ for (LrGpgSubkey *item = subkeys; item; ++item) {
+ g_free(item->fingerprint);
+ g_free(item->id);
+ if (!item->has_next) {
+ break;
+ }
+ }
+ g_free(subkeys);
+}
+
+void
+lr_gpg_keys_free(LrGpgKey *keys) {
+ for (LrGpgKey *item = keys; item; ++item) {
+ g_free(item->raw_key);
+ lr_gpg_subkeys_free(item->subkeys);
+ g_strfreev(item->uids);
+ if (!item->has_next) {
+ break;
+ }
+ }
+ g_free(keys);
+}
+
+const LrGpgSubkey *
+lr_gpg_subkey_get_next(const LrGpgSubkey *subkey) {
+ return subkey->has_next ? ++subkey : NULL;
+}
+
+const char *
+lr_gpg_subkey_get_id(const LrGpgSubkey *subkey) {
+ return subkey->id;
+}
+
+const char *
+lr_gpg_subkey_get_fingerprint(const LrGpgSubkey *subkey) {
+ return subkey->fingerprint;
+}
+
+long int
+lr_gpg_subkey_get_timestamp(const LrGpgSubkey *subkey) {
+ return subkey->timestamp;
+}
+
+gboolean
+lr_gpg_subkey_get_can_sign(const LrGpgSubkey *subkey) {
+ return subkey->can_sign;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librepo-1.14.5/librepo/gpg.h new/librepo-1.15.1/librepo/gpg.h
--- old/librepo-1.14.5/librepo/gpg.h 2022-09-09 12:32:23.000000000 +0200
+++ new/librepo-1.15.1/librepo/gpg.h 2022-12-09 13:47:26.000000000 +0100
@@ -1,5 +1,6 @@
/* librepo - A library providing (libcURL like) API to downloading repository
* Copyright (C) 2012 Tomas Mlcoch
+ * Copyright (C) 2022 Jaroslav Rohel <jrohel(a)redhat.com>
*
* Licensed under the GNU Lesser General Public License Version 2.1
*
@@ -30,6 +31,14 @@
* @{
*/
+/** A structure containing information about subkey.
+ */
+typedef struct tLrGpgSubkey LrGpgSubkey;
+
+/** A structure containing information about a key with subkeys.
+ */
+typedef struct tLrGpgKey LrGpgKey;
+
/** Check detached signature of data.
* @param signature_fd File descriptor of signature file.
* @param data_fd File descriptor of data to verify.
@@ -60,6 +69,35 @@
const char *home_dir,
GError **err);
+
+/** Import key into the keyring.
+ * @param key Pointer to memory buffer with key.
+ * @param key_len Length of the key.
+ * @param home_dir Configuration directory of OpenPGP engine
+ * (e.g. "/home/user/.gnupg/"), if NULL default
+ * config directory is used.
+ * @param err GError **
+ * @return returns TRUE if error is not set and FALSE if it is.
+ */
+gboolean
+lr_gpg_import_key_from_memory(const char *key,
+ size_t key_len,
+ const char *home_dir,
+ GError **err);
+
+/** Import key into the keyring.
+ * @param key_fd Filedescriptor of key file.
+ * @param home_dir Configuration directory of OpenPGP engine
+ * (e.g. "/home/user/.gnupg/"), if NULL default
+ * config directory is used.
+ * @param err GError **
+ * @return returns TRUE if error is not set and FALSE if it is.
+ */
+gboolean
+lr_gpg_import_key_from_fd(int key_fd,
+ const char *home_dir,
+ GError **err);
+
/** Import key into the keyring.
* @param key_fn Filename (path) of key file.
* @param home_dir Configuration directory of OpenPGP engine
@@ -73,6 +111,90 @@
const char *home_dir,
GError **err);
+
+/** List/export keys (and subkeys) from the keyring.
+ * @param export_keys If TRUE, the list also contains the exported keys.
+ * Export is in ASCII-Armor format.
+ * @param home_dir Configuration directory of OpenPGP engine
+ * (e.g. "/home/user/.gnupg/"), if NULL default
+ * config directory is used.
+ * @param err GError **
+ * @return returns list of keys (and subkeys), or NULL if keyring is empty or an error occured.
+ */
+LrGpgKey *
+lr_gpg_list_keys(gboolean export_keys,
+ const char *home_dir,
+ GError **err);
+
+/** Get the next key from the list obtained from lr_gpg_list_keys.
+ * @param key Input key.
+ * @return returns next kye.
+ */
+const LrGpgKey *
+lr_gpg_key_get_next(const LrGpgKey *key);
+
+/** Get NULL terminated array of user IDs strings.
+ * @param key Input key.
+ * @return returns NULL terminated array of user IDs strings.
+ */
+char * const *
+lr_gpg_key_get_userids(const LrGpgKey *key);
+
+/** Get key in ASCII-Armor format (only if `key` was obtained from lr_gpg_list_keys with `export = TRUE`).
+ * @param key Input key.
+ * @return returns key in ACII-Armor format.
+ */
+const char *
+lr_gpg_key_get_raw_key(const LrGpgKey *key);
+
+/** Get a list of subkeys associated with the key. The first subkey is the primary key.
+ * @param key Input key.
+ * @return returns list of subkeys associated with the key.
+ */
+const LrGpgSubkey *
+lr_gpg_key_get_subkeys(const LrGpgKey *key);
+
+/** Release the list of keys obtained from lr_gpg_list_keys.
+ * @param key Input array of keys.
+ */
+void
+lr_gpg_keys_free(LrGpgKey *key_array);
+
+/** Get the next subkey from the list obtained from lr_gpg_key_get_subkeys.
+ * @param key Input subkey.
+ * @return returns next subkye.
+ */
+const LrGpgSubkey *
+lr_gpg_subkey_get_next(const LrGpgSubkey *subkey);
+
+/** Get subkey ID.
+ * @param key Input subkey.
+ * @return returns key ID.
+ */
+const char *
+lr_gpg_subkey_get_id(const LrGpgSubkey *subkey);
+
+/** Get fingerprint of the subkey in hex digit form.
+ * @param key Input subkey.
+ * @return returns fingerprint of the subkey in hex digit form.
+ */
+const char *
+lr_gpg_subkey_get_fingerprint(const LrGpgSubkey *subkey);
+
+/** Get the creation timestamp.
+ * @param key Input subkey.
+ * @return returns Get the creation timestamp, -1 if invalid, 0 if not available..
+ */
+long int
+lr_gpg_subkey_get_timestamp(const LrGpgSubkey *subkey);
+
+/** Get information if the subkey can be used for signing.
+ * @param key Input subkey.
+ * @return returns TRUE if subkey can be used for signing.
+ */
+gboolean
+lr_gpg_subkey_get_can_sign(const LrGpgSubkey *subkey);
+
/** @} */
G_END_DECLS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librepo-1.14.5/librepo/handle.c new/librepo-1.15.1/librepo/handle.c
--- old/librepo-1.14.5/librepo/handle.c 2022-09-09 12:32:23.000000000 +0200
+++ new/librepo-1.15.1/librepo/handle.c 2022-12-09 13:47:26.000000000 +0100
@@ -32,6 +32,8 @@
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <time.h>
+#include <gio/gio.h>
#include "handle_internal.h"
@@ -264,6 +266,51 @@
}
}
+struct callback_data {
+ GMainLoop *loop;
+ guint64 deadline_millis;
+ guint timeout_id;
+ GNetworkMonitor *monitor;
+ GSocketConnectable *connectable;
+ GCancellable *cancellable;
+};
+
+gboolean
+timeout_callback(gpointer data)
+{
+ struct callback_data *dt = (struct callback_data*)data;
+
+ //if past deadline, exit
+ if (g_get_monotonic_time() >= dt->deadline_millis) {
+ g_main_loop_quit(dt->loop);
+ return G_SOURCE_REMOVE;
+ }
+
+ //if no internet, remove source
+ if (!g_network_monitor_get_network_available(dt->monitor)) {
+ return G_SOURCE_REMOVE;
+ }
+
+ //if url reached, quit loop and remove source
+ if (g_network_monitor_can_reach (dt->monitor, dt->connectable, dt->cancellable, NULL)) {
+ g_main_loop_quit(dt->loop);
+ return G_SOURCE_REMOVE;
+ }
+
+ //Still waiting on the URL to be availbale, keep polling
+ return G_SOURCE_CONTINUE;
+}
+
+void
+on_network_available(GObject *object, GParamSpec *pspec, gpointer data)
+{
+ struct callback_data *dt = (struct callback_data*)data;
+ if (dt->timeout_id == 0 && g_network_monitor_get_network_available(dt->monitor)) {
+ dt->timeout_id = g_timeout_add(200, timeout_callback, dt);
+ }
+ g_main_loop_run(dt->loop);
+}
+
gboolean
lr_handle_setopt(LrHandle *handle,
GError **err,
@@ -841,6 +888,60 @@
return ret;
}
+gboolean
+lr_handle_network_wait(LrHandle *handle, GError **err, guint seconds, GCancellable *cancellable)
+{
+ assert(!err || *err == NULL);
+
+ if (!handle) {
+ g_set_error(err, LR_HANDLE_ERROR, LRE_BADFUNCARG,
+ "No handle specified");
+ return FALSE;
+ }
+
+ GNetworkMonitor *monitor = g_network_monitor_get_default();
+
+ struct callback_data data_struct;
+ data_struct.cancellable = cancellable;
+ data_struct.monitor = monitor;
+
+ const gchar *baseurl;
+ if (handle->metalinkurl)
+ baseurl = handle->metalinkurl;
+ else if (handle->mirrorlisturl)
+ baseurl = handle->mirrorlisturl;
+ else if (handle->urls)
+ baseurl = handle->urls[0];
+ assert(baseurl);
+
+ g_autoptr(GUri) uri = g_uri_parse(baseurl, G_URI_FLAGS_NONE, NULL);
+ if (uri == NULL) {
+ return FALSE;
+ }
+ const gchar* scheme = g_uri_get_scheme(uri);
+ if (!g_strcmp0(scheme, "file")) {
+ return TRUE;
+ }
+ const gchar* host = g_uri_get_host(uri);
+ guint16 port = g_uri_get_port(uri);
+ GSocketConnectable *connectable = g_network_address_new(host, port);
+ data_struct.connectable = connectable;
+ data_struct.deadline_millis = g_get_monotonic_time() + seconds * G_USEC_PER_SEC;
+ g_autoptr(GMainLoop) loop;
+ loop = g_main_loop_new(NULL, FALSE);
+ data_struct.loop = loop;
+ data_struct.timeout_id = 0;
+
+ if (g_network_monitor_get_network_available(data_struct.monitor)) {
+ data_struct.timeout_id = g_timeout_add(200, timeout_callback, &data_struct);
+ g_main_loop_run(data_struct.loop);
+ }
+ else{
+ g_signal_connect(monitor, "notify::network-available", G_CALLBACK(on_network_available), &data_struct);
+ }
+ return TRUE;
+}
+
static gboolean
lr_handle_prepare_urls(LrHandle *handle, GError **err)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librepo-1.14.5/librepo/handle.h new/librepo-1.15.1/librepo/handle.h
--- old/librepo-1.14.5/librepo/handle.h 2022-09-09 12:32:23.000000000 +0200
+++ new/librepo-1.15.1/librepo/handle.h 2022-12-09 13:47:26.000000000 +0100
@@ -22,6 +22,7 @@
#define __LR_HANDLE_H__
#include <glib.h>
+#include <gio/gio.h>
#include "result.h"
@@ -560,6 +561,16 @@
gboolean
lr_handle_perform(LrHandle *handle, LrResult *result, GError **err);
+/** Handle waiting on network for LRO_URLS.
+ * @param handle Librepo handle.
+ * @param seconds Network timeout seconds
+ * @param err GError **
+ * @param cancellable GCancellable *
+ * @return TRUE if everything is ok, FALSE if err is set.
+ */
+gboolean
+lr_handle_network_wait(LrHandle *handle, GError **err, guint seconds, GCancellable *cancellable);
+
/** @} */
G_END_DECLS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librepo-1.14.5/librepo.spec new/librepo-1.15.1/librepo.spec
--- old/librepo-1.14.5/librepo.spec 2022-09-09 12:32:23.000000000 +0200
+++ new/librepo-1.15.1/librepo.spec 2022-12-09 13:47:26.000000000 +0100
@@ -11,11 +11,11 @@
%global dnf_conflict 2.8.8
Name: librepo
-Version: 1.14.5
+Version: 1.15.1
Release: 1%{?dist}
Summary: Repodata downloading library
-License: LGPLv2+
+License: LGPL-2.1-or-later
URL: https://github.com/rpm-software-management/librepo
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librepo-1.14.5/tests/test_gpg.c new/librepo-1.15.1/tests/test_gpg.c
--- old/librepo-1.14.5/tests/test_gpg.c 2022-09-09 12:32:23.000000000 +0200
+++ new/librepo-1.15.1/tests/test_gpg.c 2022-12-09 13:47:26.000000000 +0100
@@ -38,6 +38,7 @@
_signature_path = lr_pathconcat(test_globals.testdata_dir,
"repo_yum_01/repodata/repomd.xml_bad.asc", NULL);
+ // Import the first key directly from the file
ret = lr_gpg_import_key(key_path, tmp_home_path, &tmp_err);
ck_assert(ret);
ck_assert_ptr_null(tmp_err);
@@ -57,8 +58,7 @@
&tmp_err);
ck_assert(!ret);
ck_assert_ptr_nonnull(tmp_err);
- g_error_free(tmp_err);
- tmp_err = NULL;
+ g_clear_error(&tmp_err);
// Bad data
ret = lr_gpg_check_signature(signature_path,
@@ -67,13 +67,19 @@
&tmp_err);
ck_assert(!ret);
ck_assert_ptr_nonnull(tmp_err);
- g_error_free(tmp_err);
- tmp_err = NULL;
+ g_clear_error(&tmp_err);
+
+ // Load the second key into memory and import it from memory
+ gchar *contents;
+ gsize length;
+ ret = g_file_get_contents(_key_path, &contents, &length, &tmp_err);
+ ck_assert(ret);
+ ck_assert_ptr_null(tmp_err);
- // Import the 2nd key
- ret = lr_gpg_import_key(_key_path, tmp_home_path, &tmp_err);
+ ret = lr_gpg_import_key_from_memory(contents, length, tmp_home_path, &tmp_err);
ck_assert(ret);
ck_assert_ptr_null(tmp_err);
+ g_free(contents);
// Valid key and data
ret = lr_gpg_check_signature(_signature_path,
@@ -90,7 +96,7 @@
&tmp_err);
ck_assert(!ret);
ck_assert_ptr_nonnull(tmp_err);
- g_error_free(tmp_err);
+ g_clear_error(&tmp_err);
tmp_err = NULL;
// Bad data 2
@@ -100,7 +106,7 @@
&tmp_err);
ck_assert(!ret);
ck_assert_ptr_nonnull(tmp_err);
- g_error_free(tmp_err);
+ g_clear_error(&tmp_err);
tmp_err = NULL;
lr_remove_dir(tmp_home_path);
@@ -114,12 +120,117 @@
}
END_TEST
+START_TEST(test_gpg_check_key_export)
+{
+ gboolean ret;
+ char *key_path;
+ char *tmp_home_path;
+ GError *tmp_err = NULL;
+
+ tmp_home_path = lr_gettmpdir();
+ key_path = lr_pathconcat(test_globals.testdata_dir,
+ "repo_yum_01/repodata/repomd.xml.key", NULL);
+
+ // Import the key from file descriptor
+ int key_fd = open(key_path, O_RDONLY);
+ ck_assert(key_fd != -1);
+ ret = lr_gpg_import_key_from_fd(key_fd, tmp_home_path, &tmp_err);
+ ck_assert(ret);
+ ck_assert_ptr_null(tmp_err);
+ ck_assert(close(key_fd) != -1);
+
+ // Export the keys
+ LrGpgKey *keys = lr_gpg_list_keys(TRUE, tmp_home_path, &tmp_err);
+ ck_assert_ptr_nonnull(keys);
+ ck_assert_ptr_null(tmp_err);
+
+ // Test key user ids
+ char * const *uids = lr_gpg_key_get_userids(keys);
+ ck_assert_ptr_nonnull(uids);
+ ck_assert(g_strcmp0(uids[0], "Tomas Mlcoch (test key) <tmlcoch(a)redhat.com>") == 0);
+ ck_assert_ptr_null(uids[1]);
+
+ // Get subkeys
+ const LrGpgSubkey *subkeys = lr_gpg_key_get_subkeys(keys);
+ ck_assert_ptr_nonnull(subkeys);
+
+ // Test first subkey
+ const char *id = lr_gpg_subkey_get_id(subkeys);
+ ck_assert(g_strcmp0(id, "46AF958A22F2C4E9") == 0);
+ const char *fingerprint = lr_gpg_subkey_get_fingerprint(subkeys);
+ ck_assert(g_strcmp0(fingerprint, "55B80C4944D8938E94980B6D46AF958A22F2C4E9") == 0);
+ long timestamp = lr_gpg_subkey_get_timestamp(subkeys);
+ ck_assert(timestamp == 1347882156);
+ gboolean can_sign = lr_gpg_subkey_get_can_sign(subkeys);
+ ck_assert(can_sign);
+
+ // Get second subkey
+ subkeys = lr_gpg_subkey_get_next(subkeys);
+ ck_assert_ptr_nonnull(subkeys);
+
+ // Test second subkey
+ id = lr_gpg_subkey_get_id(subkeys);
+ ck_assert(g_strcmp0(id, "7AE6F6EF026AF38A") == 0);
+ fingerprint = lr_gpg_subkey_get_fingerprint(subkeys);
+ ck_assert(g_strcmp0(fingerprint, "D855DBAA43DB343EC4F214EB7AE6F6EF026AF38A") == 0);
+ timestamp = lr_gpg_subkey_get_timestamp(subkeys);
+ ck_assert(timestamp == 1347882156);
+ can_sign = lr_gpg_subkey_get_can_sign(subkeys);
+ ck_assert(!can_sign);
+
+ // There are no other subkeys for the key
+ subkeys = lr_gpg_subkey_get_next(subkeys);
+ ck_assert_ptr_null(subkeys);
+
+ // Test exported raw key
+ const char *raw_key = lr_gpg_key_get_raw_key(keys);
+ ck_assert_ptr_nonnull(raw_key);
+ ck_assert(strstr(raw_key,
+ "mQENBFBXDKwBCADA5jpCwpb/JKOG8mcFyIanNojDwpHwKoyjGNpZNPNUDJguvkRa\n"
+ "IO3NdoyXYd5QVTOsnyKBaRaiLLJWI/VJxTOT3fwOPprrzUlkHwoWl+sYuSdXHASu\n"
+ "m4lkBiXHsa5oiXPdrY6hoh5vsF8ASwCHXOwpR9yyvGEaUUMBl2GpJAX/cGVcL4Dy\n"
+ "Z0pyJMLO4qrIPoX+wd1ZSFSc8JcAC4UtA82HCGTmesgialpwKdoQyt+em94oIM1f\n"
+ "D6v7zzcRX/zLKKEzpFnU458WBA+JACkde3ohX//0fDCeaLqMzs++FCgwm/HMCszw\n"
+ "RnINr+K8ENfMYBoeM7a7tnhiae+rkxWmvWz/ABEBAAG0LFRvbWFzIE1sY29jaCAo\n"
+ "dGVzdCBrZXkpIDx0bWxjb2NoQHJlZGhhdC5jb20+iQE4BBMBAgAiBQJQVwysAhsD\n"
+ "BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBGr5WKIvLE6fdyB/9OzDczaqGy\n"
+ "1rzk7Wp2C9S5QatFUFNWt6FIFPITbixT4jrDo/LyUJVWLw4ng7ldg79vmrzhpP8h\n"
+ "yFVvuvGvSEMn5sgnZ83SEd4vRJ2O8K5RuVs5Kcj7ayLlxPpqbYOYmrmTaLwYTwdv\n"
+ "0wDnNU9IkkMSK752RQes4J+4XGikd8CNm5lw8cRQ7bcQd8s2rnCoiyGt7PIdl13z\n"
+ "8hO9KA52iUP06AbbIusbQ1jzsViEny+xQH7SZ53Ga4eRr0mW2iA20Mkp4Ieb+dNo\n"
+ "47Q8aHUqI9O4HTF/3Fzt7KmNxXCpCOhxTWx0IkqPGoZ0W63Aut/CVh0LXsBF2TUD\n"
+ "Ym9P/IjRgJLhuQENBFBXDKwBCACvhlMcgjLJ4PtMTtauF1OXVTfODQSHo+qwKt4S\n"
+ "GyDlTGayQ76pOqYkkzIRqmNYl1ThmcfzpmJ3O+hFQQ7OdguYcfkbfgIMjEJEbKG3\n"
+ "wsR5pm9zjwStzYHedwkct1nyROgBz70o16FfdiWOguw58jQZOSO/I2S3JpLsLgI8\n"
+ "KqdIk/0WuoOfzt+KcvL52lX94O2hBpRI0v6lDgSm7KkPGQrVFnSIUR5r73ceageL\n"
+ "5LmGm1TlEjWHwA9iYIvBcjnE26/l8u58IYQ/sUmn0u4jBcBNc7iqdWvlSLZLlMmi\n"
+ "qnzDNhUup9neKGxgr4hGAblxiSxXlmOoFv0jEW81b4VximSJABEBAAGJAR8EGAEC\n"
+ "AAkFAlBXDKwCGwwACgkQRq+ViiLyxOnf6Qf+PIG//12qp3hXZsvB7JQuQ4nUNwp6\n"
+ "Ufm6W9pFm3DOqnI9H9ZNzGbkoS5WwRp0B1NLfNKipQVORnDs6qve298ReRrmLKnk\n"
+ "BPZqxFpPqLQ6X83Or2bqKiJS1axonIgqkImFLfxxqKoukvhn328Z2FVlrvkKSMU8\n"
+ "eHi/iDF/TCHoPE9WtnVSzsNU9i+9j8j//GO+bMC5AGNOxcBKlChFpLYpE/pfITL/\n"
+ "icS7wB9MrMLNvjlN1EKszQFxJrFVBGTt8hUqRH3CCUFRwbpE1QJ1WAzJ0Vzk5nWR\n"
+ "rVZQiiLe03B8hC7/qRiB4bya5nbWcwe9ltPFja4/tTe92ivScFfCLyALVQ==\n"
+ "=G300") != NULL);
+
+ // Only one key is in keyring
+ ck_assert_ptr_null(lr_gpg_key_get_next(keys));
+
+ lr_gpg_keys_free(keys);
+ lr_remove_dir(tmp_home_path);
+ lr_free(key_path);
+ g_free(tmp_home_path);
+}
+END_TEST
+
+
Suite *
gpg_suite(void)
{
Suite *s = suite_create("gpg");
TCase *tc = tcase_create("Main");
tcase_add_test(tc, test_gpg_check_signature);
+ tcase_add_test(tc, test_gpg_check_key_export);
suite_add_tcase(s, tc);
return s;
}
1
0