Accepting request 993084 from home:qzhao:branches:Base:System

- Update to version 0.9.5~git20220803.52b0494:
  src: Run through uncrustify.
  scripts: Diff less.
  scripts: Update uncrustify config.
  src: Drop vim: lines.
  ply-utils: Drop linux/fs.h include.
  scripts: Add -B to interdiff in check-format.
- Rebase plymouth-log-on-default.patch;
- Rebase plymouth-screen-twice-scale-on-160DPI-higher.patch;

OBS-URL: https://build.opensuse.org/request/show/993084
OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=339
This commit is contained in:
Cliff Zhao 2022-08-04 13:38:06 +00:00 committed by Git OBS Bridge
parent b2feb11a91
commit 3a49828aeb
6 changed files with 126 additions and 99 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:772d411bc76b85e80fdcf331aede22d783ce4c5bb4283878ea97a712bc922756
size 6378912

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:134afdd9c224dbd14ce04b14e9a1894d58bd48558d8eda33be7f30d59fe60e24
size 6915544

View File

@ -1,6 +1,6 @@
diff -Nura plymouth-0.9.5~git20220412.e960111/src/libply/ply-buffer.c plymouth-0.9.5~git20220412.e960111_new/src/libply/ply-buffer.c
--- plymouth-0.9.5~git20220412.e960111/src/libply/ply-buffer.c 2022-04-15 16:39:24.000000000 +0800
+++ plymouth-0.9.5~git20220412.e960111_new/src/libply/ply-buffer.c 2022-05-07 12:10:27.891589631 +0800
diff -Nura plymouth-0.9.5~git20220801.eb1b893/src/libply/ply-buffer.c plymouth-0.9.5~git20220801.eb1b893_new/src/libply/ply-buffer.c
--- plymouth-0.9.5~git20220801.eb1b893/src/libply/ply-buffer.c 2022-04-15 16:39:24.000000000 +0800
+++ plymouth-0.9.5~git20220801.eb1b893_new/src/libply/ply-buffer.c 2022-08-04 16:27:35.810694440 +0800
@@ -46,6 +46,10 @@
#define PLY_BUFFER_MAX_BUFFER_CAPACITY (255 * 4096)
#endif
@ -33,20 +33,10 @@ diff -Nura plymouth-0.9.5~git20220412.e960111/src/libply/ply-buffer.c plymouth-0
void
ply_buffer_remove_bytes (ply_buffer_t *buffer,
size_t bytes_to_remove)
@@ -195,6 +213,36 @@
ply_buffer_remove_bytes (buffer, length);
@@ -205,6 +223,38 @@
}
+ assert (buffer->size + length < buffer->capacity);
+
+ memcpy (buffer->data + buffer->size,
+ bytes, length);
+
+ buffer->size += length;
+ buffer->data[buffer->size] = '\0';
+}
+
+void
void
+ply_buffer_append_log_bytes (ply_buffer_t *buffer,
+ const void *bytes_in,
+ size_t length)
@ -57,27 +47,38 @@ diff -Nura plymouth-0.9.5~git20220412.e960111/src/libply/ply-buffer.c plymouth-0
+
+ const uint8_t *bytes = bytes_in;
+
+ if (length > PLY_BUFFER_MAX_BUFFER_CAPACITY) {
+ if (length > PLY_BUFFER_MAX_BUFFER_CAPACITY)
+ {
+ bytes += length - (PLY_BUFFER_MAX_BUFFER_CAPACITY - 1);
+ length = (PLY_BUFFER_MAX_BUFFER_CAPACITY - 1);
+ }
+
+ while ((buffer->size + length) >= buffer->capacity) {
+ while ((buffer->size + length) >= buffer->capacity)
+ {
+ if (!ply_buffer_increase_log_capacity (buffer))
+ ply_buffer_remove_bytes (buffer, length);
+ }
+
assert (buffer->size + length < buffer->capacity);
memcpy (buffer->data + buffer->size,
diff -Nura plymouth-0.9.5~git20220412.e960111/src/libply/ply-buffer.h plymouth-0.9.5~git20220412.e960111_new/src/libply/ply-buffer.h
--- plymouth-0.9.5~git20220412.e960111/src/libply/ply-buffer.h 2022-04-15 16:39:24.000000000 +0800
+++ plymouth-0.9.5~git20220412.e960111_new/src/libply/ply-buffer.h 2022-05-07 12:10:27.892589638 +0800
@@ -34,7 +34,10 @@
void ply_buffer_append_bytes (ply_buffer_t *buffer,
+ assert (buffer->size + length < buffer->capacity);
+
+ memcpy (buffer->data + buffer->size,
+ bytes, length);
+
+ buffer->size += length;
+ buffer->data[buffer->size] = '\0';
+}
+
+void
ply_buffer_append_from_fd (ply_buffer_t *buffer,
int fd)
{
diff -Nura plymouth-0.9.5~git20220801.eb1b893/src/libply/ply-buffer.h plymouth-0.9.5~git20220801.eb1b893_new/src/libply/ply-buffer.h
--- plymouth-0.9.5~git20220801.eb1b893/src/libply/ply-buffer.h 2022-04-15 16:39:24.000000000 +0800
+++ plymouth-0.9.5~git20220801.eb1b893_new/src/libply/ply-buffer.h 2022-08-04 16:27:35.810694440 +0800
@@ -35,6 +35,10 @@
const void *bytes,
size_t number_of_bytes);
-
+void ply_buffer_append_log_bytes (ply_buffer_t *buffer,
+ const void *bytes,
+ size_t length);
@ -85,9 +86,9 @@ diff -Nura plymouth-0.9.5~git20220412.e960111/src/libply/ply-buffer.h plymouth-0
void ply_buffer_append_from_fd (ply_buffer_t *buffer,
int fd);
#define ply_buffer_append(buffer, format, args ...) \
diff -Nura plymouth-0.9.5~git20220412.e960111/src/main.c plymouth-0.9.5~git20220412.e960111_new/src/main.c
--- plymouth-0.9.5~git20220412.e960111/src/main.c 2022-04-15 16:39:24.000000000 +0800
+++ plymouth-0.9.5~git20220412.e960111_new/src/main.c 2022-05-07 12:10:27.892589638 +0800
diff -Nura plymouth-0.9.5~git20220801.eb1b893/src/main.c plymouth-0.9.5~git20220801.eb1b893_new/src/main.c
--- plymouth-0.9.5~git20220801.eb1b893/src/main.c 2022-08-02 21:28:28.000000000 +0800
+++ plymouth-0.9.5~git20220801.eb1b893_new/src/main.c 2022-08-04 17:37:22.768631505 +0800
@@ -1225,8 +1225,7 @@
}
@ -95,22 +96,21 @@ diff -Nura plymouth-0.9.5~git20220412.e960111/src/main.c plymouth-0.9.5~git20220
- if (ply_kernel_command_line_has_argument ("plymouth.debug"))
- ply_logger_close_file (ply_logger_get_error_default ());
+ ply_logger_close_file (ply_logger_get_error_default ());
}
@@ -1854,71 +1853,39 @@
}
static void
@@ -1853,77 +1852,42 @@
state->is_attached = false;
}
-static void
-check_verbosity (state_t *state)
+initialize_debug (state_t *state)
+static void initialize_debug (state_t *state)
{
- char *stream;
-
- ply_trace ("checking if tracing should be enabled");
+ if (!ply_is_tracing ())
+ ply_toggle_tracing ();
-
- if (!debug_buffer_path)
- debug_buffer_path = ply_kernel_command_line_get_key_value ("plymouth.debug=file:");
-
@ -140,17 +140,39 @@ diff -Nura plymouth-0.9.5~git20220412.e960111/src/main.c plymouth-0.9.5~git20220
- char *file;
-
- device = state->default_tty;
+ if (debug_buffer == NULL)
+ debug_buffer = ply_buffer_new ();
-
- ply_trace ("redirecting debug output to %s", device);
-
- if (strncmp (device, "/dev/", strlen ("/dev/")) == 0)
- file = strdup (device);
- else
- asprintf (&file, "/dev/%s", device);
-
+ if (!ply_is_tracing ())
+ ply_toggle_tracing ();
- fd = open (file, O_RDWR | O_APPEND);
+ if (debug_buffer == NULL)
+ debug_buffer = ply_buffer_new ();
- if (fd < 0)
- ply_trace ("could not redirected debug output to %s: %m", device);
- else
- ply_logger_set_output_fd (ply_logger_get_error_default (), fd);
-
- free (file);
- }
- } else {
- ply_trace ("tracing shouldn't be enabled!");
- }
-
- if (debug_buffer != NULL) {
- if (debug_buffer_path == NULL) {
- if (state->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN ||
- state->mode == PLY_BOOT_SPLASH_MODE_REBOOT)
- debug_buffer_path = strdup (PLYMOUTH_LOG_DIRECTORY "/plymouth-shutdown-debug.log");
- else
- debug_buffer_path = strdup (PLYMOUTH_LOG_DIRECTORY "/plymouth-debug.log");
- }
+ char *stream = ply_kernel_command_line_get_key_value ("plymouth.debug=stream:");
+ if (stream != NULL)
+ {
@ -161,41 +183,33 @@ diff -Nura plymouth-0.9.5~git20220412.e960111/src/main.c plymouth-0.9.5~git20220
+ ply_logger_set_output_fd (ply_logger_get_error_default (), fd);
+ free (stream);
+ }
- if (fd < 0)
- ply_trace ("could not redirected debug output to %s: %m", device);
- else
- ply_logger_set_output_fd (ply_logger_get_error_default (), fd);
+
+ if (!debug_buffer_path)
+ debug_buffer_path = ply_kernel_command_line_get_key_value ("plymouth.debug=file:");
- free (file);
- }
- } else {
- ply_trace ("tracing shouldn't be enabled!");
+
+ if (debug_buffer_path == NULL)
+ {
+ if (state->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN || state->mode == PLY_BOOT_SPLASH_MODE_REBOOT)
+ debug_buffer_path = strdup (PLYMOUTH_LOG_DIRECTORY "/plymouth-shutdown-debug.log");
+ else
+ debug_buffer_path = strdup (PLYMOUTH_LOG_DIRECTORY "/plymouth-debug.log");
}
+ }
- if (debug_buffer != NULL) {
- if (debug_buffer_path == NULL) {
- if (state->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN ||
- state->mode == PLY_BOOT_SPLASH_MODE_REBOOT)
- debug_buffer_path = strdup (PLYMOUTH_LOG_DIRECTORY "/plymouth-shutdown-debug.log");
- else
- debug_buffer_path = strdup (PLYMOUTH_LOG_DIRECTORY "/plymouth-debug.log");
- ply_logger_add_filter (ply_logger_get_error_default (),
- (ply_logger_filter_handler_t)
- on_error_message,
- debug_buffer);
- }
-
+ if (debug_buffer != NULL)
+ {
ply_logger_add_filter (ply_logger_get_error_default (),
(ply_logger_filter_handler_t)
on_error_message,
@@ -2007,7 +1974,7 @@
+ ply_logger_add_filter (ply_logger_get_error_default (),
+ (ply_logger_filter_handler_t) on_error_message,
+ debug_buffer);
+ }
}
static void
@@ -2007,7 +1971,7 @@
}
}
@ -204,7 +218,7 @@ diff -Nura plymouth-0.9.5~git20220412.e960111/src/main.c plymouth-0.9.5~git20220
check_logging (state);
ply_trace ("source built on %s", __DATE__);
@@ -2033,7 +2000,7 @@
@@ -2033,7 +1997,7 @@
const void *bytes,
size_t number_of_bytes)
{
@ -213,7 +227,7 @@ diff -Nura plymouth-0.9.5~git20220412.e960111/src/main.c plymouth-0.9.5~git20220
}
static void
@@ -2156,7 +2123,7 @@
@@ -2156,7 +2120,7 @@
bool should_help = false;
bool no_boot_log = false;
bool no_daemon = false;

