Skip to content

Commit

Permalink
Merged trunk changes 7794-7888. Will tag trunk/dev_ajax-7888.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marshall Roch committed Dec 4, 2006
2 parents 310c74e + 61d54b0 commit bdafec0
Show file tree
Hide file tree
Showing 256 changed files with 17,943 additions and 1,548 deletions.
76 changes: 42 additions & 34 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,34 @@ BRIC_VERSION = `$(PERL) -ne '/VERSION.*?([\d\.]+)/ and print $$1 and exit' < lib
# build rules #
#########################

all : required.db modules.db apache.db postgres.db config.db \
all : required.db modules.db apache.db database.db config.db \
bconf/bricolage.conf build_done

# This scans for dbprobe_*.pl files and passes them to required.pl to let
# the user choose the database he wants (database names should conform to
# DBD:: package name, ex: dbprobe_Pg for PostgresSQL)

DATABASE_PROBES := $(shell find inst -name 'dbprobe_*.pl')

required.db : inst/required.pl
$(PERL) inst/required.pl $(INSTALL_VERBOSITY)
$(PERL) inst/required.pl $(INSTALL_VERBOSITY) $(DATABASE_PROBES)

modules.db : inst/modules.pl lib/Bric/Admin.pod
$(PERL) inst/modules.pl $(INSTALL_VERBOSITY)

apache.db : inst/apache.pl required.db
$(PERL) inst/apache.pl $(INSTALL_VERBOSITY)

# This should be updated to something more database-independent. In fact,
# what should happen is that a script should present a list of supported
# databases, the user picks which one (each with a key name for the DBD
# driver, e.g., "Pg", "mysql", "Oracle", etc.), and then the rest of the
# work should just assume that database and do the work for that database.
postgres.db : inst/postgres.pl required.db
$(PERL) inst/postgres.pl $(INSTALL_VERBOSITY)
database.db : inst/database.pl required.db $(DATABASE_PROBES)
$(PERL) inst/database.pl $(INSTALL_VERBOSITY)

config.db : inst/config.pl required.db apache.db postgres.db
config.db : inst/config.pl required.db apache.db database.db
$(PERL) inst/config.pl $(INSTALL_VERBOSITY)

bconf/bricolage.conf : required.db inst/conf.pl
$(PERL) inst/conf.pl INSTALL $(BRIC_VERSION)

build_done : required.db modules.db apache.db postgres.db config.db \
build_done : required.db modules.db apache.db database.db config.db \
bconf/bricolage.conf
@echo
@echo ===========================================================
Expand All @@ -82,18 +83,15 @@ build_done : required.db modules.db apache.db postgres.db config.db \
# dist rules #
###########################

dist : check_dist distclean inst/Pg.sql dist_dir \
dist : check_dist distclean inst/dist_sql dist_dir \
rm_svn rm_tmp dist/INSTALL dist/Changes \
dist/License dist_tar

check_dist :
$(PERL) inst/check_dist.pl $(BRIC_VERSION)

distclean : clean
-rm -rf bricolage-$(BRIC_VERSION)
-rm -f bricolage-$(BRIC_VERSION).tar.gz
distclean : cloneclean
-rm -f inst/*.sql
-rm -rf dist

dist_dir :
-rm -rf dist
Expand Down Expand Up @@ -121,30 +119,35 @@ dist_tar :
gzip --best bricolage-$(BRIC_VERSION).tar

SQL_FILES := $(shell find lib -name '*.sql' -o -name '*.val' -o -name '*.con')
SQL_DIRS := $(shell find sql -maxdepth 1 -regex 'sql/.*' -a \! -regex 'sql/\.svn')

# Update this later to be database-independent.
inst/Pg.sql : $(SQL_FILES)
grep -vh '^--' `find sql/Pg -name '*.sql' | env LANG= LANGUAGE= LC_ALL=POSIX sort` > $@;
grep -vh '^--' `find sql/Pg -name '*.val' | env LANG= LANGUAGE= LC_ALL=POSIX sort` >> $@;
grep -vh '^--' `find sql/Pg -name '*.con' | env LANG= LANGUAGE= LC_ALL=POSIX sort` >> $@;
# This creates the apropriate sql initialization scripts for the databases with
# directories in sql (directory names should conform to DBD:: package name,
# ex: Pg for PostgresSQL).
inst/dist_sql : $(SQL_FILES) inst/dist_sql.pl
$(PERL) inst/dist_sql.pl $(SQL_DIRS)

.PHONY : distclean inst/Pg.sql dist_dir rm_svn dist_tar check_dist
.PHONY : distclean inst/dist_sql dist_dir rm_svn dist_tar check_dist

##########################
# clone rules #
##########################


clone : distclean clone.db clone_dist_dir clone_sql clone_files \
clone : cloneclean clone.db clone_dist_dir clone_files clone_sql \
rm_svn rm_tmp \
dist/INSTALL dist/Changes dist/License \
clone_tar
devclone : distclean clone.db clone_dist_dir clone_sql clone_files \
devclone : distclean clone.db clone_dist_dir clone_files clone_sql \
rm_svn rm_tmp \
dist/INSTALL dist/Changes dist/License \
clone_lightweight \
clone_tar

cloneclean : clean
-rm -rf bricolage-*
-rm -rf dist

clone.db :
$(PERL) inst/clone.pl

Expand All @@ -158,7 +161,9 @@ clone_files :
clone_lightweight :
$(PERL) inst/clone_lightweight.pl

clone_sql :
CLONE_SQL_FILES := $(shell find inst -name 'clone_sql_*.pl')

clone_sql : $(CLONE_SQL_FILES)
$(PERL) inst/clone_sql.pl

clone_tar :
Expand All @@ -174,12 +179,12 @@ install : install_files install_db done

install_files : all is_root cpan lib bin files

install_db : db db_grant
install_db : db db_grant

is_root : inst/is_root.pl
$(PERL) inst/is_root.pl

cpan : modules.db postgres.db inst/cpan.pl
cpan : modules.db database.db inst/cpan.pl
$(PERL) inst/cpan.pl

lib :
Expand All @@ -193,11 +198,14 @@ bin :
files : config.db bconf/bricolage.conf
$(PERL) inst/files.pl

db : inst/db.pl postgres.db
DBLOAD_FILES := $(shell find inst -name 'dbload_*.sql')

db : inst/db.pl database.db $(DBLOAD_FILES)
$(PERL) inst/db.pl

db_grant : inst/db.pl postgres.db
$(PERL) inst/db_grant.pl
DBGRANT_FILES := $(shell find inst -name 'dbgrant_*.sql')
db_grant : inst/dbgrant.pl database.db $(DBGRANT_FILES)
$(PERL) inst/dbgrant.pl

done : bconf/bricolage.conf db files bin lib cpan
$(PERL) inst/done.pl
Expand All @@ -210,7 +218,7 @@ done : bconf/bricolage.conf db files bin lib cpan
# upgrade rules #
##########################

upgrade : upgrade.db required.db postgres.db bconf/bricolage.conf \
upgrade : upgrade.db required.db modules.db database.db bconf/bricolage.conf \
is_root cpan stop db_upgrade lib bin \
upgrade_files upgrade_conf upgrade_done

Expand Down Expand Up @@ -253,7 +261,8 @@ uninstall : is_root prep_uninstall stop db_uninstall rm_files clean
prep_uninstall :
$(PERL) inst/uninstall.pl

db_uninstall :
DB_UNINST_FILES := $(shell find inst -name 'db_uninst_*.pl')
db_uninstall :$(DB_UNINST_FILES)
$(PERL) inst/db_uninstall.pl

rm_files :
Expand All @@ -269,8 +278,7 @@ rm_files :
dev_symlink :
$(PERL) inst/dev.pl

dev : inst/Pg.sql install dev_symlink clean

dev : inst/dist_sql install dev_symlink clean

##########################
# test rules #
Expand Down
35 changes: 19 additions & 16 deletions bin/bric_queued
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ use Bric::Dist::Action::Mover;
use Bric::Dist::Action::Email;
use Bric::Dist::Action::DTDValidate;

# Allow templates from before 1.10 to keep working.
use Bric::Biz::Asset::Business::Parts::Tile::Container;
use Bric::Biz::Asset::Formatting;
use Bric::Biz::AssetType;

##############################################################################
# Constants.
##############################################################################
Expand Down Expand Up @@ -224,12 +229,12 @@ sub run_as_daemon {
# fork off a process for dist jobs
my $pkg = fork_to_dist();
login();
for (;;) {
while (1) {
for my $job ($pkg->list({
sched_time => [undef, strfdate()],
comp_time => undef,
failed => 0,
executing => 0,
failed => '0',
executing => '0',
})) {
print 'Executing ' . $job->get_name . "\n" if $Verbose;
eval {
Expand Down Expand Up @@ -292,8 +297,8 @@ sub run_single_job {
my ($job) = $pkg->list({
sched_time => [undef, strfdate()],
comp_time => undef,
failed => 0,
executing => 0,
failed => '0',
executing => '0',
});
exit unless $job;
print 'Executing ' . $job->get_name . "\n" if $Verbose;
Expand All @@ -318,9 +323,7 @@ Returns a package name from which we will get jobs to run.
##############################################################################

sub fork_to_dist {
my $reaper;
$reaper = sub { wait; $SIG{CHLD} = $reaper; };
$SIG{CHLD} = $reaper;
$SIG{CHLD} = sub { wait; $SIG{CHLD} = $reaper; };
defined ($DistPid = fork) or die "Can't fork: $!\n";
if ($DistPid) { # a non-zero pid means we are the parent
return PUB_PKG;
Expand Down Expand Up @@ -418,7 +421,7 @@ delete the pidfile if any

sub del_pid {
return unless $Pidfile;
unlink $Pidfile or die "Cannot unlink PID file $Pidfile."
unlink $Pidfile or die "Cannot unlink PID file $Pidfile.\n"
}

##############################################################################
Expand All @@ -435,17 +438,17 @@ sub daemonize {
write_pid(''); # tests the writability of Pidfile
del_pid(); # in case the process dies before forking
$SIG{TERM} = \&handle_term;
chdir '/' or die "Can't chdir to /: $!";
open STDIN, '/dev/null' or die "Can't read from /dev/null: $!";
open STDOUT, ">>$Logfile" or die "Can't write to logfile: $!";
defined (my $pid = fork) or die "Can't fork: $!";
chdir '/' or die "Can't chdir to /: $!\n";
open STDIN, '/dev/null' or die "Can't read from /dev/null: $!\n";
open STDOUT, ">>$Logfile" or die "Can't write to logfile: $!\n";
defined (my $pid = fork) or die "Can't fork: $!\n";
if ($pid) {
# only the original process gets the PID of the new running daemon
# only the parent process gets the PID of the new running daemon
write_pid($pid);
exit;
}
setsid or die "Can't start a new session: $!";
open STDERR, '>&STDOUT' or die "Can't dup stdout: $!";
setsid or die "Can't start a new session: $!\n";
open STDERR, '>&STDOUT' or die "Can't dup stdout: $!\n";
}

##############################################################################
Expand Down
25 changes: 25 additions & 0 deletions comp/help/bo/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,31 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>

<p>Some of the icons distributed with Bricolage are covered under other open
source licenses:</p>

<ul>
<li>The Nuvola icon set, from David Vignoni (http://icon-king.com), is
covered under the GNU Lesser General Public License:

<blockquote>
<p>This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.</p>

<p>This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.</p>

<p>You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>
</blockquote>
</li>
</ul>

% $m->comp(".t_bottom");
<br />
% $m->comp(".t_top", caption => "Credits");
Expand Down
25 changes: 25 additions & 0 deletions comp/help/de_de/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,31 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>

<p>Some of the icons distributed with Bricolage are covered under other open
source licenses:</p>

<ul>
<li>The Nuvola icon set, from David Vignoni (http://icon-king.com), is
covered under the GNU Lesser General Public License:

<blockquote>
<p>This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.</p>

<p>This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.</p>

<p>You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>
</blockquote>
</li>
</ul>

% $m->comp(".t_bottom");
<br />
% $m->comp(".t_top", caption => "Credits");
Expand Down
26 changes: 26 additions & 0 deletions comp/help/en_us/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,32 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>


<p>Some of the icons distributed with Bricolage are covered under other open
source licenses:</p>

<ul>
<li>The Nuvola icon set, from David Vignoni (http://icon-king.com), is
covered under the GNU Lesser General Public License:

<blockquote>
<p>This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.</p>

<p>This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.</p>

<p>You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>
</blockquote>
</li>
</ul>

% $m->comp(".t_bottom");

% $m->comp(".t_top", caption => "Credits");
Expand Down
25 changes: 25 additions & 0 deletions comp/help/it_it/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,31 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>

<p>Some of the icons distributed with Bricolage are covered under other open
source licenses:</p>

<ul>
<li>The Nuvola icon set, from David Vignoni (http://icon-king.com), is
covered under the GNU Lesser General Public License:

<blockquote>
<p>This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.</p>

<p>This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.</p>

<p>You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>
</blockquote>
</li>
</ul>

% $m->comp(".t_bottom");

% $m->comp(".t_top", caption => "Credits");
Expand Down
Loading

0 comments on commit bdafec0

Please sign in to comment.