Commit adc74e23 authored by Mike Hibler's avatar Mike Hibler

Tweaks to get things basically compiling on FBSD 4.10.

We are NOT going to support this, I just want enough to get a 4.10 elabinelab
to swapin so that we can test upgrading the OS and packages.
parent 00978670
...@@ -260,6 +260,14 @@ if ($FBSD_MAJOR > 4) { ...@@ -260,6 +260,14 @@ if ($FBSD_MAJOR > 4) {
} }
my $PHP4_PORT = "php4-extensions-1.0"; my $PHP4_PORT = "php4-extensions-1.0";
#
# XXX keep 4.x ElabInElab install limping along...
#
if ($FBSD_MAJOR == 4) {
$SCP_INIT = "/usr/bin/scp -oProtocol=1";
$SCP = "/usr/bin/scp -oProtocol=2";
}
# #
# Figure out which directory we live in, so that some stages can do thing # Figure out which directory we live in, so that some stages can do thing
# relative to it. # relative to it.
...@@ -492,6 +500,17 @@ Phase "ports", "Installing ports", sub { ...@@ -492,6 +500,17 @@ Phase "ports", "Installing ports", sub {
} }
} }
else {
# XXX Also temporary
Phase "pubsub", "Installing pubsub package", sub {
my $pspkg = $ELVIN_COMPAT ? "pubsub-elvincompat" : "pubsub";
if (!ExecQuiet("$PKG_INFO -x $pspkg")) {
PhaseSkip("$pspkg already installed");
}
my $pname = GetPackage($pspkg, $packagedir);
ExecQuietFatal("$ENV PKG_PATH=$packagedir $PKG_ADD $pname");
}
}
}; };
PhaseSkip("Package directory provided; not installing from sources") PhaseSkip("Package directory provided; not installing from sources")
if ($packagedir); if ($packagedir);
...@@ -799,6 +818,9 @@ Phase "database", "Setting up database", sub { ...@@ -799,6 +818,9 @@ Phase "database", "Setting up database", sub {
if (!ExecQuiet("$MYSQLDUMP -d $DBNAME users")) { if (!ExecQuiet("$MYSQLDUMP -d $DBNAME users")) {
PhaseSkip("Tables have already been created"); PhaseSkip("Tables have already been created");
} }
if ($FBSD_MAJOR == 4) {
ExecQuietFatal("cp $TOP_SRCDIR/sql/database-create-old.sql $TOP_SRCDIR/sql/database-create.sql")
}
ExecQuietFatal("$MYSQL $DBNAME < $TOP_SRCDIR/sql/database-create.sql"); ExecQuietFatal("$MYSQL $DBNAME < $TOP_SRCDIR/sql/database-create.sql");
}; };
Phase "dbdata", "Filling tables with initial data", sub { Phase "dbdata", "Filling tables with initial data", sub {
......
/* /*
* EMULAB-COPYRIGHT * EMULAB-COPYRIGHT
* Copyright (c) 2000-2002 University of Utah and the Flux Group. * Copyright (c) 2000-2002, 2008 University of Utah and the Flux Group.
* All rights reserved. * All rights reserved.
*/ */
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
* TODO: Needs to be daemonized. * TODO: Needs to be daemonized.
*/ */
#include <unistd.h>
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
#include <time.h> #include <time.h>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# The easy way: do 'gmake all' # The easy way: do 'gmake all'
# You can also run the individual targets too. # You can also run the individual targets too.
all: db-create db-fill sitevars all: db-create db-fill sitevars old-db-create
db-create: db-create:
@rm -f ./.tmp-db-create.sql ./.tmp-create-diff @rm -f ./.tmp-db-create.sql ./.tmp-create-diff
...@@ -28,6 +28,13 @@ db-create: ...@@ -28,6 +28,13 @@ db-create:
fi fi
@rm -f ./.tmp-create-diff ./.tmp-db-create.sql @rm -f ./.tmp-create-diff ./.tmp-db-create.sql
old-db-create:
cp ./database-create.sql ./.tmp-db-create.sql
sed -i '' -e 's/ENGINE=MyISAM DEFAULT CHARSET=latin1/TYPE=MyISAM/' ./.tmp-db-create.sql
sed -i '' -e 's/ default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP//' ./.tmp-db-create.sql
mv ./.tmp-db-create.sql ./database-create-old.sql
@rm -f ./.tmp-db-create.sql
db-fill: db-fill:
@/usr/testbed/sbin/wap /usr/testbed/sbin/export_tables \ @/usr/testbed/sbin/wap /usr/testbed/sbin/export_tables \
> database-fill.sql > database-fill.sql
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment