rpms/kdebase-workspace/devel kdebase-workspace-4.4.92-kdm_plymouth.patch, NONE, 1.1 kdebase-workspace-4.4.92-kdm_plymouth081.patch, NONE, 1.1 kdebase-workspace.spec, 1.415, 1.416 kdebase-workspace-4.4.2-kdm_plymouth.patch, 1.1, NONE kdebase-workspace-4.4.80-kdm_plymouth081.patch, 1.1, NONE

Rex Dieter rdieter at fedoraproject.org
Wed Jul 7 18:58:52 UTC 2010


Author: rdieter

Update of /cvs/pkgs/rpms/kdebase-workspace/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv21319

Modified Files:
	kdebase-workspace.spec 
Added Files:
	kdebase-workspace-4.4.92-kdm_plymouth.patch 
	kdebase-workspace-4.4.92-kdm_plymouth081.patch 
Removed Files:
	kdebase-workspace-4.4.2-kdm_plymouth.patch 
	kdebase-workspace-4.4.80-kdm_plymouth081.patch 
Log Message:
rebased kdm_plymouth patches


kdebase-workspace-4.4.92-kdm_plymouth.patch:
 dm.c |   38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

--- NEW FILE kdebase-workspace-4.4.92-kdm_plymouth.patch ---
diff -up kdebase-workspace-4.4.92/kdm/backend/dm.c.kdm_plymouth kdebase-workspace-4.4.92/kdm/backend/dm.c
--- kdebase-workspace-4.4.92/kdm/backend/dm.c.kdm_plymouth	2010-07-06 01:54:30.000000000 -0500
+++ kdebase-workspace-4.4.92/kdm/backend/dm.c	2010-07-07 14:01:03.867921854 -0500
@@ -1329,6 +1329,36 @@ getBusyVTs(void)
     return activeVTs;
 }
 
