From 723c90a6e3bb24a25e47be2103caa68fcbd74e47 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 26 Jul 2015 14:57:31 +0100 Subject: insert disable kogaionlive services into calamares src tree, disable kogaionlive services during installation, enable lightdm service --- app-admin/calamares/calamares-1.1.ebuild | 4 ++ ...mares-disable-kogaionlive-services-module.patch | 81 ++++++++++++++++++++++ .../calamares-config-kogaion-2.0-r1.ebuild | 24 ------- .../calamares-config-kogaion-2.0-r2.ebuild | 24 +++++++ .../files/modules/liveservices.conf | 21 ++++++ .../files/modules/services.conf | 9 +++ .../calamares-config-kogaion/files/settings.conf | 1 + 7 files changed, 140 insertions(+), 24 deletions(-) create mode 100644 app-admin/calamares/files/calamares-disable-kogaionlive-services-module.patch delete mode 100644 app-misc/calamares-config-kogaion/calamares-config-kogaion-2.0-r1.ebuild create mode 100644 app-misc/calamares-config-kogaion/calamares-config-kogaion-2.0-r2.ebuild create mode 100644 app-misc/calamares-config-kogaion/files/modules/liveservices.conf create mode 100644 app-misc/calamares-config-kogaion/files/modules/services.conf diff --git a/app-admin/calamares/calamares-1.1.ebuild b/app-admin/calamares/calamares-1.1.ebuild index 9dc37615..f063cb11 100644 --- a/app-admin/calamares/calamares-1.1.ebuild +++ b/app-admin/calamares/calamares-1.1.ebuild @@ -47,6 +47,10 @@ DEPEND=" RDEPEND=">=app-misc/calamares-runtime-2.0[branding]" src_prepare() { + # insert disable kogaionlive services module into src tree + epatch -p1 "${FILESDIR}"/${PN}-disable-kogaionlive-services-module.patch + # replace calamares installer desktop icon + sed -i "s/Icon=calamares/Icon=start-here/g" "${S}/calamares.desktop" # If qtchooser is installed, it may break the build, because moc,rcc and uic binaries for wrong qt version may be used. # Setting QT_SELECT environment variable will enforce correct binaries (fix taken from vlc ebuild) export QT_SELECT=qt5 diff --git a/app-admin/calamares/files/calamares-disable-kogaionlive-services-module.patch b/app-admin/calamares/files/calamares-disable-kogaionlive-services-module.patch new file mode 100644 index 00000000..181a5cbb --- /dev/null +++ b/app-admin/calamares/files/calamares-disable-kogaionlive-services-module.patch @@ -0,0 +1,81 @@ +diff -Nur a/src/modules/liveservices/liveservices.conf b/src/modules/liveservices/liveservices.conf +--- a/src/modules/liveservices/liveservices.conf 1970-01-01 01:00:00.000000000 +0100 ++++ b/src/modules/liveservices/liveservices.conf 2015-07-26 14:31:44.353557382 +0100 +@@ -0,0 +1,21 @@ ++--- ++#systemd kogaion live services are disabled in this precise order ++ ++services: ++ - name: "x-setup" #name of the service file ++ mandatory: false #true=> if disabling fails the installer errors out and quits ++ #false=>if disabling fails print warning to console and continue ++ - name: "cdeject" ++ mandatory: false ++ ++ - name: "installer-text" ++ mandatory: false ++ ++ - name: "installer-gui" ++ mandatory: false ++ ++ - name: "graphical_start" ++ mandatory: false ++ ++ - name: "kogaionlive" ++ mandatory: false +diff -Nur a/src/modules/liveservices/main.py b/src/modules/liveservices/main.py +--- a/src/modules/liveservices/main.py 1970-01-01 01:00:00.000000000 +0100 ++++ b/src/modules/liveservices/main.py 2015-07-26 14:24:57.722530083 +0100 +@@ -0,0 +1,42 @@ ++#!/usr/bin/env python3 ++# -*- coding: utf-8 -*- ++# ++# === This file is part of Calamares - === ++# ++# Copyright 2014, Philip Müller ++# Copyright 2014, Teo Mrnjavac ++# Copyright 2015, V3n3RiX ++# ++# Calamares is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# Calamares is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with Calamares. If not, see . ++ ++import libcalamares ++ ++ ++def run(): ++ """ Setup systemd services """ ++ services = libcalamares.job.configuration['services'] ++ ++ # disable kogaion live services ++ for svc in services: ++ ec = libcalamares.utils.chroot_call(['systemctl', 'disable', '{}.service'.format(svc['name'])]) ++ ++ if ec != 0: ++ if svc['mandatory']: ++ return "Cannot disable systemd service {}".format(svc['name']), \ ++ "systemctl disable call in chroot returned error code {}".format(ec) ++ else: ++ libcalamares.utils.debug("Cannot disable systemd service {}".format(svc['name'])) ++ libcalamares.utils.debug("systemctl disable call in chroot returned error code {}".format(ec)) ++ ++ return None +diff -Nur a/src/modules/liveservices/module.desc b/src/modules/liveservices/module.desc +--- a/src/modules/liveservices/module.desc 1970-01-01 01:00:00.000000000 +0100 ++++ b/src/modules/liveservices/module.desc 2015-07-26 14:32:23.925560039 +0100 +@@ -0,0 +1,6 @@ ++--- ++type: "job" ++name: "liveservices" ++interface: "python" ++requires: [] ++script: "main.py" diff --git a/app-misc/calamares-config-kogaion/calamares-config-kogaion-2.0-r1.ebuild b/app-misc/calamares-config-kogaion/calamares-config-kogaion-2.0-r1.ebuild deleted file mode 100644 index e46b065f..00000000 --- a/app-misc/calamares-config-kogaion/calamares-config-kogaion-2.0-r1.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -DESCRIPTION="Kogaion Linux Calamares modules config" -HOMEPAGE="" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="app-admin/calamares" - -S="${FILESDIR}" - -src_install() { - dodir "/etc/calamares" || die - insinto "/etc/calamares" || die - doins -r "${S}/"* || die -} diff --git a/app-misc/calamares-config-kogaion/calamares-config-kogaion-2.0-r2.ebuild b/app-misc/calamares-config-kogaion/calamares-config-kogaion-2.0-r2.ebuild new file mode 100644 index 00000000..e46b065f --- /dev/null +++ b/app-misc/calamares-config-kogaion/calamares-config-kogaion-2.0-r2.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +DESCRIPTION="Kogaion Linux Calamares modules config" +HOMEPAGE="" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="app-admin/calamares" + +S="${FILESDIR}" + +src_install() { + dodir "/etc/calamares" || die + insinto "/etc/calamares" || die + doins -r "${S}/"* || die +} diff --git a/app-misc/calamares-config-kogaion/files/modules/liveservices.conf b/app-misc/calamares-config-kogaion/files/modules/liveservices.conf new file mode 100644 index 00000000..826b25cf --- /dev/null +++ b/app-misc/calamares-config-kogaion/files/modules/liveservices.conf @@ -0,0 +1,21 @@ +--- +#systemd kogaion live services are disabled in this precise order + +services: + - name: "x-setup" #name of the service file + mandatory: false #true=> if disabling fails the installer errors out and quits + #false=>if disabling fails print warning to console and continue + - name: "cdeject" + mandatory: false + + - name: "installer-text" + mandatory: false + + - name: "installer-gui" + mandatory: false + + - name: "graphical_start" + mandatory: false + + - name: "kogaionlive" + mandatory: false diff --git a/app-misc/calamares-config-kogaion/files/modules/services.conf b/app-misc/calamares-config-kogaion/files/modules/services.conf new file mode 100644 index 00000000..f5b22f4e --- /dev/null +++ b/app-misc/calamares-config-kogaion/files/modules/services.conf @@ -0,0 +1,9 @@ +--- +#systemd services and targets are enabled in this precise order + +services: + - name: "NetworkManager" #name of the service file + mandatory: false #true=> if enabling fails the installer errors out and quits + #false=>if enabling fails print warning to console and continue + - name: "lightdm" + mandatory: false diff --git a/app-misc/calamares-config-kogaion/files/settings.conf b/app-misc/calamares-config-kogaion/files/settings.conf index 2b5bc533..04911775 100644 --- a/app-misc/calamares-config-kogaion/files/settings.conf +++ b/app-misc/calamares-config-kogaion/files/settings.conf @@ -44,6 +44,7 @@ install: - displaymanager - networkcfg - hwclock +- liveservices - services #- dracut #- initramfs -- cgit v1.2.3