From 373f3f4c1134e1df1aac586604204fe13e512c69 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mar 04 2019 11:08:32 +0000 Subject: Add translations for the new spinner/bgrt offline-updates splash --- diff --git a/plymouth-updates.patch b/plymouth-updates.patch index e4504f7..611f23c 100644 --- a/plymouth-updates.patch +++ b/plymouth-updates.patch @@ -1,7 +1,7 @@ From f89858654353d9ab1ca9a2a2a9f758d40f868091 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 5 Nov 2018 15:45:53 -0500 -Subject: [PATCH 01/74] configure: bump to 0.9.5 +Subject: [PATCH 01/82] configure: bump to 0.9.5 --- configure.ac | 2 +- @@ -23,7 +23,7 @@ index 0382773..66d3649 100644 From 763c023caa5215070047b07c80208b9d99dc8d8b Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 8 Nov 2018 11:05:05 +0000 -Subject: [PATCH 02/74] systemd-units: Also add +Subject: [PATCH 02/82] systemd-units: Also add "ConditionVirtualization=!container" in systemd-ask-password-plymouth.path.in This completes the fix for #27 @@ -49,7 +49,7 @@ index c2ee420..826a6b3 100644 From 4de54f598b66cd8d8fc55328f99f3b568cc9d4eb Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 17 Jul 2018 09:46:12 +0200 -Subject: [PATCH 03/74] logger: Add a separator between different boot logs +Subject: [PATCH 03/82] logger: Add a separator between different boot logs Since we concatenate boot logs one after the other in /var/log/boot.log it is hard to tell where the logs from one boot end the next boot starts. @@ -112,7 +112,7 @@ index e9b90de..03dd347 100644 From 059390ac569798cbf40a958ea714b15f313b46a3 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 10 Nov 2018 16:04:31 +0100 -Subject: [PATCH 04/74] ply-device-manager: Fix race causing undesired creation +Subject: [PATCH 04/82] ply-device-manager: Fix race causing undesired creation of non-gfx devs On systems with working drm/kms devices we still sometimes see: @@ -198,7 +198,7 @@ index 55248ac..d70e709 100644 From 9639ed895331924b24670ff6f814aaa952ad5b02 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 12 Nov 2018 12:50:33 +0100 -Subject: [PATCH 05/74] two-step: Fix animation not starting on later added +Subject: [PATCH 05/82] two-step: Fix animation not starting on later added heads Fix the animation not starting on heads added after show_splash_screen @@ -236,7 +236,7 @@ index 7307e19..924207c 100644 From 75d93c0f30e7455f817c4705af371c743d0b3913 Mon Sep 17 00:00:00 2001 From: Jakub Steiner Date: Wed, 21 Nov 2018 15:44:39 +0100 -Subject: [PATCH 06/74] spinner theme: update +Subject: [PATCH 06/82] spinner theme: update - update spinner & lock to current visuals @@ -6373,7 +6373,7 @@ HcmV?d00001 From 50adbfd30085715940a22f1517c81584d73d767b Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 27 Nov 2018 08:24:20 +0100 -Subject: [PATCH 07/74] two-step: Fix crash asking for password with multiple +Subject: [PATCH 07/82] two-step: Fix crash asking for password with multiple heads Commit 9639ed895331 ("two-step: Fix animation not starting on later @@ -6416,7 +6416,7 @@ index 924207c..0ceda90 100644 From addff821e0a036f7158758e0bf0ac97688d7500e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 5 Nov 2018 15:03:28 +0100 -Subject: [PATCH 08/74] ply-image: Do not assume all files are PNGs +Subject: [PATCH 08/82] ply-image: Do not assume all files are PNGs So far the image loading code has been assuming that all files are PNGs, this commit makes the code check the file-header before assuming the file @@ -6528,7 +6528,7 @@ index 8b46978..fbf42d6 100644 From f5915187b44dd18dd9d1956d169bb17fbd4078d4 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 6 Nov 2018 09:15:22 +0100 -Subject: [PATCH 09/74] ply-image: Add support for loading BMPs +Subject: [PATCH 09/82] ply-image: Add support for loading BMPs Add support for loading BMP files. This is needed to be able to read the the ACPI BGRT graphics (the firmware splash shown at boot by the firmware). @@ -6657,7 +6657,7 @@ index fbf42d6..204fd2e 100644 From 1723419e6c3ca89a973250ca8ca955baf8724af1 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 7 Nov 2018 12:24:12 +0100 -Subject: [PATCH 10/74] ply-renderer: Add ply_renderer_get_panel_properties +Subject: [PATCH 10/82] ply-renderer: Add ply_renderer_get_panel_properties function For some themes we want to read the firmware-logo to use as background, @@ -6738,7 +6738,7 @@ index 59391e1..c0e0ed5 100644 From ed3aae9d8f79afb546cc9edeb8b051237c3e4752 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 7 Nov 2018 14:26:11 +0100 -Subject: [PATCH 11/74] drm: Implement ply_renderer_get_panel_properties +Subject: [PATCH 11/82] drm: Implement ply_renderer_get_panel_properties Implement the get_panel_properties plugin interface. @@ -6819,7 +6819,7 @@ index 1ff2b29..34b52d7 100644 From 986c911e21b41464aa17006fd048dc38d5824325 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 7 Nov 2018 15:49:40 +0100 -Subject: [PATCH 12/74] ply-pixel-buffer: Fix fill_with_buffer fastpath when +Subject: [PATCH 12/82] ply-pixel-buffer: Fix fill_with_buffer fastpath when device_scale != 1 After calling ply_pixel_buffer_crop_area_to_clip_area cropped_area.x/y @@ -6854,7 +6854,7 @@ index de3b107..04aa0d6 100644 From e1e9e554d2014d80ce666d85174dbea89b05e038 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 9 Nov 2018 23:05:24 +0100 -Subject: [PATCH 13/74] ply-pixel-buffer: Fix marking buffers as opaque when +Subject: [PATCH 13/82] ply-pixel-buffer: Fix marking buffers as opaque when doing a solid fill Instead of comparing fill_area addresses actually compare the contents @@ -6887,7 +6887,7 @@ index 04aa0d6..86e8e3f 100644 From 385a008c83e41d7958392bc4cf8aacb94965fe30 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 6 Nov 2018 18:55:27 +0100 -Subject: [PATCH 14/74] ply-pixel-buffer: Add +Subject: [PATCH 14/82] ply-pixel-buffer: Add ply_pixel_buffer_get/set_device_rotation helpers For some themes we want to use the firmware-logo / splash as background, @@ -6965,7 +6965,7 @@ index ea7f833..ddec47d 100644 From 3f71c28e455ea26c23ab924146dae0871b342732 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 8 Nov 2018 14:25:05 +0100 -Subject: [PATCH 15/74] ply-pixel-buffer: Add ply_pixel_buffer_rotate_upright +Subject: [PATCH 15/82] ply-pixel-buffer: Add ply_pixel_buffer_rotate_upright helper For some themes we want to use the firmware-logo / splash as background, @@ -7042,7 +7042,7 @@ index ddec47d..7b5da36 100644 From ae8a676c096731e6ad0868e80c53e23ba82c0695 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 7 Nov 2018 15:46:06 +0100 -Subject: [PATCH 16/74] ply-pixel-display: Add +Subject: [PATCH 16/82] ply-pixel-display: Add ply_pixel_display_get_device_scale() function Add a function to get the device scale for a ply-pixel-display. @@ -7104,7 +7104,7 @@ index 675c181..a57b9a9 100644 From 9f3aff2e7c5ad70b37c779c06509c8d1c74a6e58 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 6 Nov 2018 14:41:38 +0100 -Subject: [PATCH 17/74] two-step: Use a pixel-buffer instead of an image for +Subject: [PATCH 17/82] two-step: Use a pixel-buffer instead of an image for the view's background Use a pixel-buffer instead of an image, this gives us more flexibility. @@ -7169,7 +7169,7 @@ index 0ceda90..efdcaa9 100644 From e10ed13fffb59b7a7656227c8f77b93310c160cd Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 7 Nov 2018 20:27:08 +0100 -Subject: [PATCH 18/74] two-step: Speed up background-tile drawing on HiDPI +Subject: [PATCH 18/82] two-step: Speed up background-tile drawing on HiDPI screens Before this commit background drawing on HiDPI screens is quite slow @@ -7278,7 +7278,7 @@ index efdcaa9..65586f9 100644 From 856297c7a4bc8dff5b3d03951b250d9620468f9a Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 6 Nov 2018 14:55:29 +0100 -Subject: [PATCH 19/74] two-step: Add ACPI BGRT extension support +Subject: [PATCH 19/82] two-step: Add ACPI BGRT extension support Add support to (optionally) use the firmware splash screen logo from the ACPI BGRT extension as background. @@ -7440,7 +7440,7 @@ index 65586f9..3570182 100644 From d45c477d44e9d352e9d91686237e26474ab009d7 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 13 Nov 2018 09:03:10 +0100 -Subject: [PATCH 20/74] two-step: bgrt: Deal with quirky firmwares +Subject: [PATCH 20/82] two-step: bgrt: Deal with quirky firmwares On laptops / tablets the LCD panel is typically brought up in its native resolution, so we can trust the x- and y-offset values @@ -7581,7 +7581,7 @@ index 3570182..641eb70 100644 From 4925a485c56fec0bd1333ec94d99b9c0e5b769b4 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 13 Nov 2018 09:51:32 +0100 -Subject: [PATCH 21/74] themes: Add new BGRT theme, using the firmware boot +Subject: [PATCH 21/82] themes: Add new BGRT theme, using the firmware boot splash as background Add a new BGRT theme, this is a copy of the spinner theme, using the ACPI @@ -12056,7 +12056,7 @@ HcmV?d00001 From 10fddacd1e9a45c8f7345067d61974ef249a1deb Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 3 Dec 2018 16:20:59 +0100 -Subject: [PATCH 22/74] two-step: Do not rotate bgrt background image for +Subject: [PATCH 22/82] two-step: Do not rotate bgrt background image for upside-down panels Upside-down LCD panels are fixed up in HW by the GOP, so the bgrt image is @@ -12095,7 +12095,7 @@ index 641eb70..16b8fc8 100644 From 534aa0cfd591c5f9abc70551c4fc736001e51c5e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 27 Nov 2018 19:21:33 +0100 -Subject: [PATCH 23/74] drm: Drop unused encoder_id +Subject: [PATCH 23/82] drm: Drop unused encoder_id We cache the encoder-id, but we never use it, so stop caching it. @@ -12165,7 +12165,7 @@ index 34b52d7..9453a87 100644 From 42bbee8c3883507e51c722f75a80f19757ec5406 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 3 Dec 2018 12:25:25 +0100 -Subject: [PATCH 24/74] drm: Directly store the mode instead of the mode_index +Subject: [PATCH 24/82] drm: Directly store the mode instead of the mode_index The only way we use mode_index is to get the mode, so its easier to directly store the mode when we create a head. @@ -12387,7 +12387,7 @@ index 9453a87..52f948e 100644 From bf8a2e893eb99b373f6e6de72954aa171e766d88 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 27 Nov 2018 19:50:33 +0100 -Subject: [PATCH 25/74] drm: Refactor create_heads_for_active_connectors +Subject: [PATCH 25/82] drm: Refactor create_heads_for_active_connectors Refactor create_heads_for_active_connectors to prepare it for adding a step where we assign controllers to connected outputs which do not have @@ -12571,7 +12571,7 @@ index 52f948e..f88d445 100644 From 52bf6e3e950729e39b838c119284ced1aecc39a0 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 27 Nov 2018 23:09:27 +0100 -Subject: [PATCH 26/74] drm: Store tiled and rotation in ply_output_t +Subject: [PATCH 26/82] drm: Store tiled and rotation in ply_output_t This avoids the need to call ply_renderer_connector_get_rotation_and_tiled twice and thus also the need to call drmModeGetProperty twice for all @@ -12685,7 +12685,7 @@ index f88d445..b68265b 100644 From ef55ed99e74d15ae7b9a53b89450b6a7b4c297ca Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 27 Nov 2018 23:58:26 +0100 -Subject: [PATCH 27/74] drm: More connector enumeration refactoring +Subject: [PATCH 27/82] drm: More connector enumeration refactoring Some further refactoring to prepare for adding code to picking crtcs for unconfigured connectors. @@ -12877,7 +12877,7 @@ index b68265b..586df62 100644 From 76b37d50720b6c07c976789943fb2b02069b168d Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 27 Nov 2018 22:51:58 +0100 -Subject: [PATCH 28/74] drm: Drop crtcs for clones for which we've picked +Subject: [PATCH 28/82] drm: Drop crtcs for clones for which we've picked different modes Signed-off-by: Hans de Goede @@ -12933,7 +12933,7 @@ index 586df62..87ecbfd 100644 From d67e729739f7cc3cb138bcad8182496c818bfd41 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 28 Nov 2018 00:53:46 +0100 -Subject: [PATCH 29/74] drm: Pick a controller for unconfigured connectors +Subject: [PATCH 29/82] drm: Pick a controller for unconfigured connectors So far we've been relying on the kernel fbcon code to set up all outputs, now that distros have started using deferred fbcon takeover for flickerfree @@ -13122,7 +13122,7 @@ index 87ecbfd..20543ea 100644 From b082f42494e8423f08f40addc833d7e9b0192cb6 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Tue, 4 Dec 2018 14:31:13 -0500 -Subject: [PATCH 30/74] keyboard: add helper to get the keyboard's renderer, if +Subject: [PATCH 30/82] keyboard: add helper to get the keyboard's renderer, if applicable Based on an original patch from Gert van de Kraats on Ubuntu's Launchpad: @@ -13177,7 +13177,7 @@ index 6147cc7..dd428c0 100644 From c46f446fe44457f599805b685547c2258bb3fa96 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Tue, 4 Dec 2018 14:41:35 -0500 -Subject: [PATCH 31/74] device-manager: free keyboards when deactivating a +Subject: [PATCH 31/82] device-manager: free keyboards when deactivating a renderer Based on an original patch by Gert van de Kraats, on Ubuntu Launchpad bug: @@ -13241,7 +13241,7 @@ index d70e709..8ceee10 100644 From bac628cd05783499d5e4dc005fb566c51ace2df8 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 9 Dec 2018 15:22:48 +0100 -Subject: [PATCH 32/74] ply-keyboard: Fix compiler warning +Subject: [PATCH 32/82] ply-keyboard: Fix compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -13275,7 +13275,7 @@ index e11c093..27395e0 100644 From 2dc81adb0f1a5469b15c62d3dacf53dfbc37c17a Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 19 Dec 2018 10:43:09 +0100 -Subject: [PATCH 33/74] libply: Add ply_strtod helper +Subject: [PATCH 33/82] libply: Add ply_strtod helper Add a ply_strtod helper which always uses "." as decimal separator independent of the locale. @@ -13338,7 +13338,7 @@ index ae4776e..4dd9c09 100644 From fb6d4b4983de70296ee84d0029e5e7b91202d526 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 19 Dec 2018 10:45:51 +0100 -Subject: [PATCH 34/74] two-step: Use plymouth_strtod +Subject: [PATCH 34/82] two-step: Use plymouth_strtod Use the locale agnostic plymouth_strtod helper which always uses a "." as decimal seperator. This fixes the various Alignment options not working @@ -13415,7 +13415,7 @@ index 16b8fc8..c1e75a8 100644 From e111ba8bafaa41fced0824e6fbccc20372917a3d Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 9 Jan 2019 11:31:06 +0100 -Subject: [PATCH 35/74] libply: Add ply_key_file_get_bool function +Subject: [PATCH 35/82] libply: Add ply_key_file_get_bool function Add a function to read a boolean value from a ply-key-file. @@ -13501,7 +13501,7 @@ index e69d14a..ef7124b 100644 From 6cf1bb3e37df6b69d3b0e17eee394ad8c6e57e75 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 20 Dec 2018 12:47:39 +0100 -Subject: [PATCH 36/74] two-step: Rename UseBGRT to UseFirmwareBackground +Subject: [PATCH 36/82] two-step: Rename UseBGRT to UseFirmwareBackground Rename the UseBGRT theme configfile option to UseFirmwareBackground, to make it clear what this does using language which most users will be @@ -13550,7 +13550,7 @@ index b5cc843..dc5eaf5 100644 From 410ba63c81f49b08ab674d359239869b23bdd80e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 19 Dec 2018 11:52:03 +0100 -Subject: [PATCH 37/74] two-step: Make the box image surrounding the unlock +Subject: [PATCH 37/82] two-step: Make the box image surrounding the unlock dialog optional In some themes we want a simple style text entry without a dialog like @@ -13679,7 +13679,7 @@ index 8f1ad58..c6e9be4 100644 From 27e671bff7df6310e32e640b7db91642ab31e84b Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 19 Dec 2018 13:28:28 +0100 -Subject: [PATCH 38/74] two-step: Add support for non center alignment of the +Subject: [PATCH 38/82] two-step: Add support for non center alignment of the (diskcrypt) dialog Add DialogHorizontalAlignment and DialogVerticalAlignment options which @@ -13768,7 +13768,7 @@ index c6e9be4..0f79795 100644 From d62be07815fc4830c5630c9b52a5b7ec08c62637 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 19 Dec 2018 13:33:08 +0100 -Subject: [PATCH 39/74] two-step: Make clearing the dialog-background when +Subject: [PATCH 39/82] two-step: Make clearing the dialog-background when using the firmware background optional Since the ask-for-password or ask-question dialog and the firmware background @@ -13854,7 +13854,7 @@ index dc5eaf5..86c2622 100644 From 6117fe683ba704041404ee3462faf0f768e2f396 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 9 Jan 2019 14:38:26 +0100 -Subject: [PATCH 40/74] plymouth-populate-initrd: Don't assume the ImageDir is +Subject: [PATCH 40/82] plymouth-populate-initrd: Don't assume the ImageDir is the theme-dir Before this commit plymouth-populate-initrd was only recursively copying the @@ -13908,7 +13908,7 @@ index c2f46c0..109b649 100755 From ee2025824af4aaa119046a9f9a9399d36792b016 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 9 Jan 2019 14:42:53 +0100 -Subject: [PATCH 41/74] themes: bgrt: Remove duplicate images +Subject: [PATCH 41/82] themes: bgrt: Remove duplicate images The bgrt theme is using the exact same images as the spinner theme, remove these and point ImageDir to the spinner theme dir instead. @@ -18343,7 +18343,7 @@ X`%H>)eQ8Yx_}u|GPrOH^dqny_<-gJq From a7ab82171f3a83cf709b91542d1299362c47474f Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 9 Jan 2019 14:52:33 +0100 -Subject: [PATCH 42/74] themes: spinner: Add watermark alignment settings +Subject: [PATCH 42/82] themes: spinner: Add watermark alignment settings Add watermark alignment settings, so that distros can simply drop a watermark.png into the theme dir from another package and then have it @@ -18373,7 +18373,7 @@ index bbd42dc..6ba3f42 100644 From 203fe586bb698a21a90adc271f8fd2ed17905cf9 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 19 Dec 2018 09:37:16 +0100 -Subject: [PATCH 43/74] themes: Update spinner and bgrt diskcrypt dialog +Subject: [PATCH 43/82] themes: Update spinner and bgrt diskcrypt dialog Update the spinner and bgrt themses diskcrypt dialog to match the dialog from the "Disk decrypt" mockup from: @@ -18531,7 +18531,7 @@ a-{T4wzHlul+Nt3H0000 Date: Tue, 15 Jan 2019 09:48:30 +0100 -Subject: [PATCH 44/74] ply-array: Add ply_array_contains_uint32_element +Subject: [PATCH 44/82] ply-array: Add ply_array_contains_uint32_element function Add a new ply_array_contains_uint32_element which checks if the queried @@ -18597,7 +18597,7 @@ index 777485c..3d8e9c4 100644 From 88f1b1dc0e7c51d7065403783ab1057b0f3ec31d Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 16 Jan 2019 09:21:59 +0100 -Subject: [PATCH 45/74] ply-renderer: Add ply_renderer_handle_change_event +Subject: [PATCH 45/82] ply-renderer: Add ply_renderer_handle_change_event function This function can be called to notify the renderer of udev change-events. @@ -18663,7 +18663,7 @@ index c0e0ed5..820cdb6 100644 From 80acc33ab37b73feb6092d477f5198e4f57dd649 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 14 Jan 2019 17:36:22 +0100 -Subject: [PATCH 46/74] drm: Refactor ply_renderer_head_add_connector and +Subject: [PATCH 46/82] drm: Refactor ply_renderer_head_add_connector and ply_renderer_head_new Both these function take a bunch of info coming from the ply_output_t @@ -18808,7 +18808,7 @@ index 20543ea..afc8d65 100644 From 9b5d4df9f92909aa4c53d98f02c9343eb4ce97c7 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 15 Jan 2019 07:31:32 +0100 -Subject: [PATCH 47/74] drm: Stop keeing a drmModeConnector instance around +Subject: [PATCH 47/82] drm: Stop keeing a drmModeConnector instance around Before this commit we were storing a pointer to the drmModeConnector in struct _ply_renderer_head, solely so that we can free it when @@ -18964,7 +18964,7 @@ index afc8d65..348f880 100644 From b3f1c7683d70b653ebde1d41342f6b549d5c2f1f Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 15 Jan 2019 08:31:20 +0100 -Subject: [PATCH 48/74] drm: Stop storing a pointer to drmModeConnector in +Subject: [PATCH 48/82] drm: Stop storing a pointer to drmModeConnector in ply_output_t This is a preparation patch for hotplug support, for hotplug support we @@ -19200,7 +19200,7 @@ index 348f880..07de083 100644 From 4ba6d4f4a238b506dc65e4e6516384a504a414af Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 15 Jan 2019 08:34:58 +0100 -Subject: [PATCH 49/74] drm: Add get_output_info helper function +Subject: [PATCH 49/82] drm: Add get_output_info helper function Add a new get_output_info helper function, which fill a ply_output_t with all info related to the connecter based on a connector-id. @@ -19327,7 +19327,7 @@ index 07de083..da56fe4 100644 From d68fd78ae17c2574976b78b5f31afd58b965abe5 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 15 Jan 2019 08:58:45 +0100 -Subject: [PATCH 50/74] drm: Store and keep all the outputs in the backend +Subject: [PATCH 50/82] drm: Store and keep all the outputs in the backend Put all outputs in the outputs array instead of just the connected ones and store the outputs array and the controller_id-to-head hashtable in the @@ -19506,7 +19506,7 @@ index da56fe4..a66cd67 100644 From 7cb2eb14892a3468a2e249709e3f09b7b852d36e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 15 Jan 2019 09:21:05 +0100 -Subject: [PATCH 51/74] drm: Limit backend->resources lifetime to within +Subject: [PATCH 51/82] drm: Limit backend->resources lifetime to within query_device We do not need / use backend->resources anywhere outside of the query_device @@ -19570,7 +19570,7 @@ index a66cd67..4e3c41a 100644 From cd0479675e0c853896a860913917300818b8f69d Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 15 Jan 2019 09:54:09 +0100 -Subject: [PATCH 52/74] drm: Allow calling ply_renderer_head_add_connector with +Subject: [PATCH 52/82] drm: Allow calling ply_renderer_head_add_connector with existing connector_id Allow calling ply_renderer_head_add_connector with an existing @@ -19617,7 +19617,7 @@ index 4e3c41a..9998459 100644 From 7774bd5e5132ace8060f9edd91395eaa42535246 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 15 Jan 2019 10:43:45 +0100 -Subject: [PATCH 53/74] drm: Allow calling create_heads_for_active_connectors +Subject: [PATCH 53/82] drm: Allow calling create_heads_for_active_connectors multiple times To support hotplugging monitors while plymouth is running, we must @@ -19827,7 +19827,7 @@ index 9998459..bb6ab77 100644 From 475a51d0576d0a488023f870c92f39eb8b0a21c1 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 16 Jan 2019 14:50:34 +0100 -Subject: [PATCH 54/74] drm: Ensure heads are mapped before flushing them +Subject: [PATCH 54/82] drm: Ensure heads are mapped before flushing them The drm plugin's map_to_device function will return true if mapping of any of the heads has succeeded, potentially leaving some heads unmapped. @@ -19900,7 +19900,7 @@ index bb6ab77..0963a84 100644 From 15ebdd6d5b0e98d7511815e2dfbe82d2ec86f493 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 16 Jan 2019 09:41:42 +0100 -Subject: [PATCH 55/74] drm: Implement handle_change_event +Subject: [PATCH 55/82] drm: Implement handle_change_event Now that we can call create_heads_for_active_connectors multiple times we can implement handle_change_event. @@ -19987,7 +19987,7 @@ index 0963a84..b190737 100644 From c54870fc6663b010b2a3eb4a44df5dd41dd7011c Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 17 Jan 2019 11:41:46 +0100 -Subject: [PATCH 56/74] drm: Reset mode on display-port connected outputs with +Subject: [PATCH 56/82] drm: Reset mode on display-port connected outputs with a bad link-status With Display-Port links, esp. with DP MST links we may need to reset the @@ -20088,7 +20088,7 @@ index b190737..cb228f6 100644 From ccdb1d1fe1f99523d570b4e37cc14401c3891b9a Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 21 Jan 2019 15:41:37 +0100 -Subject: [PATCH 57/74] drm: Stop limiting preferred-mode picking to UEFI +Subject: [PATCH 57/82] drm: Stop limiting preferred-mode picking to UEFI systems When the code to pick the preferred-mode for outputs was first added, it @@ -20151,7 +20151,7 @@ index cb228f6..0151f47 100644 From f9e376797a91ad5fbc1f8e8e4aea778f4f22397c Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 17 Jan 2019 14:52:41 +0100 -Subject: [PATCH 58/74] ply-device-manager: Consume all events in one go +Subject: [PATCH 58/82] ply-device-manager: Consume all events in one go Drm devices generate a bunch of add and change events when the kms driver loads, consume these all in one go. @@ -20221,7 +20221,7 @@ index 8ceee10..028bf4a 100644 From e54f6a47318d82b4e4df024855bd76d888b89675 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 14 Jan 2019 11:47:21 +0100 -Subject: [PATCH 59/74] ply-device-manager: Handle change events for monitor +Subject: [PATCH 59/82] ply-device-manager: Handle change events for monitor hotplugging Not only handle add but also change events for drm-subsys devices, @@ -20320,10 +20320,40 @@ index 028bf4a..e2a9eae 100644 -- 2.20.1 -From 609781d8857b21a021545677b29af01ddba5df72 Mon Sep 17 00:00:00 2001 +From f7d82041981884bbf9d6ba0fdab2a920cdf04255 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Mon, 18 Feb 2019 10:22:21 -0500 +Subject: [PATCH 60/82] boot-server: fix type confusion when allocating + connection object + +Right now we allocate enough room for a whole ply_boot_server_t +object for every connection object. + +This commit mops up the over-allocation +--- + src/ply-boot-server.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ply-boot-server.c b/src/ply-boot-server.c +index ff0e6fd..5519550 100644 +--- a/src/ply-boot-server.c ++++ b/src/ply-boot-server.c +@@ -161,7 +161,7 @@ ply_boot_connection_new (ply_boot_server_t *server, + { + ply_boot_connection_t *connection; + +- connection = calloc (1, sizeof(ply_boot_server_t)); ++ connection = calloc (1, sizeof(ply_boot_connection_t)); + connection->fd = fd; + connection->server = server; + connection->watch = NULL; +-- +2.20.1 + +From dfa1dcc6218af13eb3cf328b6ac6ccb86f1a961c Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 6 Feb 2019 11:48:55 +0100 -Subject: [PATCH 60/74] ply-label: Make sure get_width_of_control / +Subject: [PATCH 61/82] ply-label: Make sure get_width_of_control / get_height_of_control return correct values Users of ply_label may want to know the height / width of the text before @@ -20498,10 +20528,10 @@ index acba52b..b552981 100644 -- 2.20.1 -From d1f51423b520ca88978351104a21ab6935ebec1a Mon Sep 17 00:00:00 2001 +From ebf60f70197efa40c43f9cd537c5ec771e5b59b3 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 8 Feb 2019 18:04:01 +0100 -Subject: [PATCH 61/74] ply-progress-bar: Redraw on percentage update +Subject: [PATCH 62/82] ply-progress-bar: Redraw on percentage update All the other plymouth widgets do a (re)draw when one of their properties get updated. Make ply-progress-bar also do this, this allows @@ -20549,10 +20579,10 @@ index a1c8a90..4016d96 100644 -- 2.20.1 -From ecfd84c6749d45f4e95bc99c3285cd7740b8eb36 Mon Sep 17 00:00:00 2001 +From 78bb39da5cc9b95d582665f42d2a1d6fb7bc0c15 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 8 Feb 2019 14:06:28 +0100 -Subject: [PATCH 62/74] ply-progress-bar: Allow choosing fore- and back-ground +Subject: [PATCH 63/82] ply-progress-bar: Allow choosing fore- and back-ground color Allow choosing a fore- and back-ground color instead of hardcoding @@ -20730,10 +20760,10 @@ index 2fd80e0..1eab64c 100644 -- 2.20.1 -From d89af7a2e2fcd7a6abb6f5b3c52f3d847aa337fb Mon Sep 17 00:00:00 2001 +From e33c1f3a06f47e78bb479a50b27f5b2ab39476eb Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 8 Feb 2019 14:38:44 +0100 -Subject: [PATCH 63/74] ply-progress-bar: Allow caller to specify the widgets +Subject: [PATCH 64/82] ply-progress-bar: Allow caller to specify the widgets width and height Before this commit ply_progress_bar_show would take coordinates for where @@ -20821,10 +20851,10 @@ index 4016d96..bbcf1b7 100644 -- 2.20.1 -From 2a8df7f2fa2188956f17082d003615ef82e08d06 Mon Sep 17 00:00:00 2001 +From 3854d0052ffdd308025a9822387f24c9c37fc1ef Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 6 Feb 2019 10:08:12 +0100 -Subject: [PATCH 64/74] two-step: Drop background_is_bgrt view_t member +Subject: [PATCH 65/82] two-step: Drop background_is_bgrt view_t member This is always set to true if plugin->background_bgrt_image is set, so we can simply check for plugin->background_bgrt_image instead. @@ -20866,10 +20896,10 @@ index 53f19ee..d117d03 100644 -- 2.20.1 -From 7ed8de39b15af168c4642eabeba925d2283b39af Mon Sep 17 00:00:00 2001 +From 9bfffa925776a74701f509df74ac955f2910c963 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 6 Feb 2019 10:34:56 +0100 -Subject: [PATCH 65/74] two-step: Add per mode settings +Subject: [PATCH 66/82] two-step: Add per mode settings We want theme files to be able to specify different settings for different modes ("boot-up" / "shutdown" / "updates"). Specifically we @@ -21042,10 +21072,10 @@ index 3cabbca..e93f91c 100644 -- 2.20.1 -From e1d0b852b620a0fd19167bd3f01b26e9cf2dc136 Mon Sep 17 00:00:00 2001 +From 2b7bad86b314b63c228208c32c0c720cca1a76d7 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 6 Feb 2019 16:58:58 +0100 -Subject: [PATCH 66/74] two-step: Add support for specifying a title and +Subject: [PATCH 67/82] two-step: Add support for specifying a title and sub-title in the theme file The idea behind this is to allow a splash-screen containing something like this: @@ -21264,10 +21294,10 @@ index 1a531cb..2051240 100644 -- 2.20.1 -From 91922a0194e7422113d643ad8f11ffbfb0f15040 Mon Sep 17 00:00:00 2001 +From c5d7b61dc52064f9653b5d95ce4399e1508b3149 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 7 Feb 2019 17:44:32 +0100 -Subject: [PATCH 67/74] two-step: Add MessageBelowAnimation option +Subject: [PATCH 68/82] two-step: Add MessageBelowAnimation option So far we've always printed messages coming from "plymouth display-message" in the top left corner. In some cases the theme may want to instead display @@ -21395,10 +21425,10 @@ index 2051240..c6f99ed 100644 -- 2.20.1 -From cf9f40718510ce49b75b7d34c7db3d341f0b62b1 Mon Sep 17 00:00:00 2001 +From 746a924cbdcaae2068b3e0572478849cda34f7cf Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 8 Feb 2019 22:41:15 +0100 -Subject: [PATCH 68/74] two-step: Add progress-bar support +Subject: [PATCH 69/82] two-step: Add progress-bar support Some themes may want to use a progress-bar instead of the throbber for some modes. This commit adds a new per mode UseProgressBar setting allowing @@ -21590,10 +21620,10 @@ index c6f99ed..32e4294 100644 -- 2.20.1 -From e094733cf7e6bd0cf7e5c06458674be2d65aa52c Mon Sep 17 00:00:00 2001 +From 73a44fb1f71d0a246fda64b46ed60cdaac0d1bb7 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 12 Feb 2019 15:15:26 +0100 -Subject: [PATCH 69/74] two-step: Add a per mode setting to suppress messages +Subject: [PATCH 70/82] two-step: Add a per mode setting to suppress messages The messages passed to plymouth display-message can be quite verbose, esp. in the offline-updates case. Combined with some themes now showing their @@ -21644,10 +21674,10 @@ index 32e4294..9b6abba 100644 -- 2.20.1 -From 542b6234a2d07daa21105255b4cb995379bc8a7c Mon Sep 17 00:00:00 2001 +From 38771c16e441d2109e099e1954ff502d87652f62 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 6 Feb 2019 17:04:04 +0100 -Subject: [PATCH 70/74] themes: Update spinner and bgrt theme offline updates +Subject: [PATCH 71/82] themes: Update spinner and bgrt theme offline updates mode Make the spinner and bgrt offline updates mode match the GNOME design @@ -21737,10 +21767,10 @@ index 6ba3f42..02e7eb7 100644 -- 2.20.1 -From 8711f9dde038dc69b7489246a86ac38462e7d532 Mon Sep 17 00:00:00 2001 +From 238e22b64508afa97cde56c2addd3833a18c1d58 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 13 Feb 2019 14:39:42 +0100 -Subject: [PATCH 71/74] logging: Improve logging format +Subject: [PATCH 72/82] logging: Improve logging format This commit adds 2 improvemens to the ply_trace logging format: @@ -21804,10 +21834,10 @@ index 53d1ad9..0015c0c 100644 -- 2.20.1 -From b9ef96aa0ade81a564a3982db5cd9bd47478192c Mon Sep 17 00:00:00 2001 +From d0e26e24d97e5f7f5715b5eb16730d907e21476c Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 16 Jan 2019 12:27:01 +0100 -Subject: [PATCH 72/74] logging: Minor log-message fixes +Subject: [PATCH 73/82] logging: Minor log-message fixes This fixes 2 minor issues with our log-messages: 1. ply_trace adds a "\n" itself, so there is no need to pass one extra. @@ -21881,10 +21911,10 @@ index 0151f47..88c9d97 100644 -- 2.20.1 -From 243cf30abbe38c0211255d76752ee7fbdd18a8e7 Mon Sep 17 00:00:00 2001 +From a1920e8af9530b3504811ef04c0400cf7b53da3c Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 16 Jan 2019 12:51:05 +0100 -Subject: [PATCH 73/74] ply-boot-splash: Do not add +Subject: [PATCH 74/82] ply-boot-splash: Do not add ply_boot_splash_update_progress timeout multiple times Before this commit when freeing the splash, the following would be logged: @@ -21940,10 +21970,10 @@ index 54c7696..9549ecc 100644 -- 2.20.1 -From cca2feed2ee1f38c971b75a01609bef83404bf92 Mon Sep 17 00:00:00 2001 +From 1de2794731a2b72f20f17670cc5a3ce1df5efcc4 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 13 Feb 2019 15:10:23 +0100 -Subject: [PATCH 74/74] plymouthd.defaults: Change default ShowDelay to 0 +Subject: [PATCH 75/82] plymouthd.defaults: Change default ShowDelay to 0 ShowDelay was added with as goal to reduce the number of jarring / flickering visual transitions. @@ -21988,3 +22018,1724 @@ index 4d3b6d4..9e3a342 100644 -- 2.20.1 +From 1c7ce43983e3e45d65b14b630415989ff349287f Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 25 Feb 2019 16:56:16 +0100 +Subject: [PATCH 76/82] two-step: Make ProgressBarShowPercentComplete a per + mode setting + +Make ProgressBarShowPercentComplete a per mode setting, this gives the +theme more flexibility wrt which messages to show in different modes. + +Signed-off-by: Hans de Goede +--- + src/plugins/splash/two-step/plugin.c | 7 ++++--- + themes/bgrt/bgrt.plymouth.in | 2 +- + themes/spinner/spinner.plymouth.in | 2 +- + 3 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/src/plugins/splash/two-step/plugin.c b/src/plugins/splash/two-step/plugin.c +index 9b6abba..94b2708 100644 +--- a/src/plugins/splash/two-step/plugin.c ++++ b/src/plugins/splash/two-step/plugin.c +@@ -107,6 +107,7 @@ typedef struct + typedef struct + { + bool suppress_messages; ++ bool progress_bar_show_percent_complete; + bool use_progress_bar; + bool use_firmware_background; + char *title; +@@ -166,7 +167,6 @@ struct _ply_boot_splash_plugin + uint32_t use_firmware_background : 1; + uint32_t dialog_clears_firmware_background : 1; + uint32_t message_below_animation : 1; +- uint32_t progress_bar_show_percent_complete : 1; + }; + + ply_boot_splash_plugin_interface_t *ply_boot_splash_plugin_get_interface (void); +@@ -823,6 +823,8 @@ load_mode_settings (ply_boot_splash_plugin_t *plugin, + + settings->suppress_messages = + ply_key_file_get_bool (key_file, group_name, "SuppressMessages"); ++ settings->progress_bar_show_percent_complete = ++ ply_key_file_get_bool (key_file, group_name, "ProgressBarShowPercentComplete"); + settings->use_progress_bar = + ply_key_file_get_bool (key_file, group_name, "UseProgressBar"); + settings->use_firmware_background = +@@ -994,7 +996,6 @@ create_plugin (ply_key_file_t *key_file) + + free (color); + +- plugin->progress_bar_show_percent_complete = ply_key_file_get_bool (key_file, "two-step", "ProgressBarShowPercentComplete"); + + load_mode_settings (plugin, key_file, "boot-up", PLY_BOOT_SPLASH_MODE_BOOT_UP); + load_mode_settings (plugin, key_file, "shutdown", PLY_BOOT_SPLASH_MODE_SHUTDOWN); +@@ -1795,7 +1796,7 @@ system_update (ply_boot_splash_plugin_t *plugin, + ply_progress_animation_set_percent_done (view->progress_animation, (double) progress / 100.f); + ply_progress_bar_set_percent_done (view->progress_bar, (double) progress / 100.f); + if (!ply_progress_bar_is_hidden (view->progress_bar) && +- plugin->progress_bar_show_percent_complete) { ++ plugin->mode_settings[plugin->mode].progress_bar_show_percent_complete) { + snprintf (buf, sizeof(buf), "%d%% complete", progress); + view_show_message (view, buf); + } +diff --git a/themes/bgrt/bgrt.plymouth.in b/themes/bgrt/bgrt.plymouth.in +index b0899d7..15bd9ba 100644 +--- a/themes/bgrt/bgrt.plymouth.in ++++ b/themes/bgrt/bgrt.plymouth.in +@@ -21,7 +21,6 @@ BackgroundStartColor=0x202020 + BackgroundEndColor=0x202020 + ProgressBarBackgroundColor=0x606060 + ProgressBarForegroundColor=0xffffff +-ProgressBarShowPercentComplete=true + DialogClearsFirmwareBackground=true + MessageBelowAnimation=true + +@@ -33,6 +32,7 @@ UseFirmwareBackground=true + + [updates] + SuppressMessages=true ++ProgressBarShowPercentComplete=true + UseProgressBar=true + Title=Installing Updates... + SubTitle=Do not turn off your computer +diff --git a/themes/spinner/spinner.plymouth.in b/themes/spinner/spinner.plymouth.in +index 02e7eb7..40613ba 100644 +--- a/themes/spinner/spinner.plymouth.in ++++ b/themes/spinner/spinner.plymouth.in +@@ -21,11 +21,11 @@ BackgroundStartColor=0x202020 + BackgroundEndColor=0x202020 + ProgressBarBackgroundColor=0x606060 + ProgressBarForegroundColor=0xffffff +-ProgressBarShowPercentComplete=true + MessageBelowAnimation=true + + [updates] + SuppressMessages=true ++ProgressBarShowPercentComplete=true + UseProgressBar=true + Title=Installing Updates... + SubTitle=Do not turn off your computer +-- +2.20.1 + +From 2eceea2ce790007f77af8bf4f5c9af73f89c94c8 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 25 Feb 2019 15:45:26 +0100 +Subject: [PATCH 77/82] main: Remove private ply_mode_t + +Remove the private ply_mode_t from main.c, this is a 1:1 mirror of +ply_boot_splash_mode_t, so use ply_boot_splash_mode_t directly, leading +to a nice cleanup. + +Signed-off-by: Hans de Goede +--- + src/main.c | 95 +++++++++++++++++------------------------------------- + 1 file changed, 30 insertions(+), 65 deletions(-) + +diff --git a/src/main.c b/src/main.c +index 9adff3a..e406382 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -58,13 +58,6 @@ + #define BOOT_DURATION_FILE PLYMOUTH_TIME_DIRECTORY "/boot-duration" + #define SHUTDOWN_DURATION_FILE PLYMOUTH_TIME_DIRECTORY "/shutdown-duration" + +-typedef enum +-{ +- PLY_MODE_BOOT, +- PLY_MODE_SHUTDOWN, +- PLY_MODE_UPDATES +-} ply_mode_t; +- + typedef struct + { + const char *keys; +@@ -93,7 +86,7 @@ typedef struct + ply_buffer_t *entry_buffer; + ply_list_t *messages; + ply_command_parser_t *command_parser; +- ply_mode_t mode; ++ ply_boot_splash_mode_t mode; + ply_terminal_t *local_console_terminal; + ply_device_manager_t *device_manager; + +@@ -149,7 +142,7 @@ static void toggle_between_splash_and_details (state_t *state); + static void tell_systemd_to_print_details (state_t *state); + static void tell_systemd_to_stop_printing_details (state_t *state); + #endif +-static const char *get_cache_file_for_mode (ply_mode_t mode); ++static const char *get_cache_file_for_mode (ply_boot_splash_mode_t mode); + static void on_escape_pressed (state_t *state); + static void on_enter (state_t *state, + const char *line); +@@ -163,30 +156,6 @@ static void on_quit (state_t *state, + static bool sh_is_init (state_t *state); + static void cancel_pending_delayed_show (state_t *state); + +-static ply_boot_splash_mode_t +-get_splash_mode_from_mode (ply_mode_t mode) +-{ +- ply_boot_splash_mode_t splash_mode; +- switch (mode) { +- case PLY_MODE_BOOT: +- splash_mode = PLY_BOOT_SPLASH_MODE_BOOT_UP; +- break; +- case PLY_MODE_SHUTDOWN: +- splash_mode = PLY_BOOT_SPLASH_MODE_SHUTDOWN; +- break; +- case PLY_MODE_UPDATES: +- splash_mode = PLY_BOOT_SPLASH_MODE_UPDATES; +- break; +- default: +- splash_mode = PLY_BOOT_SPLASH_MODE_INVALID; +- break; +- } +- +- assert (splash_mode != PLY_BOOT_SPLASH_MODE_INVALID); +- +- return splash_mode; +-} +- + static void + on_session_output (state_t *state, + const char *output, +@@ -220,8 +189,6 @@ static void + on_change_mode (state_t *state, + const char *mode) + { +- ply_boot_splash_mode_t splash_mode; +- + if (state->boot_splash == NULL) { + ply_trace ("no splash set"); + return; +@@ -229,17 +196,15 @@ on_change_mode (state_t *state, + + ply_trace ("updating mode to '%s'", mode); + if (strcmp (mode, "boot-up") == 0) +- state->mode = PLY_MODE_BOOT; ++ state->mode = PLY_BOOT_SPLASH_MODE_BOOT_UP; + else if (strcmp (mode, "shutdown") == 0) +- state->mode = PLY_MODE_SHUTDOWN; ++ state->mode = PLY_BOOT_SPLASH_MODE_SHUTDOWN; + else if (strcmp (mode, "updates") == 0) +- state->mode = PLY_MODE_UPDATES; ++ state->mode = PLY_BOOT_SPLASH_MODE_UPDATES; + else + return; + +- splash_mode = get_splash_mode_from_mode (state->mode); +- +- if (!ply_boot_splash_show (state->boot_splash, splash_mode)) { ++ if (!ply_boot_splash_show (state->boot_splash, state->mode)) { + ply_trace ("failed to update splash"); + return; + } +@@ -689,20 +654,21 @@ on_newroot (state_t *state, + } + + static const char * +-get_cache_file_for_mode (ply_mode_t mode) ++get_cache_file_for_mode (ply_boot_splash_mode_t mode) + { + const char *filename; + +- switch ((int) mode) { +- case PLY_MODE_BOOT: ++ switch (mode) { ++ case PLY_BOOT_SPLASH_MODE_BOOT_UP: + filename = BOOT_DURATION_FILE; + break; +- case PLY_MODE_SHUTDOWN: ++ case PLY_BOOT_SPLASH_MODE_SHUTDOWN: + filename = SHUTDOWN_DURATION_FILE; + break; +- case PLY_MODE_UPDATES: ++ case PLY_BOOT_SPLASH_MODE_UPDATES: + filename = NULL; + break; ++ case PLY_BOOT_SPLASH_MODE_INVALID: + default: + ply_error ("Unhandled case in %s line %d\n", __FILE__, __LINE__); + abort (); +@@ -718,17 +684,18 @@ get_log_file_for_state (state_t *state) + { + const char *filename; + +- switch ((int) state->mode) { +- case PLY_MODE_BOOT: ++ switch (state->mode) { ++ case PLY_BOOT_SPLASH_MODE_BOOT_UP: + if (state->no_boot_log) + filename = NULL; + else + filename = PLYMOUTH_LOG_DIRECTORY "/boot.log"; + break; +- case PLY_MODE_SHUTDOWN: +- case PLY_MODE_UPDATES: ++ case PLY_BOOT_SPLASH_MODE_SHUTDOWN: ++ case PLY_BOOT_SPLASH_MODE_UPDATES: + filename = _PATH_DEVNULL; + break; ++ case PLY_BOOT_SPLASH_MODE_INVALID: + default: + ply_error ("Unhandled case in %s line %d\n", __FILE__, __LINE__); + abort (); +@@ -740,18 +707,19 @@ get_log_file_for_state (state_t *state) + } + + static const char * +-get_log_spool_file_for_mode (ply_mode_t mode) ++get_log_spool_file_for_mode (ply_boot_splash_mode_t mode) + { + const char *filename; + +- switch ((int) mode) { +- case PLY_MODE_BOOT: ++ switch (mode) { ++ case PLY_BOOT_SPLASH_MODE_BOOT_UP: + filename = PLYMOUTH_SPOOL_DIRECTORY "/boot.log"; + break; +- case PLY_MODE_SHUTDOWN: +- case PLY_MODE_UPDATES: ++ case PLY_BOOT_SPLASH_MODE_SHUTDOWN: ++ case PLY_BOOT_SPLASH_MODE_UPDATES: + filename = NULL; + break; ++ case PLY_BOOT_SPLASH_MODE_INVALID: + default: + ply_error ("Unhandled case in %s line %d\n", __FILE__, __LINE__); + abort (); +@@ -841,7 +809,7 @@ static bool + plymouth_should_ignore_show_splash_calls (state_t *state) + { + ply_trace ("checking if plymouth should be running"); +- if (state->mode != PLY_MODE_BOOT || ply_kernel_command_line_has_argument ("plymouth.force-splash")) ++ if (state->mode != PLY_BOOT_SPLASH_MODE_BOOT_UP || ply_kernel_command_line_has_argument ("plymouth.force-splash")) + return false; + + if (ply_kernel_command_line_has_argument ("plymouth.ignore-show-splash")) +@@ -1213,7 +1181,7 @@ quit_program (state_t *state) + + #ifdef PLY_ENABLE_DEPRECATED_GDM_TRANSITION + if (state->should_retain_splash && +- state->mode == PLY_MODE_BOOT) ++ state->mode == PLY_BOOT_SPLASH_MODE_BOOT_UP) + tell_gdm_to_transition (); + + #endif +@@ -1737,7 +1705,6 @@ static ply_boot_splash_t * + show_theme (state_t *state, + const char *theme_path) + { +- ply_boot_splash_mode_t splash_mode; + ply_boot_splash_t *splash; + + if (theme_path != NULL) +@@ -1752,9 +1719,7 @@ show_theme (state_t *state, + if (ply_boot_splash_uses_pixel_displays (splash)) + ply_device_manager_activate_renderers (state->device_manager); + +- splash_mode = get_splash_mode_from_mode (state->mode); +- +- if (!ply_boot_splash_show (splash, splash_mode)) { ++ if (!ply_boot_splash_show (splash, state->mode)) { + ply_save_errno (); + ply_boot_splash_free (splash); + ply_restore_errno (); +@@ -1985,7 +1950,7 @@ initialize_environment (state_t *state) + if (getenv ("DISPLAY") != NULL && access (PLYMOUTH_PLUGIN_PATH "renderers/x11.so", F_OK) == 0) + state->default_tty = "/dev/tty"; + if (!state->default_tty) { +- if (state->mode == PLY_MODE_SHUTDOWN) ++ if (state->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN) + state->default_tty = SHUTDOWN_TTY; + else + state->default_tty = BOOT_TTY; +@@ -2181,11 +2146,11 @@ main (int argc, + + if (mode_string != NULL) { + if (strcmp (mode_string, "shutdown") == 0) +- state.mode = PLY_MODE_SHUTDOWN; ++ state.mode = PLY_BOOT_SPLASH_MODE_SHUTDOWN; + else if (strcmp (mode_string, "updates") == 0) +- state.mode = PLY_MODE_UPDATES; ++ state.mode = PLY_BOOT_SPLASH_MODE_UPDATES; + else +- state.mode = PLY_MODE_BOOT; ++ state.mode = PLY_BOOT_SPLASH_MODE_BOOT_UP; + + free (mode_string); + } +-- +2.20.1 + +From a42915c972ae2d8495333305d4729c25754a42a1 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 25 Feb 2019 16:47:13 +0100 +Subject: [PATCH 78/82] Add new reboot and system-upgrade modes + +Some themes show certain text strings to the user depending on the mode, +see e.g. the shutdown vs reboot mockups of: +https://wiki.gnome.org/Design/OS/BootProgress + +Besides during shutdown vs reboot, we also want different theming for +installing offline (security) updates versus doing an offline OS upgrade. + +To make this possible this commit adds new reboot and system-upgrade +modes which can be specified either when starting plymouthd, or through +plymouth change-mode --. + +Signed-off-by: Hans de Goede +--- + src/client/plymouth.c | 48 +++++++++++-------- + .../ply-boot-splash-plugin.h | 4 +- + src/main.c | 17 ++++++- + src/plugins/splash/fade-throbber/plugin.c | 6 ++- + .../splash/script/script-lib-plymouth.c | 6 +++ + src/plugins/splash/text/plugin.c | 3 +- + src/plugins/splash/throbgress/plugin.c | 12 +++-- + src/plugins/splash/tribar/plugin.c | 3 +- + src/plugins/splash/two-step/plugin.c | 16 +++++-- + systemd-units/plymouth-reboot.service.in | 2 +- + themes/bgrt/bgrt.plymouth.in | 10 ++++ + themes/spinner/spinner.plymouth.in | 7 +++ + 12 files changed, 99 insertions(+), 35 deletions(-) + +diff --git a/src/client/plymouth.c b/src/client/plymouth.c +index 8e613de..a11753a 100644 +--- a/src/client/plymouth.c ++++ b/src/client/plymouth.c +@@ -782,38 +782,42 @@ static void + on_change_mode_request (state_t *state, + const char *command) + { +- bool boot_up; +- bool shutdown; +- bool updates; ++ bool boot_up = false; ++ bool shutdown = false; ++ bool reboot = false; ++ bool updates = false; ++ bool system_upgrade = false; ++ const char *mode = NULL; + +- boot_up = false; +- shutdown = false; +- updates = false; + ply_command_parser_get_command_options (state->command_parser, + command, + "boot-up", &boot_up, + "shutdown", &shutdown, ++ "reboot", &reboot, + "updates", &updates, ++ "system-upgrade", &system_upgrade, + NULL); + +- if (boot_up) { +- ply_boot_client_change_mode (state->client, "boot-up", +- (ply_boot_client_response_handler_t) +- on_success, +- (ply_boot_client_response_handler_t) +- on_failure, state); +- } else if (shutdown) { +- ply_boot_client_change_mode (state->client, "shutdown", +- (ply_boot_client_response_handler_t) +- on_success, +- (ply_boot_client_response_handler_t) +- on_failure, state); +- } else if (updates) { +- ply_boot_client_change_mode (state->client, "updates", ++ if (boot_up) ++ mode = "boot-up"; ++ else if (shutdown) ++ mode = "shutdown"; ++ else if (reboot) ++ mode = "reboot"; ++ else if (updates) ++ mode = "updates"; ++ else if (system_upgrade) ++ mode = "system-upgrade"; ++ ++ if (mode) { ++ ply_boot_client_change_mode (state->client, mode, + (ply_boot_client_response_handler_t) + on_success, + (ply_boot_client_response_handler_t) + on_failure, state); ++ } else { ++ ply_error ("Error no mode specified for 'change-mode' command"); ++ ply_event_loop_exit (state->loop, 1); + } + } + +@@ -891,8 +895,12 @@ main (int argc, + PLY_COMMAND_OPTION_TYPE_FLAG, + "shutdown", "Shutting the system down", + PLY_COMMAND_OPTION_TYPE_FLAG, ++ "reboot", "Rebooting the system", ++ PLY_COMMAND_OPTION_TYPE_FLAG, + "updates", "Applying updates", + PLY_COMMAND_OPTION_TYPE_FLAG, ++ "system-upgrade", "Upgrading the OS to a new version", ++ PLY_COMMAND_OPTION_TYPE_FLAG, + NULL); + + ply_command_parser_add_command (state.command_parser, +diff --git a/src/libply-splash-core/ply-boot-splash-plugin.h b/src/libply-splash-core/ply-boot-splash-plugin.h +index de21319..3fa56ce 100644 +--- a/src/libply-splash-core/ply-boot-splash-plugin.h ++++ b/src/libply-splash-core/ply-boot-splash-plugin.h +@@ -38,9 +38,11 @@ typedef enum + { + PLY_BOOT_SPLASH_MODE_BOOT_UP, + PLY_BOOT_SPLASH_MODE_SHUTDOWN, ++ PLY_BOOT_SPLASH_MODE_REBOOT, + PLY_BOOT_SPLASH_MODE_UPDATES, ++ PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE, + PLY_BOOT_SPLASH_MODE_INVALID, +- PLY_BOOT_SPLASH_MODE_COUNT = PLY_BOOT_SPLASH_MODE_UPDATES + 1, ++ PLY_BOOT_SPLASH_MODE_COUNT = PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE + 1, + } ply_boot_splash_mode_t; + + typedef struct _ply_boot_splash_plugin ply_boot_splash_plugin_t; +diff --git a/src/main.c b/src/main.c +index e406382..90e8a5e 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -199,8 +199,12 @@ on_change_mode (state_t *state, + state->mode = PLY_BOOT_SPLASH_MODE_BOOT_UP; + else if (strcmp (mode, "shutdown") == 0) + state->mode = PLY_BOOT_SPLASH_MODE_SHUTDOWN; ++ else if (strcmp (mode, "reboot") == 0) ++ state->mode = PLY_BOOT_SPLASH_MODE_REBOOT; + else if (strcmp (mode, "updates") == 0) + state->mode = PLY_BOOT_SPLASH_MODE_UPDATES; ++ else if (strcmp (mode, "system-upgrade") == 0) ++ state->mode = PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE; + else + return; + +@@ -663,9 +667,11 @@ get_cache_file_for_mode (ply_boot_splash_mode_t mode) + filename = BOOT_DURATION_FILE; + break; + case PLY_BOOT_SPLASH_MODE_SHUTDOWN: ++ case PLY_BOOT_SPLASH_MODE_REBOOT: + filename = SHUTDOWN_DURATION_FILE; + break; + case PLY_BOOT_SPLASH_MODE_UPDATES: ++ case PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE: + filename = NULL; + break; + case PLY_BOOT_SPLASH_MODE_INVALID: +@@ -692,7 +698,9 @@ get_log_file_for_state (state_t *state) + filename = PLYMOUTH_LOG_DIRECTORY "/boot.log"; + break; + case PLY_BOOT_SPLASH_MODE_SHUTDOWN: ++ case PLY_BOOT_SPLASH_MODE_REBOOT: + case PLY_BOOT_SPLASH_MODE_UPDATES: ++ case PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE: + filename = _PATH_DEVNULL; + break; + case PLY_BOOT_SPLASH_MODE_INVALID: +@@ -716,7 +724,9 @@ get_log_spool_file_for_mode (ply_boot_splash_mode_t mode) + filename = PLYMOUTH_SPOOL_DIRECTORY "/boot.log"; + break; + case PLY_BOOT_SPLASH_MODE_SHUTDOWN: ++ case PLY_BOOT_SPLASH_MODE_REBOOT: + case PLY_BOOT_SPLASH_MODE_UPDATES: ++ case PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE: + filename = NULL; + break; + case PLY_BOOT_SPLASH_MODE_INVALID: +@@ -1950,7 +1960,8 @@ initialize_environment (state_t *state) + if (getenv ("DISPLAY") != NULL && access (PLYMOUTH_PLUGIN_PATH "renderers/x11.so", F_OK) == 0) + state->default_tty = "/dev/tty"; + if (!state->default_tty) { +- if (state->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN) ++ if (state->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN || ++ state->mode == PLY_BOOT_SPLASH_MODE_REBOOT) + state->default_tty = SHUTDOWN_TTY; + else + state->default_tty = BOOT_TTY; +@@ -2147,8 +2158,12 @@ main (int argc, + if (mode_string != NULL) { + if (strcmp (mode_string, "shutdown") == 0) + state.mode = PLY_BOOT_SPLASH_MODE_SHUTDOWN; ++ else if (strcmp (mode_string, "reboot") == 0) ++ state.mode = PLY_BOOT_SPLASH_MODE_REBOOT; + else if (strcmp (mode_string, "updates") == 0) + state.mode = PLY_BOOT_SPLASH_MODE_UPDATES; ++ else if (strcmp (mode_string, "system-upgrade") == 0) ++ state.mode = PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE; + else + state.mode = PLY_BOOT_SPLASH_MODE_BOOT_UP; + +diff --git a/src/plugins/splash/fade-throbber/plugin.c b/src/plugins/splash/fade-throbber/plugin.c +index a7ab4ef..294dc6f 100644 +--- a/src/plugins/splash/fade-throbber/plugin.c ++++ b/src/plugins/splash/fade-throbber/plugin.c +@@ -468,7 +468,8 @@ view_animate_at_time (view_t *view, + logo_opacity = .5 * sin ((time / 5) * (2 * M_PI)) + .8; + logo_opacity = CLAMP (logo_opacity, 0, 1.0); + +- if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN) ++ if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN || ++ plugin->mode == PLY_BOOT_SPLASH_MODE_REBOOT) + logo_opacity = 1.0; + + if (fabs (logo_opacity - view->logo_opacity) <= DBL_MIN) +@@ -579,7 +580,8 @@ start_animation (ply_boot_splash_plugin_t *plugin) + plugin->start_time = ply_get_timestamp (); + animate_at_time (plugin, plugin->start_time); + +- if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN) ++ if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN || ++ plugin->mode == PLY_BOOT_SPLASH_MODE_REBOOT) + return; + + ply_event_loop_watch_for_timeout (plugin->loop, +diff --git a/src/plugins/splash/script/script-lib-plymouth.c b/src/plugins/splash/script/script-lib-plymouth.c +index 857792b..ca7ad77 100644 +--- a/src/plugins/splash/script/script-lib-plymouth.c ++++ b/src/plugins/splash/script/script-lib-plymouth.c +@@ -70,9 +70,15 @@ static script_return_t plymouth_get_mode (script_state_t *state, + case PLY_BOOT_SPLASH_MODE_SHUTDOWN: + obj = script_obj_new_string ("shutdown"); + break; ++ case PLY_BOOT_SPLASH_MODE_REBOOT: ++ obj = script_obj_new_string ("reboot"); ++ break; + case PLY_BOOT_SPLASH_MODE_UPDATES: + obj = script_obj_new_string ("updates"); + break; ++ case PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE: ++ obj = script_obj_new_string ("system-upgrade"); ++ break; + case PLY_BOOT_SPLASH_MODE_INVALID: + default: + obj = script_obj_new_string ("unknown"); +diff --git a/src/plugins/splash/text/plugin.c b/src/plugins/splash/text/plugin.c +index 8260daa..7298f5a 100644 +--- a/src/plugins/splash/text/plugin.c ++++ b/src/plugins/splash/text/plugin.c +@@ -184,7 +184,8 @@ view_start_animation (view_t *view) + ply_text_display_clear_screen (view->display); + ply_text_display_hide_cursor (view->display); + +- if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN) { ++ if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN || ++ plugin->mode == PLY_BOOT_SPLASH_MODE_REBOOT) { + ply_text_step_bar_hide (view->step_bar); + return; + } +diff --git a/src/plugins/splash/throbgress/plugin.c b/src/plugins/splash/throbgress/plugin.c +index bbcf1b7..3982821 100644 +--- a/src/plugins/splash/throbgress/plugin.c ++++ b/src/plugins/splash/throbgress/plugin.c +@@ -302,7 +302,8 @@ view_start_animation (view_t *view) + ply_pixel_display_draw_area (view->display, 0, 0, + screen_width, screen_height); + +- if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN) ++ if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN || ++ plugin->mode == PLY_BOOT_SPLASH_MODE_REBOOT) + return; + + plugin->is_idle = false; +@@ -528,7 +529,8 @@ start_animation (ply_boot_splash_plugin_t *plugin) + + plugin->is_animating = true; + +- if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN) ++ if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN || ++ plugin->mode == PLY_BOOT_SPLASH_MODE_REBOOT) + plugin->is_idle = true; + } + +@@ -720,7 +722,8 @@ on_boot_progress (ply_boot_splash_plugin_t *plugin, + ply_list_node_t *node; + double total_duration; + +- if (plugin->mode == PLY_BOOT_SPLASH_MODE_UPDATES) ++ if (plugin->mode == PLY_BOOT_SPLASH_MODE_UPDATES || ++ plugin->mode == PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE) + return; + + total_duration = duration / percent_done; +@@ -931,7 +934,8 @@ system_update (ply_boot_splash_plugin_t *plugin, + { + ply_list_node_t *node; + +- if (plugin->mode != PLY_BOOT_SPLASH_MODE_UPDATES) ++ if (plugin->mode != PLY_BOOT_SPLASH_MODE_UPDATES && ++ plugin->mode != PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE) + return; + + node = ply_list_get_first_node (plugin->views); +diff --git a/src/plugins/splash/tribar/plugin.c b/src/plugins/splash/tribar/plugin.c +index ecc17ea..bbf5d47 100644 +--- a/src/plugins/splash/tribar/plugin.c ++++ b/src/plugins/splash/tribar/plugin.c +@@ -190,7 +190,8 @@ view_start_animation (view_t *view) + ply_text_display_clear_screen (view->display); + ply_text_display_hide_cursor (view->display); + +- if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN) { ++ if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN || ++ plugin->mode == PLY_BOOT_SPLASH_MODE_REBOOT) { + ply_text_progress_bar_hide (view->progress_bar); + return; + } +diff --git a/src/plugins/splash/two-step/plugin.c b/src/plugins/splash/two-step/plugin.c +index 94b2708..4c57091 100644 +--- a/src/plugins/splash/two-step/plugin.c ++++ b/src/plugins/splash/two-step/plugin.c +@@ -251,9 +251,11 @@ view_load_end_animation (view_t *view) + switch (plugin->mode) { + case PLY_BOOT_SPLASH_MODE_BOOT_UP: + case PLY_BOOT_SPLASH_MODE_UPDATES: ++ case PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE: + animation_prefix = "startup-animation-"; + break; + case PLY_BOOT_SPLASH_MODE_SHUTDOWN: ++ case PLY_BOOT_SPLASH_MODE_REBOOT: + animation_prefix = "shutdown-animation-"; + break; + case PLY_BOOT_SPLASH_MODE_INVALID: +@@ -723,7 +725,8 @@ view_start_progress_animation (view_t *view) + /* We don't really know how long shutdown will so + * don't show the progress animation + */ +- if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN) ++ if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN || ++ plugin->mode == PLY_BOOT_SPLASH_MODE_REBOOT) + return; + + if (view->progress_animation != NULL) { +@@ -999,7 +1002,9 @@ create_plugin (ply_key_file_t *key_file) + + load_mode_settings (plugin, key_file, "boot-up", PLY_BOOT_SPLASH_MODE_BOOT_UP); + load_mode_settings (plugin, key_file, "shutdown", PLY_BOOT_SPLASH_MODE_SHUTDOWN); ++ load_mode_settings (plugin, key_file, "reboot", PLY_BOOT_SPLASH_MODE_REBOOT); + load_mode_settings (plugin, key_file, "updates", PLY_BOOT_SPLASH_MODE_UPDATES); ++ load_mode_settings (plugin, key_file, "system-upgrade", PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE); + + if (plugin->use_firmware_background) + plugin->background_bgrt_image = ply_image_new ("/sys/firmware/acpi/bgrt/image"); +@@ -1185,7 +1190,8 @@ start_progress_animation (ply_boot_splash_plugin_t *plugin) + * but it's normally really fast, so just jump to + * the end animation + */ +- if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN) ++ if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN || ++ plugin->mode == PLY_BOOT_SPLASH_MODE_REBOOT) + become_idle (plugin, NULL); + } + +@@ -1575,7 +1581,8 @@ on_boot_progress (ply_boot_splash_plugin_t *plugin, + double duration, + double percent_done) + { +- if (plugin->mode == PLY_BOOT_SPLASH_MODE_UPDATES) ++ if (plugin->mode == PLY_BOOT_SPLASH_MODE_UPDATES || ++ plugin->mode == PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE) + return; + + if (plugin->state != PLY_BOOT_SPLASH_DISPLAY_NORMAL) +@@ -1782,7 +1789,8 @@ system_update (ply_boot_splash_plugin_t *plugin, + ply_list_node_t *node; + char buf[64]; + +- if (plugin->mode != PLY_BOOT_SPLASH_MODE_UPDATES) ++ if (plugin->mode != PLY_BOOT_SPLASH_MODE_UPDATES && ++ plugin->mode != PLY_BOOT_SPLASH_MODE_SYSTEM_UPGRADE) + return; + + node = ply_list_get_first_node (plugin->views); +diff --git a/systemd-units/plymouth-reboot.service.in b/systemd-units/plymouth-reboot.service.in +index 1d57789..147f824 100644 +--- a/systemd-units/plymouth-reboot.service.in ++++ b/systemd-units/plymouth-reboot.service.in +@@ -7,6 +7,6 @@ ConditionKernelCommandLine=!plymouth.enable=0 + ConditionVirtualization=!container + + [Service] +-ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session ++ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=reboot --attach-to-session + ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash + Type=forking +diff --git a/themes/bgrt/bgrt.plymouth.in b/themes/bgrt/bgrt.plymouth.in +index 15bd9ba..b7c14d2 100644 +--- a/themes/bgrt/bgrt.plymouth.in ++++ b/themes/bgrt/bgrt.plymouth.in +@@ -30,9 +30,19 @@ UseFirmwareBackground=true + [shutdown] + UseFirmwareBackground=true + ++[reboot] ++UseFirmwareBackground=true ++ + [updates] + SuppressMessages=true + ProgressBarShowPercentComplete=true + UseProgressBar=true + Title=Installing Updates... + SubTitle=Do not turn off your computer ++ ++[system-upgrade] ++SuppressMessages=true ++ProgressBarShowPercentComplete=true ++UseProgressBar=true ++Title=Upgrading System... ++SubTitle=Do not turn off your computer +diff --git a/themes/spinner/spinner.plymouth.in b/themes/spinner/spinner.plymouth.in +index 40613ba..5e8c1c1 100644 +--- a/themes/spinner/spinner.plymouth.in ++++ b/themes/spinner/spinner.plymouth.in +@@ -29,3 +29,10 @@ ProgressBarShowPercentComplete=true + UseProgressBar=true + Title=Installing Updates... + SubTitle=Do not turn off your computer ++ ++[system-upgrade] ++SuppressMessages=true ++ProgressBarShowPercentComplete=true ++UseProgressBar=true ++Title=Upgrading System... ++SubTitle=Do not turn off your computer +-- +2.20.1 + +From 921328b1ef1c1ec60350a57c73b76297ea3e8455 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Tue, 26 Feb 2019 10:23:06 +0100 +Subject: [PATCH 79/82] Prefix Title and Subtitle theme config keywords with an + underscore + +Prefix Title and Subtitle theme config keywords with an underscore ('_') +so that "intltool-extract --type=gettext/ini" can be used to make the +title and subtitle translatable. + +Signed-off-by: Hans de Goede +--- + src/plugins/splash/two-step/plugin.c | 4 ++-- + themes/bgrt/bgrt.plymouth.in | 8 ++++---- + themes/spinner/spinner.plymouth.in | 8 ++++---- + 3 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/src/plugins/splash/two-step/plugin.c b/src/plugins/splash/two-step/plugin.c +index 4c57091..098f262 100644 +--- a/src/plugins/splash/two-step/plugin.c ++++ b/src/plugins/splash/two-step/plugin.c +@@ -837,8 +837,8 @@ load_mode_settings (ply_boot_splash_plugin_t *plugin, + if (settings->use_firmware_background) + plugin->use_firmware_background = true; + +- settings->title = ply_key_file_get_value (key_file, group_name, "Title"); +- settings->subtitle = ply_key_file_get_value (key_file, group_name, "SubTitle"); ++ settings->title = ply_key_file_get_value (key_file, group_name, "_Title"); ++ settings->subtitle = ply_key_file_get_value (key_file, group_name, "_SubTitle"); + } + + static ply_boot_splash_plugin_t * +diff --git a/themes/bgrt/bgrt.plymouth.in b/themes/bgrt/bgrt.plymouth.in +index b7c14d2..d6ad9e1 100644 +--- a/themes/bgrt/bgrt.plymouth.in ++++ b/themes/bgrt/bgrt.plymouth.in +@@ -37,12 +37,12 @@ UseFirmwareBackground=true + SuppressMessages=true + ProgressBarShowPercentComplete=true + UseProgressBar=true +-Title=Installing Updates... +-SubTitle=Do not turn off your computer ++_Title=Installing Updates... ++_SubTitle=Do not turn off your computer + + [system-upgrade] + SuppressMessages=true + ProgressBarShowPercentComplete=true + UseProgressBar=true +-Title=Upgrading System... +-SubTitle=Do not turn off your computer ++_Title=Upgrading System... ++_SubTitle=Do not turn off your computer +diff --git a/themes/spinner/spinner.plymouth.in b/themes/spinner/spinner.plymouth.in +index 5e8c1c1..187b635 100644 +--- a/themes/spinner/spinner.plymouth.in ++++ b/themes/spinner/spinner.plymouth.in +@@ -27,12 +27,12 @@ MessageBelowAnimation=true + SuppressMessages=true + ProgressBarShowPercentComplete=true + UseProgressBar=true +-Title=Installing Updates... +-SubTitle=Do not turn off your computer ++_Title=Installing Updates... ++_SubTitle=Do not turn off your computer + + [system-upgrade] + SuppressMessages=true + ProgressBarShowPercentComplete=true + UseProgressBar=true +-Title=Upgrading System... +-SubTitle=Do not turn off your computer ++_Title=Upgrading System... ++_SubTitle=Do not turn off your computer +-- +2.20.1 + +From b0ea667525dcbe9bce9d57aa1ae9b59c9a75441f Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Tue, 26 Feb 2019 11:03:36 +0100 +Subject: [PATCH 80/82] Add support for translating the user visible strings in + some themes + +This commit adds initial translation support, for now translation support +is limited to the user visible strings in some splash plugins and themes, +the daemon and commandline utils output are left untranslated for now. + +Signed-off-by: Hans de Goede +--- + Makefile.am | 6 ++- + configure.ac | 9 +++- + po/LINGUAS | 1 + + po/Makevars | 78 ++++++++++++++++++++++++++++ + po/POTFILES.in | 9 ++++ + po/Rules-themes | 5 ++ + po/nl.po | 37 +++++++++++++ + src/libply/Makefile.am | 1 + + src/libply/ply-i18n.h | 28 ++++++++++ + src/main.c | 3 ++ + src/plugins/splash/two-step/plugin.c | 7 +-- + 11 files changed, 178 insertions(+), 6 deletions(-) + create mode 100644 po/LINGUAS + create mode 100644 po/Makevars + create mode 100644 po/POTFILES.in + create mode 100644 po/Rules-themes + create mode 100644 po/nl.po + create mode 100644 src/libply/ply-i18n.h + +diff --git a/Makefile.am b/Makefile.am +index cb6eedb..2d38de1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = src themes images scripts systemd-units ++SUBDIRS = po src themes images scripts systemd-units + + if BUILD_DOCUMENTATION + SUBDIRS += docs +@@ -6,7 +6,7 @@ endif + + DISTCHECK_CONFIGURE_FLAGS = --disable-tests --disable-systemd-integration + +-EXTRA_DIST = ChangeLog \ ++EXTRA_DIST = build-tools/config.rpath ChangeLog \ + README + + MAINTAINERCLEANFILES = aclocal.m4 \ +@@ -15,3 +15,5 @@ MAINTAINERCLEANFILES = aclocal.m4 \ + config.sub \ + configure \ + Makefile.in ++ ++ACLOCAL_AMFLAGS = -I m4 +diff --git a/configure.ac b/configure.ac +index 78550d0..9771027 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -15,6 +15,13 @@ AM_INIT_AUTOMAKE([dist-xz no-dist-gzip]) + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + AM_MAINTAINER_MODE([enable]) + ++AM_GNU_GETTEXT_VERSION([0.19.8]) ++AM_GNU_GETTEXT([external]) ++AC_PATH_PROG([INTLTOOL_EXTRACT], [intltool-extract]) ++if test x$INTLTOOL_EXTRACT = x; then ++ AC_MSG_ERROR([intltool-extract is required to build plymouth]) ++fi ++ + PKG_PROG_PKG_CONFIG + LT_INIT([dlopen disable-static pic-only]) + +@@ -286,7 +293,7 @@ AS_AC_EXPAND(PLYMOUTH_LIBDIR, $libdir) + AS_AC_EXPAND(PLYMOUTH_LIBEXECDIR, $libexecdir) + AS_AC_EXPAND(PLYMOUTH_DATADIR, $datadir) + +-AC_CONFIG_FILES([Makefile ++AC_CONFIG_FILES([Makefile po/Makefile.in + src/libply/Makefile + src/libply-splash-core/Makefile + src/libply-splash-graphics/Makefile +diff --git a/po/LINGUAS b/po/LINGUAS +new file mode 100644 +index 0000000..bec81d2 +--- /dev/null ++++ b/po/LINGUAS +@@ -0,0 +1 @@ ++nl +diff --git a/po/Makevars b/po/Makevars +new file mode 100644 +index 0000000..40e01c8 +--- /dev/null ++++ b/po/Makevars +@@ -0,0 +1,78 @@ ++# Makefile variables for PO directory in any package using GNU gettext. ++ ++# Usually the message domain is the same as the package name. ++DOMAIN = $(PACKAGE) ++ ++# These two variables depend on the location of this directory. ++subdir = po ++top_builddir = .. ++ ++# These options get passed to xgettext. ++XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ ++ ++# This is the copyright holder that gets inserted into the header of the ++# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding ++# package. (Note that the msgstr strings, extracted from the package's ++# sources, belong to the copyright holder of the package.) Translators are ++# expected to transfer the copyright for their translations to this person ++# or entity, or to disclaim their copyright. The empty string stands for ++# the public domain; in this case the translators are expected to disclaim ++# their copyright. ++COPYRIGHT_HOLDER = Plymouth contributors ++ ++# This tells whether or not to prepend "GNU " prefix to the package ++# name that gets inserted into the header of the $(DOMAIN).pot file. ++# Possible values are "yes", "no", or empty. If it is empty, try to ++# detect it automatically by scanning the files in $(top_srcdir) for ++# "GNU packagename" string. ++PACKAGE_GNU = no ++ ++# This is the email address or URL to which the translators shall report ++# bugs in the untranslated strings: ++# - Strings which are not entire sentences, see the maintainer guidelines ++# in the GNU gettext documentation, section 'Preparing Strings'. ++# - Strings which use unclear terms or require additional context to be ++# understood. ++# - Strings which make invalid assumptions about notation of date, time or ++# money. ++# - Pluralisation problems. ++# - Incorrect English spelling. ++# - Incorrect formatting. ++# It can be your email address, or a mailing list address where translators ++# can write to without being subscribed, or the URL of a web page through ++# which the translators can contact you. ++MSGID_BUGS_ADDRESS = ++ ++# This is the list of locale categories, beyond LC_MESSAGES, for which the ++# message catalogs shall be used. It is usually empty. ++EXTRA_LOCALE_CATEGORIES = ++ ++# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' ++# context. Possible values are "yes" and "no". Set this to yes if the ++# package uses functions taking also a message context, like pgettext(), or ++# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. ++USE_MSGCTXT = no ++ ++# These options get passed to msgmerge. ++# Useful options are in particular: ++# --previous to keep previous msgids of translated messages, ++# --quiet to reduce the verbosity. ++MSGMERGE_OPTIONS = ++ ++# These options get passed to msginit. ++# If you want to disable line wrapping when writing PO files, add ++# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and ++# MSGINIT_OPTIONS. ++MSGINIT_OPTIONS = ++ ++# This tells whether or not to regenerate a PO file when $(DOMAIN).pot ++# has changed. Possible values are "yes" and "no". Set this to no if ++# the POT file is checked in the repository and the version control ++# program ignores timestamps. ++PO_DEPENDS_ON_POT = yes ++ ++# This tells whether or not to forcibly update $(DOMAIN).pot and ++# regenerate PO files on "make dist". Possible values are "yes" and ++# "no". Set this to no if the POT file and PO files are maintained ++# externally. ++DIST_DEPENDS_ON_UPDATE_PO = yes +diff --git a/po/POTFILES.in b/po/POTFILES.in +new file mode 100644 +index 0000000..bbce0ef +--- /dev/null ++++ b/po/POTFILES.in +@@ -0,0 +1,9 @@ ++# List of source files which contain translatable strings. ++ ++# For now we only translate the user visible strings in some splash plugins ++# (the daemon and commandline utils output is untranslated for now) ++src/plugins/splash/two-step/plugin.c ++ ++# Generated from the theme.in files by "intltool-extract --type=gettext/ini" ++themes/bgrt/bgrt.plymouth.in.h ++themes/spinner/spinner.plymouth.in.h +diff --git a/po/Rules-themes b/po/Rules-themes +new file mode 100644 +index 0000000..8c7cbc9 +--- /dev/null ++++ b/po/Rules-themes +@@ -0,0 +1,5 @@ ++../themes/bgrt/bgrt.plymouth.in.h: ../themes/bgrt/bgrt.plymouth.in ++ intltool-extract --type=gettext/ini $< ++ ++../themes/spinner/spinner.plymouth.in.h: ../themes/spinner/spinner.plymouth.in ++ intltool-extract --type=gettext/ini $< +diff --git a/po/nl.po b/po/nl.po +new file mode 100644 +index 0000000..f730bce +--- /dev/null ++++ b/po/nl.po +@@ -0,0 +1,37 @@ ++# Dutch translations for plymouth package ++# Nederlandse vertalingen voor het pakket plymouth. ++# Copyright (C) 2019 Plymouth contributors ++# This file is distributed under the same license as the plymouth package. ++# Hans de Goede , 2019. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: plymouth 0.9.5\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?" ++"product=plymouth\n" ++"POT-Creation-Date: 2019-02-26 12:09+0100\n" ++"PO-Revision-Date: 2019-02-26 11:19+0100\n" ++"Last-Translator: Hans de Goede \n" ++"Language-Team: Dutch\n" ++"Language: nl\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"Plural-Forms: nplurals=2; plural=(n != 1);\n" ++ ++#: src/plugins/splash/two-step/plugin.c:1809 ++#, c-format ++msgid "%d%% complete" ++msgstr "%d%% voltooid" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:1 themes/spinner/spinner.plymouth.in.h:1 ++msgid "Installing Updates..." ++msgstr "Updates worden uitgevoerd..." ++ ++#: themes/bgrt/bgrt.plymouth.in.h:2 themes/spinner/spinner.plymouth.in.h:2 ++msgid "Do not turn off your computer" ++msgstr "Schakel de computer niet uit" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:3 themes/spinner/spinner.plymouth.in.h:3 ++msgid "Upgrading System..." ++msgstr "Besturingssysteem upgrade wordt uitgevoerd..." +diff --git a/src/libply/Makefile.am b/src/libply/Makefile.am +index de15808..8f0abd9 100644 +--- a/src/libply/Makefile.am ++++ b/src/libply/Makefile.am +@@ -19,6 +19,7 @@ libply_HEADERS = \ + ply-list.h \ + ply-hashtable.h \ + ply-logger.h \ ++ ply-i18n.h \ + ply-key-file.h \ + ply-progress.h \ + ply-rectangle.h \ +diff --git a/src/libply/ply-i18n.h b/src/libply/ply-i18n.h +new file mode 100644 +index 0000000..94a4035 +--- /dev/null ++++ b/src/libply/ply-i18n.h +@@ -0,0 +1,28 @@ ++/* ply-utils.h - i18n handling ++ * ++ * Copyright (C) 2019 Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This program 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 General Public License for more details. ++ * ++ * Written By: Hans de Goede ++ */ ++#ifndef PLY_I18N_H ++#define PLY_I18N_H ++ ++#ifdef ENABLE_NLS ++#include ++#define _(String) dgettext(PACKAGE, String) ++#else ++#define _(String) (String) ++#endif ++ ++#endif /* PLY_I18N_H */ ++/* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */ +diff --git a/src/main.c b/src/main.c +index 90e8a5e..b06d29c 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -652,6 +653,8 @@ on_newroot (state_t *state, + chdir (root_dir); + chroot ("."); + chdir ("/"); ++ /* Update local now that we have /usr/share/locale available */ ++ setlocale(LC_ALL, ""); + ply_progress_load_cache (state->progress, get_cache_file_for_mode (state->mode)); + if (state->boot_splash != NULL) + ply_boot_splash_root_mounted (state->boot_splash); +diff --git a/src/plugins/splash/two-step/plugin.c b/src/plugins/splash/two-step/plugin.c +index 098f262..e8b91ec 100644 +--- a/src/plugins/splash/two-step/plugin.c ++++ b/src/plugins/splash/two-step/plugin.c +@@ -53,6 +53,7 @@ + #include "ply-pixel-buffer.h" + #include "ply-pixel-display.h" + #include "ply-utils.h" ++#include "ply-i18n.h" + + #include "ply-animation.h" + #include "ply-progress-animation.h" +@@ -509,7 +510,7 @@ view_load (view_t *view) + + if (plugin->mode_settings[plugin->mode].title) { + ply_label_set_text (view->title_label, +- plugin->mode_settings[plugin->mode].title); ++ _(plugin->mode_settings[plugin->mode].title)); + title_height = ply_label_get_height (view->title_label); + } else { + ply_label_hide (view->title_label); +@@ -517,7 +518,7 @@ view_load (view_t *view) + + if (plugin->mode_settings[plugin->mode].subtitle) { + ply_label_set_text (view->subtitle_label, +- plugin->mode_settings[plugin->mode].subtitle); ++ _(plugin->mode_settings[plugin->mode].subtitle)); + subtitle_height = ply_label_get_height (view->subtitle_label); + } else { + ply_label_hide (view->subtitle_label); +@@ -1805,7 +1806,7 @@ system_update (ply_boot_splash_plugin_t *plugin, + ply_progress_bar_set_percent_done (view->progress_bar, (double) progress / 100.f); + if (!ply_progress_bar_is_hidden (view->progress_bar) && + plugin->mode_settings[plugin->mode].progress_bar_show_percent_complete) { +- snprintf (buf, sizeof(buf), "%d%% complete", progress); ++ snprintf (buf, sizeof(buf), _("%d%% complete"), progress); + view_show_message (view, buf); + } + node = next_node; +-- +2.20.1 + +From 39bd6bd70477b36b8693774372408be21194f2ce Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 4 Mar 2019 10:42:29 +0100 +Subject: [PATCH 81/82] Sync translations with zanata + +Sync the translations with the translations from zanata: +https://fedora.zanata.org/iteration/view/plymouth/master + +Signed-off-by: Hans de Goede +--- + po/LINGUAS | 9 +++++++++ + po/be.po | 35 +++++++++++++++++++++++++++++++++++ + po/cs.po | 35 +++++++++++++++++++++++++++++++++++ + po/de.po | 34 ++++++++++++++++++++++++++++++++++ + po/es.po | 34 ++++++++++++++++++++++++++++++++++ + po/fr.po | 34 ++++++++++++++++++++++++++++++++++ + po/hu.po | 34 ++++++++++++++++++++++++++++++++++ + po/pl.po | 35 +++++++++++++++++++++++++++++++++++ + po/plymouth.pot | 36 ++++++++++++++++++++++++++++++++++++ + po/uk.po | 35 +++++++++++++++++++++++++++++++++++ + po/zh_CN.po | 34 ++++++++++++++++++++++++++++++++++ + 11 files changed, 355 insertions(+) + create mode 100644 po/be.po + create mode 100644 po/cs.po + create mode 100644 po/de.po + create mode 100644 po/es.po + create mode 100644 po/fr.po + create mode 100644 po/hu.po + create mode 100644 po/pl.po + create mode 100644 po/plymouth.pot + create mode 100644 po/uk.po + create mode 100644 po/zh_CN.po + +diff --git a/po/LINGUAS b/po/LINGUAS +index bec81d2..c7af8be 100644 +--- a/po/LINGUAS ++++ b/po/LINGUAS +@@ -1 +1,10 @@ ++be ++cs ++de ++es ++fr ++hu + nl ++pl ++uk ++zh_CN +diff --git a/po/be.po b/po/be.po +new file mode 100644 +index 0000000..4cb3ecd +--- /dev/null ++++ b/po/be.po +@@ -0,0 +1,35 @@ ++# Viktar Siarheichyk , 2019. #zanata ++msgid "" ++msgstr "" ++"Project-Id-Version: plymouth 0.9.5\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=" ++"plymouth\n" ++"POT-Creation-Date: 2019-02-26 12:09+0100\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"PO-Revision-Date: 2019-03-01 08:51+0000\n" ++"Last-Translator: Viktar Siarheichyk \n" ++"Language-Team: Belarusian\n" ++"Language: be\n" ++"X-Generator: Zanata 4.6.2\n" ++"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " ++"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" ++ ++#: src/plugins/splash/two-step/plugin.c:1809 ++#, c-format ++msgid "%d%% complete" ++msgstr "Зроблена %d%% " ++ ++#: themes/bgrt/bgrt.plymouth.in.h:1 themes/spinner/spinner.plymouth.in.h:1 ++msgid "Installing Updates..." ++msgstr "Інсталяцыя абнаўленняў..." ++ ++#: themes/bgrt/bgrt.plymouth.in.h:2 themes/spinner/spinner.plymouth.in.h:2 ++msgid "Do not turn off your computer" ++msgstr "Не выключайце кампутар" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:3 themes/spinner/spinner.plymouth.in.h:3 ++msgid "Upgrading System..." ++msgstr "Сістэма абнаўляецца..." ++ +diff --git a/po/cs.po b/po/cs.po +new file mode 100644 +index 0000000..d9b2781 +--- /dev/null ++++ b/po/cs.po +@@ -0,0 +1,35 @@ ++# Daniel Rusek , 2019. #zanata ++# Michal Konečný , 2019. #zanata ++msgid "" ++msgstr "" ++"Project-Id-Version: plymouth 0.9.5\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=" ++"plymouth\n" ++"POT-Creation-Date: 2019-02-26 12:09+0100\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"PO-Revision-Date: 2019-02-26 06:08+0000\n" ++"Last-Translator: Daniel Rusek \n" ++"Language-Team: Czech\n" ++"Language: cs\n" ++"X-Generator: Zanata 4.6.2\n" ++"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n" ++ ++#: src/plugins/splash/two-step/plugin.c:1809 ++#, c-format ++msgid "%d%% complete" ++msgstr "%d%% dokončeno" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:1 themes/spinner/spinner.plymouth.in.h:1 ++msgid "Installing Updates..." ++msgstr "Instalace aktualizací..." ++ ++#: themes/bgrt/bgrt.plymouth.in.h:2 themes/spinner/spinner.plymouth.in.h:2 ++msgid "Do not turn off your computer" ++msgstr "Nevypínejte počítač" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:3 themes/spinner/spinner.plymouth.in.h:3 ++msgid "Upgrading System..." ++msgstr "Aktualizace systému..." ++ +diff --git a/po/de.po b/po/de.po +new file mode 100644 +index 0000000..ab653e2 +--- /dev/null ++++ b/po/de.po +@@ -0,0 +1,34 @@ ++# Thomas Eichhorn , 2019. #zanata ++msgid "" ++msgstr "" ++"Project-Id-Version: plymouth 0.9.5\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=" ++"plymouth\n" ++"POT-Creation-Date: 2019-02-26 12:09+0100\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"PO-Revision-Date: 2019-03-02 08:34+0000\n" ++"Last-Translator: Thomas Eichhorn \n" ++"Language-Team: German\n" ++"Language: de\n" ++"X-Generator: Zanata 4.6.2\n" ++"Plural-Forms: nplurals=2; plural=(n != 1)\n" ++ ++#: src/plugins/splash/two-step/plugin.c:1809 ++#, c-format ++msgid "%d%% complete" ++msgstr "%d%% abgeschlossen" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:1 themes/spinner/spinner.plymouth.in.h:1 ++msgid "Installing Updates..." ++msgstr "Updates werden installiert..." ++ ++#: themes/bgrt/bgrt.plymouth.in.h:2 themes/spinner/spinner.plymouth.in.h:2 ++msgid "Do not turn off your computer" ++msgstr "Schalten Sie den Computer nicht aus" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:3 themes/spinner/spinner.plymouth.in.h:3 ++msgid "Upgrading System..." ++msgstr "Systemupgrade wird durchgeführt..." ++ +diff --git a/po/es.po b/po/es.po +new file mode 100644 +index 0000000..7beb40e +--- /dev/null ++++ b/po/es.po +@@ -0,0 +1,34 @@ ++# Máximo Castañeda Riloba , 2019. #zanata ++msgid "" ++msgstr "" ++"Project-Id-Version: plymouth 0.9.5\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=" ++"plymouth\n" ++"POT-Creation-Date: 2019-02-26 12:09+0100\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"PO-Revision-Date: 2019-02-26 08:21+0000\n" ++"Last-Translator: Máximo Castañeda Riloba \n" ++"Language-Team: Spanish\n" ++"Language: es\n" ++"X-Generator: Zanata 4.6.2\n" ++"Plural-Forms: nplurals=2; plural=(n != 1)\n" ++ ++#: src/plugins/splash/two-step/plugin.c:1809 ++#, c-format ++msgid "%d%% complete" ++msgstr "%d%% completado" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:1 themes/spinner/spinner.plymouth.in.h:1 ++msgid "Installing Updates..." ++msgstr "Instalando actualizaciones..." ++ ++#: themes/bgrt/bgrt.plymouth.in.h:2 themes/spinner/spinner.plymouth.in.h:2 ++msgid "Do not turn off your computer" ++msgstr "No apague su equipo" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:3 themes/spinner/spinner.plymouth.in.h:3 ++msgid "Upgrading System..." ++msgstr "Actualizando el sistema..." ++ +diff --git a/po/fr.po b/po/fr.po +new file mode 100644 +index 0000000..2b7f964 +--- /dev/null ++++ b/po/fr.po +@@ -0,0 +1,34 @@ ++# Jean-Baptiste Holcroft , 2019. #zanata ++msgid "" ++msgstr "" ++"Project-Id-Version: plymouth 0.9.5\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=" ++"plymouth\n" ++"POT-Creation-Date: 2019-02-26 12:09+0100\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"PO-Revision-Date: 2019-02-27 09:41+0000\n" ++"Last-Translator: Jean-Baptiste Holcroft \n" ++"Language-Team: French\n" ++"Language: fr\n" ++"X-Generator: Zanata 4.6.2\n" ++"Plural-Forms: nplurals=2; plural=(n > 1)\n" ++ ++#: src/plugins/splash/two-step/plugin.c:1809 ++#, c-format ++msgid "%d%% complete" ++msgstr "%d%%" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:1 themes/spinner/spinner.plymouth.in.h:1 ++msgid "Installing Updates..." ++msgstr "Installation des mises à jour…" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:2 themes/spinner/spinner.plymouth.in.h:2 ++msgid "Do not turn off your computer" ++msgstr "N’éteignez pas votre ordinateur" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:3 themes/spinner/spinner.plymouth.in.h:3 ++msgid "Upgrading System..." ++msgstr "Mise à jour du système…" ++ +diff --git a/po/hu.po b/po/hu.po +new file mode 100644 +index 0000000..76e2e94 +--- /dev/null ++++ b/po/hu.po +@@ -0,0 +1,34 @@ ++# Meskó Balázs , 2019. #zanata ++msgid "" ++msgstr "" ++"Project-Id-Version: plymouth 0.9.5\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=" ++"plymouth\n" ++"POT-Creation-Date: 2019-02-26 12:09+0100\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"PO-Revision-Date: 2019-02-28 03:07+0000\n" ++"Last-Translator: Meskó Balázs \n" ++"Language-Team: Hungarian\n" ++"Language: hu\n" ++"X-Generator: Zanata 4.6.2\n" ++"Plural-Forms: nplurals=2; plural=(n != 1)\n" ++ ++#: src/plugins/splash/two-step/plugin.c:1809 ++#, c-format ++msgid "%d%% complete" ++msgstr "%d%% kész" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:1 themes/spinner/spinner.plymouth.in.h:1 ++msgid "Installing Updates..." ++msgstr "Frissítések telepítése…" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:2 themes/spinner/spinner.plymouth.in.h:2 ++msgid "Do not turn off your computer" ++msgstr "Ne kapcsolja ki a számítógépet" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:3 themes/spinner/spinner.plymouth.in.h:3 ++msgid "Upgrading System..." ++msgstr "Rendszer frissítése…" ++ +diff --git a/po/pl.po b/po/pl.po +new file mode 100644 +index 0000000..a3e471c +--- /dev/null ++++ b/po/pl.po +@@ -0,0 +1,35 @@ ++# Piotr Drąg , 2019. #zanata ++msgid "" ++msgstr "" ++"Project-Id-Version: plymouth 0.9.5\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=" ++"plymouth\n" ++"POT-Creation-Date: 2019-02-26 12:09+0100\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"PO-Revision-Date: 2019-02-26 04:45+0000\n" ++"Last-Translator: Piotr Drąg \n" ++"Language-Team: Polish\n" ++"Language: pl\n" ++"X-Generator: Zanata 4.6.2\n" ++"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " ++"|| n%100>=20) ? 1 : 2)\n" ++ ++#: src/plugins/splash/two-step/plugin.c:1809 ++#, c-format ++msgid "%d%% complete" ++msgstr "Ukończono %d%%" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:1 themes/spinner/spinner.plymouth.in.h:1 ++msgid "Installing Updates..." ++msgstr "Instalowanie aktualizacji…" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:2 themes/spinner/spinner.plymouth.in.h:2 ++msgid "Do not turn off your computer" ++msgstr "Nie należy wyłączać komputera" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:3 themes/spinner/spinner.plymouth.in.h:3 ++msgid "Upgrading System..." ++msgstr "Aktualizowanie systemu…" ++ +diff --git a/po/plymouth.pot b/po/plymouth.pot +new file mode 100644 +index 0000000..e4c6139 +--- /dev/null ++++ b/po/plymouth.pot +@@ -0,0 +1,36 @@ ++# SOME DESCRIPTIVE TITLE. ++# Copyright (C) YEAR Plymouth contributors ++# This file is distributed under the same license as the plymouth package. ++# FIRST AUTHOR , YEAR. ++# ++#, fuzzy ++msgid "" ++msgstr "" ++"Project-Id-Version: plymouth 0.9.5\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?" ++"product=plymouth\n" ++"POT-Creation-Date: 2019-02-26 12:09+0100\n" ++"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" ++"Last-Translator: FULL NAME \n" ++"Language-Team: LANGUAGE \n" ++"Language: \n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=CHARSET\n" ++"Content-Transfer-Encoding: 8bit\n" ++ ++#: src/plugins/splash/two-step/plugin.c:1809 ++#, c-format ++msgid "%d%% complete" ++msgstr "" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:1 themes/spinner/spinner.plymouth.in.h:1 ++msgid "Installing Updates..." ++msgstr "" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:2 themes/spinner/spinner.plymouth.in.h:2 ++msgid "Do not turn off your computer" ++msgstr "" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:3 themes/spinner/spinner.plymouth.in.h:3 ++msgid "Upgrading System..." ++msgstr "" +diff --git a/po/uk.po b/po/uk.po +new file mode 100644 +index 0000000..71cc7de +--- /dev/null ++++ b/po/uk.po +@@ -0,0 +1,35 @@ ++# Yuri Chornoivan , 2019. #zanata ++msgid "" ++msgstr "" ++"Project-Id-Version: plymouth 0.9.5\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=" ++"plymouth\n" ++"POT-Creation-Date: 2019-02-26 12:09+0100\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"PO-Revision-Date: 2019-02-26 04:44+0000\n" ++"Last-Translator: Yuri Chornoivan \n" ++"Language-Team: Ukrainian\n" ++"Language: uk\n" ++"X-Generator: Zanata 4.6.2\n" ++"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " ++"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" ++ ++#: src/plugins/splash/two-step/plugin.c:1809 ++#, c-format ++msgid "%d%% complete" ++msgstr "Виконано на %d%%" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:1 themes/spinner/spinner.plymouth.in.h:1 ++msgid "Installing Updates..." ++msgstr "Встановлюємо оновлення…" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:2 themes/spinner/spinner.plymouth.in.h:2 ++msgid "Do not turn off your computer" ++msgstr "Не вимикайте комп'ютер" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:3 themes/spinner/spinner.plymouth.in.h:3 ++msgid "Upgrading System..." ++msgstr "Оновлюємо систему…" ++ +diff --git a/po/zh_CN.po b/po/zh_CN.po +new file mode 100644 +index 0000000..9ea6090 +--- /dev/null ++++ b/po/zh_CN.po +@@ -0,0 +1,34 @@ ++# Pany , 2019. #zanata ++msgid "" ++msgstr "" ++"Project-Id-Version: plymouth 0.9.5\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=" ++"plymouth\n" ++"POT-Creation-Date: 2019-02-26 12:09+0100\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"PO-Revision-Date: 2019-02-27 08:56+0000\n" ++"Last-Translator: Pany \n" ++"Language-Team: Chinese (China)\n" ++"Language: zh_CN\n" ++"X-Generator: Zanata 4.6.2\n" ++"Plural-Forms: nplurals=1; plural=0\n" ++ ++#: src/plugins/splash/two-step/plugin.c:1809 ++#, c-format ++msgid "%d%% complete" ++msgstr "当前进度 %d%%" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:1 themes/spinner/spinner.plymouth.in.h:1 ++msgid "Installing Updates..." ++msgstr "正在安装更新……" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:2 themes/spinner/spinner.plymouth.in.h:2 ++msgid "Do not turn off your computer" ++msgstr "请不要关机" ++ ++#: themes/bgrt/bgrt.plymouth.in.h:3 themes/spinner/spinner.plymouth.in.h:3 ++msgid "Upgrading System..." ++msgstr "正在升级系统……" ++ +-- +2.20.1 + +From 4e1c00b89a710c38ba04206875c4d7c7c1d49c75 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 1 Mar 2019 17:22:30 +0100 +Subject: [PATCH 82/82] ply-pixel-buffer: Fix right and bottom edge rendering + of scaled buffers + +When scaling a buffer 2x and calling ply_pixels_interpolate to interpolate +the last row / column, the extra pixels used for pixels would go out of +bounds and be replaced with a black pixel. This causes a 50% dimming of the +last row / column. + +This 50% dimming leads to an ugly darkline when a theme draws 2 images +which are supposed to be joined together. + +This commit fixes this by clipping the coordinates to the source image +limits instead of using black pixels when interpolating right and bottom +edge pixels. + +Signed-off-by: Hans de Goede +--- + src/libply-splash-core/ply-pixel-buffer.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/libply-splash-core/ply-pixel-buffer.c b/src/libply-splash-core/ply-pixel-buffer.c +index 3ce6f78..51f9c4d 100644 +--- a/src/libply-splash-core/ply-pixel-buffer.c ++++ b/src/libply-splash-core/ply-pixel-buffer.c +@@ -667,7 +667,13 @@ ply_pixels_interpolate (uint32_t *bytes, + ix = x + offset_x; + iy = y + offset_y; + +- if (ix < 0 || ix >= width || iy < 0 || iy >= height) ++ if (ix >= width) ++ ix = width - 1; ++ ++ if (iy >= height) ++ ix = height - 1; ++ ++ if (ix < 0 || iy < 0) + pixels[offset_y][offset_x] = 0x00000000; + else + pixels[offset_y][offset_x] = bytes[ix + iy * width]; +-- +2.20.1 + diff --git a/plymouth.spec b/plymouth.spec index ef3236b..8c27cd4 100644 --- a/plymouth.spec +++ b/plymouth.spec @@ -1,7 +1,7 @@ Summary: Graphical Boot Animation and Logger Name: plymouth Version: 0.9.4 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: http://www.freedesktop.org/wiki/Software/Plymouth @@ -20,6 +20,8 @@ BuildRequires: libxslt, docbook-style-xsl BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pango-devel >= 1.21.0 BuildRequires: cairo-devel +BuildRequires: gettext-devel +BuildRequires: intltool Requires: %{name}-core-libs = %{version}-%{release} Requires: %{name}-scripts = %{version}-%{release} @@ -238,6 +240,7 @@ make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT +%find_lang %{name} # Glow isn't quite ready for primetime rm -rf $RPM_BUILD_ROOT%{_datadir}/plymouth/glow/ @@ -313,7 +316,7 @@ if [ $1 -eq 0 ]; then fi -%files +%files -f %{name}.lang %license COPYING %doc AUTHORS README %dir %{_datadir}/plymouth @@ -411,6 +414,9 @@ fi %changelog +* Mon Mar 4 2019 Hans de Goede - 0.9.4-4 +- Add translations for the new spinner/bgrt offline-updates splash + * Wed Feb 13 2019 Hans de Goede - 0.9.4-3 - Add patches from upstream for: - Monitor hotplug support, this fixes issues with monitors on DP-MST