Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
2d68bafd49
!34 [sync] PR-31: add noreplace to /etc/logrotate.d/bootlog
From: @openeuler-sync-bot 
Reviewed-by: @open-bot 
Signed-off-by: @open-bot
2024-05-08 05:25:49 +00:00
yangl777
4fc58657ed add noreplace to /etc/logrotate.d/bootlog
(cherry picked from commit db16952d7d283493a56aed88d71ac93a1d07e6ab)
2024-05-08 11:17:16 +08:00
openeuler-ci-bot
eba717fa25
!28 update plymouth version to 22.02.122
From: @yangl777 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-11-04 07:52:55 +00:00
yangl777
2446a236ab update plymouth version to 22.02.122 2022-11-02 12:35:59 +00:00
openeuler-ci-bot
cbbc011da3
!23 add macros to control if need libdrm, pango, libpng and if need to exclude bootlog
From: @eaglegai 
Reviewed-by: @yanan-rock 
Signed-off-by: @yanan-rock
2022-07-07 12:09:09 +00:00
eaglegai
e317e7efdf add macros to control if need libdrm, pango, libpng and if need to exclude bootlog 2022-06-17 14:14:04 +08:00
openeuler-ci-bot
766e1e4b80
!17 fix spec changelog date
From: @archlee 
Reviewed-by: @weidongkl 
Signed-off-by: @weidongkl
2022-05-10 08:45:57 +00:00
mylee
ca9360d9e4 fix spec changelog date 2022-05-10 15:16:37 +08:00
openeuler-ci-bot
8911282bc1 !14 carry xattr when copying files to initramfs
From: @nettingsisyphus
Reviewed-by: @yanan-rock
Signed-off-by: @yanan-rock
2020-12-17 21:39:34 +08:00
nettingsisyphus
96cde4f6b0 carry xattr when copying files to initramfs 2020-12-17 20:58:52 +08:00
9 changed files with 447 additions and 9 deletions

View File

