diff --git a/fedostree/products.json b/fedostree/products.json index 20a9a10f..011e2987 100644 --- a/fedostree/products.json +++ b/fedostree/products.json @@ -25,6 +25,7 @@ "core": { "docker": { "packages": ["docker-io", "NetworkManager", "vim-minimal", "nano"], + "units": ["docker.service"], "postprocess": ["remove-locales", "remove-gpu-drivers", "remove-docs"], diff --git a/src/autobuilder/js/tasks/task-build.js b/src/autobuilder/js/tasks/task-build.js index 23ba8d65..635509dc 100644 --- a/src/autobuilder/js/tasks/task-build.js +++ b/src/autobuilder/js/tasks/task-build.js @@ -87,6 +87,20 @@ const TaskBuild = new Lang.Class({ argv.push.apply(argv, repos.map(function (a) { return '--enablerepo=' + a; })); argv.push.apply(argv, postprocessSteps.map(function (a) { return '--post=' + a; })); + let enableUnitsScript = '#!/bin/sh\n'; + let enabledUnits = treeData['units']; + if (enabledUnits) { + for (let i = 0; i < enabledUnits.length; i++) { + let unit = enabledUnits[i]; + print("Enabling unit " + unit); + enableUnitsScript += 'ln -s /usr/lib/systemd/system/' + unit + ' ' + './usr/etc/systemd/system/multi-user.target.wants\n'; + } + let enableUnitsScriptPath = Gio.File.new_for_path('enable-units.sh'); + enableUnitsScriptPath.replace_contents(enableUnitsScript, null, false, 0, cancellable); + GSystem.file_chmod(enableUnitsScriptPath, 493, cancellable); + argv.push('--xpost=' + enableUnitsScriptPath.get_path()); + } + let keyId = this._productData['gpg_key']; if (keyId) { print("Signing using " + keyId);