diff --git a/diskimage_builder/elements/debian-minimal/README.rst b/diskimage_builder/elements/debian-minimal/README.rst index bc1253a0..f7bd9eb8 100644 --- a/diskimage_builder/elements/debian-minimal/README.rst +++ b/diskimage_builder/elements/debian-minimal/README.rst @@ -11,4 +11,6 @@ setting can be found in the element's ``environment.d`` directory in the variable ``DIB_RELEASE``. If a different release of Debian should be created, the variable ``DIB_RELEASE`` can be set appropriately. +Note that this element installs ``systemd-sysv`` as the init system + .. element_deps:: diff --git a/diskimage_builder/elements/debian-minimal/package-installs.yaml b/diskimage_builder/elements/debian-minimal/package-installs.yaml index 9e08e6a5..bc0d6838 100644 --- a/diskimage_builder/elements/debian-minimal/package-installs.yaml +++ b/diskimage_builder/elements/debian-minimal/package-installs.yaml @@ -2,5 +2,3 @@ linux-image-amd64: arch: amd64 linux-image-686: arch: i386 -systemd: -systemd-sysv: diff --git a/diskimage_builder/elements/debian-minimal/pkg-map b/diskimage_builder/elements/debian-minimal/pkg-map deleted file mode 100644 index 281ae60d..00000000 --- a/diskimage_builder/elements/debian-minimal/pkg-map +++ /dev/null @@ -1,14 +0,0 @@ -{ - "release": { - "debian": { - "testing": { - "systemd": "systemd", - "systemd-sysv": "systemd-sysv" - } - } - }, - "default": { - "systemd": "", - "systemd-sysv": "" - } -} diff --git a/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall b/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall index 7c967e69..ceb51bf1 100755 --- a/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall +++ b/diskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall @@ -16,6 +16,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# dib-lint: disable=safe_sudo + if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then set -x fi @@ -54,13 +56,23 @@ $apt_get update $apt_get clean $apt_get dist-upgrade -y -$apt_get install -y busybox sudo +to_install="" + +# pre-stretch (9.0) brought this in via debootstrap, but init +# dependencies have narrowed in the container world, so now we add it +# explicitly here so it's brought in early. +to_install+="systemd-sysv " + +# default required +to_install+="busybox sudo " if [ "$DIB_PYTHON_VERSION" == "2" ]; then - $apt_get install -y python + to_install+="python " elif [ "$DIB_PYTHON_VERSION" == "3" ]; then - $apt_get install -y python3 + to_install+="python3 " else echo "ERROR: DIB_PYTHON_VERSION is '$DIB_PYTHON_VERSION' but needs to be 2 or 3" exit 1 fi + +$apt_get install -y $to_install diff --git a/diskimage_builder/elements/debian-systemd/README.rst b/diskimage_builder/elements/debian-systemd/README.rst index 59623a2b..01653199 100644 --- a/diskimage_builder/elements/debian-systemd/README.rst +++ b/diskimage_builder/elements/debian-systemd/README.rst @@ -4,4 +4,7 @@ debian-systemd You may want to use `systemd` instead of the classic sysv init system. In this case, include this element in your element list. +Note that this works with the ``debian`` element, not the +``debian-minimal`` element. + .. element_deps:: diff --git a/diskimage_builder/elements/debian-upstart/README.rst b/diskimage_builder/elements/debian-upstart/README.rst index 73a61295..64aaaab3 100644 --- a/diskimage_builder/elements/debian-upstart/README.rst +++ b/diskimage_builder/elements/debian-upstart/README.rst @@ -5,4 +5,7 @@ By default Debian will use sysvinit for booting. If you want to experiment with Upstart, or have need of it due to a need for upstart jobs, this element will build the image with upstart as the init system. +Note that this works with the ``debian`` element, not the +``debian-minimal`` element. + .. element_deps::