openSUSE Commits
Threads by month
- ----- 2024 -----
- July
- June
- May
- 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
July 2024
- 1 participants
- 855 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package xsimd for openSUSE:Factory checked in at 2024-07-11 20:29:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xsimd (Old)
and /work/SRC/openSUSE:Factory/.xsimd.new.17339 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xsimd"
Thu Jul 11 20:29:23 2024 rev:8 rq:1186600 version:13.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/xsimd/xsimd.changes 2024-05-29 19:35:35.335917186 +0200
+++ /work/SRC/openSUSE:Factory/.xsimd.new.17339/xsimd.changes 2024-07-11 20:29:31.776822818 +0200
@@ -1,0 +2,7 @@
+Thu Jul 4 20:21:59 UTC 2024 - Christophe Marin <christophe(a)krop.fr>
+
+- Add upstream changes fixing some krita issues:
+ * 0001-Fix-xsimd-available_architectures-.has-for-sve-and-r.patch
+ * 0002-Fix-detection-of-SSE-AVX-AVX512-when-they-are-explic.patch
+
+-------------------------------------------------------------------
New:
----
0001-Fix-xsimd-available_architectures-.has-for-sve-and-r.patch
0002-Fix-detection-of-SSE-AVX-AVX512-when-they-are-explic.patch
BETA DEBUG BEGIN:
New:- Add upstream changes fixing some krita issues:
* 0001-Fix-xsimd-available_architectures-.has-for-sve-and-r.patch
* 0002-Fix-detection-of-SSE-AVX-AVX512-when-they-are-explic.patch
New: * 0001-Fix-xsimd-available_architectures-.has-for-sve-and-r.patch
* 0002-Fix-detection-of-SSE-AVX-AVX512-when-they-are-explic.patch
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xsimd.spec ++++++
--- /var/tmp/diff_new_pack.vLxnmb/_old 2024-07-11 20:29:34.844936200 +0200
+++ /var/tmp/diff_new_pack.vLxnmb/_new 2024-07-11 20:29:34.844936200 +0200
@@ -24,6 +24,9 @@
Group: Development/Libraries/C and C++
URL: https://xsimd.readthedocs.io/en/latest/
Source0: https://github.com/xtensor-stack/xsimd/archive/refs/tags/%{version}.tar.gz#…
+# PATCH-FIX-UPSTREAM -- https://mail.kde.org/pipermail/distributions/2024-July/001511.html
+Patch0: 0001-Fix-xsimd-available_architectures-.has-for-sve-and-r.patch
+Patch1: 0002-Fix-detection-of-SSE-AVX-AVX512-when-they-are-explic.patch
BuildRequires: cmake
BuildRequires: doctest-devel
BuildRequires: doxygen
++++++ 0001-Fix-xsimd-available_architectures-.has-for-sve-and-r.patch ++++++
From 4f91d4a44eb9476572cf49a96cbe658eb871f47c Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73(a)gmail.com>
Date: Fri, 14 Jun 2024 10:19:55 +0200
Subject: [PATCH 1/2] Fix xsimd::available_architectures().has() for sve and
rvv archs
Ideally the patch CPU detection code should also check if the length
of SVE and RVV is actually supported by the current CPU implementation
(i.e. ZCR_Elx.LEN register for SVE and something else for RVV), but
I don't have such CPUs/emulators handy, so I cannot add such checks.
Given that xsimd::available_architectures().has() is a new feature
of XSIMD13 and the length check has never been present in XSIMD, this
bug is not a regression at least.
The patch also adds a unittest that reproduces the error the patch fixes
---
include/xsimd/config/xsimd_cpuid.hpp | 12 ++++++++++--
test/test_arch.cpp | 15 +++++++++++++++
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/include/xsimd/config/xsimd_cpuid.hpp b/include/xsimd/config/xsimd_cpuid.hpp
index f22089b..30a9da2 100644
--- a/include/xsimd/config/xsimd_cpuid.hpp
+++ b/include/xsimd/config/xsimd_cpuid.hpp
@@ -42,6 +42,10 @@ namespace xsimd
#define ARCH_FIELD_EX(arch, field_name) \
unsigned field_name; \
XSIMD_INLINE bool has(::xsimd::arch) const { return this->field_name; }
+
+#define ARCH_FIELD_EX_REUSE(arch, field_name) \
+ XSIMD_INLINE bool has(::xsimd::arch) const { return this->field_name; }
+
#define ARCH_FIELD(name) ARCH_FIELD_EX(name, name)
ARCH_FIELD(sse2)
@@ -72,8 +76,12 @@ namespace xsimd
ARCH_FIELD(neon)
ARCH_FIELD(neon64)
ARCH_FIELD_EX(i8mm<::xsimd::neon64>, i8mm_neon64)
- ARCH_FIELD(sve)
- ARCH_FIELD(rvv)
+ ARCH_FIELD_EX(detail::sve<512>, sve)
+ ARCH_FIELD_EX_REUSE(detail::sve<256>, sve)
+ ARCH_FIELD_EX_REUSE(detail::sve<128>, sve)
+ ARCH_FIELD_EX(detail::rvv<512>, rvv)
+ ARCH_FIELD_EX_REUSE(detail::rvv<256>, rvv)
+ ARCH_FIELD_EX_REUSE(detail::rvv<128>, rvv)
ARCH_FIELD(wasm)
#undef ARCH_FIELD
diff --git a/test/test_arch.cpp b/test/test_arch.cpp
index b420733..f1f50d5 100644
--- a/test/test_arch.cpp
+++ b/test/test_arch.cpp
@@ -38,6 +38,16 @@ struct check_supported
}
};
+struct check_cpu_has_intruction_set
+{
+ template <class Arch>
+ void operator()(Arch arch) const
+ {
+ static_assert(std::is_same<decltype(xsimd::available_architectures().has(arch)), bool>::value,
+ "cannot test instruction set availability on CPU");
+ }
+};
+
struct check_available
{
template <class Arch>
@@ -71,6 +81,11 @@ TEST_CASE("[multi arch support]")
xsimd::supported_architectures::for_each(check_supported {});
}
+ SUBCASE("xsimd::available_architectures::has")
+ {
+ xsimd::all_architectures::for_each(check_cpu_has_intruction_set {});
+ }
+
SUBCASE("xsimd::default_arch::name")
{
constexpr char const* name = xsimd::default_arch::name();
--
2.45.2
++++++ 0002-Fix-detection-of-SSE-AVX-AVX512-when-they-are-explic.patch ++++++
From c2974c874e14557490eab76d2eebf9f8b9eb88f1 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73(a)gmail.com>
Date: Tue, 28 May 2024 22:21:08 +0200
Subject: [PATCH 2/2] Fix detection of SSE/AVX/AVX512 when they are explicitly
disabled by OS
Some CPU vulnerability mitigations may disable AVX functionality
on the hardware level via the XCR0 register. We should check that
manually to verify that OS actually allows us to use this feature.
See https://bugs.kde.org/show_bug.cgi?id=484622
Fix #1025
---
include/xsimd/config/xsimd_cpuid.hpp | 91 ++++++++++++++++++++++------
1 file changed, 72 insertions(+), 19 deletions(-)
diff --git a/include/xsimd/config/xsimd_cpuid.hpp b/include/xsimd/config/xsimd_cpuid.hpp
index 30a9da2..8021fce 100644
--- a/include/xsimd/config/xsimd_cpuid.hpp
+++ b/include/xsimd/config/xsimd_cpuid.hpp
@@ -122,6 +122,35 @@ namespace xsimd
#endif
#elif defined(__x86_64__) || defined(__i386__) || defined(_M_AMD64) || defined(_M_IX86)
+
+ auto get_xcr0_low = []() noexcept
+ {
+ uint32_t xcr0;
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+
+ xcr0 = (uint32_t)_xgetbv(0);
+
+#elif defined(__GNUC__)
+
+ __asm__(
+ "xorl %%ecx, %%ecx\n"
+ "xgetbv\n"
+ : "=a"(xcr0)
+ :
+#if defined(__i386__)
+ : "ecx", "edx"
+#else
+ : "rcx", "rdx"
+#endif
+ );
+
+#else /* _MSC_VER < 1400 */
+#error "_MSC_VER < 1400 is not supported"
+#endif /* _MSC_VER && _MSC_VER >= 1400 */
+ return xcr0;
+ };
+
auto get_cpuid = [](int reg[4], int level, int count = 0) noexcept
{
@@ -156,19 +185,43 @@ namespace xsimd
get_cpuid(regs1, 0x1);
- sse2 = regs1[3] >> 26 & 1;
- sse3 = regs1[2] >> 0 & 1;
- ssse3 = regs1[2] >> 9 & 1;
- sse4_1 = regs1[2] >> 19 & 1;
- sse4_2 = regs1[2] >> 20 & 1;
- fma3_sse42 = regs1[2] >> 12 & 1;
+ // OS can explicitly disable the usage of SSE/AVX extensions
+ // by setting an appropriate flag in CR0 register
+ //
+ // https://docs.kernel.org/admin-guide/hw-vuln/gather_data_sampling.html
+
+ unsigned sse_state_os_enabled = 1;
+ unsigned avx_state_os_enabled = 1;
+ unsigned avx512_state_os_enabled = 1;
+
+ // OSXSAVE: A value of 1 indicates that the OS has set CR4.OSXSAVE[bit
+ // 18] to enable XSETBV/XGETBV instructions to access XCR0 and
+ // to support processor extended state management using
+ // XSAVE/XRSTOR.
+ bool osxsave = regs1[2] >> 27 & 1;
+ if (osxsave)
+ {
+
+ uint32_t xcr0 = get_xcr0_low();
+
+ sse_state_os_enabled = xcr0 >> 1 & 1;
+ avx_state_os_enabled = xcr0 >> 2 & sse_state_os_enabled;
+ avx512_state_os_enabled = xcr0 >> 6 & avx_state_os_enabled;
+ }
+
+ sse2 = regs1[3] >> 26 & sse_state_os_enabled;
+ sse3 = regs1[2] >> 0 & sse_state_os_enabled;
+ ssse3 = regs1[2] >> 9 & sse_state_os_enabled;
+ sse4_1 = regs1[2] >> 19 & sse_state_os_enabled;
+ sse4_2 = regs1[2] >> 20 & sse_state_os_enabled;
+ fma3_sse42 = regs1[2] >> 12 & sse_state_os_enabled;
- avx = regs1[2] >> 28 & 1;
+ avx = regs1[2] >> 28 & avx_state_os_enabled;
fma3_avx = avx && fma3_sse42;
int regs8[4];
get_cpuid(regs8, 0x80000001);
- fma4 = regs8[2] >> 16 & 1;
+ fma4 = regs8[2] >> 16 & avx_state_os_enabled;
// sse4a = regs[2] >> 6 & 1;
@@ -176,23 +229,23 @@ namespace xsimd
int regs7[4];
get_cpuid(regs7, 0x7);
- avx2 = regs7[1] >> 5 & 1;
+ avx2 = regs7[1] >> 5 & avx_state_os_enabled;
int regs7a[4];
get_cpuid(regs7a, 0x7, 0x1);
- avxvnni = regs7a[0] >> 4 & 1;
+ avxvnni = regs7a[0] >> 4 & avx_state_os_enabled;
fma3_avx2 = avx2 && fma3_sse42;
- avx512f = regs7[1] >> 16 & 1;
- avx512cd = regs7[1] >> 28 & 1;
- avx512dq = regs7[1] >> 17 & 1;
- avx512bw = regs7[1] >> 30 & 1;
- avx512er = regs7[1] >> 27 & 1;
- avx512pf = regs7[1] >> 26 & 1;
- avx512ifma = regs7[1] >> 21 & 1;
- avx512vbmi = regs7[2] >> 1 & 1;
- avx512vnni_bw = regs7[2] >> 11 & 1;
+ avx512f = regs7[1] >> 16 & avx512_state_os_enabled;
+ avx512cd = regs7[1] >> 28 & avx512_state_os_enabled;
+ avx512dq = regs7[1] >> 17 & avx512_state_os_enabled;
+ avx512bw = regs7[1] >> 30 & avx512_state_os_enabled;
+ avx512er = regs7[1] >> 27 & avx512_state_os_enabled;
+ avx512pf = regs7[1] >> 26 & avx512_state_os_enabled;
+ avx512ifma = regs7[1] >> 21 & avx512_state_os_enabled;
+ avx512vbmi = regs7[2] >> 1 & avx512_state_os_enabled;
+ avx512vnni_bw = regs7[2] >> 11 & avx512_state_os_enabled;
avx512vnni_vbmi = avx512vbmi && avx512vnni_bw;
#endif
}
--
2.45.2
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package libstorage-ng for openSUSE:Factory checked in at 2024-07-11 20:29:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old)
and /work/SRC/openSUSE:Factory/.libstorage-ng.new.17339 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage-ng"
Thu Jul 11 20:29:23 2024 rev:277 rq:1186570 version:4.5.217
Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2024-07-04 16:23:00.006909727 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.17339/libstorage-ng.changes 2024-07-11 20:29:30.412772410 +0200
@@ -1,0 +2,7 @@
+Wed Jul 10 10:08:42 UTC 2024 - aschnell(a)suse.com
+
+- merge gh#openSUSE/libstorage-ng#999
+- use cryptsetup to get uuid of newly created luks
+- 4.5.217
+
+--------------------------------------------------------------------
Old:
----
libstorage-ng-4.5.216.tar.xz
New:
----
libstorage-ng-4.5.217.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.NzDqQL/_old 2024-07-11 20:29:31.072796801 +0200
+++ /var/tmp/diff_new_pack.NzDqQL/_new 2024-07-11 20:29:31.076796948 +0200
@@ -18,7 +18,7 @@
%define libname %{name}1
Name: libstorage-ng
-Version: 4.5.216
+Version: 4.5.217
Release: 0
Summary: Library for storage management
License: GPL-2.0-only
++++++ libstorage-ng-4.5.216.tar.xz -> libstorage-ng-4.5.217.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.216/VERSION new/libstorage-ng-4.5.217/VERSION
--- old/libstorage-ng-4.5.216/VERSION 2024-07-03 14:55:49.000000000 +0200
+++ new/libstorage-ng-4.5.217/VERSION 2024-07-10 12:08:42.000000000 +0200
@@ -1 +1 @@
-4.5.216
+4.5.217
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.216/storage/Devices/LuksImpl.cc new/libstorage-ng-4.5.217/storage/Devices/LuksImpl.cc
--- old/libstorage-ng-4.5.216/storage/Devices/LuksImpl.cc 2024-07-03 14:55:49.000000000 +0200
+++ new/libstorage-ng-4.5.217/storage/Devices/LuksImpl.cc 2024-07-10 12:08:42.000000000 +0200
@@ -501,14 +501,10 @@
void
Luks::Impl::probe_uuid()
{
- Udevadm udevadm;
-
const BlkDevice* blk_device = get_blk_device();
- const Blkid blkid(udevadm, blk_device->get_name());
- Blkid::const_iterator it = blkid.get_sole_entry();
- if (it != blkid.end())
- uuid = it->second.luks_uuid;
+ const CmdCryptsetupLuksDump cmd_cryptsetup_luks_dump(blk_device->get_name());
+ uuid = cmd_cryptsetup_luks_dump.get_uuid();
}
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package kernel-source-longterm for openSUSE:Factory checked in at 2024-07-11 20:29:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kernel-source-longterm (Old)
and /work/SRC/openSUSE:Factory/.kernel-source-longterm.new.17339 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kernel-source-longterm"
Thu Jul 11 20:29:22 2024 rev:21 rq:1186520 version:6.6.38
Changes:
--------
--- /work/SRC/openSUSE:Factory/kernel-source-longterm/kernel-longterm.changes 2024-07-08 19:06:43.655376930 +0200
+++ /work/SRC/openSUSE:Factory/.kernel-source-longterm.new.17339/kernel-longterm.changes 2024-07-11 20:29:24.272545499 +0200
@@ -1,0 +2,14 @@
+Tue Jul 9 13:06:50 CEST 2024 - rfrohl(a)suse.com
+
+- Linux 6.6.38 (bsc#1218260).
+- Revert "bpf: Take return from set_memory_ro() into account
+ with bpf_prog_lock_ro()" (bsc#1218260).
+- Revert "powerpc/bpf: rename powerpc64_jit_data to
+ powerpc_jit_data" (bsc#1218260).
+- Revert "powerpc/bpf: use
+ bpf_jit_binary_pack_[alloc|finalize|free]" (bsc#1218260).
+- Revert "bpf: Take return from set_memory_rox() into account
+ with bpf_jit_binary_lock_ro()" (bsc#1218260).
+- commit 5376cb8
+
+-------------------------------------------------------------------
kernel-source-longterm.changes: same change
kernel-syms-longterm.changes: same change
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kernel-longterm.spec ++++++
--- /var/tmp/diff_new_pack.CCNYRC/_old 2024-07-11 20:29:29.172726584 +0200
+++ /var/tmp/diff_new_pack.CCNYRC/_new 2024-07-11 20:29:29.172726584 +0200
@@ -18,8 +18,8 @@
%define srcversion 6.6
-%define patchversion 6.6.37
-%define git_commit e5b4fd2befceafccfb28e9babfc5987d26eeb789
+%define patchversion 6.6.38
+%define git_commit 5376cb851cd623dc697af5d0b2a15b2758a0ff9a
%define variant -longterm%{nil}
%define compress_modules zstd
%define compress_vmlinux xz
@@ -113,9 +113,9 @@
Summary: The Linux Kernel
License: GPL-2.0-only
Group: System/Kernel
-Version: 6.6.37
+Version: 6.6.38
%if 0%{?is_kotd}
-Release: <RELEASE>.ge5b4fd2
+Release: <RELEASE>.g5376cb8
%else
Release: 0
%endif
++++++ kernel-source-longterm.spec ++++++
--- /var/tmp/diff_new_pack.CCNYRC/_old 2024-07-11 20:29:29.204727767 +0200
+++ /var/tmp/diff_new_pack.CCNYRC/_new 2024-07-11 20:29:29.208727914 +0200
@@ -17,8 +17,8 @@
%define srcversion 6.6
-%define patchversion 6.6.37
-%define git_commit e5b4fd2befceafccfb28e9babfc5987d26eeb789
+%define patchversion 6.6.38
+%define git_commit 5376cb851cd623dc697af5d0b2a15b2758a0ff9a
%define variant -longterm%{nil}
%include %_sourcedir/kernel-spec-macros
@@ -31,9 +31,9 @@
%endif
Name: kernel-source-longterm
-Version: 6.6.37
+Version: 6.6.38
%if 0%{?is_kotd}
-Release: <RELEASE>.ge5b4fd2
+Release: <RELEASE>.g5376cb8
%else
Release: 0
%endif
++++++ kernel-syms-longterm.spec ++++++
--- /var/tmp/diff_new_pack.CCNYRC/_old 2024-07-11 20:29:29.244729245 +0200
+++ /var/tmp/diff_new_pack.CCNYRC/_new 2024-07-11 20:29:29.248729393 +0200
@@ -16,7 +16,7 @@
#
-%define git_commit e5b4fd2befceafccfb28e9babfc5987d26eeb789
+%define git_commit 5376cb851cd623dc697af5d0b2a15b2758a0ff9a
%define variant -longterm%{nil}
%include %_sourcedir/kernel-spec-macros
@@ -25,10 +25,10 @@
Summary: Kernel Symbol Versions (modversions)
License: GPL-2.0-only
Group: Development/Sources
-Version: 6.6.37
+Version: 6.6.38
%if %using_buildservice
%if 0%{?is_kotd}
-Release: <RELEASE>.ge5b4fd2
+Release: <RELEASE>.g5376cb8
%else
Release: 0
%endif
++++++ patches.kernel.org.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/kernel-source-longterm/patches.kernel.org.tar.bz2 /work/SRC/openSUSE:Factory/.kernel-source-longterm.new.17339/patches.kernel.org.tar.bz2 differ: char 11, line 1
++++++ series.conf ++++++
--- /var/tmp/diff_new_pack.CCNYRC/_old 2024-07-11 20:29:29.932754671 +0200
+++ /var/tmp/diff_new_pack.CCNYRC/_new 2024-07-11 20:29:29.944755114 +0200
@@ -8331,6 +8331,11 @@
patches.kernel.org/6.6.37-165-serial-8250_omap-Fix-Errata-i2310-with-RX-FIF…
patches.kernel.org/6.6.37-166-tracing-net_sched-NULL-pointer-dereference-in…
patches.kernel.org/6.6.37-167-Linux-6.6.37.patch
+ patches.kernel.org/6.6.38-001-Revert-bpf-Take-return-from-set_memory_rox-in…
+ patches.kernel.org/6.6.38-002-Revert-powerpc-bpf-use-bpf_jit_binary_pack_-a…
+ patches.kernel.org/6.6.38-003-Revert-powerpc-bpf-rename-powerpc64_jit_data-…
+ patches.kernel.org/6.6.38-004-Revert-bpf-Take-return-from-set_memory_ro-int…
+ patches.kernel.org/6.6.38-005-Linux-6.6.38.patch
########################################################
# Build fixes that apply to the vanilla kernel too.
++++++ source-timestamp ++++++
--- /var/tmp/diff_new_pack.CCNYRC/_old 2024-07-11 20:29:29.964755853 +0200
+++ /var/tmp/diff_new_pack.CCNYRC/_new 2024-07-11 20:29:29.968756001 +0200
@@ -1,4 +1,4 @@
-2024-07-05 09:22:14 +0000
-GIT Revision: e5b4fd2befceafccfb28e9babfc5987d26eeb789
+2024-07-09 11:07:02 +0000
+GIT Revision: 5376cb851cd623dc697af5d0b2a15b2758a0ff9a
GIT Branch: slowroll
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package bdfresize for openSUSE:Factory checked in at 2024-07-11 20:29:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bdfresize (Old)
and /work/SRC/openSUSE:Factory/.bdfresize.new.17339 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bdfresize"
Thu Jul 11 20:29:20 2024 rev:19 rq:1186479 version:1.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/bdfresize/bdfresize.changes 2024-02-23 16:41:15.250473515 +0100
+++ /work/SRC/openSUSE:Factory/.bdfresize.new.17339/bdfresize.changes 2024-07-11 20:29:21.444441446 +0200
@@ -1,0 +2,7 @@
+Mon Jul 8 12:31:34 UTC 2024 - Martin Jambor <mjambor(a)suse.com>
+
+- Added bdfresize-gcc14.patch which adds a missing return type to main
+ function in the configure script so that the configure script works
+ with C99 standard enforcing compilers like GCC 14. [boo#1225772]
+
+-------------------------------------------------------------------
New:
----
bdfresize-gcc14.patch
BETA DEBUG BEGIN:
New:
- Added bdfresize-gcc14.patch which adds a missing return type to main
function in the configure script so that the configure script works
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bdfresize.spec ++++++
--- /var/tmp/diff_new_pack.05ID1a/_old 2024-07-11 20:29:22.588483264 +0200
+++ /var/tmp/diff_new_pack.05ID1a/_new 2024-07-11 20:29:22.592483412 +0200
@@ -1,7 +1,7 @@
#
# spec file for package bdfresize
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -20,12 +20,13 @@
Version: 1.5
Release: 0
Summary: A Tool for Resizing BDF Format Fonts
-License: GPL-2.0+
+License: GPL-2.0-or-later
Group: System/X11/Utilities
-Url: http://openlab.ring.gr.jp/efont/dist/tools/bdfresize/
+URL: http://openlab.ring.gr.jp/efont/dist/tools/bdfresize/
Source0: http://openlab.ring.gr.jp/efont/dist/tools/bdfresize/bdfresize-%{version}.t…
Patch0: bdfresize-gcc4.patch
Patch1: 020_minus-sign.patch
+Patch2: bdfresize-gcc14.patch
%description
bdfresize is a command for magnifying or shrinking fonts described in the
@@ -35,6 +36,7 @@
%setup -q
%patch -P 0
%patch -P 1 -p1
+%patch -P 2 -p1
%build
rm -f config.cache
++++++ bdfresize-gcc14.patch ++++++
Index: bdfresize-1.5/configure
===================================================================
--- bdfresize-1.5.orig/configure
+++ bdfresize-1.5/configure
@@ -904,7 +904,7 @@ cat > conftest.$ac_ext << EOF
#line 905 "configure"
#include "confdefs.h"
-main(){return(0);}
+int main(){return(0);}
EOF
if { (eval echo configure:910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package 000product for openSUSE:Factory checked in at 2024-07-11 05:16:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/000product (Old)
and /work/SRC/openSUSE:Factory/.000product.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "000product"
Thu Jul 11 05:16:00 2024 rev:4073 rq: version:unknown
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ MicroOS-dvd5-dvd-x86_64.kiwi ++++++
--- /var/tmp/diff_new_pack.wlob5v/_old 2024-07-11 05:16:06.075074542 +0200
+++ /var/tmp/diff_new_pack.wlob5v/_new 2024-07-11 05:16:06.079074688 +0200
@@ -1,4 +1,4 @@
-<image name="OBS__MicroOS___20240709" schemaversion="4.1">
+<image name="OBS__MicroOS___20240710" schemaversion="4.1">
<description type="system">
<author>The SUSE Team</author>
<contact>build(a)opensuse.org</contact>
@@ -35,11 +35,11 @@
<productvar name="SEPARATE_MEDIA">true</productvar>
<productvar name="SHA1OPT">-x -2</productvar>
<productvar name="VENDOR">openSUSE</productvar>
- <productvar name="VERSION">20240709</productvar>
+ <productvar name="VERSION">20240710</productvar>
<productinfo name="CONTENTSTYLE">11</productinfo>
- <productinfo name="DISTRO">cpe:/o:opensuse:microos:20240709,openSUSE MicroOS</productinfo>
+ <productinfo name="DISTRO">cpe:/o:opensuse:microos:20240710,openSUSE MicroOS</productinfo>
<productinfo name="LINGUAS">en_US </productinfo>
- <productinfo name="REPOID">obsproduct://build.opensuse.org/openSUSE:Factory/MicroOS/20240709/x86_64</productinfo>
+ <productinfo name="REPOID">obsproduct://build.opensuse.org/openSUSE:Factory/MicroOS/20240710/x86_64</productinfo>
<productinfo name="VENDOR">openSUSE</productinfo>
<productoption name="INI_DIR">/usr/share/kiwi/modules/plugins/tumbleweed</productoption>
<productoption name="PLUGIN_DIR">/usr/share/kiwi/modules/plugins/tumbleweed</productoption>
++++++ openSUSE-Addon-NonOss-ftp-ftp-x86_64.kiwi ++++++
--- /var/tmp/diff_new_pack.wlob5v/_old 2024-07-11 05:16:06.119076156 +0200
+++ /var/tmp/diff_new_pack.wlob5v/_new 2024-07-11 05:16:06.123076302 +0200
@@ -1,4 +1,4 @@
-<image name="OBS__openSUSE-Addon-NonOss___20240709" schemaversion="4.1">
+<image name="OBS__openSUSE-Addon-NonOss___20240710" schemaversion="4.1">
<description type="system">
<author>The SUSE Team</author>
<contact>build(a)opensuse.org</contact>
@@ -35,11 +35,11 @@
<productvar name="SEPARATE_MEDIA">true</productvar>
<productvar name="SHA1OPT">-x -2</productvar>
<productvar name="VENDOR">openSUSE</productvar>
- <productvar name="VERSION">20240709</productvar>
+ <productvar name="VERSION">20240710</productvar>
<productinfo name="CONTENTSTYLE">11</productinfo>
- <productinfo name="DISTRO">cpe:/o:opensuse:opensuse-addon-nonoss:20240709,openSUSE NonOSS Addon</productinfo>
+ <productinfo name="DISTRO">cpe:/o:opensuse:opensuse-addon-nonoss:20240710,openSUSE NonOSS Addon</productinfo>
<productinfo name="LINGUAS">af ar be_BY bg br ca cy el et ga gl gu_IN he hi_IN hr ka km ko lt mk nn pa_IN rw sk sl sr_CS ss st tg th tr uk ve vi xh zu </productinfo>
- <productinfo name="REPOID">obsproduct://build.opensuse.org/openSUSE:Factory/openSUSE-Addon-NonOss/2024…</productinfo>
+ <productinfo name="REPOID">obsproduct://build.opensuse.org/openSUSE:Factory/openSUSE-Addon-NonOss/2024…</productinfo>
<productinfo name="VENDOR">openSUSE</productinfo>
<productoption name="INI_DIR">/usr/share/kiwi/modules/plugins/tumbleweed</productoption>
<productoption name="PLUGIN_DIR">/usr/share/kiwi/modules/plugins/tumbleweed</productoption>
++++++ openSUSE-cd-mini-x86_64.kiwi ++++++
--- /var/tmp/diff_new_pack.wlob5v/_old 2024-07-11 05:16:06.147077182 +0200
+++ /var/tmp/diff_new_pack.wlob5v/_new 2024-07-11 05:16:06.151077329 +0200
@@ -1,4 +1,4 @@
-<image name="OBS__openSUSE___20240709" schemaversion="4.1">
+<image name="OBS__openSUSE___20240710" schemaversion="4.1">
<description type="system">
<author>The SUSE Team</author>
<contact>build(a)opensuse.org</contact>
@@ -35,11 +35,11 @@
<productvar name="SEPARATE_MEDIA">true</productvar>
<productvar name="SHA1OPT">-x -2</productvar>
<productvar name="VENDOR">openSUSE</productvar>
- <productvar name="VERSION">20240709</productvar>
+ <productvar name="VERSION">20240710</productvar>
<productinfo name="CONTENTSTYLE">11</productinfo>
- <productinfo name="DISTRO">cpe:/o:opensuse:opensuse:20240709,openSUSE Tumbleweed</productinfo>
+ <productinfo name="DISTRO">cpe:/o:opensuse:opensuse:20240710,openSUSE Tumbleweed</productinfo>
<productinfo name="LINGUAS">cs da de el en en_GB en_US es fr hu it ja pl pt pt_BR ru zh zh_CN zh_TW </productinfo>
- <productinfo name="REPOID">obsproduct://build.opensuse.org/openSUSE:Factory/openSUSE/20240709/x86_64</productinfo>
+ <productinfo name="REPOID">obsproduct://build.opensuse.org/openSUSE:Factory/openSUSE/20240710/x86_64</productinfo>
<productinfo name="VENDOR">openSUSE</productinfo>
<productoption name="INI_DIR">/usr/share/kiwi/modules/plugins/tumbleweed</productoption>
<productoption name="PLUGIN_DIR">/usr/share/kiwi/modules/plugins/tumbleweed</productoption>
openSUSE-dvd5-dvd-x86_64.kiwi: same change
++++++ openSUSE-ftp-ftp-x86_64.kiwi ++++++
--- /var/tmp/diff_new_pack.wlob5v/_old 2024-07-11 05:16:06.235080410 +0200
+++ /var/tmp/diff_new_pack.wlob5v/_new 2024-07-11 05:16:06.239080556 +0200
@@ -1,4 +1,4 @@
-<image name="OBS__openSUSE___20240709" schemaversion="4.1">
+<image name="OBS__openSUSE___20240710" schemaversion="4.1">
<description type="system">
<author>The SUSE Team</author>
<contact>build(a)opensuse.org</contact>
@@ -23,7 +23,7 @@
<productvar name="DISTNAME">openSUSE</productvar>
<productvar name="FLAVOR">ftp</productvar>
<productvar name="MAKE_LISTINGS">true</productvar>
- <productvar name="MEDIUM_NAME">openSUSE-20240709-x86_64</productvar>
+ <productvar name="MEDIUM_NAME">openSUSE-20240710-x86_64</productvar>
<productvar name="MULTIPLE_MEDIA">true</productvar>
<productvar name="PRODUCT_DIR">/</productvar>
<productvar name="PRODUCT_NAME">$DISTNAME-$FLAVOR</productvar>
@@ -35,11 +35,11 @@
<productvar name="SEPARATE_MEDIA">true</productvar>
<productvar name="SHA1OPT">-x -2</productvar>
<productvar name="VENDOR">openSUSE</productvar>
- <productvar name="VERSION">20240709</productvar>
+ <productvar name="VERSION">20240710</productvar>
<productinfo name="CONTENTSTYLE">11</productinfo>
- <productinfo name="DISTRO">cpe:/o:opensuse:opensuse:20240709,openSUSE Tumbleweed</productinfo>
+ <productinfo name="DISTRO">cpe:/o:opensuse:opensuse:20240710,openSUSE Tumbleweed</productinfo>
<productinfo name="LINGUAS">cs da de el en en_GB en_US es fr hu it ja pl pt pt_BR ru zh zh_CN zh_TW </productinfo>
- <productinfo name="REPOID">obsproduct://build.opensuse.org/openSUSE:Factory/openSUSE/20240709/x86_64</productinfo>
+ <productinfo name="REPOID">obsproduct://build.opensuse.org/openSUSE:Factory/openSUSE/20240710/x86_64</productinfo>
<productinfo name="VENDOR">openSUSE</productinfo>
<productoption name="DEBUGMEDIUM">2</productoption>
<productoption name="INI_DIR">/usr/share/kiwi/modules/plugins/tumbleweed</productoption>
++++++ Aeon.product ++++++
--- /var/tmp/diff_new_pack.wlob5v/_old 2024-07-11 05:16:06.295082610 +0200
+++ /var/tmp/diff_new_pack.wlob5v/_new 2024-07-11 05:16:06.299082757 +0200
@@ -6,7 +6,7 @@
<name>Aeon</name>
<releasepkgname>Aeon-release</releasepkgname>
<endoflife/>
- <version>20240709</version>
+ <version>20240710</version>
<!-- release is no longer optional -->
<release>0</release>
<productline>Aeon</productline>
++++++ Kalpa.product ++++++
--- /var/tmp/diff_new_pack.wlob5v/_old 2024-07-11 05:16:06.323083637 +0200
+++ /var/tmp/diff_new_pack.wlob5v/_new 2024-07-11 05:16:06.331083930 +0200
@@ -6,7 +6,7 @@
<name>Kalpa</name>
<releasepkgname>Kalpa-release</releasepkgname>
<endoflife/>
- <version>20240709</version>
+ <version>20240710</version>
<!-- release is no longer optional -->
<release>0</release>
<productline>Kalpa</productline>
++++++ MicroOS.product ++++++
--- /var/tmp/diff_new_pack.wlob5v/_old 2024-07-11 05:16:06.363085104 +0200
+++ /var/tmp/diff_new_pack.wlob5v/_new 2024-07-11 05:16:06.367085250 +0200
@@ -6,7 +6,7 @@
<name>MicroOS</name>
<releasepkgname>MicroOS-release</releasepkgname>
<endoflife/>
- <version>20240709</version>
+ <version>20240710</version>
<!-- release is no longer optional -->
<release>0</release>
<productline>MicroOS</productline>
++++++ openSUSE-Addon-NonOss.product ++++++
--- /var/tmp/diff_new_pack.wlob5v/_old 2024-07-11 05:16:06.511090532 +0200
+++ /var/tmp/diff_new_pack.wlob5v/_new 2024-07-11 05:16:06.515090678 +0200
@@ -4,7 +4,7 @@
<product>
<vendor>openSUSE</vendor>
<name>openSUSE-Addon-NonOss</name>
- <version>20240709</version>
+ <version>20240710</version>
<release>0</release>
<summary>openSUSE NonOSS Addon</summary>
<shortsummary>non oss addon</shortsummary>
++++++ openSUSE.product ++++++
--- /var/tmp/diff_new_pack.wlob5v/_old 2024-07-11 05:16:06.543091705 +0200
+++ /var/tmp/diff_new_pack.wlob5v/_new 2024-07-11 05:16:06.547091853 +0200
@@ -4,7 +4,7 @@
<product>
<vendor>openSUSE</vendor>
<name>openSUSE</name>
- <version>20240709</version>
+ <version>20240710</version>
<release>0</release>
<productline>openSUSE</productline>
++++++ unsorted.yml ++++++
--- /var/tmp/diff_new_pack.wlob5v/_old 2024-07-11 05:16:06.663096107 +0200
+++ /var/tmp/diff_new_pack.wlob5v/_new 2024-07-11 05:16:06.671096400 +0200
@@ -4044,9 +4044,6 @@
- fcitx5-unikey-qt6
- fcitx5-zhuyin
- fclones
- - fcwnn
- - fcwnn-devel
- - fcwnncom
- fd
- fd-bash-completion
- fd-fish-completion
@@ -4217,8 +4214,6 @@
- five-or-more-doc
- five-or-more-lang
- fixmath-devel
- - fkwnn
- - fkwnn-devel
- flac
- flac-devel
- flac-devel-32bit
@@ -4490,7 +4485,6 @@
- ftstring
- ftvalid
- ftview
- - ftwnn
- ftxui-devel
- fubectl
- fuc
@@ -4520,9 +4514,6 @@
- fwknop
- fwknop-gui
- fwknopd
- - fwnn
- - fwnn-devel
- - fwnncom
- fwts
- fwupd-devel
- fwupd-doc
@@ -12428,7 +12419,6 @@
- libcurses1
- libcvc-devel
- libcvc0
- - libcwnn0
- libcxsparse4
- libcxx-gtk-utils-2-2_2-0
- libcxx-gtk-utils-2-devel
@@ -13849,7 +13839,6 @@
- libjbig2-32bit
- libjbig2dec0
- libjcat-devel
- - libjd0
- libjim0_82
- libjodycode-devel
- libjodycode3
@@ -14013,7 +14002,6 @@
- libksysguard6-devel
- libktoblzcheck1
- libktorrent-devel
- - libkwnn0
- libkyotocabinet-devel
- liblab_gamut1
- liblagraph1
@@ -16762,7 +16750,6 @@
- libwnck-tools
- libwnck2-devel
- libwnck2-lang
- - libwnn0
- libwoff2common1_0_2-32bit
- libwoff2dec1_0_2-32bit
- libwoff2enc1_0_2
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package 000update-repos for openSUSE:Factory checked in at 2024-07-10 21:07:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/000update-repos (Old)
and /work/SRC/openSUSE:Factory/.000update-repos.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "000update-repos"
Wed Jul 10 21:07:04 2024 rev:2538 rq: version:unknown
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
New:
----
factory:non-oss_4072.2.packages.zst
factory_20240709.packages.zst
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package libva-utils for openSUSE:Factory checked in at 2024-07-10 16:57:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libva-utils (Old)
and /work/SRC/openSUSE:Factory/.libva-utils.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libva-utils"
Wed Jul 10 16:57:51 2024 rev:28 rq:1186590 version:2.22.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/libva-utils/libva-utils.changes 2024-01-06 17:30:36.374751971 +0100
+++ /work/SRC/openSUSE:Factory/.libva-utils.new.2080/libva-utils.changes 2024-07-10 16:57:53.702056788 +0200
@@ -1,0 +2,9 @@
+Wed Jul 3 11:32:27 UTC 2024 - Stefan Dirsch <sndirsch(a)suse.com>
+
+- update to 2.22.0
+ * ci: correct the permission of workflows
+ * fix: Fixed possible memory leak in h264encode
+ * doc: Fix meson build options in README
+ * test/CheckEntrypointsForProfile: fix for limited profiles
+
+-------------------------------------------------------------------
Old:
----
libva-utils-2.20.1.tar.gz
New:
----
libva-utils-2.22.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libva-utils.spec ++++++
--- /var/tmp/diff_new_pack.BgOGFG/_old 2024-07-10 16:57:54.150073235 +0200
+++ /var/tmp/diff_new_pack.BgOGFG/_new 2024-07-10 16:57:54.154073382 +0200
@@ -1,7 +1,7 @@
#
# spec file for package libva-utils
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: libva-utils
-Version: 2.20.1
+Version: 2.22.0
Release: 0
Summary: A collection of utilities and examples to exercise VA-API
License: EPL-1.0 AND MIT
++++++ libva-utils-2.20.1.tar.gz -> libva-utils-2.22.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/.github/workflows/freebsd.yml new/libva-utils-2.22.0/.github/workflows/freebsd.yml
--- old/libva-utils-2.20.1/.github/workflows/freebsd.yml 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/.github/workflows/freebsd.yml 2024-06-20 10:05:10.000000000 +0200
@@ -10,34 +10,33 @@
- '.github/workflows/**'
- '!.github/workflows/freebsd.yml'
+permissions: read-all
+
jobs:
freebsd:
- runs-on: macos-12
+ runs-on: ubuntu-latest
steps:
- name: checkout libva
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: intel/libva
path: libva
- name: checkout libva-utils
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
path: libva-utils
- name: test
- uses: vmactions/freebsd-vm@v0
+ uses: vmactions/freebsd-vm@v1
with:
prepare: |
pkg install -y meson pkgconf libdrm libXext libXfixes wayland
pkg install -y -x '^mesa($|-libs)'
run: |
- set PREFIX="$PWD/_install"
- set LIBDIR="$PREFIX/lib"
- setenv PKG_CONFIG_PATH $LIBDIR/pkgconfig:$PREFIX/libdata/pkgconfig
cd libva
- meson --prefix=$PREFIX --libdir=$LIBDIR _build
+ meson setup _build --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
meson compile -C _build
meson install -C _build
cd ../libva-utils
- meson --prefix=$PREFIX --libdir=$LIBDIR _build
+ meson setup _build --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
meson compile -C _build
meson install -C _build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/.github/workflows/ubuntu.yml new/libva-utils-2.22.0/.github/workflows/ubuntu.yml
--- old/libva-utils-2.20.1/.github/workflows/ubuntu.yml 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/.github/workflows/ubuntu.yml 2024-06-20 10:05:10.000000000 +0200
@@ -10,6 +10,8 @@
- '.github/workflows/**'
- '!.github/workflows/ubuntu.yml'
+permissions: read-all
+
jobs:
ubuntu-20-04:
runs-on: ubuntu-20.04
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/.github/workflows/windows.yml new/libva-utils-2.22.0/.github/workflows/windows.yml
--- old/libva-utils-2.20.1/.github/workflows/windows.yml 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/.github/workflows/windows.yml 2024-06-20 10:05:10.000000000 +0200
@@ -12,6 +12,8 @@
- '!.github/workflows/windows.yml'
- '!.github/workflows/EnterDevShell.ps1'
+permissions: read-all
+
jobs:
windows-msvc:
runs-on: windows-2022
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/NEWS new/libva-utils-2.22.0/NEWS
--- old/libva-utils-2.20.1/NEWS 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/NEWS 2024-06-20 10:05:10.000000000 +0200
@@ -1,7 +1,28 @@
-libva-utils NEWS -- summary of changes. 2023-09-14
-Copyright (C) 2009-2023 Intel Corporation
+libva-utils NEWS -- summary of changes. 2024-06-20
+Copyright (C) 2009-2024 Intel Corporation
-Version 2.2020.0 - 14.Sep.2023
+Version 2.22.0 - 20.Jun.2024
+* ci: correct the permission of workflows
+* fix: Fixed possible memory leak in h264encode
+* doc: Fix meson build options in README
+* test/CheckEntrypointsForProfile: fix for limited profiles
+
+Version 2.21.0 - 12.Mar.2024
+* vainfo: Print VAConfigAttribEncMaxTileRows and VAConfigAttribEncMaxTileCols
+* test: Add Prime3 memtype support
+* sample: Add back buffer size options for AV1e
+* sample: simplify cbr/vbr interface and refine codes for AV1e
+* fix: clean some unused variables and functions
+* fix: unify the coding style
+* fix: Fix coverity issues exposed in encode/decode/vpp
+* fix: options in AV1 encode sample
+* fix: fix typo of version in NEWS
+* ci: harden permission for freebsd.yml
+* ci: add workflow permission for all jobs
+* ci: update freebsd vm to the v1 version
+* meson: use meson setup instead of meson options
+
+Version 2.20.0 - 14.Sep.2023
* test: Enable AV1 encode test
Version 2.19.0 - 04.Jul.2023
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/README.md new/libva-utils-2.22.0/README.md
--- old/libva-utils-2.20.1/README.md 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/README.md 2024-06-20 10:05:10.000000000 +0200
@@ -40,7 +40,7 @@
```
mkdir build
cd build
-meson .. or meson .. -Denable-tests
+meson .. or meson .. -Dtests=true
ninja
sudo ninja install
```
@@ -74,4 +74,4 @@
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
...
-```
\ No newline at end of file
+```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/common/va_display_win32.cpp new/libva-utils-2.22.0/common/va_display_win32.cpp
--- old/libva-utils-2.20.1/common/va_display_win32.cpp 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/common/va_display_win32.cpp 2024-06-20 10:05:10.000000000 +0200
@@ -35,7 +35,7 @@
IDXCoreAdapterFactory *factory = nullptr;
IDXCoreAdapterList *adapter_list = nullptr;
IDXCoreAdapter *adapter = nullptr;
- typedef HRESULT(WINAPI *PFN_CREATE_DXCORE_ADAPTER_FACTORY)(REFIID riid, void **ppFactory);
+ typedef HRESULT(WINAPI * PFN_CREATE_DXCORE_ADAPTER_FACTORY)(REFIID riid, void **ppFactory);
PFN_CREATE_DXCORE_ADAPTER_FACTORY DXCoreCreateAdapterFactory;
HRESULT hr = S_OK;
@@ -71,7 +71,7 @@
}
if (!adapter_string) fprintf(stdout, "Available devices for --display win32:\n");
- for (int i=0; i < adapter_list->GetAdapterCount(); i++) {
+ for (int i = 0; i < adapter_list->GetAdapterCount(); i++) {
if (SUCCEEDED(adapter_list->GetAdapter(i, IID_IDXCoreAdapter, (void **)&adapter))) {
size_t desc_size = 0;
if (FAILED(adapter->GetPropertySize(DXCoreAdapterProperty::DriverDescription, &desc_size))) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/configure.ac new/libva-utils-2.22.0/configure.ac
--- old/libva-utils-2.20.1/configure.ac 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/configure.ac 2024-06-20 10:05:10.000000000 +0200
@@ -29,8 +29,8 @@
# - micro version is libva_micro_version
# - pre version is libva_pre_version, usually development version
m4_define([libva_utils_major_version], [2])
-m4_define([libva_utils_minor_version], [20])
-m4_define([libva_utils_micro_version], [1])
+m4_define([libva_utils_minor_version], [22])
+m4_define([libva_utils_micro_version], [0])
m4_define([libva_utils_pre_version], [0])
m4_define([libva_utils_version],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/encode/av1encode.c new/libva-utils-2.22.0/encode/av1encode.c
--- old/libva-utils-2.20.1/encode/av1encode.c 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/encode/av1encode.c 2024-06-20 10:05:10.000000000 +0200
@@ -54,8 +54,6 @@
*
*
* */
-
-
#define BITSTREAM_ALLOCATE_STEPPING 1024 // in byte
struct __bitstream {
@@ -65,7 +63,6 @@
};
typedef struct __bitstream bitstream;
-
static void
bitstream_start(bitstream *bs)
{
@@ -152,7 +149,6 @@
*
*
* */
-
#define PRIMARY_REF_BITS 3
#define PRIMARY_REF_NONE 7
@@ -172,7 +168,6 @@
#define SURFACE_NUM 16 /* 16 surfaces for source YUV */
-
enum {
SINGLE_REFERENCE = 0,
COMPOUND_REFERENCE = 1,
@@ -235,7 +230,6 @@
uint32_t TileSizeBytes;
};
-
struct QuantizationParams
{
uint32_t base_q_idx;
@@ -318,7 +312,6 @@
typedef struct FrameHeader
{
-
uint32_t show_existing_frame;
uint32_t frame_to_show_map_idx;
uint64_t frame_presentation_time;
@@ -481,10 +474,9 @@
uint32_t base_qindex;
int bit_depth;
int target_bitrate;
- int max_bitrate;
+ int vbr_max_bitrate;
int buffer_size;
int initial_buffer_fullness;
-
};
@@ -525,6 +517,7 @@
unsigned long long display_order;
unsigned long long encode_order;
};
+
static struct storage_task_t *storage_task_header = NULL, *storage_task_tail = NULL;
#define SRC_SURFACE_IN_ENCODING 0
#define SRC_SURFACE_IN_STORAGE 1
@@ -534,7 +527,6 @@
static pthread_cond_t encode_cond = PTHREAD_COND_INITIALIZER;
static pthread_t encode_thread;
-static char *coded_fn = NULL;
static FILE *coded_fp = NULL, *srcyuv_fp = NULL, *recyuv_fp = NULL;
static unsigned long long srcyuv_frames = 0;
static int srcyuv_fourcc = VA_FOURCC_IYUV;
@@ -565,7 +557,6 @@
static int len_seq_header;
static int len_pic_header;
-
/*
* Helper function for profiling purposes
*/
@@ -577,22 +568,6 @@
return tv.tv_usec / 1000 + tv.tv_sec * 1000;
}
-static char *fourcc_to_string(int fourcc)
-{
- switch (fourcc) {
- case VA_FOURCC_NV12:
- return "NV12";
- case VA_FOURCC_IYUV:
- return "IYUV";
- case VA_FOURCC_YV12:
- return "YV12";
- case VA_FOURCC_UYVY:
- return "UYVY";
- default:
- return "Unknown";
- }
-}
-
static int string_to_fourcc(char *str)
{
CHECK_NULL(str);
@@ -639,9 +614,6 @@
static void print_help()
{
-
- //./av1encode -n 8 -f 30 --intra_period 4 --ip_period 1 --rcmode CQP --srcyuv ./input.yuv --recyuv ./rec.yuv --fourcc IYUV --level 8 --height 1080 --width 1920 --base_q_idx 128 -o ./out.av1 -t 3360000 -u 210 -d 420 --LDB
-
printf("./av1encode <options>\n");
printf(" -n <frames> -f <frame rate> -o <output>\n");
printf(" --intra_period <number>\n");
@@ -658,15 +630,15 @@
printf(" --normal_mode select VAEntrypointEncSlice as entrypoint\n");
printf(" --low_power_mode select VAEntrypointEncSliceLP as entrypoint\n");
- printf(" sample usage");
- printf("./av1encode -n 8 -f 30 --intra_period 4 --ip_period 1 --rcmode CQP --srcyuv ./input.yuv --recyuv ./rec.yuv --fourcc IYUV --level 8 --height 1080 --width 1920 --base_q_idx 128 -o ./out.av1 -t 3360000 -u 210 -d 420 --LDB --low_power_mode");
-
+ printf(" sample usage:\n");
+ printf("./av1encode -n 8 -f 30 --intra_period 4 --ip_period 1 --rcmode CQP --srcyuv ./input.yuv --recyuv ./rec.yuv --fourcc IYUV --level 8 --width 1920 --height 1080 --base_q_idx 128 -o ./out.av1 --LDB --low_power_mode\n"
+ "./av1encode -n 8 -f 30 --intra_period 4 --ip_period 1 --rcmode CBR --srcyuv ./input.yuv --recyuv ./rec.yuv --fourcc IYUV --level 8 --width 1920 --height 1080 --target_bitrate 3360000 -o ./out.av1 --LDB --low_power_mode\n"
+ "./av1encode -n 8 -f 30 --intra_period 4 --ip_period 1 --rcmode VBR --srcyuv ./input.yuv --recyuv ./rec.yuv --fourcc IYUV --level 8 --width 1920 --height 1080 --vbr_max_bitrate 3360000 -o ./out.av1 --LDB --low_power_mode\n");
}
static void process_cmdline(int argc, char *argv[])
{
-
int c;
const struct option long_opts[] = {
{"help", no_argument, NULL, 0 },
@@ -685,12 +657,13 @@
{"LDB", no_argument, NULL, 13},
{"normal_mode", no_argument, NULL, 14},
{"low_power_mode", no_argument, NULL, 15},
+ {"target_bitrate", required_argument, NULL, 16},
+ {"vbr_max_bitrate", required_argument, NULL, 17},
{NULL, no_argument, NULL, 0 }
-
};
- int long_index;
- while ((c = getopt_long_only(argc, argv, "n:f:o:t:m:u:d:?", long_opts, &long_index)) != EOF)
+ int long_index;
+ while ((c = getopt_long_only(argc, argv, "n:f:o:t:m:u:d:?", long_opts, &long_index)) != EOF)
{
switch (c)
{
@@ -752,10 +725,12 @@
requested_entrypoint = VAEntrypointEncSliceLP;
break;
case 't':
+ case 16:
ips.target_bitrate = atoi(optarg);
break;
case 'm':
- ips.max_bitrate = atoi(optarg);
+ case 17:
+ ips.vbr_max_bitrate = atoi(optarg);
break;
case 'u':
ips.buffer_size = atoi(optarg) * 8000;
@@ -776,14 +751,31 @@
ips.MinBaseQIndex = 1;
ips.bit_depth = 8;
- if(ips.RateControlMethod == VA_RC_CBR) ips.max_bitrate = ips.target_bitrate; //set max = target in CBR case
+ if (ips.frame_rate_extD == 0)
+ {
+ ips.frame_rate_extN = 3000;
+ ips.frame_rate_extD = 100;
+ }
- if(ips.RateControlMethod == VA_RC_VBR) //VBR
+ int default_bitrate = (long long int) ips.height * ips.width * 12 * ips.frame_rate_extN / ips.frame_rate_extD / 50;
+ // For CBR, target bitrate should be set
+ if(ips.RateControlMethod == VA_RC_CBR)
{
- if(ips.max_bitrate == 0)
+ if (ips.target_bitrate == 0)
{
- printf("max bitrate is not provided in VBR mode\n");
- exit(0);
+ ips.target_bitrate = default_bitrate;
+ }
+ }
+ // For VBR, max bitrate should be set
+ else if (ips.RateControlMethod == VA_RC_VBR)
+ {
+ if (ips.target_bitrate == 0 && ips.vbr_max_bitrate == 0)
+ {
+ ips.vbr_max_bitrate = default_bitrate;
+ }
+ else if (ips.vbr_max_bitrate == 0)
+ {
+ ips.vbr_max_bitrate = ips.target_bitrate;
}
}
@@ -874,12 +866,10 @@
printf("frame width: %d \n", ips.width);
printf("base_q_index: %d \n", ips.base_qindex);
printf("target_bitrate: %d bps\n", ips.target_bitrate);
- printf("max_bitrate: %d bps\n", ips.max_bitrate);
+ printf("vbr_max_bitrate: %d bps\n", ips.vbr_max_bitrate);
return 0;
}
-
-
static int init_va(void)
{
va_dpy = va_open_display();
@@ -1096,7 +1086,6 @@
return 0;
}
-
static int release_encode()
{
int i;
@@ -1122,7 +1111,6 @@
return 0;
}
-
/*
* Return displaying order with specified periods and encoding order
* displaying_order: displaying order
@@ -1163,7 +1151,6 @@
static void
fill_pps_header(uint64_t displaying_order)
{
-
fh.show_existing_frame = 0;
fh.frame_to_show_map_idx = 0;
fh.frame_presentation_time = 0;
@@ -1275,10 +1262,8 @@
fh.skipModeFrame[1] = 0;
fh.allow_warped_motion = 0;
fh.reduced_tx_set = 1;
-
}
-
// brief interface with va, render bitstream
static void
va_render_packed_data(bitstream* bs)
@@ -1326,7 +1311,6 @@
vaDestroyBuffer(va_dpy, packed_data_bufid);
packed_data_bufid = VA_INVALID_ID;
}
-
}
static void
@@ -1388,7 +1372,6 @@
bitstream_free(&bs);
}
-
static void
build_sps_buffer(VAEncSequenceParameterBufferAV1* sps)
{
@@ -1400,7 +1383,14 @@
sps->intra_period = ips.intra_period;
sps->ip_period = ips.ip_period;
- sps->bits_per_second = ips.target_bitrate;;
+ if (ips.RateControlMethod == VA_RC_CBR)
+ {
+ sps->bits_per_second = ips.target_bitrate;
+ }
+ else if (ips.RateControlMethod == VA_RC_VBR)
+ {
+ sps->bits_per_second = ips.vbr_max_bitrate;
+ }
sps->order_hint_bits_minus_1 = (uint8_t)(sh.order_hint_bits_minus1);
@@ -1420,10 +1410,8 @@
sps->seq_fields.bits.bit_depth_minus8 = ips.bit_depth - 8;
sps->seq_fields.bits.subsampling_x = 0;
sps->seq_fields.bits.subsampling_y = 0;
-
}
-
static void
render_sequence()
{
@@ -1445,7 +1433,6 @@
vaDestroyBuffer(va_dpy, seq_param_buf_id);
seq_param_buf_id = VA_INVALID_ID;
}
-
}
static void
@@ -1468,8 +1455,19 @@
misc_param->type = VAEncMiscParameterTypeRateControl;
misc_rate_ctrl = (VAEncMiscParameterRateControl *)misc_param->data;
memset(misc_rate_ctrl, 0, sizeof(*misc_rate_ctrl));
- misc_rate_ctrl->bits_per_second = ips.max_bitrate;
- misc_rate_ctrl->target_percentage = (int)(100.0 * (double)ips.target_bitrate / (double)ips.max_bitrate);
+ if (ips.RateControlMethod == VA_RC_CBR)
+ {
+ misc_rate_ctrl->bits_per_second = ips.target_bitrate;
+ }
+ else if (ips.RateControlMethod == VA_RC_VBR)
+ {
+ misc_rate_ctrl->bits_per_second = ips.vbr_max_bitrate;
+ if (ips.target_bitrate != 0)
+ {
+ misc_rate_ctrl->target_percentage = MIN(100, (uint32_t) (100.0 * ips.target_bitrate / ips.vbr_max_bitrate));
+ }
+ }
+
vaUnmapBuffer(va_dpy, rc_param_buf);
render_id = rc_param_buf;
@@ -1484,7 +1482,6 @@
}
}
-
static void
render_hrd_buffer()
{
@@ -1523,7 +1520,6 @@
}
}
-
static void
render_fr_buffer()
{
@@ -1565,12 +1561,13 @@
render_misc_buffer()
{
render_rc_buffer();
- render_hrd_buffer();
+ if (ips.buffer_size != 0 || ips.initial_buffer_fullness != 0)
+ {
+ render_hrd_buffer();
+ }
render_fr_buffer();
}
-
-
static void
render_tile_group()
{
@@ -1590,10 +1587,8 @@
vaDestroyBuffer(va_dpy, tile_param_buf_id);
tile_param_buf_id = VA_INVALID_ID;
}
-
}
-
static void
pack_obu_header(bitstream *bs, int obu_type, uint32_t obu_extension_flag)
{
@@ -1609,8 +1604,6 @@
}
}
-
-
static void
pack_obu_header_size(bitstream *bs,
uint32_t value,
@@ -1685,7 +1678,6 @@
// end of pack frame size info
}
-
static void
pack_seq_data(bitstream *bs)
{
@@ -1804,7 +1796,6 @@
return; //only for B frame, not enable by default
}
-
static void
pack_show_frame(bitstream* bs)
{
@@ -1820,14 +1811,10 @@
put_ui(bs, 0, 1); //error_resilient_mode
}
-
static void
pack_ref_frame_flags(bitstream* bs, uint8_t error_resilient_mode, uint8_t isI)
{
- uint8_t primary_ref_frame = PRIMARY_REF_NONE;
- if(isI || error_resilient_mode)
- primary_ref_frame = PRIMARY_REF_NONE;
- else
+ if(!(isI || error_resilient_mode))
put_ui(bs, 0, 3); //primary_ref_frame
if (!(fh.frame_type == SWITCH_FRAME || (fh.frame_type == KEY_FRAME && fh.show_frame)))
put_ui(bs, fh.refresh_frame_flags, NUM_REF_FRAMES);
@@ -1852,7 +1839,6 @@
put_ui(bs, render_and_frame_size_different, 1);//render_and_frame_size_different
}
-
static void
pack_frame_size(bitstream *bs)
{
@@ -1864,7 +1850,6 @@
}
-
static void
pack_frame_size_with_refs(bitstream* bs)
{
@@ -1911,10 +1896,6 @@
put_ui(bs, 1, 1); //use_ref_frame_mvs
}
-
-
-
-
static void
pack_tile_info(bitstream* bs)
{
@@ -1981,7 +1962,6 @@
}
}
-
static void
pack_loop_filter_params(bitstream* bs)
{
@@ -2027,7 +2007,6 @@
}
}
-
static void
pack_lr_params(bitstream* bs)
{
@@ -2066,7 +2045,6 @@
}
}
-
static void
pack_delta_q_params(bitstream* bs)
{
@@ -2151,18 +2129,15 @@
put_ui(bs, fh.allow_intrabc, 1);
}
-
if (!fh.disable_cdf_update)
put_ui(bs, fh.disable_frame_end_update_cdf, 1); //disable_frame_end_update_cdf
pack_tile_info(bs);
-
//quantization_params
offsets.QIndexBitOffset = bs->bit_offset;
pack_quantization_params(bs);
-
//segmentation_params
offsets.SegmentationBitOffset = bs->bit_offset;
put_ui(bs, 0, 1); //segmentation_enabled
@@ -2210,7 +2185,6 @@
else
pack_frame_header(&tmp);
-
offsets.FrameHdrOBUSizeInBits = tmp.bit_offset;
const uint32_t obu_extension_flag = sh.operating_points_cnt_minus_1 ? 1 : 0;
@@ -2225,7 +2199,6 @@
const uint32_t obu_size_in_bytes = (tmp.bit_offset + 7) / 8;
pack_obu_header_size(bs, obu_size_in_bytes, fh.show_existing_frame? 0: 4);
-
if (!fh.show_existing_frame)
{
// The offset is related to frame or frame header OBU. IVF, sequence, and other headers should not be counted.
@@ -2238,7 +2211,6 @@
offsets.FrameHdrOBUSizeInBits += obuPayloadOffset;
}
-
bitstream_cat(bs, &tmp);
}
@@ -2272,7 +2244,6 @@
// for Low delay B
pps->ref_frame_ctrl_l1.fields.search_idx0 = ips.LDB ? BWDREF_FRAME : INTRA_FRAME;
}
-
}
static void
@@ -2351,8 +2322,6 @@
for(int k = 0;k < 8;k++)
pps->ref_deltas[k] = 0;
-
-
//block-level deltas
pps->mode_control_flags.bits.delta_q_present = fh.delta_q_present;
pps->mode_control_flags.bits.delta_q_res = fh.delta_q_res;
@@ -2430,7 +2399,6 @@
pps->skip_frames_reduced_size = 0;
}
-
static void
render_picture()
{
@@ -2452,7 +2420,6 @@
vaDestroyBuffer(va_dpy, pic_param_buf_id);
pic_param_buf_id = VA_INVALID_ID;
}
-
}
static int upload_source_YUV_once_for_all()
@@ -2588,7 +2555,6 @@
ret = fseek(coded_fp, frame_end, SEEK_SET);
CHECK_CONDITION(ret == 0);
}
-
printf("\n "); /* return back to startpoint */
switch (encode_order % 4) {
@@ -2732,7 +2698,6 @@
pthread_mutex_unlock(&encode_mutex);
}
-
static void * storage_task_thread(void *t)
{
while (1) {
@@ -2826,15 +2791,12 @@
CHECK_VASTATUS(va_status, "vaBeginPicture");
BeginPictureTicks += GetTickCount() - tmp;
-
-
tmp = GetTickCount(); //start of render process
// prepare parameters used for sequence and frame
fill_sps_header();
fill_pps_header(current_frame_display);
-
-
+
// init length of packed headers
len_ivf_header = 0;
len_seq_header = 0;
@@ -2863,14 +2825,14 @@
{
len_seq_header = 0;
}
-
+
if((ips.RateControlMethod == 2 || ips.RateControlMethod == 4) && current_frame_encoding == 0)
{
// misc buffer are not need in CQP case
// only needed in first frame
render_misc_buffer();
}
-
+
render_packedpicture(); //render packed frame header
render_picture(); //render frame PPS buffer
@@ -2897,7 +2859,6 @@
return 0;
}
-
static int calc_PSNR(double *psnr)
{
char *srcyuv_ptr = NULL, *recyuv_ptr = NULL, tmp;
@@ -2990,7 +2951,6 @@
return 0;
}
-
int main(int argc, char **argv)
{
unsigned int start;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/encode/h264encode.c new/libva-utils-2.22.0/encode/h264encode.c
--- old/libva-utils-2.20.1/encode/h264encode.c 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/encode/h264encode.c 2024-06-20 10:05:10.000000000 +0200
@@ -1165,6 +1165,7 @@
/* check the interested configattrib */
if ((attrib[VAConfigAttribRTFormat].value & VA_RT_FORMAT_YUV420) == 0) {
printf("Not find desired YUV420 RT format\n");
+ free(entrypoints);
exit(1);
} else {
config_attrib[config_attrib_num].type = VAConfigAttribRTFormat;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/encode/vp8enc.c new/libva-utils-2.22.0/encode/vp8enc.c
--- old/libva-utils-2.20.1/encode/vp8enc.c 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/encode/vp8enc.c 2024-06-20 10:05:10.000000000 +0200
@@ -677,7 +677,6 @@
{
VAEntrypoint entrypoints[5];
int num_entrypoints;
- int i;
VAConfigAttrib conf_attrib[2];
VASurfaceAttrib surface_attrib;
int major_ver, minor_ver;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/meson.build new/libva-utils-2.22.0/meson.build
--- old/libva-utils-2.20.1/meson.build 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/meson.build 2024-06-20 10:05:10.000000000 +0200
@@ -1,5 +1,5 @@
project('libva-utils', 'c', 'cpp',
- version : '2.20.1',
+ version : '2.22.0',
default_options : [
'warning_level=2',
'c_std=gnu99',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/test/test_data.h new/libva-utils-2.22.0/test/test_data.h
--- old/libva-utils-2.20.1/test/test_data.h 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/test/test_data.h 2024-06-20 10:05:10.000000000 +0200
@@ -274,6 +274,9 @@
VA_SURFACE_ATTRIB_MEM_TYPE_USER_PTR, VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM,
VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME,
VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2,
+#if VA_CHECK_VERSION(1, 21, 0)
+ VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_3,
+#endif
};
static const std::map<VASurfaceAttribType, const BitMasks&>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/test/test_va_api_createbuffer.cpp new/libva-utils-2.22.0/test/test_va_api_createbuffer.cpp
--- old/libva-utils-2.20.1/test/test_va_api_createbuffer.cpp 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/test/test_va_api_createbuffer.cpp 2024-06-20 10:05:10.000000000 +0200
@@ -167,19 +167,19 @@
make_tuple(g_vaH264Profiles, sizeof(VAEncSliceParameterBufferH264)),
make_tuple(g_vaJPEGProfiles, sizeof(VAEncSliceParameterBufferJPEG)),
make_tuple(g_vaHEVCProfiles, sizeof(VAEncSliceParameterBufferHEVC)),
- make_tuple(g_vaAV1Profiles, sizeof(VAEncPictureParameterBufferAV1)),
+ make_tuple(g_vaAV1Profiles, sizeof(VAEncPictureParameterBufferAV1)),
}
},
{
VAEncPackedHeaderParameterBufferType, {
make_tuple(g_vaProfiles, sizeof(VAEncPackedHeaderParameterBuffer)),
- make_tuple(g_vaAV1Profiles, sizeof(VAEncPictureParameterBufferAV1)),
+ make_tuple(g_vaAV1Profiles, sizeof(VAEncPictureParameterBufferAV1)),
}
},
{
VAEncMiscParameterBufferType, {
make_tuple(g_vaProfiles, sizeof(VAEncMiscParameterBuffer)),
- make_tuple(g_vaAV1Profiles, sizeof(VAEncPictureParameterBufferAV1)),
+ make_tuple(g_vaAV1Profiles, sizeof(VAEncPictureParameterBufferAV1)),
}
},
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/test/test_va_api_createsurfaces.cpp new/libva-utils-2.22.0/test/test_va_api_createsurfaces.cpp
--- old/libva-utils-2.20.1/test/test_va_api_createsurfaces.cpp 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/test/test_va_api_createsurfaces.cpp 2024-06-20 10:05:10.000000000 +0200
@@ -88,6 +88,9 @@
const uint32_t drmMemMask = VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM
| VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME
+#if VA_CHECK_VERSION(1, 21, 0)
+ | VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_3
+#endif
| VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2;
// create surfaces for each supported attribute
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/test/test_va_api_query_config.cpp new/libva-utils-2.22.0/test/test_va_api_query_config.cpp
--- old/libva-utils-2.20.1/test/test_va_api_query_config.cpp 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/test/test_va_api_query_config.cpp 2024-06-20 10:05:10.000000000 +0200
@@ -50,6 +50,8 @@
EXPECT_TRUE(numProfiles > 0)
<< numProfiles << " profiles are supported by driver";
+ profiles.resize(numProfiles);
+
const int maxEntrypoints = vaMaxNumEntrypoints(m_vaDisplay);
EXPECT_TRUE(maxEntrypoints > 0)
<< maxEntrypoints << " entrypoints are reported";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/vainfo/vainfo.c new/libva-utils-2.22.0/vainfo/vainfo.c
--- old/libva-utils-2.20.1/vainfo/vainfo.c 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/vainfo/vainfo.c 2024-06-20 10:05:10.000000000 +0200
@@ -283,6 +283,18 @@
printf("%-*sl1=%d\n", 45, "", (attrib_list[VAConfigAttribEncMaxRefFrames].value >> 16) & 0xffff);
}
+ #if VA_CHECK_VERSION(1, 21, 0)
+ if (attrib_list[VAConfigAttribEncMaxTileRows].value & (~VA_ATTRIB_NOT_SUPPORTED)) {
+ printf(" %-39s: %d\n", vaConfigAttribTypeStr(attrib_list[VAConfigAttribEncMaxTileRows].type),
+ attrib_list[VAConfigAttribEncMaxTileRows].value);
+ }
+
+ if (attrib_list[VAConfigAttribEncMaxTileCols].value & (~VA_ATTRIB_NOT_SUPPORTED)) {
+ printf(" %-39s: %d\n", vaConfigAttribTypeStr(attrib_list[VAConfigAttribEncMaxTileCols].type),
+ attrib_list[VAConfigAttribEncMaxTileCols].value);
+ }
+#endif
+
if (attrib_list[VAConfigAttribEncMaxSlices].value & (~VA_ATTRIB_NOT_SUPPORTED)) {
printf(" %-39s: %d\n", vaConfigAttribTypeStr(attrib_list[VAConfigAttribEncMaxSlices].type),
attrib_list[VAConfigAttribEncMaxSlices].value);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/videoprocess/vpp3dlut.cpp new/libva-utils-2.22.0/videoprocess/vpp3dlut.cpp
--- old/libva-utils-2.20.1/videoprocess/vpp3dlut.cpp 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/videoprocess/vpp3dlut.cpp 2024-06-20 10:05:10.000000000 +0200
@@ -1185,7 +1185,6 @@
VAProcPipelineParameterBuffer pipeline_param;
VARectangle surface_region, output_region;
VABufferID pipeline_param_buf_id = VA_INVALID_ID;
- VABufferID filter_param_buf_id = VA_INVALID_ID;
/* Fill pipeline buffer */
surface_region.x = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.20.1/videoprocess/vpphdr_tm.cpp new/libva-utils-2.22.0/videoprocess/vpphdr_tm.cpp
--- old/libva-utils-2.20.1/videoprocess/vpphdr_tm.cpp 2023-12-05 09:51:11.000000000 +0100
+++ new/libva-utils-2.22.0/videoprocess/vpphdr_tm.cpp 2024-06-20 10:05:10.000000000 +0200
@@ -91,7 +91,7 @@
static uint32_t g_out_colour_primaries = 9;
static uint32_t g_out_transfer_characteristic = 16;
-static uint32_t g_tm_type =1;
+static uint32_t g_tm_type = 1;
static int8_t
read_value_string(FILE *fp, const char* field_name, char* value)
@@ -129,7 +129,7 @@
while (*str == ' ')
str++;
- *(str + strlen(str)-1) = '\0';
+ *(str + strlen(str) - 1) = '\0';
strcpy(value, str);
return 0;
@@ -143,8 +143,8 @@
char str[MAX_LEN];
if (read_value_string(fp, field_name, str)) {
- printf("Failed to find integer field: %s", field_name);
- return -1;
+ printf("Failed to find integer field: %s", field_name);
+ return -1;
}
*value = (uint32_t)atoi(str);
@@ -152,20 +152,6 @@
return 0;
}
-static int8_t
-read_value_float(FILE *fp, const char* field_name, float* value)
-{
- char str[MAX_LEN];
- if (read_value_string(fp, field_name, str)) {
- printf("Failed to find float field: %s \n",field_name);
- return -1;
- }
-
- *value = atof(str);
-
- return 0;
-}
-
static VAStatus
create_surface(VASurfaceID * p_surface_id,
uint32_t width, uint32_t height,
@@ -180,15 +166,15 @@
va_status = vaCreateSurfaces(va_dpy,
format,
- width ,
+ width,
height,
p_surface_id,
1,
&surface_attrib,
1);
- printf("create_surface: p_surface_id %d, width %d, height %d, fourCC 0x%x, format 0x%x\n",
- *p_surface_id, width, height, fourCC, format);
+ printf("create_surface: p_surface_id %d, width %d, height %d, fourCC 0x%x, format 0x%x\n",
+ *p_surface_id, width, height, fourCC, format);
return va_status;
}
@@ -213,12 +199,12 @@
in_hdr10_metadata.display_primaries_x[2] = 6550;
in_hdr10_metadata.display_primaries_y[2] = 2300;
in_hdr10_metadata.white_point_x = 15635;
- in_hdr10_metadata.white_point_y = 16450;
+ in_hdr10_metadata.white_point_y = 16450;
hdrtm_param.type = VAProcFilterHighDynamicRangeToneMapping;
hdrtm_param.data.metadata_type = VAProcHighDynamicRangeMetadataHDR10;
- hdrtm_param.data.metadata= &in_hdr10_metadata;
- hdrtm_param.data.metadata_size = sizeof(VAHdrMetaDataHDR10);
+ hdrtm_param.data.metadata = &in_hdr10_metadata;
+ hdrtm_param.data.metadata_size = sizeof(VAHdrMetaDataHDR10);
va_status = vaCreateBuffer(va_dpy, context_id, VAProcFilterParameterBufferType, sizeof(hdrtm_param), 1, (void *)&hdrtm_param, filter_param_buf_id);
@@ -239,8 +225,7 @@
printf("hdrtm_metadata_init g_out_max_content_luminance %d, g_out_pic_average_luminance %d\n", g_out_max_content_luminance, g_out_pic_average_luminance);
// HDR display or SDR display
- switch (tm_type)
- {
+ switch (tm_type) {
case VA_TONE_MAPPING_HDR_TO_HDR:
out_hdr10_metadata.display_primaries_x[0] = 8500;
out_hdr10_metadata.display_primaries_y[0] = 39850;
@@ -274,7 +259,7 @@
static VAStatus
video_frame_process(VASurfaceID in_surface_id,
- VASurfaceID out_surface_id)
+ VASurfaceID out_surface_id)
{
VAStatus va_status;
VAProcPipelineParameterBuffer pipeline_param = {};
@@ -290,10 +275,10 @@
va_status = vaQueryVideoProcFilterCaps(va_dpy, context_id,
VAProcFilterHighDynamicRangeToneMapping,
(void *)hdrtm_caps, &num_hdrtm_caps);
- CHECK_VASTATUS(va_status,"vaQueryVideoProcFilterCaps");
+ CHECK_VASTATUS(va_status, "vaQueryVideoProcFilterCaps");
printf("vaQueryVideoProcFilterCaps num_hdrtm_caps %d\n", num_hdrtm_caps);
for (int i = 0; i < num_hdrtm_caps; ++i) {
- printf("vaQueryVideoProcFilterCaps hdrtm_caps[%d]: metadata type %d, flag %d\n", i, hdrtm_caps[i].metadata_type, hdrtm_caps[i].caps_flag);
+ printf("vaQueryVideoProcFilterCaps hdrtm_caps[%d]: metadata type %d, flag %d\n", i, hdrtm_caps[i].metadata_type, hdrtm_caps[i].caps_flag);
}
hdrtm_filter_init(&filter_param_buf_id, g_tm_type);
@@ -323,8 +308,8 @@
pipeline_param.output_color_standard = VAProcColorStandardExplicit;
pipeline_param.output_color_properties.colour_primaries = g_out_colour_primaries;
pipeline_param.output_color_properties.transfer_characteristics = g_out_transfer_characteristic;
- pipeline_param.output_hdr_metadata = &out_metadata;
-
+ pipeline_param.output_hdr_metadata = &out_metadata;
+
va_status = vaCreateBuffer(va_dpy,
context_id,
VAProcPipelineParameterBufferType,
@@ -349,10 +334,10 @@
CHECK_VASTATUS(va_status, "vaEndPicture");
if (filter_param_buf_id != VA_INVALID_ID)
- vaDestroyBuffer(va_dpy,filter_param_buf_id);
+ vaDestroyBuffer(va_dpy, filter_param_buf_id);
if (pipeline_param_buf_id != VA_INVALID_ID)
- vaDestroyBuffer(va_dpy,pipeline_param_buf_id);
+ vaDestroyBuffer(va_dpy, pipeline_param_buf_id);
return va_status;
}
@@ -397,20 +382,20 @@
VAProfileNone,
VAEntrypointVideoProc,
&attrib,
- 1);
+ 1);
CHECK_VASTATUS(va_status, "vaGetConfigAttributes");
if (!(attrib.value & g_out_format)) {
- printf("RT format %d is not supported by VPP !\n",g_out_format);
+ printf("RT format %d is not supported by VPP !\n", g_out_format);
//assert(0);
}
/* Create surface/config/context for VPP pipeline */
va_status = create_surface(&g_in_surface_id, g_in_pic_width, g_in_pic_height,
- g_in_fourcc, g_in_format);
+ g_in_fourcc, g_in_format);
CHECK_VASTATUS(va_status, "vaCreateSurfaces for input");
va_status = create_surface(&g_out_surface_id, g_out_pic_width, g_out_pic_height,
- g_out_fourcc, g_out_format);
+ g_out_fourcc, g_out_format);
CHECK_VASTATUS(va_status, "vaCreateSurfaces for output");
va_status = vaCreateConfig(va_dpy,
@@ -430,7 +415,7 @@
1,
&context_id);
CHECK_VASTATUS(va_status, "vaCreateContext");
-
+
uint32_t supported_filter_num = VAProcFilterCount;
VAProcFilterType supported_filter_types[VAProcFilterCount];
@@ -441,13 +426,13 @@
CHECK_VASTATUS(va_status, "vaQueryVideoProcFilters");
- for (i = 0; i < supported_filter_num; i++){
+ for (i = 0; i < supported_filter_num; i++) {
if (supported_filter_types[i] == VAProcFilterHighDynamicRangeToneMapping)
break;
}
if (i == supported_filter_num) {
- printf("VPP filter type VAProcFilterHighDynamicRangeToneMapping is not supported by driver !\n");
+ printf("VPP filter type VAProcFilterHighDynamicRangeToneMapping is not supported by driver !\n");
}
return va_status;
}
@@ -471,15 +456,15 @@
uint32_t tfourcc = VA_FOURCC('N', 'V', '1', '2');
uint32_t tformat = VA_RT_FORMAT_YUV420;
- if (!strcmp(str, "YV12")){
+ if (!strcmp(str, "YV12")) {
tfourcc = VA_FOURCC('Y', 'V', '1', '2');
- } else if(!strcmp(str, "I420")){
+ } else if (!strcmp(str, "I420")) {
tfourcc = VA_FOURCC('I', '4', '2', '0');
- } else if(!strcmp(str, "NV12")){
+ } else if (!strcmp(str, "NV12")) {
tfourcc = VA_FOURCC('N', 'V', '1', '2');
- } else if(!strcmp(str, "YUY2") || !strcmp(str, "YUYV")) {
+ } else if (!strcmp(str, "YUY2") || !strcmp(str, "YUYV")) {
tfourcc = VA_FOURCC('Y', 'U', 'Y', '2');
- } else if(!strcmp(str, "UYVY")){
+ } else if (!strcmp(str, "UYVY")) {
tfourcc = VA_FOURCC('U', 'Y', 'V', 'Y');
} else if (!strcmp(str, "P010")) {
tfourcc = VA_FOURCC('P', '0', '1', '0');
@@ -494,14 +479,14 @@
} else if (!strcmp(str, "BGRA")) {
tfourcc = VA_FOURCC_BGRA;
} else if (!strcmp(str, "BGRX")) {
- tfourcc = VA_FOURCC_BGRX;
- } else if (!strcmp(str, "P010")) {
- tfourcc = VA_FOURCC_P010;
+ tfourcc = VA_FOURCC_BGRX;
+ } else if (!strcmp(str, "P010")) {
+ tfourcc = VA_FOURCC_P010;
printf("parse_fourcc_and_format: P010\n");
} else if (!strcmp(str, "A2RGB10")) { //A2R10G10B10
- tfourcc = VA_FOURCC_A2R10G10B10;
+ tfourcc = VA_FOURCC_A2R10G10B10;
printf("parse_fourcc_and_format: ARGB10 format 0x%8x, fourcc 0x%8x\n", tformat, tfourcc);
- } else{
+ } else {
printf("Not supported format: %s! Currently only support following format: %s\n",
str, "YV12, I420, NV12, YUY2(YUYV), UYVY, I010, RGBA, RGBX, BGRA or BGRX");
assert(0);
@@ -525,10 +510,10 @@
int i = 0;
- int frame_size = 0, y_size = 0, u_size = 0;
+ int frame_size = 0, y_size = 0;
- unsigned char *y_src = NULL, *u_src = NULL, *v_src = NULL;
- unsigned char *y_dst = NULL, *u_dst = NULL, *v_dst = NULL;
+ unsigned char *y_src = NULL, *u_src = NULL;
+ unsigned char *y_dst = NULL, *u_dst = NULL;
int bytes_per_pixel = 2;
size_t n_items;
@@ -547,22 +532,19 @@
va_status = vaMapBuffer(va_dpy, va_image.buf, &out_buf);
CHECK_VASTATUS(va_status, "vaMapBuffer");
-
- printf("read_frame_to_surface: va_image.width %d, va_image.height %d, va_image.pitches[0]: %d, va_image.pitches[1] %d, va_image.pitches[2] %d\n",
- va_image.width, va_image.height, va_image.pitches[0], va_image.pitches[1], va_image.pitches[1]);
- switch (va_image.format.fourcc)
- {
+ printf("read_frame_to_surface: va_image.width %d, va_image.height %d, va_image.pitches[0]: %d, va_image.pitches[1] %d, va_image.pitches[2] %d\n",
+ va_image.width, va_image.height, va_image.pitches[0], va_image.pitches[1], va_image.pitches[1]);
+
+ switch (va_image.format.fourcc) {
case VA_FOURCC_P010:
frame_size = va_image.width * va_image.height * bytes_per_pixel * 3 / 2;
y_size = va_image.width * va_image.height * bytes_per_pixel;
- u_size = (va_image.width / 2 * bytes_per_pixel) * (va_image.height >> 1);
src_buffer = (unsigned char*)malloc(frame_size);
assert(src_buffer);
n_items = fread(src_buffer, 1, frame_size, fp);
- if (n_items != frame_size)
- {
+ if (n_items != frame_size) {
printf("read file failed on VA_FOURCC_P010\n");
}
y_src = src_buffer;
@@ -570,7 +552,7 @@
y_dst = (unsigned char*)out_buf + va_image.offsets[0]; // Y plane
u_dst = (unsigned char*)out_buf + va_image.offsets[1]; // U offset for P010
-
+
for (i = 0; i < va_image.height; i++) {
memcpy(y_dst, y_src, va_image.width * 2);
y_dst += va_image.pitches[0];
@@ -592,12 +574,11 @@
src_buffer = (unsigned char*)malloc(frame_size);
assert(src_buffer);
n_items = fread(src_buffer, 1, frame_size, fp);
- if (n_items != frame_size)
- {
+ if (n_items != frame_size) {
printf("read file failed on VA_RT_FORMAT_RGB32_10BPP or VA_FOURCC_RGBA \n");
}
y_src = src_buffer;
- y_dst = (unsigned char*)out_buf + va_image.offsets[0];
+ y_dst = (unsigned char*)out_buf + va_image.offsets[0];
for (i = 0; i < va_image.height; i++) {
memcpy(y_dst, y_src, va_image.width * 4);
@@ -615,8 +596,7 @@
vaUnmapBuffer(va_dpy, va_image.buf);
vaDestroyImage(va_dpy, va_image.image_id);
- if (src_buffer)
- {
+ if (src_buffer) {
free(src_buffer);
src_buffer = NULL;
}
@@ -634,10 +614,10 @@
int i = 0;
- int frame_size = 0, y_size = 0, u_size = 0;
+ int frame_size = 0, y_size = 0;
- unsigned char *y_src = NULL, *u_src = NULL, *v_src = NULL;
- unsigned char *y_dst = NULL, *u_dst = NULL, *v_dst = NULL;
+ unsigned char *y_src = NULL, *u_src = NULL;
+ unsigned char *y_dst = NULL, *u_dst = NULL;
int bytes_per_pixel = 2;
@@ -656,13 +636,12 @@
va_status = vaMapBuffer(va_dpy, va_image.buf, &in_buf);
CHECK_VASTATUS(va_status, "vaMapBuffer");
-
- printf("write_surface_to_frame: va_image.width %d, va_image.height %d, va_image.pitches[0]: %d, va_image.pitches[1] %d, va_image.pitches[2] %d\n",
- va_image.width, va_image.height, va_image.pitches[0], va_image.pitches[1], va_image.pitches[1]);
+
+ printf("write_surface_to_frame: va_image.width %d, va_image.height %d, va_image.pitches[0]: %d, va_image.pitches[1] %d, va_image.pitches[2] %d\n",
+ va_image.width, va_image.height, va_image.pitches[0], va_image.pitches[1], va_image.pitches[1]);
- switch (va_image.format.fourcc)
- {
+ switch (va_image.format.fourcc) {
case VA_FOURCC_P010:
case VA_FOURCC_NV12:
bytes_per_pixel = (va_image.format.fourcc == VA_FOURCC_P010) ? 2 : 1;
@@ -670,11 +649,10 @@
dst_buffer = (unsigned char*)malloc(frame_size);
assert(dst_buffer);
y_size = va_image.width * va_image.height * bytes_per_pixel;
- u_size = (va_image.width / 2 * bytes_per_pixel) * (va_image.height >> 1);
y_dst = dst_buffer;
u_dst = dst_buffer + y_size; // UV offset for P010
y_src = (unsigned char*)in_buf + va_image.offsets[0];
- u_src = (unsigned char*)in_buf + va_image.offsets[1]; // U offset for P010
+ u_src = (unsigned char*)in_buf + va_image.offsets[1]; // U offset for P010
for (i = 0; i < va_image.height; i++) {
memcpy(y_dst, y_src, static_cast<size_t>(va_image.width * bytes_per_pixel));
y_dst += va_image.width * bytes_per_pixel;
@@ -687,7 +665,7 @@
}
printf("read_frame_to_surface: P010 \n");
break;
-
+
case VA_FOURCC_RGBA:
case VA_FOURCC_ABGR:
case VA_FOURCC_A2B10G10R10:
@@ -696,14 +674,14 @@
dst_buffer = (unsigned char*)malloc(frame_size);
assert(dst_buffer);
y_dst = dst_buffer;
- y_src = (unsigned char*)in_buf + va_image.offsets[0];
+ y_src = (unsigned char*)in_buf + va_image.offsets[0];
for (i = 0; i < va_image.height; i++) {
memcpy(y_dst, y_src, va_image.width * 4);
y_dst += va_image.pitches[0];
y_src += va_image.width * 4;
- }
- printf("read_frame_to_surface: RGBA and A2R10G10B10 \n");
+ }
+ printf("read_frame_to_surface: RGBA and A2R10G10B10 \n");
break;
default: // should not come here
@@ -744,7 +722,7 @@
/* Read dst frame file information */
read_value_string(g_config_file_fd, "DST_FILE_NAME", g_dst_file_name);
read_value_uint32(g_config_file_fd, "DST_FRAME_WIDTH", &g_out_pic_width);
- read_value_uint32(g_config_file_fd, "DST_FRAME_HEIGHT",&g_out_pic_height);
+ read_value_uint32(g_config_file_fd, "DST_FRAME_HEIGHT", &g_out_pic_height);
read_value_string(g_config_file_fd, "DST_FRAME_FORMAT", str);
parse_fourcc_and_format(str, &g_out_fourcc, &g_out_format);
@@ -792,7 +770,7 @@
VAStatus va_status;
uint32_t i;
- if (argc != 2 || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")){
+ if (argc != 2 || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")) {
print_help();
return -1;
}
@@ -801,13 +779,13 @@
strncpy(g_config_file_name, argv[1], MAX_LEN);
g_config_file_name[MAX_LEN - 1] = '\0';
- if (NULL == (g_config_file_fd = fopen(g_config_file_name, "r"))){
- printf("Open configure file %s failed!\n",g_config_file_name);
+ if (NULL == (g_config_file_fd = fopen(g_config_file_name, "r"))) {
+ printf("Open configure file %s failed!\n", g_config_file_name);
assert(0);
}
/* Parse basic parameters */
- if (parse_basic_parameters()){
+ if (parse_basic_parameters()) {
printf("Parse parameters in configure file error\n");
assert(0);
}
@@ -819,13 +797,13 @@
}
/* Video frame fetch, process and store */
- if (NULL == (g_src_file_fd = fopen(g_src_file_name, "r"))){
+ if (NULL == (g_src_file_fd = fopen(g_src_file_name, "r"))) {
printf("Open SRC_FILE_NAME: %s failed, please specify it in config file: %s !\n",
- g_src_file_name, g_config_file_name);
+ g_src_file_name, g_config_file_name);
assert(0);
}
- if (NULL == (g_dst_file_fd = fopen(g_dst_file_name, "w"))){
+ if (NULL == (g_dst_file_fd = fopen(g_dst_file_name, "w"))) {
printf("Open DST_FILE_NAME: %s failed, please specify it in config file: %s !\n",
g_dst_file_name, g_config_file_name);
assert(0);
@@ -837,9 +815,9 @@
unsigned int duration = 0;
clock_gettime(CLOCK_MONOTONIC, &Pre_time);
- for (i = 0; i < g_frame_count; i ++){
+ for (i = 0; i < g_frame_count; i ++) {
read_frame_to_surface(g_src_file_fd, g_in_surface_id);
- video_frame_process(g_in_surface_id, g_out_surface_id);
+ video_frame_process(g_in_surface_id, g_out_surface_id);
write_surface_to_frame(g_dst_file_fd, g_out_surface_id);
}
@@ -850,22 +828,22 @@
} else {
duration += (Cur_time.tv_nsec + 1000000000 - Pre_time.tv_nsec) / 1000000 - 1000;
}
- printf("Finish processing, performance: \n" );
- printf("%d frames processed in: %d ms, ave time = %d ms\n",g_frame_count, duration, duration/g_frame_count);
+ printf("Finish processing, performance: \n");
+ printf("%d frames processed in: %d ms, ave time = %d ms\n", g_frame_count, duration, duration / g_frame_count);
if (g_src_file_fd) {
- fclose(g_src_file_fd);
- g_src_file_fd = NULL;
+ fclose(g_src_file_fd);
+ g_src_file_fd = NULL;
}
if (g_dst_file_fd) {
- fclose(g_dst_file_fd);
- g_dst_file_fd = NULL;
+ fclose(g_dst_file_fd);
+ g_dst_file_fd = NULL;
}
if (g_config_file_fd) {
- fclose(g_config_file_fd);
- g_config_file_fd = NULL;
+ fclose(g_config_file_fd);
+ g_config_file_fd = NULL;
}
vpp_context_destroy();
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package xdg-desktop-portal-hyprland for openSUSE:Factory checked in at 2024-07-10 16:49:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xdg-desktop-portal-hyprland (Old)
and /work/SRC/openSUSE:Factory/.xdg-desktop-portal-hyprland.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xdg-desktop-portal-hyprland"
Wed Jul 10 16:49:55 2024 rev:11 rq:1186488 version:1.3.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/xdg-desktop-portal-hyprland/xdg-desktop-portal-hyprland.changes 2024-02-26 19:45:30.662169426 +0100
+++ /work/SRC/openSUSE:Factory/.xdg-desktop-portal-hyprland.new.2080/xdg-desktop-portal-hyprland.changes 2024-07-10 16:50:01.368735675 +0200
@@ -1,0 +2,31 @@
+Wed Jul 10 00:53:52 UTC 2024 - Soc Virnyl Estela <obs(a)uncomfyhalomacro.pl>
+
+- Add ./fix-compilation-with-pw.patch
+
+-------------------------------------------------------------------
+Wed Jul 10 00:26:41 UTC 2024 - Soc Virnyl Estela <obs(a)uncomfyhalomacro.pl>
+
+- Switch from gcc to clang
+
+-------------------------------------------------------------------
+Tue Jul 9 23:42:41 UTC 2024 - Soc Virnyl Estela <obs(a)uncomfyhalomacro.pl>
+
+- Cleanup specfile. Remove subprojects
+
+-------------------------------------------------------------------
+Tue Jul 9 23:39:45 UTC 2024 - Soc Virnyl Estela <obs(a)uncomfyhalomacro.pl>
+
+- Remove fix-systemd-service-file-install-path.patch
+- Add hyprland-protocols as build dependency
+
+-------------------------------------------------------------------
+Tue Jul 9 23:31:42 UTC 2024 - Soc Virnyl Estela <obs(a)uncomfyhalomacro.pl>
+
+- Update to version 1.3.2:
+ * added screencopy:max_fps config option
+ * core: don't critically exit when no HOME env is set
+ * core: avoid using uninitialized ptrs
+ * screencast: remove frame callbacks on stream state change
+ * screencast: fixup timing issues with frame re-scheduling
+
+-------------------------------------------------------------------
Old:
----
fix-systemd-service-file-install-path.patch
xdg-desktop-portal-hyprland-1.3.1.tar.gz
New:
----
fix-compilation-with-pw.patch
xdg-desktop-portal-hyprland-1.3.2.tar.gz
BETA DEBUG BEGIN:
Old:
- Remove fix-systemd-service-file-install-path.patch
- Add hyprland-protocols as build dependency
BETA DEBUG END:
BETA DEBUG BEGIN:
New:
- Add ./fix-compilation-with-pw.patch
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xdg-desktop-portal-hyprland.spec ++++++
--- /var/tmp/diff_new_pack.JOlmmG/_old 2024-07-10 16:50:02.240767695 +0200
+++ /var/tmp/diff_new_pack.JOlmmG/_new 2024-07-10 16:50:02.244767842 +0200
@@ -16,18 +16,24 @@
#
+%global __builder ninja
+
Name: xdg-desktop-portal-hyprland
-Version: 1.3.1
+Version: 1.3.2
Release: 0
Summary: Extended xdg-desktop-portal backend for Hyprland
License: MIT
Group: System/Libraries
URL: https://github.com/hyprwm/xdg-desktop-portal-hyprland
Source0: https://github.com/hyprwm/xdg-desktop-portal-hyprland/archive/refs/tags/v%{…
-Patch1: fix-systemd-service-file-install-path.patch
+Patch1: https://github.com/hyprwm/xdg-desktop-portal-hyprland/commit/c5b30938710d6c…
BuildRequires: cmake
-BuildRequires: gcc-c++
+# Seems some of the C and CXX flags are CLANG specific
+BuildRequires: clang
+BuildRequires: clang-devel
BuildRequires: hyprland-protocols-devel
+BuildRequires: ninja
+BuildRequires: pipewire-devel
BuildRequires: pkgconfig
BuildRequires: qt6-base-devel
BuildRequires: qt6-wayland
@@ -35,12 +41,13 @@
BuildRequires: qt6-waylandclient-devel
BuildRequires: qt6-waylandclient-private-devel
BuildRequires: scdoc >= 1.9.7
+BuildRequires: util-linux
BuildRequires: pkgconfig(gbm) >= 21.3
+BuildRequires: pkgconfig(hyprland-protocols)
BuildRequires: pkgconfig(hyprlang)
BuildRequires: pkgconfig(inih)
BuildRequires: pkgconfig(libdrm) >= 2.4.109
BuildRequires: pkgconfig(libjpeg)
-BuildRequires: pkgconfig(libpipewire-0.3) >= 0.3.62
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(pangocairo)
@@ -49,6 +56,7 @@
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-protocols) >= 1.24
+BuildRequires: pkgconfig(wlroots) >= 0.17.0
# Screencasting won't work without pipewire, but it's not a hard dependency.
Recommends: pipewire >= 0.3.41
@@ -64,9 +72,14 @@
%prep
%autosetup -p1
+pushd subprojects
+rm -rfv hyprland-protocols sdbus-cpp
+popd
%build
-%cmake
+%cmake \
+ -DCMAKE_C_COMPILER="clang" \
+ -DCMAKE_CXX_COMPILER="clang++"
%cmake_build
%install
++++++ fix-compilation-with-pw.patch ++++++
From c5b30938710d6c599f3f5cd99a3ffac35381fb0f Mon Sep 17 00:00:00 2001
From: Vaxry <vaxry(a)vaxry.net>
Date: Tue, 2 Jul 2024 19:45:04 +0200
Subject: [PATCH] core: fix compilation with pw >= 1.1.82
fixes #227
---
src/shared/ScreencopyShared.hpp | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/shared/ScreencopyShared.hpp b/src/shared/ScreencopyShared.hpp
index d626da6..cc077cf 100644
--- a/src/shared/ScreencopyShared.hpp
+++ b/src/shared/ScreencopyShared.hpp
@@ -5,16 +5,12 @@
extern "C" {
#include <spa/pod/builder.h>
-#undef SPA_VERSION_POD_BUILDER_CALLBACKS
-#define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
#include <spa/buffer/meta.h>
#include <spa/utils/result.h>
#include <spa/param/props.h>
#include <spa/param/format-utils.h>
#include <spa/param/video/format-utils.h>
#include <spa/pod/dynamic.h>
-#undef SPA_VERSION_POD_BUILDER_CALLBACKS
-#define SPA_VERSION_POD_BUILDER_CALLBACKS 0
}
#include <wayland-client.h>
++++++ xdg-desktop-portal-hyprland-1.3.1.tar.gz -> xdg-desktop-portal-hyprland-1.3.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/CMakeLists.txt new/xdg-desktop-portal-hyprland-1.3.2/CMakeLists.txt
--- old/xdg-desktop-portal-hyprland-1.3.1/CMakeLists.txt 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/CMakeLists.txt 2024-06-13 11:48:34.000000000 +0200
@@ -9,6 +9,7 @@
)
set(CMAKE_MESSAGE_LOG_LEVEL "STATUS")
+set(SYSTEMD_SERVICES ON CACHE BOOL "Install systemd service file")
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
message(STATUS "Configuring XDPH in Debug with CMake")
@@ -27,12 +28,14 @@
include(GNUInstallDirs)
set(LIBEXECDIR ${CMAKE_INSTALL_FULL_LIBEXECDIR})
configure_file(org.freedesktop.impl.portal.desktop.hyprland.service.in org.freedesktop.impl.portal.desktop.hyprland.service @ONLY)
-configure_file(contrib/systemd/xdg-desktop-portal-hyprland.service.in contrib/systemd/xdg-desktop-portal-hyprland.service @ONLY)
+if(SYSTEMD_SERVICES)
+ configure_file(contrib/systemd/xdg-desktop-portal-hyprland.service.in contrib/systemd/xdg-desktop-portal-hyprland.service @ONLY)
+endif()
set(CMAKE_CXX_STANDARD 23)
add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value
-Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith
- -fpermissive -Wno-address-of-temporary)
+ $<$<COMPILE_LANG_AND_ID:CXX,GNU>:-fpermissive> -Wno-address-of-temporary)
# dependencies
message(STATUS "Checking deps...")
@@ -40,13 +43,13 @@
find_package(Threads REQUIRED)
find_package(PkgConfig REQUIRED)
-pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-client wayland-protocols libpipewire-0.3 libspa-0.2 libdrm gbm hyprlang>=0.2.0)
+pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-client wayland-protocols wayland-scanner libpipewire-0.3 libspa-0.2 libdrm gbm hyprlang>=0.2.0)
# check whether we can find sdbus-c++ through pkg-config
pkg_check_modules(SDBUS IMPORTED_TARGET sdbus-c++)
if(NOT SDBUS_FOUND)
include_directories("subprojects/sdbus-cpp/include/")
- add_subdirectory(subprojects/sdbus-cpp)
+ add_subdirectory(subprojects/sdbus-cpp EXCLUDE_FROM_ALL)
add_library(PkgConfig::SDBUS ALIAS sdbus-c++)
endif()
@@ -63,33 +66,27 @@
target_link_libraries(xdg-desktop-portal-hyprland PRIVATE rt PkgConfig::SDBUS Threads::Threads PkgConfig::deps)
# protocols
-find_program(WaylandScanner NAMES wayland-scanner)
+pkg_get_variable(WaylandScanner wayland-scanner wayland_scanner)
message(STATUS "Found WaylandScanner at ${WaylandScanner}")
-execute_process(
- COMMAND pkg-config --variable=pkgdatadir wayland-protocols
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
- OUTPUT_VARIABLE WAYLAND_PROTOCOLS_DIR
- OUTPUT_STRIP_TRAILING_WHITESPACE)
+pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
message(STATUS "Found wayland-protocols at ${WAYLAND_PROTOCOLS_DIR}")
function(protocol protoPath protoName external)
if (external)
- execute_process(
- COMMAND ${WaylandScanner} client-header ${protoPath} protocols/${protoName}-protocol.h
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
- execute_process(
- COMMAND ${WaylandScanner} private-code ${protoPath} protocols/${protoName}-protocol.c
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
- target_sources(xdg-desktop-portal-hyprland PRIVATE protocols/${protoName}-protocol.c)
+ set(path ${protoPath})
else()
- execute_process(
- COMMAND ${WaylandScanner} client-header ${WAYLAND_PROTOCOLS_DIR}/${protoPath} protocols/${protoName}-protocol.h
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
- execute_process(
- COMMAND ${WaylandScanner} private-code ${WAYLAND_PROTOCOLS_DIR}/${protoPath} protocols/${protoName}-protocol.c
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
- target_sources(xdg-desktop-portal-hyprland PRIVATE protocols/${protoName}-protocol.c)
+ set(path ${WAYLAND_PROTOCOLS_DIR}/${protoPath})
endif()
+ add_custom_command(
+ OUTPUT ${CMAKE_SOURCE_DIR}/protocols/${protoName}-protocol.h
+ COMMAND ${WaylandScanner} client-header ${path} ${CMAKE_SOURCE_DIR}/protocols/${protoName}-protocol.h
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+ add_custom_command(
+ OUTPUT ${CMAKE_SOURCE_DIR}/protocols/${protoName}-protocol.c
+ COMMAND ${WaylandScanner} private-code ${path} ${CMAKE_SOURCE_DIR}/protocols/${protoName}-protocol.c
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+ target_sources(xdg-desktop-portal-hyprland PRIVATE protocols/${protoName}-protocol.h)
+ target_sources(xdg-desktop-portal-hyprland PRIVATE protocols/${protoName}-protocol.c)
endfunction()
protocol("protocols/wlr-foreign-toplevel-management-unstable-v1.xml" "wlr-foreign-toplevel-management-unstable-v1" true)
@@ -104,4 +101,6 @@
install(FILES hyprland.portal DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/xdg-desktop-portal/portals")
install(FILES ${CMAKE_BINARY_DIR}/org.freedesktop.impl.portal.desktop.hyprland.service DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services")
-install(FILES ${CMAKE_BINARY_DIR}/contrib/systemd/xdg-desktop-portal-hyprland.service DESTINATION "${CMAKE_INSTALL_LIBDIR}/systemd/user")
+if(SYSTEMD_SERVICES)
+ install(FILES ${CMAKE_BINARY_DIR}/contrib/systemd/xdg-desktop-portal-hyprland.service DESTINATION "lib/systemd/user")
+endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/README.md new/xdg-desktop-portal-hyprland-1.3.2/README.md
--- old/xdg-desktop-portal-hyprland-1.3.1/README.md 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/README.md 2024-06-13 11:48:34.000000000 +0200
@@ -24,11 +24,12 @@
```sh
git clone --recursive https://github.com/hyprwm/xdg-desktop-portal-hyprland
cd xdg-desktop-portal-hyprland/
-cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -B build
-cmake --install /usr
+cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build
+cmake --build build
+sudo cmake --install build
```
## Running, FAQs, etc.
See
-[the Hyprland wiki](https://wiki.hyprland.org/Useful-Utilities/Hyprland-desktop-portal)
+[the Hyprland wiki](https://wiki.hyprland.org/Useful-Utilities/xdg-desktop-portal-hyprlan…
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/VERSION new/xdg-desktop-portal-hyprland-1.3.2/VERSION
--- old/xdg-desktop-portal-hyprland-1.3.1/VERSION 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/VERSION 2024-06-13 11:48:34.000000000 +0200
@@ -1 +1 @@
-1.3.1
+1.3.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/flake.lock new/xdg-desktop-portal-hyprland-1.3.2/flake.lock
--- old/xdg-desktop-portal-hyprland-1.3.1/flake.lock 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/flake.lock 2024-06-13 11:48:34.000000000 +0200
@@ -25,14 +25,17 @@
},
"hyprlang": {
"inputs": {
- "nixpkgs": "nixpkgs"
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "systems": "systems"
},
"locked": {
- "lastModified": 1704287638,
- "narHash": "sha256-TuRXJGwtK440AXQNl5eiqmQqY4LZ/9+z/R7xC0ie3iA=",
+ "lastModified": 1713121246,
+ "narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=",
"owner": "hyprwm",
"repo": "hyprlang",
- "rev": "6624f2bb66d4d27975766e81f77174adbe58ec97",
+ "rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706",
"type": "github"
},
"original": {
@@ -43,27 +46,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1702645756,
- "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=",
- "owner": "nixos",
- "repo": "nixpkgs",
- "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0",
- "type": "github"
- },
- "original": {
- "owner": "NixOS",
- "ref": "nixos-unstable",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
- "nixpkgs_2": {
- "locked": {
- "lastModified": 1703961334,
- "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
+ "lastModified": 1712963716,
+ "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
+ "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
"type": "github"
},
"original": {
@@ -77,14 +64,29 @@
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
- "nixpkgs": "nixpkgs_2",
- "systems": "systems"
+ "nixpkgs": "nixpkgs",
+ "systems": "systems_2"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
+ "owner": "nix-systems",
+ "repo": "default-linux",
+ "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default-linux",
+ "type": "github"
+ }
+ },
+ "systems_2": {
+ "locked": {
+ "lastModified": 1689347949,
+ "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/flake.nix new/xdg-desktop-portal-hyprland-1.3.2/flake.nix
--- old/xdg-desktop-portal-hyprland-1.3.1/flake.nix 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/flake.nix 2024-06-13 11:48:34.000000000 +0200
@@ -13,7 +13,10 @@
inputs.systems.follows = "systems";
};
- hyprlang.url = "github:hyprwm/hyprlang";
+ hyprlang = {
+ url = "github:hyprwm/hyprlang";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
};
outputs = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/hyprland-share-picker/CMakeLists.txt new/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/CMakeLists.txt
--- old/xdg-desktop-portal-hyprland-1.3.1/hyprland-share-picker/CMakeLists.txt 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/CMakeLists.txt 2024-06-13 11:48:34.000000000 +0200
@@ -2,6 +2,8 @@
project(hyprland-share-picker VERSION 0.1 LANGUAGES CXX)
+set(QT_VERSION_MAJOR 6)
+
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
@@ -9,14 +11,16 @@
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
-find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
-find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
+find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets)
+find_package(Qt6 REQUIRED COMPONENTS Widgets)
set(PROJECT_SOURCES
main.cpp
mainpicker.cpp
mainpicker.h
mainpicker.ui
+ elidedbutton.h
+ elidedbutton.cpp
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/hyprland-share-picker/elidedbutton.cpp new/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/elidedbutton.cpp
--- old/xdg-desktop-portal-hyprland-1.3.1/hyprland-share-picker/elidedbutton.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/elidedbutton.cpp 2024-06-13 11:48:34.000000000 +0200
@@ -0,0 +1,31 @@
+#include "elidedbutton.h"
+
+ElidedButton::ElidedButton(QWidget *parent)
+ : QPushButton(parent)
+{
+}
+
+ElidedButton::ElidedButton( const QString& text, QWidget* parent )
+ : ElidedButton( parent )
+{
+ setText(text);
+}
+
+void ElidedButton::setText(QString text)
+{
+ og_text = text;
+ updateText();
+}
+
+void ElidedButton::resizeEvent(QResizeEvent *event)
+{
+ QPushButton::resizeEvent(event);
+ updateText();
+}
+
+void ElidedButton::updateText()
+{
+ QFontMetrics metrics(font());
+ QString elided = metrics.elidedText(og_text, Qt::ElideRight, width() - 15);
+ QPushButton::setText(elided);
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/hyprland-share-picker/elidedbutton.h new/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/elidedbutton.h
--- old/xdg-desktop-portal-hyprland-1.3.1/hyprland-share-picker/elidedbutton.h 1970-01-01 01:00:00.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/elidedbutton.h 2024-06-13 11:48:34.000000000 +0200
@@ -0,0 +1,21 @@
+#ifndef ELIDEDBUTTON_H
+#define ELIDEDBUTTON_H
+
+#include <QPushButton>
+
+class ElidedButton : public QPushButton
+{
+public:
+ explicit ElidedButton(QWidget *parent = nullptr);
+ explicit ElidedButton(const QString &text, QWidget *parent = nullptr);
+ void setText(QString);
+
+protected:
+ void resizeEvent(QResizeEvent *);
+
+private:
+ void updateText();
+ QString og_text;
+};
+
+#endif // ELIDEDBUTTON_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/hyprland-share-picker/main.cpp new/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/main.cpp
--- old/xdg-desktop-portal-hyprland-1.3.1/hyprland-share-picker/main.cpp 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/main.cpp 2024-06-13 11:48:34.000000000 +0200
@@ -7,6 +7,7 @@
#include <QWidget>
#include <QtDebug>
#include <QtWidgets>
+#include <QSettings>
#include <array>
#include <cstdio>
#include <iostream>
@@ -16,6 +17,7 @@
#include <vector>
#include "mainpicker.h"
+#include "elidedbutton.h"
std::string execAndGet(const char* cmd) {
std::array<char, 128> buffer;
@@ -84,21 +86,24 @@
MainPicker w;
mainPickerPtr = &w;
+ QSettings* settings = new QSettings("/tmp/hypr/hyprland-share-picker.conf", QSettings::IniFormat);
+ w.setGeometry(0, 0, settings->value("width").toInt(), settings->value("height").toInt());
+
// get the tabwidget
- const auto TABWIDGET = (QTabWidget*)w.children()[1]->children()[0];
- const auto ALLOWTOKENBUTTON = (QCheckBox*)w.children()[1]->children()[1];
+ const auto TABWIDGET = w.findChild<QTabWidget *>("tabWidget");
+ const auto ALLOWTOKENBUTTON = w.findChild<QCheckBox *>("checkBox");
const auto TAB1 = (QWidget*)TABWIDGET->children()[0];
const auto SCREENS_SCROLL_AREA_CONTENTS =
(QWidget*)TAB1->findChild<QWidget*>("screens")->findChild<QScrollArea*>("scrollArea")->findChild<QWidget*>("scrollAreaWidgetContents");
+ const auto SCREENS_SCROLL_AREA_CONTENTS_LAYOUT = SCREENS_SCROLL_AREA_CONTENTS->layout();
+
// add all screens
const auto SCREENS = picker.screens();
- constexpr int BUTTON_WIDTH = 441;
constexpr int BUTTON_HEIGHT = 41;
- constexpr int BUTTON_PAD = 4;
for (int i = 0; i < SCREENS.size(); ++i) {
const auto GEOMETRY = SCREENS[i]->geometry();
@@ -106,38 +111,44 @@
QString text = QString::fromStdString(std::string("Screen " + std::to_string(i) + " at " + std::to_string(GEOMETRY.x()) + ", " + std::to_string(GEOMETRY.y()) + " (" +
std::to_string(GEOMETRY.width()) + "x" + std::to_string(GEOMETRY.height()) + ") (") +
SCREENS[i]->name().toStdString() + ")");
- QPushButton* button = new QPushButton(text, (QWidget*)SCREENS_SCROLL_AREA_CONTENTS);
- button->move(9, 5 + (BUTTON_HEIGHT + BUTTON_PAD) * i);
- button->resize(BUTTON_WIDTH, BUTTON_HEIGHT);
- QObject::connect(button, &QPushButton::clicked, [=]() {
- std::string ID = button->text().toStdString();
- ID = ID.substr(ID.find_last_of('(') + 1);
- ID = ID.substr(0, ID.find_last_of(')'));
+ QString outputName = SCREENS[i]->name();
+ ElidedButton* button = new ElidedButton(text);
+ button->setMinimumSize(0, BUTTON_HEIGHT);
+ SCREENS_SCROLL_AREA_CONTENTS_LAYOUT->addWidget(button);
+ QObject::connect(button, &QPushButton::clicked, [=]() {
std::cout << "[SELECTION]";
std::cout << (ALLOWTOKENBUTTON->isChecked() ? "r" : "");
std::cout << "/";
- std::cout << "screen:" << ID << "\n";
+ std::cout << "screen:" << outputName.toStdString() << "\n";
+
+ settings->setValue("width", mainPickerPtr->width());
+ settings->setValue("height", mainPickerPtr->height());
+ settings->sync();
+
pickerPtr->quit();
return 0;
});
}
- SCREENS_SCROLL_AREA_CONTENTS->resize(SCREENS_SCROLL_AREA_CONTENTS->size().width(), 5 + (BUTTON_HEIGHT + BUTTON_PAD) * SCREENS.size());
+ QSpacerItem * SCREENS_SPACER = new QSpacerItem(0,10000, QSizePolicy::Expanding, QSizePolicy::Expanding);
+ SCREENS_SCROLL_AREA_CONTENTS_LAYOUT->addItem(SCREENS_SPACER);
// windows
const auto WINDOWS_SCROLL_AREA_CONTENTS =
(QWidget*)TAB1->findChild<QWidget*>("windows")->findChild<QScrollArea*>("scrollArea_2")->findChild<QWidget*>("scrollAreaWidgetContents_2");
+ const auto WINDOWS_SCROLL_AREA_CONTENTS_LAYOUT = WINDOWS_SCROLL_AREA_CONTENTS->layout();
+
// loop over them
int windowIterator = 0;
for (auto& window : WINDOWLIST) {
QString text = QString::fromStdString(window.clazz + ": " + window.name);
- QPushButton* button = new QPushButton(text, (QWidget*)WINDOWS_SCROLL_AREA_CONTENTS);
- button->move(9, 5 + (BUTTON_HEIGHT + BUTTON_PAD) * windowIterator);
- button->resize(BUTTON_WIDTH, BUTTON_HEIGHT);
+ ElidedButton* button = new ElidedButton(text);
+ button->setMinimumSize(0, BUTTON_HEIGHT);
+ WINDOWS_SCROLL_AREA_CONTENTS_LAYOUT->addWidget(button);
mainPickerPtr->windowIDs[button] = window.id;
@@ -147,6 +158,11 @@
std::cout << "/";
std::cout << "window:" << mainPickerPtr->windowIDs[button] << "\n";
+
+ settings->setValue("width", mainPickerPtr->width());
+ settings->setValue("height", mainPickerPtr->height());
+ settings->sync();
+
pickerPtr->quit();
return 0;
});
@@ -154,16 +170,20 @@
windowIterator++;
}
- WINDOWS_SCROLL_AREA_CONTENTS->resize(WINDOWS_SCROLL_AREA_CONTENTS->size().width(), 5 + (BUTTON_HEIGHT + BUTTON_PAD) * windowIterator);
+ QSpacerItem * WINDOWS_SPACER = new QSpacerItem(0,10000, QSizePolicy::Expanding, QSizePolicy::Expanding);
+ WINDOWS_SCROLL_AREA_CONTENTS_LAYOUT->addItem(WINDOWS_SPACER);
// lastly, region
const auto REGION_OBJECT = (QWidget*)TAB1->findChild<QWidget*>("region");
+ const auto REGION_LAYOUT = REGION_OBJECT->layout();
QString text = "Select region...";
+
+ ElidedButton* button = new ElidedButton(text);
+ button->setMaximumSize(400, BUTTON_HEIGHT);
+ REGION_LAYOUT->addWidget(button);
+
- QPushButton* button = new QPushButton(text, (QWidget*)REGION_OBJECT);
- button->move(79, 80);
- button->resize(321, 41);
QObject::connect(button, &QPushButton::clicked, [=]() {
auto REGION = execAndGet("slurp -f \"%o %x %y %w %h\"");
REGION = REGION.substr(0, REGION.length());
@@ -206,6 +226,11 @@
std::cout << "/";
std::cout << "region:" << SCREEN_NAME << "@" << X - pScreen->geometry().x() << "," << Y - pScreen->geometry().y() << "," << W << "," << H << "\n";
+
+ settings->setValue("width", mainPickerPtr->width());
+ settings->setValue("height", mainPickerPtr->height());
+ settings->sync();
+
pickerPtr->quit();
return 0;
} catch (...) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/hyprland-share-picker/mainpicker.ui new/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/mainpicker.ui
--- old/xdg-desktop-portal-hyprland-1.3.1/hyprland-share-picker/mainpicker.ui 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/hyprland-share-picker/mainpicker.ui 2024-06-13 11:48:34.000000000 +0200
@@ -7,9 +7,15 @@
<x>0</x>
<y>0</y>
<width>500</width>
- <height>290</height>
+ <height>300</height>
</rect>
</property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="minimumSize">
<size>
<width>500</width>
@@ -18,163 +24,258 @@
</property>
<property name="maximumSize">
<size>
- <width>500</width>
- <height>290</height>
+ <width>1280</width>
+ <height>800</height>
</size>
</property>
<property name="windowTitle">
<string>MainPicker</string>
</property>
<widget class="QWidget" name="centralwidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="minimumSize">
<size>
- <width>500</width>
- <height>290</height>
+ <width>0</width>
+ <height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>500</width>
- <height>290</height>
+ <width>1280</width>
+ <height>800</height>
</size>
</property>
- <widget class="QTabWidget" name="tabWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>500</width>
- <height>290</height>
- </rect>
- </property>
- <property name="minimumSize">
- <size>
- <width>500</width>
- <height>290</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>500</width>
- <height>290</height>
- </size>
- </property>
- <property name="toolTip">
- <string/>
- </property>
- <property name="tabPosition">
- <enum>QTabWidget::North</enum>
- </property>
- <property name="currentIndex">
- <number>0</number>
- </property>
- <widget class="QWidget" name="screens">
- <attribute name="title">
- <string>Screen</string>
- </attribute>
- <widget class="QScrollArea" name="scrollArea">
- <property name="geometry">
- <rect>
- <x>9</x>
- <y>9</y>
- <width>461</width>
- <height>201</height>
- </rect>
- </property>
- <property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="widgetResizable">
- <bool>false</bool>
- </property>
- <widget class="QWidget" name="scrollAreaWidgetContents">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>459</width>
- <height>239</height>
- </rect>
- </property>
- <property name="minimumSize">
- <size>
- <width>459</width>
- <height>239</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::WheelFocus</enum>
- </property>
- </widget>
- </widget>
- </widget>
- <widget class="QWidget" name="windows">
- <attribute name="title">
- <string>Window</string>
- </attribute>
- <widget class="QScrollArea" name="scrollArea_2">
- <property name="geometry">
- <rect>
- <x>9</x>
- <y>9</y>
- <width>461</width>
- <height>201</height>
- </rect>
- </property>
- <property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="widgetResizable">
- <bool>false</bool>
- </property>
- <widget class="QWidget" name="scrollAreaWidgetContents_2">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>459</width>
- <height>239</height>
- </rect>
- </property>
- <property name="minimumSize">
- <size>
- <width>459</width>
- <height>239</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::WheelFocus</enum>
- </property>
- </widget>
- </widget>
- </widget>
- <widget class="QWidget" name="region">
- <attribute name="title">
- <string>Region</string>
- </attribute>
- </widget>
- </widget>
- <widget class="QCheckBox" name="checkBox">
- <property name="geometry">
- <rect>
- <x>340</x>
- <y>256</y>
- <width>140</width>
- <height>21</height>
- </rect>
- </property>
- <property name="toolTip">
- <string>By selecting this, the application will be given a restore token that it can use to skip prompting you next time. Only select if you trust the application.</string>
- </property>
- <property name="text">
- <string>Allow a restore token</string>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="tabPosition">
+ <enum>QTabWidget::North</enum>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="screens">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <attribute name="title">
+ <string>Screen</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QScrollArea" name="scrollArea">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="horizontalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="sizeAdjustPolicy">
+ <enum>QAbstractScrollArea::AdjustIgnored</enum>
+ </property>
+ <property name="widgetResizable">
+ <bool>true</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <widget class="QWidget" name="scrollAreaWidgetContents">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>410</width>
+ <height>18</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Ignored" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <layout class="QVBoxLayout" name="screensScrollAreaLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="sizeConstraint">
+ <enum>QLayout::SetDefaultConstraint</enum>
+ </property>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="windows">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <attribute name="title">
+ <string>Window</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <widget class="QScrollArea" name="scrollArea_2">
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="horizontalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="widgetResizable">
+ <bool>true</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <widget class="QWidget" name="scrollAreaWidgetContents_2">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>410</width>
+ <height>18</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Ignored" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <layout class="QVBoxLayout" name="windowsScrollAreaLayout"/>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="region">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <attribute name="title">
+ <string>Region</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetDefaultConstraint</enum>
+ </property>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="checkBox">
+ <property name="focusPolicy">
+ <enum>Qt::ClickFocus</enum>
+ </property>
+ <property name="toolTip">
+ <string>By selecting this, the application will be given a restore token that it can use to skip prompting you next time.
+Only select if you trust the application.</string>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="text">
+ <string>Allow a restore token</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
</widget>
<tabstops>
- <tabstop>scrollArea</tabstop>
- <tabstop>scrollArea_2</tabstop>
<tabstop>tabWidget</tabstop>
</tabstops>
<resources/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/src/core/PortalManager.cpp new/xdg-desktop-portal-hyprland-1.3.2/src/core/PortalManager.cpp
--- old/xdg-desktop-portal-hyprland-1.3.1/src/core/PortalManager.cpp 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/src/core/PortalManager.cpp 2024-06-13 11:48:34.000000000 +0200
@@ -9,7 +9,7 @@
#include <protocols/linux-dmabuf-unstable-v1-protocol.h>
#include <pipewire/pipewire.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
@@ -41,7 +41,8 @@
}
static void handleOutputMode(void* data, struct wl_output* wl_output, uint32_t flags, int32_t width, int32_t height, int32_t refresh) {
- ;
+ const auto POUTPUT = (SOutput*)data;
+ POUTPUT->refreshRate = std::round(refresh / 1000.0);
}
static void handleOutputScale(void* data, struct wl_output* wl_output, int32_t factor) {
@@ -202,16 +203,16 @@
const auto XDG_CONFIG_HOME = getenv("XDG_CONFIG_HOME");
const auto HOME = getenv("HOME");
- if (!HOME && !XDG_CONFIG_HOME) {
- Debug::log(CRIT, "Cannot proceed: neither $HOME nor $XDG_CONFIG_HOME is present in env");
- throw "$HOME and $XDG_CONFIG_HOME both missing from env";
- }
+ if (!HOME && !XDG_CONFIG_HOME)
+ Debug::log(WARN, "neither $HOME nor $XDG_CONFIG_HOME is present in env");
- std::string path = XDG_CONFIG_HOME ? std::string{XDG_CONFIG_HOME} + "/hypr/xdph.conf" : std::string{HOME} + "/.config/hypr/xdph.conf";
+ std::string path =
+ (!XDG_CONFIG_HOME && !HOME) ? "/tmp/xdph.conf" : (XDG_CONFIG_HOME ? std::string{XDG_CONFIG_HOME} + "/hypr/xdph.conf" : std::string{HOME} + "/.config/hypr/xdph.conf");
m_sConfig.config = std::make_unique<Hyprlang::CConfig>(path.c_str(), Hyprlang::SConfigOptions{.allowMissingConfig = true});
- m_sConfig.config->addConfigValue("general:toplevel_dynamic_bind", {0L});
+ m_sConfig.config->addConfigValue("general:toplevel_dynamic_bind", Hyprlang::INT{0L});
+ m_sConfig.config->addConfigValue("screencopy:max_fps", Hyprlang::INT{120L});
m_sConfig.config->commence();
m_sConfig.config->parse();
@@ -421,13 +422,11 @@
while (1) { // dbus events
// wait for being awakened
- m_sEventLoopInternals.loopRequestMutex.unlock(); // unlock, we are ready to take events
-
std::unique_lock lk(m_sEventLoopInternals.loopMutex);
if (m_sEventLoopInternals.shouldProcess == false) // avoid a lock if a thread managed to request something already since we .unlock()ed
- m_sEventLoopInternals.loopSignal.wait(lk, [this] { return m_sEventLoopInternals.shouldProcess == true; }); // wait for events
+ m_sEventLoopInternals.loopSignal.wait_for(lk, std::chrono::seconds(5), [this] { return m_sEventLoopInternals.shouldProcess == true; }); // wait for events
- m_sEventLoopInternals.loopRequestMutex.lock(); // lock incoming events
+ std::lock_guard<std::mutex> lg(m_sEventLoopInternals.loopRequestMutex);
if (m_bTerminate)
break;
@@ -467,7 +466,6 @@
}
}
- // finalize wayland dispatching. Dispatch pending on the queue
int ret = 0;
do {
ret = wl_display_dispatch_pending(m_sWaylandConnection.display);
@@ -485,6 +483,7 @@
m_sPortals.globalShortcuts.reset();
m_sPortals.screencopy.reset();
+ m_sPortals.screenshot.reset();
m_pConnection.reset();
pw_loop_destroy(m_sPipewire.loop);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/src/core/PortalManager.hpp new/xdg-desktop-portal-hyprland-1.3.2/src/core/PortalManager.hpp
--- old/xdg-desktop-portal-hyprland-1.3.1/src/core/PortalManager.hpp 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/src/core/PortalManager.hpp 2024-06-13 11:48:34.000000000 +0200
@@ -19,9 +19,10 @@
struct SOutput {
std::string name;
- wl_output* output = nullptr;
- uint32_t id = 0;
- wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL;
+ wl_output* output = nullptr;
+ uint32_t id = 0;
+ float refreshRate = 60.0;
+ wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL;
};
struct SDMABUFModifier {
@@ -61,8 +62,8 @@
void* linuxDmabuf = nullptr;
void* linuxDmabufFeedback = nullptr;
wl_shm* shm = nullptr;
- gbm_bo* gbm;
- gbm_device* gbmDevice;
+ gbm_bo* gbm = nullptr;
+ gbm_device* gbmDevice = nullptr;
struct {
void* formatTable = nullptr;
size_t formatTableSize = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/src/helpers/MiscFunctions.cpp new/xdg-desktop-portal-hyprland-1.3.2/src/helpers/MiscFunctions.cpp
--- old/xdg-desktop-portal-hyprland-1.3.1/src/helpers/MiscFunctions.cpp 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/src/helpers/MiscFunctions.cpp 2024-06-13 11:48:34.000000000 +0200
@@ -56,7 +56,7 @@
if (nextBegin < pathString.size())
paths.push_back(pathString.substr(nextBegin, pathString.size() - nextBegin));
- return std::ranges::any_of(paths, [&exec](std::string& path) { return std::filesystem::exists(path + "/" + exec); });
+ return std::ranges::any_of(paths, [&exec](std::string& path) { return access((path + "/" + exec).c_str(), X_OK) == 0; });
}
void sendEmptyDbusMethodReply(sdbus::MethodCall& call, u_int32_t responseCode) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/src/portals/Screencopy.cpp new/xdg-desktop-portal-hyprland-1.3.2/src/portals/Screencopy.cpp
--- old/xdg-desktop-portal-hyprland-1.3.1/src/portals/Screencopy.cpp 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/src/portals/Screencopy.cpp 2024-06-13 11:48:34.000000000 +0200
@@ -6,6 +6,7 @@
#include <libdrm/drm_fourcc.h>
#include <pipewire/pipewire.h>
#include <protocols/linux-dmabuf-unstable-v1-protocol.h>
+#include <unistd.h>
// --------------- Wayland Protocol Handlers --------------- //
@@ -487,6 +488,17 @@
if (SHAREDATA.type == TYPE_WINDOW && !m_sState.toplevel) {
Debug::log(ERR, "[screencopy] Requested type window for no toplevel export protocol!");
SHAREDATA.type = TYPE_INVALID;
+ } else if (SHAREDATA.type == TYPE_OUTPUT || SHAREDATA.type == TYPE_GEOMETRY) {
+ const auto POUTPUT = g_pPortalManager->getOutputFromName(SHAREDATA.output);
+
+ if (POUTPUT) {
+ static auto* const* PFPS = (Hyprlang::INT* const*)g_pPortalManager->m_sConfig.config->getConfigValuePtr("screencopy:max_fps")->getDataStaticPtr();
+
+ if (**PFPS <= 0)
+ PSESSION->sharingData.framerate = POUTPUT->refreshRate;
+ else
+ PSESSION->sharingData.framerate = std::clamp(POUTPUT->refreshRate, 1.F, (float)**PFPS);
+ }
}
PSESSION->selection = SHAREDATA;
@@ -669,7 +681,15 @@
if (PSTREAM && !PSTREAM->streamState)
return;
- g_pPortalManager->addTimer({1000.0 / pSession->sharingData.framerate, [pSession]() { g_pPortalManager->m_sPortals.screencopy->startFrameCopy(pSession); }});
+ // calculate frame delta and queue next frame
+ const auto FRAMETOOKMS = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now() - pSession->sharingData.begunFrame).count() / 1000.0;
+ const auto MSTILNEXTREFRESH = 1000.0 / (pSession->sharingData.framerate) - FRAMETOOKMS;
+ pSession->sharingData.begunFrame = std::chrono::system_clock::now();
+
+ Debug::log(TRACE, "[screencopy] set fps {}, frame took {:.2f}ms, ms till next refresh {:.2f}, estimated actual fps: {:.2f}", pSession->sharingData.framerate, FRAMETOOKMS,
+ MSTILNEXTREFRESH, std::clamp(1000.0 / FRAMETOOKMS, 1.0, (double)pSession->sharingData.framerate));
+
+ g_pPortalManager->addTimer({std::clamp(MSTILNEXTREFRESH - 1.0 /* safezone */, 6.0, 1000.0), [pSession]() { g_pPortalManager->m_sPortals.screencopy->startFrameCopy(pSession); }});
}
bool CScreencopyPortal::hasToplevelCapabilities() {
return m_sState.toplevel;
@@ -730,6 +750,20 @@
Debug::log(LOG, "[pipewire] connected");
}
+void CPipewireConnection::removeSessionFrameCallbacks(CScreencopyPortal::SSession* pSession) {
+ Debug::log(TRACE, "[pipewire] removeSessionFrameCallbacks called");
+
+ if (pSession->sharingData.frameCallback)
+ zwlr_screencopy_frame_v1_destroy(pSession->sharingData.frameCallback);
+ if (pSession->sharingData.windowFrameCallback)
+ hyprland_toplevel_export_frame_v1_destroy(pSession->sharingData.windowFrameCallback);
+
+ pSession->sharingData.windowFrameCallback = nullptr;
+ pSession->sharingData.frameCallback = nullptr;
+
+ pSession->sharingData.status = FRAME_NONE;
+}
+
CPipewireConnection::~CPipewireConnection() {
if (m_pCore)
pw_core_disconnect(m_pCore);
@@ -753,20 +787,21 @@
if (PSTREAM->pSession->sharingData.status == FRAME_NONE)
g_pPortalManager->m_sPortals.screencopy->startFrameCopy(PSTREAM->pSession);
else {
- if (PSTREAM->pSession->sharingData.frameCallback)
- zwlr_screencopy_frame_v1_destroy(PSTREAM->pSession->sharingData.frameCallback);
- if (PSTREAM->pSession->sharingData.windowFrameCallback)
- hyprland_toplevel_export_frame_v1_destroy(PSTREAM->pSession->sharingData.windowFrameCallback);
- PSTREAM->pSession->sharingData.windowFrameCallback = nullptr;
- PSTREAM->pSession->sharingData.frameCallback = nullptr;
+ g_pPortalManager->m_sPortals.screencopy->m_pPipewire->removeSessionFrameCallbacks(PSTREAM->pSession);
g_pPortalManager->m_sPortals.screencopy->startFrameCopy(PSTREAM->pSession);
}
break;
- default: PSTREAM->streamState = false; break;
+ default: {
+ PSTREAM->streamState = false;
+ g_pPortalManager->m_sPortals.screencopy->m_pPipewire->removeSessionFrameCallbacks(PSTREAM->pSession);
+ break;
+ }
}
- if (state == PW_STREAM_STATE_UNCONNECTED)
+ if (state == PW_STREAM_STATE_UNCONNECTED) {
+ g_pPortalManager->m_sPortals.screencopy->m_pPipewire->removeSessionFrameCallbacks(PSTREAM->pSession);
g_pPortalManager->m_sPortals.screencopy->m_pPipewire->destroyStream(PSTREAM->pSession);
+ }
}
static void pwStreamParamChanged(void* data, uint32_t id, const spa_pod* param) {
@@ -788,6 +823,7 @@
spa_pod_dynamic_builder_init(&dynBuilder[2], params_buffer[2], sizeof(params_buffer[2]), 2048);
spa_format_video_raw_parse(param, &PSTREAM->pwVideoInfo);
+ Debug::log(TRACE, "[pw] Framerate: {}/{}", PSTREAM->pwVideoInfo.max_framerate.num, PSTREAM->pwVideoInfo.max_framerate.denom);
PSTREAM->pSession->sharingData.framerate = PSTREAM->pwVideoInfo.max_framerate.num / PSTREAM->pwVideoInfo.max_framerate.denom;
uint32_t data_type = 1 << SPA_DATA_MemFd;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.1/src/portals/Screencopy.hpp new/xdg-desktop-portal-hyprland-1.3.2/src/portals/Screencopy.hpp
--- old/xdg-desktop-portal-hyprland-1.3.1/src/portals/Screencopy.hpp 2024-01-05 15:58:42.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.2/src/portals/Screencopy.hpp 2024-06-13 11:48:34.000000000 +0200
@@ -6,23 +6,21 @@
#include "../shared/ScreencopyShared.hpp"
#include <gbm.h>
#include "../shared/Session.hpp"
+#include <chrono>
-enum cursorModes
-{
+enum cursorModes {
HIDDEN = 1,
EMBEDDED = 2,
METADATA = 4,
};
-enum sourceTypes
-{
+enum sourceTypes {
MONITOR = 1,
WINDOW = 2,
VIRTUAL = 4,
};
-enum frameStatus
-{
+enum frameStatus {
FRAME_NONE = 0,
FRAME_QUEUED,
FRAME_READY,
@@ -72,16 +70,17 @@
SSelectionData selection;
struct {
- bool active = false;
- zwlr_screencopy_frame_v1* frameCallback = nullptr;
- hyprland_toplevel_export_frame_v1* windowFrameCallback = nullptr;
- frameStatus status = FRAME_NONE;
- uint64_t tvSec = 0;
- uint32_t tvNsec = 0;
- uint64_t tvTimestampNs = 0;
- uint32_t nodeID = 0;
- uint32_t framerate = 60;
- wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL;
+ bool active = false;
+ zwlr_screencopy_frame_v1* frameCallback = nullptr;
+ hyprland_toplevel_export_frame_v1* windowFrameCallback = nullptr;
+ frameStatus status = FRAME_NONE;
+ uint64_t tvSec = 0;
+ uint32_t tvNsec = 0;
+ uint64_t tvTimestampNs = 0;
+ uint32_t nodeID = 0;
+ uint32_t framerate = 60;
+ wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL;
+ std::chrono::system_clock::time_point begunFrame = std::chrono::system_clock::now();
struct {
uint32_t w = 0, h = 0, size = 0, stride = 0, fmt = 0;
@@ -152,6 +151,7 @@
std::unique_ptr<SBuffer> createBuffer(SPWStream* pStream, bool dmabuf);
SPWStream* streamFromSession(CScreencopyPortal::SSession* pSession);
+ void removeSessionFrameCallbacks(CScreencopyPortal::SSession* pSession);
uint32_t buildFormatsFor(spa_pod_builder* b[2], const spa_pod* params[2], SPWStream* stream);
void updateStreamParam(SPWStream* pStream);
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package hyprland-protocols for openSUSE:Factory checked in at 2024-07-10 16:49:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hyprland-protocols (Old)
and /work/SRC/openSUSE:Factory/.hyprland-protocols.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hyprland-protocols"
Wed Jul 10 16:49:53 2024 rev:2 rq:1186485 version:0.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/hyprland-protocols/hyprland-protocols.changes 2024-02-26 19:45:28.138078177 +0100
+++ /work/SRC/openSUSE:Factory/.hyprland-protocols.new.2080/hyprland-protocols.changes 2024-07-10 16:49:59.896681624 +0200
@@ -1,0 +2,6 @@
+Tue Jul 9 23:38:23 UTC 2024 - Soc Virnyl Estela <obs(a)uncomfyhalomacro.pl>
+
+- Update to version 0.3.0:
+ * Add hyprland_focus_grab_v1
+
+-------------------------------------------------------------------
Old:
----
hyprland-protocols-0.2.tar.gz
New:
----
hyprland-protocols-0.3.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hyprland-protocols.spec ++++++
--- /var/tmp/diff_new_pack.3TZSxG/_old 2024-07-10 16:50:00.852716728 +0200
+++ /var/tmp/diff_new_pack.3TZSxG/_new 2024-07-10 16:50:00.856716875 +0200
@@ -20,9 +20,9 @@
Summary: Wayland extension protocol for Hyprland
Group: Development/Libraries/Other
License: BSD-3-Clause
-Version: 0.2
+Version: 0.3.0
Release: 0
-Url: https://github.com/hyprwm/hyprland-protocols
+URL: https://github.com/hyprwm/hyprland-protocols
Source0: https://github.com/hyprwm/hyprland-protocols/archive/refs/tags/v%{version}.…
BuildRequires: meson
BuildRequires: pkgconfig
++++++ hyprland-protocols-0.2.tar.gz -> hyprland-protocols-0.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hyprland-protocols-0.2/README.md new/hyprland-protocols-0.3.0/README.md
--- old/hyprland-protocols-0.2/README.md 2023-04-09 20:41:37.000000000 +0200
+++ new/hyprland-protocols-0.3.0/README.md 2024-06-18 23:31:54.000000000 +0200
@@ -7,10 +7,8 @@
# Finished protocols
- `hyprland_toplevel_export` -> for exporting toplevel buffers (aka. windows) for screensharing
-
-# Planned protocols
- `hyprland_global_keybindings` -> for managing global keybinds via D-Bus.
-- `hyprland_window_management` -> for custom window managers / layouts.
+- `hyprland_focus_grab` -> for grabbing input focus, primarily for complex context menus.
# Contributing
Adding new protocols is *discouraged*. If the protocol has a good reason to be, and you have an impl ready, feel free to make a PR.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hyprland-protocols-0.2/flake.lock new/hyprland-protocols-0.3.0/flake.lock
--- old/hyprland-protocols-0.2/flake.lock 2023-04-09 20:41:37.000000000 +0200
+++ new/hyprland-protocols-0.3.0/flake.lock 2024-06-18 23:31:54.000000000 +0200
@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
- "lastModified": 1669969257,
- "narHash": "sha256-mOS13sK3v+kfgP+1Mh56ohiG8uVhLHAo7m/q9kqAehc=",
+ "lastModified": 1683014792,
+ "narHash": "sha256-6Va9iVtmmsw4raBc3QKvQT2KT/NGRWlvUlJj46zN8B8=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "b72b8b94cf0c012b0252a9100a636cad69696666",
+ "rev": "1a411f23ba299db155a5b45d5e145b85a7aafc42",
"type": "github"
},
"original": {
@@ -18,7 +18,23 @@
},
"root": {
"inputs": {
- "nixpkgs": "nixpkgs"
+ "nixpkgs": "nixpkgs",
+ "systems": "systems"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1689347949,
+ "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
+ "owner": "nix-systems",
+ "repo": "default-linux",
+ "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default-linux",
+ "type": "github"
}
}
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hyprland-protocols-0.2/flake.nix new/hyprland-protocols-0.3.0/flake.nix
--- old/hyprland-protocols-0.2/flake.nix 2023-04-09 20:41:37.000000000 +0200
+++ new/hyprland-protocols-0.3.0/flake.nix 2024-06-18 23:31:54.000000000 +0200
@@ -1,19 +1,25 @@
{
description = "Hyprland Protocols";
- inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+ # <https://github.com/nix-systems/nix-systems>
+ systems.url = "github:nix-systems/default-linux";
+ };
outputs = {
self,
nixpkgs,
+ systems,
...
}: let
inherit (nixpkgs) lib;
- genSystems = lib.genAttrs [
- "aarch64-linux"
- "x86_64-linux"
- ];
- pkgsFor = nixpkgs.legacyPackages;
+ eachSystem = lib.genAttrs (import systems);
+ pkgsFor = eachSystem (system:
+ import nixpkgs {
+ localSystem = system;
+ overlays = [self.overlays.hyprland-protocols];
+ });
mkDate = longDate: (lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
@@ -21,14 +27,18 @@
]);
version = "0.1" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
in {
- overlays.default = _: prev: {
- hyprland-protocols = prev.callPackage ./nix/default.nix {inherit version;};
+ overlays = {
+ hyprland-protocols = final: prev: {
+ hyprland-protocols = final.callPackage ./nix/default.nix {inherit version;};
+ };
+ default = self.overlays.hyprland-protocols;
};
- packages = genSystems (system:
- (self.overlays.default null pkgsFor.${system})
- // {default = self.packages.${system}.hyprland-protocols;});
+ packages = eachSystem (system: {
+ inherit (pkgsFor.${system}) hyprland-protocols;
+ default = self.packages.${system}.hyprland-protocols;
+ });
- formatter = genSystems (system: pkgsFor.${system}.alejandra);
+ formatter = eachSystem (system: nixpkgs.legacyPackages.${system}.alejandra);
};
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hyprland-protocols-0.2/meson.build new/hyprland-protocols-0.3.0/meson.build
--- old/hyprland-protocols-0.2/meson.build 2023-04-09 20:41:37.000000000 +0200
+++ new/hyprland-protocols-0.3.0/meson.build 2024-06-18 23:31:54.000000000 +0200
@@ -1,5 +1,5 @@
project('hyprland-protocols',
- version: '0.2',
+ version: '0.3.0',
meson_version: '>= 0.55.0',
)
@@ -9,7 +9,8 @@
protocols = {
'hyprland-toplevel-export': ['v1'],
- 'hyprland-global-shortcuts': ['v1']
+ 'hyprland-global-shortcuts': ['v1'],
+ 'hyprland-focus-grab': ['v1'],
}
protocol_files = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hyprland-protocols-0.2/protocols/hyprland-focus-grab-v1.xml new/hyprland-protocols-0.3.0/protocols/hyprland-focus-grab-v1.xml
--- old/hyprland-protocols-0.2/protocols/hyprland-focus-grab-v1.xml 1970-01-01 01:00:00.000000000 +0100
+++ new/hyprland-protocols-0.3.0/protocols/hyprland-focus-grab-v1.xml 2024-06-18 23:31:54.000000000 +0200
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="hyprland_focus_grab_v1">
+ <copyright>
+ Copyright © 2024 outfoxxed
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ </copyright>
+
+ <description summary="limit input focus to a set of surfaces">
+ This protocol allows clients to limit input focus to a specific set
+ of surfaces and receive a notification when the limiter is removed as
+ detailed below.
+ </description>
+
+ <interface name="hyprland_focus_grab_manager_v1" version="1">
+ <description summary="manager for focus grab objects">
+ This interface allows a client to create surface grab objects.
+ </description>
+
+ <request name="create_grab">
+ <description summary="create a focus grab object">
+ Create a surface grab object.
+ </description>
+
+ <arg name="grab" type="new_id" interface="hyprland_focus_grab_v1"/>
+ </request>
+
+ <request name="destroy" type="destructor">
+ <description summary="destroy the focus grab manager">
+ Destroy the focus grab manager.
+ This doesn't destroy existing focus grab objects.
+ </description>
+ </request>
+ </interface>
+
+ <interface name="hyprland_focus_grab_v1" version="1">
+ <description summary="input focus limiter">
+ This interface restricts input focus to a specified whitelist of
+ surfaces as long as the focus grab object exists and has at least
+ one comitted surface.
+
+ Mouse and touch events inside a whitelisted surface will be passed
+ to the surface normally, while events outside of a whitelisted surface
+ will clear the grab object. Keyboard events will be passed to the client
+ and a compositor-picked surface in the whitelist will receive a
+ wl_keyboard::enter event if a whitelisted surface is not already entered.
+
+ Upon meeting implementation-defined criteria usually meaning a mouse or
+ touch input outside of any whitelisted surfaces, the compositor will
+ clear the whitelist, rendering the grab inert and sending the cleared
+ event. The same will happen if another focus grab or similar action
+ is started at the compositor's discretion.
+ </description>
+
+ <request name="add_surface">
+ <description summary="add a surface to the focus whitelist">
+ Add a surface to the whitelist. Destroying the surface is treated the
+ same as an explicit call to remove_surface and duplicate additions are
+ ignored.
+
+ Does not take effect until commit is called.
+ </description>
+
+ <arg name="surface" type="object" interface="wl_surface"/>
+ </request>
+
+ <request name="remove_surface">
+ <description summary="remove a surface from the focus whitelist">
+ Remove a surface from the whitelist. Destroying the surface is treated
+ the same as an explicit call to this function.
+
+ If the grab was active and the removed surface was entered by the
+ keyboard, another surface will be entered on commit.
+
+ Does not take effect until commit is called.
+ </description>
+
+ <arg name="surface" type="object" interface="wl_surface"/>
+ </request>
+
+ <request name="commit">
+ <description summary="commit the focus whitelist">
+ Commit pending changes to the surface whitelist.
+
+ If the list previously had no entries and now has at least one, the grab
+ will start. If it previously had entries and now has none, the grab will
+ become inert.
+ </description>
+ </request>
+
+ <request name="destroy" type="destructor">
+ <description summary="destroy the focus grab">
+ Destroy the grab object and remove the grab if active.
+ </description>
+ </request>
+
+ <event name="cleared">
+ <description summary="the focus grab was cleared">
+ Sent when an active grab is cancelled by the compositor,
+ regardless of cause.
+ </description>
+ </event>
+ </interface>
+</protocol>
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package byte-buddy for openSUSE:Factory checked in at 2024-07-10 16:49:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/byte-buddy (Old)
and /work/SRC/openSUSE:Factory/.byte-buddy.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "byte-buddy"
Wed Jul 10 16:49:50 2024 rev:4 rq:1186467 version:1.14.18
Changes:
--------
--- /work/SRC/openSUSE:Factory/byte-buddy/byte-buddy.changes 2024-05-23 15:36:07.457496780 +0200
+++ /work/SRC/openSUSE:Factory/.byte-buddy.new.2080/byte-buddy.changes 2024-07-10 16:49:55.876534011 +0200
@@ -1,0 +2,21 @@
+Mon Jul 8 21:30:57 UTC 2024 - Anton Shvetz <shvetz.anton(a)gmail.com>
+
+- Update to v1.14.18
+ * Changes of v1.14.18
+ + Avoid verification error if constructor advice meats dropped
+ implicit this frame and throw exception during
+ instrumentation instead.
+ + Add support to resolve ByteBuddyAgent from non-obfuscated
+ name if obfuscation is used.
+ + Make sure CircularityLock implementations never load classes
+ during locking.
+ + Offer use of istat if stat command is not available for
+ emulated attachment.
+ + Avoid locking entire class loader when child-first class
+ loader loads shadowed class and parallel class loading is
+ supported.
+ * Changes of v1.14.17
+ + Avoid crashing of Android plugin when there are duplicate
+ files for licenses or license notices.
+
+-------------------------------------------------------------------
Old:
----
byte-buddy-1.14.16.tar.gz
New:
----
byte-buddy-1.14.18.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ byte-buddy.spec ++++++
--- /var/tmp/diff_new_pack.4ytUau/_old 2024-07-10 16:49:56.532558099 +0200
+++ /var/tmp/diff_new_pack.4ytUau/_new 2024-07-10 16:49:56.536558246 +0200
@@ -17,7 +17,7 @@
Name: byte-buddy
-Version: 1.14.16
+Version: 1.14.18
Release: 0
Summary: Runtime code generation for the Java virtual machine
License: Apache-2.0
++++++ byte-buddy-1.14.16.tar.gz -> byte-buddy-1.14.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/.github/workflows/main.yml new/byte-buddy-byte-buddy-1.14.18/.github/workflows/main.yml
--- old/byte-buddy-byte-buddy-1.14.16/.github/workflows/main.yml 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/.github/workflows/main.yml 2024-07-08 21:04:14.000000000 +0200
@@ -127,23 +127,26 @@
runs-on: ubuntu-20.04
if: github.event_name == 'push'
steps:
- - uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # V2.7.0
+ - uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # V2.8.1
with:
egress-policy: block
disable-telemetry: true
allowed-endpoints: >
- github.com:443
- raw.githubusercontent.com:443
- artifactcache.actions.githubusercontent.com:443
- blob.core.windows.net:443
- repo.maven.apache.org:443
coveralls.io:443
- javadoc.io:443
- docs.oracle.com:443
+ dl.google.com:443
docs.gradle.org:443
+ docs.oracle.com:443
+ github.com:443
+ javadoc.io:443
+ jcenter.bintray.com:443
+ objects.githubusercontent.com:443
+ plugins-artifacts.gradle.org:443
plugins.gradle.org:443
+ raw.githubusercontent.com:443
+ repo.gradle.org:443
+ repo.maven.apache.org:443
+ repository.sonatype.org:443
services.gradle.org:443
- downloads.gradle-dn.com:443
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0
with:
@@ -161,7 +164,7 @@
permissions:
contents: write
steps:
- - uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # V2.7.0
+ - uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # V2.8.1
with:
egress-policy: audit # servers have changed, must be adjusted after next release
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
@@ -175,4 +178,4 @@
run: |
git config user.name "${{ github.event.head_commit.committer.name }}"
git config user.email "${{ github.event.head_commit.committer.email }}"
- ./mvnw -B -s .mvn/release.settings.xml release:prepare release:perform -Drepository.url=https://${{ github.actor }}:${{ secrets.github_token }}(a)github.com/${{ github.repository }}.git -Dcentral.username=raphw -Dcentral.password=${{ secrets.central_password }} -Dgpg.passphrase=${{ secrets.gpg_passphrase }} -Dgpg.keyname=B4AC8CDC141AF0AE468D16921DA784CCB5C46DD5 -Dgradle.key=${{ secrets.gradle_key }} -Dgradle.secret=${{ secrets.gradle_secret }} -Pchecksum-enforce
+ ./mvnw -B -s .mvn/release.settings.xml release:prepare release:perform -Drepository.url=https://${{ github.actor }}:${{ secrets.github_token }}(a)github.com/${{ github.repository }}.git -Dcentral.username=${{ secrets.central_user }} -Dcentral.password=${{ secrets.central_password }} -Dgpg.passphrase=${{ secrets.gpg_passphrase }} -Dgpg.keyname=B4AC8CDC141AF0AE468D16921DA784CCB5C46DD5 -Dgradle.key=${{ secrets.gradle_key }} -Dgradle.secret=${{ secrets.gradle_secret }} -Pchecksum-enforce
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/.mvn/checksums.sha256 new/byte-buddy-byte-buddy-1.14.18/.mvn/checksums.sha256
--- old/byte-buddy-byte-buddy-1.14.16/.mvn/checksums.sha256 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/.mvn/checksums.sha256 2024-07-08 21:04:14.000000000 +0200
@@ -633,6 +633,8 @@
net.bytebuddy:byte-buddy-agent:jar:1.14.13 bad2d9413f72cc7106597fdbdfa875b0f88b9781451671b6f69c8b6bb81b4040
net.bytebuddy:byte-buddy-agent:jar:1.14.14 1f2aad82c986925790e391f5f709b276e54690c241694cf8329c18d75de0cfce
net.bytebuddy:byte-buddy-agent:jar:1.14.15 3ef6ec7175801361170067cc6902969f966d37c72bf9353d9cd282263b184064
+net.bytebuddy:byte-buddy-agent:jar:1.14.16 bfe45768a5b75c076e49f036c96c10c32cb4062313189476cc26ff5f4f5a1384
+net.bytebuddy:byte-buddy-agent:jar:1.14.17 461ec3017f1445b0af42d4e5f08eb6f5032fa4039ad737f3fcc4b2a12a38f984
net.bytebuddy:byte-buddy-agent:jar:1.14.2 f428c7417b4cf7031d88f1f63d876811cea3b015803017ba9e06ce2acdd5a1e7
net.bytebuddy:byte-buddy-agent:jar:1.14.3 3b362963597f11e28ad55bd405ddfe56dd3ae73850cdd2de70b28ef6e9520bf1
net.bytebuddy:byte-buddy-agent:jar:1.14.4 fbd1ab3db43c6c78b8804908cb95b656517f5c82e7fde8d255d8bdceef412d70
@@ -655,6 +657,8 @@
net.bytebuddy:byte-buddy-android:jar:1.14.13 8a300455c03fddc51063b6f0a008a7e2a3b403e683bb8e9e8f9d6c3a5822add6
net.bytebuddy:byte-buddy-android:jar:1.14.14 8d4680bf55d2d9b3bad39ebb7e176a445543f35e1b9e311d241c56bdd0c7ebc6
net.bytebuddy:byte-buddy-android:jar:1.14.15 5a1e273bcf36fd5d67f8a1932ec07c2f1e00ec2ebf52d40f6beed142f0b6b162
+net.bytebuddy:byte-buddy-android:jar:1.14.16 02b567daf21a8d35651660b9480f1ba0f1a9c7d3aa9da1c6b68b45a644ffab14
+net.bytebuddy:byte-buddy-android:jar:1.14.17 9a457e8f33ec9858e5674545f3c6569554ab1e6043875cef83945644e8cfa9fb
net.bytebuddy:byte-buddy-android:jar:1.14.2 96821d15b3c14adc5443a2ac95ab349d66f833c1bc23689d5a47382a50b00520
net.bytebuddy:byte-buddy-android:jar:1.14.3 97d9b94b433682be1309b2954819d7f4303961aba8ed6e20b088f51a769009ef
net.bytebuddy:byte-buddy-android:jar:1.14.4 d93dec5cd2a80ff953e4fda26308d0b99e2465262e7956dd7b3003a16a5b04a0
@@ -677,6 +681,8 @@
net.bytebuddy:byte-buddy-dep:jar:1.14.13 190c4526aadb0ac0d6ffffe6d2a79ce52f7c1a04dd0e33743c36f229f7472d31
net.bytebuddy:byte-buddy-dep:jar:1.14.14 d1baaa62405c8122edb1dac87b0a5fff174a28696086c41006be461a424b4550
net.bytebuddy:byte-buddy-dep:jar:1.14.15 c63138c81c7f2cb5cb05685e3aa8410670535c6cf93c2c6159ff933134b30119
+net.bytebuddy:byte-buddy-dep:jar:1.14.16 6d5560dc661907ad580443ec2e6534e68217302ea5cfb5c0a51338dfb5d1be2a
+net.bytebuddy:byte-buddy-dep:jar:1.14.17 6704f42bf2d8dd3b70b138ad15cf24a32e079bf5d161620f7e739440694a9e22
net.bytebuddy:byte-buddy-dep:jar:1.14.2 d6723d41a4be755c875c18e21554b04ac062a1460105154763800df1ae01c096
net.bytebuddy:byte-buddy-dep:jar:1.14.3 ac4dcc6dbee75b8c10af7ce2a9d4e050a6849fb5442dadc73d8b90c782f9cb80
net.bytebuddy:byte-buddy-dep:jar:1.14.4 7905516fb7c112ba424c26e84b3989ccaec71115914d6c46d09e385a4bf410e1
@@ -699,6 +705,8 @@
net.bytebuddy:byte-buddy-maven-plugin:jar:1.14.13 52acf5078cb1995be6bbe1b44b018b954ee5a66e97ce0220d6ec717f3b695d77
net.bytebuddy:byte-buddy-maven-plugin:jar:1.14.14 c9e9fd7612d44075b0b462371107b63ca381487995eeaca5140f4a264c1f8d91
net.bytebuddy:byte-buddy-maven-plugin:jar:1.14.15 d00fa2e048f90b7a858ba5e18d74c956706650c6a7e8784dd456196c028ee829
+net.bytebuddy:byte-buddy-maven-plugin:jar:1.14.16 1f51eace023f6733d89d4cc8540a8fe058cd6abaf4ffeb11f0fd345d9dd5a856
+net.bytebuddy:byte-buddy-maven-plugin:jar:1.14.17 a6c7e53017eda36736dc7d83dcfb481fb0587224b9abea940c452bdc13def287
net.bytebuddy:byte-buddy-maven-plugin:jar:1.14.2 f5d2be6baf531ebbde91274181504fcb92ff07d0a2c21c55dcc7ff6a87cbc790
net.bytebuddy:byte-buddy-maven-plugin:jar:1.14.3 3d52c7d65b9fdac180f90612c377a39fc9b81e1d48f02aced9fbdcdfeda57659
net.bytebuddy:byte-buddy-maven-plugin:jar:1.14.4 acdae6ef4609d3fbe7de4dfa8a5fe39a23386056ab67c16ead74e71519ddf477
@@ -718,6 +726,8 @@
net.bytebuddy:byte-buddy-maven-plugin:pom:1.14.13 890bf7a55eedadd224afc7af6f826329da463ac463e009f82b7f170306dc68a7
net.bytebuddy:byte-buddy-maven-plugin:pom:1.14.14 e0d984cb1b151694c376626054cc2c05253fef5d730263c5944378c9da2a257d
net.bytebuddy:byte-buddy-maven-plugin:pom:1.14.15 7cd1b22ae360c79fd4417eb93d6a8541f26ca015588403df2dc0becd6c09b353
+net.bytebuddy:byte-buddy-maven-plugin:pom:1.14.16 bdf1d2ea5ffd620a1fa070822e4f8d5bd04ec47d97508a5f2b550b587eb1c5d8
+net.bytebuddy:byte-buddy-maven-plugin:pom:1.14.17 534cc0b4ae12a3dfc91bfec4f7d5765875433ced287582b755af2a268d64e04b
net.bytebuddy:byte-buddy-maven-plugin:pom:1.14.2 d8b553fee46eba6a96de2d9b4bea1efc23fa13e33c9e935b0db492935e447f4c
net.bytebuddy:byte-buddy-maven-plugin:pom:1.14.3 8ddbd06f4a027c86e16d3d5e9e685d5980be893c5f3991ebbda600c6e260fa1e
net.bytebuddy:byte-buddy-maven-plugin:pom:1.14.4 e02f1c97f27accbd3ee14ebe7559a448e75fd42e311eacde8a2f0bbf14cc41ac
@@ -737,6 +747,8 @@
net.bytebuddy:byte-buddy-parent:pom:1.14.13 df77856d724a0b3d97f616e4a5a8b9d3ea997545b13a42dae494ff9f0a5eb1ac
net.bytebuddy:byte-buddy-parent:pom:1.14.14 c722ebe40e964f2b5d59c326cf701f275b2d81bdafdc80ccf8862d5e612b2e7f
net.bytebuddy:byte-buddy-parent:pom:1.14.15 26eaef08651ffa58ba290092ce3281782e29c0628a1b79fa5a3784f908b418ac
+net.bytebuddy:byte-buddy-parent:pom:1.14.16 c1da5e400c7465c8823fbe6cc2dd4d518f51191c6630637e439f463ba699530c
+net.bytebuddy:byte-buddy-parent:pom:1.14.17 06e57b5e99fdf4ef368affd23661790b23bf32d2d013bbc08d68d4345006f582
net.bytebuddy:byte-buddy-parent:pom:1.14.2 6db003ef2b312e8c30e67cf5a7f39d8be1eaa3bac99e79d715c03d02c520f587
net.bytebuddy:byte-buddy-parent:pom:1.14.3 18d87a7371f2d5d7bf9473124e51ed8a9ae1ad86ed1085cc151c8266deb519d2
net.bytebuddy:byte-buddy-parent:pom:1.14.4 ac4f0167ff070f263acad009f8a289dc92e34ff1090e90e5bd8a2046cf5bc38c
@@ -756,6 +768,8 @@
net.bytebuddy:byte-buddy:jar:1.14.13 ba8254ff6d612af49acee4cac1108453ce3a417efa548b24f2f4f268cd2b441a
net.bytebuddy:byte-buddy:jar:1.14.14 e28fbba2a91ed5ad0a19aa196ae906344842d31ce662741c8a11c55ba97f2a26
net.bytebuddy:byte-buddy:jar:1.14.15 7472e3961992c12a9fd4f6d67c21de4280abe18f292704dd49d7338289f8acf5
+net.bytebuddy:byte-buddy:jar:1.14.16 5add6c7b294b2b2ac60c9a4b54f924cd65e4f10ccfed75d2a99d621d6c5f0a8d
+net.bytebuddy:byte-buddy:jar:1.14.17 cde8f8f8e07bff3694aace0d9944ba755665a583b05d9153d41062285e9a8a61
net.bytebuddy:byte-buddy:jar:1.14.2 042e6b26e1f3fdd1e6244e9dcb381065b15d230ecd93838691dcc03918c9d525
net.bytebuddy:byte-buddy:jar:1.14.3 1db7ee74714ed852a2bd23c33d066e8a4f6031411cbd0ce75daa58b7670894ad
net.bytebuddy:byte-buddy:jar:1.14.4 7ae2b39ac230be9e3e09ce020406c017ff8ceba06eaf078c62a88c218a0ff2b4
@@ -775,6 +789,8 @@
net.bytebuddy:byte-buddy:pom:1.14.13 95d5e57845e787a2a0739aec15cc7146fd616cab0ac824a02bee0e9e5ac67730
net.bytebuddy:byte-buddy:pom:1.14.14 efe26a33ce44ee27b49b76835746e2b26b5918b6cf9b490a5206ecfd278780c0
net.bytebuddy:byte-buddy:pom:1.14.15 d5639f8fe27cead33e6a4c789fad8e65f328f62bb79dad2bdd7ae6cc93b9454c
+net.bytebuddy:byte-buddy:pom:1.14.16 808749924730dd83438518fa240b046d71c938cd2a0acaa7affbbd94cdfa8361
+net.bytebuddy:byte-buddy:pom:1.14.17 edb2c2591e1805ea117d9a23615586cc6321d250e892a9d344dc09d5a22bd13e
net.bytebuddy:byte-buddy:pom:1.14.2 c18ad7b621b3910528c7a9038d74e7e33fe79aca88e7f2b58bb853eabb6b33ff
net.bytebuddy:byte-buddy:pom:1.14.3 50e1c99fcf83f3131f32aed4225ee8ff56e40496ffed4daf946b24e50873481d
net.bytebuddy:byte-buddy:pom:1.14.4 d79615b646178d735ae2ca1f7400fdc6138aeb2cfd5f81427c8f1035cdea4bc4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy/pom.xml new/byte-buddy-byte-buddy-1.14.18/byte-buddy/pom.xml
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy/pom.xml 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy/pom.xml 2024-07-08 21:04:14.000000000 +0200
@@ -5,7 +5,7 @@
<parent>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-parent</artifactId>
- <version>1.14.16</version>
+ <version>1.14.18</version>
</parent>
<artifactId>byte-buddy</artifactId>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/pom.xml new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/pom.xml
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/pom.xml 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/pom.xml 2024-07-08 21:04:14.000000000 +0200
@@ -5,7 +5,7 @@
<parent>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-parent</artifactId>
- <version>1.14.16</version>
+ <version>1.14.18</version>
</parent>
<artifactId>byte-buddy-agent</artifactId>
@@ -69,7 +69,7 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.15</version>
+ <version>1.14.17</version>
<scope>test</scope>
</dependency>
</dependencies>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/src/main/java/net/bytebuddy/agent/ByteBuddyAgent.java new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/src/main/java/net/bytebuddy/agent/ByteBuddyAgent.java
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/src/main/java/net/bytebuddy/agent/ByteBuddyAgent.java 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/src/main/java/net/bytebuddy/agent/ByteBuddyAgent.java 2024-07-08 21:04:14.000000000 +0200
@@ -91,21 +91,6 @@
private static final String MANIFEST_VERSION_VALUE = "1.0";
/**
- * The size of the buffer for copying the agent installer file into another jar.
- */
- private static final int BUFFER_SIZE = 1024 * 8;
-
- /**
- * Convenience indices for reading and writing to the buffer to make the code more readable.
- */
- private static final int START_INDEX = 0, END_OF_FILE = -1;
-
- /**
- * The status code expected as a result of a successful attachment.
- */
- private static final int SUCCESSFUL_ATTACH = 0;
-
- /**
* Representation of the bootstrap {@link java.lang.ClassLoader}.
*/
@AlwaysNull
@@ -153,28 +138,11 @@
private static final String OS_NAME = "os.name";
/**
- * The name of the method for reading the installer's instrumentation.
- */
- private static final String INSTRUMENTATION_METHOD = "getInstrumentation";
-
- /**
* Represents the {@code file} URL protocol.
*/
private static final String FILE_PROTOCOL = "file";
/**
- * An indicator variable to express that no instrumentation is available.
- */
- @AlwaysNull
- private static final Instrumentation UNAVAILABLE = null;
-
- /**
- * Represents a failed attempt to self-resolve a jar file location.
- */
- @AlwaysNull
- private static final File CANNOT_SELF_RESOLVE = null;
-
- /**
* The attachment type evaluator to be used for determining if an attachment requires an external process.
*/
private static final AttachmentTypeEvaluator ATTACHMENT_TYPE_EVALUATOR = doPrivileged(AttachmentTypeEvaluator.InstallationAction.INSTANCE);
@@ -672,10 +640,10 @@
JarOutputStream jarOutputStream = new JarOutputStream(new FileOutputStream(attachmentJar));
try {
jarOutputStream.putNextEntry(new JarEntry(Attacher.class.getName().replace('.', '/') + CLASS_FILE_EXTENSION));
- byte[] buffer = new byte[BUFFER_SIZE];
+ byte[] buffer = new byte[1024 * 8];
int index;
- while ((index = inputStream.read(buffer)) != END_OF_FILE) {
- jarOutputStream.write(buffer, START_INDEX, index);
+ while ((index = inputStream.read(buffer)) != -1) {
+ jarOutputStream.write(buffer, 0, index);
}
jarOutputStream.closeEntry();
} finally {
@@ -702,7 +670,7 @@
processId,
agent.getAbsolutePath(),
Boolean.toString(isNative),
- argument == null ? "" : (AGENT_ARGUMENT_SEPARATOR + argument)).start().waitFor() != SUCCESSFUL_ATTACH) {
+ argument == null ? "" : (AGENT_ARGUMENT_SEPARATOR + argument)).start().waitFor() != 0) {
throw new IllegalStateException("Could not self-attach to current VM using external process - set a property "
+ Attacher.DUMP_PROPERTY
+ " to dump the process output to a file at the specified location");
@@ -726,31 +694,31 @@
private static File trySelfResolve() {
try {
if (Boolean.getBoolean(LATENT_RESOLVE)) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
ProtectionDomain protectionDomain = Attacher.class.getProtectionDomain();
if (protectionDomain == null) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
CodeSource codeSource = protectionDomain.getCodeSource();
if (codeSource == null) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
URL location = codeSource.getLocation();
if (!location.getProtocol().equals(FILE_PROTOCOL)) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
try {
File file = new File(location.toURI());
if (file.getPath().contains(AGENT_ARGUMENT_SEPARATOR)) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
return file;
} catch (URISyntaxException ignored) {
return new File(location.getPath());
}
} catch (Exception ignored) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
}
@@ -761,10 +729,28 @@
* @return The Byte Buddy agent's {@link java.lang.instrument.Instrumentation} instance.
*/
@MaybeNull
- @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback.")
private static Instrumentation doGetInstrumentation() {
+ if (!Installer.NAME.equals(Installer.class.getName())) {
+ Instrumentation instrumentation = doGetInstrumentation(Installer.NAME);
+ if (instrumentation != null) {
+ return instrumentation;
+ }
+ }
+ return doGetInstrumentation(Installer.class.getName());
+ }
+
+ /**
+ * Performs the actual lookup of the {@link java.lang.instrument.Instrumentation} from an installed
+ * Byte Buddy agent and returns the instance, or returns {@code null} if not present.
+ *
+ * @param name The name of the {@link Installer} class which might be shaded.
+ * @return The Byte Buddy agent's {@link java.lang.instrument.Instrumentation} instance.
+ */
+ @MaybeNull
+ @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback.")
+ private static Instrumentation doGetInstrumentation(String name) {
try {
- Class<?> installer = Class.forName(Installer.class.getName(), true, ClassLoader.getSystemClassLoader());
+ Class<?> installer = Class.forName(name, true, ClassLoader.getSystemClassLoader());
try {
Class<?> module = Class.forName("java.lang.Module");
Method getModule = Class.class.getMethod("getModule");
@@ -775,11 +761,11 @@
} catch (ClassNotFoundException ignored) {
/* empty */
}
- return (Instrumentation) Class.forName(Installer.class.getName(), true, ClassLoader.getSystemClassLoader())
- .getMethod(INSTRUMENTATION_METHOD)
+ return (Instrumentation) Class.forName(name, true, ClassLoader.getSystemClassLoader())
+ .getMethod("getInstrumentation")
.invoke(null);
} catch (Exception ignored) {
- return UNAVAILABLE;
+ return null;
}
}
@@ -1447,25 +1433,26 @@
* to avoid the creation of a temporary jar file which can remain undeleted on Windows operating systems where the agent
* is linked by a class loader such that {@link File#deleteOnExit()} does not have an effect.
*
+ * @param installer The installer class to attempt to resolve which might be a shaded version of the class.
* @return This jar file's location or {@code null} if this jar file's location is inaccessible.
* @throws IOException If an I/O exception occurs.
*/
@MaybeNull
- private static File trySelfResolve() throws IOException {
- ProtectionDomain protectionDomain = Installer.class.getProtectionDomain();
+ private static File trySelfResolve(Class<?> installer) throws IOException {
+ ProtectionDomain protectionDomain = installer.getProtectionDomain();
if (Boolean.getBoolean(LATENT_RESOLVE)) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
if (protectionDomain == null) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
CodeSource codeSource = protectionDomain.getCodeSource();
if (codeSource == null) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
URL location = codeSource.getLocation();
if (!location.getProtocol().equals(FILE_PROTOCOL)) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
File agentJar;
try {
@@ -1474,26 +1461,26 @@
agentJar = new File(location.getPath());
}
if (!agentJar.isFile() || !agentJar.canRead()) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
// It is necessary to check the manifest of the containing file as this code can be shaded into another artifact.
JarInputStream jarInputStream = new JarInputStream(new FileInputStream(agentJar));
try {
Manifest manifest = jarInputStream.getManifest();
if (manifest == null) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
Attributes attributes = manifest.getMainAttributes();
if (attributes == null) {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
- if (Installer.class.getName().equals(attributes.getValue(AGENT_CLASS_PROPERTY))
+ if (installer.getName().equals(attributes.getValue(AGENT_CLASS_PROPERTY))
&& Boolean.parseBoolean(attributes.getValue(CAN_REDEFINE_CLASSES_PROPERTY))
&& Boolean.parseBoolean(attributes.getValue(CAN_RETRANSFORM_CLASSES_PROPERTY))
&& Boolean.parseBoolean(attributes.getValue(CAN_SET_NATIVE_METHOD_PREFIX))) {
return agentJar;
} else {
- return CANNOT_SELF_RESOLVE;
+ return null;
}
} finally {
jarInputStream.close();
@@ -1523,10 +1510,10 @@
JarOutputStream jarOutputStream = new JarOutputStream(new FileOutputStream(agentJar), manifest);
try {
jarOutputStream.putNextEntry(new JarEntry(Installer.class.getName().replace('.', '/') + CLASS_FILE_EXTENSION));
- byte[] buffer = new byte[BUFFER_SIZE];
+ byte[] buffer = new byte[1024 * 8];
int index;
- while ((index = inputStream.read(buffer)) != END_OF_FILE) {
- jarOutputStream.write(buffer, START_INDEX, index);
+ while ((index = inputStream.read(buffer)) != -1) {
+ jarOutputStream.write(buffer, 0, index);
}
jarOutputStream.closeEntry();
} finally {
@@ -1541,13 +1528,27 @@
/**
* {@inheritDoc}
*/
+ @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback.")
public File resolve() throws IOException {
try {
- File resolved = trySelfResolve();
+ if (!Installer.class.getName().equals(Installer.NAME)) {
+ try {
+ File resolved = trySelfResolve(Class.forName(Installer.NAME,
+ false,
+ ClassLoader.getSystemClassLoader()));
+ if (resolved != null) {
+ return resolved;
+ }
+ } catch (ClassNotFoundException ignored) {
+ /* do nothing */
+ }
+ }
+ File resolved = trySelfResolve(Installer.class);
if (resolved != null) {
return resolved;
}
} catch (Exception ignored) {
+ /* do nothing */
}
return createJarFile();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/src/main/java/net/bytebuddy/agent/Installer.java new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/src/main/java/net/bytebuddy/agent/Installer.java
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/src/main/java/net/bytebuddy/agent/Installer.java 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/src/main/java/net/bytebuddy/agent/Installer.java 2024-07-08 21:04:14.000000000 +0200
@@ -15,6 +15,7 @@
*/
package net.bytebuddy.agent;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import net.bytebuddy.agent.utility.nullability.MaybeNull;
import java.lang.instrument.Instrumentation;
@@ -27,6 +28,11 @@
public class Installer {
/**
+ * The name of the {@link Installer} class that is stored in an obfuscated format which will not be relocated.
+ */
+ protected static final String NAME = new StringBuilder("rellatsnI.tnega.yddubetyb.ten").reverse().toString();
+
+ /**
* A field for carrying the {@link java.lang.instrument.Instrumentation} that was loaded by the Byte Buddy
* agent. Note that this field must never be accessed directly as the agent is injected into the VM's
* system class loader. This way, the field of this class might be {@code null} even after the installation
@@ -91,7 +97,7 @@
* @param instrumentation The instrumentation instance.
*/
public static void premain(String arguments, Instrumentation instrumentation) {
- Installer.instrumentation = instrumentation;
+ doMain(instrumentation);
}
/**
@@ -101,6 +107,28 @@
* @param instrumentation The instrumentation instance.
*/
public static void agentmain(String arguments, Instrumentation instrumentation) {
+ doMain(instrumentation);
+ }
+
+ /**
+ * Installs the {@link Instrumentation} in the current class and possibly obfuscated class.
+ *
+ * @param instrumentation The instrumentation instance.
+ */
+ @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not interrupt agent attachment.")
+ private static synchronized void doMain(Instrumentation instrumentation) {
+ if (Installer.instrumentation != null) {
+ return;
+ }
Installer.instrumentation = instrumentation;
+ try {
+ if (!Installer.class.getName().equals(NAME)) {
+ Class.forName(NAME, false, ClassLoader.getSystemClassLoader())
+ .getField("instrumentation")
+ .set(null, instrumentation);
+ }
+ } catch (Throwable ignored) {
+ /* do nothing */
+ }
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java 2024-07-08 21:04:14.000000000 +0200
@@ -33,6 +33,8 @@
import java.security.SecureRandom;
import java.util.*;
import java.util.concurrent.TimeUnit;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
/**
* <p>
@@ -683,7 +685,7 @@
}
/**
- * Implements a connection for a Posix socket in JNA.
+ * Implements a connection for a POSIX socket in JNA.
*/
class ForJnaPosixSocket extends OnPersistentByteChannel<Integer> {
@@ -698,7 +700,7 @@
private final File socket;
/**
- * Creates a connection for a virtual posix socket implemented in JNA.
+ * Creates a connection for a virtual POSIX socket implemented in JNA.
*
* @param library The JNA library to use.
* @param socket The POSIX socket.
@@ -750,7 +752,7 @@
}
/**
- * A JNA library binding for Posix sockets.
+ * A JNA library binding for POSIX sockets.
*/
protected interface PosixLibrary extends Library {
@@ -1079,6 +1081,7 @@
* Custom {@link WinBase.SECURITY_ATTRIBUTES} is required here to "get" Medium Integrity Level.
* In order to allow Medium Integrity Level clients to open
* and use a NamedPipe created by an High Integrity Level process.
+ *
* @return A security attributes object that gives everyone read and write access.
*/
private WinBase.SECURITY_ATTRIBUTES createSecurityAttributesToAllowMediumIntegrity() {
@@ -2062,7 +2065,7 @@
/**
* Changes the ownership of a file. Can be called only if this process is owned by root.
*
- * @param file The path of the file to change ownership of.
+ * @param file The path of the file to change ownership of.
* @param userId The user that should own the file.
*/
void chownFileToUser(File file, long userId);
@@ -2078,22 +2081,12 @@
private final PosixLibrary library;
/**
- * The maximum amount of attempts for checking the result of a foreign process.
- */
- private final int attempts;
-
- /**
- * The pause between two checks for another process to return.
- */
- private final long pause;
-
- /**
- * The time unit of the pause time.
+ * The POSIX owner provider to use.
*/
- private final TimeUnit timeUnit;
+ private final PosixOwnerProvider provider;
/**
- * Creates a new connector for a POSIX enviornment using JNA.
+ * Creates a new connector for a POSIX environment using JNA.
*
* @param attempts The maximum amount of attempts for checking the result of a foreign process.
* @param pause The pause between two checks for another process to return.
@@ -2101,9 +2094,9 @@
*/
@SuppressWarnings("deprecation")
public ForJnaPosixEnvironment(int attempts, long pause, TimeUnit timeUnit) {
- this.attempts = attempts;
- this.pause = pause;
- this.timeUnit = timeUnit;
+ provider = Platform.isAIX()
+ ? new PosixOwnerProvider.UsingIStat(attempts, pause, timeUnit)
+ : new PosixOwnerProvider.UsingStat(attempts, pause, timeUnit);
library = Native.loadLibrary("c", PosixLibrary.class);
}
@@ -2147,40 +2140,7 @@
*/
@SuppressFBWarnings(value = "OS_OPEN_STREAM", justification = "The stream life-cycle is bound to its process.")
public int getOwnerIdOf(File file) {
- try {
- // The binding for 'stat' is very platform dependant. To avoid the complexity of binding the correct method,
- // stat is called as a separate command. This is less efficient but more portable.
- Process process = Runtime.getRuntime().exec(new String[]{"stat",
- Platform.isMac() ? "-f" : "-c",
- "%u",
- file.getAbsolutePath()});
- int attempts = this.attempts;
- boolean exited = false;
- String line = new BufferedReader(new InputStreamReader(process.getInputStream(), "UTF-8")).readLine();
- do {
- try {
- if (process.exitValue() != 0) {
- throw new IllegalStateException("Error while executing stat");
- }
- exited = true;
- break;
- } catch (IllegalThreadStateException ignored) {
- try {
- Thread.sleep(timeUnit.toMillis(pause));
- } catch (InterruptedException exception) {
- Thread.currentThread().interrupt();
- throw new IllegalStateException(exception);
- }
- }
- } while (--attempts > 0);
- if (!exited) {
- process.destroy();
- throw new IllegalStateException("Command for stat did not exit in time");
- }
- return Integer.parseInt(line);
- } catch (IOException exception) {
- throw new IllegalStateException("Unable to execute stat command", exception);
- }
+ return provider.getOwnerIdOf(file);
}
/**
@@ -2227,21 +2187,17 @@
PosixLibrary.SemaphoreOperation target = new PosixLibrary.SemaphoreOperation();
target.operation = operation;
target.flags = flags;
- try {
- while (count-- > 0) {
- try {
- library.semop(semaphore, target, 1);
- } catch (LastErrorException exception) {
- if (acceptUnavailable && (Native.getLastError() == PosixLibrary.EAGAIN
- || Native.getLastError() == PosixLibrary.EDEADLK)) {
- break;
- } else {
- throw exception;
- }
+ while (count-- > 0) {
+ try {
+ library.semop(semaphore, target, 1);
+ } catch (LastErrorException exception) {
+ if (acceptUnavailable && (Native.getLastError() == PosixLibrary.EAGAIN
+ || Native.getLastError() == PosixLibrary.EDEADLK)) {
+ break;
+ } else {
+ throw exception;
}
}
- } finally {
- target = null;
}
}
@@ -2385,6 +2341,186 @@
}
}
}
+
+ /**
+ * Represents a system that supports POSIX ownership.
+ */
+ protected interface PosixOwnerProvider {
+
+ /**
+ * Returns the user id of the owner of the supplied file.
+ *
+ * @param file The file for which to locate the owner.
+ * @return The owner id of the supplied file.
+ */
+ int getOwnerIdOf(File file);
+
+ /**
+ * An implementation of reading POSIX ownership using {@code stat}.
+ */
+ class UsingStat implements PosixOwnerProvider {
+
+ /**
+ * The maximum amount of attempts for checking the result of a foreign process.
+ */
+ private final int attempts;
+
+ /**
+ * The pause between two checks for another process to return.
+ */
+ private final long pause;
+
+ /**
+ * The time unit of the pause time.
+ */
+ private final TimeUnit timeUnit;
+
+ /**
+ * Creates a new provider where an owner is derived using the {@code stat} command.
+ *
+ * @param attempts The maximum amount of attempts for checking the result of a foreign process.
+ * @param pause The pause between two checks for another process to return.
+ * @param timeUnit The time unit of the pause time.
+ */
+ public UsingStat(int attempts, long pause, TimeUnit timeUnit) {
+ this.attempts = attempts;
+ this.pause = pause;
+ this.timeUnit = timeUnit;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getOwnerIdOf(File file) {
+ try {
+ // The binding for 'stat' is very platform dependant. To avoid the complexity of binding the correct method,
+ // stat is called as a separate command. This is less efficient but more portable.
+ Process process = Runtime.getRuntime().exec(new String[]{"stat",
+ Platform.isMac() ? "-f" : "-c",
+ "%u",
+ file.getAbsolutePath()});
+ int attempts = this.attempts;
+ String line = null;
+ do {
+ try {
+ if (process.exitValue() != 0) {
+ throw new IllegalStateException("Error while executing stat");
+ }
+ BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream(), "UTF-8"));
+ try {
+ line = reader.readLine();
+ } finally {
+ reader.close();
+ }
+ break;
+ } catch (IllegalThreadStateException ignored) {
+ try {
+ Thread.sleep(timeUnit.toMillis(pause));
+ } catch (InterruptedException exception) {
+ Thread.currentThread().interrupt();
+ throw new IllegalStateException(exception);
+ }
+ }
+ } while (--attempts > 0);
+ if (line == null) {
+ process.destroy();
+ throw new IllegalStateException("Command for stat did not exit in time");
+ }
+ return Integer.parseInt(line);
+ } catch (IOException exception) {
+ throw new IllegalStateException("Unable to execute stat command", exception);
+ }
+ }
+ }
+
+ /**
+ * An implementation for reading a POSIX owner using {@code istat}.
+ */
+ class UsingIStat implements PosixOwnerProvider {
+
+ /**
+ * A pattern to represent the owner on the console output.
+ */
+ private static final Pattern AIX_OWNER_PATTERN = Pattern.compile("Owner: (\\d+)\\(");
+
+ /**
+ * The maximum amount of attempts for checking the result of a foreign process.
+ */
+ private final int attempts;
+
+ /**
+ * The pause between two checks for another process to return.
+ */
+ private final long pause;
+
+ /**
+ * The time unit of the pause time.
+ */
+ private final TimeUnit timeUnit;
+
+ /**
+ * Creates a new provider for reading a POSIX owner using {@code istat}.
+ *
+ * @param attempts The maximum amount of attempts for checking the result of a foreign process.
+ * @param pause The pause between two checks for another process to return.
+ * @param timeUnit The time unit of the pause time.
+ */
+ public UsingIStat(int attempts, long pause, TimeUnit timeUnit) {
+ this.attempts = attempts;
+ this.pause = pause;
+ this.timeUnit = timeUnit;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getOwnerIdOf(File file) {
+ try {
+ Process process = Runtime.getRuntime().exec(new String[]{"istat", file.getAbsolutePath()});
+ int attempts = this.attempts;
+ String lines = null;
+ do {
+ try {
+ if (process.exitValue() != 0) {
+ throw new IllegalStateException("Error while executing istat");
+ }
+ StringBuilder output = new StringBuilder();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream(), "UTF-8"));
+ try {
+ String line;
+ while ((line = reader.readLine()) != null) {
+ output.append(line).append("\n");
+ }
+ } finally {
+ reader.close();
+ }
+ lines = output.toString();
+ break;
+ } catch (IllegalThreadStateException ignored) {
+ try {
+ Thread.sleep(timeUnit.toMillis(pause));
+ } catch (InterruptedException exception) {
+ Thread.currentThread().interrupt();
+ throw new IllegalStateException(exception);
+ }
+ }
+ } while (--attempts > 0);
+ if (lines == null) {
+ process.destroy();
+ throw new IllegalStateException("Command for istat did not exit in time");
+ }
+ Matcher matcher = AIX_OWNER_PATTERN.matcher(lines);
+ if (matcher.find()) {
+ return Integer.parseInt(matcher.group(1));
+ } else {
+ throw new IllegalStateException("Unable to parse response from istat command: " + lines);
+ }
+ } catch (IOException exception) {
+ throw new IllegalStateException("Unable to execute istat command", exception);
+ }
+ }
+ }
+ }
}
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/src/test/java/net/bytebuddy/agent/AttacherTest.java new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/src/test/java/net/bytebuddy/agent/AttacherTest.java
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/src/test/java/net/bytebuddy/agent/AttacherTest.java 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/src/test/java/net/bytebuddy/agent/AttacherTest.java 2024-07-08 21:04:14.000000000 +0200
@@ -97,4 +97,4 @@
public void detach() {
}
}
-}
\ No newline at end of file
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/src/test/java/net/bytebuddy/agent/ByteBuddyAgentTest.java new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/src/test/java/net/bytebuddy/agent/ByteBuddyAgentTest.java
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/src/test/java/net/bytebuddy/agent/ByteBuddyAgentTest.java 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/src/test/java/net/bytebuddy/agent/ByteBuddyAgentTest.java 2024-07-08 21:04:14.000000000 +0200
@@ -1,5 +1,6 @@
package net.bytebuddy.agent;
+import org.hamcrest.CoreMatchers;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/src/test/java/net/bytebuddy/agent/InstallerTest.java new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/src/test/java/net/bytebuddy/agent/InstallerTest.java
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-agent/src/test/java/net/bytebuddy/agent/InstallerTest.java 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-agent/src/test/java/net/bytebuddy/agent/InstallerTest.java 2024-07-08 21:04:14.000000000 +0200
@@ -33,6 +33,7 @@
Field field = Installer.class.getDeclaredField("instrumentation");
field.setAccessible(true);
actualInstrumentation = (Instrumentation) field.get(null);
+ field.set(null, null);
}
@After
@@ -85,4 +86,9 @@
throw (Exception) exception.getTargetException();
}
}
+
+ @Test
+ public void testInstallerObfuscatedNameMatches() throws Exception {
+ assertThat(Installer.NAME, is(Installer.class.getName()));
+ }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-android/pom.xml new/byte-buddy-byte-buddy-1.14.18/byte-buddy-android/pom.xml
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-android/pom.xml 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-android/pom.xml 2024-07-08 21:04:14.000000000 +0200
@@ -5,7 +5,7 @@
<parent>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-parent</artifactId>
- <version>1.14.16</version>
+ <version>1.14.18</version>
</parent>
<artifactId>byte-buddy-android</artifactId>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-android-test/pom.xml new/byte-buddy-byte-buddy-1.14.18/byte-buddy-android-test/pom.xml
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-android-test/pom.xml 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-android-test/pom.xml 2024-07-08 21:04:14.000000000 +0200
@@ -5,7 +5,7 @@
<parent>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-parent</artifactId>
- <version>1.14.16</version>
+ <version>1.14.18</version>
</parent>
<artifactId>byte-buddy-android-test</artifactId>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-benchmark/pom.xml new/byte-buddy-byte-buddy-1.14.18/byte-buddy-benchmark/pom.xml
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-benchmark/pom.xml 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-benchmark/pom.xml 2024-07-08 21:04:14.000000000 +0200
@@ -5,7 +5,7 @@
<parent>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-parent</artifactId>
- <version>1.14.16</version>
+ <version>1.14.18</version>
</parent>
<artifactId>byte-buddy-benchmark</artifactId>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-dep/pom.xml new/byte-buddy-byte-buddy-1.14.18/byte-buddy-dep/pom.xml
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-dep/pom.xml 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-dep/pom.xml 2024-07-08 21:04:14.000000000 +0200
@@ -5,7 +5,7 @@
<parent>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-parent</artifactId>
- <version>1.14.16</version>
+ <version>1.14.18</version>
</parent>
<!--
@@ -127,7 +127,7 @@
<plugin>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-maven-plugin</artifactId>
- <version>1.14.15</version>
+ <version>1.14.17</version>
<executions>
<execution>
<phase>compile</phase>
@@ -142,7 +142,7 @@
<transformation>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.15</version>
+ <version>1.14.17</version>
<plugin>net.bytebuddy.build.HashCodeAndEqualsPlugin$WithNonNullableFields</plugin>
<arguments>
<argument>
@@ -154,13 +154,13 @@
<transformation>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.15</version>
+ <version>1.14.17</version>
<plugin>net.bytebuddy.build.CachedReturnPlugin</plugin>
</transformation>
<transformation>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.15</version>
+ <version>1.14.17</version>
<plugin>net.bytebuddy.build.AccessControllerPlugin</plugin>
<arguments>
<argument>
@@ -172,13 +172,13 @@
<transformation>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.15</version>
+ <version>1.14.17</version>
<plugin>net.bytebuddy.build.DispatcherAnnotationPlugin</plugin>
</transformation>
<transformation>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
- <version>1.14.15</version>
+ <version>1.14.17</version>
<plugin>net.bytebuddy.build.RepeatedAnnotationPlugin</plugin>
</transformation>
</transformations>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-dep/src/main/java/net/bytebuddy/agent/builder/AgentBuilder.java new/byte-buddy-byte-buddy-1.14.18/byte-buddy-dep/src/main/java/net/bytebuddy/agent/builder/AgentBuilder.java
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-dep/src/main/java/net/bytebuddy/agent/builder/AgentBuilder.java 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-dep/src/main/java/net/bytebuddy/agent/builder/AgentBuilder.java 2024-07-08 21:04:14.000000000 +0200
@@ -2585,6 +2585,16 @@
private final ConcurrentMap<Thread, Boolean> threads = new ConcurrentHashMap<Thread, Boolean>();
/**
+ * Creates a default circularity lock. The constructor invokes all methods that are used by
+ * the lock to avoid that using this lock triggers class loading under use.
+ */
+ public Default() {
+ Thread thread = Thread.currentThread();
+ threads.putIfAbsent(thread, true);
+ threads.remove(thread);
+ }
+
+ /**
* {@inheritDoc}
*/
public boolean acquire() {
@@ -2646,6 +2656,15 @@
lock = new ReentrantLock();
this.time = time;
this.timeUnit = timeUnit;
+ try {
+ if (!(time == 0 ? lock.tryLock() : lock.tryLock(time, timeUnit))) {
+ throw new IllegalStateException();
+ }
+ } catch (InterruptedException ignored) {
+ Thread.currentThread().interrupt();
+ return;
+ }
+ lock.unlock();
}
/**
@@ -7006,7 +7025,7 @@
* during reiteration. For these reasons, this strategy has to be used with care!
* </p>
*/
- enum WithSortOrderAssumption implements DiscoveryStrategy {
+ public enum WithSortOrderAssumption implements DiscoveryStrategy {
/**
* The singleton instance.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-dep/src/main/java/net/bytebuddy/asm/Advice.java new/byte-buddy-byte-buddy-1.14.18/byte-buddy-dep/src/main/java/net/bytebuddy/asm/Advice.java
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-dep/src/main/java/net/bytebuddy/asm/Advice.java 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-dep/src/main/java/net/bytebuddy/asm/Advice.java 2024-07-08 21:04:14.000000000 +0200
@@ -7440,6 +7440,9 @@
default:
throw new IllegalArgumentException("Unexpected frame type: " + type);
}
+ if (instrumentedMethod.isConstructor() && currentFrameDivergence < instrumentedMethod.getStackSize()) {
+ throw new IllegalStateException(instrumentedMethod + " dropped implicit 'this' frame");
+ }
methodVisitor.visitFrame(type, localVariableLength, localVariable, stackSize, stack);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ByteArrayClassLoader.java new/byte-buddy-byte-buddy-1.14.18/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ByteArrayClassLoader.java
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ByteArrayClassLoader.java 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ByteArrayClassLoader.java 2024-07-08 21:04:14.000000000 +0200
@@ -1346,20 +1346,20 @@
/**
* Checks if a resource name represents a class file of a class that was loaded by this class loader.
*
- * @param resourceName The resource name of the class to be exposed as its class file.
+ * @param resource The resource name of the class to be exposed as its class file.
* @return {@code true} if this class represents a class that is being loaded by this class loader.
*/
- private boolean isShadowed(String resourceName) {
- if (persistenceHandler.isManifest() || !resourceName.endsWith(CLASS_FILE_SUFFIX)) {
+ private boolean isShadowed(String resource) {
+ if (persistenceHandler.isManifest() || !resource.endsWith(CLASS_FILE_SUFFIX)) {
return false;
}
// This synchronization is required to avoid a racing condition to the actual class loading.
- synchronized (this) {
- String typeName = resourceName.replace('/', '.').substring(0, resourceName.length() - CLASS_FILE_SUFFIX.length());
- if (typeDefinitions.containsKey(typeName)) {
+ String name = resource.replace('/', '.').substring(0, resource.length() - CLASS_FILE_SUFFIX.length());
+ synchronized (SYNCHRONIZATION_STRATEGY.initialize().getClassLoadingLock(this, name)) {
+ if (typeDefinitions.containsKey(name)) {
return true;
}
- Class<?> loadedClass = findLoadedClass(typeName);
+ Class<?> loadedClass = findLoadedClass(name);
return loadedClass != null && loadedClass.getClassLoader() == this;
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-dep/src/test/java/net/bytebuddy/asm/AdviceTest.java new/byte-buddy-byte-buddy-1.14.18/byte-buddy-dep/src/test/java/net/bytebuddy/asm/AdviceTest.java
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-dep/src/test/java/net/bytebuddy/asm/AdviceTest.java 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-dep/src/test/java/net/bytebuddy/asm/AdviceTest.java 2024-07-08 21:04:14.000000000 +0200
@@ -8,15 +8,19 @@
import net.bytebuddy.dynamic.ClassFileLocator;
import net.bytebuddy.dynamic.loading.ClassLoadingStrategy;
import net.bytebuddy.dynamic.loading.InjectionClassLoader;
+import net.bytebuddy.dynamic.scaffold.subclass.ConstructorStrategy;
import net.bytebuddy.implementation.Implementation;
import net.bytebuddy.implementation.bytecode.ByteCodeAppender;
import net.bytebuddy.implementation.bytecode.StackManipulation;
import net.bytebuddy.implementation.bytecode.assign.Assigner;
import net.bytebuddy.implementation.bytecode.constant.ClassConstant;
+import net.bytebuddy.implementation.bytecode.member.MethodInvocation;
+import net.bytebuddy.implementation.bytecode.member.MethodReturn;
import net.bytebuddy.implementation.bytecode.member.MethodVariableAccess;
import net.bytebuddy.matcher.ElementMatchers;
import net.bytebuddy.pool.TypePool;
import net.bytebuddy.test.packaging.AdviceTestHelper;
+import net.bytebuddy.test.utility.DebuggingWrapper;
import net.bytebuddy.test.utility.JavaVersionRule;
import net.bytebuddy.utility.JavaType;
import org.junit.Rule;
@@ -1638,7 +1642,7 @@
@Test
public void testAssigningEnterPostProcessorInline() throws Exception {
Class<?> type = new ByteBuddy()
- .redefine(PostProcessorInlineTest.class)
+ .redefine(PostProcessorInline.class)
.visit(Advice.withCustomMapping().with(new Advice.PostProcessor.Factory() {
public Advice.PostProcessor make(final MethodDescription.InDefinedShape advice, boolean exit) {
return new Advice.PostProcessor() {
@@ -1655,7 +1659,7 @@
}
};
}
- }).to(PostProcessorInlineTest.class).on(named(FOO)))
+ }).to(PostProcessorInline.class).on(named(FOO)))
.make()
.load(ClassLoadingStrategy.BOOTSTRAP_LOADER, ClassLoadingStrategy.Default.WRAPPER)
.getLoaded();
@@ -1665,7 +1669,7 @@
@Test
public void testAssigningEnterPostProcessorDelegate() throws Exception {
Class<?> type = new ByteBuddy()
- .redefine(PostProcessorDelegateTest.class)
+ .redefine(PostProcessorDelegate.class)
.visit(Advice.withCustomMapping().with(new Advice.PostProcessor.Factory() {
public Advice.PostProcessor make(final MethodDescription.InDefinedShape advice, boolean exit) {
return new Advice.PostProcessor() {
@@ -1682,7 +1686,7 @@
}
};
}
- }).to(PostProcessorDelegateTest.class).on(named(FOO)))
+ }).to(PostProcessorDelegate.class).on(named(FOO)))
.make()
.load(ClassLoadingStrategy.BOOTSTRAP_LOADER, ClassLoadingStrategy.Default.WRAPPER)
.getLoaded();
@@ -1785,14 +1789,38 @@
@Test
public void testWriteFieldInConstructor() throws Exception {
Class<?> sample = new ByteBuddy()
- .redefine(ConstructorWriteFieldTest.class)
- .visit(Advice.to(ConstructorWriteFieldTest.class).on(isConstructor()))
+ .redefine(ConstructorWriteField.class)
+ .visit(Advice.to(ConstructorWriteField.class).on(isConstructor()))
.make()
.load(ClassLoadingStrategy.BOOTSTRAP_LOADER, ClassLoadingStrategy.Default.WRAPPER)
.getLoaded();
assertThat(sample.getField(FOO).get(sample.getConstructor().newInstance()), is((Object) FOO));
}
+ @Test(expected = IllegalStateException.class)
+ public void testDroppingOfThisFrameInConstructor() throws Exception {
+ new ByteBuddy()
+ .subclass(Object.class, ConstructorStrategy.Default.NO_CONSTRUCTORS)
+ .defineConstructor(Visibility.PUBLIC)
+ .intercept(new Implementation.Simple(
+ MethodVariableAccess.loadThis(),
+ MethodInvocation.invoke(new MethodDescription.ForLoadedConstructor(Object.class.getConstructor()))
+ .special(TypeDescription.ForLoadedType.of(Object.class)),
+ new StackManipulation.AbstractBase() {
+ @Override
+ public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) {
+ methodVisitor.visitFrame(Opcodes.F_CHOP, 1, null, 0, null);
+ return Size.ZERO;
+ }
+ },
+ MethodReturn.VOID
+ ))
+ .visit(DebuggingWrapper.makeDefault())
+ .visit(Advice.to(EmptyExitAdvice.class).on(isConstructor()))
+ .make();
+ }
+
+
@Test(expected = IllegalArgumentException.class)
public void testUserSerializableTypeValueNonAssignable() throws Exception {
new ByteBuddy()
@@ -4127,7 +4155,7 @@
}
}
- public static class PostProcessorInlineTest {
+ public static class PostProcessorInline {
@Advice.OnMethodEnter
static String enter() {
@@ -4139,7 +4167,7 @@
}
}
- public static class PostProcessorDelegateTest {
+ public static class PostProcessorDelegate {
@Advice.OnMethodEnter(inline = false)
static String enter() {
@@ -4151,7 +4179,7 @@
}
}
- public static class ConstructorWriteFieldTest {
+ public static class ConstructorWriteField {
public String foo;
@@ -4160,4 +4188,12 @@
return value = "foo";
}
}
+
+ public static class EmptyExitAdvice {
+
+ @Advice.OnMethodExit
+ static void exit() {
+ /* do nothing */
+ }
+ }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyLocalClassesEnhancerTask.java new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyLocalClassesEnhancerTask.java
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyLocalClassesEnhancerTask.java 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyLocalClassesEnhancerTask.java 2024-07-08 21:04:14.000000000 +0200
@@ -378,7 +378,7 @@
outputStream.closeEntry();
} catch (ZipException exception) {
String name = element.getName();
- if (!name.startsWith("META-INF") && !name.endsWith("-info.class")) {
+ if (!name.startsWith("META-INF") && !name.endsWith("-info.class") && name.endsWith(".class")) {
throw exception;
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/LICENSE new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/LICENSE
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/LICENSE 1970-01-01 01:00:00.000000000 +0100
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/LICENSE 2024-07-08 21:04:14.000000000 +0200
@@ -0,0 +1 @@
+A license
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/LICENSE.txt new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/LICENSE.txt
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/LICENSE.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/LICENSE.txt 2024-07-08 21:04:14.000000000 +0200
@@ -0,0 +1 @@
+A license
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/NOTICE new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/NOTICE
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/NOTICE 1970-01-01 01:00:00.000000000 +0100
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/NOTICE 2024-07-08 21:04:14.000000000 +0200
@@ -0,0 +1 @@
+A notice
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/NOTICE.txt new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/NOTICE.txt
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/NOTICE.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation-lib/src/main/resources/NOTICE.txt 2024-07-08 21:04:14.000000000 +0200
@@ -0,0 +1 @@
+A notice
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/LICENSE new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/LICENSE
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/LICENSE 1970-01-01 01:00:00.000000000 +0100
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/LICENSE 2024-07-08 21:04:14.000000000 +0200
@@ -0,0 +1 @@
+A license
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/LICENSE.txt new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/LICENSE.txt
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/LICENSE.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/LICENSE.txt 2024-07-08 21:04:14.000000000 +0200
@@ -0,0 +1 @@
+A license
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/NOTICE new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/NOTICE
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/NOTICE 1970-01-01 01:00:00.000000000 +0100
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/NOTICE 2024-07-08 21:04:14.000000000 +0200
@@ -0,0 +1 @@
+A notice
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/NOTICE.txt new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/NOTICE.txt
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/NOTICE.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/android-plugin-test/service-implementation2-lib/src/main/resources/NOTICE.txt 2024-07-08 21:04:14.000000000 +0200
@@ -0,0 +1 @@
+A notice
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/pom.xml new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/pom.xml
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-gradle-plugin/pom.xml 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-gradle-plugin/pom.xml 2024-07-08 21:04:14.000000000 +0200
@@ -5,7 +5,7 @@
<parent>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-parent</artifactId>
- <version>1.14.16</version>
+ <version>1.14.18</version>
</parent>
<artifactId>byte-buddy-gradle-plugin</artifactId>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/byte-buddy-maven-plugin/pom.xml new/byte-buddy-byte-buddy-1.14.18/byte-buddy-maven-plugin/pom.xml
--- old/byte-buddy-byte-buddy-1.14.16/byte-buddy-maven-plugin/pom.xml 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/byte-buddy-maven-plugin/pom.xml 2024-07-08 21:04:14.000000000 +0200
@@ -5,7 +5,7 @@
<parent>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-parent</artifactId>
- <version>1.14.16</version>
+ <version>1.14.18</version>
</parent>
<artifactId>byte-buddy-maven-plugin</artifactId>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/pom.xml new/byte-buddy-byte-buddy-1.14.18/pom.xml
--- old/byte-buddy-byte-buddy-1.14.16/pom.xml 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/pom.xml 2024-07-08 21:04:14.000000000 +0200
@@ -4,7 +4,7 @@
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-parent</artifactId>
- <version>1.14.16</version>
+ <version>1.14.18</version>
<packaging>pom</packaging>
<inceptionYear>2014</inceptionYear>
@@ -61,7 +61,7 @@
<bytebuddy.integration>false</bytebuddy.integration>
<bytebuddy.experimental>false</bytebuddy.experimental>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.build.outputTimestamp>1716377554</project.build.outputTimestamp>
+ <project.build.outputTimestamp>1720465357</project.build.outputTimestamp>
<sourcecode.main.version>1.5</sourcecode.main.version>
<sourcecode.test.version>1.6</sourcecode.test.version>
<bytecode.main.version>1.5</bytecode.main.version>
@@ -154,7 +154,7 @@
<connection>scm:git:${repository.url}</connection>
<developerConnection>scm:git:${repository.url}</developerConnection>
<url>${repository.url}</url>
- <tag>byte-buddy-1.14.16</tag>
+ <tag>byte-buddy-1.14.18</tag>
</scm>
<dependencies>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/byte-buddy-byte-buddy-1.14.16/release-notes.md new/byte-buddy-byte-buddy-1.14.18/release-notes.md
--- old/byte-buddy-byte-buddy-1.14.16/release-notes.md 2024-05-22 13:35:07.000000000 +0200
+++ new/byte-buddy-byte-buddy-1.14.18/release-notes.md 2024-07-08 21:04:14.000000000 +0200
@@ -1,7 +1,15 @@
Byte Buddy release notes
------------------------
-### 8. Mai 2024: version 1.14.15
+### 29. May 2024: version 1.14.17
+
+- Avoid crashing of Android plugin when there are duplicate files for licenses or license notices.
+
+### 22. May 2024: version 1.14.16
+
+- Update ASM and introduce support for Java 23.
+
+### 8. May 2024: version 1.14.15
- Allow attaching from root on J9.
@@ -28,7 +36,7 @@
- Adjusts Gradle plugin to support Gradle 8.4 without warnings.
- Avoid blurry exception on build plugin for fail fast.
-### 9. October 2023: version 1.14.10
+### 16. October 2023: version 1.14.10
- Add lazy facade to default `TypePool` in `AgentBuilder` to avoid parsing of types ignored by name.
- Avoid module info classes in Android plugin.
1
0