:: Re: [DNG] xscreensaver issues (incl…
Top Pagina
Delete this message
Reply to this message
Auteur: Rainer Weikusat
Datum:  
Aan: dng
Onderwerp: Re: [DNG] xscreensaver issues (including hardcoded DEBIAN!)
Adam Borowski <kilobyte@???> writes:
> On Fri, Apr 01, 2016 at 12:58:23PM -0400, Boruch Baum wrote:
>> Just looking at issues with the devuan default desktop's screensave, and
>> its config file: ~/.xscreensaver file, posted here for the attention of
>> the maintainers and the interest of members of the list.
>>
>> 1] Obnoxious nag messages - All logins to the devuan default desktop
>> begin with not one but two separate nag messages from xscreensaver. The
>> first "warns" the user that the version is out of date. The second
>> "warns" the user that the sysadmin is doing a dis-service by keeping it
>> out of date.
>>
>> 2] forced config screen - after the two obnoxious nag messages, one is
>> forced to be confronted with the xscreensaver customization screen
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819703


Oh wow. It's incredible to which degree people go out of their way just
to be obnoxious. Below is a patch removing every trace of this
nonsense.

---
diff -pru xscreensaver-5.30/driver/demo-Gtk.c xscreensaver-5.30.p/driver/demo-Gtk.c
--- xscreensaver-5.30/driver/demo-Gtk.c    2014-06-04 10:30:47.000000000 +0100
+++ xscreensaver-5.30.p/driver/demo-Gtk.c    2016-04-02 17:25:16.550205544 +0100
@@ -5291,21 +5291,6 @@ main (int argc, char **argv)
   if (! s->debug_p)
     the_network_is_not_the_computer (s);


-
-  if (senescent_p())
-    warning_dialog (s->toplevel_widget,
-      _("Warning:\n\n"
-        "This version of xscreensaver is VERY OLD!\n"
-        "Please upgrade!\n"
-        "\n"
-        "http://www.jwz.org/xscreensaver/\n"
-        "\n"
-        "(If this is the latest version that your distro ships, then\n"
-        "your distro is doing you a disservice. Build from source.)\n"
-        ),
-      D_NONE, 7);
-
-
   /* Run the Gtk event loop, and not the Xt event loop.  This means that
      if there were Xt timers or fds registered, they would never get serviced,
      and if there were any Xt widgets, they would never have events delivered.
diff -pru xscreensaver-5.30/driver/lock.c xscreensaver-5.30.p/driver/lock.c
--- xscreensaver-5.30/driver/lock.c    2014-08-05 07:21:30.000000000 +0100
+++ xscreensaver-5.30.p/driver/lock.c    2016-04-02 17:23:46.966177910 +0100
@@ -487,11 +487,6 @@ make_passwd_window (saver_info *si,
    * room for the dialog to grow without going off the edge of the screen. */
   max_string_width_px *= 0.75;


-  if (!info_msg && senescent_p())
-    info_msg = ("\n"
-                "This version of XScreenSaver\n"
-                "is very old! Please upgrade!\n");
-
   pw->info_label = mlstring_new(info_msg ? info_msg : pw->body_label,
                 pw->label_font, max_string_width_px);


diff -pru xscreensaver-5.30/driver/prefs.c xscreensaver-5.30.p/driver/prefs.c
--- xscreensaver-5.30/driver/prefs.c    2014-08-08 18:57:20.000000000 +0100
+++ xscreensaver-5.30.p/driver/prefs.c    2016-04-02 17:22:59.056302780 +0100
@@ -1658,83 +1658,3 @@ stop_the_insanity (saver_preferences *p)
   if (p->auth_warning_slack < 0)   p->auth_warning_slack = 0;
   if (p->auth_warning_slack > 300) p->auth_warning_slack = 300;
 }
