Commit f9648402 authored by David Johnson's avatar David Johnson

Initial support for Alpine Linux on the clientside.

parent 5cb5a65e
......@@ -4618,6 +4618,7 @@ outfiles="Makeconf GNUmakefile setversion \
tmcc/ubuntu16-ms/GNUmakefile \
tmcc/linux-ms/GNUmakefile \
tmcc/archlinux/GNUmakefile \
tmcc/alpine/GNUmakefile \
tmcc/freebsd5/GNUmakefile tmcc/freebsd5/supfile \
tmcc/freebsd6/GNUmakefile tmcc/freebsd6/supfile \
tmcc/freebsd6/netif-emulab \
......
......@@ -306,6 +306,7 @@ outfiles="Makeconf GNUmakefile setversion \
tmcc/ubuntu16-ms/GNUmakefile \
tmcc/linux-ms/GNUmakefile \
tmcc/archlinux/GNUmakefile \
tmcc/alpine/GNUmakefile \
tmcc/freebsd5/GNUmakefile tmcc/freebsd5/supfile \
tmcc/freebsd6/GNUmakefile tmcc/freebsd6/supfile \
tmcc/freebsd6/netif-emulab \
......
......@@ -36,7 +36,13 @@
/* for setsockopt and stuff */
#include <sys/param.h>
#include <sys/socket.h>
/*
* This ifdef mirrors the one in main.c. Not all libc impls offer the
* sysctl interface; and we only use it in this specific case on FreeBSD.
*/
#if !defined(USESOCKET) && (__FreeBSD_version >= 800000 && __FreeBSD_version < 803000)
#include <sys/sysctl.h>
#endif
#include <sys/time.h>
#include <sys/wait.h>
#ifndef linux
......
......@@ -1630,6 +1630,9 @@ start_program(struct proginfo *pinfo, unsigned long token, char *args)
* Exec the shell. We will reap children by catching SIGCHLD and
* causing an Elvin I/O handler to fire.
*/
#ifndef _PATH_CSHELL
#define _PATH_CSHELL "/bin/csh"
#endif
execl(_PATH_CSHELL, "csh", "-f", "-c", pinfo->cmdline, (char *)NULL);
/* Ug */
......
......@@ -42,6 +42,13 @@ ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT)
SUBDIRS := $(filter-out imagezip frisbee.redux,$(SUBDIRS))
endif
ifeq ($(SYSTEM),Linux)
OSTAG=$(shell $(SRCDIR)/../tmcc/osstuff.sh -t)
ifeq ($(OSTAG),alpine)
SUBDIRS := $(filter-out imagezip frisbee.redux capture,$(SUBDIRS))
endif
endif
all: all-subdirs
include $(TESTBED_SRCDIR)/GNUmakerules
......@@ -72,9 +79,11 @@ client-install: client
$(MAKE) -C syncd client-install
$(MAKE) -C dijkstra client-install
ifneq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT) # Filter out again...
ifneq ($(OSTAG),alpine)
$(MAKE) -C imagezip client-install
$(MAKE) -C frisbee.redux client-install
$(MAKE) -C capture client-install
endif
endif
$(MAKE) -C genhostsfile client-install
ifeq ($(SYSTEM),FreeBSD)
......
#
# Copyright (c) 2000-2012, 2015, 2016, 2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file 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 Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
#
# XXX ONLY RUN THIS INSTALL ON AN ALPINE LINUX TESTBED NODE!
#
# Trivial. These things just need to be installed into the right place
# on a testbed node before cutting an image.
#
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
include $(OBJDIR)/Makeconf
SCRIPTS =
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: supfile ifcfgs
include $(TESTBED_SRCDIR)/GNUmakerules
SYSETCDIR = $(DESTDIR)/etc
ETCDIR = $(DESTDIR)$(CLIENT_ETCDIR)
BINDIR = $(DESTDIR)$(CLIENT_BINDIR)
VARDIR = $(DESTDIR)$(CLIENT_VARDIR)
RCDIR = $(SYSETCDIR)
RRCDIR = /etc
INSTALL = /usr/bin/install -c
COMMON = $(SRCDIR)/../common
DEFRUNLVLDIR ?= $(SYSETCDIR)/rc3.d
# group to use for directories (dir-install)
DIRGROUP ?= root
install client-install: common-install etc-install \
script-install bin-install sysetc-fixup sysetc-install
@echo "Remember to install the PEM files if necessary"
simple-install: common-install script-install bin-install
dir-install:
$(INSTALL) -m 755 -o root -g root -d $(SYSETCDIR)
$(INSTALL) -m 755 -o root -g root -d $(SYSETCDIR)/sudoers.d
common-install: dir-install
(cd ../common; $(MAKE) DESTDIR=$(DESTDIR) local-install)
bin-install: dir-install
(cd ../linux; $(MAKE) DESTDIR=$(DESTDIR) RCDIR=$(RCDIR) USES_SYSTEMD=1 NOPASSWD=1 NOHOSTS=1 bin-install)
etc-install: dir-install common-sysetc-install
# No point to having passwd files for a rolling distro!
#$(INSTALL) -m 644 $(SRCDIR)/group $(ETCDIR)/group
#$(INSTALL) -m 644 $(SRCDIR)/passwd $(ETCDIR)/passwd
#$(INSTALL) -m 600 $(SRCDIR)/shadow $(ETCDIR)/shadow
#$(INSTALL) -m 600 $(SRCDIR)/gshadow $(ETCDIR)/gshadow
common-sysetc-install: dir-install
(cd ../linux; $(MAKE) DESTDIR=$(DESTDIR) RCDIR=$(RCDIR) RRCDIR=$(RRCDIR) NOPASSWD=1 NOHOSTS=1 sysetc-install)
sysetc-fixup:
rm -rf $(SYSETCDIR)/modules.conf $(SYSETCDIR)/cron.pend \
$(SYSETCDIR)/sysconfig $(SYSETCDIR)/init.d/ntpd
rm -f $(SYSETCDIR)/ntp.drift
rm -f $(SYSETCDIR)/rc.local
sysetc-install: dir-install
$(INSTALL) -m 644 $(SRCDIR)/sudoers $(SYSETCDIR)/sudoers.d/99-emulab
@if [ -z "$(NONTP)" ]; then \
$(INSTALL) -m 644 $(SRCDIR)/ntp.conf $(SYSETCDIR)/ntp.conf; \
$(INSTALL) -m 644 -o ntp -g ntp /dev/null /var/lib/ntp/ntp.drift ; \
fi
$(INSTALL) -m 755 -o root -g $(DIRGROUP) -d $(BINDIR)/initscripts
# Install our "helper" scripts
$(INSTALL) -m 755 -o root -g $(DIRGROUP) \
$(SRCDIR)/../linux/tbprepare $(BINDIR)/initscripts/
$(INSTALL) -m 755 -o root -g $(DIRGROUP) \
$(SRCDIR)/../linux/testbed $(BINDIR)/initscripts/
script-install: dir-install $(SCRIPTS)
(cd ../linux; $(MAKE) DESTDIR=$(DESTDIR) RCDIR=$(RCDIR) NOPASSWD=1 NOHOSTS=1 script-install)
genirack-install:
sfs-install:
#
# Generic Emulab NTP client configuration.
#
driftfile /var/lib/ntp/ntp.drift
# disallow most accesses, most importantly 'monlist' queries
# XXX again, not ideal but works with really old ntpds
restrict default nomodify nopeer noquery notrap
restrict 127.0.0.1
restrict ::1
server ntp1 iburst
Defaults !env_reset
Defaults !mail_badpass
%admin ALL=(ALL) NOPASSWD: ALL
%root ALL=(ALL) NOPASSWD: ALL
......@@ -7183,6 +7183,7 @@ outfiles="$outfiles clientside/GNUmakefile clientside/setversion \
clientside/tmcc/ubuntu16-ms/GNUmakefile \
clientside/tmcc/linux-ms/GNUmakefile \
clientside/tmcc/archlinux/GNUmakefile \
clientside/tmcc/alpine/GNUmakefile \
clientside/tmcc/freebsd5/GNUmakefile clientside/tmcc/freebsd5/supfile \
clientside/tmcc/freebsd6/GNUmakefile clientside/tmcc/freebsd6/supfile \
clientside/tmcc/freebsd6/netif-emulab \
......
......@@ -1512,6 +1512,7 @@ outfiles="$outfiles clientside/GNUmakefile clientside/setversion \
clientside/tmcc/ubuntu16-ms/GNUmakefile \
clientside/tmcc/linux-ms/GNUmakefile \
clientside/tmcc/archlinux/GNUmakefile \
clientside/tmcc/alpine/GNUmakefile \
clientside/tmcc/freebsd5/GNUmakefile clientside/tmcc/freebsd5/supfile \
clientside/tmcc/freebsd6/GNUmakefile clientside/tmcc/freebsd6/supfile \
clientside/tmcc/freebsd6/netif-emulab \
......
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