Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 318727 - net-misc/nxnode and net-misc/nxserver-freeedition don't work with a readonly /usr filesystem
Summary: net-misc/nxnode and net-misc/nxserver-freeedition don't work with a readonly ...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo NX Server project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 09:22 UTC by Bruno Redondi
Modified: 2015-03-26 16:33 UTC (History)
0 users

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


Attachments
nxnode-3.4.0.6.patch (nxnode-3.4.0.6.patch,2.08 KB, patch)
2010-05-06 09:23 UTC, Bruno Redondi
Details | Diff
nxserver-freeedition-3.4.0.8.patch (nxserver-freeedition-3.4.0.8.patch,1.44 KB, patch)
2010-05-06 09:24 UTC, Bruno Redondi
Details | Diff
nxserver-freeedition-3.4.0.8.patch (nxserver.patch,1.82 KB, patch)
2010-05-18 09:54 UTC, Bruno Redondi
Details | Diff
nxserver-freeedition-3.4.0.8.patch (nxserver-freeedition-3.4.0.8.patch,2.46 KB, patch)
2010-05-18 12:12 UTC, Bruno Redondi
Details | Diff
nxnode-3.4.0.6.patch (nxnode-3.4.0.6.patch,2.20 KB, patch)
2010-05-18 12:13 UTC, Bruno Redondi
Details | Diff
nxnode-3.4.0.13.patch (nxnode-3.4.0.13.patch,2.29 KB, patch)
2010-06-15 11:30 UTC, Bruno Redondi
Details | Diff
nxserver-freeedition-3.4.0.12.patch (nxserver-freeedition-3.4.0.12.patch,2.44 KB, patch)
2010-06-15 11:31 UTC, Bruno Redondi
Details | Diff
nxserver-freeedition/files/nxserver-3.4-chown.patch (nxserver-3.4-chown.patch,1.04 KB, patch)
2010-06-15 11:33 UTC, Bruno Redondi
Details | Diff
nxserver-freeedition-3.4.0.14.patch (nxserver-freeedition-3.4.0.14.patch,2.44 KB, patch)
2010-09-01 13:52 UTC, Bruno Redondi
Details | Diff
nxnode-3.4.0.14.patch (nxnode-3.4.0.14.patch,2.66 KB, patch)
2010-09-01 13:55 UTC, Bruno Redondi
Details | Diff
nxserver-freeedition-3.4.0.14.patch (nxserver-freeedition-3.4.0.14.patch,2.67 KB, patch)
2010-10-19 11:39 UTC, Bruno Redondi
Details | Diff
nxnode-3.4.0.14.patch (nxnode-3.4.0.14.patch,3.01 KB, patch)
2010-10-19 11:43 UTC, Bruno Redondi
Details | Diff
nxnode/files/nxnode.cups_path.patch (nxnode.cups_path.patch,528 bytes, patch)
2011-01-20 10:57 UTC, Bruno Redondi
Details | Diff
nxnode-3.4.0.14.patch (nxnode-3.4.0.14.patch,3.20 KB, patch)
2011-01-20 11:00 UTC, Bruno Redondi
Details | Diff
nxnode-3.4.0.14.patch (nxnode-3.4.0.14.patch,3.21 KB, patch)
2011-01-20 11:19 UTC, Bruno Redondi
Details | Diff
nxserver-freeedition-3.4.0.17.patch (nxserver-freeedition-3.4.0.17.patch,2.67 KB, patch)
2011-03-03 14:27 UTC, Bruno Redondi
Details | Diff
nxnode-3.4.0.16.patch (nxnode-3.4.0.16.patch,3.21 KB, patch)
2011-03-03 14:28 UTC, Bruno Redondi
Details | Diff
nxnode-3.4.0.16-r1.patch (nxnode-3.4.0.16-r1.patch,3.10 KB, patch)
2011-03-14 08:56 UTC, Bruno Redondi
Details | Diff
nxserver-freeedition-3.5.0.4.patch (nxserver-freeedition-3.5.0.4.patch,2.67 KB, patch)
2011-05-23 08:22 UTC, Bruno Redondi
Details | Diff
nxnode-3.5.0.3.patch (nxnode-3.5.0.3.patch,3.19 KB, patch)
2011-05-23 08:23 UTC, Bruno Redondi
Details | Diff
nxnode-3.5.0.6.patch (nxnode-3.5.0.6.patch,3.19 KB, patch)
2011-08-25 10:12 UTC, Bruno Redondi
Details | Diff
nxserver-freeedition-3.5.0.8.patch (nxserver-freeedition-3.5.0.8.patch,2.43 KB, patch)
2011-08-25 10:13 UTC, Bruno Redondi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Redondi 2010-05-06 09:22:01 UTC
net-misc/nxnode and net-misc/nxserver-freeedition install their etc and var data under /usr/NX/, preventing nxserver to run with /usr on a readonly filesystem.
as a workaround it is possible to move and symlink /usr/NX/etc to /etc/NX and /usr/NX/var/* to /var/*/NX.

