Commit beabd0a2 by Wim Coekaerts Committed by Stéphane Graber

Add support for Linux for SPARC distribution host and template

Linux for SPARC is a free community Linux distribution for SPARC hosted by Oracle. See : https://oss.oracle.com/projects/linux-sparc While the distribution is based on Oracle Linux it does have some differences and since it's not actually Oracle Linux I decided to add a separate template rather than having the Oracle Linux template also support Linux for SPARC. This patch adds the lxc-template for Linux for SPARC and it also adds Linux for SPARC in the configure.ac as a distribution target to build. Signed-off-by: 's avatarWim Coekaerts <wim.coekaerts@oracle.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent cb65e5d7
......@@ -34,4 +34,6 @@ templatesconfig_DATA = \
ubuntu.lucid.conf \
ubuntu.userns.conf \
openwrt.common.conf \
sparclinux.common.conf \
sparclinux.userns.conf \
userns.conf
# This derives from the global common config
lxc.include = @LXCTEMPLATECONFIG@/common.conf
# Capabilities
# Uncomment these if you don't run anything that needs the capability, and
# would like the container to run with less privilege.
#
# Dropping sys_admin disables container root from doing a lot of things
# that could be bad like re-mounting lxc fstab entries rw for example,
# but also disables some useful things like being able to nfs mount, and
# things that are already namespaced with ns_capable() kernel checks, like
# hostname(1).
# lxc.cap.drop = sys_admin
# lxc.cap.drop = net_raw # breaks dhcp/ping
# lxc.cap.drop = setgid # breaks login (initgroups/setgroups)
# lxc.cap.drop = dac_read_search # breaks login (pam unix_chkpwd)
# lxc.cap.drop = setuid # breaks sshd,nfs statd
# lxc.cap.drop = audit_control # breaks sshd (set_loginuid failed)
# lxc.cap.drop = audit_write
lxc.cap.drop = sys_nice sys_pacct sys_rawio
# This derives from the global userns config
lxc.include = @LXCTEMPLATECONFIG@/userns.conf
......@@ -36,13 +36,14 @@ AC_GNU_SOURCE
# Detect the distribution. This is used for the default configuration and
# for some distro-specific build options.
AC_MSG_CHECKING([host distribution])
AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, centos, fedora, suse, gentoo, debian, arch, slackware, plamo, paldo, openmandriva or pardus.]))
AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, centos, fedora, suse, gentoo, debian, arch, slackware, plamo, paldo, openmandriva, pardus, sparclinux.]))
if type lsb_release >/dev/null 2>&1 && test "z$with_distro" = "z"; then
with_distro=`lsb_release -is`
fi
if test "z$with_distro" = "z"; then
AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
AC_CHECK_FILE(/etc/oracle-release,with_distro="oracle")
AC_CHECK_FILE(/etc/sparclinux-release,with_distro="sparclinux")
AC_CHECK_FILE(/etc/centos-release,with_distro="centos")
AC_CHECK_FILE(/etc/fedora-release,with_distro="fedora")
AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
......@@ -58,6 +59,10 @@ if test "z$with_distro" = "z"; then
fi
with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'`
if test "z$with_distro" = "zforsparc"; then
with_distro="sparclinux"
fi
if test "z$with_distro" = "z"; then
with_distro="unknown"
fi
......@@ -66,7 +71,7 @@ case $with_distro in
distroconf=default.conf.lxcbr
distrosysconf="$sysconfdir/default"
;;
redhat|centos|fedora|oracle|oracleserver|suse|opensuse*|plamo)
redhat|centos|fedora|oracle|oracleserver|sparclinux|suse|opensuse*|plamo)
distroconf=default.conf.lxcbr
distrosysconf="$sysconfdir/sysconfig"
;;
......@@ -93,7 +98,7 @@ case "$with_init_script" in
fedora|opensuse*)
init_script=systemd
;;
redhat|centos|oracle|oracleserver|plamo)
redhat|centos|oracle|oracleserver|sparclinux|plamo)
init_script=sysvinit
;;
debian|raspbian)
......@@ -671,6 +676,8 @@ AC_CONFIG_FILES([
config/templates/ubuntu.lucid.conf
config/templates/ubuntu.userns.conf
config/templates/openwrt.common.conf
config/templates/sparclinux.common.conf
config/templates/sparclinux.userns.conf
config/templates/userns.conf
config/yum/Makefile
config/sysconfig/Makefile
......@@ -823,6 +830,7 @@ AC_CONFIG_FILES([
templates/lxc-sshd
templates/lxc-ubuntu
templates/lxc-ubuntu-cloud
templates/lxc-sparclinux
src/Makefile
src/lxc/Makefile
......
......@@ -18,4 +18,5 @@ templates_SCRIPTS = \
lxc-slackware \
lxc-sshd \
lxc-ubuntu \
lxc-ubuntu-cloud
lxc-ubuntu-cloud \
lxc-sparclinux
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