Discussion:
gomobile theming
perlion
2011-11-18 04:05:39 UTC
Permalink
I am not quite sure what I am doing wrong. I had previously set up a
test plone site as root with webandmobile and a
gomobiletheme.mycompany. I am now working on setting up the
production site and am trying to replicate my past actions.

The problem: After I install webandmobile,
start plone 4.1,
create a plone site
then run cd /usr/local/Plone/zeocluster/src
../bin/paster create -t gomobile_theme gomobiletheme.mycompanyname
and create the theme
then go back into buildout.cfg and put gomobiletheme.mycompanyname
under the eggs and zcml sections

and define
develop =
# src/my.package
src/gomobiletheme.mycompanyname

then run sudo -u plone bin/buildout
I get a permission error

***@sys:/usr/local/Plone/zeocluster$ sudo -u plone bin/buildout
Develop: '/usr/local/Plone/zeocluster/src/gomobiletheme.mycompanyname'
error: gomobiletheme.mycompanyname.egg-info/requires.txt: Permission
denied
While:
Installing.
Processing develop directory '/usr/local/Plone/zeocluster/src/
gomobiletheme.mycompanyname'.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/usr/local/Plone/buildout-cache/eggs/zc.buildout-1.4.4-
py2.6.egg/zc/buildout/buildout.py", line 1683, in main
getattr(buildout, command)(args)
File "/usr/local/Plone/buildout-cache/eggs/zc.buildout-1.4.4-
py2.6.egg/zc/buildout/buildout.py", line 417, in install
installed_develop_eggs = self._develop()
File "/usr/local/Plone/buildout-cache/eggs/zc.buildout-1.4.4-
py2.6.egg/zc/buildout/buildout.py", line 657, in _develop
zc.buildout.easy_install.develop(setup, dest)
File "/usr/local/Plone/buildout-cache/eggs/zc.buildout-1.4.4-
py2.6.egg/zc/buildout/easy_install.py", line 895, in develop
*args) == 0
AssertionError

Now at this point if I stop and restart plone I can browse the
plonesite but mycompany theme doesn't show up in the add-ons section.

Thinking that this is permission related I tried
sudo -u root bin/buildout

Restarting the zeoserver after this leaves zope/plone un-connectable

running client1 in fg mode gives

***@sys:/usr/local/Plone/zeocluster$ sudo bin/client1 fg
2011-11-17 22:01:51 INFO ZServer HTTP server started at Thu Nov 17
22:01:51 2011
Hostname: 0.0.0.0
Port: 8080
2011-11-17 22:01:51 INFO Zope Set effective user to "plone"
2011-11-17 22:01:54 INFO ZEO.ClientStorage zeostorage ClientStorage
(pid=29936) created RW/normal for storage: '1'
2011-11-17 22:01:54 INFO ZEO.cache created temporary cache file
'<fdopen>'
2011-11-17 22:01:54 WARNING ZEO.zrpc (29936) CW: error connecting to
('127.0.0.1', 8100): ECONNREFUSED
2011-11-17 22:01:54 WARNING ZEO.zrpc (29936) CW: error connecting to
('127.0.0.1', 8100): ECONNREFUSED

My confusion is as to why I can't seem to install gomobiletheme is
installed. If I am screwing up the permissions that is obvious please
enlighten me. I have installed plone/webandmobile as root and as user
with same results.
Mikko Ohtamaa
2011-11-18 08:41:37 UTC
Permalink
Hi Perlion,
Post by perlion
I am not quite sure what I am doing wrong. I had previously set up a
test plone site as root with webandmobile and a
gomobiletheme.mycompany.  I am now working on setting up the
production site and am trying to replicate my past actions.
Never run as your Plone site as root, but I think it's too late to
tell you this in this point :) If someone is spreading such
information that root is the way to do it please direct me to this
person and I will personally take down the mis-information.
Post by perlion
py2.6.egg/zc/buildout/buildout.py", line 657, in _develop
    zc.buildout.easy_install.develop(setup, dest)
  File "/usr/local/Plone/buildout-cache/eggs/zc.buildout-1.4.4-