View File

@ -1,7 +1,7 @@
diff -Nura plymouth-0.9.5~git20220412.e960111/src/libply/ply-utils.c plymouth-0.9.5~git20220412.e960111_new/src/libply/ply-utils.c
--- plymouth-0.9.5~git20220412.e960111/src/libply/ply-utils.c 2022-04-15 16:39:24.000000000 +0800
+++ plymouth-0.9.5~git20220412.e960111_new/src/libply/ply-utils.c 2022-05-13 18:34:30.249211696 +0800
@@ -861,7 +861,7 @@
diff -Nura plymouth-0.9.5~git20220801.eb1b893/src/libply/ply-utils.c plymouth-0.9.5~git20220801.eb1b893_new/src/libply/ply-utils.c
--- plymouth-0.9.5~git20220801.eb1b893/src/libply/ply-utils.c 2022-08-02 21:28:28.000000000 +0800
+++ plymouth-0.9.5~git20220801.eb1b893_new/src/libply/ply-utils.c 2022-08-04 17:51:09.943348306 +0800
@@ -862,7 +862,7 @@
}
/* The minimum resolution at which we turn on a device-scale of 2 */
@ -10,7 +10,7 @@ diff -Nura plymouth-0.9.5~git20220412.e960111/src/libply/ply-utils.c plymouth-0.
#define HIDPI_MIN_HEIGHT 1200
int
@@ -873,8 +873,20 @@
@@ -874,8 +874,20 @@
int device_scale;
double dpi_x, dpi_y;
const char *force_device_scale;
@ -32,7 +32,7 @@ diff -Nura plymouth-0.9.5~git20220412.e960111/src/libply/ply-utils.c plymouth-0.
if ((force_device_scale = getenv ("PLYMOUTH_FORCE_SCALE")))
return strtoul (force_device_scale, NULL, 0);
@@ -893,14 +905,10 @@
@@ -894,14 +906,10 @@
(width_mm == 16 && height_mm == 10))
return 1;
@ -40,8 +40,8 @@ diff -Nura plymouth-0.9.5~git20220412.e960111/src/libply/ply-utils.c plymouth-0.
- dpi_x = (double) width / (width_mm / 25.4);
- dpi_y = (double) height / (height_mm / 25.4);
- /* We don't completely trust these values so both
- must be high, and never pick higher ratio than
- 2 automatically */
- * must be high, and never pick higher ratio than
- * 2 automatically */
- if (dpi_x > HIDPI_LIMIT && dpi_y > HIDPI_LIMIT)
- device_scale = 2;
+ if (dpi_x > HIDPI_TWICE_LIMIT && dpi_y > HIDPI_TWICE_LIMIT)

