473,231 Members | 1,511 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Zope, M2Crypto, and Gentoo

Hi, all;

I'm strictly an amateur developer who has dabbled in a half dozen
languages on eight or nine systems over 20 years or so. I have never
devoted the time or energy to thoroughly learn any one of them, so I have
become a true JOATAMON (Jack Of All Trades And Master Of None). I
apologize in advance for any truly newb sounding questions. I did Google
for this in several places first (Zope.org, Gentoo forums, and Google
UseNet search) and haven't found anything relevant.

I'm working on a Zope project that I hope to make as portable as
possible. Target platforms for sure are Linux and Windows. Other
desirable platforms would be Mac OS/X and *BSD. My development box is a
Gentoo installation. All software running came from Gentoo ebuilds.

One of the things that I'm striving for is the smallest footprint
possible to help reduce the number of platform specific issues. I want
to add HTTPS functionality to this project. I've run into what looks
like either a documentation issue, or possibly a Gentoo ebuild specific
issue. I have posted the same question to the Gentoo forums, but in case
it's a Zope or M2Crypto specific documentation issue I thought I'd repeat
it here.

I'm currently running Zope 2.7.2-r1, and I just grabbed M2Crypto 0.12-r1
(latest offered as a stable Gentoo ebuild) last night. I was reading
through the included ZServerSSL-HOWTO.html. This HOWTO was written for
M2Crypto 0.11 and Zope 2.6.*.

According to the HOWTO I need to, and I quote:

====================

"The ZServerSSL distribution is in $M2/demo/Zope. We shall refer to this
directory as $ZSSL.
Installation
Below, we refer to your Zope top-level directory as $ZOPE.
Copy $ZSSL/z2s.py into $ZOPE.

Depending on your operating system, modify $ZOPE/start or $ZOPE/start.bat
to invoke $ZOPE/z2s.py, instead of $ZOPE/z2.py. The files $ZSSL/starts
and $ZSSL/starts.bat serve as examples."

=====================

However, there IS no z2.py on my system. Instead, my
/etc/init.d/myzopeserver file calls zopectl, which in turn calls a
configuration file that resides underneath /var/lib/zope/myzopeserver.

Has anyone out there gotten this particular combination to work? Is
there an easy way to pull this off? Am I just being incredibly dense and
looking in the wrong place?

TIA
--
Jim Smilanich js*****@visi.com
=JpS=SgtRock
"A man should be able to pilot a starship, plan an invasion, diaper
a baby, ....specialization is for insects!" -- Lazarus Long
Jul 18 '05 #1
5 2244
>>>>> "jsmilan" == jsmilan <js*****@tiny.net> writes:

jsmilan> However, there IS no z2.py on my system. Instead, my
jsmilan> /etc/init.d/myzopeserver file calls zopectl, which in
jsmilan> turn calls a configuration file that resides underneath
jsmilan> /var/lib/zope/myzopeserver.

jsmilan> Has anyone out there gotten this particular combination
jsmilan> to work? Is there an easy way to pull this off? Am I
jsmilan> just being incredibly dense and looking in the wrong
jsmilan> place?

You're not being dense but you are looking in the wrong place. Check
out the demo/Zope27 sub-directory of the mycrypto src distro.

Here are my condensed install notes, which basically summarize the
instructions from the Zope27 directory

Install m2crypto

You'll need SWIG 1.3.21 :
http://aleron.dl.sourceforge.net/sou....3.22.tar.gz):
./configure; make; sudo make install

Get the m2 src
http://sandbox.rulemaker.net/ngps/Di...rypto-0.13.zip