py2.6.egg/zc/buildout/easy_install.py", line 895, in develop
    *args) == 0
AssertionError
Now at this point if I stop and restart plone I can browse the
plonesite but mycompany theme doesn't show up in the add-ons section.
This eror is from a shitty tool called buildout who some clever guy in
the past thought could be any useful for Plone community. (no hard
feelings)

The error means that buildout cannot read setup.py file of some of
your (development eggs).

Of course, the buildout does't tell you this, but no one really cares
about fixing buildout or its shitty errors, so I apologize you need to
bear this crap.

1) Check that all setup.py files are in src/ folder correctly with
sane permissions

2) Check that buildout.cfg develop= points to eggs in src/ folder
correctly (not mistyped names)

-Mikko
--
You received this message because you are subscribed to the Google Groups "gomobile-dev" group.
To post to this group, send email to gomobile-dev-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to gomobile-dev+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gomobile-dev?hl=en.
Maurits van Rees
2011-11-18 09:20:47 UTC
Permalink
Post by Mikko Ohtamaa
Hi Perlion,
Post by perlion
I am not quite sure what I am doing wrong. I had previously set up a
test plone site as root with webandmobile and a
gomobiletheme.mycompany. I am now working on setting up the
production site and am trying to replicate my past actions.
Never run as your Plone site as root, but I think it's too late to
tell you this in this point :) If someone is spreading such
information that root is the way to do it please direct me to this
person and I will personally take down the mis-information.
And for clarity, 'never run your Plone Site as root' also means never
run bin/buildout as root. This will create files and directories that
only root can write to. For example, the error message you gave has
these lines:

***@sys:/usr/local/Plone/zeocluster$ sudo -u plone bin/buildout
Develop: '/usr/local/Plone/zeocluster/src/gomobiletheme.mycompanyname'
error: gomobiletheme.mycompanyname.egg-info/requires.txt: Permission
denied

I think you will find that the egg-info directory or its parent is owned by root and only writable by root.

Easiest should be to do a 'chown -R plone /usr/local/Plone/zeocluster' (or maybe the parent Plone directory too). Then try bin/buildout again as plone user.
--
Maurits van Rees http://maurits.vanrees.org/
Web App Programmer at Zest Software: http://zestsoftware.nl
"Logical thinking shows conclusively that logical thinking
is inconclusive." - My summary of Gödel, Escher, Bach
--
You received this message because you are subscribed to the Google Groups "gomobile-dev" group.
To post to this group, send email to gomobile-dev-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to gomobile-dev+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gomobile-dev?hl=en.
Maurits van Rees
2011-11-18 22:10:19 UTC
Permalink
Hi Perlion,

