Python dependencies + CentOS 6

236 views
Skip to first unread message

Kris Lou

unread,
Jun 16, 2015, 6:30:36 PM6/16/15
to priva...@googlegroups.com
Cornielius,

We're having trouble upgrading from 1.5x to 2.3 in CentOS 6.  What are the python dependencies for 2.3?

Thanks,

Cornelius Kölbel

unread,
Jun 16, 2015, 7:07:08 PM6/16/15
to priva...@googlegroups.com
Hi Kris,

please note, that you need to run the database migration when upgrading
from 1.5 to 2.3.
The database migration will migrate the token table. It will not
reliably migrate the configuration table, since the configuration was
split from one single flat table to a more sophisticated database
structure. I.e. you might need to recreate your resolver and realm.

The dependencies are denoted in the requirements.txt file.
https://github.com/privacyidea/privacyidea/blob/master/requirements.txt

Kind regards
Cornelius
> --
> You received this message because you are subscribed to the Google
> Groups "privacyidea" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to privacyidea...@googlegroups.com.
> To post to this group, send email to priva...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/privacyidea/CAGyTNKHLgz5bcRMdurCPQoFg%2B9_GjQdyLzvCEoiA8SMdYhA_3g%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

--
Cornelius Kölbel
corneliu...@netknights.it
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel


signature.asc

Kris Lou

unread,
Jun 16, 2015, 7:30:00 PM6/16/15
to priva...@googlegroups.com
We get this when running pi-manage.py under Python 2.6, CentOS 6+:

/opt/privacyIDEA2/lib/python2.6/site-packages/cryptography/__init__.py:25: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python.
  DeprecationWarning
Traceback (most recent call last):
  File "/opt/privacyIDEA2/bin/pi-manage.py", line 40, in <module>
    from privacyidea.app import create_app
  File "/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/app.py", line 27, in <module>
    from privacyidea.api.system import system_blueprint
  File "/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/api/system.py", line 66, in <module>
    from .policy import policy_blueprint
  File "/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/api/policy.py", line 523
    + dynamic_pol.get(k, {}).items()) for k in keys}
                                        ^
SyntaxError: invalid syntax

No problems with Python 2.7, but upgrading Python is not fun.

Cornelius Kölbel

unread,
Jun 16, 2015, 7:41:17 PM6/16/15
to priva...@googlegroups.com
Hi Kris,

I am really not sure if it will run with python 2.6!

So it does not like api/policy.py:523:

# combine static and dynamic policies
keys = static_pol.keys() + dynamic_pol.keys()
pol = {k: dict(static_pol.get(k, {}).items()
+ dynamic_pol.get(k, {}).items()) for k in keys}

We could however combine the two dictionaries in another way, but
I am not sure if there would be other locations it would break.
It is not actively tested with python 2.6

(Honestly I had bad conscience because it did not run under python3)

So what do you suggest?

Kind regards
Cornelius
> https://groups.google.com/d/msgid/privacyidea/CAGyTNKEGD9b3rEZURSU9Rcc_H6iLerj8-w1L8QTrCbmFTKkdtA%40mail.gmail.com.
signature.asc

Kris Lou

unread,
Jun 16, 2015, 7:55:04 PM6/16/15
to priva...@googlegroups.com
This breaks PI for CentOS 6, which has support for another 5 years!

Well, my personal preference is to utilize repos whenever possible, but there's obviously exceptions.  I suppose the first question is, what version(s) of Python are most compatible?

Cornelius Kölbel

unread,
Jun 17, 2015, 5:02:14 AM6/17/15
to priva...@googlegroups.com
Hi Kris,

privacyIDEA definitively does not run with python 2.6.
The change from 1.5 to 2.0 was a major rewrite and the decision was made
for a more modern and reliable design, which came with some
dependencies, so that 2.6 can not be supported anymore, easily.

I know, that it runs on 2.7.3, 2.7.6 and 2.7.9. So take it, that it runs
with 2.7.x

It is correct, that CentOS has up to 10 years of support of _one_
_release_. This is the main idea behind CentOS.

This is not the idea behind privacyIDEA.
I understand that in certain cases having a longer support is necessary.
(You probably could get BUGFIXING for privacyIDEA 1.5 for ten years,
too)
But this can not be assured by such an open source project. And again
this is not the main scope of this project.

And this is why there is professional Support available, to cover all
those needs.
https://netknights.it/en/leistungen/support/

Nevertheless, you might take a look at pythonbrew, install 2.7 in a
local directory and create a virtualenv with 2.7.

Kind regards
Cornelius
> +unsub...@googlegroups.com.
> > > To post to this group, send email to
> > priva...@googlegroups.com.
> > > To view this discussion on the web visit
> > >
> >
> https://groups.google.com/d/msgid/privacyidea/CAGyTNKHLgz5bcRMdurCPQoFg%2B9_GjQdyLzvCEoiA8SMdYhA_3g%40mail.gmail.com.
> > > For more options, visit
> https://groups.google.com/d/optout.
> >
> > --
> > Cornelius Kölbel
> > corneliu...@netknights.it
> > +49 151 2960 1417
> >
> > NetKnights GmbH
> > http://www.netknights.it
> > Landgraf-Karl-Str. 19, 34131 Kassel, Germany
> > Tel: +49 561 3166797, Fax: +49 561 3166798
> >
> > Amtsgericht Kassel, HRB 16405
> > Geschäftsführer: Cornelius Kölbel
> >
> >
> > --
> > You received this message because you are subscribed
> to the
> > Google Groups "privacyidea" group.
> > To unsubscribe from this group and stop receiving
> emails from
> > it, send an email to privacyidea
> +unsub...@googlegroups.com.
> --
> You received this message because you are subscribed to the Google
> Groups "privacyidea" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to privacyidea...@googlegroups.com.
> To post to this group, send email to priva...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/privacyidea/CAGyTNKEJKUDundiJCuXV12jw30o0N%3D6SVyQSWk-nfCjysDEvRw%40mail.gmail.com.
signature.asc
Reply all
Reply to author
Forward
0 new messages