summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Wienand <iwienand@redhat.com>2017-06-19 11:35:14 +1000
committerIan Wienand <iwienand@redhat.com>2017-06-19 13:27:33 +1000
commita0f747932d0ef321355f62205d2e47b93ddc06dd (patch)
treefdf05e1014a53a630c6163ea89cce7438b3ef893
parent250aeb5d219db1a0fc01033168a55f7f61e60c74 (diff)
Install systemd earlier for Stretch
Debian Stretch released as stable recently, and the init system is less tightly specified in the base dependencies (for some info, see [1]). It seems, probably unintentionally, that in the previous release systemd-sysv was brought in by debootstrap, but that is no longer happening. Add systemd as an early dependency of debian-minimal. Remove the package-installs.yaml as that happens too late (other things need to know the init system to write out service files, etc and probe for systemd utils before package-installs). As mentioned, I do not believe the "only install systemd on testing" idea was actually working here, because it was being brought in during the initial debootstrap. Update some documentation to explain what's going on [1] https://lists.debian.org/debian-boot/2015/05/msg00156.html Change-Id: Id67c0cf08728407d234976f9807d3bd71d12f758
Notes
Notes (review): Code-Review-1: Andreas Florath <andreas@florath.net> Code-Review+2: yolanda.robla <yroblamo@redhat.com> Workflow+1: Ian Wienand <iwienand@redhat.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 19 Jun 2017 13:22:34 +0000 Reviewed-on: https://review.openstack.org/475206 Project: openstack/diskimage-builder Branch: refs/heads/master
-rw-r--r--diskimage_builder/elements/debian-minimal/README.rst2
-rw-r--r--diskimage_builder/elements/debian-minimal/package-installs.yaml2
-rw-r--r--diskimage_builder/elements/debian-minimal/pkg-map14
-rwxr-xr-xdiskimage_builder/elements/debian-minimal/root.d/75-debian-minimal-baseinstall18
-rw-r--r--diskimage_builder/elements/debian-systemd/README.rst3
-rw-r--r--diskimage_builder/elements/debian-upstart/README.rst3
6 files changed, 23 insertions, 19 deletions
diff --git a/diskimage_builder/elements/debian-minimal/README.rst b/diskimage_builder/elements/debian-minimal/README.rst
index bc1253a..f7bd9eb 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
11the variable ``DIB_RELEASE``. If a different release of Debian should 11the variable ``DIB_RELEASE``. If a different release of Debian should
12be created, the variable ``DIB_RELEASE`` can be set appropriately. 12be created, the variable ``DIB_RELEASE`` can be set appropriately.
13 13
14Note that this element installs ``systemd-sysv`` as the init system
15
14.. element_deps:: 16.. element_deps::
diff --git a/diskimage_builder/elements/debian-minimal/package-installs.yaml b/diskimage_builder/elements/debian-minimal/package-installs.yaml
index 9e08e6a..bc0d683 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:
2 arch: amd64 2 arch: amd64
3linux-image-686: 3linux-image-686:
4 arch: i386 4 arch: i386
5systemd:
6systemd-sysv:
diff --git a/diskimage_builder/elements/debian-minimal/pkg-map b/diskimage_builder/elements/debian-minimal/pkg-map
deleted file mode 100644
index 281ae60..0000000
--- a/diskimage_builder/elements/debian-minimal/pkg-map
+++ /dev/null
@@ -1,14 +0,0 @@
1{
2 "release": {
3 "debian": {
4 "testing": {
5 "systemd": "systemd",
6 "systemd-sysv": "systemd-sysv"
7 }
8 }
9 },
10 "default": {
11 "systemd": "",
12 "systemd-sysv": ""
13 }
14}
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 7c967e6..ceb51bf 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 @@
16# See the License for the specific language governing permissions and 16# See the License for the specific language governing permissions and
17# limitations under the License. 17# limitations under the License.
18 18
19# dib-lint: disable=safe_sudo
20
19if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then 21if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
20 set -x 22 set -x
21fi 23fi
@@ -54,13 +56,23 @@ $apt_get update
54$apt_get clean 56$apt_get clean
55$apt_get dist-upgrade -y 57$apt_get dist-upgrade -y
56 58
57$apt_get install -y busybox sudo 59to_install=""
60
61# pre-stretch (9.0) brought this in via debootstrap, but init
62# dependencies have narrowed in the container world, so now we add it
63# explicitly here so it's brought in early.
64to_install+="systemd-sysv "
65
66# default required
67to_install+="busybox sudo "
58 68
59if [ "$DIB_PYTHON_VERSION" == "2" ]; then 69if [ "$DIB_PYTHON_VERSION" == "2" ]; then
60 $apt_get install -y python 70 to_install+="python "
61elif [ "$DIB_PYTHON_VERSION" == "3" ]; then 71elif [ "$DIB_PYTHON_VERSION" == "3" ]; then
62 $apt_get install -y python3 72 to_install+="python3 "
63else 73else
64 echo "ERROR: DIB_PYTHON_VERSION is '$DIB_PYTHON_VERSION' but needs to be 2 or 3" 74 echo "ERROR: DIB_PYTHON_VERSION is '$DIB_PYTHON_VERSION' but needs to be 2 or 3"
65 exit 1 75 exit 1
66fi 76fi
77
78$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 59623a2..0165319 100644
--- a/diskimage_builder/elements/debian-systemd/README.rst
+++ b/diskimage_builder/elements/debian-systemd/README.rst
@@ -4,4 +4,7 @@ debian-systemd
4You may want to use `systemd` instead of the classic sysv init system. 4You may want to use `systemd` instead of the classic sysv init system.
5In this case, include this element in your element list. 5In this case, include this element in your element list.
6 6
7Note that this works with the ``debian`` element, not the
8``debian-minimal`` element.
9
7.. element_deps:: 10.. element_deps::
diff --git a/diskimage_builder/elements/debian-upstart/README.rst b/diskimage_builder/elements/debian-upstart/README.rst
index 73a6129..64aaaab 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
5with Upstart, or have need of it due to a need for upstart jobs, this 5with Upstart, or have need of it due to a need for upstart jobs, this
6element will build the image with upstart as the init system. 6element will build the image with upstart as the init system.
7 7
8Note that this works with the ``debian`` element, not the
9``debian-minimal`` element.
10
8.. element_deps:: 11.. element_deps::