Please keep this on-list, thanks.
Post by Mikko Ohtamaa
This eror is from a shitty tool called buildout who some clever guy in
Post by Mikko Ohtamaa
the past thought could be any useful for Plone community. (no hard
feelings)
What are my options?
Post by Mikko Ohtamaa
Post by Mikko Ohtamaa
Never run as your Plone site as root, but I think it's too late to
tell you this in this point :) If someone is spreading such
information that root is the way to do it please direct me to this
person and I will personally take down the mis-information.
If installed as a root install Ubuntu writes Plone into 'group' root
and 'owner' plone except for cfg files.
How do I install as to give control to user plone?
Thanks Maurits and Mikko.
I completely rebuilt Plone using Plone-4.1-
UnifiedInstaller-20110907.tgz and installing to Ubuntu 11.04 as user
"who" using the command "sudo ./install.sh zeo" for a production
environment root install.
After install I edited the buildout.cfg using gksudo nautilus to open
and edit buildout.cfg as it is root owned/group. Ran buildout as "sudo
-u plone bin/buildout"
I was able to start Plone and create a plone site with downloaded add-
ons.
Stopped zope/plone and cd /usr/local/Plone/zeocluster/src
Ran ../bin/paster create -t gomobile_theme gomobiletheme.advair
Got these errors in terminal.
src
gomobile_theme gomobiletheme.advair
ZopeSkel#basic_namespace A basic Python project with a
namespace package
gomobile.templates#gomobile_theme A theme for Go Mobile for Plone
egg: gomobiletheme.advair
package: gomobilethemeadvair
project: gomobiletheme.advair
Expert Mode? (What question mode would you like? (easy/expert/all)?)
['easy']: easy
Version (Version number for project) ['1.0']: 1.0
Description (One-line description of the project) ['A theme for Go
mobile for Plone']: advair
Creating template basic_namespace
Creating directory ./gomobiletheme.advair
File "../bin/paster", line 17, in<module>
paste.script.command.run()
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/command.py", line 84, in run
invoke(command, command_name, options, args[1:])
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/command.py", line 123, in invoke
exit_code = runner.run(args)
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/command.py", line 218, in run
result = self.command()
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/create_distro.py", line 137, in command
template, output_dir, vars)
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/create_distro.py", line 196, in create_template
template.run(self, output_dir, vars)
File "/usr/local/Plone/buildout-cache/eggs/ZopeSkel-2.19-py2.6.egg/
zopeskel/base.py", line 116, in run
templates.Template.run(self, command, output_dir, vars)
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/templates.py", line 58, in run
self.write_files(command, output_dir, vars)
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/templates.py", line 118, in write_files
os.makedirs(output_dir)
File "/usr/local/Plone/Python-2.6/lib/python2.6/os.py", line 157, in
makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: './gomobiletheme.advair'
This is my sticking point. For a production root install how does
plone user over-ride root owned files?
I have had gomobile and theming working but I can't remember if I had
a rootless install before. Maybe that is why I am experiencing
problems with this.
This may be out of the scope of gomobile.dev so please disregard if
necessary.
I think it is out of scope yes, as you probably get the same error when
you use bin/paster to create a different package type. For a better
mailing list I doubt between plone-setup and the product-developers list.

If I have followed you correctly though, you ran bin/buildout as root
and could then start the instance fine as user plone.

Then you tried to create a new package and did this as user 'who'.
Looks like 'who' does not have permission to create a directory
gomobiletheme.advair. So try that either as user plone or as user root.

For the record, I always just use one normal (non-root) user to run the
buildout (placed somewhere in my home directory) or start the instance
or create a new package. I never do that as root or other user.
--
Maurits van Rees http://maurits.vanrees.org/
Web App Programmer at Zest Software: http://zestsoftware.nl
"Logical thinking shows conclusively that logical thinking
is inconclusive." - My summary of Gödel, Escher, Bach
--
You received this message because you are subscribed to the Google Groups "gomobile-dev" group.
To post to this group, send email to gomobile-dev-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to gomobile-dev+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gomobile-dev?hl=en.
Maurits van Rees
2011-11-19 12:20:12 UTC
Permalink
Problem solved. Copy to the list for good measure.

-------- Originele bericht --------
Onderwerp: Re: gomobile theming
Datum: Fri, 18 Nov 2011 18:49:24 -0800 (PST)
Van: perlion <perlion-***@public.gmane.org>
Aan: Maurits van Rees <maurits-***@public.gmane.org>



Thanks again for your help ! Solved. did nothing as root except edit
buildout and run ..bin/paster....theme create script. It did throw
out a permission error again so I had to
sudo chown -R plone /usr/local/Plone/zeocluster/src/
gomobiletheme.advair/gomobiletheme.advair.egg-info then everything
worked fine.

