Bug 481676 - blender-wrapper doesn't tweak the user script directory as appropriate.
Summary: blender-wrapper doesn't tweak the user script directory as appropriate.
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: blender
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jochen Schmitt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-27 00:00 UTC by Nicolas Chauvet (kwizart)
Modified: 2009-03-16 23:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 458090
Environment:
Last Closed: 2009-03-16 19:35:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nicolas Chauvet (kwizart) 2009-01-27 00:00:55 UTC
+++ This bug was initially created as a clone of Bug #458090 +++

--- Additional comment from kwizart on 2009-01-20 15:15:01 EDT ---


@Jochen
btw. I have a very bad problem with the way blender create the ~/.blender directory nowadays. the main issue is that directories created with the "blender-wrapper"  script are set root:root even in /home/user directories.
Can we be more in shape with what upstream does in this area ?

--- Additional comment from jochen on 2009-01-20 15:34:44 EDT ---

I have a look on my own system. On my system the .blender directory is owned by my onw userid. The Directory should be create on the first start of blender.

--- Additional comment from kwizart on 2009-01-20 15:55:30 EDT ---

------------------------
LuxBlend v0.5

WARNING: LuxPath "" is not valid

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/share/blender/scripts/bpymodules/BPyRegistry.py", line 267, in SaveConfigData
    raise Warning(e) # Resend exception as warning
Warning: [Errno 13] Permission denied: '/home/kwizart/.blender/scripts/bpydata/config/luxblend.cfg'
------------------------

And as ~/.blender/scripts/bpydata/readme.txt say.the bpydata directory is a place for plugin to put their data into. Unfortunately, in the current state of the blender-wrapper script, it is a symlink to /usr/share/blender/scripts/bpydata, hence, cannot be written unless root.

I don't know if there is a solution that can avoid to duplicate the system plugins while allowing for system plugins to write their data into by-users directory.
Can we just patch the config directory for python plugin instead ? (so both system/users and arch/noarches plugins can use the same config directory?).

--- Additional comment from kwizart on 2009-01-20 16:52:52 EDT ---

This is not easy: 
- to ease the installation of the LuxBlend plugin, I should put a luxrender.cfg into /usr/share/blender/scripts/bpydata/config/luxblend.cfg and that file need to be transferred to the user directory even if the ~/.blender directory was already created but not if the luxrender.cfg file is already present.

Will you accept extensions to your blender-wrapper script ?
Something like:
for f in /etc/blender-wrapper.d ; do 
  sh ${f}
done

--- Additional comment from jochen on 2009-01-21 12:29:01 EDT ---

I don't unterstand you issue: 

I have done the following:
1.) Build your package locally.
2.) Install it
3.) Start blender, so the wrapper script should create the symlinks
4.) View the ~/.blender/scripts directory

I have got the following expected result:

lrwxrwxrwx 1 s4504kr s4504kr   42 21. Jan 18:24 LuxBlend_0.1.py -> /usr/share/blender/scripts/LuxBlend_0.1.py
lrwxrwxrwx 1 s4504kr s4504kr   43 21. Jan 18:24 LuxBlend_0.1.pyc -> /usr/share/blender/scripts/LuxBlend_0.1.pyc
lrwxrwxrwx 1 s4504kr s4504kr   43 21. Jan 18:24 LuxBlend_0.1.pyo -> /usr/share/blender/scripts/LuxBlend_0.1.pyo

--- Additional comment from kwizart on 2009-01-21 12:44:49 EDT ---

that's not what will append for real:
1- As the per user ~/.blender directory is already created no more files will be copied to the user directory.
2- Nobody wants to write on LuxBlend_0.1.py?. Instead what the plugin expects is to write in its config directory and in its content directory. (see the readme.txt).
Please note that the permission you have showed are the perm of the symlinks, not the perms of the files.

--- Additional comment from jochen on 2009-01-21 12:53:20 EDT ---

(In reply to comment #10)
> that's not what will append for real:
> 1- As the per user ~/.blender directory is already created no more files will
> be copied to the user directory.

Sorry, On eatch start of blender there will be creating symlink from ~/.blnder/scripts to /usr/share/blender/scripts.

> 2- Nobody wants to write on LuxBlend_0.1.py?. Instead what the plugin expects
> is to write in its config directory and in its content directory. (see the
> readme.txt).

I can't find your readme.txt file

--- Additional comment from kwizart on 2009-01-21 13:16:43 EDT ---

(In reply to comment #11)
> (In reply to comment #10)
> > that's not what will append for real:
> > 1- As the per user ~/.blender directory is already created no more files will
> > be copied to the user directory.
> 
> Sorry, On eatch start of blender there will be creating symlink from
> ~/.blnder/scripts to /usr/share/blender/scripts.
It depends on where you consider your error is, so as you like: but quoting blender-wrapper:
When "" if [ ! -d ~/.blender ]; then ""
    install -d ~/.blender/scripts
    ln -sf /usr/share/blender/scripts/bpydata ~/blender/scripts/bpydata
^^ this part is wrong - and a misunderstanding of what bpydata and bpydata/config directories are
(namely the content and configuration directories for scripts that are meant to be user <<<writable>>>).
But there is a typo (blender instead of .blender) so it doesn't work anyway.

Then,:
rm -r ~/.blender/scripts/*.p*
Why end-users aren't allowed to have their own scripts ?


> > 2- Nobody wants to write on LuxBlend_0.1.py?. Instead what the plugin expects
> > is to write in its config directory and in its content directory. (see the
> > readme.txt).
> 
> I can't find your readme.txt file
rpm -ql blender |grep readme.txt


I'm still unsure of the accurate solution, so it is just workinprogress thoughts.

Comment 1 Nicolas Chauvet (kwizart) 2009-01-27 00:25:39 UTC
Bug cloned as this problem deserves it's own bug report:
Testing the blender-wraper script from 2.48a-13 devel cvs.

Comment 2 Jochen Schmitt 2009-01-27 15:57:09 UTC
It may be nice, if you may remove your ยจ/.blender directory and try your test again.

It may be helpful, if you can explain all your steps you have done for your test.

Comment 3 Nicolas Chauvet (kwizart) 2009-02-19 21:38:02 UTC
I saw you've tweaked the blender-wrapper script on devel, 
I will test again soon.

Comment 4 Jochen Schmitt 2009-03-16 19:35:25 UTC
Because I didn't heared any complaints from you, I will close thei bug now.

Comment 5 Nicolas Chauvet (kwizart) 2009-03-16 23:37:12 UTC
Okay, so does LuxRender and/or yafaray are working ?
https://bugzilla.redhat.com/show_bug.cgi?id=458090
https://bugzilla.redhat.com/show_bug.cgi?id=467655

Sorry but I really lack time.


Note You need to log in before you can comment on or make changes to this bug.