Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 153866 - ebuild for NoMachine NX Server Free Edition
Summary: ebuild for NoMachine NX Server Free Edition
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High enhancement (vote)
Assignee: Gentoo NX Server project
URL: http://www.nomachine.com
Whiteboard:
Keywords:
: 137797 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-02 14:09 UTC by Jason Warner
Modified: 2007-03-30 16:16 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to current NX overlay (as of 19/12/2006) (nxoverlay-freedition.patch,15.32 KB, patch)
2006-12-19 03:00 UTC, Bernard Cafarelli
Details | Diff
Tarball of nxclient,nxnode,nxserver-freeedition (nxserver-freeedition-20060111.tar.gz,6.18 KB, application/octet-stream)
2007-01-11 14:19 UTC, Bernard Cafarelli
Details
nxclient-2.1.0.ebuild (nxclient-2.1.0.ebuild,1.46 KB, text/plain)
2007-01-30 19:31 UTC, Bernard Cafarelli
Details
nxwrapper (nxwrapper,128 bytes, text/plain)
2007-01-30 19:32 UTC, Bernard Cafarelli
Details
nxnode-2.1.0.ebuild (nxnode-2.1.0.ebuild,2.52 KB, text/plain)
2007-01-30 19:32 UTC, Bernard Cafarelli
Details
nxnode-2.1.0-init (nxnode-2.1.0-init,1.35 KB, text/plain)
2007-01-30 19:32 UTC, Bernard Cafarelli
Details
nxnode-2.1.0-setup.patch (nxnode-2.1.0-setup.patch,1.33 KB, text/plain)
2007-01-30 19:32 UTC, Bernard Cafarelli
Details
nxserver-freeedition-2.1.0.ebuild (nxserver-freeedition-2.1.0.ebuild,1.86 KB, text/plain)
2007-01-30 19:33 UTC, Bernard Cafarelli
Details
nxserver-2.1.0-init (nxserver-2.1.0-init,580 bytes, text/plain)
2007-01-30 19:33 UTC, Bernard Cafarelli
Details
nxserver-2.1.0-setup.patch (nxserver-2.1.0-setup.patch,1.88 KB, text/plain)
2007-01-30 19:33 UTC, Bernard Cafarelli
Details
nxclient-2.1.0.ebuild (nxclient-2.1.0.ebuild,1.78 KB, text/plain)
2007-02-02 12:43 UTC, Bernard Cafarelli
Details
nxclient-2.1.0.ebuild (nxclient-2.1.0.ebuild,1.79 KB, text/plain)
2007-02-02 15:43 UTC, Bernard Cafarelli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Warner 2006-11-02 14:09:42 UTC
Will a ebuild of NoMachines NX Server Free Edition be made available in portage?  The current version is 2.1.0-9 and is available at http://www.nomachine.com/download-package.php?Prod_Id=2
Comment 1 Stuart Herbert (RETIRED) gentoo-dev 2006-11-04 17:34:42 UTC
Hi,

Yes, this is on my TODO list.

Best regards,
Stu
Comment 2 Stuart Herbert (RETIRED) gentoo-dev 2006-11-13 00:59:03 UTC
Hi,

There is an ebuild for NX Server Free Edition in the Gentoo NX overlay.  Unfortunately, it doesn't work, due to a problem w/ the license file for nxnode.  I'm talking to my NoMachine contact about this; hopefully we'll have a solution soon.

Best regards,
Stu
Comment 3 JPD 2006-11-20 12:54:47 UTC
Stu> I would be happy to test this when you sort out the problem your working on
Cheers, JPD
Comment 4 Jason Warner 2006-11-25 15:54:26 UTC
Thanks Stu.  Fyi...Jake1981 posted that a new version resolves the licensing issue.  He also posted a fix regarding a font issue with Xorg > 7.  Hope this helps for the official ebuild.

http://forums.gentoo.org/viewtopic.php?p=3739188#3739188
Comment 5 Elfyn McBratney (beu) (RETIRED) gentoo-dev 2006-12-03 08:53:14 UTC
Changing bug state.
Comment 6 Bernard Cafarelli gentoo-dev 2006-12-19 02:59:58 UTC
Here is a patch to the current nx overlay, that fixes most of the problems.

