Commit 8487a057 authored by Mike Hibler's avatar Mike Hibler

Support FreeBSD 7.3 server side.

Mostly this means a new package set emulab-*-3.1 and some corresponding
tweaks to the install scripts and elabinelab scripts.

PLEASE NOTE: a 7.3 install uses PHP5, Perl 5.10.1 and Python 2.6.
parent 778ef3f3
...@@ -44,11 +44,24 @@ $(INSTALL_APACHE_CONFIG)/%: % ...@@ -44,11 +44,24 @@ $(INSTALL_APACHE_CONFIG)/%: %
# This could (should?) be done with configure, but apache port might # This could (should?) be done with configure, but apache port might
# not be installed when we configure our software. # not be installed when we configure our software.
# #
# XXX ugh, do the same thing to detect php5...
#
httpd.conf.fixed: httpd.conf httpd.conf.fixed: httpd.conf
-@cp httpd.conf httpd.conf.fixed -@cp httpd.conf httpd.conf.fixed
@if [ -x /usr/local/libexec/apache/mod_auth_mysql.so ]; then \ @if [ -x /usr/local/libexec/apache/mod_auth_mysql.so ]; then \
sed -i "" -e '/^LoadModule auth_mysql/s/libauth/mod_auth/' httpd.conf.fixed; \ sed -i "" -e '/^LoadModule auth_mysql/s/libauth/mod_auth/' httpd.conf.fixed; \
echo "Updated httpd.conf"; \ echo "Updated httpd.conf for auth_mysql"; \
fi
@if [ -x /usr/local/libexec/apache/libphp5.so ]; then \
sed -i "" -e 's/php4/php5/g' httpd.conf.fixed; \
echo "Updated httpd.conf for php5"; \
fi
httpd.conf-ops.fixed: httpd.conf-ops
-@cp httpd.conf-ops httpd.conf-ops.fixed
@if [ true -o -x /usr/local/libexec/apache/libphp5.so ]; then \
sed -i "" -e 's/php4/php5/g' httpd.conf-ops.fixed; \
echo "Updated httpd.conf-ops for php5"; \
fi fi
install-dirs: install-dirs:
...@@ -82,8 +95,8 @@ endif ...@@ -82,8 +95,8 @@ endif
install: install-dirs install-scripts httpd.conf.fixed install: install-dirs install-scripts httpd.conf.fixed
$(INSTALL_DATA) httpd.conf.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf $(INSTALL_DATA) httpd.conf.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf
control-install: install-dirs install-scripts httpd.conf-ops control-install: install-dirs install-scripts httpd.conf-ops.fixed
$(INSTALL_DATA) httpd.conf-ops $(INSTALL_APACHE_CONFIG)/httpd.conf $(INSTALL_DATA) httpd.conf-ops.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf
else else
install-scripts install control-install: install-scripts install control-install:
@echo "Cannot install Apache config in dev tree" @echo "Cannot install Apache config in dev tree"
......
...@@ -428,18 +428,7 @@ DocumentRoot "@prefix@/www" ...@@ -428,18 +428,7 @@ DocumentRoot "@prefix@/www"
<Directory @prefix@> <Directory @prefix@>
Order allow,deny Order allow,deny
deny from all deny from all
allow from 155.99.212.
allow from 155.98.60. allow from 155.98.60.
allow from 69.59.212.104
allow from 18.31.0.114
allow from 18.31.0.144
allow from 24.254.69.120
# Jay's machines.
allow from 207.173.21.122
allow from 207.173.21.123
allow from 207.173.21.126
# Tim Stack
allow from 66.219.220.49
</Directory> </Directory>
<Directory @prefix@/webglimpse> <Directory @prefix@/webglimpse>
......
...@@ -150,10 +150,6 @@ my $TFTPD_PKG = "emulab-tftp-hpa-0.48"; ...@@ -150,10 +150,6 @@ my $TFTPD_PKG = "emulab-tftp-hpa-0.48";
# XXX temporary for perl DBD mysql access # XXX temporary for perl DBD mysql access
my $P5DBD_PKG = "p5-DBD-mysql50-3.0002"; my $P5DBD_PKG = "p5-DBD-mysql50-3.0002";
# XXX temporary until fix dependencies in emulab-boss package
my $PYM2_PKG = "py25-m2crypto-0.19.1";
# XXX temporary until someone extracts their head from the dark regions
my $EASYINSTALL = "/usr/local/bin/easy_install";
# #
# Named pid file. # Named pid file.
...@@ -252,7 +248,12 @@ else { ...@@ -252,7 +248,12 @@ else {
# #
my $BOSS_PORT = "emulab-boss-1.8"; my $BOSS_PORT = "emulab-boss-1.8";
if ($FBSD_MAJOR > 4) { if ($FBSD_MAJOR > 4) {
if ($FBSD_MAJOR > 6) { if ($FBSD_MAJOR > 7) {
# XXX someday...
$BOSS_PORT = "emulab-boss-4.0";
} elsif ($FBSD_MAJOR == 7 && $FBSD_MINOR > 2) {
$BOSS_PORT = "emulab-boss-3.1";
} elsif ($FBSD_MAJOR == 7) {
$BOSS_PORT = "emulab-boss-3.0"; $BOSS_PORT = "emulab-boss-3.0";
} elsif ($FBSD_MAJOR == 6 && $FBSD_MINOR > 2) { } elsif ($FBSD_MAJOR == 6 && $FBSD_MINOR > 2) {
$BOSS_PORT = "emulab-boss-2.1"; $BOSS_PORT = "emulab-boss-2.1";
...@@ -260,7 +261,26 @@ if ($FBSD_MAJOR > 4) { ...@@ -260,7 +261,26 @@ if ($FBSD_MAJOR > 4) {
$BOSS_PORT = "emulab-boss-2.0"; $BOSS_PORT = "emulab-boss-2.0";
} }
} }
my $PHP4_PORT = "php4-extensions-1.0";
# PHP5 is the only alternative at the moment and only for newer OSes
my $PHP_VERSION = 4;
my $PHP_PORT = "php4-extensions-1.0";
if ($FBSD_MAJOR > 7 || ($FBSD_MAJOR == 7 && $FBSD_MINOR > 2)) {
$PHP_VERSION = 5;
$PHP_PORT = "php5-extensions-1.3";
}
#
# Version dependent python-fu
#
my $PYM2_PKG = "py25-m2crypto-0.19.1";
my $PY_VER = "python2.5";
if ($FBSD_MAJOR > 7 || ($FBSD_MAJOR == 7 && $FBSD_MINOR > 2)) {
$PYM2_PKG = "py26-m2crypto-0.20";
$PY_VER = "python2.6";
}
# XXX temporary until someone extracts their head from the dark regions
my $EASYINSTALL = "/usr/local/bin/easy_install";
# #
# XXX keep 4.x ElabInElab install limping along... # XXX keep 4.x ElabInElab install limping along...
...@@ -444,15 +464,19 @@ Phase "ports", "Installing ports", sub { ...@@ -444,15 +464,19 @@ Phase "ports", "Installing ports", sub {
ExecQuietFatal("$ENV PKG_PATH=$packagedir $PKG_ADD $BOSS_PORT"); ExecQuietFatal("$ENV PKG_PATH=$packagedir $PKG_ADD $BOSS_PORT");
}; };
if ($FBSD_MAJOR > 4) { if ($FBSD_MAJOR > 4) {
Phase "php4", "Installing php4 package", sub { Phase "php", "Installing php${PHP_VERSION} package", sub {
if (!ExecQuiet("$PKG_INFO -e $PHP4_PORT")) { if (!ExecQuiet("$PKG_INFO -e $PHP_PORT")) {
PhaseSkip("Port already installed"); PhaseSkip("Package already installed");
} }
if (!$packagedir) { if (!$packagedir) {
PhaseSkip("No package directory provided"); PhaseSkip("No package directory provided");
} }
# XXX ugh, make sure an older version is not installed
if ($PHP_VERSION > 4) {
ExecQuiet("$PKG_DEL -f -x php4-");
}
ExecQuietFatal("$ENV PKG_PATH=$packagedir ". ExecQuietFatal("$ENV PKG_PATH=$packagedir ".
" $PKG_ADD $PHP4_PORT"); " $PKG_ADD $PHP_PORT");
}; };
# XXX temporary: only needed til emulab-boss package updated # XXX temporary: only needed til emulab-boss package updated
Phase "tftpd", "Updating tftpd installation", sub { Phase "tftpd", "Updating tftpd installation", sub {
...@@ -494,10 +518,10 @@ Phase "ports", "Installing ports", sub { ...@@ -494,10 +518,10 @@ Phase "ports", "Installing ports", sub {
}; };
if ($FBSD_MAJOR > 6) { if ($FBSD_MAJOR > 6) {
Phase "py-m2crypto", "Installing python m2crypto package", sub { Phase "py-m2crypto", "Installing python m2crypto package", sub {
my $pname = `$PKG_INFO -E 'py25-m2crypto-*' 2>/dev/null`; my $pname = `$PKG_INFO -E 'py*-m2crypto-*' 2>/dev/null`;
chomp($pname); chomp($pname);
if ($pname eq $PYM2_PKG) { if ($pname eq $PYM2_PKG) {
PhaseSkip("py25-m2crypto already up to date"); PhaseSkip("py-m2crypto already up to date");
} }
if (!$packagedir) { if (!$packagedir) {
PhaseSkip("No package directory provided"); PhaseSkip("No package directory provided");
...@@ -554,7 +578,7 @@ Phase "ports", "Installing ports", sub { ...@@ -554,7 +578,7 @@ Phase "ports", "Installing ports", sub {
PhaseFail("Please install ports manually, since some\n of them are " . PhaseFail("Please install ports manually, since some\n of them are " .
"interactive. Run: \n" . "interactive. Run: \n" .
" cd $PORTSMISCDIR/emulab-boss && make install\n" . " cd $PORTSMISCDIR/emulab-boss && make install\n" .
" cd $PORTSMISCDIR/emulab-php4 && make install\n" . " cd $PORTSMISCDIR/emulab-php${PHP_VERSION} && make install\n" .
($PGENISUPPORT ? ($PGENISUPPORT ?
" cd $PORTSMISCDIR/emulab-protogeni && make install\n" : "") . " cd $PORTSMISCDIR/emulab-protogeni && make install\n" : "") .
"then re-run this script."); "then re-run this script.");
...@@ -622,17 +646,17 @@ Phase "portfixup", "Fixing up packages", sub { ...@@ -622,17 +646,17 @@ Phase "portfixup", "Fixing up packages", sub {
# package that I know will fail otherwise. # package that I know will fail otherwise.
# #
Phase "m2crypto-egg", "Unpacking python m2crypto .egg", sub { Phase "m2crypto-egg", "Unpacking python m2crypto .egg", sub {
my $pydir = "/usr/local/lib/python2.5/site-packages"; my $pydir = "/usr/local/lib/$PY_VER/site-packages";
my $egg = `ls -d $pydir/M2Crypto-0.19.1-py2.5-*.egg 2>/dev/null | tail -1`; my $egg = `ls -d $pydir/M2Crypto-*-py*-*.egg 2>/dev/null | tail -1`;
chomp($egg); chomp($egg);
if (! -x $EASYINSTALL) { if (! -x $EASYINSTALL) {
PhaseSkip("python easy_install missing"); PhaseSkip("python easy_install missing");
} }
if ($egg eq "") { if ($egg eq "") {
PhaseSkip("py25-m2crypto egg not found"); PhaseSkip("egg not found");
} }
if (-d "$egg") { if (-d "$egg") {
PhaseSkip("py25-m2crypto egg already unpacked"); PhaseSkip("egg already unpacked");
} }
# XXX swig must be installed for easyinstall to exit correctly # XXX swig must be installed for easyinstall to exit correctly
Phase "swig", "Installing swig", sub { Phase "swig", "Installing swig", sub {
...@@ -642,7 +666,7 @@ Phase "portfixup", "Fixing up packages", sub { ...@@ -642,7 +666,7 @@ Phase "portfixup", "Fixing up packages", sub {
}; };
ExecQuietFatal("mv $egg /var/tmp/"); ExecQuietFatal("mv $egg /var/tmp/");
$egg =~ s/$pydir//; $egg =~ s/$pydir//;
ExecQuietFatal("$EASYINSTALL -Z /var/tmp$egg"); ExecQuietFatal("$EASYINSTALL -N -H None -Z /var/tmp$egg");
ExecQuietFatal("mv /var/tmp$egg $pydir/$egg.bak"); ExecQuietFatal("mv /var/tmp$egg $pydir/$egg.bak");
}; };
} }
...@@ -894,8 +918,11 @@ Phase "database", "Setting up database", sub { ...@@ -894,8 +918,11 @@ Phase "database", "Setting up database", sub {
ExecQuietFatal("$RCDIR/1.mysql-client.sh start"); ExecQuietFatal("$RCDIR/1.mysql-client.sh start");
ExecQuietFatal("$RCDIR/2.mysql-server.sh start"); ExecQuietFatal("$RCDIR/2.mysql-server.sh start");
# Give mysqld some time to start, then make sure it did # Give mysqld some time to start, then make sure it did
sleep 5; sleep 2;
ExecQuietFatal("$MYSQLADMIN ping"); if (ExecQuiet("$MYSQLADMIN ping")) {
sleep 5;
ExecQuietFatal("$MYSQLADMIN ping");
}
}; };
Phase "$DBNAME", "Creating $DBNAME", sub { Phase "$DBNAME", "Creating $DBNAME", sub {
if (!ExecQuiet("$MYSQLSHOW $DBNAME")) { if (!ExecQuiet("$MYSQLSHOW $DBNAME")) {
......
...@@ -82,7 +82,12 @@ else { ...@@ -82,7 +82,12 @@ else {
# #
my $FS_PORT = "emulab-fs-1.4"; my $FS_PORT = "emulab-fs-1.4";
if ($FBSD_MAJOR > 4) { if ($FBSD_MAJOR > 4) {
if ($FBSD_MAJOR > 6) { if ($FBSD_MAJOR > 7) {
# XXX someday...
$FS_PORT = "emulab-fs-4.0";
} elsif ($FBSD_MAJOR == 7 && $FBSD_MINOR > 2) {
$FS_PORT = "emulab-fs-3.1";
} elsif ($FBSD_MAJOR == 7) {
$FS_PORT = "emulab-fs-3.0"; $FS_PORT = "emulab-fs-3.0";
} elsif ($FBSD_MAJOR == 6 && $FBSD_MINOR > 2) { } elsif ($FBSD_MAJOR == 6 && $FBSD_MINOR > 2) {
$FS_PORT = "emulab-fs-2.1"; $FS_PORT = "emulab-fs-2.1";
......
...@@ -614,7 +614,8 @@ sub ExecQuiet(@) { ...@@ -614,7 +614,8 @@ sub ExecQuiet(@) {
# #
sub ExecQuietFatal(@) { sub ExecQuietFatal(@) {
if (ExecQuiet(@_)) { if (ExecQuiet(@_)) {
PhaseFail("Unable to execute: "); my $msg = join(' ', @_);
PhaseFail("Unable to execute: '$msg'");
} }
} }
......
...@@ -68,13 +68,8 @@ my $CONTROL_NETMASK = "@CONTROL_NETMASK@"; ...@@ -68,13 +68,8 @@ my $CONTROL_NETMASK = "@CONTROL_NETMASK@";
# Should be configure variable # Should be configure variable
my $TBADMINGID = 101; my $TBADMINGID = 101;
#
# XXX temporary for perl DBD mysql access # XXX temporary for perl DBD mysql access
my $P5DBD_PKG = "p5-DBD-mysql50-3.0002"; my $P5DBD_PKG = "p5-DBD-mysql50-3.0002";
# XXX temporary until fix dependencies in emulab-ops package
my $PYM2_PKG = "py25-m2crypto-0.19.1";
# XXX temporary until someone extracts their head from the dark regions
my $EASYINSTALL = "/usr/local/bin/easy_install";
# #
# Allow this to work if the library is left in the source directory # Allow this to work if the library is left in the source directory
...@@ -113,7 +108,14 @@ else { ...@@ -113,7 +108,14 @@ else {
my $OPS_PORT = "emulab-ops-1.4"; my $OPS_PORT = "emulab-ops-1.4";
my $FS_PORT = "emulab-fs-1.4"; my $FS_PORT = "emulab-fs-1.4";
if ($FBSD_MAJOR > 4) { if ($FBSD_MAJOR > 4) {
if ($FBSD_MAJOR > 6) { if ($FBSD_MAJOR > 7) {
# XXX someday...
$OPS_PORT = "emulab-ops-4.0";
$FS_PORT = "emulab-fs-4.0";
} elsif ($FBSD_MAJOR == 7 && $FBSD_MINOR > 2) {
$OPS_PORT = "emulab-ops-3.1";
$FS_PORT = "emulab-fs-3.1";
} elsif ($FBSD_MAJOR == 7) {
$OPS_PORT = "emulab-ops-3.0"; $OPS_PORT = "emulab-ops-3.0";
$FS_PORT = "emulab-fs-3.0"; $FS_PORT = "emulab-fs-3.0";
} elsif ($FBSD_MAJOR == 6 && $FBSD_MINOR > 2) { } elsif ($FBSD_MAJOR == 6 && $FBSD_MINOR > 2) {
...@@ -124,7 +126,26 @@ if ($FBSD_MAJOR > 4) { ...@@ -124,7 +126,26 @@ if ($FBSD_MAJOR > 4) {
$FS_PORT = "emulab-fs-2.0"; $FS_PORT = "emulab-fs-2.0";
} }
} }
my $PHP4_PORT = "php4-extensions-1.0";
# PHP5 is the only alternative at the moment and only for newer OSes
my $PHP_VERSION = 4;
my $PHP_PORT = "php4-extensions-1.0";
if ($FBSD_MAJOR > 7 || ($FBSD_MAJOR == 7 && $FBSD_MINOR > 2)) {
$PHP_VERSION = 5;
$PHP_PORT = "php5-extensions-1.3";
}
#
# Version dependent python-fu
#
my $PYM2_PKG = "py25-m2crypto-0.19.1";
my $PY_VER = "python2.5";
if ($FBSD_MAJOR > 7 || ($FBSD_MAJOR == 7 && $FBSD_MINOR > 2)) {
$PYM2_PKG = "py26-m2crypto-0.20";
$PY_VER = "python2.6";
}
# XXX temporary until someone extracts their head from the dark regions
my $EASYINSTALL = "/usr/local/bin/easy_install";
my $packagedir = ""; my $packagedir = "";
my $batchmode = 0; my $batchmode = 0;
...@@ -355,15 +376,19 @@ Phase "ports", "Installing ports", sub { ...@@ -355,15 +376,19 @@ Phase "ports", "Installing ports", sub {
ExecQuietFatal("$ENV PKG_PATH=$packagedir $PKG_ADD $OPS_PORT"); ExecQuietFatal("$ENV PKG_PATH=$packagedir $PKG_ADD $OPS_PORT");
}; };
if ($FBSD_MAJOR > 4) { if ($FBSD_MAJOR > 4) {
Phase "php4", "Installing php4 package", sub { Phase "php", "Installing php${PHP_VERSION} package", sub {
if (!ExecQuiet("$PKG_INFO -e $PHP4_PORT")) { if (!ExecQuiet("$PKG_INFO -e $PHP_PORT")) {
PhaseSkip("Package already installed"); PhaseSkip("Package already installed");
} }
if (!$packagedir) { if (!$packagedir) {
PhaseSkip("No package directory provided"); PhaseSkip("No package directory provided");
} }
# XXX ugh, make sure an older version is not installed
if ($PHP_VERSION > 4) {
ExecQuiet("$PKG_DEL -f -x php4-");
}
ExecQuietFatal("$ENV PKG_PATH=$packagedir ". ExecQuietFatal("$ENV PKG_PATH=$packagedir ".
" $PKG_ADD $PHP4_PORT"); " $PKG_ADD $PHP_PORT");
}; };
} }
# XXX Also temporary # XXX Also temporary
...@@ -390,13 +415,13 @@ Phase "ports", "Installing ports", sub { ...@@ -390,13 +415,13 @@ Phase "ports", "Installing ports", sub {
if ($pname); if ($pname);
ExecQuietFatal("$ENV PKG_PATH=$packagedir $PKG_ADD $P5DBD_PKG"); ExecQuietFatal("$ENV PKG_PATH=$packagedir $PKG_ADD $P5DBD_PKG");
}; };
# XXX cannot seem to get these dependencies into emulab-boss # XXX cannot seem to get these dependencies into emulab-ops
if ($FBSD_MAJOR > 6) { if ($FBSD_MAJOR > 6) {
Phase "py-m2crypto", "Installing python m2crypto package", sub { Phase "py-m2crypto", "Installing python m2crypto package", sub {
my $pname = `$PKG_INFO -E 'py25-m2crypto-*' 2>/dev/null`; my $pname = `$PKG_INFO -E 'py*-m2crypto-*' 2>/dev/null`;
chomp($pname); chomp($pname);
if ($pname eq $PYM2_PKG) { if ($pname eq $PYM2_PKG) {
PhaseSkip("py25-m2crypto already up to date"); PhaseSkip("py-m2crypto already up to date");
} }
if (!$packagedir) { if (!$packagedir) {
PhaseSkip("No package directory provided"); PhaseSkip("No package directory provided");
...@@ -494,12 +519,16 @@ Phase "ports", "Installing ports", sub { ...@@ -494,12 +519,16 @@ Phase "ports", "Installing ports", sub {
PhaseFail "Unable to change to $PORTSMISCDIR/emulab-fs: $!"; PhaseFail "Unable to change to $PORTSMISCDIR/emulab-fs: $!";
ExecQuietFatal("make -DBATCH install"); ExecQuietFatal("make -DBATCH install");
}; };
Phase "php4-pinstall", "Installing PHP4 ports (may take a while)", sub { Phase "php-pinstall", "Installing PHP${PHP_VERSION} ports (may take a while)", sub {
if (!ExecQuiet("$PKG_INFO -e $PHP4_PORT")) { if (!ExecQuiet("$PKG_INFO -e $PHP_PORT")) {
PhaseSkip("Ports already installed"); PhaseSkip("Ports already installed");
} }
chdir "$PORTSMISCDIR/emulab-php4" or # XXX ugh, make sure an older version is not installed
PhaseFail "Unable to change to $PORTSMISCDIR/emulab-php4: $!"; if ($PHP_VERSION > 4) {
ExecQuiet("$PKG_DEL -f -x php4-");
}
chdir "$PORTSMISCDIR/emulab-php${PHP_VERSION}" or
PhaseFail "Unable to change to $PORTSMISCDIR/emulab-php${PHP_VERSION}: $!";
ExecQuietFatal("make -DBATCH install"); ExecQuietFatal("make -DBATCH install");
}; };
if ($MAILMANSUPPORT) { if ($MAILMANSUPPORT) {
...@@ -565,17 +594,17 @@ Phase "portfixup", "Fixing up packages", sub { ...@@ -565,17 +594,17 @@ Phase "portfixup", "Fixing up packages", sub {
# package that I know will fail otherwise. # package that I know will fail otherwise.
# #
Phase "m2crypto-egg", "Unpacking python m2crypto .egg", sub { Phase "m2crypto-egg", "Unpacking python m2crypto .egg", sub {
my $pydir = "/usr/local/lib/python2.5/site-packages"; my $pydir = "/usr/local/lib/$PY_VER/site-packages";
my $egg = `ls -d $pydir/M2Crypto-0.19.1-py2.5-*.egg 2>/dev/null | tail -1`; my $egg = `ls -d $pydir/M2Crypto-*-py*-*.egg 2>/dev/null | tail -1`;
chomp($egg); chomp($egg);
if (! -x $EASYINSTALL) { if (! -x $EASYINSTALL) {
PhaseSkip("python easy_install missing"); PhaseSkip("python easy_install missing");
} }
if ($egg eq "") { if ($egg eq "") {
PhaseSkip("py25-m2crypto egg not found"); PhaseSkip("egg not found");
} }
if (-d "$egg") { if (-d "$egg") {
PhaseSkip("py25-m2crypto egg already unpacked"); PhaseSkip("egg already unpacked");
} }
# XXX swig must be installed for easyinstall to exit correctly # XXX swig must be installed for easyinstall to exit correctly
Phase "swig", "Installing swig", sub { Phase "swig", "Installing swig", sub {
...@@ -585,7 +614,7 @@ Phase "portfixup", "Fixing up packages", sub { ...@@ -585,7 +614,7 @@ Phase "portfixup", "Fixing up packages", sub {
}; };
ExecQuietFatal("mv $egg /var/tmp/"); ExecQuietFatal("mv $egg /var/tmp/");
$egg =~ s/$pydir//; $egg =~ s/$pydir//;
ExecQuietFatal("$EASYINSTALL -Z /var/tmp$egg"); ExecQuietFatal("$EASYINSTALL -N -H None -Z /var/tmp$egg");
ExecQuietFatal("mv /var/tmp$egg $pydir/$egg.bak"); ExecQuietFatal("mv /var/tmp$egg $pydir/$egg.bak");
}; };
} }
...@@ -1158,8 +1187,11 @@ Phase "database", "Setting up database", sub { ...@@ -1158,8 +1187,11 @@ Phase "database", "Setting up database", sub {
ExecQuietFatal("$RCDIR/1.mysql-server.sh start"); ExecQuietFatal("$RCDIR/1.mysql-server.sh start");
# Give mysqld some time to start, then make sure it did # Give mysqld some time to start, then make sure it did
sleep 5; sleep 2;
ExecQuietFatal("$MYSQLADMIN -u mysql ping"); if (ExecQuiet("$MYSQLADMIN -u mysql ping")) {
sleep 5;
ExecQuietFatal("$MYSQLADMIN -u mysql ping");
}
}; };
# Once the password is inserted and privs flushed, will need a password # Once the password is inserted and privs flushed, will need a password
......
...@@ -9,7 +9,11 @@ OSMINOR!= /usr/bin/uname -r | /usr/bin/sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/ ...@@ -9,7 +9,11 @@ OSMINOR!= /usr/bin/uname -r | /usr/bin/sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/
PORTNAME= emulab-boss PORTNAME= emulab-boss
.if ${OSMAJOR} > 6 .if ${OSMAJOR} > 6
.if ${OSMINOR} > 2
PORTVERSION= 3.1
.else
PORTVERSION= 3.0 PORTVERSION= 3.0
.endif
.else .else
.if ${OSMAJOR} > 5 .if ${OSMAJOR} > 5
.if ${OSMINOR} >= 3 .if ${OSMINOR} >= 3
...@@ -29,6 +33,21 @@ COMMENT= "Meta-port for an Emulab boss node" ...@@ -29,6 +33,21 @@ COMMENT= "Meta-port for an Emulab boss node"
MAINTAINER= testbed-ops@flux.utah.edu MAINTAINER= testbed-ops@flux.utah.edu
#
# Select PHP and Apache versions
# Fix up some port diffs
#
.if ${PORTVERSION} == "3.1"
PHP_VER= 5
PERL_VER= 5.10.1
BOOST_PORT= devel/boost-libs
P5SNMP_PORT= misc/p5-SNMP
.else
PHP_VER= 4
BOOST_PORT= devel/boost
P5SNMP_PORT= net-mgmt/p5-SNMP
.endif
# #
# We set this so that the mysql server port doesn't do name resolution # We set this so that the mysql server port doesn't do name resolution
# #
...@@ -38,9 +57,13 @@ MAINTAINER= testbed-ops@flux.utah.edu ...@@ -38,9 +57,13 @@ MAINTAINER= testbed-ops@flux.utah.edu
# We must make sure PERL is built with this. # We must make sure PERL is built with this.
# #
.MAKEFLAGS+= ENABLE_SUIDPERL=yes .MAKEFLAGS+= ENABLE_SUIDPERL=yes
.if ${PORTVERSION} == "3.1"
.MAKEFLAGS+= PERL_VERSION=5.10.1 PERL_VER=5.10.1 PERL_ARCH=mach
.else
.if ${PORTVERSION} == "3.0" .if ${PORTVERSION} == "3.0"
.MAKEFLAGS+= PERL_VERSION=5.10.0 PERL_VER=5.10.0 PERL_ARCH=mach .MAKEFLAGS+= PERL_VERSION=5.10.0 PERL_VER=5.10.0 PERL_ARCH=mach
.endif .endif
.endif
# #
# For SWIG, so that it doesn't feel the need to suck in php and apache # For SWIG, so that it doesn't feel the need to suck in php and apache
...@@ -50,17 +73,23 @@ MAINTAINER= testbed-ops@flux.utah.edu ...@@ -50,17 +73,23 @@ MAINTAINER= testbed-ops@flux.utah.edu
.MAKEFLAGS+= WANT_SWIG_PERL=yes WANT_SWIG_PYTHON=yes WANT_SWIG_TCL=yes .MAKEFLAGS+= WANT_SWIG_PERL=yes WANT_SWIG_PYTHON=yes WANT_SWIG_TCL=yes
# #
# Have not taken the plunge to PHP5 # For PHP, specify the version and that we want the Apache module
# Version is specified via PHP_VER above.
# #
.MAKEFLAGS+= PHP_VER=4 .MAKEFLAGS+= WANT_PHP_MOD=yes
# #
# Various ports need to agree on what version of apache. Make sure this # Various ports need to agree on what version of apache. Make sure this
# agrees with what is in the emulab-ops and emulab-php4 metaports. # agrees with what is in the emulab-ops and emulab-php* metaports.
# #
.MAKEFLAGS+= -DWITH_APACHE .MAKEFLAGS+= -DWITH_APACHE
.MAKEFLAGS+= APACHE_PORT=www/apache13-modssl .MAKEFLAGS+= APACHE_PORT=www/apache13-modssl
#
# Use the base version of openssl
#
.MAKEFLAGS+= WITH_OPENSSL_BASE=yes
# #
# This prevents any ports from trying to run interactively - some, like the # This prevents any ports from trying to run interactively - some, like the
# net-snmp port, ask silly questions without this option. # net-snmp port, ask silly questions without this option.
...@@ -68,12 +97,13 @@ MAINTAINER= testbed-ops@flux.utah.edu ...@@ -68,12 +97,13 @@ MAINTAINER= testbed-ops@flux.utah.edu
.MAKEFLAGS+= -DBATCH .MAKEFLAGS+= -DBATCH
# #
# XXX not really a build dependency, but needs to get installed before # XXX not rbuild dependencies, but these Emulab-specific ports need to get
# any attempt to install mysql50-* ports # installed before any attempt to install the standard versions.
# #
.if (${PORTVERSION} == "2.1" || ${PORTVERSION} == "3.0") .if (${PORTVERSION} == "2.1" || ${PORTVERSION} == "3.0" || ${PORTVERSION} == "3.1")
BUILD_DEPENDS= \ BUILD_DEPENDS= \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/misc/p5-DBD-mysql50-old ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/misc/p5-DBD-mysql50-old \
${LOCALBASE}/libexec/apache/libphp${PHP_VER}.so:${PORTSDIR}/misc/emulab-php${PHP_VER}
.else .else
BUILD_DEPENDS= \ BUILD_DEPENDS= \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql50 ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql50
...@@ -114,7 +144,7 @@ RUN_DEPENDS= \ ...@@ -114,7 +144,7 @@ RUN_DEPENDS= \
anytopnm:${PORTSDIR}/graphics/netpbm \ anytopnm:${PORTSDIR}/graphics/netpbm \
tclsh8.4:${PORTSDIR}/lang/tcl84 \ tclsh8.4:${PORTSDIR}/lang/tcl84 \
otclsh:${PORTSDIR}/lang/otcl \ otclsh:${PORTSDIR}/lang/otcl \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/SNMP.pm:${PORTSDIR}/net-mgmt/p5-SNMP \ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/SNMP.pm:${PORTSDIR}/${P5SNMP_PORT} \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/SNMP_Session.pm:${PORTSDIR}/net-mgmt/p5-SNMP_Session \ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/SNMP_Session.pm:${PORTSDIR}/net-mgmt/p5-SNMP_Session \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/BSD/Resource.pm:${PORTSDIR}/devel/p5-BSD-Resource \ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/BSD/Resource.pm:${PORTSDIR}/devel/p5-BSD-Resource \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \
...@@ -127,14 +157,14 @@ RUN_DEPENDS= \ ...@@ -127,14 +157,14 @@ RUN_DEPENDS= \
wget:${PORTSDIR}/ftp/wget \ wget:${PORTSDIR}/ftp/wget \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/XML/Parser:${PORTSDIR}/textproc/p5-XML-Parser \ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/XML/Parser:${PORTSDIR}/textproc/p5-XML-Parser \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/RPC/XML.pm:${PORTSDIR}/net/p5-RPC-XML \ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/RPC/XML.pm:${PORTSDIR}/net/p5-RPC-XML \
${LOCALBASE}/include/boost:${PORTSDIR}/devel/boost \ ${LOCALBASE}/include/boost:${PORTSDIR}/${BOOST_PORT} \
gmake:${PORTSDIR}/devel/gmake \ gmake:${PORTSDIR}/devel/gmake \
kmetis:${PORTSDIR}/math/metis \ kmetis:${PORTSDIR}/math/metis \
curl:${PORTSDIR}/ftp/curl \ curl:${PORTSDIR}/ftp/curl \
${PYTHON_SITELIBDIR}/MySQLdb/times.py:${PORTSDIR}/databases/py-MySQLdb \ ${PYTHON_SITELIBDIR}/MySQLdb/times.py:${PORTSDIR}/databases/py-MySQLdb \
mysqlhotcopy:${PORTSDIR}/databases/mysql50-scripts mysqlhotcopy:${PORTSDIR}/databases/mysql50-scripts
.if ${PORTVERSION} == "3.0" .if (${PORTVERSION} == "3.0" || ${PORTVERSION} == "3.1")
# must handle patching of m2crypto when the port is built # must handle patching of m2crypto when the port is built
RUN_DEPENDS+= \ RUN_DEPENDS+= \
${PYTHON_PKGNAMEPREFIX}m2crypto>0:${PORTSDIR}/misc/emulab-py-m2crypto ${PYTHON_PKGNAMEPREFIX}m2crypto>0:${PORTSDIR}/misc/emulab-py-m2crypto
...@@ -144,8 +174,8 @@ RUN_DEPENDS+= \ ...@@ -144,8 +174,8 @@ RUN_DEPENDS+= \
${PYTHON_PKGNAMEPREFIX}m2crypto>0:${PORTSDIR}/security/py-m2crypto ${PYTHON_PKGNAMEPREFIX}m2crypto>0:${PORTSDIR}/security/py-m2crypto
.endif