Reproducible: Always
Comment 1 Bruno Redondi 2010-05-06 09:23:20 UTC
Created attachment 230565 [details, diff]
nxnode-3.4.0.6.patch

patch against nxnode-3.4.0.6 ebuild to move and symlink /usr/NX/etc in /etc/NX and /usr/NX/var/* in /var/*/NX
Comment 2 Bruno Redondi 2010-05-06 09:24:20 UTC
Created attachment 230567 [details, diff]
nxserver-freeedition-3.4.0.8.patch

patch against nxserver-freeedition-3.4.0.8 ebuild to move and symlink /usr/NX/etc in /etc/NX and /usr/NX/var/* in /var/*/NX
Comment 3 Wormo (RETIRED) gentoo-dev 2010-05-15 08:05:39 UTC
Thanks for submitting your fix; it is annoying to have apps writing into /usr.
Comment 4 Bruno Redondi 2010-05-18 09:54:00 UTC
Created attachment 231907 [details, diff]
nxserver-freeedition-3.4.0.8.patch

/etc/init.d/nxserver writes to /usr/NX/home, new patch to move /usr/NX/home in /var/lib/NX/home.
Comment 5 Bruno Redondi 2010-05-18 12:12:12 UTC
Created attachment 231961 [details, diff]
nxserver-freeedition-3.4.0.8.patch

working version
Comment 6 Bruno Redondi 2010-05-18 12:13:22 UTC
Created attachment 231963 [details, diff]
nxnode-3.4.0.6.patch

patch to move /usr/NX/home/nx in /var/lib/NX
Comment 7 Bruno Redondi 2010-06-15 11:30:01 UTC
Created attachment 235393 [details, diff]
nxnode-3.4.0.13.patch

patch against nxnode-3.4.0.13 to prevent NX from writing in /usr
/usr/NX/var/db -> /var/db/NX
/usr/NX/var/log -> /var/log/NX
/usr/NX/var/run -> /var/run/NX
/usr/NX/home/nx -> /var/lib/NX
/usr/NX/etc -> /etc/NX
Comment 8 Bruno Redondi 2010-06-15 11:31:41 UTC
Created attachment 235397 [details, diff]
nxserver-freeedition-3.4.0.12.patch

patch against nxserver-freeedition-3.4.0.12 to prevent NX from writing in /usr

this version uses symlinks created by nxnode
Comment 9 Bruno Redondi 2010-06-15 11:33:52 UTC
Created attachment 235401 [details, diff]
nxserver-freeedition/files/nxserver-3.4-chown.patch