The problem was: nxnode needs to install its license file (node.lic), and needs to install it BEFORE the nxserver install (which will edit the node license file to Unlimited in the install process). So I updated the nxnode ebuild to install correctly its license file. I also fixed the nxsensor init script (some tests were incorrect if you had default values in node.cfg, which resulted in the NX_SENSOR_HOST error). I also fixed the ebuilds to provide amd64 support (plus a syntax fix for latest ~arch portage)

The NoMachine faq is here:
http://www.nomachine.com/ar/view.php?ar_id=AR08D00411

Comment 7 Bernard Cafarelli gentoo-dev 2006-12-19 03:00:59 UTC
Created attachment 104348 [details, diff]
Patch to current NX overlay (as of 19/12/2006)
Comment 8 tuXXer 2007-01-05 03:47:39 UTC
My two cents about the current ebuild.

Maybe it is suitable to use native calls in the restart function of the init script:
restart() {
    svc_stop
    svc_start
    eend 0
}

Furthermore the X-Server didn't start, because the X libraries of the Free Edition are linked against /usr/X11R6/lib/X11/fonts, but the font path in X.org >7.0 is /usr/share/fonts. Maybe it is a good idea to create a symlink from /usr/lib/X11/fonts to /usr/share/fonts
Comment 9 Bernard Cafarelli gentoo-dev 2007-01-05 04:19:46 UTC
> Furthermore the X-Server didn't start, because the X libraries of the Free
> Edition are linked against /usr/X11R6/lib/X11/fonts, but the font path in X.org
> >7.0 is /usr/share/fonts. Maybe it is a good idea to create a symlink from
> /usr/lib/X11/fonts to /usr/share/fonts

Yes, I added that a short time after posting my update. Something like this in pkg_postinst() works  fine here:
	# Fonts link on modular X
	if has_version '>=x11-base/xorg-x11-7.0' && ! [ -e /usr/lib/X11/fonts ];
	then
		ln -s /usr/share/fonts /usr/lib/X11/fonts
	fi

Comment 10 Philipp Riegger 2007-01-10 15:21:20 UTC
when i tried to install nxnode i got the following error:

!!! Invalid or corrupt dependency specification: 

"invalid atom: '!<=net-misc/nxserver-personal-2.0.99*'"

('ebuild', '/', 'net-misc/nxnode-2.1.0', 'merge')

!net-misc/nx-x11 !net-misc/nx-x11-bin !net-misc/nxcomp !net-misc/nxproxy !<=net-misc/nxserver-personal-2.0.99* !<=net-misc/nxserver-business-2.0.99* !<=net-misc/nxserver-enterprise-2.0.99* !net-misc/nxserver-freenx

This package can not be installed. Please notify the
'net-misc/nxnode-2.1.0' package maintainer about this problem.


I'm using latest ~x86 portage.
Comment 11 Bernard Cafarelli gentoo-dev 2007-01-10 15:41:36 UTC
Use the patch I attached to this bugreport on your copy of NX overlay, this is one of thes fixes it includes (see comment #6). You can also grab the already patched ebuilds from my overlay:
https://cafarelli.fr/svn/voyageur-overlay
Comment 12 Philipp Riegger 2007-01-11 10:54:53 UTC
I used the patched overlay and compiling and installing worked. I got some QA errors:

QA Notice: the following files contain insecure RUNPATH's
 Please file a bug about this at http://bugs.gentoo.org/
 with the maintaining herd of the package.
 usr/NX/lib/perl/SDBM_File.so
 usr/NX/lib/perl/SysV.so
 usr/NX/lib/perl/Fcntl.so
 usr/NX/lib/perl/Dumper.so
 usr/NX/lib/perl/DBI.so
 usr/NX/lib/perl/SQLite.so
 usr/NX/lib/perl/HiRes.so
^G
Auto fixing rpaths for  usr/NX/lib/perl/SDBM_File.so
 usr/NX/lib/perl/SysV.so
 usr/NX/lib/perl/Fcntl.so
 usr/NX/lib/perl/Dumper.so
 usr/NX/lib/perl/DBI.so
 usr/NX/lib/perl/SQLite.so
 usr/NX/lib/perl/HiRes.so

but you might already know them. When i try to run nxsensor i get the following error:

chris init.d # ./nxsensor start
 * Starting nxsensor ...
/usr/NX/bin/nxsensor: error while loading shared libraries: libglib-1.2.so.0: cannot open shared object file: No such file or directory                   [ !! ]

I'll try to install glib and then run it again. This might be a missing dependancy.
Comment 13 Bernard Cafarelli gentoo-dev 2007-01-11 13:26:54 UTC
Yes, there are still a few problems in the ebuilds, as those QA errors, add some blockers to other NX servers, ... but the list is getting shorter :)

