[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freenx-knx
Subject:    Re: [FreeNX-kNX] nxagent hangs with openoffice.org
From:       Phil Stricker <stril () gmx ! de>
Date:       2009-01-15 20:39:03
Message-ID: 496F9EE7.8040703 () gmx ! de
[Download RAW message or body]

Hi!

Mario could solve the problem to me!
Thank you very much.

I try to explain, what I had to do to apply Marios patch and to create a 
new package on CentOS5:

0. Install c++ compiler
    yum install gcc-c++
1. Download nx-src.rpm from CentOS repository.
2. Decompress the src.rpm to /usr/src/redhat/SOURCES/
3. Copy Marios Patch to the same directory
4. Edit nx.spec and add the two lines for the patch...
----------
......
Source13:       nxfind-provides.sh
Source14:       nxfind-provides-64.sh
Patch0: fork_hang.patch
......
%prep
%setup -q -T -c %{name}-%{version} -a0 -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 
-a11 -a12
%patch0
.....
----------
5. Recompile the rpm:
cd /usr/src/redhat/SOURCES/
 rpmbuild -ba nx.spec
6. Wait :-)

The rpm is put into /usr/src/redhat/rpms/*architecture*/.

Since I updated nx with the Patch, I did not have any problems 
concerning openoffice again.

Thank you Mario.

Phil


Mario Becroft schrieb:
> Phil Stricker <stril@gmx.de> writes:
>
>   
>> Hi!
>>
>> Mario Becroft schrieb:
>>     
>>> I'm going to try and build it for you in the next couple of hours--I am
>>> waiting for some users to leave before I take something down for
>>> maintenenance, so I have nothing much to do right now anyway. Will email
>>> you soon. (Sending this note off-list so we don't annoy people too
>>> much.)
>>>
>>> I will also write some concise instructions on how to build it for
>>> future reference which I'll send you and the list as well
>>>       
>> Thank you very much. I am trying to rebuild the package:
>> I downloaded the source and decompressed it.
>>
>> I modivied the "nx.spec" with the patch.
>> After starting "rpmbuild -ba nx.spec" rpmbuild asks, which file to patch.
>>
>> Sorry, but I don't know, which file I have to patch...
>>
>>
>> Could you give me a hint?
>>     
>
> Ok, that's good, sounds like you already have figured it all out. It's
> just that the path to the patch must be slightly wrong--usually you have
> to strip off some path elemants by using the -p option to patch. In this
> case, you might just need to edit the path in the patch header--where it
> has the line:
>
> +++ nx-X11/programs/Xserver/os/utils.c  2009-01-10 18:04:16.761853744 +1300
>
> check in the source tree where the X11 code is, and modify the line
> accordingly--you could check one of the other patches already in the rpm
> (assuming there are some) if you need an example.
>
>   


["fork_hang.patch" (text/x-patch)]

--- nx-X11/programs/Xserver/os/utils.c-dist	2009-01-10 17:56:03.063467036 +1300
+++ nx-X11/programs/Xserver/os/utils.c	2009-01-10 18:04:16.761853744 +1300
@@ -1822,6 +1822,8 @@
     int pid;
 } *pidlist;
 
+static sighandler_t old_alarm = NULL; /* XXX horrible awful hack */
+
 pointer
 Popen(char *command, char *type)
 {
@@ -1843,6 +1845,9 @@
 	return NULL;
     }
 
+    /* Ignore the smart scheduler while this is going on */
+    old_alarm = signal(SIGALRM, SIG_IGN);
+
 #ifdef NX_TRANS_EXIT
     if (OsVendorStartRedirectErrorFProc != NULL) {
         OsVendorStartRedirectErrorFProc();
@@ -1853,6 +1858,12 @@
 	close(pdes[0]);
 	close(pdes[1]);
 	xfree(cur);
+#ifdef NX_TRANS_EXIT
+	if (OsVendorEndRedirectErrorFProc != NULL) {
+	    OsVendorEndRedirectErrorFProc();
+	}
+#endif
+	signal(SIGALRM, old_alarm);
 	return NULL;
     case 0:	/* child */
 	if (setgid(getgid()) == -1)
@@ -2076,6 +2087,9 @@
         OsVendorEndRedirectErrorFProc();
     }
 #endif
+    
+    signal(SIGALRM, old_alarm);
+    
     return pid == -1 ? -1 : pstat;
 }
 


________________________________________________________________
     Were you helped on this list with your FreeNX problem?
    Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ
  
         Don't forget to check the NX Knowledge Base:
                 http://www.nomachine.com/kb/ 

________________________________________________________________
       FreeNX-kNX mailing list --- FreeNX-kNX@kde.org
      https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic