diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..311a205 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/*.src.rpm +/results_wlroots*/ +/wlroots-*.tar.gz +/wlroots-*.tar.gz.sig diff --git a/README.md b/README.md new file mode 100644 index 0000000..c74481a --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# wlroots0.15 + +The wlroots0.15 package diff --git a/Revert-layer-shell-error-on-0-dimension-without-anch.patch b/Revert-layer-shell-error-on-0-dimension-without-anch.patch new file mode 100644 index 0000000..b993126 --- /dev/null +++ b/Revert-layer-shell-error-on-0-dimension-without-anch.patch @@ -0,0 +1,45 @@ +From d5599fca9bdc4580929f904e21b6bc89e3ce8120 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Sat, 25 Jun 2022 21:22:08 -0700 +Subject: [PATCH 1/3] Revert "layer-shell: error on 0 dimension without + anchors" + +This reverts commit 8dec751a6d84335fb04288b8efab6dd5c90288d3. +--- + types/wlr_layer_shell_v1.c | 20 -------------------- + 1 file changed, 20 deletions(-) + +diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c +index 456dbc0e..55a6cfb8 100644 +--- a/types/wlr_layer_shell_v1.c ++++ b/types/wlr_layer_shell_v1.c +@@ -328,26 +328,6 @@ static void layer_surface_role_commit(struct wlr_surface *wlr_surface) { + return; + } + +- const uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | +- ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT; +- if (surface->pending.desired_width == 0 && +- (surface->pending.anchor & horiz) != horiz) { +- wl_resource_post_error(surface->resource, +- ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE, +- "width 0 requested without setting left and right anchors"); +- return; +- } +- +- const uint32_t vert = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | +- ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM; +- if (surface->pending.desired_height == 0 && +- (surface->pending.anchor & vert) != vert) { +- wl_resource_post_error(surface->resource, +- ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE, +- "height 0 requested without setting top and bottom anchors"); +- return; +- } +- + surface->current = surface->pending; + surface->pending.committed = 0; + +-- +2.36.0 + diff --git a/dead.package b/dead.package deleted file mode 100644 index 5204a84..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Orphaned for 6+ weeks diff --git a/gpgkey-0FDE7BE0E88F5E48.gpg b/gpgkey-0FDE7BE0E88F5E48.gpg new file mode 100644 index 0000000..cc3b6a0 Binary files /dev/null and b/gpgkey-0FDE7BE0E88F5E48.gpg differ diff --git a/sources b/sources new file mode 100644 index 0000000..4500362 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (wlroots-0.15.1.tar.gz) = 6228160f2f350a406c612f1048d7075cf2f78206cc84bc16f889d5d0acd614f9e98845fffed03d7067cfdbd7558b77fcc5d8cedc3868d866e476523126a63677 +SHA512 (wlroots-0.15.1.tar.gz.sig) = c264274b132307276395648e7bfc2cd7d9061cd0f1bd4f5cb3a9acf859aeca536b1c57611adfaa9bf7334095e34df4e42253ba37fa30ae76a0df0a9e7091dfa3 diff --git a/wlroots-0.15.1-backend-fix-build-against-upcoming-gcc-14.patch b/wlroots-0.15.1-backend-fix-build-against-upcoming-gcc-14.patch new file mode 100644 index 0000000..da877d2 --- /dev/null +++ b/wlroots-0.15.1-backend-fix-build-against-upcoming-gcc-14.patch @@ -0,0 +1,66 @@ +From f61df1366c98868b73c108fbdb96dca8a3824a0d Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Thu, 21 Dec 2023 21:06:20 +0000 +Subject: [PATCH] backend: fix build against upcoming `gcc-14` + (`-Werror=calloc-transposed-args`) + +`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It +detected minor infelicity in `calloc()` API usage in `wlroots`: + + ../backend/libinput/tablet_pad.c: In function 'add_pad_group_from_libinput': + ../backend/libinput/tablet_pad.c:36:38: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] + 36 | group->rings = calloc(sizeof(unsigned int), group->ring_count); + | ^~~~~~~~ + ../backend/libinput/tablet_pad.c:36:38: note: earlier argument should specify number of elements, later size of each element +--- + backend/libinput/tablet_pad.c | 6 +++--- + backend/wayland/output.c | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c +index 078f7ca1..0ad139c7 100644 +--- a/backend/libinput/tablet_pad.c ++++ b/backend/libinput/tablet_pad.c +@@ -34,7 +34,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad, + ++group->ring_count; + } + } +- group->rings = calloc(sizeof(unsigned int), group->ring_count); ++ group->rings = calloc(group->ring_count, sizeof(unsigned int)); + size_t ring = 0; + for (size_t i = 0; i < pad->ring_count; ++i) { + if (libinput_tablet_pad_mode_group_has_ring(li_group, i)) { +@@ -51,7 +51,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad, + ++group->strip_count; + } + } +- group->strips = calloc(sizeof(unsigned int), group->strip_count); ++ group->strips = calloc(group->strip_count, sizeof(unsigned int)); + size_t strip = 0; + for (size_t i = 0; i < pad->strip_count; ++i) { + if (libinput_tablet_pad_mode_group_has_strip(li_group, i)) { +@@ -67,7 +67,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad, + ++group->button_count; + } + } +- group->buttons = calloc(sizeof(unsigned int), group->button_count); ++ group->buttons = calloc(group->button_count, sizeof(unsigned int)); + size_t button = 0; + for (size_t i = 0; i < pad->button_count; ++i) { + if (libinput_tablet_pad_mode_group_has_button(li_group, i)) { +diff --git a/backend/wayland/output.c b/backend/wayland/output.c +index c4b95e1d..97852c60 100644 +--- a/backend/wayland/output.c ++++ b/backend/wayland/output.c +@@ -521,7 +521,7 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *wlr_backend) { + } + + struct wlr_wl_output *output; +- if (!(output = calloc(sizeof(struct wlr_wl_output), 1))) { ++ if (!(output = calloc(1, sizeof(struct wlr_wl_output)))) { + wlr_log(WLR_ERROR, "Failed to allocate wlr_wl_output"); + return NULL; + } +-- +2.43.0 + diff --git a/wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch b/wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch new file mode 100644 index 0000000..427866b --- /dev/null +++ b/wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch @@ -0,0 +1,30 @@ +From 55c4ffae659ccd15ba40ec9355fcdc2bb68c32b7 Mon Sep 17 00:00:00 2001 +From: Alexander Orzechowski +Date: Sat, 4 Jun 2022 18:18:02 -0400 +Subject: [PATCH] wlr_output_commit_state: Make sure to clear the back buffer + +Fixes: #3445 +--- + types/output/output.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/types/output/output.c b/types/output/output.c +index 85590ab6..4cf0fa8f 100644 +--- a/types/output/output.c ++++ b/types/output/output.c +@@ -654,10 +654,12 @@ bool wlr_output_test(struct wlr_output *output) { + bool wlr_output_commit(struct wlr_output *output) { + if (!output_basic_test(output)) { + wlr_log(WLR_ERROR, "Basic output test failed for %s", output->name); ++ output_clear_back_buffer(output); + return false; + } + + if (!output_ensure_buffer(output)) { ++ output_clear_back_buffer(output); + return false; + } + +-- +2.37.3 + diff --git a/wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch b/wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch new file mode 100644 index 0000000..8eb3f66 --- /dev/null +++ b/wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch @@ -0,0 +1,32 @@ +From 637f12cefc0cd114d86402e793776526fdd66c2e Mon Sep 17 00:00:00 2001 +From: Sebastian Krzyszkowiak +Date: Sat, 5 Mar 2022 08:00:39 +0100 +Subject: [PATCH 2/3] wlr_output_layout_contains_point: handle outputs that + aren't in the layout + +Instead of crashing, return `false` when the specified output isn't part +of the layout, as we can be sure that it doesn't contain the specified +point. + +(cherry picked from commit 13fcdba75cf5f21cfd49c1a05f4fa62f77619b40) +--- + types/wlr_output_layout.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/types/wlr_output_layout.c b/types/wlr_output_layout.c +index eb672f06..f0f546da 100644 +--- a/types/wlr_output_layout.c ++++ b/types/wlr_output_layout.c +@@ -242,6 +242,9 @@ bool wlr_output_layout_contains_point(struct wlr_output_layout *layout, + if (reference) { + struct wlr_output_layout_output *l_output = + wlr_output_layout_get(layout, reference); ++ if (!l_output) { ++ return false; ++ } + struct wlr_box *box = output_layout_output_get_box(l_output); + return wlr_box_contains_point(box, lx, ly); + } else { +-- +2.36.0 + diff --git a/wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch b/wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch new file mode 100644 index 0000000..3222c90 --- /dev/null +++ b/wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch @@ -0,0 +1,108 @@ +From eed77e4735557eb829aebb82bb8cea9fa0631d6f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Guido=20G=C3=BCnther?= +Date: Fri, 25 Mar 2022 18:48:58 +0100 +Subject: [PATCH 3/3] xdg-activation: Deduplicate token creation code + +There were three places initializing a token: + +- wlr_xdg_activation_v1_add_token +- wlr_xdg_activation_token_v1_create +- activation_handle_get_activation_token + +The initialization of the token.destroy was missing in the first one. To +prevent these functions from getting out of sync move the token creation +into a common function. + +Fixes 4c59f7d4 ("xdg-activation: Allow to submit tokens") + +(cherry picked from commit dd03d839ab56c3e5d7c607a8d76e58e0b75edb85) +--- + types/wlr_xdg_activation_v1.c | 42 +++++++++++++++++------------------ + 1 file changed, 20 insertions(+), 22 deletions(-) + +diff --git a/types/wlr_xdg_activation_v1.c b/types/wlr_xdg_activation_v1.c +index 208ada28..b610fe17 100644 +--- a/types/wlr_xdg_activation_v1.c ++++ b/types/wlr_xdg_activation_v1.c +@@ -248,15 +248,11 @@ static void activation_handle_destroy(struct wl_client *client, + wl_resource_destroy(activation_resource); + } + +-static void activation_handle_get_activation_token(struct wl_client *client, +- struct wl_resource *activation_resource, uint32_t id) { +- struct wlr_xdg_activation_v1 *activation = +- activation_from_resource(activation_resource); +- ++static struct wlr_xdg_activation_token_v1 *activation_token_create( ++ struct wlr_xdg_activation_v1 *activation) { + struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token)); + if (token == NULL) { +- wl_client_post_no_memory(client); +- return; ++ return NULL; + } + wl_list_init(&token->link); + wl_list_init(&token->seat_destroy.link); +@@ -265,6 +261,20 @@ static void activation_handle_get_activation_token(struct wl_client *client, + + token->activation = activation; + ++ return token; ++} ++ ++static void activation_handle_get_activation_token(struct wl_client *client, ++ struct wl_resource *activation_resource, uint32_t id) { ++ struct wlr_xdg_activation_v1 *activation = ++ activation_from_resource(activation_resource); ++ ++ struct wlr_xdg_activation_token_v1 *token = activation_token_create(activation); ++ if (token == NULL) { ++ wl_client_post_no_memory(client); ++ return; ++ } ++ + uint32_t version = wl_resource_get_version(activation_resource); + token->resource = wl_resource_create(client, + &xdg_activation_token_v1_interface, version, id); +@@ -371,19 +381,12 @@ struct wlr_xdg_activation_v1 *wlr_xdg_activation_v1_create( + + struct wlr_xdg_activation_token_v1 *wlr_xdg_activation_token_v1_create( + struct wlr_xdg_activation_v1 *activation) { +- struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token)); ++ struct wlr_xdg_activation_token_v1 *token = activation_token_create(activation); ++ + if (token == NULL) { + return NULL; + } + +- wl_list_init(&token->link); +- // Currently no way to set seat/surface +- wl_list_init(&token->seat_destroy.link); +- wl_list_init(&token->surface_destroy.link); +- wl_signal_init(&token->events.destroy); +- +- token->activation = activation; +- + if (!token_init(token)) { + wlr_xdg_activation_token_v1_destroy(token); + return NULL; +@@ -412,15 +415,10 @@ struct wlr_xdg_activation_token_v1 *wlr_xdg_activation_v1_add_token( + struct wlr_xdg_activation_v1 *activation, const char *token_str) { + assert(token_str); + +- struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token)); ++ struct wlr_xdg_activation_token_v1 *token = activation_token_create(activation); + if (token == NULL) { + return NULL; + } +- wl_list_init(&token->link); +- wl_list_init(&token->seat_destroy.link); +- wl_list_init(&token->surface_destroy.link); +- +- token->activation = activation; + token->token = strdup(token_str); + + wl_list_insert(&activation->tokens, &token->link); +-- +2.36.0 + diff --git a/wlroots0.15.spec b/wlroots0.15.spec new file mode 100644 index 0000000..6979dc3 --- /dev/null +++ b/wlroots0.15.spec @@ -0,0 +1,148 @@ +# Version of the .so library +%global abi_ver 10 +%global compat_ver 0.15 +%global compat_name wlroots + +Name: %{compat_name}%{compat_ver} +Version: %{compat_ver}.1 +Release: 7%{?dist} +Summary: A modular Wayland compositor library + +# Source files/overall project licensed as MIT, but +# - HPND-sell-variant +# * protocol/drm.xml +# * protocol/wlr-data-control-unstable-v1.xml +# * protocol/wlr-foreign-toplevel-management-unstable-v1.xml +# * protocol/wlr-gamma-control-unstable-v1.xml +# * protocol/wlr-input-inhibitor-unstable-v1.xml +# * protocol/wlr-layer-shell-unstable-v1.xml +# * protocol/wlr-output-management-unstable-v1.xml +# - LGPL-2.1-or-later +# * protocol/idle.xml +# * protocol/server-decoration.xml +# Those files are processed to C-compilable files by the +# `wayland-scanner` binary during build and don't alter +# the main license of the binaries linking with them by +# the underlying licenses. +License: MIT +URL: https://gitlab.freedesktop.org/wlroots/wlroots +Source0: %{url}/-/releases/%{version}/downloads/%{compat_name}-%{version}.tar.gz +Source1: %{url}/-/releases/%{version}/downloads/%{compat_name}-%{version}.tar.gz.sig +# 0FDE7BE0E88F5E48: emersion +Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rkjfnghbjxug6b19#/gpgkey-0FDE7BE0E88F5E48.gpg + +# Following 3 patches are required for phoc. +Patch0: Revert-layer-shell-error-on-0-dimension-without-anch.patch +Patch1: wlroots-0.15.1-wlr_output_layout_contains_point-handle-outputs-that.patch +Patch2: wlroots-0.15.1-xdg-activation-Deduplicate-token-creation-code.patch +# wlroots/wlroots!3601 +Patch3: wlroots-0.15.1-wlr_output_commit_state-Make-sure-to-clear-the-back-.patch +# https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/f3e1f7b2a70a500b740bfc406e893eba0852699a +Patch4: wlroots-0.15.1-backend-fix-build-against-upcoming-gcc-14.patch + +BuildRequires: gcc +BuildRequires: glslang +BuildRequires: gnupg2 +BuildRequires: meson >= 0.58.1 +BuildRequires: pkgconfig(egl) +BuildRequires: pkgconfig(gbm) >= 17.1.0 +BuildRequires: pkgconfig(glesv2) +BuildRequires: pkgconfig(libdrm) >= 2.4.109 +BuildRequires: pkgconfig(libinput) >= 1.14.0 +BuildRequires: pkgconfig(libseat) +BuildRequires: pkgconfig(libsystemd) >= 237 +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(pixman-1) +BuildRequires: pkgconfig(vulkan) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-egl) +BuildRequires: pkgconfig(wayland-protocols) >= 1.24 +BuildRequires: pkgconfig(wayland-scanner) +BuildRequires: pkgconfig(wayland-server) >= 1.19 +BuildRequires: pkgconfig(x11-xcb) +BuildRequires: pkgconfig(xcb) +BuildRequires: pkgconfig(xcb-icccm) +BuildRequires: pkgconfig(xcb-renderutil) +BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(xwayland) + +%description +%{summary}. + + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} == %{version}-%{release} +# not required per se, so not picked up automatically by RPM +Recommends: pkgconfig(xcb-icccm) +# Conflicts with other wlroots-devel packages +Conflicts: pkgconfig(wlroots) + +%description devel +Development files for %{name}. + + +%prep +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%autosetup -p1 -n %{compat_name}-%{version} + + +%build +MESON_OPTIONS=( + # Disable options requiring extra/unpackaged dependencies + -Dexamples=false + -Dxcb-errors=disabled +%ifarch s390x + # Disable -Werror on s390x: https://github.com/swaywm/wlroots/issues/2018 + -Dwerror=false +%endif +) + +%{meson} "${MESON_OPTIONS[@]}" +%{meson_build} + + +%install +%{meson_install} + + +%check +%{meson_test} + + +%files +%license LICENSE +%doc README.md +%{_libdir}/lib%{compat_name}.so.%{abi_ver}* + + +%files devel +%{_includedir}/wlr +%{_libdir}/lib%{compat_name}.so +%{_libdir}/pkgconfig/%{compat_name}.pc + + +%changelog +* Fri Jul 25 2025 Fedora Release Engineering - 0.15.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sun Jan 19 2025 Fedora Release Engineering - 0.15.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Mon Jul 22 2024 Aleksei Bavshin - 0.15.1-5 +- Apply patch for GCC 14 `-Werror=calloc-transposed-args` (rhbz#2261793) + +* Sat Jul 20 2024 Fedora Release Engineering - 0.15.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 0.15.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 0.15.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jan 21 2023 Fedora Release Engineering - 0.15.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Dec 02 2022 Aleksei Bavshin - 0.15.1-1 +- Initialize wlroots0.15 package from rpms/wlroots@b335d4d