!2 [sync] PR-1: init package
From: @openeuler-sync-bot Reviewed-by: @leeffo Signed-off-by: @leeffo
This commit is contained in:
commit
bca22a8e71
92
update-xscreensaver-hacks
Normal file
92
update-xscreensaver-hacks
Normal file
@ -0,0 +1,92 @@
|
||||
#!/bin/bash
|
||||
|
||||
_SYSCONFDIR=${sysconfdir:-/etc}
|
||||
_PREFIX=${prefix:-/usr}
|
||||
_DATADIR=${datadir:-${_PREFIX}/share}
|
||||
|
||||
ADDIR=${ADDIR:-${install_prefix}${_SYSCONFDIR}/xscreensaver}
|
||||
CONFDIR=${CONFDIR:-${install_prefix}${_DATADIR}/xscreensaver/hacks.conf.d}
|
||||
ADFILE=${ADFILE:-$ADDIR/XScreenSaver.ad}
|
||||
|
||||
fix_hackconf ()
|
||||
{
|
||||
if [ ! -s $1 ] ; then
|
||||
echo "$1 is empty" >&2
|
||||
echo ""
|
||||
return 1
|
||||
fi
|
||||
|
||||
tmpconf=`mktemp /tmp/hackconf.XXXXXXXX`
|
||||
tmpconf_1=`mktemp /tmp/hackconf.XXXXXXXX`
|
||||
tmpconf_2=`mktemp /tmp/hackconf.XXXXXXXX`
|
||||
tmpconf_3=`mktemp /tmp/hackconf.XXXXXXXX`
|
||||
sed -n -e '$p' $1 > $tmpconf_1
|
||||
sed -e '$d' $1 > $tmpconf_2
|
||||
for file in $tmpconf_1 $tmpconf_2 ; do
|
||||
if ( [ -s $file ] && grep -q '\\n\(\|\\\)[^\\].*$' $file ) ; then
|
||||
rm -f $tmpconf $tmpconf_1 $tmpconf_2 $tmpconf_3
|
||||
echo ""
|
||||
echo "ignoring $1" >&2
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
if ! grep -q '\\n[\\]*$' $tmpconf_1 ; then
|
||||
sed -i -e 's|\(^.*$\)|\1 \\n\\|' $tmpconf_1
|
||||
fi
|
||||
sed -i -e 's|\\n$|\\n\\|' $tmpconf_1
|
||||
while [ -s $tmpconf_2 ] ; do
|
||||
sed -n -e '1p' $tmpconf_2 > $tmpconf_3
|
||||
sed -i -e '1d' $tmpconf_2
|
||||
if ! grep -q '\([ \t]\\$\|\\n\\$\)' $tmpconf_3 ; then
|
||||
rm -f $tmpconf $tmpconf_1 $tmpconf_2 $tmpconf_3
|
||||
echo ""
|
||||
echo "ignoring $1" >&2
|
||||
return 1
|
||||
fi
|
||||
cat $tmpconf_3 >> $tmpconf
|
||||
done
|
||||
cat $tmpconf_1 >> $tmpconf
|
||||
rm -f $tmpconf_1 $tmpconf_2 $tmpconf_3
|
||||
echo $tmpconf
|
||||
return 0
|
||||
|
||||
}
|
||||
|
||||
for suffix in header tail ; do
|
||||
if [ ! -r $ADDIR/XScreenSaver.ad.$suffix ] ; then
|
||||
echo "$ADDIR/XScreenSaver.ad.$suffix missing"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
tmpfile=`mktemp /tmp/XScreenSaver.ad.XXXXXXXX`
|
||||
|
||||
cat > $tmpfile <<EOF
|
||||
! Don't edit this file directly by yourself!!
|
||||
! This file is not meant to be edited directly.
|
||||
!
|
||||
! Instead, please edit /etc/xscreensaver/XScreenSaver.ad.header,
|
||||
! /etc/xscreensaver/XScreenSaver.ad.tail and add files under
|
||||
! /usr/share/xscreensaver/hacks.conf.d if you want.
|
||||
!
|
||||
! Then call /usr/sbin/update-xscreensaver-hacks to
|
||||
! update this file.
|
||||
!
|
||||
EOF
|
||||
|
||||
cat $ADDIR/XScreenSaver.ad.header >> $tmpfile
|
||||
|
||||
for hackconf in $CONFDIR/*.conf ; do
|
||||
hackconf_fixed=`fix_hackconf $hackconf`
|
||||
if [ -n "$hackconf_fixed" ] ; then
|
||||
cat $hackconf_fixed >> $tmpfile
|
||||
rm -f $hackconf_fixed
|
||||
fi
|
||||
done
|
||||
sed -i -e '$s|\\n\\$|\\n|' $tmpfile
|
||||
|
||||
cat $ADDIR/XScreenSaver.ad.tail >> $tmpfile
|
||||
install -c -p -m 644 $tmpfile $ADFILE
|
||||
rm -f $tmpfile
|
||||
|
||||
|
||||
84
xscreensaver-5.35-0101-XIO-print-C-backtrace-on-error.patch
Normal file
84
xscreensaver-5.35-0101-XIO-print-C-backtrace-on-error.patch
Normal file
@ -0,0 +1,84 @@
|
||||
From 735cc1af7595890d9cd567f36dabaf41fae4210e Mon Sep 17 00:00:00 2001
|
||||
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
|
||||
Date: Mon, 11 Jul 2016 16:53:14 +0900
|
||||
Subject: [PATCH] XIO: print C backtrace on error
|
||||
|
||||
For debugging purpose, show C backtrace with XIO
|
||||
error happens.
|
||||
---
|
||||
driver/xscreensaver.c | 41 +++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 41 insertions(+)
|
||||
|
||||
diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c
|
||||
index 76969f2..04c2669 100644
|
||||
--- a/driver/xscreensaver.c
|
||||
+++ b/driver/xscreensaver.c
|
||||
@@ -148,10 +148,15 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
+#include <features.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
+#ifdef __GNU_LIBRARY__
|
||||
+#include <execinfo.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef ENABLE_NLS
|
||||
# include <locale.h>
|
||||
# include <libintl.h>
|
||||
@@ -504,6 +509,41 @@ startup_ehandler (String name, String type, String class,
|
||||
exit (1);
|
||||
}
|
||||
|
||||
+static void
|
||||
+show_cstyle_backtrace(void)
|
||||
+{
|
||||
+#ifdef __GNU_LIBRARY__
|
||||
+ void *bt_array[128];
|
||||
+ size_t bt_size;
|
||||
+
|
||||
+ bt_size = backtrace(bt_array, countof(bt_array));
|
||||
+ fprintf(stderr, "C backtrace:\n");
|
||||
+ backtrace_symbols_fd(bt_array, bt_size, STDERR_FILENO);
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static int (*default_xio_ehandler)(Display *dpy) = 0;
|
||||
+
|
||||
+static int
|
||||
+show_debug_info_xio_ehandler(Display *dpy)
|
||||
+{
|
||||
+ show_cstyle_backtrace();
|
||||
+ if (default_xio_ehandler){
|
||||
+ (*default_xio_ehandler)(dpy);
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+hack_IOErrorHandler(void)
|
||||
+{
|
||||
+#ifdef __GNU_LIBRARY__
|
||||
+ XIOErrorHandler old_handler;
|
||||
+ old_handler = XSetIOErrorHandler(show_debug_info_xio_ehandler);
|
||||
+ default_xio_ehandler = old_handler;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
|
||||
/* The zillions of initializations.
|
||||
*/
|
||||
@@ -1570,6 +1610,7 @@ main (int argc, char **argv)
|
||||
|
||||
initialize_stderr (si);
|
||||
handle_signals (si);
|
||||
+ hack_IOErrorHandler();
|
||||
|
||||
make_splash_dialog (si);
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@ -0,0 +1,96 @@
|
||||
From 0d26e4514d7d6c90d2c5e35749c0b83121a66b77 Mon Sep 17 00:00:00 2001
|
||||
From: "mtasaka@fedoraproject.org" <mtasaka@fedoraproject.org>
|
||||
Date: Tue, 7 Feb 2017 16:40:52 +0900
|
||||
Subject: [PATCH] misc: kill gcc warn_unused_result warnings
|
||||
|
||||
Remove misc warnings generated gcc -Wall with
|
||||
"warning: ignoring return value of 'foo',
|
||||
declared with attribute warn_unused_result".
|
||||
|
||||
For setuid() and fgets(), really check the returned value.
|
||||
For system(), for now just use empty body to avoid this
|
||||
warning. Note that casting the result to (void) does not
|
||||
remove these warnings.
|
||||
---
|
||||
driver/demo-Gtk.c | 9 +++++++--
|
||||
hacks/glx/sonar-icmp.c | 2 +-
|
||||
hacks/glx/sonar.c | 5 +++--
|
||||
hacks/recanim.c | 6 +++++-
|
||||
4 files changed, 16 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c
|
||||
index f5c4839..7c34846 100644
|
||||
--- a/driver/demo-Gtk.c
|
||||
+++ b/driver/demo-Gtk.c
|
||||
@@ -4423,7 +4423,8 @@ kde_screensaver_active_p (void)
|
||||
FILE *p = popen ("dcop kdesktop KScreensaverIface isEnabled 2>/dev/null",
|
||||
"r");
|
||||
char buf[255];
|
||||
- fgets (buf, sizeof(buf)-1, p);
|
||||
+ if (!p) return False;
|
||||
+ if (!fgets (buf, sizeof(buf)-1, p)) return False;
|
||||
pclose (p);
|
||||
if (!strcmp (buf, "true\n"))
|
||||
return True;
|
||||
@@ -4434,7 +4435,11 @@ kde_screensaver_active_p (void)
|
||||
static void
|
||||
kill_kde_screensaver (void)
|
||||
{
|
||||
- system ("dcop kdesktop KScreensaverIface enable false");
|
||||
+ /* Use empty body to kill warning from gcc -Wall with
|
||||
+ "warning: ignoring return value of 'system',
|
||||
+ declared with attribute warn_unused_result"
|
||||
+ */
|
||||
+ if (system ("dcop kdesktop KScreensaverIface enable false")) {}
|
||||
}
|
||||
|
||||
|
||||
diff --git a/hacks/glx/sonar-icmp.c b/hacks/glx/sonar-icmp.c
|
||||
index 8256270..26eb90d 100644
|
||||
--- a/hacks/glx/sonar-icmp.c
|
||||
+++ b/hacks/glx/sonar-icmp.c
|
||||
@@ -1634,7 +1634,7 @@ sonar_init_ping (Display *dpy, char **error_ret, char **desc_ret,
|
||||
fprintf (stderr, "%s: unable to open icmp socket\n", progname);
|
||||
|
||||
/* Disavow privs */
|
||||
- setuid(getuid());
|
||||
+ if (setuid(getuid()) == -1) abort();
|
||||
|
||||
pd->pid = getpid() & 0xFFFF;
|
||||
pd->seq = 0;
|
||||
diff --git a/hacks/glx/sonar.c b/hacks/glx/sonar.c
|
||||
index f3a4d9d..2c6ca5b 100644
|
||||
--- a/hacks/glx/sonar.c
|
||||
+++ b/hacks/glx/sonar.c
|
||||
@@ -930,8 +930,9 @@ init_sensor (ModeInfo *mi)
|
||||
sp->ssd = sonar_init_ping (MI_DISPLAY (mi), &sp->error, &sp->desc,
|
||||
ping_arg, ping_timeout, resolve_p, times_p,
|
||||
debug_p);
|
||||
- else
|
||||
- setuid(getuid()); /* Disavow privs if not pinging. */
|
||||
+ else {
|
||||
+ if (setuid(getuid()) == -1) abort(); /* Disavow privs if not pinging. */
|
||||
+ }
|
||||
|
||||
sp->start_time = double_time (); /* for error message timing */
|
||||
|
||||
diff --git a/hacks/recanim.c b/hacks/recanim.c
|
||||
index 51379ed..a526c25 100644
|
||||
--- a/hacks/recanim.c
|
||||
+++ b/hacks/recanim.c
|
||||
@@ -324,7 +324,11 @@ screenhack_record_anim_free (record_anim_state *st)
|
||||
" 2>&-",
|
||||
fn);
|
||||
fprintf (stderr, "%s: exec: %s\n", progname, cmd);
|
||||
- system (cmd);
|
||||
+ /* Use empty body to kill warning from gcc -Wall with
|
||||
+ "warning: ignoring return value of 'system',
|
||||
+ declared with attribute warn_unused_result"
|
||||
+ */
|
||||
+ if (system (cmd)) {}
|
||||
|
||||
if (stat (fn, &s))
|
||||
{
|
||||
--
|
||||
2.9.3
|
||||
|
||||
@ -0,0 +1,126 @@
|
||||
From d8ba605b7779ce5d2fc893c44fc2986ecf176e47 Mon Sep 17 00:00:00 2001
|
||||
From: XScreenSaver owners <xscreensaver-owner@fedoraproject.org>
|
||||
Date: Wed, 9 Dec 2020 22:12:09 +0900
|
||||
Subject: [PATCH] barcode / glsnake: sanitize the names of modes
|
||||
|
||||
---
|
||||
hacks/barcode.c | 10 ----------
|
||||
hacks/glx/glsnake.c | 12 ++++++------
|
||||
2 files changed, 6 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/hacks/barcode.c b/hacks/barcode.c
|
||||
index 20c2f38..ba3e2b2 100644
|
||||
--- a/hacks/barcode.c
|
||||
+++ b/hacks/barcode.c
|
||||
@@ -122,8 +122,6 @@ static const char *words[] =
|
||||
"bird flu",
|
||||
"bliss",
|
||||
"bogosity",
|
||||
- "boobies",
|
||||
- "boobs",
|
||||
"booty",
|
||||
"bread",
|
||||
"brogrammers",
|
||||
@@ -139,7 +137,6 @@ static const char *words[] =
|
||||
"chocolate",
|
||||
"chupacabra",
|
||||
"CLONE",
|
||||
- "cock",
|
||||
"congress",
|
||||
"constriction",
|
||||
"contrition",
|
||||
@@ -184,7 +181,6 @@ static const char *words[] =
|
||||
"fear",
|
||||
"fever",
|
||||
"filth",
|
||||
- "flatulence",
|
||||
"fluff",
|
||||
"fnord",
|
||||
"followers",
|
||||
@@ -202,9 +198,7 @@ static const char *words[] =
|
||||
"happiness",
|
||||
"hate",
|
||||
"helplessness",
|
||||
- "hemorrhoid",
|
||||
"hermaphrodite",
|
||||
- "heroin",
|
||||
"heroine",
|
||||
"hope",
|
||||
"hysteria",
|
||||
@@ -286,7 +280,6 @@ static const char *words[] =
|
||||
"punishment",
|
||||
"punk rock",
|
||||
"punk",
|
||||
- "pussy",
|
||||
"quagmire",
|
||||
"quarantine",
|
||||
"quartz",
|
||||
@@ -295,7 +288,6 @@ static const char *words[] =
|
||||
"rage",
|
||||
"readout",
|
||||
"reality",
|
||||
- "rectum",
|
||||
"reject",
|
||||
"rejection",
|
||||
"respect",
|
||||
@@ -365,8 +357,6 @@ static const char *words[] =
|
||||
"venom",
|
||||
"verifiability",
|
||||
"very fine people",
|
||||
- "viagra",
|
||||
- "vibrator",
|
||||
"victim",
|
||||
"vignette",
|
||||
"villainy",
|
||||
diff --git a/hacks/glx/glsnake.c b/hacks/glx/glsnake.c
|
||||
index 8efc681..125df90 100644
|
||||
--- a/hacks/glx/glsnake.c
|
||||
+++ b/hacks/glx/glsnake.c
|
||||
@@ -539,7 +539,7 @@ static const struct model_s model[] = {
|
||||
PIN, ZERO, RIGHT, RIGHT, ZERO, PIN, PIN, ZERO, PIN, PIN, ZERO,
|
||||
RIGHT, ZERO }
|
||||
},
|
||||
- { "k's turd",
|
||||
+ { "caterpillar",
|
||||
{ RIGHT, RIGHT, PIN, RIGHT, LEFT, RIGHT, PIN, RIGHT, LEFT,
|
||||
RIGHT, PIN, RIGHT, LEFT, RIGHT, PIN, RIGHT, LEFT, RIGHT, PIN,
|
||||
RIGHT, LEFT, RIGHT, PIN, ZERO }
|
||||
@@ -564,22 +564,22 @@ static const struct model_s model[] = {
|
||||
ZERO, PIN, ZERO, ZERO, ZERO, ZERO, PIN, ZERO, ZERO, ZERO, ZERO,
|
||||
ZERO, ZERO, ZERO }
|
||||
},
|
||||
- { "kissy box",
|
||||
+ { "ribbon",
|
||||
{ PIN, ZERO, ZERO, ZERO, PIN, ZERO, ZERO, ZERO, ZERO, ZERO,
|
||||
ZERO, PIN, ZERO, ZERO, ZERO, ZERO, PIN, ZERO, ZERO, ZERO, ZERO,
|
||||
ZERO, PIN, ZERO }
|
||||
},
|
||||
- { "erect penis", /* thanks benno */
|
||||
+ { "shuffle board", /* thanks benno */
|
||||
{ PIN, ZERO, PIN, PIN, ZERO, ZERO, PIN, ZERO, ZERO, ZERO, PIN,
|
||||
PIN, ZERO, ZERO, ZERO, RIGHT, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO,
|
||||
ZERO, ZERO }
|
||||
},
|
||||
- { "flaccid penis",
|
||||
+ { "anchor",
|
||||
{ PIN, ZERO, PIN, PIN, ZERO, ZERO, PIN, ZERO, ZERO, ZERO, PIN,
|
||||
PIN, ZERO, ZERO, ZERO, RIGHT, PIN, ZERO, ZERO, ZERO, ZERO, ZERO,
|
||||
ZERO, ZERO }
|
||||
},
|
||||
- { "vagina",
|
||||
+ { "engagement ring",
|
||||
{ RIGHT, ZERO, ZERO, ZERO, RIGHT, ZERO, ZERO, PIN, ZERO, ZERO,
|
||||
LEFT, ZERO, ZERO, ZERO, LEFT, ZERO, LEFT, PIN, LEFT, PIN, RIGHT,
|
||||
PIN, RIGHT, ZERO }
|
||||
@@ -999,7 +999,7 @@ static const struct model_s model[] = {
|
||||
{ "Parrot",
|
||||
{ ZERO, ZERO, ZERO, ZERO, RIGHT, RIGHT, ZERO, LEFT, PIN, RIGHT, ZERO, RIGHT, ZERO, RIGHT, ZERO, RIGHT, PIN, LEFT, ZERO, RIGHT, LEFT, ZERO, PIN, ZERO }
|
||||
},
|
||||
- { "Penis",
|
||||
+ { "Shuttle",
|
||||
{ PIN, PIN, RIGHT, ZERO, PIN, PIN, ZERO, PIN, ZERO, ZERO, RIGHT, PIN, LEFT, ZERO, ZERO, PIN, ZERO, PIN, PIN, ZERO, LEFT, PIN, PIN, ZERO }
|
||||
},
|
||||
{ "PictureComingSoon",
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
From ef72c9500015a36bf0b4b412337ec2d890d092b6 Mon Sep 17 00:00:00 2001
|
||||
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
|
||||
Date: Fri, 2 Apr 2021 18:46:14 +0900
|
||||
Subject: [PATCH] screensaver_id: search parenthesis first for searching year
|
||||
|
||||
Fedora package modifies screensaver_id string to %%version-%%release .
|
||||
Adjust window_init function so that "year" information is
|
||||
parsed correctly.
|
||||
---
|
||||
driver/dialog.c | 4 +++-
|
||||
driver/xscreensaver-systemd.c | 4 +++-
|
||||
3 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/driver/dialog.c b/driver/dialog.c
|
||||
index fce74c4..9a8173f 100644
|
||||
--- a/driver/dialog.c
|
||||
+++ b/driver/dialog.c
|
||||
@@ -949,8 +949,10 @@ window_init (Widget root_widget, Bool splash_p)
|
||||
/* Put the version number in the label. */
|
||||
{
|
||||
char *version = strdup (screensaver_id + 17);
|
||||
- char *year = strchr (version, '-');
|
||||
+ char *year;
|
||||
char *s = strchr (version, ' ');
|
||||
+ year = strchr (version, '('); /* Search parenthesis first */
|
||||
+ year = strchr (year, '-');
|
||||
*s = 0;
|
||||
year = strchr (year+1, '-') + 1;
|
||||
s = strchr (year, ')');
|
||||
diff --git a/driver/xscreensaver-systemd.c b/driver/xscreensaver-systemd.c
|
||||
index d06174a..c9a66a1 100644
|
||||
--- a/driver/xscreensaver-systemd.c
|
||||
+++ b/driver/xscreensaver-systemd.c
|
||||
@@ -950,8 +950,10 @@ main (int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
char *version = strdup (screensaver_id + 17);
|
||||
- char *year = strchr (version, '-');
|
||||
+ char *year;
|
||||
char *s = strchr (version, ' ');
|
||||
+ year = strchr (version, '('); /* Search parenthesis first */
|
||||
+ year = strchr (year, '-');
|
||||
*s = 0;
|
||||
year = strchr (year+1, '-') + 1;
|
||||
s = strchr (year, ')');
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From 13e1203d8cc00a8462dbd2656257b46b411b2854 Mon Sep 17 00:00:00 2001
|
||||
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
|
||||
Date: Mon, 3 May 2021 15:00:31 +0900
|
||||
Subject: [PATCH] dialog.c: window_init: show more version string
|
||||
|
||||
Fedora modifies version string to "6.00-1.fc34" to show rpm "release", for example.
|
||||
Let's allow more length for version string for password dialog.
|
||||
---
|
||||
driver/dialog.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/driver/dialog.c b/driver/dialog.c
|
||||
index 9a8173f..3020880 100644
|
||||
--- a/driver/dialog.c
|
||||
+++ b/driver/dialog.c
|
||||
@@ -959,7 +959,7 @@ window_init (Widget root_widget, Bool splash_p)
|
||||
*s = 0;
|
||||
ws->heading_label = (char *) malloc (100);
|
||||
ws->version = strdup(version);
|
||||
- sprintf (ws->heading_label, "XScreenSaver %.4s, v%.10s", year, version);
|
||||
+ sprintf (ws->heading_label, "XScreenSaver %.4s, v%.14s", year, version);
|
||||
|
||||
if (splash_p)
|
||||
{
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From a29509f696227073ecf6a6c74a7b5c45bc21880c Mon Sep 17 00:00:00 2001
|
||||
From: XScreenSaver owners <xscreensaver-owner@fedoraproject.org>
|
||||
Date: Wed, 15 Feb 2023 17:25:16 +0900
|
||||
Subject: [PATCH] switch_page_cb: backport debian fix for DPMS settings issue
|
||||
|
||||
Backport: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031076
|
||||
Fix the issue that dpms enabled_p option is not preserved
|
||||
correctly.
|
||||
---
|
||||
driver/demo-Gtk.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c
|
||||
index a84b420..baacf31 100644
|
||||
--- a/driver/demo-Gtk.c
|
||||
+++ b/driver/demo-Gtk.c
|
||||
@@ -1677,6 +1677,7 @@ switch_page_cb (GtkNotebook *notebook, GtkWidget *page,
|
||||
state *s = &win->state;
|
||||
|
||||
if (s->debug_p) fprintf (stderr, "%s: tab changed\n", blurb());
|
||||
+ populate_prefs_page (s);
|
||||
pref_changed_cb (GTK_WIDGET (notebook), user_data);
|
||||
|
||||
/* If we're switching to page 0, schedule the current hack to be run.
|
||||
--
|
||||
2.39.2
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
From 8299606b2c4b707ef759eb97a7cd5e1e38d2f186 Mon Sep 17 00:00:00 2001
|
||||
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
|
||||
Date: Thu, 2 Mar 2023 21:44:14 +0900
|
||||
Subject: [PATCH] distort_reset: restrict radius by xgwa correctly
|
||||
|
||||
new_rnd_coo() sets st->xy_coo[k].x and y, which calculates
|
||||
the reminder of division, and this requires
|
||||
both `st->xgwa.width-2*st->radius` and `st->xgwa.height-2*st->radius`
|
||||
must be positive.
|
||||
|
||||
Otherwise, st->xy_coo[k].x or y can be negative, then plain_draw() passes
|
||||
negative value to x or y for st->draw_routine(), then in st->draw_rountine()
|
||||
(actually this is fast_draw_32() or so) segfault can happen.
|
||||
|
||||
So restrict st->radius value correctly so that st->radius is
|
||||
smaller than min { st->xgwa.height, st->xgwa.width } / 2.
|
||||
|
||||
- fix ternary operator result so that lesser value is chosen
|
||||
- avoid zero division - if st->radius is exactly the half of the chosen value
|
||||
above, st->xgwa.width-2*st->radius (or height side) gets 0, which causes
|
||||
zero division, so choose lesser value than 1/2 - now chose 2/5.
|
||||
---
|
||||
hacks/distort.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hacks/distort.c b/hacks/distort.c
|
||||
index fd605f6..2795119 100644
|
||||
--- a/hacks/distort.c
|
||||
+++ b/hacks/distort.c
|
||||
@@ -243,7 +243,7 @@ distort_reset (struct state *st)
|
||||
*/
|
||||
{
|
||||
int max = (st->xgwa.width > st->xgwa.height
|
||||
- ? st->xgwa.width : st->xgwa.height) / (2 * st->number);
|
||||
+ ? st->xgwa.height : st->xgwa.width) * 2 / (5 * st->number);
|
||||
if (st->radius > max) st->radius = max;
|
||||
}
|
||||
|
||||
--
|
||||
2.39.2
|
||||
|
||||
55
xscreensaver-6.06-webcollage-default-nonet.patch
Normal file
55
xscreensaver-6.06-webcollage-default-nonet.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From 585252a63804d1cea0271fe29ef33476d1127a4f Mon Sep 17 00:00:00 2001
|
||||
From: XScreenSaver owners <xscreensaver-owner@fedoraproject.org>
|
||||
Date: Sat, 22 Oct 2022 23:48:23 +0900
|
||||
Subject: [PATCH] # Change webcollage not to access to net # Also see bug
|
||||
472061
|
||||
|
||||
---
|
||||
hacks/config/webcollage.xml | 7 +++++++
|
||||
hacks/webcollage.man | 5 +++++
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/hacks/config/webcollage.xml b/hacks/config/webcollage.xml
|
||||
index a2acab7..1db7aa5 100644
|
||||
--- a/hacks/config/webcollage.xml
|
||||
+++ b/hacks/config/webcollage.xml
|
||||
@@ -26,6 +26,8 @@
|
||||
</vgroup>
|
||||
</hgroup>
|
||||
|
||||
+ <file id="dir" _label="Image directory" arg="-directory %"/>
|
||||
+
|
||||
<xscreensaver-updater />
|
||||
|
||||
<_description>
|
||||
@@ -44,6 +46,11 @@ Please act accordingly.
|
||||
|
||||
See also https://www.jwz.org/webcollage/
|
||||
|
||||
+NOTE:
|
||||
+Webcollage on Fedora does not connect to internet by default
|
||||
+and uses image files on your local disk. If you want webcollage to
|
||||
+search for image files on net, use webcollage.original .
|
||||
+
|
||||
Written by Jamie Zawinski; 1998.
|
||||
</_description>
|
||||
</screensaver>
|
||||
diff --git a/hacks/webcollage.man b/hacks/webcollage.man
|
||||
index 85255b5..fadcd20 100644
|
||||
--- a/hacks/webcollage.man
|
||||
+++ b/hacks/webcollage.man
|
||||
@@ -176,6 +176,11 @@ the given directory.
|
||||
.TP 8
|
||||
.B \-\-fps
|
||||
Display the current frame rate and CPU load (MacOS only).
|
||||
+.SH NOTES FOR FEDORA USER
|
||||
+Webcollage on Fedora uses '-directory' option by default, so it
|
||||
+.B does not connect to internet
|
||||
+and uses image files on your local disk. If you want webcollage to
|
||||
+search for image files on net, use webcollage.original .
|
||||
.SH ENVIRONMENT
|
||||
.PP
|
||||
.TP 8
|
||||
--
|
||||
2.38.1
|
||||
|
||||
BIN
xscreensaver-6.06.tar.gz
Normal file
BIN
xscreensaver-6.06.tar.gz
Normal file
Binary file not shown.
10
xscreensaver-autostart
Normal file
10
xscreensaver-autostart
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Don't launch xscreensaver if gnome-screensaver
|
||||
# is installed
|
||||
|
||||
if [ -x /usr/bin/gnome-screensaver ] ; then exit 0 ; fi
|
||||
if [ -x /usr/bin/mate-screensaver ] ; then exit 0 ; fi
|
||||
if [ -x /usr/bin/xfce4-screensaver ] ; then exit 0 ; fi
|
||||
|
||||
exec xscreensaver -nosplash
|
||||
6
xscreensaver-autostart.desktop
Normal file
6
xscreensaver-autostart.desktop
Normal file
@ -0,0 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=xscreensaver-autostart
|
||||
Comment=Autostart xscreensaver
|
||||
Exec=/usr/libexec/xscreensaver-autostart
|
||||
Terminal=false
|
||||
28
xscreensaver-newlogin-wrapper
Normal file
28
xscreensaver-newlogin-wrapper
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
is_process_running_p()
|
||||
{
|
||||
pidid=$(pidof "$1" | sed -e 's|[ \t].*||')
|
||||
if [ "x${pidid}" == "x" ] ; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
check_manager_and_exec() {
|
||||
is_process_running_p "$1" || return
|
||||
exec $2
|
||||
}
|
||||
|
||||
check_manager_and_exec "lxdm-binary" "lxdm -c USER_SWITCH" # LXDE
|
||||
check_manager_and_exec "lightdm" "dm-tool switch-to-greeter" # XFCE and etc
|
||||
check_manager_and_exec "gdm" "gdmflexiserver -ls" # GNOME
|
||||
# KDE-like
|
||||
check_manager_and_exec "sddm" \
|
||||
"qdbus --system org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.SwitchToGreeter"
|
||||
|
||||
|
||||
# No registered login manager found
|
||||
exit 1
|
||||
|
||||
1116
xscreensaver.spec
Normal file
1116
xscreensaver.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user