+static int
+get_active_vt (void)
+{
+        int console_fd;
+        struct vt_stat console_state = { 0 };
+        console_fd = open ("/dev/tty0", O_RDONLY | O_NOCTTY);
+        if (console_fd < 0) {
+                goto out;
+        }
+        if (ioctl (console_fd, VT_GETSTATE, &console_state) < 0) {
+                goto out;
+        }
+out:
+        if (console_fd >= 0) {
+                close (console_fd);
+        }
+        return console_state.v_active;
+}
+
+static int
+triggered_to_force_display_on_active_vt (void)
+{
+    int should_force_display_on_active_vt;
+    should_force_display_on_active_vt=open("/var/spool/gdm/force-display-on-active-vt", O_RDONLY);
+    if ( should_force_display_on_active_vt >= 0 )
+        close(should_force_display_on_active_vt);
+    unlink("/var/spool/gdm/force-display-on-active-vt");
+    return should_force_display_on_active_vt;
+}
+
 static void
 allocateVT(struct display *d)
 {
@@ -1338,6 +1368,14 @@ allocateVT(struct display *d)
     if ((d->displayType & d_location) == dLocal &&
         d->status == notRunning && !d->serverVT && d->reqSrvVT >= 0)
     {
+        if ( triggered_to_force_display_on_active_vt() >= 0 ) {
+            int vt;
+            vt = get_active_vt();
+            if (vt > 0) {
+                d->serverVT = vt;
+                return;
+            }
+        } 
         if (d->reqSrvVT && d->reqSrvVT < 16) {
             d->serverVT = d->reqSrvVT;
         } else {

kdebase-workspace-4.4.92-kdm_plymouth081.patch:
 dm.c     |  112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 dm.h     |    4 ++
 server.c |    5 ++
 3 files changed, 121 insertions(+)

--- NEW FILE kdebase-workspace-4.4.92-kdm_plymouth081.patch ---
diff -up kdebase-workspace-4.4.92/kdm/backend/dm.c.kdm_plymouth kdebase-workspace-4.4.92/kdm/backend/dm.c
--- kdebase-workspace-4.4.92/kdm/backend/dm.c.kdm_plymouth	2010-07-06 01:54:30.000000000 -0500
+++ kdebase-workspace-4.4.92/kdm/backend/dm.c	2010-07-07 13:55:48.425171749 -0500
@@ -1329,6 +1329,81 @@ getBusyVTs(void)
     return activeVTs;
 }
 
+static int
+get_active_vt (void)
+{
+        int console_fd;
+        struct vt_stat console_state = { 0 };
+        console_fd = open ("/dev/tty0", O_RDONLY | O_NOCTTY);
+        if (console_fd < 0) {
+                goto out;
+        }
+        if (ioctl (console_fd, VT_GETSTATE, &console_state) < 0) {
+                goto out;
+        }
+out:
+        if (console_fd >= 0) {
+                close (console_fd);
+        }
+        return console_state.v_active;
+}
+
+static int
+plymouth_is_running (void)
+{
+        int status;
+        status = system ("/bin/plymouth --ping");
+
+        return WIFEXITED (status) && WEXITSTATUS (status) == 0;
+}
+
+static int
+plymouth_has_active_vt (void)
+{
+        int status;
+        status = system ("/bin/plymouth --has-active-vt");
+
+        return WIFEXITED (status) && WEXITSTATUS (status) == 0;
+}
+
+static int
+plymouth_prepare_for_transition (void)
+{
+        int status;
+        status = system ("/bin/plymouth deactivate");
+
+        return WIFEXITED (status) && WEXITSTATUS (status) == 0;
+}
+
+int
+plymouth_quit_with_transition (void)
+{
+        int status;
+        status = system ("/bin/plymouth quit --retain-splash");
+
+        return WIFEXITED (status) && WEXITSTATUS (status) == 0;
+}
+
+static int
+plymouth_quit_without_transition (void)
+{
+        int status;
+        status = system ("/bin/plymouth quit");
+
+        return WIFEXITED (status) && WEXITSTATUS (status) == 0;
+}
+
+static int
+triggered_to_force_display_on_active_vt (void)
+{
+   int should_force_display_on_active_vt;
+   should_force_display_on_active_vt=open("/var/spool/gdm/force-display-on-active-vt", O_RDONLY);
+   if ( should_force_display_on_active_vt >= 0 )
+       close(should_force_display_on_active_vt);
+   unlink("/var/spool/gdm/force-display-on-active-vt");
+   return should_force_display_on_active_vt;
+}
+
 static void
 allocateVT(struct display *d)
 {
@@ -1338,6 +1413,43 @@ allocateVT(struct display *d)
     if ((d->displayType & d_location) == dLocal &&
         d->status == notRunning && !d->serverVT && d->reqSrvVT >= 0)
     {
+        /* check for pymouth using old/deprecated method first */
+        if ( triggered_to_force_display_on_active_vt() >= 0 ) {
+            int vt;
+            vt = get_active_vt();
+            if (vt > 0) {
+                d->serverVT = vt;
+                return;
+            }
+        }
+
+        /* check for plymouth using newer methods */
+        d->plymouth_is_running = plymouth_is_running ();
+        if (d->plymouth_is_running) {
+            /* call plymouth deactivate */
+            plymouth_prepare_for_transition ();
+            if (plymouth_has_active_vt ()) {
+                /* plymouth was displaying a splash screen and has
+                 * terminated leaving it on screen
+                 */
+                int vt;
+                vt = get_active_vt ();
+                if (vt > 0) {
+                    /* start the X server on the active vt */
+                    d->serverVT = vt;
+                    return;
+                }
+           }
+           else {
+                /* plymouth might have been running but did not display
+                * a splash screen.
+                */ 
+               
+                /* call plymouth quit and start the X server as usual */
+                d->plymouth_is_running = !plymouth_quit_without_transition ();
+            }
+        }            
+      
         if (d->reqSrvVT && d->reqSrvVT < 16) {
             d->serverVT = d->reqSrvVT;
         } else {
diff -up kdebase-workspace-4.4.92/kdm/backend/dm.h.kdm_plymouth kdebase-workspace-4.4.92/kdm/backend/dm.h
--- kdebase-workspace-4.4.92/kdm/backend/dm.h.kdm_plymouth	2010-07-06 01:54:30.000000000 -0500
+++ kdebase-workspace-4.4.92/kdm/backend/dm.h	2010-07-07 13:48:11.874921158 -0500
@@ -292,6 +292,8 @@ struct display {
     int authNum;                /* number of authorizations */
     char *authFile;             /* file to store authorization in */
     char *greeterAuthFile;      /* file to store authorization for greeter in */
+    
+    int plymouth_is_running;    /* Plymouth's status */
 };
 
 #define d_location   1
@@ -404,6 +406,8 @@ int anyDisplaysLeft(void);
 void forEachDisplay(void (*f)(struct display *));
 #ifdef HAVE_VTS
 void forEachDisplayRev(void (*f)(struct display *));
+/* function for plymouth */
+int plymouth_quit_with_transition (void);
 #endif
 void removeDisplay(struct display *old);
 struct display
diff -up kdebase-workspace-4.4.92/kdm/backend/server.c.kdm_plymouth kdebase-workspace-4.4.92/kdm/backend/server.c
--- kdebase-workspace-4.4.92/kdm/backend/server.c.kdm_plymouth	2010-07-06 01:54:30.000000000 -0500
+++ kdebase-workspace-4.4.92/kdm/backend/server.c	2010-07-07 13:56:46.960921366 -0500
@@ -137,6 +137,11 @@ startServerSuccess()
     struct display *d = startingServer;
     d->serverStatus = ignore;
     serverTimeout = TO_INF;
+    if (d->plymouth_is_running) {
+        debug( "Quitting Plymouth with transition\n" );
+        d->plymouth_is_running = !plymouth_quit_with_transition ();
+        debug ("Is Plymouth still running? %s\n", d->plymouth_is_running ? "yes" : "no");
+    }
     debug("X server ready, starting session\n");
     startDisplayP2(d);
 }


Index: kdebase-workspace.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdebase-workspace/devel/kdebase-workspace.spec,v
retrieving revision 1.415
retrieving revision 1.416
diff -u -p -r1.415 -r1.416
--- kdebase-workspace.spec	7 Jul 2010 18:24:04 -0000	1.415
+++ kdebase-workspace.spec	7 Jul 2010 18:58:51 -0000	1.416
@@ -2,12 +2,11 @@
 %define polkit_1 1
 #define polkit_09 1
 
-## FIXME/TODO : Rex is working on fixing these
-#if 0%{?fedora} > 12
-#define plymouth_hack_ping 1
-#else
-#define plymouth_hack_spool 1
-#endif
+%if 0%{?fedora} > 12
+%define plymouth_hack_ping 1
+%else
+%define plymouth_hack_spool 1
+%endif
 
 %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 
@@ -46,9 +45,9 @@ Patch16: kdebase-workspace-4.4.80-batter
 # to the classic menu (as in KDE <= 4.2.x); the default is still the upstream
 # default Leave submenu
 Patch17: kdebase-workspace-4.4.92-classicmenu-logout.patch
-Patch18: kdebase-workspace-4.4.2-kdm_plymouth.patch
+Patch18: kdebase-workspace-4.4.92-kdm_plymouth.patch
 # kubuntu kudos! bulletproof-X bits ripped out
-Patch19: kdebase-workspace-4.4.80-kdm_plymouth081.patch
+Patch19: kdebase-workspace-4.4.92-kdm_plymouth081.patch
 Patch20: kdebase-workspace-4.4.92-xsession_errors_O_APPEND.patch
 # support the widgetStyle4 hack in the Qt KDE platform plugin
 Patch21: kdebase-workspace-4.3.98-platformplugin-widgetstyle4.patch


--- kdebase-workspace-4.4.2-kdm_plymouth.patch DELETED ---


--- kdebase-workspace-4.4.80-kdm_plymouth081.patch DELETED ---



More information about the scm-commits mailing list