diff --git a/Anvil/Tools.pm b/Anvil/Tools.pm index 5f548359..b7f4a678 100755 --- a/Anvil/Tools.pm +++ b/Anvil/Tools.pm @@ -916,7 +916,7 @@ sub _set_paths postgres_pgpass => "/var/lib/pgsql/.pgpass", }, sql => { - 'anvil.sql' => "/usr/sbin/anvil.sql", + 'anvil.sql' => "/usr/share/anvil/anvil.sql", }, urls => { skins => "/skins", diff --git a/Anvil/Tools/Log.pm b/Anvil/Tools/Log.pm index d78f5270..1771dbc2 100755 --- a/Anvil/Tools/Log.pm +++ b/Anvil/Tools/Log.pm @@ -326,6 +326,9 @@ sub entry open (my $file_handle, ">>", $shell_call) or die "Failed to open: [$shell_call] for writing. The error was: $!\n"; $file_handle->autoflush(1); $anvil->{HANDLE}{log_file} = $file_handle; + + # Make sure it can be written to by apache. + $anvil->Storage->change_mode({target => $log_file, mode => "0666"}); } if (not $anvil->{HANDLE}{log_file}) diff --git a/rpm/SPECS/anvil.spec b/rpm/SPECS/anvil.spec index c71f6b9c..f609a109 100644 --- a/rpm/SPECS/anvil.spec +++ b/rpm/SPECS/anvil.spec @@ -3,7 +3,7 @@ %define anvilgroup admin Name: anvil Version: 3.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Alteeve Anvil! complete package. License: GPLv2+ @@ -286,7 +286,7 @@ cp -R -p tools/* %{buildroot}/%{_sbindir} cp -R -p anvil.conf %{buildroot}/%{_sysconfdir}/anvil/ cp -R -p anvil.version %{buildroot}/%{_sysconfdir}/anvil/ cp -R -p share/* %{buildroot}/%{_usr}/share/anvil/ -mv %{buildroot}/%{_sbindir}/anvil.sql %{buildroot}/%{_datadir}/anvil.sql +mv %{buildroot}/%{_sbindir}/anvil.sql %{buildroot}/%{_datadir}/anvil/anvil.sql %pre core @@ -344,7 +344,7 @@ systemctl stop postgresql.service %files core %doc README.md notes %config(noreplace) %{_sysconfdir}/anvil/anvil.conf -%config(noreplace) %{_datadir}/anvil.sql +%config(noreplace) %{_datadir}/anvil/anvil.sql %{_usr}/lib/* %{_usr}/share/anvil/* %{_sbindir}/* @@ -363,6 +363,9 @@ systemctl stop postgresql.service %changelog +* Thu Jul 13 2018 Madison Kelly 3.0-8 +- Fixed the path to anvil.sql + * Thu Jul 12 2018 Madison Kelly 3.0-7 - Added an explicit call to anvil-prep-database in post. diff --git a/share/words.xml b/share/words.xml index 70778602..be38aca7 100644 --- a/share/words.xml +++ b/share/words.xml @@ -185,7 +185,7 @@ The database connection error was: check_alert_sent() was called but the 'modified_date' parameter was not passed and/or 'sys::db_timestamp' is not set. Did the program fail to connect to any databases?]]> [ Error ] - Failed to start the Postgres server. Please check the system logs for details. - The database user: [#!variable!user!#] was created with ID: [#!variable!uuid!#]. + The database user: [#!variable!user!#] was created with ID: [#!variable!id!#]. [ Error ] - Failed to add the database user: [#!variable!user!#]! Unable to proceed. check_alert_sent() was called but the 'set' parameter was not passed or it is empty. It should be 'set' or 'clear'.]]> diff --git a/tools/anvil-prep-database b/tools/anvil-prep-database index 19093b81..34c5fddf 100755 --- a/tools/anvil-prep-database +++ b/tools/anvil-prep-database @@ -283,6 +283,7 @@ if ($local_uuid) } # Update/set the passwords. + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, secure => 1, list => { "database::${local_uuid}::password" => $anvil->data->{database}{$local_uuid}{password} }}); if ($anvil->data->{database}{$local_uuid}{password}) { foreach my $user ("postgres", $database_user)