dragonresearch / rpki.net

Dragon Research Labs rpki.net RPKI toolkit
53 stars 30 forks source link

rpki-manage: line 10: syncdb: command not found #446

Closed sraustein closed 11 years ago

sraustein commented 11 years ago

new install on 12.04 successfully ran rpki-sql-setup now following https://trac.rpki.net/wiki/doc/RPKI/CA/UI/GUI

ca0.vmini:/root# rpki-manage syncdb /usr/sbin/rpki-manage: line 10: syncdb: command not found

ca0.vmini:/root# rpki-manage --help /usr/sbin/rpki-manage: line 10: --help: command not found

Trac ticket #431 component build priority minor, owner melkins, created by randy on 2013-02-28T06:08:30Z, last modified 2013-03-15T16:08:52Z

sraustein commented 11 years ago

i don't think this is setting the $PYTHONPATH you want

{{{

!sh

!/usr/bin/env bash

django-admin seems to have problems creataing the superuser account when

$LANG is unset

if [ -z "$LANG" ]; then echo '$LANG is unset, default to en_US.UTF-8' export LANG=en_US.UTF-8 fi export PYTHONPATH=/etc/rpki${PYTHONPATH:+:}${PYTHONPATH} DJANGO_SETTINGS_MODULE=settings $* }}}

Trac comment by randy on 2013-02-28T08:24:31Z

sraustein commented 11 years ago

The $PYTHONPATH looks OK to me. It is just prepending /etc/rpki (where I assume your settings.py lives).

The problem is that configure must not have picked up the correct location for the django-admin.py script, and did not fail properly at that time.

Trac comment by melkins on 2013-02-28T17:05:55Z

sraustein commented 11 years ago

In [changeset:5090]: {{{

!CommitTicketReference repository="" revision="5090"

if the django-admin script is not found, configure should exit and inform the user so they can correct their $PATH

see #431 }}}

Trac comment by melkins on 2013-02-28T17:15:03Z

sraustein commented 11 years ago

can you verify that django-admin.py is in your $PATH? configure will now properly fail if it can't be found.

Trac comment by melkins on 2013-02-28T17:16:18Z

sraustein commented 11 years ago

and just how do i svn up when i installed by package?

Trac comment by randy on 2013-02-28T20:04:44Z

sraustein commented 11 years ago

The commit doesn't fix anything except the error message, so you don't really need to worry about it.

My question still stands: is django-admin or django-admin.py in your $PATH?

I'm guess you do have django installed, otherwise the configure script would have bombed out. It may be something as simple as the django-admin script going somewhere in /usr/local and you don't have /usr/local/bin in your $PATH by default.

Trac comment by melkins on 2013-02-28T20:11:48Z

sraustein commented 11 years ago

My question still stands: is django-admin or django-admin.py in your $PATH?

can not tell, as the system is now in my suitcase :)

will check when i get home. but i put

{{{ echo $PYTHONPATH }}}

into the rpki-manage script and the result was

{{{ /etc/rpki }}}

Trac comment by randy on 2013-02-28T20:33:09Z

sraustein commented 11 years ago

The problem is that configure must not have picked up the correct location for the django-admin.py script, and did not fail properly at that time.

With binary packages, ./configure was run on a different machine administered by somebody else.

Trac comment by sra on 2013-02-28T21:43:42Z

sraustein commented 11 years ago

and just how do i svn up when i installed by package?

You wait for me to generate a new package corresponding to the new svn version, since I haven't automated that yet.

No time to do that before flight boards, sorry, managed "svn up" and may upload new package from Hong Kong.... :)

Trac comment by sra on 2013-02-28T21:46:24Z

sraustein commented 11 years ago

My question still stands: is django-admin or django-admin.py in your $PATH?

I'm guess you do have django installed, otherwise the configure script would have bombed out. It may be something as simple as the django-admin script going somewhere in /usr/local and you don't have /usr/local/bin in your $PATH by default.

I think I know what happened.

pip install puts Django and South in /usr/local. The Debian package build system refuses to believe that anything in a package should depend on anything in /usr/local, so it removes /usr/local/bin from $PATH before running ./configure, regardless of the original setting.

So rpki-manage is built without finding django-admin, and now that you've hacked configure.ac not to allow that, the Ubuntu package flat out refuses to build.

Moving to our own APT repository will "fix" this, but I'm skeptical about the wisdom of building rpki-manage this way. Perhaps the ten zillion rpki-manage scripts should become rpkic commands instead, so that the user also gets inline help, command completion, etcetera?

Trac comment by sra on 2013-03-01T03:37:41Z

sraustein commented 11 years ago

On Fri, Mar 01, 2013 at 03:37:41AM -0000, Trac Ticket System wrote:

Moving to our own APT repository will "fix" this, but I'm skeptical about the wisdom of building rpki-manage this way. Perhaps the ten zillion rpki-manage scripts should become rpkic commands instead, so that the user also gets inline help, command completion, etcetera?

Not sure what you mean by "ten zillion rpki-manage" scripts. There is only a single script that wraps django-admin.py by setting the appropriate environment variables for the RPKI gui application.

I'm not sure what would be involved with trying to embed django-admin in rpkic, but one current issue is that rpkic isn't concerned with the rpki.gui.app application, and it would be required since django-admin.py is used to manage the application.

Trac comment by melkins on 2013-03-01T04:08:04Z

sraustein commented 11 years ago

ok, ca0.vmini is back online, now in tokyo

ca0.vmini:/root# echo $PATH /bin:/sbin:/usr/bin:/usr/sbin:/usr/X11/bin:/usr/local/bin:/usr/local/bin:/usr/local/sbin

ca0.vmini:/root# which django-admin.py /usr/local/bin/django-admin.py

Trac comment by randy on 2013-03-01T09:23:18Z

sraustein commented 11 years ago

my understanding, and please correct me, is i wait for a new package from sra

Trac comment by randy on 2013-03-01T09:54:38Z

sraustein commented 11 years ago

my understanding, and please correct me, is i wait for a new package from sra

yes, that is correct. sra pointed out that the package building software "helpfully" removes /usr/local from the $PATH.

Trac comment by melkins on 2013-03-01T17:02:36Z

sraustein commented 11 years ago

the rpki-ca package now uses the rebuilt python-django package which resolves the core issue of this bug

Trac comment by melkins on 2013-03-15T16:08:52Z

sraustein commented 11 years ago

Closed with resolution fixed