Commit d89310cb authored by Mike Hibler's avatar Mike Hibler

Checkpoint: partial merge of J Walsh's FreeBSD 7 server support.

parent 054a2fce
event/trafgen/tg2.0
sensors/nfstrace/nfsdump2/Makefile
sensors/nfstrace/nfsdump2/config.h
sensors/nfstrace/nfsdump2/config.log
......@@ -13,6 +13,7 @@ DISTCLEAN_FILES = @DISTCLEAN_FILES@
EVENTSYS = @EVENTSYS@
PELABSUPPORT = @PELABSUPPORT@
PGENISUPPORT = @PROTOGENI_SUPPORT@
ISMAINSITE = @TBMAINSITE@
SYSTEM := $(shell uname -s)
include Makeconf
......@@ -32,7 +33,10 @@ ifeq ($(STANDALONE_CLEARINGHOUSE),0)
SUBDIRS = lib db assign www @optional_subdirs@ ipod security sensors \
pxe tbsetup account tmcd utils backend tip capture ipod vis \
sensors os xmlrpc install/newnode_sshkeys mote tools/whol \
tools/svn wiki bugdb collab tools/rmanage protogeni node_usage
tools/svn wiki bugdb collab protogeni node_usage
ifeq ($(ISMAINSITE),1)
SUBDIRS += tools/rmanage
endif
else
SUBDIRS = db tbsetup account protogeni
endif
......
......@@ -243,7 +243,9 @@ LoadModule usertrack_module libexec/apache/mod_usertrack.so
LoadModule unique_id_module libexec/apache/mod_unique_id.so
LoadModule setenvif_module libexec/apache/mod_setenvif.so
LoadModule php4_module libexec/apache/libphp4.so
LoadModule auth_mysql_module libexec/apache/libauth_mysql.so
LoadModule auth_mysql_module libexec/apache/mod_auth_mysql.so
# use the following for older versions of mod_auth_mysql
#LoadModule auth_mysql_module libexec/apache/libauth_mysql.so
<IfDefine SSL>
LoadModule ssl_module libexec/apache/libssl.so
</IfDefine>
......
......@@ -260,7 +260,9 @@ else {
#
my $BOSS_PORT = "emulab-boss-1.8";
if ($FBSD_MAJOR > 4) {
if ($FBSD_MAJOR == 6 && $FBSD_MINOR > 2) {
if ($FBSD_MAJOR > 6) {
$BOSS_PORT = "emulab-boss-3.0";
} elsif ($FBSD_MAJOR == 6 && $FBSD_MINOR > 2) {
$BOSS_PORT = "emulab-boss-2.1";
} else {
$BOSS_PORT = "emulab-boss-2.0";
......@@ -484,7 +486,7 @@ Phase "ports", "Installing ports", sub {
ExecQuietFatal("$ENV PKG_PATH=$packagedir $PKG_ADD $pname");
};
# XXX Ditto
if ($FBSD_MAJOR == 6 && $FBSD_MINOR > 2) {
if ($FBSD_MAJOR > 6 || ($FBSD_MAJOR == 6 && $FBSD_MINOR > 2)) {
Phase "p5-DBD-mysql50", "Installing old Perl Mysql package", sub {
my $pname = `$PKG_INFO -E 'p5-DBD-mysql50-*' 2>/dev/null`;
chomp($pname);
......@@ -599,20 +601,22 @@ Phase "patches", "Applying patches", sub {
ExecQuietFatal("$PATCH -f -p0 -i $STL_PATCH");
};
}
Phase "m2cryptopatch", "Patching m2crypto", sub {
my $patchfile = $M2CRYPTO_PATCH;
if ($FBSD_MAJOR < 7) {
Phase "m2cryptopatch", "Patching m2crypto", sub {
my $patchfile = $M2CRYPTO_PATCH;
if (ExecQuiet("$PKG_INFO -I -x m2crypto | fgrep -q -s '0.17'") == 0) {
$patchfile = "${patchfile}-0.17";
}
elsif (ExecQuiet("$PKG_INFO -I -x m2crypto | fgrep -q -s '0.13'") == 0) {
$patchfile = "${patchfile}-0.13";
}
if (!ExecQuiet("$PATCH -C -f -l -R -p0 -i $patchfile")) {
PhaseSkip("Patch already applied");
}
ExecQuietFatal("$PATCH -f -l -p0 -i $patchfile");
};
if (ExecQuiet("$PKG_INFO -I -x m2crypto | fgrep -q -s '0.17'") == 0) {
$patchfile = "${patchfile}-0.17";
}
elsif (ExecQuiet("$PKG_INFO -I -x m2crypto | fgrep -q -s '0.13'") == 0) {
$patchfile = "${patchfile}-0.13";
}
if (!ExecQuiet("$PATCH -C -f -l -R -p0 -i $patchfile")) {
PhaseSkip("Patch already applied");
}
ExecQuietFatal("$PATCH -f -l -p0 -i $patchfile");
};
}
Phase "Mysql.pm.patch", "Patching Mysql.pm", sub {
my $patchfile = $MYSQL_PM_PATCH;
$patchfile = `realpath $patchfile`;
......@@ -1006,19 +1010,20 @@ Phase "NFSmounts", "Setting up NFS mounts", sub {
};
Phase "fstab", "Adding NFS mounts to $FSTAB", sub {
DoneIfEdited($FSTAB);
my @lines = ("$FSNODE:$USERROOT\t\t$USERROOT\tnfs\trw,nodev,nosuid\t0\t0",
"$FSNODE:$PROJROOT\t\t$PROJROOT\tnfs\trw,nodev,nosuid\t0\t0",
"$FSNODE:$GROUPROOT\t\t$GROUPROOT\tnfs\trw,nodev,nosuid\t0\t0",
"$FSNODE:$SHAREROOT\t\t$SHAREROOT\tnfs\trw,nodev,nosuid\t0\t0");
my $nfsopt = "nosuid";
$nfsopt .= ",nodev"
if ($FBSD_VERSION < 7);
my @lines = ("$FSNODE:$USERROOT\t\t$USERROOT\tnfs\trw,$nfsopt\t0\t0",
"$FSNODE:$PROJROOT\t\t$PROJROOT\tnfs\trw,$nfsopt\t0\t0",
"$FSNODE:$GROUPROOT\t\t$GROUPROOT\tnfs\trw,$nfsopt\t0\t0",
"$FSNODE:$SHAREROOT\t\t$SHAREROOT\tnfs\trw,$nfsopt\t0\t0");
if ($SCRATCHDIR) {
push(@lines,
"$FSNODE:$SCRATCHROOT\t\t$SCRATCHROOT\tnfs\trw,nodev,nosuid\t0\t0");
"$FSNODE:$SCRATCHROOT\t\t$SCRATCHROOT\tnfs\trw,$nfsopt\t0\t0");
}
push(@lines,
"$USERNODE:/usr/testbed\t\t$OPSDIR_DIR\tnfs\trw,soft,".
"-b,nodev,nosuid\t0\t0",
"$USERNODE:/var\t\t$USERSVAR_DIR\tnfs\tro,soft,".
"-b,nodev,nosuid\t0\t0");
"$USERNODE:/usr/testbed\t\t$OPSDIR_DIR\tnfs\trw,soft,-b,$nfsopt\t0\t0",
"$USERNODE:/var\t\t$USERSVAR_DIR\tnfs\tro,soft,-b,$nfsopt\t0\t0");
AppendToFileFatal($FSTAB, @lines);
};
Phase "mounts", "Mounting NFS filesystems", sub {
......@@ -1209,7 +1214,13 @@ Phase "sslcerts", "Setting up SSL certificates", sub {
};
Phase "rc.d", "Installing Apache startup file", sub {
DoneIfExists("$RCDIR/apache.sh");
ExecQuietFatal("mv $RCDIR/apache.sh.sample $RCDIR/apache.sh");
my $sfile
if ($FBSD_MAJOR > 6) {
$sfile = "$RCDIR/apache";
} else {
$sfile = "$RCDIR/apache.sh.sample";
}
ExecQuietFatal("mv $sfile $RCDIR/apache.sh");
if ($FBSD_MAJOR == 6) {
ExecQuietFatal("sed -i .orig ".
"-e 's/^apache_enable/#apache_enable/' ".
......
......@@ -111,7 +111,10 @@ else {
my $OPS_PORT = "emulab-ops-1.4";
my $FS_PORT = "emulab-fs-1.4";
if ($FBSD_MAJOR > 4) {
if ($FBSD_MAJOR == 6 && $FBSD_MINOR > 2) {
if ($FBSD_MAJOR > 6) {
$OPS_PORT = "emulab-ops-3.0";
$FS_PORT = "emulab-fs-3.0";
} elsif ($FBSD_MAJOR == 6 && $FBSD_MINOR > 2) {
$OPS_PORT = "emulab-ops-2.1";
$FS_PORT = "emulab-fs-2.1";
} else {
......@@ -534,20 +537,22 @@ Phase "portfixup", "Fixing up packages", sub {
};
Phase "patches", "Applying patches", sub {
Phase "m2cryptopatch", "Patching m2crypto", sub {
my $patchfile = $M2CRYPTO_PATCH;
if ($FBSD_MAJOR < 7) {
Phase "m2cryptopatch", "Patching m2crypto", sub {
my $patchfile = $M2CRYPTO_PATCH;
if (ExecQuiet("$PKG_INFO -I -x m2crypto | fgrep -q -s '0.17'") == 0) {
$patchfile = "${patchfile}-0.17";
}
elsif (ExecQuiet("$PKG_INFO -I -x m2crypto | fgrep -q -s '0.13'") == 0) {
$patchfile = "${patchfile}-0.13";
}
if (!ExecQuiet("$PATCH -C -f -l -R -p0 -i $patchfile")) {
PhaseSkip("Patch already applied");
}
ExecQuietFatal("$PATCH -f -l -p0 -i $patchfile");
};
if (ExecQuiet("$PKG_INFO -I -x m2crypto | fgrep -q -s '0.17'") == 0) {
$patchfile = "${patchfile}-0.17";
}
elsif (ExecQuiet("$PKG_INFO -I -x m2crypto | fgrep -q -s '0.13'") == 0) {
$patchfile = "${patchfile}-0.13";
}
if (!ExecQuiet("$PATCH -C -f -l -R -p0 -i $patchfile")) {
PhaseSkip("Patch already applied");
}
ExecQuietFatal("$PATCH -f -l -p0 -i $patchfile");
};
}
if ($MAILMANSUPPORT) {
Phase "mailmanpatch", "Patching mailman", sub {
my $patchfile = $MAILMAN_PATCH;
......@@ -936,6 +941,10 @@ Phase "samba", "Setting up Samba", sub {
Phase "ssh", "Allowing root ssh", sub {
Phase "sshdconfig", "Permitting root login through ssh", sub {
DoneIfEdited($SSHD_CONFIG);
# modern versions of FBSD explicitly turn off proto 1 by default
if ($FBSD_MAJOR > 6) {
ExecQuietFatal("sed -i.orig -e 's/Protocol/#Protocol/' $SSHD_CONFIG");
}
AppendToFileFatal($SSHD_CONFIG,
"PermitRootLogin yes",
"Protocol 2,1");
......
# New ports collection makefile for: emulab-boss
# Date created: 28 January 2003
# Whom: ricci@cs.utah.edu
# Updated: 1 October 2009 jwalsh@atl.lmco.com
# Need the major version number to figure out to do.
OSMAJOR!= /usr/bin/uname -r | /usr/bin/sed -e 's/\..*//'
OSMINOR!= /usr/bin/uname -r | /usr/bin/sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/'
PORTNAME= emulab-boss
.if ${OSMAJOR} >= 6
.if ${OSMAJOR} > 6
PORTVERSION= 3.0
.else
.if ${OSMAJOR} == 6
.if ${OSMINOR} >= 3
PORTVERSION= 2.1
.else
......@@ -16,6 +20,7 @@ PORTVERSION= 2.0
.else
PORTVERSION= 1.7
.endif
.endif
CATEGORIES= misc
MASTER_SITES= #none
DISTFILES= #none
......@@ -50,6 +55,7 @@ MAINTAINER= ricci@cs.utah.edu
# 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.
#
.MAKEFLAGS+= -DWITH_APACHE
.MAKEFLAGS+= APACHE_PORT=www/apache13-modssl
#
......@@ -62,7 +68,7 @@ MAINTAINER= ricci@cs.utah.edu
# XXX not really a build dependency, but needs to get installed before
# any attempt to install mysql50-* ports
#
.if ${PORTVERSION} == "2.1"
.if (${PORTVERSION} == "2.1" || ${PORTVERSION} == "3.0")
BUILD_DEPENDS= \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/misc/p5-DBD-mysql50-old
.else
......@@ -71,7 +77,7 @@ BUILD_DEPENDS= \
.endif
LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd \
lthread.[23]:${PORTSDIR}/devel/linuxthreads \
lthread.[23456]:${PORTSDIR}/devel/linuxthreads \
mhash.2:${PORTSDIR}/security/mhash \
mysqlclient.15:${PORTSDIR}/databases/mysql50-client \
snmp.4:${PORTSDIR}/net-mgmt/net-snmp4 \
......@@ -112,19 +118,27 @@ RUN_DEPENDS= \
xvcg:${PORTSDIR}/graphics/vcg \
${LOCALBASE}/libexec/tftpd:${PORTSDIR}/misc/emulab-tftp-hpa \
sudo:${PORTSDIR}/security/sudo \
dhcpd:${PORTSDIR}/net/isc-dhcp3-server \
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}/RPC/XML.pm:${PORTSDIR}/net/p5-RPC-XML \
${PYTHON_SITELIBDIR}/M2Crypto/ASN1.py:${PORTSDIR}/security/py-m2crypto \
${LOCALBASE}/include/boost:${PORTSDIR}/devel/boost \
gmake:${PORTSDIR}/devel/gmake \
kmetis:${PORTSDIR}/math/metis \
curl:${PORTSDIR}/ftp/curl \
${PYTHON_SITELIBDIR}/MySQLdb/times.py:${PORTSDIR}/databases/py-MySQLdb \
mysqlhotcopy:${PORTSDIR}/databases/mysql50-scripts
.if ${PORTVERSION} == "2.1"
.if (${PORTVERSION} == "2.1" || ${PORTVERSION} == "3.0")
.if ${PORTVERSION} == "3.0"
RUN_DEPENDS+= \
dhcpd:${PORTSDIR}/net/isc-dhcp30-server \
${LOCALBASE}/include/boost:${PORTSDIR}/devel/boost-all
.else
RUN_DEPENDS+= \
dhcpd:${PORTSDIR}/net/isc-dhcp3-server \
${LOCALBASE}/include/boost:${PORTSDIR}/devel/boost
.endif
RUN_DEPENDS+= \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/XML/Parser.pm:${PORTSDIR}/textproc/p5-XML-Parser
# not sure why this is just needed for 6.3
......@@ -149,6 +163,12 @@ RUN_DEPENDS+= cvsup:${PORTSDIR}/net/cvsup-without-gui \
${LOCALBASE}/sbin/named:${PORTSDIR}/dns/bind9
.endif
# this wasn't getting installed correctly
.if ${OSMAJOR} >= 7
RUN_DEPENDS+= \
${LOCALBASE}/libexec/apache/libphp4.so:${PORTSDIR}/misc/emulab-php4
.endif
USE_PERL5= yes
USE_PYTHON= yes
......
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