diff --git a/system/installer/calamares/actions.py b/system/installer/calamares/actions.py new file mode 100644 index 0000000000..eb0c385641 --- /dev/null +++ b/system/installer/calamares/actions.py @@ -0,0 +1,41 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import pisitools +from pisi.actionsapi import cmaketools +from pisi.actionsapi import shelltools +from pisi.actionsapi import get + +def setup(): + shelltools.makedirs("build") + shelltools.cd("build") + + cmaketools.configure("-DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DWITH_PARTITIONMANAGER=1 \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo", \ + sourceDir=".." ) + +def build(): + shelltools.makedirs("build") + shelltools.cd("build") + + cmaketools.make() + +def install(): + shelltools.makedirs("build") + shelltools.cd("build") + + cmaketools.install() + + #dbus configuration for pisi + pisitools.dosed("%s/usr/share/calamares/modules/machineid.conf" % get.installDIR(), "systemd: true", "systemd: false") + pisitools.dosed("%s/usr/share/calamares/modules/machineid.conf" % get.installDIR(), "symlink: true", "symlink: false") + + + + pisitools.dodoc("../README.*") diff --git a/system/installer/calamares/files/calamares.desktop b/system/installer/calamares/files/calamares.desktop new file mode 100644 index 0000000000..4ee70f0a63 --- /dev/null +++ b/system/installer/calamares/files/calamares.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=Pisi Linux — System Installer +Name[tr_TR]=Pisi Linux Sistem Yükleyici +Comment=Pisi Linux — System Installer +Comment[tr_TR]=Pisi Linux Sistem Yükleyici +Exec=sudo LC_ALL=en_US calamares %f +Icon=calamares +Terminal=false +StartupNotify=true +Type=Application +Categories=Qt;System; + diff --git a/system/installer/calamares/files/languages b/system/installer/calamares/files/languages new file mode 100644 index 0000000000..d1196c13ca --- /dev/null +++ b/system/installer/calamares/files/languages @@ -0,0 +1,13 @@ +ca_ES.UTF-8 +de_DE.UTF-8 +en_US.UTF-8 +es_ES.UTF-8 +fr_FR.UTF-8 +hu_HU.UTF-8 +it_IT.UTF-8 +nl_NL.UTF-8 +pl_PL.UTF-8 +pt_BR.UTF-8 +ru_RU.UTF-8 +sv_SE.UTF-8 +tr_TR.UTF-8 diff --git a/system/installer/calamares/files/mudur_module.patch b/system/installer/calamares/files/mudur_module.patch new file mode 100644 index 0000000000..5d6e1e6e08 --- /dev/null +++ b/system/installer/calamares/files/mudur_module.patch @@ -0,0 +1,75 @@ +--- calamares-2.2.orig/src/modules/mudur/main.py 1970-01-01 02:00:00.000000000 +0200 ++++ calamares-2.2/src/modules/mudur/main.py 2016-05-27 21:36:09.787035345 +0300 +@@ -0,0 +1,64 @@ ++#!/usr/bin/env python3 ++# -*- coding: utf-8 -*- ++# ++# === This file is part of Calamares - === ++# ++# Copyright 2014, Anke Boersma ++# Copyright 2015, Philip Müller ++# ++# 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 os ++import shutil ++ ++import libcalamares ++ ++ ++ ++def run(): ++ ++ install_path = libcalamares.globalstorage.value("rootMountPoint") ++ ++ ++ path = os.path.join(install_path, "etc/locale.conf") ++ ++ mloc = open(path,"r") ++ ++ languages = mloc.readline(2) ++ ++ ++ mudur_file_path = os.path.join(install_path, "etc/conf.d/mudur") ++ lines = [] ++ for l in open(mudur_file_path, "r").readlines(): ++ if l.strip().startswith('language=') or l.strip().startswith('# language='): ++ if languages == "pt": ++ l = 'language="pt_BR"\n' ++ else: ++ l = 'language="%s"\n' % languages ++ lines.append(l) ++ ++ open(mudur_file_path, "w").writelines(lines) ++ ++ if os.path.exists(os.path.join(install_path, "etc/sudoers")): ++ os.unlink(os.path.join(install_path, "etc/sudoers")) ++ ++ ++ source = os.path.join(install_path, "etc/sudoers.orig") ++ target = os.path.join(install_path, "etc/sudoers") ++ ++ shutil.copy(source, target) ++ ++ libcalamares.utils.target_env_call(['chmod', '440', '/etc/sudoers']) ++ ++ return None +--- calamares-2.2.orig/src/modules/mudur/module.desc 1970-01-01 02:00:00.000000000 +0200 ++++ calamares-2.2/src/modules/mudur/module.desc 2016-05-18 10:22:05.000000000 +0300 +@@ -0,0 +1,5 @@ ++--- ++type: "job" ++name: "mudur" ++interface: "python" ++script: "main.py" diff --git a/system/installer/calamares/files/pisi_locale.patch b/system/installer/calamares/files/pisi_locale.patch new file mode 100644 index 0000000000..0b6c04d074 --- /dev/null +++ b/system/installer/calamares/files/pisi_locale.patch @@ -0,0 +1,21 @@ +--- calamares-2.2.orig/src/modules/locale/LocalePage.cpp 2015-08-06 12:58:34.000000000 +0300 ++++ calamares-2.2/src/modules/locale/LocalePage.cpp 2016-05-18 10:19:14.271694185 +0300 +@@ -240,7 +240,7 @@ + << ". Assuming the supported languages are already built into " + "the locale archive."; + QProcess localeA; +- localeA.start( "locale", QStringList() << "-a" ); ++ localeA.start( "cat", QStringList() << "/etc/languages" ); + localeA.waitForFinished(); + ba = localeA.readAllStandardOutput(); + } +--- calamares-2.2.orig/src/modules/localecfg/main.py 2015-10-16 17:56:51.000000000 +0300 ++++ calamares-2.2/src/modules/localecfg/main.py 2016-05-18 10:19:38.315696547 +0300 +@@ -67,6 +67,6 @@ + + with open(locale_conf_path, "w") as locale_conf: + locale_split = locale.split(' ')[0] +- locale_conf.write("LANG={!s}\n".format(locale_split)) ++ locale_conf.write("{!s}\n".format(locale_split)) + + return None diff --git a/system/installer/calamares/files/pisi_set_hostname.patch b/system/installer/calamares/files/pisi_set_hostname.patch new file mode 100644 index 0000000000..8eff95f4b1 --- /dev/null +++ b/system/installer/calamares/files/pisi_set_hostname.patch @@ -0,0 +1,20 @@ +--- calamares-2.2.orig/src/modules/users/SetHostNameJob.cpp 2015-08-06 12:58:32.000000000 +0300 ++++ calamares-2.2/src/modules/users/SetHostNameJob.cpp 2016-05-17 01:02:30.131263802 +0300 +@@ -68,7 +68,7 @@ + return Calamares::JobResult::error( tr( "Internal Error" ) ); + } + +- QFile hostfile( destDir + "/etc/hostname" ); ++ QFile hostfile( destDir + "/etc/env.d/01hostname" ); + if ( !hostfile.open( QFile::WriteOnly ) ) + { + cLog() << "Can't write to hostname file"; +@@ -76,7 +76,7 @@ + } + + QTextStream hostfileout( &hostfile ); +- hostfileout << m_hostname << "\n"; ++ hostfileout << "HOSTNAME=" << "\"" << m_hostname << "\"" << "\n"; + hostfile.close(); + + QFile hostsfile( destDir + "/etc/hosts" ); diff --git a/system/installer/calamares/pspec.xml b/system/installer/calamares/pspec.xml new file mode 100644 index 0000000000..1055e107c2 --- /dev/null +++ b/system/installer/calamares/pspec.xml @@ -0,0 +1,123 @@ + + + + + Calamares + http://pisilinux.org + + Ergün Salman + Poyraz76@pisilinux.org + + LGPLv2 + A distribution independent installer framework + Calamares is a distribution-independent system installer, with an advanced partitioning feature for both manual and automated partitioning operations. + https://github.com/calamares/calamares/releases/download/v2.2/calamares-2.2.tar.gz + + gettext-devel + yaml-cpp + boost-devel + boost-python3 + ki18n-devel + kcoreaddons + solid-devel + parted-devel + qt5-linguist + qt5-svg-devel + udisks2-devel + libyaml-devel + python3-devel + kconfig-devel + qt5-base-devel + polkit-qt-devel + qt5-webkit-devel + libatasmart-devel + kcoreaddons-devel + qt5-designer-devel + qt5-assistant-devel + libutil-linux-devel + qt5-declarative-devel + libxkbfile-devel + e2fsprogs-devel + squashfs-tools + efibootmgr-devel + rsync + gptfdisk + extra-cmake-modules + kpmcore-devel + kiconthemes-devel + kio-devel + kservice-devel + kconfig-devel + kparts-devel + + + pisi_locale.patch + pisi_set_hostname.patch + mudur_module.patch + + + + + Calamares + + libgcc + boost + boost-python3 + python3 + parted + solid + ki18n + rsync + kconfig + kcoreaddons + qt5-svg + qt5-webkit + libatasmart + qt5-declarative + rsync + ntfs-3g + qt5-base + gptfdisk + e2fsprogs + dmidecode + efibootmgr + libxkbfile + dosfstools + libutil-linux + util-linux + kpmcore + partitionmanager + kiconthemes + kio + kservice + kconfig + kparts + calamares-theme-pisilinux + + + /usr/bin + /usr/lib + /usr/share/* + /usr/lib/calamares/ + /usr/include/libcalamares/* + /usr/lib/cmake/Calamares/ + /usr/lib/calamares/modules/* + /usr/libexec/ + /etc/languages + + + calamares.desktop + languages + + + + + + 2016-05-27 + 2.2 + First Release + Ergün Salman + Poyraz76@pisilinux.org + + + diff --git a/system/installer/calamares/translations.xml b/system/installer/calamares/translations.xml new file mode 100644 index 0000000000..333085c85c --- /dev/null +++ b/system/installer/calamares/translations.xml @@ -0,0 +1,8 @@ + + + + Calamares + Dağıtım bağımsız sistem yükleyici + Calamares dağıtım bağımsız bir sistem yükleyicidir. + +