I had to edit setup.py and add the following to the include_dirs
for posix systems (on or around line 75

include_dirs = [my_inc, '/usr/include', '/usr/kerberos/include/']
python setup.py build
sudo python setup.py install

Installing ZServer
cd /var/tmp/build/m2crypto-0.13/
cd demo/Zope27/
cp install_dir/lib/python/ZServer/HTTPS_Server.py /usr/local/Zope-2.7.2/lib/python/ZServer/
cp install_dir/lib/python/ZServer/medusa/https_server.py /usr/local/Zope-2.7.2/lib/python/ZServer/medusa/
less install_dir/lib/python/ZServer/__init__.py.patch
cd /usr/local/Zope-2.7.2/lib/python/ZServer/
mkdir /var/tmp/back

rm -rf /var/tmp/back
cp -a * /var/tmp/back/
patch -p0 < /var/tmp/build/m2crypto-0.13/demo/Zope27/install_dir/lib/python/ZServer/__init__.py.patch
patch -p0 < /var/tmp/build/m2crypto-0.13/demo/Zope27/install_dir/lib/python/ZServer/component.xml.patch
patch -p0 < /var/tmp/build/m2crypto-0.13/demo/Zope27/install_dir/lib/python/ZServer/datatypes.py.patch

# now patch instance home
cd /var/tmp/build/m2crypto-0.13/demo/Zope27/
mkdir /usr/local/Zope-2.7.2/zope_instance/ssl
cp instance_home/ssl/*.pem /usr/local/Zope-2.7.2/zope_instance/ssl/
cd /usr/local/Zope-2.7.2/zope_instance/
cp README.txt etc/zope.conf /var/tmp/back/
patch -p0 < /var/tmp/build/m2crypto-0.13/demo/Zope27/instance_home/README.txt.patch
cd etc/
patch -p0 < /var/tmp/build/m2crypto-0.13/demo/Zope27/instance_home/etc/zope.conf.patch

# symlink ssl
cd /usr/local/Zope-2.7.2/
ln -s zope_instance/ssl
JDH
Jul 18 '05 #2
I answered John by email before I saw his response here. (Thanks, John!)
Basically, I'm not opposed to taking that approach as a last resort.
However, doing so would mean giving up the automatic upate process for
Gentoo. Does anyone else have any ideas?
John Hunter <jd******@ace.bsd.uchicago.edu> wrote:

[snip]
--
Jim Smilanich js*****@visi.com
=JpS=SgtRock
"A man should be able to pilot a starship, plan an invasion, diaper
a baby, ....specialization is for insects!" -- Lazarus Long
Jul 18 '05 #3
Hi Jim,

js*****@tiny.net wrote:
I answered John by email before I saw his response here. (Thanks, John!)
Basically, I'm not opposed to taking that approach as a last resort.
However, doing so would mean giving up the automatic upate process for
Gentoo. Does anyone else have any ideas?

I also like the emerge facility of Gentoo, but I think that things like
a webserver (and problably some dependencies) should be installed from
source. After all, you don't know what modules are included on the
python binary of gentoo. For example, it will be hard to add ldap
support for python/zope, since ldap may require some special flags that
aren't included on the binary installation.

The other problem is that with the binaries the files will be stored on
different locations. I personaly preffer to compile the software I use
on /usr/local/mySoftName. By doing this, you now where your binaries and
config files are.

Finally, I don't know if the python installed by gentoo, is the same one
as the one installed when emerging zope. This could be also an issue,
since you can have to different pythons on your system, but only one
will have m2crypto support.

The other thing is that I don't know if the m2crypto version that you
mentioned (0.13) have the latest ZServerssl for zope 2.7. That's other
reason why your install is failing: you are installing ZServerssl for
zope 2.6.

If you still want to proceed with the binaries, then you have to look
for the locations of your python, zope, and m2Crypto with the qpkg
command of gentoo (this command isn't normally installed with gentoo, I
don't remmember which ebuild you will have to install). ie:

% qpkg -l python | more

first I adviced you to watch the init script of zope and see which
python is used. Then call the python console and try to see if m2crypto
is installed there:

% /your/python/path/python
import M2Crypto


If you don't see any error, then you are lucky and it means that the
python used by your zope has M2Crypto installed. If you see an error,
then you will have to manually install m2crypto as indicated by John.

Unfortunatelly I think you will have to manually install ZServerssl for
zope 2.7 as indicated by John because m2crypto does not do this.

Regards,
Josef
Jul 18 '05 #4
Josef;

Thanks for your comments. Maybe I should elaborate a bit more.

This project that I'm doing is a very small one. One objective is to
teach myself object oriented programming in the simplest environment
possible. If I am successful, I hope to have a standalone application
that can be bundled up for Windows, Linux, and hopefully Mac OSX.
However, I'll be happy if I can just get everything to work. :)

The project itself is an admin tool for gameservers. Very simple
requirements; read in a text configuration file, provide a Web interface
to edit it line by line with some integrity checking on variable names,
and write the text file back out. Nothing exciting at all.

That means a very small number of users, only one user accessing a given
file at a time, etc. LDAP is really overkill, as is another Webserver.
Heck, I wouldn't even be looking at m2crypto if it weren't for the fact
I want this tool to manage remote servers.

As it stands now, I haven't tried anything with it. I think my next step
is to contact the guy who maintains m2crypto, describe my situation, and
ask him if he has any thoughts.

Thanks again.

Jim
Josef Meile <jm****@hotmail.com> wrote:
Hi Jim, js*****@tiny.net wrote:
I answered John by email before I saw his response here. (Thanks, John!)
Basically, I'm not opposed to taking that approach as a last resort.
However, doing so would mean giving up the automatic upate process for
Gentoo. Does anyone else have any ideas?I also like the emerge facility of Gentoo, but I think that things like
a webserver (and problably some dependencies) should be installed from
source. After all, you don't know what modules are included on the
python binary of gentoo. For example, it will be hard to add ldap
support for python/zope, since ldap may require some special flags that
aren't included on the binary installation.

The other problem is that with the binaries the files will be stored on
different locations. I personaly preffer to compile the software I use
on /usr/local/mySoftName. By doing this, you now where your binaries and
config files are. Finally, I don't know if the python installed by gentoo, is the same one
as the one installed when emerging zope. This could be also an issue,
since you can have to different pythons on your system, but only one
will have m2crypto support. The other thing is that I don't know if the m2crypto version that you
mentioned (0.13) have the latest ZServerssl for zope 2.7. That's other
reason why your install is failing: you are installing ZServerssl for
zope 2.6. If you still want to proceed with the binaries, then you have to look
for the locations of your python, zope, and m2Crypto with the qpkg
command of gentoo (this command isn't normally installed with gentoo, I
don't remmember which ebuild you will have to install). ie: % qpkg -l python | more first I adviced you to watch the init script of zope and see which
python is used. Then call the python console and try to see if m2crypto
is installed there: % /your/python/path/python
import M2Crypto
If you don't see any error, then you are lucky and it means that the
python used by your zope has M2Crypto installed. If you see an error,
then you will have to manually install m2crypto as indicated by John. Unfortunatelly I think you will have to manually install ZServerssl for
zope 2.7 as indicated by John because m2crypto does not do this. Regards,
Josef


--
Jim Smilanich js*****@visi.com
=JpS=SgtRock
"A man should be able to pilot a starship, plan an invasion, diaper
a baby, ....specialization is for insects!" -- Lazarus Long
Jul 18 '05 #5
Hi Jim,
That means a very small number of users, only one user accessing a given
file at a time, etc. LDAP is really overkill, as is another Webserver.
Heck, I wouldn't even be looking at m2crypto if it weren't for the fact
I want this tool to manage remote servers. LDAP was only an example. Some python modules require special building
settings, which usually aren't included on the binary distributions.
As it stands now, I haven't tried anything with it. I think my next step
is to contact the guy who maintains m2crypto, describe my situation, and
ask him if he has any thoughts.

Did you try finding the python used by zope and checked if it has
m2crypto installed? I think theoretically the installation should work
also with the binaries as well. You only need to know where your files
are and the rest shouldn't be difficult. Afterall, I think m2Crypto
isn't a complicated module and doesn't have special requirements.

Regards,
Josef
Jul 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Carl Waldbieser | last post by:
I tried to adapt the instructions for building the M2Crypto module (http://sandbox.rulemaker.net/ngps/m2/INSTALL.html) to build a version compatible with Python2.3, but I've had some mixed results....
4
by: Jochen Demuth | last post by:
Hi, I am trying to install ZWiki on Zope 2.5.1 / Debian 2.4.20-bf2.4-xfs. First I copied the contents of the ZWiki-0.32.0.tgz to the Products-directory under SOFTWARE_HOME: This is what it...
1
by: morphex | last post by:
Hi, I get the following messages running the testall.py script with m2crypto 0.13, can anyone tell me what's wrong? .................................................................EEEEEE...
5
by: KW | last post by:
I'm trying to convert some PHP code using OpenSSL to Python and I'm stuck on openssl_sign() which uses an RSA private key to compute a signature. Example PHP code: $privkeyid =...
0
by: markacy | last post by:
Hello All, I've been using zope and matplotlib for some time now, and I want to connect them. I'am using the example code from page: http://www.scipy.org/Cookbook/Matplotlib/Matplotlib_and_Zope...
8
by: John Nagle | last post by:
Here's a wierd problem: I have a little test case for M2Crypto, which just opens up SSL connections to web servers and reads their certificates. This works fine. But if I execute ...
8
by: John Nagle | last post by:
I've been running M2Crypto successfully using Python 2.4 on Windows 2000, and now I'm trying to get it to work on Python 2.3.4 on Linux. Attempting to initialize a context results in Traceback...
7
by: John Nagle | last post by:
Back in March, I posted this: That was for M2Crypto 0.17. It's still broken in M2Crypto 0.18. And there's no RPM or Windows binary. Nobody actually uses this stuff, do they?
2
by: Bojan Mihelac | last post by:
Hi all! I am trying to install M2Crypto to work on OSX10.5 apache (mod_python). Error I receive: Error was: dlopen(/Library/WebServer/eggs/M2Crypto-0.18.2-py2.5-...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.