/usr/NX/scripts/setup/nxserver fails to chown ~nx if /usr/NX/home/nx is a symlink
Comment 10 Bruno Redondi 2010-08-23 09:40:28 UTC
(In reply to comment #3)
> Thanks for submitting your fix; it is annoying to have apps writing into /usr.
> 

My patches are still not applied. Are there any issues with them?
Comment 11 Bernard Cafarelli gentoo-dev 2010-08-24 08:56:08 UTC
Hi, thanks a lot for the patches, and sorry for the delay. The issue is just me lagging behind in my TODO list :/ 

Somehow this bug has fallen deeper under my radar than usual though, I'll test and add your patches this week
Comment 12 Bernard Cafarelli gentoo-dev 2010-08-26 15:01:47 UTC
A quick test on a fresh install (without any /usr/NX already on the system) went ok, however upgrading an existing setup is problematic (file collisions everywhere, files created later on in /usr/NX that would need to be moved, ...)

I need to fix this before adding the patches (block older versions may not be enough, as some manual cleaning would probably be needed)...
Comment 13 Bruno Redondi 2010-09-01 13:52:43 UTC
Created attachment 245616 [details, diff]
nxserver-freeedition-3.4.0.14.patch

version bump
Comment 14 Bruno Redondi 2010-09-01 13:55:24 UTC
Created attachment 245622 [details, diff]
nxnode-3.4.0.14.patch

version bump

added a check in pkg_preinst to move in the correct location /usr/NX files
Comment 15 Bruno Redondi 2010-10-19 11:39:49 UTC
Created attachment 251233 [details, diff]
nxserver-freeedition-3.4.0.14.patch

It is mandatory to DEPEND on the patched version of nxnode.
Comment 16 Bruno Redondi 2010-10-19 11:43:34 UTC
Created attachment 251235 [details, diff]
nxnode-3.4.0.14.patch

to avoid collisions with older version is necessary to set COLLISION_IGNORE="/usr/NX/var /usr/NX/home" before emerging this one.

Added a pkg_setup function that detects the older version and informs the user on how to emerge this one.
Comment 17 Bruno Redondi 2010-10-19 11:49:26 UTC
(In reply to comment #12)
> A quick test on a fresh install (without any /usr/NX already on the system)
> went ok, however upgrading an existing setup is problematic (file collisions
> everywhere, files created later on in /usr/NX that would need to be moved, ...)
> 
> I need to fix this before adding the patches (block older versions may not be
> enough, as some manual cleaning would probably be needed)...
> 

I performed a quick test upgrading an existing setup. Using the suggested COLLISION_IGNORE settings, the writable portion of /usr/NX gets automagically moved in the right place.  
Comment 18 Bruno Redondi 2011-01-20 10:57:14 UTC
Created attachment 260347 [details, diff]
nxnode/files/nxnode.cups_path.patch

patch to add /usr/libexec to CUPS_PATH (wrt #341871)
Comment 19 Bruno Redondi 2011-01-20 11:00:54 UTC
Created attachment 260349 [details, diff]
nxnode-3.4.0.14.patch

improved pkg_setup() to ewarn user only if it is really needed.
added patch to add /usr/libexec to CUPS_PATH in NX/scripts/setup/nxnode (wrt #341861)
Comment 20 Bruno Redondi 2011-01-20 11:19:57 UTC
Created attachment 260350 [details, diff]
nxnode-3.4.0.14.patch 

fixed pkg_setup() to ewarn user only if it is really needed.
Comment 21 Bruno Redondi 2011-03-03 14:27:48 UTC
Created attachment 264581 [details, diff]
nxserver-freeedition-3.4.0.17.patch

version bump
Comment 22 Bruno Redondi 2011-03-03 14:28:10 UTC
Created attachment 264583 [details, diff]
nxnode-3.4.0.16.patch

version bump
Comment 23 Bruno Redondi 2011-03-14 08:56:57 UTC
Created attachment 265795 [details, diff]
nxnode-3.4.0.16-r1.patch

revision bump
Comment 24 Bruno Redondi 2011-05-23 08:22:37 UTC
Created attachment 274369 [details, diff]
nxserver-freeedition-3.5.0.4.patch

version bump
Comment 25 Bruno Redondi 2011-05-23 08:23:59 UTC
Created attachment 274371 [details, diff]
nxnode-3.5.0.3.patch

revision bump with improved upgrade from current stable version
Comment 26 Bruno Redondi 2011-08-25 10:12:18 UTC
Created attachment 284581 [details, diff]
nxnode-3.5.0.6.patch

revision bump
Comment 27 Bruno Redondi 2011-08-25 10:13:17 UTC
Created attachment 284583 [details, diff]
nxserver-freeedition-3.5.0.8.patch

revision bump
Comment 28 Bruno Redondi 2011-08-25 10:17:34 UTC
(In reply to comment #12)
> A quick test on a fresh install (without any /usr/NX already on the system)
> went ok, however upgrading an existing setup is problematic (file collisions
> everywhere, files created later on in /usr/NX that would need to be moved, ...)
> 
> I need to fix this before adding the patches (block older versions may not be
> enough, as some manual cleaning would probably be needed)...

Hi, can You retest my patches, please? Now there is a test for the presence of the old version, and eventually a message is displayed telling the user how to upgrade to the new one.
Comment 29 Bernard Cafarelli gentoo-dev 2015-03-26 16:33:29 UTC
Last rites in progress in bug #537774