View File

@ -1,8 +1,21 @@
-------------------------------------------------------------------
Thu Aug 4 01:50:22 UTC 2022 - Cliff Zhao <qzhao@suse.com>
- Update to version 0.9.5~git20220803.52b0494:
src: Run through uncrustify.
scripts: Diff less.
scripts: Update uncrustify config.
src: Drop vim: lines.
ply-utils: Drop linux/fs.h include.
scripts: Add -B to interdiff in check-format.
- Rebase plymouth-log-on-default.patch;
- Rebase plymouth-screen-twice-scale-on-160DPI-higher.patch;
-------------------------------------------------------------------
Wed Jul 20 03:50:22 UTC 2022 - Cliff Zhao <qzhao@suse.com>
- Update to version 0.9.5~git20220719.9e72df3:
* Make use of standard --runstatedir flag vs custom --with-runtimedir
Make use of standard --runstatedir flag vs custom --with-runtimedir
-------------------------------------------------------------------
Mon Jul 11 13:01:49 UTC 2022 - Fabian Vogt <fvogt@suse.com>

View File

@ -23,7 +23,7 @@
%global soversion 5
Name: plymouth
Version: 0.9.5~git20220719.9e72df3
Version: 0.9.5~git20220803.52b0494
Release: 0
Summary: Graphical Boot Animation and Logger
License: GPL-2.0-or-later