Re: There are only two Authentication method available.

2013-01-16 Thread Gav Main
Awesome, that was a huge help!

So the first time I ran the snippit below it gave me this:

 import pkg_resources
 list(pkg_resources.iter_entry_points('reviewboard.auth_backends'))
[]

To cut a long story short, we custom build packages for a lot of things and
unpack them to /path/to/packages/package_name/, then symlink to a common
location which makes dealing with PATH's very easy. So for example

/path/to/packages/reviewboard/site-packages/reviewboard-1.6.15.egg-info/
links to /path/to/common/site-packages/reviewboard-1.6.15.egg-info.

When we upgraded from 1.6.5 to 1.6.15 the process should have tidied up the
old version from /path/to/common/site-packages, but didn't do its job
properly. It cleared the contents of the old directory, but left the
directory itself behind. I straced the Python shell which showed me it was
looking for entry_points.txt under /path/to/common/site-packages, fine. It
then came across the old (empty) directory for reviewboard-1.6.5.egg-info,
saw it was empty and moved on, it didn't bother to check the new
reviewboard-1.6.15.egg-info directory that had a valid entry_points.txt
file inside. So I just removed all the old egg-info directories,
re-imported the database, ran rb-site upgrade and boom the drop-down
miraculously appeared.

I really appreciate you taking the time to help me, I've learned a bit more
about Python and can happily crack on with my testing now.

Cheers Christian!


On 16 January 2013 16:30, Christian Hammond chip...@chipx86.com wrote:

 Hi Gavin,

 Thanks for the detailed info.

 The fact that the LDAP setup isn't working shouldn't prevent Review Board
 from showing you the option in the list, so that's unlikely to be it.

 Try this on the server and see what happens:

 $ python
  import pkg_resources
  list(pkg_resources.iter_entry_points('reviewboard.auth_backends'))

 If that shows an empty list, then the installed packages are failing to
 bundle the provided entry points correctly, which is how we scan for known
 auth backends. (You can see the file in the
 ReviewBoard-*/EGG-INFO/entrypoints.txt file). I don't know off-hand what
 the problem would be, but hopefully that'll give you a start in diagnosing
 it.

 Christian


 --
 Christian Hammond - chip...@chipx86.com
 Review Board - http://www.reviewboard.org
 VMware, Inc. - http://www.vmware.com

 On Jan 15, 2013, at 11:53 PM, Gav Main gavm...@gmail.com wrote:

 Hi Christian,

 I appreciate you replying so quickly. We have the RH supplied version
 installed (python-ldap-2.3.10-1.el6.x86_64).

 To give you a bit more information. We are looking to move from
 ReviewBoard 1.6.5 - 1.6.15. I have setup a lab instance of ReviewBoard
 1.6.5 running on RHEL 6.3, which points to a clone of the production MySQL
 database, which I created with mysqldump . I am deploying all ReviewBoard
 dependencies as custom built RPM's via Puppet. 'rb-site upgrade' complained
 that some of the dependencies were out of date, so I've repackaged those
 (they are starred).

 python-dateutil-1.5
 python-django-1.3.4*
 python-django-evolution-0.6.7
 python-djblets-0.6.27*
 python-flup-1.0.3.dev-20110405
 python-feedparser-5.1.2*
 python-memcached-1.48
 python-paramiko-1.7.7.1
 python-pil-1.1.7
 python-pycrypto-2.5
 python-pygments-1.5
 python-pysvn-1.7.6
 python-pytz-2012c
 python-recaptcha-client-1.0.6
 python-reviewboard-1.6.15*
 python-setuptools-0.6c11

 I've typically been building the RPMS with:
 %build
 CFLAGS=$RPM_OPT_FLAGS %{__python} -c 'import setuptools;
 execfile(setup.py)' build
 ...
 %{__python} -c 'import setuptools; execfile(setup.py)' install
 --skip-build  --root $RPM_BUILD_ROOT --install-lib
 %{_basedir}/%{sw_name}-%{sw_version}/site-packages --install-data
 %{_basedir}/%{sw_name}-%{sw_version}/site-packages


 When I run rb-site upgrade I get this:
 # rb-site -d upgrade /local/apache
 Rebuilding directory structure
 Updating database. This may take a while.
 /opt/local/site-packages/djblets/gravatars/__init__.py:26:
 DeprecationWarning: the md5 module is deprecated; use hashlib instead
   from md5 import md5
 Creating tables ...
 Creating table hostingsvcs_hostingserviceaccount
 Upgrading Review Board from 1.6.5 to 1.6.15
 There are unapplied evolutions for reviews.
 There are unapplied evolutions for scmtools.
 Adding baseline version for new models
 Project signature has changed - an evolution is required
 Installing custom SQL ...
 Installing indexes ...
 No fixtures found.
 Evolution successful.
 Resetting in-database caches.
 Upgrade complete.

 After writing all this, I have just realised that I have LDAP connection
 problems on my lab server, which is a bit of a fail on my part. Would that
 be enough for ReviewBoard to not populate the authentication drop-down list?

 Cheers,
 Gavin


 On 16 January 2013 14:30, Christian Hammond chip...@chipx86.com wrote:

 Hi Gavin,

 You'll need the Python ldap module, if you don't have it already.

 Even though you're not using easy_install remotely, are you

