diff --git a/elements/opensuse-minimal/README.rst b/elements/opensuse-minimal/README.rst new file mode 100644 index 000000000..46df3c17c --- /dev/null +++ b/elements/opensuse-minimal/README.rst @@ -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/`` diff --git a/elements/opensuse-minimal/element-deps b/elements/opensuse-minimal/element-deps new file mode 100644 index 000000000..ac6b190dd --- /dev/null +++ b/elements/opensuse-minimal/element-deps @@ -0,0 +1 @@ +zypper-minimal diff --git a/elements/opensuse-minimal/element-provides b/elements/opensuse-minimal/element-provides new file mode 100644 index 000000000..a72e04969 --- /dev/null +++ b/elements/opensuse-minimal/element-provides @@ -0,0 +1 @@ +operating-system diff --git a/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash b/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash new file mode 100644 index 000000000..58fff6d2e --- /dev/null +++ b/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash @@ -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 diff --git a/elements/opensuse/install.d/01-ccache-symlinks b/elements/zypper/install.d/01-ccache-symlinks similarity index 100% rename from elements/opensuse/install.d/01-ccache-symlinks rename to elements/zypper/install.d/01-ccache-symlinks diff --git a/elements/opensuse/install.d/01-login-defs b/elements/zypper/install.d/01-login-defs similarity index 100% rename from elements/opensuse/install.d/01-login-defs rename to elements/zypper/install.d/01-login-defs diff --git a/releasenotes/notes/opensuse-minimal-45267f5be1112c22.yaml b/releasenotes/notes/opensuse-minimal-45267f5be1112c22.yaml new file mode 100644 index 000000000..4480aeddf --- /dev/null +++ b/releasenotes/notes/opensuse-minimal-45267f5be1112c22.yaml @@ -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.