Add opensuse-minimal element

Add a new opensuse-minimal element to build small and highly
configurable openSUSE based images using the zypper-minimal element
as the main building mechanism

Change-Id: Iebfc4ad4aff763e511b093f1607b55851ccbddcb
This commit is contained in:
Markos Chandras 2016-10-03 15:51:18 +01:00
parent c69c6c5a84
commit 90536dbab3
7 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,28 @@
================
opensuse-minimal
================
This element will build a minimal openSUSE image. It requires 'zypper' to be
installed on the host.
These images should be considered experimental. There are curently only x86_64
images.
Environment Variables
---------------------
DIB_RELEASE
:Required: No
:Default: 42.1
:Description: Set the desired openSUSE release.
DIB_OPENSUSE_MIRROR:
:Required: No
:Default: http://download.opensuse.org
:Description: To use a specific openSUSE mirror, set this variable to the
mirror URL before running bin/disk-image-create. This URL
should point to the root directory as indicated in the
http://mirrors.opensuse.org/ webpage. You normally
don't want to change that since the default setting will
pick the mirror closest to you.
:Example: ``DIB_OPENSUSE_MIRROR=http://ftp.cc.uoc.gr/mirrors/linux/opensuse/opensuse/``

View File

@ -0,0 +1 @@
zypper-minimal

View File

@ -0,0 +1 @@
operating-system

View File

@ -0,0 +1,20 @@
export DISTRO_NAME=opensuse
export DIB_RELEASE=${DIB_RELEASE:-42.1}
export DIB_OPENSUSE_MIRROR=${DIB_OPENSUSE_MIRROR:-http://download.opensuse.org}
case ${DIB_RELEASE} in
# We are using "=>" as the assignment symbol since "@" "=" etc could be used in the URI itself.
# Remember, we can't export an array in bash so we use a string instead.
# Repo format: {name}=>{uri}
# Old openSUSE releases
13*)
ZYPPER_REPOS="update=>${DIB_OPENSUSE_MIRROR}/update/${DIB_RELEASE}/ "
ZYPPER_REPOS+="oss=>${DIB_OPENSUSE_MIRROR}/distribution/${DIB_RELEASE}/repo/oss/"
;;
# New Leap releases
42*)
ZYPPER_REPOS="update=>${DIB_OPENSUSE_MIRROR}/update/leap/${DIB_RELEASE}/oss/ "
ZYPPER_REPOS+="oss=>${DIB_OPENSUSE_MIRROR}/distribution/leap/${DIB_RELEASE}/repo/oss/"
;;
*) echo "Unsupported openSUSE release: ${DIB_RELEASE}"; exit 1 ;;
esac
export ZYPPER_REPOS

View File

@ -0,0 +1,6 @@
---
features:
- New zypper-minimal and opensuse-minimal elements to create basic
openSUSE images. These two new elements are also making use of the
existing zypper element which has been extended to include the
functionality previously present in the opensuse element.