xpra icon
Bug tracker and wiki

Opened 4 years ago

Closed 4 years ago

#1383 closed enhancement (fixed)

./setup.py install --home=<inst> requires root

Reported by: Jens H. Goebbert Owned by: Jens H. Goebbert
Priority: minor Milestone: 2.0
Component: core Version: trunk
Keywords: install packaging Cc:

Description (last modified by Antoine Martin)

Installing Xpra 1.0 without root permissions is not possible the way it is mentioned on wiki/Building using --home=<instdir>.

Possible fix:
Only run setup.py line 1985-1994 if argument --home= is not set.

P.S: Thanks for the great Xpra!

Attachments (2)

setup-prefix.patch (1.7 KB) - added by Antoine Martin 4 years ago.
hackish patch to honour the prefix when installing the service files
Xpra-1.0.0-GCCcore-5.4.0-Python-2.7.12.eb (1.7 KB) - added by Jens H. Goebbert 4 years ago.
preliminar EasyBuild? Script to build Xpra

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 years ago by Jens H. Goebbert

Perhaps it would be even better to use --prefix=<instdir> in combination with an extra flag like --nosys instead of --home=<instdir>

Autoinstall tools (like EasyBuild) like to set --prefix=<instdir> by default and fail with an additional --home=<instdir> currently.

Last edited 4 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 4 years ago by Antoine Martin

Description: modified (diff)
Keywords: packaging added
Milestone: 2.0
Status: newassigned

Changed 4 years ago by Antoine Martin

Attachment: setup-prefix.patch added

hackish patch to honour the prefix when installing the service files

comment:3 Changed 4 years ago by Antoine Martin

Owner: changed from Antoine Martin to Jens H. Goebbert
Status: assignednew

Hmmm. The patch attached would probably fix this particular issue, but there are other problems:

copying build/lib.linux-x86_64-2.7/xpra/server/pam.so -> /usr/lib64/python2.7/site-packages/xpra/server
error: could not delete '/usr/lib64/python2.7/site-packages/xpra/server/pam.so': Permission denied

or even later:

copying build/scripts-2.7/xpra -> /usr/bin
error: could not delete '/usr/bin/xpra': Permission denied

How did you get past these errors?
Looks to me like distutils isn't honouring the prefix or home arguments, no idea why.

Changed 4 years ago by Jens H. Goebbert

preliminar EasyBuild? Script to build Xpra

comment:4 Changed 4 years ago by Jens H. Goebbert

Hi Antoine,

I simply created the following patch - which is a really ugly one - and added it to the EasyBuild? script (see attached file).
(I tested your patch and it did not work.)

--- setup.py    2016-12-18 23:30:11.199650111 +0100
+++ setup.py.mod        2016-12-18 23:17:20.199485714 +0100
@@ -1982,16 +1982,16 @@
             return kw

         pkgconfig = osx_pkgconfig
-    else:
+    #else:
         #Linux init service:
-        if os.path.exists("/bin/systemctl"):
-            add_data_files("/usr/lib/systemd/system/", ["service/xpra.service"])
-        else:
-            add_data_files("/etc/init.d/", ["service/xpra"])
-        if os.path.exists("/etc/sysconfig"):
-            add_data_files("/etc/sysconfig/", ["etc/sysconfig/xpra"])
-        elif os.path.exists("/etc/default"):
-            add_data_files("/etc/default/", ["etc/sysconfig/xpra"])
+        #if os.path.exists("/bin/systemctl"):
+        #    add_data_files("/usr/lib/systemd/system/", ["service/xpra.service"])
+        #else:
+        #    add_data_files("/etc/init.d/", ["service/xpra"])
+        #if os.path.exists("/etc/sysconfig"):
+        #    add_data_files("/etc/sysconfig/", ["etc/sysconfig/xpra"])
+        #elif os.path.exists("/etc/default"):
+        #    add_data_files("/etc/default/", ["etc/sysconfig/xpra"])


 if html5_ENABLED:
Last edited 4 years ago by Antoine Martin (previous) (diff)

comment:5 Changed 4 years ago by Antoine Martin

r14580 should allow you to drop the patch, just call:

./setup.py --without-service

Please let me know if that works for you and I'll apply it to the v1.0.x branch - this may be useful to others (ie: bsd unix)

comment:6 Changed 4 years ago by Jens H. Goebbert

Hi Antoine,

your patch, which adds "--without-service", works fine here at JSC.
Please add it to the 1.x branch.

Best,
Jens Henrik

comment:7 Changed 4 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

This change had been applied to the v1.x branch in r14611 and was included in the 1.0.1 release.

Note: See TracTickets for help on using tickets.