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..8001560 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# wlroots0.16 + +The wlroots0.16 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..430fb55 --- /dev/null +++ b/Revert-layer-shell-error-on-0-dimension-without-anch.patch @@ -0,0 +1,44 @@ +From 05a740206a73c6aab3762eb449b0733e5b9a4c7a Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Sat, 25 Jun 2022 21:22:08 -0700 +Subject: [PATCH] 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 fa054d3c..062fa96d 100644 +--- a/types/wlr_layer_shell_v1.c ++++ b/types/wlr_layer_shell_v1.c +@@ -316,26 +316,6 @@ static void layer_surface_role_commit(struct wlr_surface *wlr_surface) { + struct wlr_layer_surface_v1 *surface = + wlr_layer_surface_v1_from_wlr_surface(wlr_surface); + +- 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.37.3 + diff --git a/dead.package b/dead.package deleted file mode 100644 index 5b6e2e9..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -This compat package is no longer used 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..635c7d5 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (wlroots-0.16.2.tar.gz) = 9d5fbee3b87738de75323a056b83446eb93b81ac3e8a4315918d5daad6ed2f50392d9641039f3f830ec1df94155473a2052689d3c029be7572d8ec9ecc62c0e9 +SHA512 (wlroots-0.16.2.tar.gz.sig) = 25e09ed5dba676d4911183a87a25a04040255a7a2ec7dff8e124fd4957ed16cd091e2a5105853d8d5896cdd5db17513f04e7fdf3a79363eb296d40f29245e0fa diff --git a/wlroots-0.16.2-backend-fix-build-against-upcoming-gcc-14.patch b/wlroots-0.16.2-backend-fix-build-against-upcoming-gcc-14.patch new file mode 100644 index 0000000..1cdac06 --- /dev/null +++ b/wlroots-0.16.2-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)); + if (group->rings == NULL) { + goto group_fail; + } +@@ -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)); + if (group->strips == NULL) { + goto group_fail; + } +@@ -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)); + if (group->buttons == NULL) { + goto group_fail; + } +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.16.2-render-vulkan-remove-hardcoded-validation-layers.patch b/wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch new file mode 100644 index 0000000..68ecf28 --- /dev/null +++ b/wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch @@ -0,0 +1,55 @@ +From f3ba14e491333d6bbba8c60328c4dbfd20571182 Mon Sep 17 00:00:00 2001 +From: Simon Zeni +Date: Fri, 11 Nov 2022 15:54:07 -0500 +Subject: [PATCH] render/vulkan: remove hardcoded validation layers + +Users should use the VK_INSTANCE_LAYERS env var to set layers at runtime +--- + render/vulkan/renderer.c | 2 ++ + render/vulkan/vulkan.c | 12 ++---------- + 2 files changed, 4 insertions(+), 10 deletions(-) + +diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c +index c64937aa6..ff208abc4 100644 +--- a/render/vulkan/renderer.c ++++ b/render/vulkan/renderer.c +@@ -1938,6 +1938,8 @@ error: + struct wlr_renderer *wlr_vk_renderer_create_with_drm_fd(int drm_fd) { + wlr_log(WLR_INFO, "The vulkan renderer is only experimental and " + "not expected to be ready for daily use"); ++ wlr_log(WLR_INFO, "Run with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation " ++ "to enable the validation layer"); + + // NOTE: we could add functionality to allow the compositor passing its + // name and version to this function. Just use dummies until then, +diff --git a/render/vulkan/vulkan.c b/render/vulkan/vulkan.c +index 748ba9c32..c964fe12e 100644 +--- a/render/vulkan/vulkan.c ++++ b/render/vulkan/vulkan.c +@@ -138,21 +138,13 @@ struct wlr_vk_instance *vulkan_instance_create(bool debug) { + .apiVersion = VK_API_VERSION_1_1, + }; + +- const char *layers[] = { +- "VK_LAYER_KHRONOS_validation", +- // "VK_LAYER_RENDERDOC_Capture", +- // "VK_LAYER_live_introspection", +- }; +- +- unsigned layer_count = debug * (sizeof(layers) / sizeof(layers[0])); +- + VkInstanceCreateInfo instance_info = { + .sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, + .pApplicationInfo = &application_info, + .enabledExtensionCount = extensions_len, + .ppEnabledExtensionNames = extensions, +- .enabledLayerCount = layer_count, +- .ppEnabledLayerNames = layers, ++ .enabledLayerCount = 0, ++ .ppEnabledLayerNames = NULL, + }; + + VkDebugUtilsMessageSeverityFlagsEXT severity = +-- +GitLab + diff --git a/wlroots0.16.spec b/wlroots0.16.spec new file mode 100644 index 0000000..4585d5d --- /dev/null +++ b/wlroots0.16.spec @@ -0,0 +1,131 @@ +# Version of the .so library +%global abi_ver 11 +%global compat_ver 0.16 +%global compat_name wlroots + +Name: %{compat_name}%{compat_ver} +Version: %{compat_ver}.2 +Release: 3%{?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 + +# Upstream patches +Patch0: %{url}/-/commit/f3ba14e491333d6bbba8c60328c4dbfd20571182.patch#/wlroots-0.16.2-render-vulkan-remove-hardcoded-validation-layers.patch +# https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/f3e1f7b2a70a500b740bfc406e893eba0852699a +Patch1: wlroots-0.16.2-backend-fix-build-against-upcoming-gcc-14.patch + +# Fedora patches +# Following patch is required for phoc. +Patch10: Revert-layer-shell-error-on-0-dimension-without-anch.patch + +BuildRequires: gcc +BuildRequires: glslang +BuildRequires: gnupg2 +BuildRequires: meson >= 0.59.0 +BuildRequires: pkgconfig(egl) +BuildRequires: pkgconfig(gbm) >= 17.1.0 +BuildRequires: pkgconfig(glesv2) +BuildRequires: pkgconfig(hwdata) +BuildRequires: pkgconfig(libdrm) >= 2.4.113 +BuildRequires: pkgconfig(libinput) >= 1.21.0 +BuildRequires: pkgconfig(libseat) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(pixman-1) +BuildRequires: pkgconfig(vulkan) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-protocols) >= 1.27 +BuildRequires: pkgconfig(wayland-scanner) +BuildRequires: pkgconfig(wayland-server) >= 1.21 +BuildRequires: pkgconfig(x11-xcb) +BuildRequires: pkgconfig(xcb) +BuildRequires: pkgconfig(xcb-errors) +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 -N -n %{compat_name}-%{version} +# apply unconditional patches +%autopatch -p1 -M19 +# apply conditional patches + + +%build +MESON_OPTIONS=( + # Disable options requiring extra/unpackaged dependencies + -Dexamples=false +) + +%{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 +* Sat Jul 20 2024 Fedora Release Engineering - 0.16.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 0.16.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Dec 06 2023 Aleksei Bavshin - 0.16.2-1 +- Initialize wlroots0.16 package from rpms/wlroots@0a1c111