@ -0,0 +1,33 @@
From 5d758194621ae40ef2b2613fd86101652114cbd3 Mon Sep 17 00:00:00 2001
From: Oleg Solovyov <mcpain@altlinux.org>
Date: Wed, 8 Dec 2021 19:15:47 +0300
Subject: [PATCH] drm: Retry setting scanout buffer on failure
Plymouth currently assumes that setting the scanout buffer will succeed.
if it fails because of a driver bug or transient failure it should try
again next frame.
This commit adds that error handling code.
---
src/plugins/renderers/drm/plugin.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/plugins/renderers/drm/plugin.c b/src/plugins/renderers/drm/plugin.c
index 02e9413..10711c6 100644
--- a/src/plugins/renderers/drm/plugin.c
+++ b/src/plugins/renderers/drm/plugin.c
@@ -1628,9 +1628,9 @@ reset_scan_out_buffer_if_needed (ply_renderer_backend_t *backend,
return false;
if (head->scan_out_buffer_needs_reset) {
- ply_renderer_head_set_scan_out_buffer (backend, head,
- head->scan_out_buffer_id);
- head->scan_out_buffer_needs_reset = false;
+ did_reset = ply_renderer_head_set_scan_out_buffer (backend, head,
+ head->scan_out_buffer_id);
+ head->scan_out_buffer_needs_reset = !did_reset;
return true;
}
--
2.35.1

View File

@ -0,0 +1,84 @@
From d32a748fe5c24d5cc3b3dd671a045102373dd392 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 28 Sep 2022 15:16:15 +0200
Subject: [PATCH 6/6] ply-device-manager: Also ignore SimpleDRM devs in
coldplug enumeration path
Plymouth has 2 hw discovery paths:
1. Enumerating devices already known by udev at plymouth startup
2. Devices which are hotplugged after startup
At boot we have udevd which is enumerating hw and plymouthd racing
with each other, which means that plymouthd may discover the new
SimpleDRM device through either 1. or 2.
Before this patch a check for SimpleDRM was missing from path 1, causing
it to be treated as a normal device instead of being ignored as intended:
plymouth-debug.log for the simpledrm being enumerated in path 1:
ply-device-manager.c:344: create_devices_for_subsystem:
found device /sys/devices/platform/simple-framebuffer.0/drm/card0
ply-device-manager.c:351: create_devices_for_subsystem:
device is initialized
ply-device-manager.c:360: create_devices_for_subsystem:
found node /dev/dri/card0
ply-device-manager.c:283: create_devices_for_udev_device:
found DRM device /dev/dri/card0
ply-device-manager.c:885: create_devices_for_terminal_and_rende:
creating devices for /dev/dri/card0 (renderer type: 1)
plymouth-debug.log for the simpledrm *not* being enumerated in path 1:
ply-device-manager.c:344: create_devices_for_subsystem:
found device /sys/devices/platform/simple-framebuffer.0/drm/card0
ply-device-manager.c:367: create_devices_for_subsystem:
it's not initialized
followed by path 2 enumerating the device very shortly after this:
ply-device-manager.c:532: on_udev_event:
got add event for device /dev/dri/card0
ply-device-manager.c:462: verify_add_or_change:
ignoring since we only handle SimpleDRM devices after timeout
Note how path 2 does correctly ignore SimpleDRM devices, where as
path 1 does not. This commit fixes this by moving the verify_drm_device()
check in to create_devices_for_udev_device() which runs in both paths.
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2127663
Reported-by: Michael Catanzaro <mcatanza@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
src/libply-splash-core/ply-device-manager.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/libply-splash-core/ply-device-manager.c b/src/libply-splash-core/ply-device-manager.c
index 23b8b37..820a282 100644
--- a/src/libply-splash-core/ply-device-manager.c
+++ b/src/libply-splash-core/ply-device-manager.c
@@ -314,6 +314,10 @@ create_devices_for_udev_device (ply_devi
ply_trace ("device subsystem is %s", subsystem);
if (subsystem != NULL && strcmp (subsystem, SUBSYSTEM_DRM) == 0) {
+ if (!manager->device_timeout_elapsed && !verify_drm_device (device)) {
+ ply_trace ("ignoring since we only handle SimpleDRM devices after timeout");
+ return false;
+ }
ply_trace ("found DRM device %s", device_path);
renderer_type = PLY_RENDERER_TYPE_DRM;
} else if (strcmp (subsystem, SUBSYSTEM_FRAME_BUFFER) == 0) {
@@ -457,11 +461,6 @@ verify_add_or_change (ply_device_manager
ply_trace ("ignoring since we're already using text splash for local console");
return false;
}
-
- if (!verify_drm_device (device)) {
- ply_trace ("ignoring since we only handle SimpleDRM devices after timeout");
- return false;
- }
} else {
ply_trace ("ignoring since we only handle subsystem %s devices after timeout", subsystem);
return false;
--
2.37.3

View File

@ -0,0 +1,104 @@
From f775a38aefa3797d3697330aea78b341914e59f5 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 28 Sep 2022 15:14:00 +0200
Subject: [PATCH 5/6] ply-device-manager: Move verify_drm_device() higher up in
the file
Move verify_drm_device() higher up in ply-device-manager.c, this is
a preparation patch for the next patch in this series.
This is a pure move without any changes to the moved block.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
src/libply-splash-core/ply-device-manager.c | 68 ++++++++++-----------
1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/src/libply-splash-core/ply-device-manager.c b/src/libply-splash-core/ply-device-manager.c
index cba2425..23b8b37 100644
--- a/src/libply-splash-core/ply-device-manager.c
+++ b/src/libply-splash-core/ply-device-manager.c
@@ -262,6 +262,40 @@ fb_device_has_drm_device (ply_device_manager_t *manager,
return has_drm_device;
}
+static bool
+verify_drm_device (struct udev_device *device)
+{
+ const char *id_path;
+
+ /*
+ * Simple-framebuffer devices driven by simpledrm lack information
+ * like panel-rotation info and physical size, causing the splash
+ * to briefly render on its side / without HiDPI scaling, switching
+ * to the correct rendering when the native driver loads.
+ * To avoid this treat simpledrm devices as fbdev devices and only
+ * use them after the timeout.
+ */
+ id_path = udev_device_get_property_value (device, "ID_PATH");
+ if (!ply_string_has_prefix (id_path, "platform-simple-framebuffer"))
+ return true; /* Not a SimpleDRM device */
+
+ /*
+ * With nomodeset, no native drivers will load, so SimpleDRM devices
+ * should be used immediately.
+ */
+ if (ply_kernel_command_line_has_argument ("nomodeset"))
+ return true;
+
+ /*
+ * Some firmwares leave the panel black at boot. Allow enabling SimpleDRM
+ * use from the cmdline to show something to the user ASAP.
+ */
+ if (ply_kernel_command_line_has_argument ("plymouth.use-simpledrm"))
+ return true;
+
+ return false;
+}
+
static bool
create_devices_for_udev_device (ply_device_manager_t *manager,
struct udev_device *device)
@@ -404,40 +438,6 @@ on_drm_udev_add_or_change (ply_device_manager_t *manager,
}
}
-static bool
-verify_drm_device (struct udev_device *device)
-{
- const char *id_path;
-
- /*
- * Simple-framebuffer devices driven by simpledrm lack information
- * like panel-rotation info and physical size, causing the splash
- * to briefly render on its side / without HiDPI scaling, switching
- * to the correct rendering when the native driver loads.
- * To avoid this treat simpledrm devices as fbdev devices and only
- * use them after the timeout.
- */
- id_path = udev_device_get_property_value (device, "ID_PATH");
- if (!ply_string_has_prefix (id_path, "platform-simple-framebuffer"))
- return true; /* Not a SimpleDRM device */
-
- /*
- * With nomodeset, no native drivers will load, so SimpleDRM devices
- * should be used immediately.
- */
- if (ply_kernel_command_line_has_argument ("nomodeset"))
- return true;
-
- /*
- * Some firmwares leave the panel black at boot. Allow enabling SimpleDRM
- * use from the cmdline to show something to the user ASAP.
- */
- if (ply_kernel_command_line_has_argument ("plymouth.use-simpledrm"))
- return true;
-
- return false;
-}
-
static bool
verify_add_or_change (ply_device_manager_t *manager,
const char *action,
--
2.37.3

View File

@ -0,0 +1,93 @@
From 83b385061ccbf5a46ea77f7f12c1c7bfc72a09f2 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 28 Feb 2022 16:07:11 +0100
Subject: [PATCH 4/4] ply-device-manager: Treat SimpleDRM drm devices as fbdev
devices
Simple-framebuffer devices driven by simpledrm lack information
like panel-rotation info and physical size, causing the splash
to briefly render on its side / without HiDPI scaling, switching
to the correct rendering when the native driver loads.
To avoid this treat simpledrm devices as fbdev devices and only
use them after the timeout.
Also adds 2 exceptions to this:
1. If nomodeset is passed on the kernel commandline then no native
drivers will load, so in this case it is best to immediately use
SimpleDRM devices when they are detected.
2. On some devics the firmware leave the panel black at boot. In this
case it is desirable to show the splash to the user ASAP so that there
is some visual feedback that the device is booting. Add a support for a
"plymouth.use-simpledrm" kernel cmdline option to show the splash
immediately on SimpleDRM devices rather then waiting for the native
driver to load.
Closes #167
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
src/libply-splash-core/ply-device-manager.c | 39 +++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/src/libply-splash-core/ply-device-manager.c b/src/libply-splash-core/ply-device-manager.c
index bb548ef..82b89f3 100644
--- a/src/libply-splash-core/ply-device-manager.c
+++ b/src/libply-splash-core/ply-device-manager.c
@@ -405,6 +405,40 @@ on_drm_udev_add_or_change (ply_device_manager_t *manager,
}
}
+static bool
+verify_drm_device (struct udev_device *device)
+{
+ const char *id_path;
+
+ /*
+ * Simple-framebuffer devices driven by simpledrm lack information
+ * like panel-rotation info and physical size, causing the splash
+ * to briefly render on its side / without HiDPI scaling, switching
+ * to the correct rendering when the native driver loads.
+ * To avoid this treat simpledrm devices as fbdev devices and only
+ * use them after the timeout.
+ */
+ id_path = udev_device_get_property_value (device, "ID_PATH");
+ if (!ply_string_has_prefix (id_path, "platform-simple-framebuffer"))
+ return true; /* Not a SimpleDRM device */
+
+ /*
+ * With nomodeset, no native drivers will load, so SimpleDRM devices
+ * should be used immediately.
+ */
+ if (ply_kernel_command_line_has_argument ("nomodeset"))
+ return true;
+
+ /*
+ * Some firmwares leave the panel black at boot. Allow enabling SimpleDRM
+ * use from the cmdline to show something to the user ASAP.
+ */
+ if (ply_kernel_command_line_has_argument ("plymouth.use-simpledrm"))
+ return true;
+
+ return false;
+}
+
static bool
verify_add_or_change (ply_device_manager_t *manager,
const char *action,
@@ -423,6 +457,11 @@ verify_add_or_change (ply_device_manager_t *manager,
ply_trace ("ignoring since we're already using text splash for local console");
return false;
}
+
+ if (!verify_drm_device (device)) {
+ ply_trace ("ignoring since we only handle SimpleDRM devices after timeout");
+ return false;
+ }
} else {
ply_trace ("ignoring since we only handle subsystem %s devices after timeout", subsystem);
return false;
--
2.35.1

View File

@ -0,0 +1,49 @@
From ab4238d54813561d3ad0e50684504d67e4c5ba96 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 7 Mar 2022 12:25:56 +0100
Subject: [PATCH 3/4] ply-utils: Reintroduce ply_string_has_prefix helper
ply_string_has_prefix was dropped in commit c7965ea19abf ("ply-utils:
Drop unused ply_string_has_prefix helper"). We have a need for this
helper again, so reintroduce it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
src/libply/ply-utils.c | 9 +++++++++
src/libply/ply-utils.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/src/libply/ply-utils.c b/src/libply/ply-utils.c
index f90ac40..f457579 100644
--- a/src/libply/ply-utils.c
+++ b/src/libply/ply-utils.c
@@ -459,6 +459,15 @@ ply_free_string_array (char **array)
free (array);
}
+bool
+ply_string_has_prefix (const char *str, const char *prefix)
+{
+ if (str == NULL || prefix == NULL)
+ return false;
+
+ return strncmp (str, prefix, strlen (prefix)) == 0;
+}
+
double
ply_get_timestamp (void)
{
diff --git a/src/libply/ply-utils.h b/src/libply/ply-utils.h
index 47bb3f2..7572cca 100644
--- a/src/libply/ply-utils.h
+++ b/src/libply/ply-utils.h
@@ -85,6 +85,7 @@ bool ply_fd_has_data (int fd);
bool ply_set_fd_as_blocking (int fd);
char **ply_copy_string_array (const char *const *array);
void ply_free_string_array (char **array);
+bool ply_string_has_prefix (const char *str, const char *prefix);
double ply_get_timestamp (void);
void ply_save_errno (void);
--
2.35.1

View File

@ -0,0 +1,26 @@
From 1b33543094337e1edf6b7806d0cffed5ea6b0629 Mon Sep 17 00:00:00 2001
From: Anakin Zhang <benjamin93@163.com>
Date: Thu, 24 Sep 2020 23:51:51 +0800
Subject: [PATCH] carry xattr when copying files to initramfs
Signed-off-by: Anakin Zhang <benjamin93@163.com>
---
scripts/plymouth-populate-initrd.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/plymouth-populate-initrd.in b/scripts/plymouth-populate-initrd.in
index 616ecc4..100724d 100644
--- a/scripts/plymouth-populate-initrd.in
+++ b/scripts/plymouth-populate-initrd.in
@@ -144,7 +144,7 @@ inst_simple() {
inst "${_src%/*}/.${_src##*/}.hmac" "${target%/*}/.${target##*/}.hmac"
fi
ddebug "Installing $_src"
- cp --sparse=always -pfL "$PLYMOUTH_SYSROOT$_src" "${initdir}/$target"
+ cp -a --sparse=always -pfL "$PLYMOUTH_SYSROOT$_src" "${initdir}/$target"
}
# find symlinks linked to given library file
--
2.23.0.windows.1

Binary file not shown.

BIN
plymouth-22.02.122.tar.gz Normal file

Binary file not shown.

View File

@ -1,17 +1,33 @@
# commit date: 20191013
%if %{?openEuler:1}0
%bcond_without graphics
%else
%bcond_with graphics
%endif
Name: plymouth
Version: 0.9.5
Version: 22.02.122
Release: 2
License: GPLv2+
Summary: Graphical Boot Animation and Logger
URL: https://www.freedesktop.org/wiki/Software/Plymouth
Source0: https://gitlab.freedesktop.org/plymouth/plymouth/-/archive/0.9.5/plymouth-0.9.5.tar.gz
Source0: https://gitlab.freedesktop.org/plymouth/plymouth/-/archive/%{version}/plymouth-%{version}.tar.gz
BuildRequires: gcc libtool libdrm-devel systemd-devel kernel-headers
BuildRequires: libpng-devel libxslt docbook-style-xsl gtk3-devel
BuildRequires: pango-devel cairo-devel gettext-devel intltool
Requires: system-logos findutils coreutils gzip cpio dracut
Patch0: backport-drm-Retry-setting-scanout-buffer-on-failure.patch
Patch1: backport-ply-utils-Reintroduce-ply_string_has_prefix-helper.patch
Patch2: backport-ply-device-manager-Treat-SimpleDRM-drm-devices-as-fb.patch
Patch3: backport-ply-device-manager-Move-verify_drm_device-higher-up-.patch
Patch4: backport-ply-device-manager-Also-ignore-SimpleDRM-devs-in-col.patch
Patch9000: carry-xattr-when-copying-files-to-initramfs.patch
BuildRequires: gcc libtool systemd-devel kernel-headers
BuildRequires: libxslt docbook-style-xsl gtk3-devel
BuildRequires: gettext-devel intltool
%if %{with graphics}
BuildRequires: libdrm-devel libpng-devel pango-devel cairo-devel
Requires: system-logos
%endif
Requires: findutils coreutils gzip cpio dracut
Provides: %{name}-system-theme %{name}-scripts %{name}-plugin-two-step
Provides: %{name}-graphics-libs %{name}-core-libs %{name}-plugin-fade-throbber
@ -96,6 +112,11 @@ autoreconf --install --symlink -Wno-portability
--disable-gdm-transition \
--enable-systemd-integration \
--without-system-root-install \
%if %{without graphics}
--disable-drm \
--disable-pango \
--without-udev \
%endif
--without-rhgb-compat-link
%make_build
@ -155,8 +176,12 @@ fi
%license COPYING
%dir %{_sysconfdir}/plymouth
%config(noreplace) %{_sysconfdir}/plymouth/plymouthd.conf
%if %{?openEuler:1}0
%dir %{_sysconfdir}/logrotate.d
%{_sysconfdir}/logrotate.d/bootlog
%config(noreplace) %{_sysconfdir}/logrotate.d/bootlog
%else
%exclude %config(noreplace) %{_sysconfdir}/logrotate.d/bootlog
%endif
%{_bindir}/plymouth
%{_sbindir}/plymouthd
@ -169,13 +194,16 @@ fi
%{_libdir}/libply-splash-graphics.so.*
%dir %{_libdir}/plymouth
%{_libdir}/plymouth/*.so
%if %{with graphics}
%{_libdir}/plymouth/renderers/drm*
%endif
%{_libdir}/plymouth/renderers/frame-buffer*
%dir %{_libexecdir}/plymouth
%{_libexecdir}/plymouth/plymouth-update-initrd
%{_libexecdir}/plymouth/plymouth-generate-initrd
%{_libexecdir}/plymouth/plymouth-populate-initrd
%{_libexecdir}/plymouth/plymouthd-fd-escrow
%dir %{_datadir}/plymouth
%{_datadir}/plymouth/plymouthd.defaults
@ -218,13 +246,34 @@ fi
%{_mandir}/man?/*
%changelog
* Tue May 07 2024 yanglu <yanglu72@h-partners.com> - 22.02.122-2
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:add noreplace to /etc/logrotate.d/bootlog
* Wed Nov 02 2022 yanglu <yanglu72@h-partners.com> - 22.02.122-1
- Type:requirement
- CVE:NA
- SUG:NA
- DESC:update plymouth version to 22.02.122
* Fri Jun 17 2022 gaihuiying <eaglegai@163.com> - 0.9.5-4
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:add macros to control if need libdrm, pango, libpng and if need to exclude bootlog
* Thu Dec 17 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.9.5-3
- carry xattr when copying files to initramfs
* Mon Sep 07 2020 lunankun <lunankun@huawei.com> - 0.9.5-2
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:fix source0 url
* Mon Aug 01 2020 yuboyun <yuboyun@huawei.com> - 0.9.5-1
* Mon Aug 03 2020 yuboyun <yuboyun@huawei.com> - 0.9.5-1
- Type:NA
- Id:NA
- SUG:NA