public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/kmscon] f44: Update to v10.0.4
@ 2026-10-08 14:32 Jocelyn Falempe
0 siblings, 0 replies; only message in thread
From: Jocelyn Falempe @ 2026-10-08 14:32 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/kmscon
Branch : f44
Commit : 2fb010c9563b78e21ee9ab8bf8996727f10902f9
Author : Jocelyn Falempe <jfalempe@redhat.com>
Date : 2026-10-08T16:30:23+02:00
Stats : +195/-126 in 9 file(s)
URL : https://src.fedoraproject.org/rpms/kmscon/c/2fb010c9563b78e21ee9ab8bf8996727f10902f9?branch=f44
Log:
Update to v10.0.4
With additional patches, to fix:
- a crash with kernel 7.3.0
- filter out non monospace fonts with freetype
- prevent kmscon.service to run if /dev/tty0 is present
- a minor memleak in freetype fallback font path
Important Notes
kmscon changed the default font size to 0, which means it will adjust the font size based on the monitors.
The font size is now the maximum height of the font cell in pixels. So if you have set font-size in your kmscon.conf,
it might be smaller with this new release, and you will need some adjustments.
What's Changed
drm_shared: Use legacy modesetting with vmwgfx driver by @kdj0c in #515
Fix EBUSY error handling in pageflip by @kdj0c in #516
Font refactor by @kdj0c in #519
Implement scaled as a multi-monitor option by @DhruvaSambrani in #509
cursor blinking rate feature by @fnnFox in #517
Refactor dlist.h by @kdj0c in #520
Feat/psf unicode table by @IHateGameDev in #510
fix(psf font out): init width and height by @IHateGameDev in #525
log: Simplify logging, remove timestamp, and level for notice and info. by @kdj0c in #523
gltex: Add render dependency by @kdj0c in #527
fix(gltex): kmscon_font dep by @IHateGameDev in #528
Correct the wrong key sysmbols in the kmscon.conf.example by @suikan4github in #529
drm_shared: Fix hotplug by @kdj0c in #530
run kmsconvt@.service after systemd-vconsole-setup by @kdj0c in #532
Default font size by @kdj0c in #531
config: multi-monitor, default to scaled. by @kdj0c in #533
build: Update libtsm dependency to v4.8.0 by @kdj0c in #534
drm_shared: Add max retry to the wakeup timeout by @kdj0c in #535
Prepare v10.0.4 by @kdj0c in #536
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
---
diff --git a/.gitignore b/.gitignore
index 412ac31..1aa5386 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@
/kmscon-10.0.1.tar.gz
/kmscon-10.0.2.tar.gz
/kmscon-10.0.3.tar.gz
+/kmscon-10.0.4.tar.gz
diff --git a/Workaround-agetty-issue-file-on-Fedora.patch b/Workaround-agetty-issue-file-on-Fedora.patch
deleted file mode 100644
index 1e1b5fa..0000000
--- a/Workaround-agetty-issue-file-on-Fedora.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From e71a2064bc8a8917127cc74c983df28aebd82159 Mon Sep 17 00:00:00 2001
-From: Jocelyn Falempe <jfalempe@redhat.com>
-Date: Thu, 2 Jul 2026 17:58:30 +0200
-Subject: [PATCH] Workaround agetty issue-file on Fedora
-
-Fedora's version of agetty doesn't handle properly when /etc/issue is a
-symbolic link to /usr/lib/issue. So specify the issue-file to avoid
-printing the issue message twice.
-
-Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
----
- scripts/systemd/kmsconvt@.service.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/scripts/systemd/kmsconvt@.service.in b/scripts/systemd/kmsconvt@.service.in
-index 9762fc1..f166f94 100644
---- a/scripts/systemd/kmsconvt@.service.in
-+++ b/scripts/systemd/kmsconvt@.service.in
-@@ -39,7 +39,7 @@ ConditionPathExists=/dev/tty0
-
- [Service]
- @PAM_CFG@
--ExecStart=kmscon --vt=%I --no-switchvt --login -- /sbin/agetty -8 -o '-p -- \\u' --noclear -- - $$TERM
-+ExecStart=kmscon --vt=%I --no-switchvt --login -- /sbin/agetty -8 -o '-p -- \\u' --noclear --issue-file=/etc/issue:/etc/issue.d:/run/issue.d:/usr/lib/issue.d -- - $$TERM
- UtmpIdentifier=%I
- TTYPath=/dev/%I
- TTYReset=yes
---
-2.54.0
-
diff --git a/drm_shared-Fix-crash-if-a-plane-has-no-properties.patch b/drm_shared-Fix-crash-if-a-plane-has-no-properties.patch
new file mode 100644
index 0000000..b533750
--- /dev/null
+++ b/drm_shared-Fix-crash-if-a-plane-has-no-properties.patch
@@ -0,0 +1,42 @@
+From 77e6ced76709fc53ee1d9c9368d62ff65d971f26 Mon Sep 17 00:00:00 2001
+From: Jocelyn Falempe <jfalempe@redhat.com>
+Date: Sat, 3 Oct 2026 00:28:01 +0200
+Subject: [PATCH] drm_shared: Fix crash if a plane has no properties
+
+When testing newer kernel 7.3.0, it can happen that a plane has no
+properties at all.
+Check that there are properties before iterating on them.
+
+Also fix the same problem for the cursor plane
+
+Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
+---
+ src/video/drm_shared.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/video/drm_shared.c b/src/video/drm_shared.c
+index e4fd870..bb5c3f7 100644
+--- a/src/video/drm_shared.c
++++ b/src/video/drm_shared.c
+@@ -255,6 +255,9 @@ static int modeset_find_plane(int fd, struct display *disp)
+ drmModeObjectPropertiesPtr props =
+ drmModeObjectGetProperties(fd, plane_id, DRM_MODE_OBJECT_PLANE);
+
++ if (!props)
++ continue;
++
+ plane_type = get_property_value(fd, props, "type");
+ if (!found_primary && plane_type == DRM_PLANE_TYPE_PRIMARY) {
+ found_primary = true;
+@@ -311,7 +314,7 @@ static void modeset_clear_cursor(drmModeAtomicReq *req, int fd)
+ }
+ drmModeObjectPropertiesPtr props =
+ drmModeObjectGetProperties(fd, plane_id, DRM_MODE_OBJECT_PLANE);
+- if (get_property_value(fd, props, "type") == DRM_PLANE_TYPE_CURSOR) {
++ if (props && get_property_value(fd, props, "type") == DRM_PLANE_TYPE_CURSOR) {
+ uint32_t prop_id = get_property_id(fd, props, "CRTC_ID");
+
+ if (drmModeAtomicAddProperty(req, plane_id, prop_id, 0) < 0)
+--
+2.55.0
+
diff --git a/freetype-Fix-memory-leak-when-loading-fallback-font.patch b/freetype-Fix-memory-leak-when-loading-fallback-font.patch
new file mode 100644
index 0000000..e806301
--- /dev/null
+++ b/freetype-Fix-memory-leak-when-loading-fallback-font.patch
@@ -0,0 +1,39 @@
+From c4c7c3ffd3056698a33c9b18b4a66510a57c1a6a Mon Sep 17 00:00:00 2001
+From: Jocelyn Falempe <jfalempe@redhat.com>
+Date: Thu, 8 Oct 2026 13:59:01 +0200
+Subject: [PATCH] freetype: Fix memory leak when loading fallback font.
+
+font->name is the main font name, so when loading a fallback font,
+the name was replaced by the fallback, leaking the main font name.
+---
+ src/font/font_freetype.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/src/font/font_freetype.c b/src/font/font_freetype.c
+index 2ecdbee..86ff897 100644
+--- a/src/font/font_freetype.c
++++ b/src/font/font_freetype.c
+@@ -462,10 +462,7 @@ static FT_Face prepare_tmp_face(FT_Library ft, struct ft_font *font, int fallbac
+ if (!pattern)
+ return NULL;
+
+- if (FcPatternGetString(pattern, FC_FULLNAME, 0, &full_name) == FcResultMatch)
+- font->name = strdup((char *)full_name);
+- else
+- font->name = strdup("Unknown");
++ FcPatternGetString(pattern, FC_FULLNAME, 0, &full_name);
+
+ if (FcPatternGetString(pattern, FC_FILE, 0, &path) != FcResultMatch)
+ goto err_pattern;
+@@ -473,7 +470,7 @@ static FT_Face prepare_tmp_face(FT_Library ft, struct ft_font *font, int fallbac
+ if (FcPatternGetInteger(pattern, FC_INDEX, 0, &index) != FcResultMatch)
+ log_warn("%s: failed to get face index", path);
+
+- log_debug("Loading fallback font %s %s", font->name, (char *)path);
++ log_debug("Loading fallback font %s %s", (char *)full_name, (char *)path);
+
+ err = FT_New_Face(ft, (char *)path, index, &face);
+ if (err)
+--
+2.55.0
+
diff --git a/freetype-filter-out-non-monospace-fonts-completely.patch b/freetype-filter-out-non-monospace-fonts-completely.patch
new file mode 100644
index 0000000..ff9845f
--- /dev/null
+++ b/freetype-filter-out-non-monospace-fonts-completely.patch
@@ -0,0 +1,74 @@
+From 5bbd44757f0a2a724060277f53d216d143eae8ab Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Thu, 8 Oct 2026 19:21:30 +0900
+Subject: [PATCH] freetype: filter out non-monospace fonts completely
+
+kmscon renders into fixed cells, so it must only ever use monospace
+fonts. Requesting monospace spacing on the query pattern merely re-ranks
+the results: proportional fonts remain in the sorted font set and are
+still chosen during glyph fallback for a character the monospace fonts
+don't cover (e.g. Arabic falls back to the proportional Vazirmatn when
+no monospace Arabic font is installed).
+
+Pre-filter the fontconfig font set with FcConfigSetFontSetFilter() so
+non-monospace fonts are dropped before the font list is built and can
+never be selected. As a consequence, a script with no monospace font
+available is left unrenderable rather than shown with a misaligned
+proportional glyph.
+
+This change requires fontconfig >= 2.16.0.
+---
+ meson.build | 1 +
+ src/font/font_freetype.c | 14 +++
+ tests/meson.build | 16 +++
+ tests/test_font_freetype.c | 221 +++++++++++++++++++++++++++++++++++++
+ 4 files changed, 252 insertions(+)
+ create mode 100644 tests/test_font_freetype.c
+
+diff --git a/meson.build b/meson.build
+index f34baa6..3563084 100644
+--- a/meson.build
++++ b/meson.build
+@@ -94,6 +94,7 @@ freetype_deps = dependency(
+ )
+ fontconfig_deps = dependency(
+ 'fontconfig',
++ version: '>=2.16.0', # FcConfigSetFontSetFilter()
+ disabler: true,
+ required: get_option('font_freetype'),
+ )
+diff --git a/src/font/font_freetype.c b/src/font/font_freetype.c
+index e1dd9ec..2ecdbee 100644
+--- a/src/font/font_freetype.c
++++ b/src/font/font_freetype.c
+@@ -204,6 +204,19 @@ err:
+ return -EINVAL;
+ }
+
++static FcBool _fc_monospace_font_filter_func(const FcPattern *pat, void *user_data)
++{
++ int spacing;
++
++ if (FcPatternGetInteger(pat, FC_SPACING, 0, &spacing) == FcResultMatch) {
++ if (spacing == FC_SPACING_CHARCELL || spacing == FC_SPACING_MONO ||
++ spacing == FC_SPACING_DUAL)
++ return FcTrue;
++ }
++ /* non-monospace font doesn't have FC_SPACING property */
++ return FcFalse;
++}
++
+ static int kmscon_font_freetype_init(struct kmscon_font *out, const char *name, unsigned int height)
+ {
+ struct ft_data *ftf;
+@@ -220,6 +233,7 @@ static int kmscon_font_freetype_init(struct kmscon_font *out, const char *name,
+ log_err("Failed to initialize FreeType\n");
+ goto err_free;
+ }
++ FcConfigSetFontSetFilter(NULL, _fc_monospace_font_filter_func, NULL, NULL);
+ if (prepare_font(ftf->ft, &ftf->regular, name, height, false, out))
+ goto err_done;
+
+--
+2.55.0
+
diff --git a/kmscon.spec b/kmscon.spec
index 9f50b3c..db97f49 100644
--- a/kmscon.spec
+++ b/kmscon.spec
@@ -1,5 +1,5 @@
Name: kmscon
-Version: 10.0.3
+Version: 10.0.4
Release: %autorelease
Summary: Linux KMS/DRM based virtual Console Emulator
# MIT for the source code, and OFL-1.1 for the unifont font.
@@ -8,7 +8,7 @@ URL: https://github.com/kmscon/kmscon/
Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: check-devel
BuildRequires: docbook-style-xsl
-BuildRequires: libtsm-devel >= 4.7.0
+BuildRequires: libtsm-devel >= 4.8.0
BuildRequires: meson
BuildRequires: ncurses
BuildRequires: gcc
@@ -31,8 +31,15 @@ BuildRequires: pkgconfig(xkbcommon) >= 0.5.0
BuildRequires: pkgconfig(zlib)
Recommends: (kmscon-freetype if freetype)
-# Upstream patch to fix pageflip with vmwgfx
-Patch1: terminal-Fix-error-handling-when-pageflip-failed.patch
+# Upstream patch to prevent running kmscon.service when VTs are enabled
+Patch1: systemd-prevent-kmscon.service-to-run-if-dev-tty0-is.patch
+# Upstream patch, prevent crash on kernel 7.3+
+Patch2: drm_shared-Fix-crash-if-a-plane-has-no-properties.patch
+
+# Upstream patch, filter out non monospace fonts in freetype
+Patch10: freetype-filter-out-non-monospace-fonts-completely.patch
+# Upstream patch, fix a memory leak when using fallback font with freetype
+Patch11: freetype-Fix-memory-leak-when-loading-fallback-font.patch
%description
Kmscon is a simple terminal emulator based on linux kernel mode setting (KMS).
diff --git a/sources b/sources
index e5bd117..117b8b3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (kmscon-10.0.3.tar.gz) = a252f0cb24c7b6c6bc2aa69cad74b2bec94fb9429f2ab4bf3c56a7e50e002317dbb6ffd44f1be621dff65458465ee7a58b29d2bc35f323f22cc98993d5a71f84
+SHA512 (kmscon-10.0.4.tar.gz) = 885e053ee6109c46edfee50df92fb9caad567b633df2760f37e25c2757fb874d413aed1c1de75c0d3fbc2169fe66f6e63ed16ece78f9b0f79aa72cbc91f3bab3
diff --git a/systemd-prevent-kmscon.service-to-run-if-dev-tty0-is.patch b/systemd-prevent-kmscon.service-to-run-if-dev-tty0-is.patch
new file mode 100644
index 0000000..2531ba9
--- /dev/null
+++ b/systemd-prevent-kmscon.service-to-run-if-dev-tty0-is.patch
@@ -0,0 +1,27 @@
+From 8af81edc3e0e93aed8447573f74f323ea97aaaf5 Mon Sep 17 00:00:00 2001
+From: Jocelyn Falempe <jfalempe@redhat.com>
+Date: Mon, 28 Sep 2026 10:09:16 +0200
+Subject: [PATCH] systemd: prevent kmscon.service to run if /dev/tty0 is
+ present
+
+kmscon.service shouldn't be run when VTs are present. Use kmsconvt@
+service instead
+---
+ scripts/systemd/kmscon.service.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/scripts/systemd/kmscon.service.in b/scripts/systemd/kmscon.service.in
+index 9b169f0..45bad14 100644
+--- a/scripts/systemd/kmscon.service.in
++++ b/scripts/systemd/kmscon.service.in
+@@ -4,6 +4,7 @@ Documentation=man:kmscon(1)
+ After=plymouth-quit-wait.service
+ After=systemd-user-sessions.service
+ After=rc-local.service
++ConditionPathExists=!/dev/tty0
+
+ [Service]
+ @PAM_CFG@
+--
+2.55.0
+
diff --git a/terminal-Fix-error-handling-when-pageflip-failed.patch b/terminal-Fix-error-handling-when-pageflip-failed.patch
deleted file mode 100644
index 9830cb1..0000000
--- a/terminal-Fix-error-handling-when-pageflip-failed.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 0e526b59b86484e4db46b38bd20b3af5c1b606f1 Mon Sep 17 00:00:00 2001
-From: Jocelyn Falempe <jfalempe@redhat.com>
-Date: Thu, 3 Sep 2026 12:52:04 +0200
-Subject: [PATCH 1/2] terminal: Fix error handling when pageflip failed.
-
-When a pageflip returns -EBUSY, scr->swapping can stay true, and the
-display is then never refreshed.
-So remove scr->swapping and directly call display_is_swapping().
-
-This caused kmscon to freeze on vmwgfx, as this driver returns -EBUSY
-regularly.
-
-Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
----
- src/terminal.c | 18 ++++--------------
- 1 file changed, 4 insertions(+), 14 deletions(-)
-
-diff --git a/src/terminal.c b/src/terminal.c
-index b6962e7..be8f7b2 100644
---- a/src/terminal.c
-+++ b/src/terminal.c
-@@ -59,7 +59,6 @@ struct screen {
- struct display *disp;
- struct kmscon_text *txt;
-
-- bool swapping;
- bool pending;
- bool hw_cursor;
- bool enabled;
-@@ -274,7 +273,7 @@ static void disable_screen(struct screen *scr)
- int ret;
-
- log_debug("Disabling screen %s", display_name(scr->disp));
-- if (scr->swapping)
-+ if (display_is_swapping(scr->disp))
- scr->pending = true;
- else {
- log_info("Disabling screen %s", display_name(scr->disp));
-@@ -290,7 +289,6 @@ static void disable_screen(struct screen *scr)
- scr->pending = true;
- }
- }
-- scr->swapping = true;
- }
- scr->enabled = false;
- }
-@@ -319,13 +317,8 @@ static void do_redraw_screen(struct screen *scr)
- kmscon_text_render(scr->txt);
-
- ret = display_swap(scr->disp);
-- if (ret) {
-- if (ret != -EBUSY)
-- log_warning("cannot swap display [%s] %d", display_name(scr->disp), ret);
-- return;
-- }
--
-- scr->swapping = true;
-+ if (ret && ret != -EBUSY)
-+ log_warning("cannot swap display [%s] %d", display_name(scr->disp), ret);
- }
-
- static void redraw_screen(struct screen *scr)
-@@ -333,7 +326,7 @@ static void redraw_screen(struct screen *scr)
- if (!scr->term->awake || !scr->enabled)
- return;
-
-- if (scr->swapping)
-+ if (display_is_swapping(scr->disp))
- scr->pending = true;
- else
- do_redraw_screen(scr);
-@@ -420,8 +413,6 @@ static void redraw_all_text(struct kmscon_terminal *term)
- shl_dlist_for_each(iter, &term->screens)
- {
- scr = shl_dlist_entry(iter, struct screen, list);
-- if (display_is_swapping(scr->disp))
-- scr->swapping = true;
- redraw_screen(scr);
- }
- }
-@@ -430,7 +421,6 @@ static void display_pageflip(void *unused, void *unused2, void *data)
- {
- struct screen *scr = data;
-
-- scr->swapping = false;
- if (scr->pending)
- do_redraw_screen(scr);
- }
---
-2.55.0
-
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-08 14:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 14:32 [rpms/kmscon] f44: Update to v10.0.4 Jocelyn Falempe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox