[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bugs setting up a company database;



Hi Marjan,

On Wed, Apr 27, 2016 at 5:30 PM, Marjanw <..hidden..> wrote:
Hi all,

Before submitting bugs and/or feature requests on github I'd like to share
my experiences on this mailing list.

Thanks for taking the time to write up your installation experience! It's definitely an experience we can learn from.
 
Since I wanted the most recent LSMB version I choose to download the tar
archive (1.4.27) from Sourceforge.
I used the INSTALL file for the installation instructions.
Instead using the Debian packages I used cpanmin.us to install all
required Perl modules.

* My two cents: Move Perl the module dependency list out of the INSTALL.md
  into a separate file which can be fed to cpanminus.

It's an option, but I'm not even very hot about listing the dependencies in the INSTALL file: too much room for the various lists to get out of sync. The canonical listing of dependencies is in Makefile.PL. Would it be acceptable to refer to that from INSTALL?
One thing you may or may not be aware of (that we could add to the docs) is that you can install all dependencies without copy/pasting from INSTALL by using the command

  LedgerSMB-1.4.27$ cpanm --install-deps .

Would that be an acceptable alternative, in your opinion?
 
Then I stumbled over the section "Initializing a company database".
First I tried setting up a database using "setup.pl" via the browser,
but failed since I missed the trick of specifying a non-existant
company name.

* For all stupid users like me, it might be a good idea to add a
  menu button "create new company database" in setup.pl

Excellent. I've implemented this both for master/1.5 and 1.4 today. Since 1.4 changes are frozen for the 1.4.28 release, your proposal will be part of 1.4.29 -- in roughly 2 weeks.

Peeking in the actual INSTALL.md on github learned that above issue
has been addressed: a paragraph was added to demystify this.

* Please backport this paragraph to the 1.4.27 INSTALL file

I'll do that before the 1.4.28 release, but the paragraph might need to be adjusted because we have the "Create" button now?
 
Since setup.pl failed I tried to create the company database using
the "prepare-company-database.sh" script.

Ok. I'm correct to understand that *if* you had known about the trick of filling out a non-existing database, you wouldn't have gone down this route and setup.pl would not have failed, or is setup.pl still failing even though you now know about the non-existing database trick?
 
No luck!
It emerged this script has several bugs:

209: su -c ""
The su lacks the argument of the Linux user "postgres".
This causes the script to fail: "Peer Authentication failed"

254: if ! test "x$pgsql_contrib_dir" = "xignored"
Typo. Should be: if ! test "x$pgsql_contrib_dir" = "xignore"

288: person__save(NULL,
pgsql function "person__save" fails because in LSMB 1.4 two new args
were added to this function.
As a result no "admin" user is created, rendering the DB unusable
for login.

In commit 7d09fc9d (2015-11-21 Erik Huelsmann) the script

"prepare-company-database.sh" has been dropped completely.
However:

* INSTALL.md still refers to the non-existing script

  "prepare-company-database.sh"

Ok. Given the bugs you list and the fact that the script is gone from master/1.5, I'd say we should remove the script from 1.4.29+ as well. Changing the documentation should happen on master/1.5 as well as 1.4 and can probably be done before 1.4.28. I'll get it done before the release.
 
It seems the shell script "prepare-company-database.sh" has been
replaced by it Perl variant "prepare-company-database.pl".
So I gave that script a try.

Right. Well, actually that script was implemented along-side of prepare-company-database.sh and is distributed in 1.4 as well as master/1.5. There's no problem to delete the .sh script in 1.4, but regardless, it seems from your experience below that the script needs to be tested and fixed too.
 
But alas, the A's were not in my cards:

# ./tools/prepare-company-database.pl --company tuxtest2 --coa /usr/share/ledgersmb/sql/coa/be/chart/G
eneral.sql --password LSMB
DBI connect('dbname=tuxtest2','',...) failed: fe_sendauth: no password supplied at ./tools/prepare-com
pany-database.pl line 159.
Can't call method "prepare" on an undefined value at ./tools/prepare-company-database.pl line 164.

I stopped hacking here.

Right. Understandably. Thanks again for reporting your problems. I hope the documentation improvements in 1.4.28 and the "Create" button in 1.4.29 take us a good step toward being self-explanatory.

Please report any future problems either here or in the GitHub issue tracker!


--
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users