And indeed nxsensor depends on glib 1.2... I updated the ebuild in my overlay to fix this, and also:
* Bumped to latest Nomachine's releases
* No need for the fonts link anymore!
* Updated dependencies (mostly for amd64)
* License files are not overwritten
* Nomachine's install scripts are ran only when no configuration is found 
  (else update scripts are ran)

Note that updating still does not work every time, the easiest way is to first remove nxnode and nxserver-freeedition from the system before emerge

I'll attach the current ebuilds here too after some other tests
Comment 14 Bernard Cafarelli gentoo-dev 2007-01-11 14:19:53 UTC
Created attachment 106564 [details]
Tarball of nxclient,nxnode,nxserver-freeedition

This tarball has all the fixes already made (init scripts, version bumps, ebuild fixes, ...)
Comment 15 Bernard Cafarelli gentoo-dev 2007-01-16 09:56:51 UTC
I asked about these QA warnings on #gentoo-security, the workaround for now would be to host the fixed files and replace the faulty ones in the unpack process. The files are fixed with either 'chrpath -d' or 'scanelf -BXr'

I also notified upstream about this, they said they will take a look at it (hum just realized I only spoke about nxnode files, nxserver also has some)
Comment 16 Michiel de Bruijne 2007-01-17 21:52:16 UTC
Hi Bernard,

Thanks for the tarball, the first test seems positive. The first thing I noticed though is that the desktop files are not installed so there are no items in the start menu (e.g. nxclient).
Comment 17 Bernard Cafarelli gentoo-dev 2007-01-19 16:28:38 UTC
(In reply to comment #16)
Indeed, nxclient does not install a desktop entry (or a pixmap in the right path either). A make_desktop_entry line will do fine, I think (looks like older portage ebuilds don't have this entry either).

Comment 18 Bernard Cafarelli gentoo-dev 2007-01-30 19:26:24 UTC
OK, I have upgrades running smoothly now (no more problems with the license files, no need to unmerge/re-emerge anymore). I'll attach the updated files (including latest security fix from nomachine), the lazy people can directly grab my overlay ;)
Comment 19 Bernard Cafarelli gentoo-dev 2007-01-30 19:31:06 UTC
Created attachment 108659 [details]
nxclient-2.1.0.ebuild
Comment 20 Bernard Cafarelli gentoo-dev 2007-01-30 19:32:08 UTC
Created attachment 108660 [details]
nxwrapper

Common to the 3 ebuilds
Comment 21 Bernard Cafarelli gentoo-dev 2007-01-30 19:32:31 UTC
Created attachment 108662 [details]
nxnode-2.1.0.ebuild
Comment 22 Bernard Cafarelli gentoo-dev 2007-01-30 19:32:44 UTC
Created attachment 108664 [details]
nxnode-2.1.0-init
Comment 23 Bernard Cafarelli gentoo-dev 2007-01-30 19:32:54 UTC
Created attachment 108665 [details]
nxnode-2.1.0-setup.patch
Comment 24 Bernard Cafarelli gentoo-dev 2007-01-30 19:33:21 UTC
Created attachment 108666 [details]
nxserver-freeedition-2.1.0.ebuild
Comment 25 Bernard Cafarelli gentoo-dev 2007-01-30 19:33:36 UTC
Created attachment 108668 [details]
nxserver-2.1.0-init
Comment 26 Bernard Cafarelli gentoo-dev 2007-01-30 19:33:55 UTC
Created attachment 108669 [details]
nxserver-2.1.0-setup.patch
Comment 27 Bernard Cafarelli gentoo-dev 2007-02-02 12:43:05 UTC
Created attachment 108927 [details]
nxclient-2.1.0.ebuild

Updated nxclient: added icons and desktop entries (same entries as nomachine's rpm: client, wizard and sessions admin)
Comment 28 Bernard Cafarelli gentoo-dev 2007-02-02 15:43:05 UTC
Created attachment 108937 [details]
nxclient-2.1.0.ebuild

Replaced the nxwrapper mechanism with make_wrapper
Comment 29 Bernard Cafarelli gentoo-dev 2007-03-21 12:56:39 UTC
*** Bug 137797 has been marked as a duplicate of this bug. ***
Comment 30 Bernard Cafarelli gentoo-dev 2007-03-30 16:16:25 UTC
Added to CVS