incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CGS <cgsmcml...@gmail.com>
Subject Re: CouchDB packaging for Ubuntu
Date Thu, 14 Jun 2012 00:41:22 GMT
Hi,

Sorry for delay, but I had an "emergency" at a project and I didn't have
time to work on the tests. My apologies.

I restructured all the paths in order for you to work easier with them.
That means:

COUCHDB_TEST_ETAP_PATH "./tests"
COUCHDB_TEST_LIB_PATH "/usr/local/lib/couchdb/erlang/lib"
COUCHDB_TEST_ETC_PATH "/usr/local/etc/couchdb"
COUCHDB_TEST_WEB_PATH "/usr/local/share/couchdb"
COUCHDB_TEST_DBS_PATH "/usr/local/var/lib/couchdb"
COUCHDB_TEST_EBIN "ebin"
COUCHDB_TEST_VERSION "-1.2.0"
COUCHDB_TEST_ETAP_VERSION ""
COUCHDB_TEST_EJSON_VERSION "-0.1.0"
COUCHDB_TEST_ERLANG_OAUTH_VERSION ""
COUCHDB_TEST_IBROWSE_VERSION "-2.2.0"
COUCHDB_TEST_MOCHIWEB_VERSION "-1.4.1"
COUCHDB_TEST_SNAPPY_VERSION "-1.0.3"

You have the explained in README. Nevertheless, knowing the odds for
someone to read a README file, here there is a copy:

COUCHDB_TEST_ETAP_PATH - It's the path toward the tests. E.g.,
"/home/couchdb/couchdb_etap/tests". It accepts "./tests"
COUCHDB_TEST_LIB_PATH - It's the absolute path toward the CouchDB library
directory. E.g., "/usr/local/lib/couchdb/erlang/lib"
COUCHDB_TEST_ETC_PATH - It's the absolute path toward the CouchDB etc
directory. E.g., "/usr/local/etc/couchdb"
COUCHDB_TEST_WEB_PATH - It's the absolute path toward the web directory
(where www and server directories are). E.g., "/usr/local/share/couchdb"
COUCHDB_TEST_DBS_PATH - It's the absolute path toward the databases
directory. E.g., "/usr/local/var/lib/couchdb"
COUCHDB_TEST_EBIN - It's the location of the .beam files. E.g., "ebin"
COUCHDB_TEST_VERSION - It's the CouchDB library directory suffix. E.g.,
"-1.2.0"
COUCHDB_TEST_ETAP_VERSION - It's the ETap library directory suffix
(installed in CouchDB). E.g., ""
COUCHDB_TEST_EJSON_VERSION - It's the EJSON library directory suffix. E.g.,
"-0.1.0"
COUCHDB_TEST_ERLANG_OAUTH_VERSION - It's the Erlang OAuth library directory
suffix. E.g., ""
COUCHDB_TEST_IBROWSE_VERSION - It's the iBrowse library directory suffix.
E.g., "-2.2.0"
COUCHDB_TEST_MOCHIWEB_VERSION - It's the Mochiweb library directory suffix.
E.g., "-1.4.1"
COUCHDB_TEST_SNAPPY_VERSION - It's the Snappy library directory suffix.
E.g., "-1.0.3"

Don't forget to run the tests with root privileges (a.k.a., sudo
./test.sh). ;)

Forgive my "verbosity". If you have more questions or problems, let me know.

Cheers,
CGS



On Tue, Jun 12, 2012 at 7:34 PM, till <klimpong@gmail.com> wrote:

