openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- 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
August 2024
- 2 participants
- 1399 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package apache-tomcat-10-java-21-image for openSUSE:Factory checked in at 2024-08-16 12:23:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apache-tomcat-10-java-21-image (Old)
and /work/SRC/openSUSE:Factory/.apache-tomcat-10-java-21-image.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "apache-tomcat-10-java-21-image"
Fri Aug 16 12:23:36 2024 rev:8 rq:1194074 version:unknown
Changes:
--------
--- /work/SRC/openSUSE:Factory/apache-tomcat-10-java-21-image/apache-tomcat-10-java-21-image.changes 2024-08-15 09:58:01.538218759 +0200
+++ /work/SRC/openSUSE:Factory/.apache-tomcat-10-java-21-image.new.2698/apache-tomcat-10-java-21-image.changes 2024-08-16 12:24:09.412296075 +0200
@@ -1,0 +2,5 @@
+Wed Aug 14 16:03:10 UTC 2024 - Dirk Mueller <dmueller(a)suse.com>
+
+- extend description
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ Dockerfile ++++++
--- /var/tmp/diff_new_pack.LWDbch/_old 2024-08-16 12:24:10.728350770 +0200
+++ /var/tmp/diff_new_pack.LWDbch/_new 2024-08-16 12:24:10.764352265 +0200
@@ -32,7 +32,7 @@
# labelprefix=org.opensuse.application.apache-tomcat
LABEL org.opencontainers.image.authors="openSUSE (https://www.opensuse.org/)"
LABEL org.opencontainers.image.title="openSUSE Tumbleweed Apache Tomcat"
-LABEL org.opencontainers.image.description="Apache Tomcat container based on the openSUSE Tumbleweed Base Container Image."
+LABEL org.opencontainers.image.description="Apache Tomcat is a free and open-source implementation of the Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies, based on the openSUSE Tumbleweed Base Container Image."
LABEL org.opencontainers.image.version="%%tomcat_version%%"
LABEL org.opencontainers.image.url="https://www.opensuse.org"
LABEL org.opencontainers.image.created="%BUILDTIME%"
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package apache-tomcat-10-java-17-image for openSUSE:Factory checked in at 2024-08-16 12:23:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apache-tomcat-10-java-17-image (Old)
and /work/SRC/openSUSE:Factory/.apache-tomcat-10-java-17-image.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "apache-tomcat-10-java-17-image"
Fri Aug 16 12:23:35 2024 rev:8 rq:1194073 version:unknown
Changes:
--------
--- /work/SRC/openSUSE:Factory/apache-tomcat-10-java-17-image/apache-tomcat-10-java-17-image.changes 2024-08-15 09:58:00.730184942 +0200
+++ /work/SRC/openSUSE:Factory/.apache-tomcat-10-java-17-image.new.2698/apache-tomcat-10-java-17-image.changes 2024-08-16 12:24:07.312208799 +0200
@@ -1,0 +2,5 @@
+Wed Aug 14 16:03:10 UTC 2024 - Dirk Mueller <dmueller(a)suse.com>
+
+- extend description
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ Dockerfile ++++++
--- /var/tmp/diff_new_pack.v1CF0y/_old 2024-08-16 12:24:08.888274298 +0200
+++ /var/tmp/diff_new_pack.v1CF0y/_new 2024-08-16 12:24:08.916275462 +0200
@@ -32,7 +32,7 @@
# labelprefix=org.opensuse.application.apache-tomcat
LABEL org.opencontainers.image.authors="openSUSE (https://www.opensuse.org/)"
LABEL org.opencontainers.image.title="openSUSE Tumbleweed Apache Tomcat"
-LABEL org.opencontainers.image.description="Apache Tomcat container based on the openSUSE Tumbleweed Base Container Image."
+LABEL org.opencontainers.image.description="Apache Tomcat is a free and open-source implementation of the Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies, based on the openSUSE Tumbleweed Base Container Image."
LABEL org.opencontainers.image.version="%%tomcat_version%%"
LABEL org.opencontainers.image.url="https://www.opensuse.org"
LABEL org.opencontainers.image.created="%BUILDTIME%"
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rtla for openSUSE:Factory checked in at 2024-08-16 12:23:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rtla (Old)
and /work/SRC/openSUSE:Factory/.rtla.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rtla"
Fri Aug 16 12:23:34 2024 rev:7 rq:1194062 version:MACRO
Changes:
--------
--- /work/SRC/openSUSE:Factory/rtla/rtla.changes 2024-07-30 11:57:53.225819589 +0200
+++ /work/SRC/openSUSE:Factory/.rtla.new.2698/rtla.changes 2024-08-16 12:24:05.496133324 +0200
@@ -1,0 +2,5 @@
+Wed Aug 14 09:58:51 UTC 2024 - Dominique Leuenberger <dimstar(a)opensuse.org>
+
+- Replace deprecated %patchN syntax with %patch -P N.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rtla.spec ++++++
--- /var/tmp/diff_new_pack.6u42pP/_old 2024-08-16 12:24:06.912192174 +0200
+++ /var/tmp/diff_new_pack.6u42pP/_new 2024-08-16 12:24:06.920192506 +0200
@@ -52,7 +52,7 @@
(cd %{_prefix}/src/linux ; tar -cf - COPYING CREDITS README tools include scripts Kbuild Makefile arch/*/{include,lib,Makefile} lib Documentation/tools/rtla) | tar -xf -
# Workaround for missing lib dependency
sed -i 's/--libs libtracefs/--libs libtracefs libtraceevent/' tools/tracing/rtla/Makefile
-%patch1 -p1
+%patch -P 1 -p1
%build
cd tools/tracing/rtla
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package klp-build for openSUSE:Factory checked in at 2024-08-16 12:23:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/klp-build (Old)
and /work/SRC/openSUSE:Factory/.klp-build.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "klp-build"
Fri Aug 16 12:23:33 2024 rev:8 rq:1194034 version:0~20240814.5dae2ec
Changes:
--------
--- /work/SRC/openSUSE:Factory/klp-build/klp-build.changes 2024-08-14 14:16:50.221520570 +0200
+++ /work/SRC/openSUSE:Factory/.klp-build.new.2698/klp-build.changes 2024-08-16 12:24:04.744102071 +0200
@@ -1,0 +2,8 @@
+Thu Aug 15 04:24:32 UTC 2024 - mvetter(a)suse.com
+
+- Update to version 0~20240814.5dae2ec:
+ * setup: More information being logged
+ * ibs: Optimize extraction of vmlinux and modules
+ * config.py: Show error code when quilt fails
+
+-------------------------------------------------------------------
Old:
----
klp-build-0~20240812.ad9f0e0.tar.xz
New:
----
klp-build-0~20240814.5dae2ec.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ klp-build.spec ++++++
--- /var/tmp/diff_new_pack.vePPYu/_old 2024-08-16 12:24:05.236122518 +0200
+++ /var/tmp/diff_new_pack.vePPYu/_new 2024-08-16 12:24:05.236122518 +0200
@@ -18,7 +18,7 @@
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Name: klp-build
-Version: 0~20240812.ad9f0e0
+Version: 0~20240814.5dae2ec
Release: 0
Summary: The kernel livepatching creation tool
License: GPL-2.0-only
++++++ _service ++++++
--- /var/tmp/diff_new_pack.vePPYu/_old 2024-08-16 12:24:05.268123849 +0200
+++ /var/tmp/diff_new_pack.vePPYu/_new 2024-08-16 12:24:05.272124015 +0200
@@ -2,7 +2,7 @@
<service name="tar_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://github.com/SUSE/klp-build</param>
- <param name="revision">ad9f0e08623439b67ecfa9b079f9816f10f51562</param>
+ <param name="revision">5dae2ec63b82bb44113c1904edae6a7f0057baf6</param>
<param name="versionformat">0~%cd.%h</param>
<param name="changesgenerate">enable</param>
<param name="changesauthor">mvetter(a)suse.com</param>
++++++ klp-build-0~20240812.ad9f0e0.tar.xz -> klp-build-0~20240814.5dae2ec.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/klp-build-0~20240812.ad9f0e0/klpbuild/config.py new/klp-build-0~20240814.5dae2ec/klpbuild/config.py
--- old/klp-build-0~20240812.ad9f0e0/klpbuild/config.py 2024-08-12 22:38:35.000000000 +0200
+++ new/klp-build-0~20240814.5dae2ec/klpbuild/config.py 2024-08-15 01:49:34.000000000 +0200
@@ -152,7 +152,7 @@
err = subprocess.run(["quilt", "pop", "-a"], cwd=sdir, stderr=fil, stdout=fil)
if err.returncode not in [0, 2]:
- raise RuntimeError(f"{cs}: quilt pop failed: {err.stderr}")
+ raise RuntimeError(f"{cs}: quilt pop failed on {sdir}: ({err.returncode}) {err.stderr}")
shutil.rmtree(patches_dir, ignore_errors=True)
shutil.rmtree(Path(sdir, ".pc"), ignore_errors=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/klp-build-0~20240812.ad9f0e0/klpbuild/ibs.py new/klp-build-0~20240814.5dae2ec/klpbuild/ibs.py
--- old/klp-build-0~20240812.ad9f0e0/klpbuild/ibs.py 2024-08-12 22:38:35.000000000 +0200
+++ new/klp-build-0~20240814.5dae2ec/klpbuild/ibs.py 2024-08-15 01:49:34.000000000 +0200
@@ -183,18 +183,23 @@
# Create a list of paths pointing to lib/modules for each downloaded
# codestream
- for cs in cs_list:
+ for cs, data in cs_list.items():
for arch in self.get_cs_archs(cs):
+ kname = data["kernel"] + "-default"
+ if data.get("rt", ""):
+ kname = data['kernel'] + "-rt"
+
# Extract modules and vmlinux files that are compressed
- mod_path = Path(self.get_data_dir(arch), "lib", "modules")
+ mod_path = Path(self.get_data_dir(arch), "lib", "modules", kname)
for fext, ecmd in [("zst", "unzstd -f -d"), ("xz", "xz --quiet -d -k")]:
cmd = rf'find {mod_path} -name "*ko.{fext}" -exec {ecmd} --quiet {{}} \;'
subprocess.check_output(cmd, shell=True)
- # Extract all gzipped files under arch//boot, including vmlinux,
- # symvers and maybe others.
- vmlinux_path = Path(self.get_data_dir(arch), "boot")
- subprocess.check_output(rf'find {vmlinux_path} -name "*gz" -exec gzip -k -d -f {{}} \;', shell=True)
+ # Extract gzipped vmlinux per arch
+ vmlinux_path = Path(self.get_data_dir(arch), "boot", f"vmlinux-{kname}.gz")
+ # ppc64le doesn't gzips vmlinux
+ if vmlinux_path.exists():
+ subprocess.check_output(rf'gzip -k -d -f {vmlinux_path}', shell=True)
# Use the SLE .config
shutil.copy(self.get_cs_kernel_config(cs, ARCH), Path(self.get_odir(cs), ".config"))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/klp-build-0~20240812.ad9f0e0/klpbuild/setup.py new/klp-build-0~20240814.5dae2ec/klpbuild/setup.py
--- old/klp-build-0~20240812.ad9f0e0/klpbuild/setup.py 2024-08-12 22:38:35.000000000 +0200
+++ new/klp-build-0~20240814.5dae2ec/klpbuild/setup.py 2024-08-15 01:49:34.000000000 +0200
@@ -275,6 +275,7 @@
logging.info(f'\t{" ".join(data_missing.keys())}\n')
ibs = IBS(self.lp_name, self.filter, self.working_cs)
ibs.download_cs_data(data_missing)
+ logging.info("Done.")
def setup_project_files(self):
self.lp_path.mkdir(exist_ok=True)
@@ -291,6 +292,7 @@
else:
self.setup_codestreams()
+ logging.info("Checking files, symbols, modules...")
# Setup the missing codestream info needed
for cs, data in self.working_cs.items():
# Check if the files exist in the respective codestream directories
@@ -341,3 +343,5 @@
# cpp will use this data in the next step
with open(self.conf_file, "w") as f:
f.write(json.dumps(self.conf, indent=4))
+
+ logging.info("Done. Setup finished.")
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package clang-extract for openSUSE:Factory checked in at 2024-08-16 12:23:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/clang-extract (Old)
and /work/SRC/openSUSE:Factory/.clang-extract.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "clang-extract"
Fri Aug 16 12:23:33 2024 rev:12 rq:1194033 version:0~20240814.272ac2e
Changes:
--------
--- /work/SRC/openSUSE:Factory/clang-extract/clang-extract.changes 2024-08-14 14:16:49.189477427 +0200
+++ /work/SRC/openSUSE:Factory/.clang-extract.new.2698/clang-extract.changes 2024-08-16 12:24:03.992070818 +0200
@@ -1,0 +2,10 @@
+Thu Aug 15 04:21:56 UTC 2024 - mvetter(a)suse.com
+
+- Update to version 0~20240814.272ac2e:
+ * Drop VectorRef in favor of ArrayRef
+ * Fix copyright headers
+ * Drop use of `dynamic_cast` in favor of `dyn_cast`
+ * ElfCXX: Convert decompress_gz to use DecompressedObj attribute
+ * ElfCXX: Make decompress methods access ElfFd directly
+
+-------------------------------------------------------------------
Old:
----
clang-extract-0~20240813.82f77f7.tar.xz
New:
----
clang-extract-0~20240814.272ac2e.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ clang-extract.spec ++++++
--- /var/tmp/diff_new_pack.8tWyQ2/_old 2024-08-16 12:24:04.472090766 +0200
+++ /var/tmp/diff_new_pack.8tWyQ2/_new 2024-08-16 12:24:04.476090933 +0200
@@ -17,7 +17,7 @@
Name: clang-extract
-Version: 0~20240813.82f77f7
+Version: 0~20240814.272ac2e
Release: 0
Summary: A tool to extract code content from source files
License: Apache-2.0 WITH LLVM-exception AND NCSA
++++++ _service ++++++
--- /var/tmp/diff_new_pack.8tWyQ2/_old 2024-08-16 12:24:04.512092429 +0200
+++ /var/tmp/diff_new_pack.8tWyQ2/_new 2024-08-16 12:24:04.516092595 +0200
@@ -2,7 +2,7 @@
<service name="tar_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://github.com/SUSE/clang-extract</param>
- <param name="revision">82f77f742869693880658b2159b71e0b82e2a0ac</param>
+ <param name="revision">272ac2e328a2e15dab5b97bf77b35a2cefc59ef5</param>
<param name="versionformat">0~%cd.%h</param>
<param name="changesgenerate">enable</param>
<param name="changesauthor">mvetter(a)suse.com</param>
++++++ clang-extract-0~20240813.82f77f7.tar.xz -> clang-extract-0~20240814.272ac2e.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-extract-0~20240813.82f77f7/libcextract/ClangCompat.hh new/clang-extract-0~20240814.272ac2e/libcextract/ClangCompat.hh
--- old/clang-extract-0~20240813.82f77f7/libcextract/ClangCompat.hh 2024-08-13 16:33:53.000000000 +0200
+++ new/clang-extract-0~20240814.272ac2e/libcextract/ClangCompat.hh 2024-08-14 19:15:03.000000000 +0200
@@ -1,34 +1,16 @@
-/*
- * clang-extract - Extract functions from projects and its dependencies using
- * libclang and LLVM infrastructure.
- *
- * Copyright (C) 2024 SUSE Software Solutions GmbH
- *
- * This file is part of clang-extract.
- *
- * clang-extract is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * clang-extract is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with clang-extract. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-/** Header providing compatibility with older versions of clang.
- *
- * Clang API often have minor changes across versions. For this tool to be
- * compatible with multiple versions, we have to provide a minimal interface
- * between them.
- *
- * Author: Giuliano Belinassi
- */
+//===- ClangCompat.hh - Compatibility layer for multiple clang versions *- C++ -*-===//
+//
+// This project is licensed under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+/// \file
+/// This file provides a compatibility layer to clang-extract for it to compile
+/// with multiple versions of clang and LLVM.
+//
+//===----------------------------------------------------------------------===//
#pragma once
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-extract-0~20240813.82f77f7/libcextract/Closure.cpp new/clang-extract-0~20240814.272ac2e/libcextract/Closure.cpp
--- old/clang-extract-0~20240813.82f77f7/libcextract/Closure.cpp 2024-08-13 16:33:53.000000000 +0200
+++ new/clang-extract-0~20240814.272ac2e/libcextract/Closure.cpp 2024-08-14 19:15:03.000000000 +0200
@@ -523,12 +523,11 @@
bool DeclClosureVisitor::AnalyzeDeclsWithSameBeginlocHelper(Decl *decl)
{
SourceManager &SM = AST->getSourceManager();
- VectorRef<Decl *> decls = Get_Toplev_Decls_With_Same_Beginloc(AST,
- SM.getExpansionLoc(decl->getBeginLoc()));
- unsigned n = decls.getSize();
- Decl **array = decls.getPointer();
- for (unsigned i = 0; i < n; i++) {
- TRY_TO(TraverseDecl(array[i]));
+ ArrayRef<Decl *> decls = Get_Toplev_Decls_With_Same_Beginloc(AST,
+ SM.getExpansionLoc(decl->getBeginLoc()));
+
+ for (auto it = decls.begin(); it != decls.end(); ++it) {
+ TRY_TO(TraverseDecl(*it));
}
return VISITOR_CONTINUE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-extract-0~20240813.82f77f7/libcextract/ElfCXX.cpp new/clang-extract-0~20240814.272ac2e/libcextract/ElfCXX.cpp
--- old/clang-extract-0~20240813.82f77f7/libcextract/ElfCXX.cpp 2024-08-13 16:33:53.000000000 +0200
+++ new/clang-extract-0~20240814.272ac2e/libcextract/ElfCXX.cpp 2024-08-14 19:15:03.000000000 +0200
@@ -112,7 +112,7 @@
/* gzip magic number (zlib) */
case FileHandling::FILE_TYPE_GZ: {
try {
- ElfObj = decompress_gz(ElfFd);
+ ElfObj = decompress_gz();
close(ElfFd);
ElfFd = -1;
} catch (const std::runtime_error &error) {
@@ -125,7 +125,7 @@
/* zstd magic number */
case FileHandling::FILE_TYPE_ZSTD: {
try {
- ElfObj = decompress_zstd(ElfFd);
+ ElfObj = decompress_zstd();
close(ElfFd);
ElfFd = -1;
} catch (const std::runtime_error &error) {
@@ -159,7 +159,7 @@
}
}
-Elf *ElfObject::decompress_gz(int fd)
+Elf *ElfObject::decompress_gz(void)
{
const size_t CHUNK = 16384;
@@ -168,9 +168,9 @@
unsigned char out[CHUNK];
unsigned long dest_size = CHUNK;
- unsigned char *dest = (unsigned char *)malloc(CHUNK);
- if (!dest)
- throw std::runtime_error("zlib dest malloc failed\n");
+ DecompressedObj = (unsigned char *)malloc(CHUNK);
+ if (!DecompressedObj)
+ throw std::runtime_error("zlib malloc failed\n");
unsigned long dest_current = 0;
@@ -184,7 +184,7 @@
/* decompress until deflate stream ends or end of file */
do {
- strm.avail_in = read(fd, in, CHUNK);
+ strm.avail_in = read(ElfFd, in, CHUNK);
if (strm.avail_in < 0)
throw std::runtime_error("zlib read failed: " + std::to_string(strm.avail_in) + "\n");
@@ -212,10 +212,10 @@
/* double the buffer when needed */
if (have > dest_size - dest_current) {
dest_size = dest_size * 2;
- dest = (unsigned char *)realloc(dest, dest_size);
+ DecompressedObj = (unsigned char *)realloc(DecompressedObj, dest_size);
}
- memcpy(dest + dest_current, out, have);
+ memcpy(DecompressedObj + dest_current, out, have);
dest_current += have;
} while (strm.avail_out == 0);
@@ -227,18 +227,14 @@
if (ret != Z_STREAM_END)
throw std::runtime_error("zlib inflateEnd error: " + std::to_string(ret) + "\n");
- Elf *elf = elf_memory((char *)dest, ret);
- if (elf == nullptr) {
- free(dest);
+ Elf *elf = elf_memory((char *)DecompressedObj, ret);
+ if (elf == nullptr)
throw std::runtime_error("libelf elf_memory error: " + std::string(elf_errmsg(elf_errno())));
- }
-
- free(dest);
return elf;
}
-Elf *ElfObject::decompress_zstd(int fd)
+Elf *ElfObject::decompress_zstd()
{
size_t buffInSize = ZSTD_DStreamInSize();
unsigned char buffIn[buffInSize];
@@ -258,7 +254,7 @@
throw std::runtime_error("zstd createDCtx failed\n");
size_t bytes_read;
- while ((bytes_read = read(fd, buffIn, buffInSize)) ) {
+ while ((bytes_read = read(ElfFd, buffIn, buffInSize)) ) {
if (bytes_read < 0) {
ZSTD_freeDCtx(dctx);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-extract-0~20240813.82f77f7/libcextract/ElfCXX.hh new/clang-extract-0~20240814.272ac2e/libcextract/ElfCXX.hh
--- old/clang-extract-0~20240813.82f77f7/libcextract/ElfCXX.hh 2024-08-13 16:33:53.000000000 +0200
+++ new/clang-extract-0~20240814.272ac2e/libcextract/ElfCXX.hh 2024-08-14 19:15:03.000000000 +0200
@@ -239,8 +239,8 @@
return ElfObj;
}
- static Elf *decompress_gz(int fd);
- Elf *decompress_zstd(int fd);
+ Elf *decompress_gz(void);
+ Elf *decompress_zstd(void);
/** Iterator class for ELF sections. With this one can use C++ iterators
* to iterate through all sections of the ELF file. Like this:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-extract-0~20240813.82f77f7/libcextract/ExpansionPolicy.cpp new/clang-extract-0~20240814.272ac2e/libcextract/ExpansionPolicy.cpp
--- old/clang-extract-0~20240813.82f77f7/libcextract/ExpansionPolicy.cpp 2024-08-13 16:33:53.000000000 +0200
+++ new/clang-extract-0~20240814.272ac2e/libcextract/ExpansionPolicy.cpp 2024-08-14 19:15:03.000000000 +0200
@@ -11,28 +11,6 @@
//
//===----------------------------------------------------------------------===//
-/*
- * clang-extract - Extract functions from projects and its dependencies using
- * libclang and LLVM infrastructure.
- *
- * Copyright (C) 2024 SUSE Software Solutions GmbH
- *
- * This file is part of clang-extract.
- *
- * clang-extract is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * clang-extract is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with clang-extract. If not, see <http://www.gnu.org/licenses/>.
- */
-
/* Author: Giuliano Belinassi, Marcos Paulo de Souza. */
#include "ExpansionPolicy.hh"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-extract-0~20240813.82f77f7/libcextract/FunctionDepsFinder.cpp new/clang-extract-0~20240814.272ac2e/libcextract/FunctionDepsFinder.cpp
--- old/clang-extract-0~20240813.82f77f7/libcextract/FunctionDepsFinder.cpp 2024-08-13 16:33:53.000000000 +0200
+++ new/clang-extract-0~20240814.272ac2e/libcextract/FunctionDepsFinder.cpp 2024-08-14 19:15:03.000000000 +0200
@@ -90,7 +90,7 @@
which is a redeclaration of enum Hand. Hence we have to remove the
first `enum Hand` from the closure. See typedef-7.c testcase. */
- if (TypedefDecl *decl = dynamic_cast<TypedefDecl *>(*it)) {
+ if (TypedefDecl *decl = dyn_cast<TypedefDecl>(*it)) {
SourceRange range = decl->getSourceRange();
const clang::Type *type = decl->getTypeForDecl();
@@ -150,7 +150,7 @@
this will remove the first enum declaration because the location
tracking will correctly include the enum system_states. */
- else if (DeclaratorDecl *decl = dynamic_cast<DeclaratorDecl *>(*it)) {
+ else if (DeclaratorDecl *decl = dyn_cast<DeclaratorDecl>(*it)) {
SourceRange range = decl->getSourceRange();
const clang::Type *type = ClangCompat::getTypePtr(decl->getType());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-extract-0~20240813.82f77f7/libcextract/FunctionExternalizeFinder.cpp new/clang-extract-0~20240814.272ac2e/libcextract/FunctionExternalizeFinder.cpp
--- old/clang-extract-0~20240813.82f77f7/libcextract/FunctionExternalizeFinder.cpp 2024-08-13 16:33:53.000000000 +0200
+++ new/clang-extract-0~20240814.272ac2e/libcextract/FunctionExternalizeFinder.cpp 2024-08-14 19:15:03.000000000 +0200
@@ -44,7 +44,12 @@
bool FunctionExternalizeFinder::Should_Externalize(CallGraphNode *node)
{
- return Should_Externalize(dynamic_cast<FunctionDecl *>(node->getDecl()));
+ Decl *decl = node->getDecl();
+ if (decl) {
+ return Should_Externalize(dyn_cast<FunctionDecl>(decl));
+ }
+
+ return false;
}
bool FunctionExternalizeFinder::Should_Externalize(const DeclaratorDecl *decl)
@@ -125,7 +130,8 @@
bool FunctionExternalizeFinder::Analyze_Node(CallGraphNode *node)
{
- FunctionDecl *decl = dynamic_cast<FunctionDecl *>(node->getDecl());
+ Decl *ndecl = node->getDecl();
+ FunctionDecl *decl = ndecl ? dyn_cast<FunctionDecl>(ndecl) : nullptr;
if (Is_Already_Analyzed(node)) {
return false;
@@ -170,7 +176,7 @@
if (DeclRefExpr::classof(stmt)) {
DeclRefExpr *expr = (DeclRefExpr *) stmt;
- DeclaratorDecl *decl = dynamic_cast<DeclaratorDecl *>(expr->getDecl());
+ DeclaratorDecl *decl = dyn_cast<DeclaratorDecl>(expr->getDecl());
if (Should_Externalize(decl)) {
externalized = Mark_For_Externalization(decl->getNameAsString());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-extract-0~20240813.82f77f7/libcextract/FunctionExternalizeFinder.hh new/clang-extract-0~20240814.272ac2e/libcextract/FunctionExternalizeFinder.hh
--- old/clang-extract-0~20240813.82f77f7/libcextract/FunctionExternalizeFinder.hh 2024-08-13 16:33:53.000000000 +0200
+++ new/clang-extract-0~20240814.272ac2e/libcextract/FunctionExternalizeFinder.hh 2024-08-14 19:15:03.000000000 +0200
@@ -1,24 +1,15 @@
-/*
- * clang-extract - Extract functions from projects and its dependencies using
- * libclang and LLVM infrastructure.
- *
- * Copyright (C) 2024 SUSE Software Solutions GmbH
- *
- * This file is part of clang-extract.
- *
- * clang-extract is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * clang-extract is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with clang-extract. If not, see <http://www.gnu.org/licenses/>.
- */
+//===- FunctionExternalizeFinder.hh - Find symbols to be externalized *- C++ -*-===//
+//
+// This project is licensed under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+/// \file
+/// Finds which symbols must be externalized when extracting functions.
+//
+//===----------------------------------------------------------------------===//
/* Author: Giuliano Belinassi */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-extract-0~20240813.82f77f7/libcextract/LLVMMisc.cpp new/clang-extract-0~20240814.272ac2e/libcextract/LLVMMisc.cpp
--- old/clang-extract-0~20240813.82f77f7/libcextract/LLVMMisc.cpp 2024-08-13 16:33:53.000000000 +0200
+++ new/clang-extract-0~20240814.272ac2e/libcextract/LLVMMisc.cpp 2024-08-14 19:15:03.000000000 +0200
@@ -160,7 +160,7 @@
return nullptr;
}
-VectorRef<Decl *> Get_Toplev_Decls_With_Same_Beginloc(ASTUnit *ast, const SourceLocation &loc)
+ArrayRef<Decl *> Get_Toplev_Decls_With_Same_Beginloc(ASTUnit *ast, const SourceLocation &loc)
{
SourceManager &SM = ast->getSourceManager();
/* We don't have a way of accessing the TopLevel vector directly, hence we
@@ -204,7 +204,7 @@
}
}
- return VectorRef(&array[last_l], &array[last_h]);
+ return ArrayRef(&array[last_l], &array[last_h+1]);
}
if (SM.isBeforeInTranslationUnit(begin, loc)) {
@@ -214,7 +214,7 @@
}
}
- return VectorRef<Decl *>(nullptr, 0U);
+ return ArrayRef<Decl *>(nullptr, 0UL);
}
std::string Build_CE_Location_Comment(SourceManager &sm, const SourceLocation &loc)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-extract-0~20240813.82f77f7/libcextract/LLVMMisc.hh new/clang-extract-0~20240814.272ac2e/libcextract/LLVMMisc.hh
--- old/clang-extract-0~20240813.82f77f7/libcextract/LLVMMisc.hh 2024-08-13 16:33:53.000000000 +0200
+++ new/clang-extract-0~20240814.272ac2e/libcextract/LLVMMisc.hh 2024-08-14 19:15:03.000000000 +0200
@@ -81,7 +81,7 @@
Decl *Get_Toplevel_Decl_At_Location(ASTUnit *ast, const SourceLocation &loc);
/* Get Toplevel decls with same beginloc. */
-VectorRef<Decl *> Get_Toplev_Decls_With_Same_Beginloc(ASTUnit *ast, const SourceLocation &loc);
+ArrayRef<Decl *> Get_Toplev_Decls_With_Same_Beginloc(ASTUnit *ast, const SourceLocation &loc);
/** Build a clang-extract location comment. */
std::string Build_CE_Location_Comment(SourceManager &sm, const SourceLocation &loc);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-extract-0~20240813.82f77f7/libcextract/NonLLVMMisc.hh new/clang-extract-0~20240814.272ac2e/libcextract/NonLLVMMisc.hh
--- old/clang-extract-0~20240813.82f77f7/libcextract/NonLLVMMisc.hh 2024-08-13 16:33:53.000000000 +0200
+++ new/clang-extract-0~20240814.272ac2e/libcextract/NonLLVMMisc.hh 2024-08-14 19:15:03.000000000 +0200
@@ -79,43 +79,6 @@
/** Check if output supports colors. */
bool check_color_available(void);
-/** Vector reference. */
-template <typename T>
-class VectorRef
-{
- public:
- VectorRef(T *reference, unsigned size)
- : Ref(reference),
- Size(size)
- {
- }
-
- VectorRef(T *base, T *top)
- {
- if (base == nullptr) {
- Ref = nullptr, Size = 0;
- return;
- }
-
- Ref = base;
- Size = ((ptrdiff_t)top - (ptrdiff_t)base)/sizeof(T) + 1;
- }
-
- inline T *getPointer(void)
- {
- return Ref;
- }
-
- inline unsigned getSize(void)
- {
- return Size;
- }
-
- private:
- T *Ref;
- unsigned Size;
-};
-
class FileHandling
{
public:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-extract-0~20240813.82f77f7/libcextract/PrettyPrint.cpp new/clang-extract-0~20240814.272ac2e/libcextract/PrettyPrint.cpp
--- old/clang-extract-0~20240813.82f77f7/libcextract/PrettyPrint.cpp 2024-08-13 16:33:53.000000000 +0200
+++ new/clang-extract-0~20240814.272ac2e/libcextract/PrettyPrint.cpp 2024-08-14 19:15:03.000000000 +0200
@@ -31,9 +31,9 @@
with body. If yes, we can simply print the declaration, but otherwise
we need to manually insert the end of statement ';' token. */
- FunctionDecl *f = dynamic_cast<FunctionDecl*>(decl);
- TagDecl *t = dynamic_cast<TagDecl*>(decl);
- EnumDecl *e = dynamic_cast<EnumDecl*>(decl);
+ FunctionDecl *f = dyn_cast<FunctionDecl>(decl);
+ TagDecl *t = dyn_cast<TagDecl>(decl);
+ EnumDecl *e = dyn_cast<EnumDecl>(decl);
if (f && f->hasBody() && f->isThisDeclarationADefinition()) {
Print_Decl_Raw(f);
@@ -573,7 +573,7 @@
/* Handle namespaces. Namespace declaration can contain many functions
that can be unused in the program. Hence we need to handle it
carefully to remove what we don't need. */
- if (NamespaceDecl *namespacedecl = dynamic_cast<NamespaceDecl*>(decl)) {
+ if (NamespaceDecl *namespacedecl = dyn_cast<NamespaceDecl>(decl)) {
if (namespacedecl->isInline()) {
(*PrettyPrint::Out) << "inline ";
}
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package foot for openSUSE:Factory checked in at 2024-08-16 12:23:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/foot (Old)
and /work/SRC/openSUSE:Factory/.foot.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "foot"
Fri Aug 16 12:23:32 2024 rev:35 rq:1194032 version:1.18.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/foot/foot.changes 2024-08-03 20:05:05.420414787 +0200
+++ /work/SRC/openSUSE:Factory/.foot.new.2698/foot.changes 2024-08-16 12:24:03.040031251 +0200
@@ -1,0 +2,14 @@
+Wed Aug 14 16:27:10 UTC 2024 - Arnav Singh <opensuse(a)arnavion.dev>
+
+- Update to v1.18.1:
+ * foot.ini options:
+ * desktop-notifications.command config can now also use "${muted}"
+ and "${sound-name}" in its template value.
+ * CSD buttons now activate on mouse button release, rather than press.
+ * Desktop notifications via OSC-99 sequence can now choose to play
+ a particular sound or mute the sound.
+ * Fixed bug in OSC-111 sequence used to reset background color not handling
+ alpha changes correctly, causing visual glitches.
+ * See https://codeberg.org/dnkl/foot/releases/tag/1.18.1 for more details.
+
+-------------------------------------------------------------------
Old:
----
foot-1.18.0.tar.gz
foot-1.18.0.tar.gz.sig
New:
----
foot-1.18.1.tar.gz
foot-1.18.1.tar.gz.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ foot.spec ++++++
--- /var/tmp/diff_new_pack.jOeSi3/_old 2024-08-16 12:24:03.676057684 +0200
+++ /var/tmp/diff_new_pack.jOeSi3/_new 2024-08-16 12:24:03.680057850 +0200
@@ -20,7 +20,7 @@
%define _distconfdir %{_sysconfdir}
%endif
Name: foot
-Version: 1.18.0
+Version: 1.18.1
Release: 0
Summary: A Wayland terminal emulator
License: MIT
++++++ foot-1.18.0.tar.gz -> foot-1.18.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/CHANGELOG.md new/foot-1.18.1/CHANGELOG.md
--- old/foot-1.18.0/CHANGELOG.md 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/CHANGELOG.md 2024-08-14 12:00:20.000000000 +0200
@@ -1,5 +1,6 @@
# Changelog
+* [1.18.1](#1-18-1)
* [1.18.0](#1-18-0)
* [1.17.2](#1-17-2)
* [1.17.1](#1-17-1)
@@ -52,6 +53,37 @@
* [1.2.0](#1-2-0)
+## 1.18.1
+
+### Added
+
+* OSC-99: support for the `s` parameter. Supported keywords are
+ `silent`, `system` and names from the freedesktop sound naming
+ specification.
+* `${muted}` and `${sound-name}` added to the
+ `desktop-notifications.command` template.
+
+
+### Changed
+
+* CSD buttons now activate on mouse button **release**, rather than
+ press ([#1787][1787]).
+
+
+### Fixed
+
+* Regression: OSC-111 not handling alpha changes correctly, causing
+ visual glitches ([#1801][1801]).
+
+[1801]: https://codeberg.org/dnkl/foot/issues/1801
+
+
+### Contributors
+
+* Craig Barnes
+* Shogo Yamazaki
+
+
## 1.18.0
### Added
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/README.md new/foot-1.18.1/README.md
--- old/foot-1.18.0/README.md 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/README.md 2024-08-14 12:00:20.000000000 +0200
@@ -3,10 +3,8 @@
The fast, lightweight and minimalistic Wayland terminal emulator.
[![CI status](https://ci.codeberg.org/api/badges/dnkl/foot/status.svg)](https://c…
-[![Pipeline status](https://gitlab.com/dnkl/foot/badges/master/pipeline.svg)](https://g…
-[![builds.sr.ht status](https://builds.sr.ht/~dnkl/foot.svg)](https://builds.sr.ht/~dnkl/foot?)
-[![Packaging status](https://repology.org/badge/vertical-allrepos/foot.svg)](https://rep…
+[![Packaging status](https://repology.org/badge/vertical-allrepos/foot.svg?columns=4)](h…
## Index
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/config.c new/foot-1.18.1/config.c
--- old/foot-1.18.0/config.c 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/config.c 2024-08-14 12:00:20.000000000 +0200
@@ -356,9 +356,9 @@
/* First, check XDG_CONFIG_HOME (or .config, if unset) */
if (xdg_config_home != NULL && xdg_config_home[0] != '\0')
- path = xstrjoin(xdg_config_home, "/foot/foot.ini", 0);
+ path = xstrjoin(xdg_config_home, "/foot/foot.ini");
else if (home_dir != NULL)
- path = xstrjoin(home_dir, "/.config/foot/foot.ini", 0);
+ path = xstrjoin(home_dir, "/.config/foot/foot.ini");
if (path != NULL) {
LOG_DBG("checking for %s", path);
@@ -383,7 +383,7 @@
conf_dir = strtok(NULL, ":"))
{
free(path);
- path = xstrjoin(conf_dir, "/foot/foot.ini", 0);
+ path = xstrjoin(conf_dir, "/foot/foot.ini");
LOG_DBG("checking for %s", path);
int fd = open(path, O_RDONLY | O_CLOEXEC);
@@ -843,7 +843,7 @@
return false;
}
- _include_path = xasprintf("%s/%s", home_dir, value + 2);
+ _include_path = xstrjoin3(home_dir, "/", value + 2);
include_path = _include_path;
} else
include_path = value;
@@ -2931,7 +2931,7 @@
const char *wayland_display = getenv("WAYLAND_DISPLAY");
if (wayland_display == NULL) {
- return xstrjoin(xdg_runtime, "/foot.sock", 0);
+ return xstrjoin(xdg_runtime, "/foot.sock");
}
return xasprintf("%s/foot-%s.sock", xdg_runtime, wayland_display);
@@ -3242,7 +3242,7 @@
parse_modifiers(XKB_MOD_NAME_SHIFT, 5, &conf->mouse.selection_override_modifiers);
tokenize_cmdline(
- "notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body}",
+ "notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --hint BOOLEAN:suppress-sound:${muted} --hint STRING:sound-name:${sound-name} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body}",
&conf->desktop_notifications.command.argv.args);
tokenize_cmdline("--action ${action-name}=${action-label}", &conf->desktop_notifications.command_action_arg.argv.args);
tokenize_cmdline("xdg-open ${url}", &conf->url.launch.argv.args);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/doc/foot.ini.5.scd new/foot-1.18.1/doc/foot.ini.5.scd
--- old/foot-1.18.0/doc/foot.ini.5.scd 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/doc/foot.ini.5.scd 2024-08-14 12:00:20.000000000 +0200
@@ -179,9 +179,10 @@
Default: _unset_
-*box-drawings-uses-font-glyphs* Boolean. When disabled, foot generates
- box/line drawing characters itself. The are several advantages to
- doing this instead of using font glyphs:
+*box-drawings-uses-font-glyphs*
+ Boolean. When disabled, foot generates box/line drawing characters
+ itself. The are several advantages to doing this instead of using
+ font glyphs:
- No antialiasing effects where e.g. line endpoints appear
dimmed down, or blurred.
@@ -195,6 +196,13 @@
When enabled, box/line drawing characters are rendered using font
glyphs. This may result in a more uniform look, in some use cases.
+ When disabled, foot will render the following Unicode codepoints
+ by itself:
+
+ - U+02500 - U+0259F
+ - U+02800 - U+028FF
+ - U+1Fb00 - U+1FB9B
+
Default: _no_.
*dpi-aware*
@@ -459,6 +467,17 @@
below. Can be used together with e.g. notify-send's
*--replace-id* option.
+ _${muted}_ is replaced by either *true* or *false*, depending
+ on whether the notification has requested all notification
+ sounds be muted. It is intended to set the *suppress-sound*
+ hint (with e.g. notify-send's *--hint* option).
+
+ _${sound-name}_ is replaced by sound-name requested by the
+ notification. This should be a name from the freedesktop sound
+ naming specification, but this is not something that foot
+ enforces. It is intended to set the *sound-name* hint (with
+ e.g. notify-send's *--hint* option).
+
_${action-argument}_ will be expanded to the
*command-action-argument* option, for each notification
action. There will always be at least one action, the
@@ -568,6 +587,8 @@
--urgency ${urgency}++
--expire-time ${expire-time}++
--hint STRING:image-path:${icon}++
+ --hint BOOLEAN:suppress-sound:${muted}++
+ --hint STRING:sound-name:${sound-name}++
--replace-id ${replace-id}++
${action-argument}++
--print-id++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/foot.ini new/foot-1.18.1/foot.ini
--- old/foot-1.18.0/foot.ini 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/foot.ini 2024-08-14 12:00:20.000000000 +0200
@@ -47,7 +47,7 @@
# command-focused=no
[desktop-notifications]
-# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body}
+# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --hint BOOLEAN:suppress-sound:${muted} --hint STRING:sound-name:${sound-name} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body}
# command-action-argument=--action ${action-name}=${action-label}
# close=""
# inhibit-when-focused=yes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/input.c new/foot-1.18.1/input.c
--- old/foot-1.18.0/input.c 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/input.c 2024-08-14 12:00:20.000000000 +0200
@@ -2053,6 +2053,25 @@
}
}
+static bool
+pointer_is_on_button(const struct terminal *term, const struct seat *seat,
+ enum csd_surface csd_surface)
+{
+ if (seat->mouse.x < 0)
+ return false;
+ if (seat->mouse.y < 0)
+ return false;
+
+ struct csd_data info = get_csd_data(term, csd_surface);
+ if (seat->mouse.x > info.width)
+ return false;
+
+ if (seat->mouse.y > info.height)
+ return false;
+
+ return true;
+}
+
static void
wl_pointer_motion(void *data, struct wl_pointer *wl_pointer,
uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y)
@@ -2085,16 +2104,42 @@
int x = wl_fixed_to_int(surface_x) * term->scale;
int y = wl_fixed_to_int(surface_y) * term->scale;
+ enum term_surface surf_kind = term->active_surface;
+ int button = 0;
+ bool send_to_client = false;
+ bool is_on_button = false;
+
+ /* If current surface is a button, check if pointer was on it
+ *before* the motion event */
+ switch (surf_kind) {
+ case TERM_SURF_BUTTON_MINIMIZE:
+ is_on_button = pointer_is_on_button(term, seat, CSD_SURF_MINIMIZE);
+ break;
+
+ case TERM_SURF_BUTTON_MAXIMIZE:
+ is_on_button = pointer_is_on_button(term, seat, CSD_SURF_MAXIMIZE);
+ break;
+
+ case TERM_SURF_BUTTON_CLOSE:
+ is_on_button = pointer_is_on_button(term, seat, CSD_SURF_CLOSE);
+ break;
+
+ case TERM_SURF_NONE:
+ case TERM_SURF_GRID:
+ case TERM_SURF_TITLE:
+ case TERM_SURF_BORDER_LEFT:
+ case TERM_SURF_BORDER_RIGHT:
+ case TERM_SURF_BORDER_TOP:
+ case TERM_SURF_BORDER_BOTTOM:
+ break;
+ }
+
seat->pointer.hidden = false;
seat->mouse.x = x;
seat->mouse.y = y;
term_xcursor_update_for_seat(term, seat);
- enum term_surface surf_kind = term->active_surface;
- int button = 0;
- bool send_to_client = false;
-
if (tll_length(seat->mouse.buttons) > 0) {
const struct button_tracker *tracker = &tll_front(seat->mouse.buttons);
surf_kind = tracker->surf_kind;
@@ -2104,9 +2149,21 @@
switch (surf_kind) {
case TERM_SURF_NONE:
+ break;
+
case TERM_SURF_BUTTON_MINIMIZE:
+ if (pointer_is_on_button(term, seat, CSD_SURF_MINIMIZE) != is_on_button)
+ render_refresh_csd(term);
+ break;
+
case TERM_SURF_BUTTON_MAXIMIZE:
+ if (pointer_is_on_button(term, seat, CSD_SURF_MAXIMIZE) != is_on_button)
+ render_refresh_csd(term);
+ break;
+
case TERM_SURF_BUTTON_CLOSE:
+ if (pointer_is_on_button(term, seat, CSD_SURF_CLOSE) != is_on_button)
+ render_refresh_csd(term);
break;
case TERM_SURF_TITLE:
@@ -2246,8 +2303,8 @@
}
static const struct key_binding *
- match_mouse_binding(const struct seat *seat, const struct terminal *term,
- int button)
+match_mouse_binding(const struct seat *seat, const struct terminal *term,
+ int button)
{
if (seat->wl_keyboard != NULL && seat->kbd.xkb_state != NULL) {
/* Seat has keyboard - use mouse bindings *with* modifiers */
@@ -2577,12 +2634,19 @@
}
case TERM_SURF_BUTTON_MINIMIZE:
- if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED)
+ if (button == BTN_LEFT &&
+ pointer_is_on_button(term, seat, CSD_SURF_MINIMIZE) &&
+ state == WL_POINTER_BUTTON_STATE_RELEASED)
+ {
xdg_toplevel_set_minimized(term->window->xdg_toplevel);
+ }
break;
case TERM_SURF_BUTTON_MAXIMIZE:
- if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ if (button == BTN_LEFT &&
+ pointer_is_on_button(term, seat, CSD_SURF_MAXIMIZE) &&
+ state == WL_POINTER_BUTTON_STATE_RELEASED)
+ {
if (term->window->is_maximized)
xdg_toplevel_unset_maximized(term->window->xdg_toplevel);
else
@@ -2591,8 +2655,12 @@
break;
case TERM_SURF_BUTTON_CLOSE:
- if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED)
+ if (button == BTN_LEFT &&
+ pointer_is_on_button(term, seat, CSD_SURF_CLOSE) &&
+ state == WL_POINTER_BUTTON_STATE_RELEASED)
+ {
term_shutdown(term);
+ }
break;
case TERM_SURF_GRID: {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/main.c new/foot-1.18.1/main.c
--- old/foot-1.18.0/main.c 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/main.c 2024-08-14 12:00:20.000000000 +0200
@@ -258,7 +258,7 @@
break;
case 't':
- tll_push_back(overrides, xstrjoin("term=", optarg, 0));
+ tll_push_back(overrides, xstrjoin("term=", optarg));
break;
case 'L':
@@ -266,11 +266,11 @@
break;
case 'T':
- tll_push_back(overrides, xstrjoin("title=", optarg, 0));
+ tll_push_back(overrides, xstrjoin("title=", optarg));
break;
case 'a':
- tll_push_back(overrides, xstrjoin("app-id=", optarg, 0));
+ tll_push_back(overrides, xstrjoin("app-id=", optarg));
break;
case 'D': {
@@ -284,7 +284,7 @@
}
case 'f': {
- char *font_override = xstrjoin("font=", optarg, 0);
+ char *font_override = xstrjoin("font=", optarg);
tll_push_back(overrides, font_override);
break;
}
@@ -425,19 +425,19 @@
* that does not exist on this system, then the above call may return
* NULL. We should just continue with the fallback method below.
*/
- LOG_WARN("setlocale() failed");
- locale = "C";
+ LOG_ERR("setlocale() failed. The most common cause is that the "
+ "configured locale is not available, or has been misspelled");
}
- LOG_INFO("locale: %s", locale);
+ LOG_INFO("locale: %s", locale != NULL ? locale : "<invalid>");
- bool bad_locale = !locale_is_utf8();
+ bool bad_locale = locale == NULL || !locale_is_utf8();
if (bad_locale) {
static const char fallback_locales[][12] = {
"C.UTF-8",
"en_US.UTF-8",
};
- char *saved_locale = xstrdup(locale);
+ char *saved_locale = locale != NULL ? xstrdup(locale) : NULL;
/*
* Try to force an UTF-8 locale. If we succeed, launch the
@@ -448,13 +448,23 @@
const char *const fallback_locale = fallback_locales[i];
if (setlocale(LC_CTYPE, fallback_locale) != NULL) {
- LOG_WARN("'%s' is not a UTF-8 locale, using '%s' instead",
- saved_locale, fallback_locale);
-
- user_notification_add_fmt(
- &user_notifications, USER_NOTIFICATION_WARNING,
- "'%s' is not a UTF-8 locale, using '%s' instead",
- saved_locale, fallback_locale);
+ if (saved_locale != NULL) {
+ LOG_WARN(
+ "'%s' is not a UTF-8 locale, falling back to '%s'",
+ saved_locale, fallback_locale);
+
+ user_notification_add_fmt(
+ &user_notifications, USER_NOTIFICATION_WARNING,
+ "'%s' is not a UTF-8 locale, falling back to '%s'",
+ saved_locale, fallback_locale);
+
+ } else {
+ LOG_WARN(
+ "invalid locale, falling back to '%s'", fallback_locale);
+ user_notification_add_fmt(
+ &user_notifications, USER_NOTIFICATION_WARNING,
+ "invalid locale, falling back to '%s'", fallback_locale);
+ }
bad_locale = false;
break;
@@ -462,14 +472,22 @@
}
if (bad_locale) {
- LOG_ERR(
- "'%s' is not a UTF-8 locale, and failed to find a fallback",
- saved_locale);
-
- user_notification_add_fmt(
- &user_notifications, USER_NOTIFICATION_ERROR,
- "'%s' is not a UTF-8 locale, and failed to find a fallback",
- saved_locale);
+ if (saved_locale != NULL) {
+ LOG_ERR(
+ "'%s' is not a UTF-8 locale, and failed to find a fallback",
+ saved_locale);
+
+ user_notification_add_fmt(
+ &user_notifications, USER_NOTIFICATION_ERROR,
+ "'%s' is not a UTF-8 locale, and failed to find a fallback",
+ saved_locale);
+ } else {
+ LOG_ERR("invalid locale, and failed to find a fallback");
+
+ user_notification_add_fmt(
+ &user_notifications, USER_NOTIFICATION_ERROR,
+ "invalid locale, and failed to find a fallback");
+ }
}
free(saved_locale);
}
@@ -658,15 +676,19 @@
UNITTEST
{
- char *s = xstrjoin("foo", "bar", 0);
+ char *s = xstrjoin("foo", "bar");
xassert(streq(s, "foobar"));
free(s);
- s = xstrjoin("foo", "bar", ' ');
+ s = xstrjoin3("foo", " ", "bar");
xassert(streq(s, "foo bar"));
free(s);
- s = xstrjoin("foo", "bar", ',');
+ s = xstrjoin3("foo", ",", "bar");
xassert(streq(s, "foo,bar"));
free(s);
+
+ s = xstrjoin3("foo", "bar", "baz");
+ xassert(streq(s, "foobarbaz"));
+ free(s);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/meson.build new/foot-1.18.1/meson.build
--- old/foot-1.18.0/meson.build 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/meson.build 2024-08-14 12:00:20.000000000 +0200
@@ -1,5 +1,5 @@
project('foot', 'c',
- version: '1.18.0',
+ version: '1.18.1',
license: 'MIT',
meson_version: '>=0.59.0',
default_options: [
@@ -12,12 +12,16 @@
cc = meson.get_compiler('c')
-if cc.has_function('memfd_create')
+if cc.has_function('memfd_create',
+ args: ['-D_GNU_SOURCE'],
+ prefix: '#include <sys/mman.h>')
add_project_arguments('-DMEMFD_CREATE', language: 'c')
endif
# Missing on DragonFly, FreeBSD < 14.1
-if cc.has_function('execvpe')
+if cc.has_function('execvpe',
+ args: ['-D_GNU_SOURCE'],
+ prefix: '#include <unistd.h>')
add_project_arguments('-DEXECVPE', language: 'c')
endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/notify.c new/foot-1.18.1/notify.c
--- old/foot-1.18.0/notify.c 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/notify.c 2024-08-14 12:00:20.000000000 +0200
@@ -34,6 +34,7 @@
free(notif->icon_cache_id);
free(notif->icon_symbolic_name);
free(notif->icon_data);
+ free(notif->sound_name);
free(notif->xdg_token);
free(notif->stdout_data);
@@ -77,7 +78,7 @@
LOG_DBG("wrote icon data to %s", name);
*filename = xstrdup(name);
- *symbolic_name = xasprintf("file://%s", *filename);
+ *symbolic_name = xstrjoin("file://", *filename);
return true;
}
@@ -421,9 +422,12 @@
? "normal" : "critical";
LOG_DBG("notify: title=\"%s\", body=\"%s\", app-id=\"%s\", category=\"%s\", "
- "urgency=\"%s\", icon=\"%s\", expires=%d, replaces=%u (tracking: %s)",
+ "urgency=\"%s\", icon=\"%s\", expires=%d, replaces=%u, muted=%s, "
+ "sound-name=%s (tracking: %s)",
title, body, app_id, notif->category, urgency_str, icon_name_or_path,
- notif->expire_time, replaces_id, track_notification ? "yes" : "no");
+ notif->expire_time, replaces_id,
+ notif->muted ? "yes" : "no", notif->sound_name,
+ track_notification ? "yes" : "no");
xassert(title != NULL);
if (title == NULL)
@@ -463,13 +467,16 @@
}
if (!spawn_expand_template(
- &term->conf->desktop_notifications.command, 10,
+ &term->conf->desktop_notifications.command, 12,
(const char *[]){
"app-id", "window-title", "icon", "title", "body", "category",
- "urgency", "expire-time", "replace-id", "action-argument"},
+ "urgency", "muted", "sound-name", "expire-time", "replace-id",
+ "action-argument"},
(const char *[]){
app_id, term->window_title, icon_name_or_path, title, body,
notif->category != NULL ? notif->category : "", urgency_str,
+ notif->muted ? "true" : "false",
+ notif->sound_name != NULL ? notif->sound_name : "",
expire_time, replaces_id_str,
/* Custom expansion below, since we need to expand to multiple arguments */
@@ -542,6 +549,7 @@
notif->icon_data = NULL;
notif->icon_data_sz = 0;
notif->icon_path = NULL;
+ notif->sound_name = NULL;
notif->icon_fd = -1;
notif->stdout_fd = -1;
struct notification *new_notif = &tll_back(term->active_notifications);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/notify.h new/foot-1.18.1/notify.h
--- old/foot-1.18.0/notify.h 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/notify.h 2024-08-14 12:00:20.000000000 +0200
@@ -52,6 +52,9 @@
bool report_activated; /* OSC-99: report notification activation to client */
bool report_closed; /* OSC-99: report notification closed to client */
+ bool muted; /* Explicitly mute the notification */
+ char *sound_name; /* Should be set to NULL if muted == true */
+
/*
* Used internally by notify
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/osc.c new/foot-1.18.1/osc.c
--- old/foot-1.18.0/osc.c 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/osc.c 2024-08-14 12:00:20.000000000 +0200
@@ -564,6 +564,33 @@
});
}
+IGNORE_WARNING("-Wpedantic")
+static bool
+verify_kitty_id_is_valid(const char *id)
+{
+ const size_t len = strlen(id);
+
+ for (size_t i = 0; i < len; i++) {
+ switch (id[i]) {
+ case 'a' ... 'z':
+ case 'A' ... 'Z':
+ case '0' ... '9':
+ case '_':
+ case '-':
+ case '+':
+ case '.':
+ break;
+
+ default:
+ return false;
+ }
+ }
+
+ return true;
+}
+UNIGNORE_WARNINGS
+
+
static void
kitty_notification(struct terminal *term, char *string)
{
@@ -582,6 +609,7 @@
char *icon_cache_id = NULL; /* The 'g' parameter */
char *symbolic_icon = NULL; /* The 'n' parameter */
char *category = NULL; /* The 't' parameter */
+ char *sound_name = NULL; /* The 's' parameter */
char *payload = NULL;
bool focus = true; /* The 'a' parameter */
@@ -672,8 +700,11 @@
case 'i':
/* id */
- free(id);
- id = xstrdup(value);
+ if (verify_kitty_id_is_valid(value)) {
+ free(id);
+ id = xstrdup(value);
+ } else
+ LOG_WARN("OSC-99: ignoring invalid 'i' identifier");
break;
case 'p':
@@ -709,7 +740,7 @@
char reply[128];
int n = xsnprintf(
reply, sizeof(reply),
- "\033]99;i=%s:p=?;p=%s:a=%s:o=%s:u=%s:c=1:w=1%s",
+ "\033]99;i=%s:p=?;p=%s:a=%s:o=%s:u=%s:c=1:w=1:s=system,silent,error,warn,warning,info,question%s",
reply_id, p_caps, a_caps, when_caps, u_caps, terminator);
xassert(n < sizeof(reply));
@@ -753,10 +784,15 @@
break;
}
- case 'f':
- free(app_id);
- app_id = base64_decode(value, NULL);
+ case 'f': {
+ /* App-name */
+ char *decoded = base64_decode(value, NULL);
+ if (decoded != NULL) {
+ free(app_id);
+ app_id = decoded;
+ }
break;
+ }
case 't': {
/* Type (category) */
@@ -767,7 +803,7 @@
else {
/* Append, comma separated */
char *old_category = category;
- category = xstrjoin(old_category, decoded, ',');
+ category = xstrjoin3(old_category, ",", decoded);
free(decoded);
free(old_category);
}
@@ -775,6 +811,32 @@
break;
}
+ case 's': {
+ /* Sound */
+ char *decoded = base64_decode(value, NULL);
+ if (decoded != NULL) {
+ free(sound_name);
+ sound_name = decoded;
+
+ const char *translated_name = NULL;
+
+ if (streq(decoded, "error"))
+ translated_name = "dialog-error";
+ else if (streq(decoded, "warn") || streq(decoded, "warning"))
+ translated_name = "dialog-warning";
+ else if (streq(decoded, "info"))
+ translated_name = "dialog-information";
+ else if (streq(decoded, "question"))
+ translated_name = "dialog-question";
+
+ if (translated_name != NULL) {
+ free(sound_name);
+ sound_name = xstrdup(translated_name);
+ }
+ }
+ break;
+ }
+
case 'g':
/* graphical ID (see 'n' and 'p=icon') */
free(icon_cache_id);
@@ -910,12 +972,25 @@
category = NULL; /* Prevent double free */
} else {
/* Append, comma separated */
- char *new_category = xstrjoin(notif->category, category, ',');
+ char *new_category = xstrjoin3(notif->category, ",", category);
free(notif->category);
notif->category = new_category;
}
}
+ if (sound_name != NULL) {
+ notif->muted = streq(sound_name, "silent");
+
+ if (notif->muted || streq(sound_name, "system")) {
+ free(notif->sound_name);
+ notif->sound_name = NULL;
+ } else {
+ free(notif->sound_name);
+ notif->sound_name = sound_name;
+ sound_name = NULL; /* Prevent double free */
+ }
+ }
+
/* Handled chunked payload - append to existing metadata */
switch (payload_type) {
case PAYLOAD_TITLE:
@@ -929,7 +1004,7 @@
payload = NULL;
} else {
char *old = *ptr;
- *ptr = xstrjoin(old, payload, 0);
+ *ptr = xstrjoin(old, payload);
free(old);
}
break;
@@ -963,7 +1038,7 @@
tll_push_back(notif->actions, xstrdup(button));
}
}
-
+
break;
}
}
@@ -1002,7 +1077,7 @@
alive_ids = xstrdup(item_id);
else {
char *old_alive_ids = alive_ids;
- alive_ids = xstrjoin(old_alive_ids, item_id, ',');
+ alive_ids = xstrjoin3(old_alive_ids, ",", item_id);
free(old_alive_ids);
}
}
@@ -1037,6 +1112,7 @@
free(symbolic_icon);
free(payload);
free(category);
+ free(sound_name);
}
void
@@ -1305,13 +1381,22 @@
term_damage_color(term, COLOR_DEFAULT, 0);
break;
- case 111: /* Reset default text background color */
+ case 111: { /* Reset default text background color */
LOG_DBG("resetting background color");
+ bool alpha_changed = term->colors.alpha != term->conf->colors.alpha;
+
term->colors.bg = term->conf->colors.bg;
term->colors.alpha = term->conf->colors.alpha;
+
+ if (alpha_changed) {
+ wayl_win_alpha_changed(term->window);
+ term_font_subpixel_changed(term);
+ }
+
term_damage_color(term, COLOR_DEFAULT, 0);
term_damage_margins(term);
break;
+ }
case 112:
LOG_DBG("resetting cursor color");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/render.c new/foot-1.18.1/render.c
--- old/foot-1.18.0/render.c 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/render.c 2024-08-14 12:00:20.000000000 +0200
@@ -2627,6 +2627,32 @@
pixman_image_unref(src);
}
+static bool
+any_pointer_is_on_button(const struct terminal *term, enum csd_surface csd_surface)
+{
+ if (unlikely(tll_length(term->wl->seats) == 0))
+ return false;
+
+ tll_foreach(term->wl->seats, it) {
+ const struct seat *seat = &it->item;
+
+ if (seat->mouse.x < 0)
+ continue;
+ if (seat->mouse.y < 0)
+ continue;
+
+ struct csd_data info = get_csd_data(term, csd_surface);
+ if (seat->mouse.x > info.width)
+ continue;
+
+ if (seat->mouse.y > info.height)
+ continue;
+ return true;
+ }
+
+ return false;
+}
+
static void
render_csd_button(struct terminal *term, enum csd_surface surf_idx,
const struct csd_data *info, struct buffer *buf)
@@ -2650,21 +2676,24 @@
_color = term->conf->colors.table[4]; /* blue */
is_set = term->conf->csd.color.minimize_set;
conf_color = &term->conf->csd.color.minimize;
- is_active = term->active_surface == TERM_SURF_BUTTON_MINIMIZE;
+ is_active = term->active_surface == TERM_SURF_BUTTON_MINIMIZE &&
+ any_pointer_is_on_button(term, CSD_SURF_MINIMIZE);
break;
case CSD_SURF_MAXIMIZE:
_color = term->conf->colors.table[2]; /* green */
is_set = term->conf->csd.color.maximize_set;
conf_color = &term->conf->csd.color.maximize;
- is_active = term->active_surface == TERM_SURF_BUTTON_MAXIMIZE;
+ is_active = term->active_surface == TERM_SURF_BUTTON_MAXIMIZE &&
+ any_pointer_is_on_button(term, CSD_SURF_MAXIMIZE);
break;
case CSD_SURF_CLOSE:
_color = term->conf->colors.table[1]; /* red */
is_set = term->conf->csd.color.close_set;
conf_color = &term->conf->csd.color.quit;
- is_active = term->active_surface == TERM_SURF_BUTTON_CLOSE;
+ is_active = term->active_surface == TERM_SURF_BUTTON_CLOSE &&
+ any_pointer_is_on_button(term, CSD_SURF_CLOSE);
break;
default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/slave.c new/foot-1.18.1/slave.c
--- old/foot-1.18.0/slave.c 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/slave.c 2024-08-14 12:00:20.000000000 +0200
@@ -55,7 +55,7 @@
path != NULL;
path = strtok(NULL, ":"))
{
- char *full = xasprintf("%s/%s", path, file);
+ char *full = xstrjoin3(path, "/", file);
if (access(full, F_OK) == 0) {
free(path_list);
return full;
@@ -158,6 +158,7 @@
xassert(prefix != NULL);
if (write(fd, prefix, strlen(prefix)) < 0 ||
+ write(fd, "foot: ", 6) < 0 ||
write(fd, notif->text, strlen(notif->text)) < 0 ||
write(fd, postfix, strlen(postfix)) < 0)
{
@@ -180,7 +181,8 @@
}
static bool
-emit_notifications_of_kind(int fd, const user_notifications_t *notifications,
+emit_notifications_of_kind(int fd,
+ const user_notifications_t *notifications,
enum user_notification_kind kind)
{
tll_foreach(*notifications, it) {
@@ -329,7 +331,7 @@
if (env->envp == NULL)
setenv(name, value, 1);
else {
- char *e = xasprintf("%s=%s", name, value);
+ char *e = xstrjoin3(name, "=", value);
/* Search for existing variable. If found, replace it with the
new value */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/terminal.c new/foot-1.18.1/terminal.c
--- old/foot-1.18.0/terminal.c 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/terminal.c 2024-08-14 12:00:20.000000000 +0200
@@ -994,7 +994,7 @@
snprintf(size, sizeof(size), ":size=%.2f",
term->font_sizes[i][j].pt_size * scale);
- names[i][j] = xstrjoin(font->pattern, size, 0);
+ names[i][j] = xstrjoin(font->pattern, size);
}
}
@@ -1021,9 +1021,9 @@
char *attrs[4] = {
[0] = dpi, /* Takes ownership */
- [1] = xstrjoin(dpi, !custom_bold ? ":weight=bold" : "", 0),
- [2] = xstrjoin(dpi, !custom_italic ? ":slant=italic" : "", 0),
- [3] = xstrjoin(dpi, !custom_bold_italic ? ":weight=bold:slant=italic" : "", 0),
+ [1] = xstrjoin(dpi, !custom_bold ? ":weight=bold" : ""),
+ [2] = xstrjoin(dpi, !custom_italic ? ":slant=italic" : ""),
+ [3] = xstrjoin(dpi, !custom_bold_italic ? ":weight=bold:slant=italic" : ""),
};
struct fcft_font *fonts[4];
@@ -1048,8 +1048,10 @@
for (size_t i = 0; i < 4; i++) {
if (tids[i] != 0) {
int ret;
- thrd_join(tids[i], &ret);
- success = success && ret;
+ if (thrd_join(tids[i], &ret) != 0)
+ success = false;
+ else
+ success = success && ret;
} else
success = false;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/utils/xtgettcap.c new/foot-1.18.1/utils/xtgettcap.c
--- old/foot-1.18.0/utils/xtgettcap.c 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/utils/xtgettcap.c 2024-08-14 12:00:20.000000000 +0200
@@ -141,6 +141,9 @@
const char *key = strtok(key_value, "=");
const char *value = strtok(NULL, "=");
+ if (key == NULL)
+ continue;
+
#if 0
assert((success && value != NULL) ||
(!success && value == NULL));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot-1.18.0/xmalloc.h new/foot-1.18.1/xmalloc.h
--- old/foot-1.18.0/xmalloc.h 2024-08-02 14:28:16.000000000 +0200
+++ new/foot-1.18.1/xmalloc.h 2024-08-14 12:00:20.000000000 +0200
@@ -25,16 +25,25 @@
}
static inline char *
-xstrjoin(const char *s1, const char *s2, char delim)
+xstrjoin(const char *s1, const char *s2)
{
size_t n1 = strlen(s1);
- size_t n2 = delim > 0 ? 1 : 0;
- size_t n3 = strlen(s2);
+ size_t n2 = strlen(s2);
+ char *joined = xmalloc(n1 + n2 + 1);
+ memcpy(joined, s1, n1);
+ memcpy(joined + n1, s2, n2 + 1);
+ return joined;
+}
+static inline char *
+xstrjoin3(const char *s1, const char *s2, const char *s3)
+{
+ size_t n1 = strlen(s1);
+ size_t n2 = strlen(s2);
+ size_t n3 = strlen(s3);
char *joined = xmalloc(n1 + n2 + n3 + 1);
memcpy(joined, s1, n1);
- if (delim > 0)
- joined[n1] = delim;
- memcpy(joined + n1 + n2, s2, n3 + 1);
+ memcpy(joined + n1, s2, n2);
+ memcpy(joined + n1 + n2, s3, n3 + 1);
return joined;
}
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package neovim for openSUSE:Factory checked in at 2024-08-16 12:23:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/neovim (Old)
and /work/SRC/openSUSE:Factory/.neovim.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "neovim"
Fri Aug 16 12:23:30 2024 rev:65 rq:1194028 version:0.10.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/neovim/neovim.changes 2024-08-02 17:27:25.721530457 +0200
+++ /work/SRC/openSUSE:Factory/.neovim.new.2698/neovim.changes 2024-08-16 12:24:01.963986532 +0200
@@ -1,0 +2,12 @@
+Wed Aug 14 21:23:07 UTC 2024 - Richard Rahl <rrahl0(a)opensuse.org>
+
+- add make-tree-sitter-optional.patch for making the tree-sitter plugins
+ optional (behind bcond) - this fixes s390x
+- enable luajit for riscv64, which leaves ppc64le as the lone arch
+ which uses lua
+- remove post and postun from the spec template, as most standard
+ packages don't need this (and ChangeLog file, as most projects dont use this
+ file anymore.
+- revert back to default compiler flags
+
+-------------------------------------------------------------------
New:
----
make-tree-sitter-optional.patch
BETA DEBUG BEGIN:
New:
- add make-tree-sitter-optional.patch for making the tree-sitter plugins
optional (behind bcond) - this fixes s390x
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ neovim.spec ++++++
--- /var/tmp/diff_new_pack.hiKRCc/_old 2024-08-16 12:24:02.800021277 +0200
+++ /var/tmp/diff_new_pack.hiKRCc/_new 2024-08-16 12:24:02.804021444 +0200
@@ -16,27 +16,28 @@
#
-%{?!python3_pkgversion:%define python3_pkgversion 3}
-
-%define vimplugin_dir %{_datadir}/vim/site
-# Luajit not available on all platforms
-%ifarch %{arm} %{ix86} x86_64 aarch64
-%bcond_without luajit
-%else
+%ifarch s390x
+%bcond_without make_optional
+%endif
+%ifarch ppc64le
%bcond_with luajit
+%else
+%bcond_without luajit
%endif
-
+%define vimplugin_dir %{_datadir}/vim/site
Name: neovim
Version: 0.10.1
Release: 0
Summary: Vim-fork focused on extensibility and agility
License: Apache-2.0 AND Vim AND GPL-3.0-or-later AND CC-BY-3.0
-Group: Productivity/Text/Editors
URL: https://neovim.io/
Source0: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar…
Source1: sysinit.vim
Source3: suse-spec-template
Source4: spec.vim
+# This patch is from AlpineLinux, which enables us to reenable neovim on s390x or as an optional flag to build
+# This patch only makes the tree-sitter plugins optional, not tree-sitter in itself
+Patch0: make-tree-sitter-optional.patch
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: fdupes
@@ -57,28 +58,29 @@
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
-BuildRequires: tree-sitter
-BuildRequires: tree-sitter-c >= 0.21.3
-BuildRequires: tree-sitter-lua
-BuildRequires: tree-sitter-markdown
-BuildRequires: tree-sitter-python
-BuildRequires: tree-sitter-query >= 0.4.0
-BuildRequires: tree-sitter-vim
-BuildRequires: tree-sitter-vimdoc >= 3.0.0
BuildRequires: unzip
BuildRequires: pkgconfig(libluv)
BuildRequires: pkgconfig(libutf8proc)
BuildRequires: pkgconfig(libuv) >= 1.42.0
-BuildRequires: pkgconfig(msgpack-c)
-BuildRequires: pkgconfig(termkey)
BuildRequires: pkgconfig(tree-sitter) >= 0.20.9
-BuildRequires: pkgconfig(unibilium) >= 2.0.0
-BuildRequires: pkgconfig(vterm) >= 0.3.3
%if %{with luajit}
BuildRequires: pkgconfig(luajit)
%else
BuildRequires: lua51-BitOp
-BuildRequires: lua51-devel
+BuildRequires: pkgconfig(lua5.1)
+%endif
+BuildRequires: pkgconfig(msgpack-c)
+BuildRequires: pkgconfig(termkey)
+BuildRequires: pkgconfig(unibilium) >= 2.0.0
+BuildRequires: pkgconfig(vterm) >= 0.3.3
+%if %{without make_optional}
+BuildRequires: tree-sitter-c >= 0.21.3
+BuildRequires: tree-sitter-lua
+BuildRequires: tree-sitter-markdown
+BuildRequires: tree-sitter-python
+BuildRequires: tree-sitter-query >= 0.4.0
+BuildRequires: tree-sitter-vim
+BuildRequires: tree-sitter-vimdoc >= 3.0.0
%endif
Requires: gperf
Requires: libvterm0 >= 0.3
@@ -88,7 +90,8 @@
Requires: lua51-luarocks
Requires: lua51-luv
Requires: lua51-mpack
-Requires: tree-sitter
+Requires: xdg-utils
+%if %{without make_optional}
Requires: tree-sitter-c >= 0.21.3
Requires: tree-sitter-lua
Requires: tree-sitter-markdown
@@ -96,7 +99,7 @@
Requires: tree-sitter-query >= 0.4.0
Requires: tree-sitter-vim
Requires: tree-sitter-vimdoc >= 3.0.0
-Requires: xdg-utils
+%endif
Recommends: python3-neovim
Recommends: wl-clipboard
Recommends: xsel
@@ -115,7 +118,10 @@
parts of Vim, without compromise, and more.
%prep
-%autosetup -p1
+%autosetup -N
+%if %{with make_optional}
+%patch -P0 -p1
+%endif
# Remove __DATE__ and __TIME__.
BUILD_TIME=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%{H}:%{M}')
@@ -127,8 +133,6 @@
# set vars to make build reproducible in spite of config/CMakeLists.txt
HOSTNAME=OBS
USERNAME=OBS
-export CFLAGS="%{optflags} -fcommon"
-export CXXFLAGS="%{optflags} -fcommon"
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DPREFER_LUA=%{?with_luajit:OFF}%{!?with_luajit:ON} \
-DLUA_PRG=%{_bindir}/%{?with_luajit:luajit}%{!?with_luajit:lua} \
@@ -170,12 +174,14 @@
%fdupes %{buildroot}%{_datadir}/
%find_lang nvim
+%if %{without make_optional}
# let's make tree-sitter grammars visible to neovim
install -d %{buildroot}%{_datadir}/nvim/runtime/parser
for i in c lua markdown python query vim vimdoc; do
ln -s %{_libdir}/libtree-sitter-$i.so %{buildroot}%{_datadir}/nvim/runtime/parser/$i.so;
done
ln -s %{_libdir}/libtree-sitter-markdown-inline.so %{buildroot}%{_datadir}/nvim/runtime/parser/markdown_inline.so
+%endif
# We have to have rpath
# https://en.opensuse.org/openSUSE:Packaging_checks
++++++ make-tree-sitter-optional.patch ++++++
From: Jakub Jirutka <jakub(a)jirutka.cz>
Date: Thu, 23 May 2024 20:07:15 +0200
Subject: Fallback to classic syntax highlighting if tree-sitter parser
is not available
See https://gitlab.alpinelinux.org/alpine/aports/-/issues/16132,
https://github.com/neovim/neovim/pull/26824
--- a/runtime/ftplugin/help.lua
+++ b/runtime/ftplugin/help.lua
@@ -1,5 +1,8 @@
-- use treesitter over syntax (for highlighted code blocks)
-vim.treesitter.start()
+local ok, _ = pcall(vim.treesitter.start)
+if not ok then
+ print('Note: tree-sitter-vimdoc package is not installed, some features will not work')
+end
-- add custom highlights for list in `:h highlight-groups`
local bufname = vim.fs.normalize(vim.api.nvim_buf_get_name(0))
--- a/runtime/ftplugin/lua.lua
+++ b/runtime/ftplugin/lua.lua
@@ -1,2 +1,5 @@
-- use treesitter over syntax
-vim.treesitter.start()
+local ok, _ = pcall(vim.treesitter.start)
+if not ok then
+ print('Note: tree-sitter-lua package is not installed, some features will not work')
+end
--- a/runtime/ftplugin/query.lua
+++ b/runtime/ftplugin/query.lua
@@ -9,7 +9,10 @@
-- Do not set vim.b.did_ftplugin = 1 to allow loading of ftplugin/lisp.vim
-- use treesitter over syntax
-vim.treesitter.start()
+local ok, _ = pcall(vim.treesitter.start)
+if not ok then
+ print('Note: tree-sitter-query package is not installed, some features will not work')
+end
-- set omnifunc
vim.bo.omnifunc = 'v:lua.vim.treesitter.query.omnifunc'
++++++ suse-spec-template ++++++
--- /var/tmp/diff_new_pack.hiKRCc/_old 2024-08-16 12:24:02.872024270 +0200
+++ /var/tmp/diff_new_pack.hiKRCc/_new 2024-08-16 12:24:02.876024435 +0200
@@ -38,12 +38,9 @@
%install
%make_install
-%post
-%postun
-
%files
%license LICENSE
-%doc README.md ChangeLog
+%doc README.md
%changelog
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package nodejs-electron for openSUSE:Factory checked in at 2024-08-16 12:23:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nodejs-electron (Old)
and /work/SRC/openSUSE:Factory/.nodejs-electron.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nodejs-electron"
Fri Aug 16 12:23:29 2024 rev:126 rq:1194025 version:30.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/nodejs-electron/nodejs-electron.changes 2024-07-22 17:19:01.335719724 +0200
+++ /work/SRC/openSUSE:Factory/.nodejs-electron.new.2698/nodejs-electron.changes 2024-08-16 12:23:56.363753793 +0200
@@ -1,0 +2,7 @@
+Tue Aug 13 20:28:37 UTC 2024 - Bruno Pitrus <brunopitrus(a)hotmail.com>
+
+- Fix ftbfs with ffmpeg 7.x
+ * add backported ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch
+ * do not revert audio_file_reader-ffmpeg-AVFrame-duration.patch when building against ffmpeg 6+
+
+-------------------------------------------------------------------
New:
----
ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch
BETA DEBUG BEGIN:
New:- Fix ftbfs with ffmpeg 7.x
* add backported ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch
* do not revert audio_file_reader-ffmpeg-AVFrame-duration.patch when building against ffmpeg 6+
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nodejs-electron.spec ++++++
--- /var/tmp/diff_new_pack.valr0O/_old 2024-08-16 12:24:01.307959269 +0200
+++ /var/tmp/diff_new_pack.valr0O/_new 2024-08-16 12:24:01.311959434 +0200
@@ -129,17 +129,11 @@
%endif
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora}
-%bcond_without ffmpeg_5
%bcond_without system_vpx
-%else
-%bcond_with ffmpeg_5
-%bcond_with system_vpx
-%endif
-
-%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} >= 39
%bcond_without bro_11
%bcond_without ffmpeg_6
%else
+%bcond_with system_vpx
%bcond_with bro_11
%bcond_with ffmpeg_6
%endif
@@ -395,6 +389,7 @@
Patch3161: preview_cancel_reason-missing-string.patch
Patch3162: script_streamer-atomic-include.patch
Patch3163: DesktopNativeWidgetAura-HandleActivationChanged-crash.patch
+Patch3164: ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch
# Patches to re-enable upstream force disabled features.
# There's no sense in submitting them but they may be reused as-is by other packagers.
@@ -545,11 +540,8 @@
%endif
%if %{with ffmpeg_6}
BuildRequires: pkgconfig(libavcodec) >= 60
-%endif
-%if %{with ffmpeg_5}
-BuildRequires: pkgconfig(libavcodec) >= 59
-BuildRequires: pkgconfig(libavformat) >= 59
-BuildRequires: pkgconfig(libavutil) >= 57
+BuildRequires: pkgconfig(libavformat) >= 60
+BuildRequires: pkgconfig(libavutil) >= 58
%if 0%{?fedora}
#requires av_stream_get_first_dts, see rhbz#2240127
BuildRequires: libavformat-free-devel >= %AVFORMAT_VER
@@ -747,14 +739,13 @@
patch -R -p1 < %PATCH1076
%endif
-%if %{without ffmpeg_6}
-patch -R -p1 < %SOURCE402
-%endif
-%if %{with ffmpeg_5}
+%if %{with ffmpeg_6}
patch -R -p1 < %PATCH2012
%else
+patch -R -p1 < %SOURCE402
patch -R -p1 < %SOURCE400
+patch -R -p1 < %SOURCE401
%endif
@@ -770,8 +761,7 @@
%endif
-# This one depends on an ffmpeg nightly, reverting unconditionally.
-patch -R -p1 < %SOURCE401
+
# Link system wayland-protocols-devel into where chrome expects them
mkdir -p third_party/wayland/src
@@ -1056,6 +1046,10 @@
%endif
%endif
+# Ccache is truncated to 5GB which is not enough for Electron, leading to slower rebuilds
+export CCACHE_COMPRESS=1
+ccache -o max_size=0 || true
+
# Create the configuration for GN
# Available options: out/Release/gn args --list out/Release/
myconf_gn=""
++++++ ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch ++++++
From 62274859104bd828373ae406aa9309e610449ac5 Mon Sep 17 00:00:00 2001
From: Ted Meyer <tmathmeyer(a)chromium.org>
Date: Fri, 22 Mar 2024 19:56:55 +0000
Subject: [PATCH] Replace deprecated use of AVCodecContext::reordered_opaque
We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context
now to trigger timestamp propagation.
Bug: 330573128
Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308
Commit-Queue: Ted (Chromium) Meyer <tmathmeyer(a)chromium.org>
Reviewed-by: Dan Sanders <sandersd(a)chromium.org>
Cr-Commit-Position: refs/heads/main@{#1277051}
---
media/filters/ffmpeg_video_decoder.cc | 17 +++++++++++++----
media/filters/ffmpeg_video_decoder.h | 16 ++++++++++++++++
2 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index bd75477feeabb7..8a658a58caac5b 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -134,7 +134,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) {
}
FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log)
- : media_log_(media_log) {
+ : media_log_(media_log), timestamp_map_(128) {
DVLOG(1) << __func__;
DETACH_FROM_SEQUENCE(sequence_checker_);
}
@@ -213,10 +213,6 @@ int FFmpegVideoDecoder::GetVideoBuffer(struct AVCodecContext* codec_context,
frame->linesize[plane] = layout->planes()[plane].stride;
}
- // This seems unsafe, given threaded decoding. However, `reordered_opaque` is
- // also going away upstream, so we need a whole new mechanism either way.
- frame->reordered_opaque = codec_context->reordered_opaque;
-
// This will be freed by `ReleaseVideoBufferImpl`.
auto* opaque = new OpaqueData(fb_priv, frame_pool_, data, allocation_size,
std::move(*layout));
@@ -363,8 +363,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) {
DCHECK(packet->data);
DCHECK_GT(packet->size, 0);
- // Let FFmpeg handle presentation timestamp reordering.
- codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds();
+ const int64_t timestamp = buffer.timestamp().InMicroseconds();
+ const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId();
+ timestamp_map_.Put(std::make_pair(timestamp_id, timestamp));
+ packet->opaque = reinterpret_cast<void*>(timestamp_id.GetUnsafeValue());
}
FFmpegDecodingLoop::DecodeStatus decode_status = decoding_loop_->DecodePacket(
packet, base::BindRepeating(&FFmpegVideoDecoder::OnNewFrame,
@@ -423,7 +425,12 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) {
}
gfx::Size natural_size = aspect_ratio.GetNaturalSize(visible_rect);
- const auto pts = base::Microseconds(frame->reordered_opaque);
+ const auto ts_id = TimestampId(reinterpret_cast<size_t>(frame->opaque));
+ const auto ts_lookup = timestamp_map_.Get(ts_id);
+ if (ts_lookup == timestamp_map_.end()) {
+ return false;
+ }
+ const auto pts = base::Microseconds(std::get<1>(*ts_lookup));
auto video_frame = VideoFrame::WrapExternalDataWithLayout(
opaque->layout, visible_rect, natural_size, opaque->data, opaque->size,
pts);
@@ -498,8 +505,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config);
codec_context_->thread_type =
FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME);
+
codec_context_->opaque = this;
codec_context_->get_buffer2 = GetVideoBufferImpl;
+ codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE;
if (base::FeatureList::IsEnabled(kFFmpegAllowLists)) {
// Note: FFmpeg will try to free this string, so we must duplicate it.
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
index d02cb89c3ddf7c..0a2de1c623ffff 100644
--- a/media/filters/ffmpeg_video_decoder.h
+++ b/media/filters/ffmpeg_video_decoder.h
@@ -7,10 +7,12 @@
#include <memory>
+#include "base/containers/lru_cache.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/sequence_checker.h"
+#include "base/types/id_type.h"
#include "media/base/frame_buffer_pool.h"
#include "media/base/supported_video_decoder_config.h"
#include "media/base/video_decoder.h"
@@ -87,6 +89,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
// FFmpeg structures owned by this object.
std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
+ // The gist here is that timestamps need to be 64 bits to store microsecond
+ // precision. A 32 bit integer would overflow at ~35 minutes at this level of
+ // precision. We can't cast the timestamp to the void ptr object used by the
+ // opaque field in ffmpeg then, because it would lose data on a 32 bit build.
+ // However, we don't actually have 2^31 timestamped frames in a single
+ // playback, so it's fine to use the 32 bit value as a key in a map which
+ // contains the actual timestamps. Additionally, we've in the past set 128
+ // outstanding frames for re-ordering as a limit for cross-thread decoding
+ // tasks, so we'll do that here too with the LRU cache.
+ using TimestampId = base::IdType<int64_t, size_t, 0>;
+
+ TimestampId::Generator timestamp_id_generator_;
+ base::LRUCache<TimestampId, int64_t> timestamp_map_;
+
VideoDecoderConfig config_;
scoped_refptr<FrameBufferPool> frame_pool_;
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-unordered-containers for openSUSE:Factory checked in at 2024-08-16 12:23:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-unordered-containers (Old)
and /work/SRC/openSUSE:Factory/.ghc-unordered-containers.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-unordered-containers"
Fri Aug 16 12:23:28 2024 rev:33 rq:1194022 version:0.2.20
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-unordered-containers/ghc-unordered-containers.changes 2024-05-22 21:32:13.469424998 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-unordered-containers.new.2698/ghc-unordered-containers.changes 2024-08-16 12:23:55.723727194 +0200
@@ -1,0 +2,6 @@
+Tue Jul 30 18:49:50 UTC 2024 - Peter Simons <psimons(a)suse.com>
+
+- Update unordered-containers to version 0.2.20 revision 3.
+ Upstream has revised the Cabal build instructions on Hackage.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-unordered-containers.spec ++++++
--- /var/tmp/diff_new_pack.kcxSKi/_old 2024-08-16 12:23:56.171745813 +0200
+++ /var/tmp/diff_new_pack.kcxSKi/_new 2024-08-16 12:23:56.171745813 +0200
@@ -26,7 +26,7 @@
License: BSD-3-Clause
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
-Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/2.cabal…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/3.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-base-devel
BuildRequires: ghc-base-prof
++++++ unordered-containers.cabal ++++++
--- /var/tmp/diff_new_pack.kcxSKi/_old 2024-08-16 12:23:56.219747808 +0200
+++ /var/tmp/diff_new_pack.kcxSKi/_new 2024-08-16 12:23:56.223747974 +0200
@@ -1,6 +1,6 @@
name: unordered-containers
version: 0.2.20
-x-revision: 2
+x-revision: 3
synopsis: Efficient hashing-based container types
description:
Efficient hashing-based container types. The containers have been
@@ -60,7 +60,7 @@
build-depends:
base >= 4.10 && < 5,
deepseq >= 1.4.3,
- hashable >= 1.4 && < 1.5,
+ hashable >= 1.4 && < 1.6,
template-haskell < 2.23
default-language: Haskell2010
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-these for openSUSE:Factory checked in at 2024-08-16 12:23:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-these (Old)
and /work/SRC/openSUSE:Factory/.ghc-these.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-these"
Fri Aug 16 12:23:28 2024 rev:15 rq:1194021 version:1.2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-these/ghc-these.changes 2024-05-28 17:29:56.174460641 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-these.new.2698/ghc-these.changes 2024-08-16 12:23:54.907693280 +0200
@@ -1,0 +2,6 @@
+Fri Aug 2 08:10:59 UTC 2024 - Peter Simons <psimons(a)suse.com>
+
+- Update these to version 1.2.1 revision 1.
+ Upstream has revised the Cabal build instructions on Hackage.
+
+-------------------------------------------------------------------
New:
----
these.cabal
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-these.spec ++++++
--- /var/tmp/diff_new_pack.mgZszD/_old 2024-08-16 12:23:55.587721541 +0200
+++ /var/tmp/diff_new_pack.mgZszD/_new 2024-08-16 12:23:55.587721541 +0200
@@ -25,6 +25,7 @@
License: BSD-3-Clause
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-assoc-devel
BuildRequires: ghc-assoc-prof
@@ -89,6 +90,7 @@
%prep
%autosetup -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ these.cabal ++++++
cabal-version: >=1.10
name: these
version: 1.2.1
x-revision: 1
synopsis: An either-or-both data type.
homepage: https://github.com/haskellari/these
license: BSD3
license-file: LICENSE
author: C. McCann, Oleg Grenrus
maintainer: Oleg Grenrus <oleg.grenrus(a)iki.fi>
category: Data, These
build-type: Simple
extra-source-files: CHANGELOG.md
description:
This package provides a data type @These a b@ which can hold a value of either
type or values of each type. This is usually thought of as an "inclusive or"
type (contrasting @Either a b@ as "exclusive or") or as an "outer join" type
(contrasting @(a, b)@ as "inner join").
.
@
data These a b = This a | That b | These a b
@
.
Since version 1, this package was split into parts:
.
* <https://hackage.haskell.org/package/semialign semialign> For @Align@ and @Zip@ type-classes.
.
* <https://hackage.haskell.org/package/semialign-indexed semialign-indexed> For @SemialignWithIndex@ class, providing @ialignWith@ and @izipWith@.
.
* <https://hackage.haskell.org/package/these-lens these-lens> For lens combinators.
.
* <http://hackage.haskell.org/package/monad-chronicle monad-chronicle> For transformers variant of @These@.
tested-with:
GHC ==8.6.5
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.5
|| ==9.8.2
|| ==9.10.1
source-repository head
type: git
location: https://github.com/haskellari/these.git
subdir: these
library
default-language: Haskell2010
ghc-options: -Wall -Wno-trustworthy-safe
hs-source-dirs: src
exposed-modules:
Data.Functor.These
Data.These
Data.These.Combinators
-- ghc boot libs
build-depends:
base >=4.12.0.0 && <4.21
, binary >=0.8.6.0 && <0.10
, deepseq >=1.4.4.0 && <1.6
-- other dependencies
-- note: we need to depend on assoc-1.1 to be sure that
-- Bifunctor type class comes from bifunctor-classes-compat
build-depends:
assoc >=1.1.1 && <1.2
, hashable >=1.4.4.0 && <1.6
if !impl(ghc >=9.6)
build-depends: foldable1-classes-compat >=0.1 && <0.2
x-docspec-extra-packages: lens
1
0