I will perhaps dedicate some time with linux permissions. ; )
Post by Mikko Ohtamaa
Hi Perlion,
Please keep this on-list, thanks.
Post by Mikko Ohtamaa
This eror is from a shitty tool called buildout who some clever guy
in
Post by Mikko Ohtamaa
the past thought could be any useful for Plone community. (no hard
feelings)
What are my options?
Post by Mikko Ohtamaa
Post by Mikko Ohtamaa
Never run as your Plone site as root, but I think it's too late to
tell you this in this point :) If someone is spreading such
information that root is the way to do it please direct me to this
person and I will personally take down the mis-information.
If installed as a root install Ubuntu writes Plone into 'group' root
and 'owner' plone except for cfg files.
How do I install as to give control to user plone?
Thanks Maurits and Mikko.
I completely rebuilt Plone using Plone-4.1-
UnifiedInstaller-20110907.tgz and installing to Ubuntu 11.04 as user
"who" using the command "sudo ./install.sh zeo" for a production
environment root install.
After install I edited the buildout.cfg using gksudo nautilus to open
and edit buildout.cfg as it is root owned/group. Ran buildout as "sudo
-u plone bin/buildout"
I was able to start Plone and create a plone site with downloaded add-
ons.
Stopped zope/plone and cd /usr/local/Plone/zeocluster/src
Ran ../bin/paster create -t gomobile_theme gomobiletheme.advair
Got these errors in terminal.
src
gomobile_theme gomobiletheme.advair
ZopeSkel#basic_namespace A basic Python project with a
namespace package
gomobile.templates#gomobile_theme A theme for Go Mobile for Plone
egg: gomobiletheme.advair
package: gomobilethemeadvair
project: gomobiletheme.advair
Expert Mode? (What question mode would you like? (easy/expert/all)?)
['easy']: easy
Version (Version number for project) ['1.0']: 1.0
Description (One-line description of the project) ['A theme for Go
mobile for Plone']: advair
Creating template basic_namespace
Creating directory ./gomobiletheme.advair
File "../bin/paster", line 17, in<module>
paste.script.command.run()
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/command.py", line 84, in run
invoke(command, command_name, options, args[1:])
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/command.py", line 123, in invoke
exit_code = runner.run(args)
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/command.py", line 218, in run
result = self.command()
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/create_distro.py", line 137, in command
template, output_dir, vars)
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/create_distro.py", line 196, in create_template
template.run(self, output_dir, vars)
File "/usr/local/Plone/buildout-cache/eggs/ZopeSkel-2.19-py2.6.egg/
zopeskel/base.py", line 116, in run
templates.Template.run(self, command, output_dir, vars)
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/templates.py", line 58, in run
self.write_files(command, output_dir, vars)
File "/usr/local/Plone/buildout-cache/eggs/PasteScript-1.7.3-
py2.6.egg/paste/script/templates.py", line 118, in write_files
os.makedirs(output_dir)
File "/usr/local/Plone/Python-2.6/lib/python2.6/os.py", line 157, in
makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: './gomobiletheme.advair'
This is my sticking point. For a production root install how does
plone user over-ride root owned files?
I have had gomobile and theming working but I can't remember if I had
a rootless install before. Maybe that is why I am experiencing
problems with this.
This may be out of the scope of gomobile.dev so please disregard if
necessary.
I think it is out of scope yes, as you probably get the same error when
you use bin/paster to create a different package type. For a better
mailing list I doubt between plone-setup and the product-developers list.
If I have followed you correctly though, you ran bin/buildout as root
and could then start the instance fine as user plone.
Then you tried to create a new package and did this as user 'who'.
Looks like 'who' does not have permission to create a directory
gomobiletheme.advair. So try that either as user plone or as user root.
For the record, I always just use one normal (non-root) user to run the
buildout (placed somewhere in my home directory) or start the instance
or create a new package. I never do that as root or other user.
--
Maurits van Rees http://maurits.vanrees.org/
Web App Programmer at Zest Software:http://zestsoftware.nl
"Logical thinking shows conclusively that logical thinking
is inconclusive." - My summary of Gï¿œdel, Escher, Bach
--
You received this message because you are subscribed to the Google Groups "gomobile-dev" group.
To post to this group, send email to gomobile-dev-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to gomobile-dev+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gomobile-dev?hl=en.
Loading...