> Attachment didn't make it through – can you a patch/file?
>
>
> On Tuesday, June 12, 2012 at 6:22 PM, CGS wrote:
>
> > OK. I understand.
> >
> > For the moment, replace test_util.erl from utils with the file attached
> here. This should remove COUCHDB_TEST_PATH from the path. I will rewrite
> test_util.erl to get the paths independently for your repo.
> >
> > CGS
> >
> >
> >
> >
> >
> > On Tue, Jun 12, 2012 at 6:06 PM, till <klimpong@gmail.com (mailto:
> klimpong@gmail.com)> wrote:
> > > 3> test_util:config_files().
> > > ["/usr/etc/couchdb/default.ini",
> > >  "/home/vagrant/buildbox/testsuite/tests/random_port.ini",
> > >  "/usr/etc/couchdb/local.ini"]
> > >
> > > This is the problem – the prefix is not used for sysconfdir. The dir
> is in /etc not in PREFIX/etc.
> > >
> > > Till
> > >
> > > --
> > > till
> > > Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
> > >
> > >
> > > On Tuesday, June 12, 2012 at 5:52 PM, CGS wrote:
> > >
> > > > Can you do a test for me? Please, open an Erlang shell (erl) in
> tests/
> > > > directory (hopefully you will still have the test_util.beam file) and
> > > > copy-paste these lines (exit with CTRL+g and q<Enter>):
> > > >
> > > > l(test_util).
> > > > test_util:init_code_path().
> > > > test_util:config_files().
> > > > l(couch_config).
> > > > couch_config:start_link(test_util:config_files()).
> > > > l(couch_drv).
> > > > couch_drv:start_link().
> > > >
> > > > Your result should look like this:
> > > >
> > > > 1> l(test_util).
> > > > {module,test_util}
> > > > 2> test_util:init_code_path().
> > > > ok
> > > > 3> test_util:config_files().
> > > > ["/usr/etc/couchdb/default.ini",
> > > > "<path_to_tests_dir>/random_port.ini",
> > > > "/usr/etc/couchdb/local.ini"]
> > > > 4> l(couch_config).
> > > > {module,couch_config}
> > > > 5> couch_config:start_link(test_util:config_files()).
> > > > {ok,<0.38.0>}
> > > > 6> l(couch_drv).
> > > > {module,couch_drv}
> > > > 7> couch_drv:start_link().
> > > > {ok,<0.41.0>}
> > > >
> > > > where <path_to_local_dir> should be the same set
> COUCHDB_TEST_ETAP_PATH and
> > > > the same with the result of pwd (considering you are still in tests
> > > > directory). Let me know the output, please.
> > > >
> > > > CGS
> > > >
> > > >
> > > >
> > > >
> > > > On Tue, Jun 12, 2012 at 5:21 PM, till <klimpong@gmail.com (mailto:
> klimpong@gmail.com) (mailto:klimpong@gmail.com)> wrote:
> > > >
> > > > >
> > > > >
> > > > > On Tuesday, June 12, 2012 at 4:30 PM, CGS wrote:
> > > > >
> > > > > > COUCHDB_TEST_PATH should be the same as PREFIX and/or EPREFIX
> from
> > > > > > configure options. The rest gets this variable in front (e.g.,
> if PREFIX
> > > > > > was set to "/" at the configuration stage, then
> COUCHDB_TEST_PATH should
> > > > > >
> > > > >
> > > > > be
> > > > > > set to ""). E.g., few things from my installation, I have:
> > > > > >
> > > > > > - default.ini and local.ini in /usr/local/etc/coucdb/ and that
> requires:
> > > > > > COUCHDB_TEST_PATH "/usr/local"
> > > > > > COUCHDB_TEST_ETC_PATH "etc/couchdb"
> > > > > >
> > > > >
> > > > >
> > > > > Ok, so basically I am trying to integrate as much as possible with
> Ubuntu
> > > > > – so I set my prefix to /usr (see github link).
> > > > >
> > > > > COUCHDB_TEST_PATH "/usr"
> > > > > >
> > > > > > - CouchDB .beam files path in
> > > > > > /usr/local/lib/couchdb/erlang/lib/couch-1.2.0/ebin and that
> requires:
> > > > > > COUCHDB_TEST_PATH "/usr/local"
> > > > > > COUCHDB_TEST_LIB_PATH "lib/couchdb"
> > > > > > COUCHDB_TEST_EXTRA "erlang/lib"
> > > > > > COUCHDB_TEST_VERSION "-1.2.0"
> > > > > > COUCHDB_TEST_EBIN "ebin"
> > > > > >
> > > > >
> > > > >
> > > > > This is the path when I install my package:
> > > > > /usr/lib/couchdb/erlang/lib/couch-1.2.0/
> > > > >
> > > > >
> > > > > >
> > > > > > The problem may be in COUCHDB_TEST_ETAP_PATH "./tests"
> (preferable full
> > > > > > path and not relative because the tests don't know too much
about
> > > > > >
> > > > >
> > > > > relative
> > > > > > paths). Can you try to set it as a full path and execute the
> tests again?
> > > > > > You don't need to clean anything from the previous executions.
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > I just did that – tests fail the same way.
> > > > >
> > > > > I can't really tell what the cause is since the erl_crash.dump is
> kinda
> > > > > hard to read. Signal vs. noise. :)
> > > > >
> > > > > Till
> > > > > >
> > > > > > CGS
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Tue, Jun 12, 2012 at 4:06 PM, till <klimpong@gmail.com(mailto:
> klimpong@gmail.com) (mailto:klimpong@gmail.com) (mailto:
> > > > > klimpong@gmail.com (mailto:klimpong@gmail.com) (mailto:
> klimpong@gmail.com))> wrote:
> > > > > >
> > > > > > > Yes, pretty much:
> > > > > > >
> https://github.com/till/couchdb-deb/blob/master/testsuite/test.cfg
> > > > > > >
> > > > > > > I haven't checked in detail, but – do those lib/etc paths
get
> prefixed
> > > > > > > with COUCHDB_TEST_PATH?
> > > > > > >
> > > > > > > Till
> > > > > > >
> > > > > > > --
> > > > > > > till
> > > > > > > Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
> > > > > > >
> > > > > > >
> > > > > > > On Tuesday, June 12, 2012 at 3:07 PM, CGS wrote:
> > > > > > >
> > > > > > > > Have you modified the parameters from test.cfg to
point to
> your
> > > > > CouchDB
> > > > > > > > installation?
> > > > > > > >
> > > > > > > > CGS
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Tue, Jun 12, 2012 at 2:57 PM, till <klimpong@gmail.com(mailto:
> klimpong@gmail.com) (mailto:klimpong@gmail.com) (mailto:
> > > > > klimpong@gmail.com (mailto:klimpong@gmail.com) (mailto:
> klimpong@gmail.com)) (mailto:
> > > > > > > klimpong@gmail.com (mailto:klimpong@gmail.com) (mailto:
> klimpong@gmail.com))> wrote:
> > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Tuesday, June 12, 2012 at 2:36 PM, CGS wrote:
> > > > > > > > >
> > > > > > > > > > Well, the default installation requires
root permissions
> as many
> > > > > > > paths
> > > > > > > > > are
> > > > > > > > > > accessible only as root (you did 'sudo make
install',
> didn't
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > > you?).
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Also,
> > > > > > > > > > you do sudo apt-get install, so, the tests
will be run
> under root
> > > > > > > > > > permissions. That's why I said in the README
file that
> these
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > > tests
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > should
> > > > > > > > > > be run as root (a.k.a. sudo command).
> > > > > > > > > >
> > > > > > > > > > CGS
> > > > > > > > > Sorry, over read that before, but the failures
are still
> happening
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > > with
> > > > > > > > > sudo:
> > > > > > > > > https://gist.github.com/2917336
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
>
>

Mime
View raw message