-
-
-Bool
-senescent_p (void)
-{
-  /* If you are in here because you're planning on disabling this warning
-     before redistributing my software, please don't.
-
-     I sincerely request that you do one of the following:
-
-         1: leave this code intact and this warning in place, -OR-
-
-         2: Remove xscreensaver from your distribution.
-
-     I would seriously prefer that you not distribute my software at all
-     than that you distribute one version and then never update it for
-     years.
-
-     I am *constantly* getting email from users reporting bugs that have
-     been fixed for literally years who have no idea that the software
-     they are running is years out of date.  Yes, it would be great if we
-     lived in the ideal world where people checked that they were running
-     the latest release before they report a bug, but we don't.  To most
-     people, "running the latest release" is synonymous with "running the
-     latest release that my distro packages for me."
-
-     When they even bother to tell me what version they're running, I
-     say, "That version is three years old!", and they say "But this is
-     the latest version my distro ships".  Then I say, "your distro
-     sucks", and they say "but I don't know how to compile from source,
-     herp derp I eat paste", and *everybody* goes away unhappy.
-
-     It wastes an enormous amount of my time, and kind of makes me regret
-     ever having released this software in the first place.
-
-     So seriously. I ask that if you're planning on disabling this
-     obsolescence warning, that you instead just remove xscreensaver from
-     your distro entirely.  Everybody will be happier that way.  Check
-     out gnome-screensaver instead, I understand it's really nice.
-
-     Of course, my license allows you to ignore me and do whatever the
-     fuck you want, but as the author, I hope you will have the common
-     courtesy of complying with my request.
-
-     Thank you!
-
-     jwz, 2014
-  */
-  time_t now = time ((time_t *) 0);                /*   N   */
-  struct tm *tm = localtime (&now);                /*   o   */
-  const char *s = screensaver_id;                /*       */
-  char mon[4], year[5];                        /*   d   */
-  int m, y, months;                        /*   o   */
-  s = strchr (s, ' '); if (!s) abort(); s++;            /*   n   */
-  s = strchr (s, '('); if (!s) abort(); s++;            /*   '   */
-  s = strchr (s, '-'); if (!s) abort(); s++;            /*   t   */
-  strncpy (mon, s, 3);                        /*       */
-  mon[3] = 0;                            /*   d   */
-  s = strchr (s, '-'); if (!s) abort(); s++;            /*   o   */
-  strncpy (year, s, 4);                        /*       */
-  year[4] = 0;                            /*   i   */
-  y = atoi (year);                        /*   t   */
-  if      (!strcmp(mon, "Jan")) m = 0;                /*   ,   */
-  else if (!strcmp(mon, "Feb")) m = 1;                /*       */
-  else if (!strcmp(mon, "Mar")) m = 2;                /*   s   */
-  else if (!strcmp(mon, "Apr")) m = 3;                /*   t   */
-  else if (!strcmp(mon, "May")) m = 4;                /*   o   */
-  else if (!strcmp(mon, "Jun")) m = 5;                /*   p   */
-  else if (!strcmp(mon, "Jul")) m = 6;                /*   ,   */
-  else if (!strcmp(mon, "Aug")) m = 7;                /*       */
-  else if (!strcmp(mon, "Sep")) m = 8;                /*   s   */
-  else if (!strcmp(mon, "Oct")) m = 9;                /*   t   */
-  else if (!strcmp(mon, "Nov")) m = 10;                /*   a   */
-  else if (!strcmp(mon, "Dec")) m = 11;                /*   a   */
-  else abort();                            /*   a   */
-  months = ((((tm->tm_year + 1900) * 12) + tm->tm_mon) -    /*   h   */
-            (y * 12 + m));                    /*   h   */
-                                  /*   h   */
-  return (months > 18);                        /*   p   */
-}
diff -pru xscreensaver-5.30/driver/prefs.h xscreensaver-5.30.p/driver/prefs.h
--- xscreensaver-5.30/driver/prefs.h    2014-04-27 05:06:52.000000000 +0100
+++ xscreensaver-5.30.p/driver/prefs.h    2016-04-02 17:23:06.559969963 +0100
@@ -20,7 +20,6 @@ extern int write_init_file (Display *,
                             saver_preferences *, const char *version_string,
                             Bool verbose_p);
 const char *init_file_name (void);
-extern Bool senescent_p (void);


 extern screenhack *parse_screenhack (const char *line);
 extern void free_screenhack (screenhack *);
diff -pru xscreensaver-5.30/driver/splash.c xscreensaver-5.30.p/driver/splash.c
--- xscreensaver-5.30/driver/splash.c    2014-05-31 01:42:17.000000000 +0100
+++ xscreensaver-5.30.p/driver/splash.c    2016-04-02 17:24:42.835700399 +0100
@@ -167,20 +167,6 @@ make_splash_dialog (saver_info *si)
   Colormap cmap;
   char *f;


-  Bool whine = senescent_p ();
-
-  if (whine)
-    {
-      /* If locking is not enabled, make sure they see the message. */
-      if (!p->lock_p)
-        {
-          si->prefs.splash_p = True;
-          if (si->prefs.splash_duration < 5000)
-            si->prefs.splash_duration = 5000;
-        }
-      si->prefs.splash_duration += 3000;
-    }
-
   if (si->sp_data)
     return;
   if (!si->prefs.splash_p ||
@@ -218,14 +204,6 @@ make_splash_dialog (saver_info *si)
                                         "splash.help.label",
                     "Dialog.Button.Label");


-
-
-  if (whine)
-    {
-      sp->body3_label = strdup("WARNING: This version is very old!");
-      sp->body4_label = strdup("Please upgrade!");
-    }
-
   if (!sp->heading_label)
     sp->heading_label = strdup("ERROR: REESOURCES NOT INSTALLED CORRECTLY");
   if (!sp->body_label)
diff -pru xscreensaver-5.30/driver/xscreensaver.c xscreensaver-5.30.p/driver/xscreensaver.c
--- xscreensaver-5.30/driver/xscreensaver.c    2014-08-05 07:27:17.000000000 +0100
+++ xscreensaver-5.30.p/driver/xscreensaver.c    2016-04-02 17:24:08.301231767 +0100
@@ -784,17 +784,6 @@ print_banner (saver_info *si)
          "\n",
          blurb());


-  if (p->verbose_p && senescent_p ())
-    fprintf (stderr, "\n"
-             "*************************************"
-             "**************************************\n"
-         "%s: Warning: this version of xscreensaver is VERY OLD!\n"
-         "%s: Please upgrade!  http://www.jwz.org/xscreensaver/\n"
-             "*************************************"
-             "**************************************\n"
-         "\n",
-             blurb(), blurb());
-
   if (p->verbose_p)
     {
       if (!si->uid_message || !*si->uid_message)