Re: There are only two Authentication method available.

2013-01-16 Thread Gav Main
Cheers for the pointer Stephen, I'll check it out. I welcome any solution
that makes life easier.

On 16 January 2013 20:30, Stephen Gallagher step...@gallagherhome.comwrote:

 On 01/16/2013 02:53 AM, Gav Main wrote:
  Hi Christian,
 
  I appreciate you replying so quickly. We have the RH supplied version
  installed (python-ldap-2.3.10-1.el6.x86_64).
 
  To give you a bit more information. We are looking to move from
  ReviewBoard 1.6.5 - 1.6.15. I have setup a lab instance of ReviewBoard
  1.6.5 running on RHEL 6.3, which points to a clone of the production
  MySQL database, which I created with mysqldump . I am deploying all
  ReviewBoard dependencies as custom built RPM's via Puppet. 'rb-site
  upgrade' complained that some of the dependencies were out of date, so
  I've repackaged those (they are starred).
 
 If you are installing on RHEL 6, I *strongly* recommend that you use the
 ReviewBoard 1.6.15 RPMs I maintain in EPEL
 (http://fedoraproject.org/wiki/EPEL). They contain all of the
 appropriate dependencies and can be installed from a yum repository
 (either directly from EPEL on the internet or using a local repository
 inside your intranet).

 I think this will significantly simplify your configuration.



-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en




Re: There are only two Authentication method available.

2013-01-15 Thread Gav Main
Hi Christian,

I appreciate you replying so quickly. We have the RH supplied version
installed (python-ldap-2.3.10-1.el6.x86_64).

To give you a bit more information. We are looking to move from ReviewBoard
1.6.5 - 1.6.15. I have setup a lab instance of ReviewBoard 1.6.5 running
on RHEL 6.3, which points to a clone of the production MySQL database,
which I created with mysqldump . I am deploying all ReviewBoard
dependencies as custom built RPM's via Puppet. 'rb-site upgrade' complained
that some of the dependencies were out of date, so I've repackaged those
(they are starred).

python-dateutil-1.5
python-django-1.3.4*
python-django-evolution-0.6.7
python-djblets-0.6.27*
python-flup-1.0.3.dev-20110405
python-feedparser-5.1.2*
python-memcached-1.48
python-paramiko-1.7.7.1
python-pil-1.1.7
python-pycrypto-2.5
python-pygments-1.5
python-pysvn-1.7.6
python-pytz-2012c
python-recaptcha-client-1.0.6
python-reviewboard-1.6.15*
python-setuptools-0.6c11

I've typically been building the RPMS with:
%build
CFLAGS=$RPM_OPT_FLAGS %{__python} -c 'import setuptools;
execfile(setup.py)' build
...
%{__python} -c 'import setuptools; execfile(setup.py)' install
--skip-build  --root $RPM_BUILD_ROOT --install-lib
%{_basedir}/%{sw_name}-%{sw_version}/site-packages --install-data
%{_basedir}/%{sw_name}-%{sw_version}/site-packages


When I run rb-site upgrade I get this:
# rb-site -d upgrade /local/apache
Rebuilding directory structure
Updating database. This may take a while.
/opt/local/site-packages/djblets/gravatars/__init__.py:26:
DeprecationWarning: the md5 module is deprecated; use hashlib instead
  from md5 import md5
Creating tables ...
Creating table hostingsvcs_hostingserviceaccount
Upgrading Review Board from 1.6.5 to 1.6.15
There are unapplied evolutions for reviews.
There are unapplied evolutions for scmtools.
Adding baseline version for new models
Project signature has changed - an evolution is required
Installing custom SQL ...
Installing indexes ...
No fixtures found.
Evolution successful.
Resetting in-database caches.
Upgrade complete.

After writing all this, I have just realised that I have LDAP connection
problems on my lab server, which is a bit of a fail on my part. Would that
be enough for ReviewBoard to not populate the authentication drop-down list?

Cheers,
Gavin


On 16 January 2013 14:30, Christian Hammond chip...@chipx86.com wrote:

 Hi Gavin,

 You'll need the Python ldap module, if you don't have it already.

 Even though you're not using easy_install remotely, are you using it for
 the eggs you download, or are you using another method?

 Christian

 --
 Christian Hammond - chip...@chipx86.com
 Review Board - http://www.reviewboard.org
 VMware, Inc. - http://www.vmware.com

 On Jan 15, 2013, at 8:05 PM, Gavin Main gavm...@gmail.com wrote:

 I am facing the same issue. I unfortunately don't have the luxury of using
 easy_install as this requires a direct connection to the interwebs
 (something we can't allow). I have packaged up every ReviewBoard 1.6.15
 dependency by hand. 'rb-site' upgrade hinted that I needed the following...
 Djblets (0.6.27), Django (1.3.4) and Feedparser (5.1.2), but when I start
 Reviewboard after successfully running 'rb-site upgrade /path/to/site', I
 lose my LDAP settings. 'DEBUG = True' doesn't give much away.

 Any help would be greatly appreciated. Oh and while I'm here... we love
 ReviewBoard.

 Cheers!

 On Wednesday, 10 October 2012 13:05:36 UTC+8, shravanthi s wrote:

 I am facing a similar issue. Actually I had successfully configured LDAP
 and it was working fine (I am using version 1.6.5). However I had an issue
 with uploading jpeg images so I uninstalled PIL and did some modifications
 to setup.py (JPEG_ROOT = /usr/lib) and reinstalled PIL along with
 libjpeg-devel. I was able to upload jpeg images.

  However a new issue popped up, my LDAP configuration was gone and when i
 checked Authentication settings, there was no LDAP option at all! Only two
 authentication methods were available. Not sure what went wrong. Would an
 upgrade of Review Board resolve the issue? Appreciate your help..

 On Tuesday, 2 October 2012 02:15:14 UTC+5:30, Christian Hammond wrote:

 Running 'easy_install ReviewBoard' won't actually do much of anything.
 You'd need to pass -U to do an upgrade.

 Christian

 --
 Christian Hammond - chi...@chipx86.com
 Review Board - http://www.reviewboard.org
 VMware, Inc. - http://www.vmware.com


 On Sat, Sep 29, 2012 at 12:32 AM, 周培青 zpq...@gmail.com wrote:

 Hi Christian,

 I remember I used easy_install and I tried running easy_install
 ReviewBoard command again and got below information,
  easy_install ReviewBoard
 Searching for ReviewBoard
 Best match: ReviewBoard 1.6.11
 Processing ReviewBoard-1.6.11-py2.6.egg
 ReviewBoard 1.6.11 is already the active version in easy-install.pth
 Installing rb-site script to /usr/bin
 Installing rbssh script to /usr/bin

 Using /usr/lib/python2.6/site-**packages/ReviewBoard-1.6.11-**py2.6.egg
 Processing