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

Re: LedgerSMB rpm spec



Chris Travers wrote, On 10/18/2006 11:21 PM:
Hi all;

I am adding the spec file to the source directory under dists/rpm.

Please name it ledger-smb.spec instead of just spec. ledger-smb.spec is just the way it should be...

A few notes though that may cause issues:

1)  If you follow the instructions, you will be unable to create new
datasets because you may need to log in as postgres to create the
database and add plpgsql.

That's right, and that's intentionally.

It must be possible to install the rpm without starting postgresql, so we simply can't create the database on rpm install-time. That must be done by the root user later on somehow.

Also, in case the rpm is installed by a clueless root it should not leave a door open to attackers. The rpm must be ensure that root and only root knows the master password. That's why I let the rpm contain a bogus password and provide instructions on how to reset it.

The current approach to installatin completion could be improved, but IMHO it is almost as good as it gets. See for example the official Fedora mailman package which is very similar to this. "rpm -qi mailman" points (modulo speling errors) to /usr/share/doc/mailman-2.1.8/INSTALL.REDHAT.

For now please apply the attached patch:
ledger-smb-httpd.conf in the source uses "/some/path" which must be fixed before use in the rpm.
default password should not be left empty

/Mads
diff -r 30f98cd8a693 dists/rpm/spec
--- a/dists/rpm/spec	Wed Oct 18 23:55:40 2006 +0200
+++ b/dists/rpm/spec	Thu Oct 19 00:09:36 2006 +0200
@@ -48,7 +48,7 @@ perl -p -e 's,^(\$ENV\{PATH\}),#\1,g' le
 perl -p -e 's,^(\$ENV\{PATH\}),#\1,g' ledger-smb.conf.default > ledger-smb.conf
 
 # fix location
-perl -pi -e "s,/usr/local/ledger-smb,%{_datadir}/%{name},g" ledger-smb-httpd.conf
+perl -pi -e "s,/some/path/to/ledger-smb,%{_datadir}/%{name},g" ledger-smb-httpd.conf
 
 %install
 
@@ -92,7 +92,7 @@ cat << TAK > $RPM_BUILD_ROOT%{_localstat
 cat << TAK > $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/users/members
 # LedgerSMB Accounting members
 [root login]
-password=
+password=DELETE_THIS_PASSWORD_AND_VISIT_THE_ADMIN_INTERFACE_TO_SET_ANOTHER
 TAK
 
 # css - written by cgi