Packaging Request #844 » libre+rebranding.patch
Cnchi-0.12.0.orig/cnchi/bootinfo.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
3 | 3 |
# |
4 | 4 |
# bootinfo.py |
5 | 5 |
# |
6 |
# Copyright © 2013-2016 Antergos |
|
7 |
# Copyright © 2016 Parabola |
|
6 |
# Copyright © 2013-2015 Antergos |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
163 | 162 | |
164 | 163 | |
165 | 164 |
def _check_linux(mount_name): |
166 |
""" Checks for GNU/Linux """
|
|
165 |
""" Checks for linux """
|
|
167 | 166 |
detected_os = _("unknown") |
168 | 167 | |
169 | 168 |
for os_release in OS_RELEASE_PATHS: |
Cnchi-0.12.0.orig/cnchi/check.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# check.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
28 | 27 |
# along with Cnchi; If not, see <http://www.gnu.org/licenses/>. |
29 | 28 | |
30 | 29 | |
31 |
""" Check screen (detects if Parabola prerequisites are meet) """
|
|
30 |
""" Check screen (detects if Antergos prerequisites are meet) """
|
|
32 | 31 | |
33 | 32 | |
34 | 33 |
from gi.repository import GLib |
Cnchi-0.12.0.orig/cnchi/cnchi.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
3 | 3 |
# |
4 | 4 |
# cnchi.py |
5 | 5 |
# |
6 |
# Copyright © 2013-2016 Antergos |
|
7 |
# Copyright © 2016 Parabola |
|
6 |
# Copyright © 2013-2015 Antergos |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
27 | 26 |
# You should have received a copy of the GNU General Public License |
28 | 27 |
# along with Cnchi; If not, see <http://www.gnu.org/licenses/>. |
29 | 28 | |
30 |
""" Main Cnchi (Parabola Installer) module """
|
|
29 |
""" Main Cnchi (Antergos Installer) module """
|
|
31 | 30 | |
32 | 31 |
import os |
33 | 32 |
import sys |
... | ... | |
72 | 71 |
def __init__(self): |
73 | 72 |
""" Constructor. Call base class """ |
74 | 73 |
Gtk.Application.__init__(self, |
75 |
application_id="nu.parabola.cnchi",
|
|
74 |
application_id="com.antergos.cnchi",
|
|
76 | 75 |
flags=Gio.ApplicationFlags.FLAGS_NONE) |
77 | 76 |
self.TMP_RUNNING = "/tmp/.setup-running" |
78 | 77 | |
... | ... | |
288 | 287 | |
289 | 288 |
import argparse |
290 | 289 | |
291 |
desc = _("Cnchi v{0} - Parabola Installer").format(info.CNCHI_VERSION)
|
|
290 |
desc = _("Cnchi v{0} - Antergos Installer").format(info.CNCHI_VERSION)
|
|
292 | 291 |
parser = argparse.ArgumentParser(description=desc) |
293 | 292 | |
294 | 293 |
parser.add_argument( |
... | ... | |
343 | 342 |
action="store_true") |
344 | 343 |
parser.add_argument( |
345 | 344 |
"--disable-rank-mirrors", |
346 |
help=_("Do not try to rank Parabola mirrors"),
|
|
345 |
help=_("Do not try to rank Arch and Antergos mirrors"),
|
|
347 | 346 |
action="store_true") |
348 | 347 |
parser.add_argument( |
349 | 348 |
"-v", "--verbose", |
... | ... | |
382 | 381 |
GObject.threads_init() |
383 | 382 |
# Gdk.threads_init() |
384 | 383 | |
384 | ||
385 |
def update_cnchi(): |
|
386 |
""" Runs updater function to update cnchi to the latest version if necessary """ |
|
387 |
upd = updater.Updater( |
|
388 |
force_update=cmd_line.update, |
|
389 |
local_cnchi_version=info.CNCHI_VERSION) |
|
390 | ||
391 |
if upd.update(): |
|
392 |
logging.info("Program updated! Restarting...") |
|
393 |
misc.remove_temp_files() |
|
394 |
if cmd_line.update: |
|
395 |
# Remove -u and --update options from new call |
|
396 |
new_argv = [] |
|
397 |
for argv in sys.argv: |
|
398 |
if argv != "-u" and argv != "--update": |
|
399 |
new_argv.append(argv) |
|
400 |
else: |
|
401 |
new_argv = sys.argv |
|
402 | ||
403 |
# Do not try to update again now |
|
404 |
new_argv.append("--disable-update") |
|
405 | ||
406 |
# Run another instance of Cnchi (which will be the new version) |
|
407 |
with misc.raised_privileges(): |
|
408 |
os.execl(sys.executable, *([sys.executable] + new_argv)) |
|
409 |
sys.exit(0) |
|
410 | ||
411 | ||
385 | 412 |
def setup_gettext(): |
386 | 413 |
""" This allows to translate all py texts (not the glade ones) """ |
387 | 414 |
Cnchi-0.12.0.orig/cnchi/config.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
3 | 3 |
# |
4 | 4 |
# pacman_conf.py |
5 | 5 |
# |
6 |
# Copyright © 2013-2016 Antergos |
|
7 |
# Copyright © 2016 Parabola |
|
6 |
# Copyright © 2013-2015 Antergos |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
45 | 44 |
self.settings.put({ |
46 | 45 |
'alternate_package_list': '', |
47 | 46 |
'auto_device': '/dev/sda', |
48 |
'bootloader': 'grub', |
|
47 |
'bootloader': 'grub2',
|
|
49 | 48 |
'bootloader_device': '/dev/sda', |
50 | 49 |
'bootloader_install': True, |
51 | 50 |
'bootloader_installation_successful': False, |
... | ... | |
55 | 54 |
'country_name': '', |
56 | 55 |
'country_code': '', |
57 | 56 |
'data': '/usr/share/cnchi/data/', |
58 |
'desktop': 'mate',
|
|
57 |
'desktop': 'gnome',
|
|
59 | 58 |
'desktop_ask': True, |
60 | 59 |
'desktops': [], |
61 | 60 |
'download_module': 'requests', |
... | ... | |
63 | 62 |
'encrypt_home': False, |
64 | 63 |
'f2fs': False, |
65 | 64 |
'failed_download': False, |
66 |
#'feature_pur': False,
|
|
65 |
'feature_aur': False,
|
|
67 | 66 |
'feature_bluetooth': False, |
68 | 67 |
'feature_cups': False, |
69 |
'feature_iceweasel': False,
|
|
68 |
'feature_firefox': False,
|
|
70 | 69 |
'feature_firewall': False, |
71 |
'feature_glamp': False, |
|
72 |
'feature_glemp': False, |
|
70 |
'feature_fonts': False, |
|
71 |
'feature_games': False, |
|
72 |
'feature_lamp': False, |
|
73 |
'feature_lemp': False, |
|
73 | 74 |
'feature_lts': False, |
74 | 75 |
'feature_office': False, |
75 | 76 |
'feature_smb': False, |
77 |
'feature_visual': False, |
|
76 | 78 |
'fullname': '', |
77 | 79 |
'GRUB_CMDLINE_LINUX': '', |
78 |
'hostname': 'parabola',
|
|
80 |
'hostname': 'antergos',
|
|
79 | 81 |
'is_vbox': False, |
80 | 82 |
'keyboard_layout': '', |
81 | 83 |
'keyboard_variant': '', |
... | ... | |
94 | 96 |
'require_password': True, |
95 | 97 |
'ruuid': '', |
96 | 98 |
'sentry_dsn': '', |
99 |
'third_party_software': False, |
|
97 | 100 |
'timezone_human_zone': '', |
98 | 101 |
'timezone_country': '', |
99 | 102 |
'timezone_zone': '', |
Cnchi-0.12.0.orig/cnchi/desktop_info.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
3 | 3 |
# |
4 | 4 |
# desktop_info.py |
5 | 5 |
# |
6 |
# Copyright © 2013-2016 Antergos |
|
7 |
# Copyright © 2016 Parabola |
|
6 |
# Copyright © 2013-2015 Antergos |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
64 | 63 |
'qt': ["kde", "lxqt"] |
65 | 64 |
} |
66 | 65 | |
67 |
ALL_FEATURES = ["bluetooth", "cups", "iceweasel", "glamp", "lts", "office",
|
|
66 |
ALL_FEATURES = ["aur", "bluetooth", "cups", "firefox", "fonts", "games", "graphic_drivers", "lamp", "lts", "office",
|
|
68 | 67 |
"visual", "firewall", "smb"] |
69 | 68 | |
70 | 69 |
# Each desktop has its own available features |
71 | 70 |
# TODO: Rework and simplify features logic by only storing excluded features for each each desktop. |
72 | 71 |
FEATURES = { |
73 |
'cinnamon': ["bluetooth", "cups", "iceweasel", "firewall", "lts",
|
|
72 |
'cinnamon': ["aur", "bluetooth", "cups", "firefox", "firewall", "fonts", "games", "graphic_drivers", "lts",
|
|
74 | 73 |
"office", "smb"], |
75 | 74 |
'gnome': [ |
76 |
"bluetooth", "cups", "iceweasel", "firewall", "fonts",
|
|
75 |
"aur", "bluetooth", "cups", "firefox", "firewall", "fonts",
|
|
77 | 76 |
"games", "graphic_drivers", "lts", "office", "smb" |
78 | 77 |
], |
79 | 78 |
'kde': [ |
80 |
"bluetooth", "cups", "iceweasel", "firewall", "lts", "office", "smb" |
|
79 |
"aur", "bluetooth", "cups", "firefox", "firewall", "fonts", |
|
80 |
"games", "graphic_drivers", "lts", "office", "smb" |
|
81 | 81 |
], |
82 |
'mate': ["bluetooth", "cups", "iceweasel", "firewall", "lts", "office", "smb"], |
|
83 |
'enlightenment': ["bluetooth", "cups", "iceweasel", "firewall", "lts", "office", "smb"], |
|
84 |
'base': ["cups", "glamp", "lts"], |
|
85 |
'openbox': ["bluetooth", "cups", "iceweasel", "firewall", "lts", |
|
86 |
"office", "smb"], |
|
87 |
'lxqt': ["bluetooth", "cups", "iceweasel", "firewall", "lts", |
|
82 |
'mate': ["aur", "bluetooth", "cups", "firefox", "firewall", "fonts", "lts", "office", "games", "graphic_drivers", "smb"], |
|
83 |
'enlightenment': ["aur", "bluetooth", "cups", "firefox", "firewall", "fonts", "games", "graphic_drivers", "lts", |
|
84 |
"office", "smb"], |
|
85 |
'base': ["aur", "cups", "fonts", "lamp", "lts"], |
|
86 |
'openbox': ["aur", "bluetooth", "cups", "firefox", "firewall", "fonts", "games", "graphic_drivers", "lts", |
|
87 |
"office", "smb", "visual"], |
|
88 |
'lxqt': ["aur", "bluetooth", "cups", "firefox", "firewall", "fonts", "games", "graphic_drivers", "lts", |
|
88 | 89 |
"office", "smb"], |
89 |
'xfce': ["bluetooth", "cups", "iceweasel", "firewall", "lts",
|
|
90 |
'xfce': ["aur", "bluetooth", "cups", "firefox", "firewall", "fonts", "games", "graphic_drivers", "lts",
|
|
90 | 91 |
"office", "smb"]} |
91 | 92 | |
92 | 93 |
# Session names for lightDM setup |
... | ... | |
111 | 112 |
"computer. It features the Activities Overview which " |
112 | 113 |
"is an easy way to access all your basic tasks."), |
113 | 114 | |
114 |
'cinnamon': _("Cinnamon is a GNU/Linux desktop which provides advanced, "
|
|
115 |
'cinnamon': _("Cinnamon is a Linux desktop which provides advanced, " |
|
115 | 116 |
"innovative features and a traditional desktop user experience. " |
116 | 117 |
"Cinnamon aims to make users feel at home by providing them with " |
117 | 118 |
"an easy-to-use and comfortable desktop experience."), |
... | ... | |
124 | 125 |
'openbox': _("Not actually a desktop environment, Openbox is a highly " |
125 | 126 |
"configurable window manager. It is known for its " |
126 | 127 |
"minimalistic appearance and its flexibility. It is the most " |
127 |
"lightweight graphical option offered by Parabola. Please "
|
|
128 |
"Note: Openbox is not recommended for users who are new to GNU/Linux."),
|
|
128 |
"lightweight graphical option offered by antergos. Please "
|
|
129 |
"Note: Openbox is not recommended for users who are new to Linux."), |
|
129 | 130 | |
130 |
'enlightenment': _("Enlightenment is not just a window manager for GNU/Linux X11 "
|
|
131 |
'enlightenment': _("Enlightenment is not just a window manager for Linux/X11 "
|
|
131 | 132 |
"and others, but also a whole suite of libraries to help " |
132 | 133 |
"you create beautiful user interfaces with much less work"), |
133 | 134 | |
... | ... | |
139 | 140 |
"Environment. It is lightweight, modular, blazing-fast, and " |
140 | 141 |
"user-friendly."), |
141 | 142 | |
142 |
'base': _("This option will install Parabola as command-line only system, "
|
|
143 |
'base': _("This option will install Antergos as command-line only system, "
|
|
143 | 144 |
"without any type of graphical interface. After the installation you can " |
144 |
"customize Parabola by installing packages with the command-line package manager."),
|
|
145 |
"customize Antergos by installing packages with the command-line package manager."),
|
|
145 | 146 | |
146 | 147 |
'mate': _("MATE is an intuitive, attractive, and lightweight desktop " |
147 | 148 |
"environment which provides a more traditional desktop " |
Cnchi-0.12.0.orig/cnchi/desktop.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
3 | 3 |
# |
4 | 4 |
# desktop.py |
5 | 5 |
# |
6 |
# Copyright © 2013-2016 Antergos |
|
7 |
# Copyright © 2016 Parabola |
|
6 |
# Copyright © 2013-2015 Antergos |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
59 | 58 |
self.listbox.set_selection_mode(Gtk.SelectionMode.BROWSE) |
60 | 59 |
self.listbox.set_sort_func(self.listbox_sort_by_name, None) |
61 | 60 | |
62 |
self.desktop_choice = 'mate'
|
|
61 |
self.desktop_choice = 'gnome'
|
|
63 | 62 | |
64 | 63 |
self.enabled_desktops = self.settings.get("desktops") |
65 | 64 | |
... | ... | |
151 | 150 | |
152 | 151 |
self.listbox.add(box) |
153 | 152 | |
154 |
# Set MATE as default
|
|
155 |
self.select_default_row(desktop_info.NAMES["mate"])
|
|
153 |
# Set Gnome as default
|
|
154 |
self.select_default_row(desktop_info.NAMES["gnome"])
|
|
156 | 155 | |
157 | 156 |
@staticmethod |
158 | 157 |
def listbox_sort_by_name(row1, row2, user_data): |
... | ... | |
206 | 205 |
def store_values(self): |
207 | 206 |
""" Store desktop """ |
208 | 207 |
self.settings.set('desktop', self.desktop_choice.lower()) |
209 |
logging.info("Cnchi will install Parabola with the '%s' desktop", self.desktop_choice.lower())
|
|
208 |
logging.info("Cnchi will install Antergos with the '%s' desktop", self.desktop_choice.lower())
|
|
210 | 209 |
return True |
211 | 210 | |
212 | 211 |
@staticmethod |
Cnchi-0.12.0.orig/cnchi/download/download_aria2.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# download_aria2.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
49 | 48 |
class Download(object): |
50 | 49 |
""" Class to download packages using Aria2 |
51 | 50 |
This class tries to previously download all necessary packages for |
52 |
Parabola installation using aria2 """
|
|
51 |
Antergos installation using aria2 """
|
|
53 | 52 | |
54 | 53 |
def __init__(self, pacman_cache_dir, cache_dir, callback_queue): |
55 | 54 |
""" Initialize DownloadAria2 class. Gets default configuration """ |
Cnchi-0.12.0.orig/cnchi/download/download.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# download.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
55 | 54 |
class DownloadPackages(object): |
56 | 55 |
""" Class to download packages using Aria2, requests (default) or urllib |
57 | 56 |
This class tries to previously download all necessary packages for |
58 |
Parabola installation using aria2, requests or urllib
|
|
57 |
Antergos installation using aria2, requests or urllib
|
|
59 | 58 |
Aria2 is known to use too much memory (not Aria2's fault but ours) |
60 | 59 |
so until it's fixed it it's not advised to use it """ |
61 | 60 |
Cnchi-0.12.0.orig/cnchi/download/download_requests.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# download_requests.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
52 | 51 |
class Download(object): |
53 | 52 |
""" Class to download packages using requests |
54 | 53 |
This class tries to previously download all necessary packages for |
55 |
Parabola installation using requests """
|
|
54 |
Antergos installation using requests """
|
|
56 | 55 | |
57 | 56 |
def __init__(self, pacman_cache_dir, cache_dir, callback_queue): |
58 | 57 |
""" Initialize Download class. Gets default configuration """ |
Cnchi-0.12.0.orig/cnchi/download/download_urllib.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# download_urllib.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
93 | 92 |
class Download(object): |
94 | 93 |
""" Class to download packages using urllib |
95 | 94 |
This class tries to previously download all necessary packages for |
96 |
Parabola installation using urllib """
|
|
95 |
Antergos installation using urllib """
|
|
97 | 96 | |
98 | 97 |
def __init__(self, pacman_cache_dir, cache_dir, callback_queue): |
99 | 98 |
""" Initialize Download class. Gets default configuration """ |
Cnchi-0.12.0.orig/cnchi/encfs.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# encfs.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
28 | 27 |
# along with Cnchi; If not, see <http://www.gnu.org/licenses/>. |
29 | 28 | |
30 | 29 | |
31 |
""" Configures Parabola to encrypt user's home with encFS """
|
|
30 |
""" Configures Antergos to encrypt user's home with encFS """
|
|
32 | 31 | |
33 | 32 |
import os |
34 | 33 |
import shutil |
... | ... | |
58 | 57 |
def setup_conf_files(dest_dir): |
59 | 58 |
path = os.path.join(dest_dir, "etc/security/pam_encfs.conf") |
60 | 59 |
with open(path, 'w') as pam_encfs: |
61 |
pam_encfs.write("# File created by Cnchi (Parabola Installer)\n\n")
|
|
60 |
pam_encfs.write("# File created by Cnchi (Antergos Installer)\n\n")
|
|
62 | 61 |
pam_encfs.write("# If this is specified program will attempt to drop permissions before running encfs.\n") |
63 | 62 |
pam_encfs.write("drop_permissions\n\n") |
64 | 63 |
pam_encfs.write("# This specifies which options to pass to encfs for every user.\n") |
... | ... | |
67 | 66 |
pam_encfs.write("# Same for fuse\n") |
68 | 67 |
pam_encfs.write("# you can find fuse options with encfs -H\n") |
69 | 68 |
pam_encfs.write("fuse_default allow_root,nonempty\n\n") |
70 |
pam_encfs.write("# Added by Cnchi - Parabola Installer\n")
|
|
69 |
pam_encfs.write("# Added by Cnchi - Antergos Installer\n")
|
|
71 | 70 |
# USERNAME SOURCE TARGET_PATH ENCFS_Options FUSE_Options |
72 | 71 |
pam_encfs.write("-\t/home/.encfs\t-\t-v\t-\n") |
73 | 72 | |
74 | 73 |
path = os.path.join(dest_dir, "etc/security/pam_env.conf") |
75 | 74 |
with open(path, 'a') as pam_env: |
76 |
pam_env.write("\n# Added by Cnchi - Parabola Installer\n")
|
|
77 |
pam_env.write("# Set the ICEAUTHORITY file location to allow MATE to start on encfs $HOME\n")
|
|
75 |
pam_env.write("\n# Added by Cnchi - Antergos Installer\n")
|
|
76 |
pam_env.write("# Set the ICEAUTHORITY file location to allow GNOME to start on encfs $HOME\n")
|
|
78 | 77 |
pam_env.write("ICEAUTHORITY DEFAULT=/tmp/.ICEauthority_@{PAM_USER}\n") |
79 | 78 | |
80 | 79 |
path = os.path.join(dest_dir, "etc/fuse.conf") |
81 | 80 |
with open(path, 'a') as fuse_conf: |
82 |
fuse_conf.write("\n# Added by Cnchi - Parabola Installer\n")
|
|
81 |
fuse_conf.write("\n# Added by Cnchi - Antergos Installer\n")
|
|
83 | 82 |
fuse_conf.write("user_allow_other\n") |
84 | 83 | |
85 | 84 |
path = os.path.join(dest_dir, "etc/pam.d/system-login") |
86 | 85 |
with open(path, 'a') as system_login: |
87 |
system_login.write("\n# Added by Cnchi - Parabola Installer\n")
|
|
86 |
system_login.write("\n# Added by Cnchi - Antergos Installer\n")
|
|
88 | 87 |
system_login.write("session required\tpam_encfs.so\n") |
89 | 88 |
system_login.write("session optional\tpam_mount.so\n") |
90 | 89 | |
91 | 90 |
path = os.path.join(dest_dir, "etc/pam.d/system-auth") |
92 | 91 |
with open(path, "a") as system_auth: |
93 |
system_auth.write("\n# Added by Cnchi - Parabola Installer\n")
|
|
92 |
system_auth.write("\n# Added by Cnchi - Antergos Installer\n")
|
|
94 | 93 |
system_auth.write("auth sufficient\tpam_encfs.so\n") |
95 | 94 |
system_auth.write("auth optional\tpam_mount.so\n") |
96 | 95 | |
... | ... | |
99 | 98 |
def setup(username, dest_dir, password): |
100 | 99 |
""" Encrypt user's home folder """ |
101 | 100 |
# encfs and pam_mount packages are needed |
102 |
# and pam_encfs from [pcr], too.
|
|
101 |
# and pam_encfs from AUR, too.
|
|
103 | 102 |
# Reference: https://wiki.debian.org/TransparentEncryptionForHomeFolder |
104 | 103 | |
105 | 104 |
try: |
Cnchi-0.12.0.orig/cnchi/features_info.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
3 | 3 |
# |
4 | 4 |
# features_info.py |
5 | 5 |
# |
6 |
# Copyright © 2013-2016 Antergos |
|
7 |
# Copyright © 2016 Parabola |
|
6 |
# Copyright © 2013-2015 Antergos |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
34 | 33 |
# in desktop_info file instead of here. |
35 | 34 | |
36 | 35 |
ICON_NAMES = { |
37 |
#'pur': 'system-software-install',
|
|
36 |
'aur': 'system-software-install',
|
|
38 | 37 |
'bluetooth': 'bluetooth', |
39 | 38 |
'cups': 'printer', |
40 |
'iceweasel': 'iceweasel',
|
|
39 |
'firefox': 'firefox',
|
|
41 | 40 |
'firewall': 'network-server', |
42 |
'glamp': 'applications-internet', |
|
41 |
'fonts': 'preferences-desktop-font', |
|
42 |
'games': 'applications-games', |
|
43 |
'graphic_drivers': 'gnome-system', |
|
44 |
'lamp': 'applications-internet', |
|
43 | 45 |
'lts': 'applications-accessories', |
44 | 46 |
'office': 'accessories-text-editor', |
45 |
'smb': 'gnome-mime-x-directory-smb-share'} |
|
47 |
'smb': 'gnome-mime-x-directory-smb-share', |
|
48 |
'visual': 'video-display'} |
|
46 | 49 | |
47 | 50 | |
48 | 51 |
# See http://docs.python.org/2/library/gettext.html "22.1.3.4. Deferred translations" |
... | ... | |
50 | 53 |
return message |
51 | 54 | |
52 | 55 |
TITLES = { |
53 |
#'pur': _("Parabola User Repository (PUR) Support"),
|
|
56 |
'aur': _("Arch User Repository (AUR) Support"),
|
|
54 | 57 |
'bluetooth': _("Bluetooth Support"), |
55 | 58 |
'cups': _("Printing Support"), |
56 |
'iceweasel': _("Iceweasel Web Browser"),
|
|
59 |
'firefox': _("Firefox Web Browser"),
|
|
57 | 60 |
'firewall': _("Uncomplicated Firewall"), |
61 |
'fonts': _("Extra Truetype Fonts"), |
|
62 |
'games': _("Steam + PlayonLinux"), |
|
63 |
'graphic_drivers': _("Graphic drivers (Proprietary)"), |
|
58 | 64 |
'lamp': _("Apache (or Nginx) + Mariadb + PHP"), |
59 | 65 |
'lts': _("Kernel (LTS version)"), |
60 | 66 |
'office': _("LibreOffice"), |
61 |
'smb': _("Windows sharing SMB")} |
|
67 |
'smb': _("Windows sharing SMB"), |
|
68 |
'visual': _("Visual Effects")} |
|
62 | 69 | |
63 | 70 |
DESCRIPTIONS = { |
64 |
#'pur': _("The PUR is a community-driven repository for Parabola users."),
|
|
71 |
'aur': _("The AUR is a community-driven repository for Arch users."),
|
|
65 | 72 |
'bluetooth': _("Enables your system to make wireless connections via Bluetooth."), |
66 |
'glamp': _("Apache (or Nginx) + Mariadb + PHP installation and setup."), |
|
73 |
'fonts': _("TrueType fonts from the Google Fonts project."), |
|
74 |
'graphic_drivers': _("Installs AMD or Nvidia proprietary graphic driver."), |
|
75 |
'games': _("Installs Steam and Playonlinux for gaming enthusiasts."), |
|
76 |
'lamp': _("Apache (or Nginx) + Mariadb + PHP installation and setup."), |
|
67 | 77 |
'cups': _("Installation of printer drivers and management tools."), |
68 |
'office': _("Free software office suite. Supports editing MS Office files."), |
|
78 |
'office': _("Open source office suite. Supports editing MS Office files."), |
|
79 |
'visual': _("Enable transparency, shadows, and other desktop effects."), |
|
69 | 80 |
'firewall': _("Control the incoming and outgoing network traffic."), |
70 | 81 |
'lts': _("Long term support (LTS) Linux kernel and modules."), |
71 |
'iceweasel': _("A popular free software graphical web browser from Mozilla."),
|
|
82 |
'firefox': _("A popular open-source graphical web browser from Mozilla."),
|
|
72 | 83 |
'smb': _("SMB provides shared access to files and printers.")} |
73 | 84 | |
74 | 85 |
TOOLTIPS = { |
75 |
#'aur': _("Use yaourt to install PUR packages.\n"
|
|
76 |
"The PUR was created to organize and share new packages\n"
|
|
86 |
'aur': _("Use yaourt to install AUR packages.\n"
|
|
87 |
"The AUR was created to organize and share new packages\n"
|
|
77 | 88 |
"from the community and to help expedite popular packages'\n" |
78 | 89 |
"inclusion into the [community] repository."), |
79 | 90 |
'bluetooth': _("Bluetooth is a standard for the short-range wireless\n" |
... | ... | |
83 | 94 |
'cups': _("CUPS is the standards-based, open source printing\n" |
84 | 95 |
"system developed by Apple Inc. for OS® X and other\n" |
85 | 96 |
"UNIX®-like operating systems."), |
86 |
'iceweasel': _("Iceweasel (based on Mozilla Firefox) is a free\n" |
|
87 |
"web browser developed for GNU/Linux by the\n" |
|
88 |
"Mozilla Foundation and its subsidiary, the Mozilla Corporation. |
|
89 |
"Iceweasel uses the Gecko layout engine to render web\n" |
|
90 |
"pages, which implements current and anticipated web standards."), |
|
97 |
'firefox': _("Mozilla Firefox (known simply as Firefox) is a free and\n" |
|
98 |
"open-source web browser developed for Windows, OS X, and Linux,\n" |
|
99 |
"with a mobile version for Android, by the Mozilla Foundation and\n" |
|
100 |
"its subsidiary, the Mozilla Corporation. Firefox uses the Gecko\n" |
|
101 |
"layout engine to render web pages, which implements current and\n" |
|
102 |
"anticipated web standards."), |
|
91 | 103 |
'firewall': _("Ufw stands for Uncomplicated Firewall, and is a program for\n" |
92 |
"managing a netfilter firewall. It provides a command-line\n" |
|
93 |
"interface and aims to be simple and easy to use."), |
|
94 |
'glamp': _("This option installs a web server (you can choose\n" |
|
104 |
"managing a netfilter firewall. It provides a command line\n" |
|
105 |
"interface and aims to be uncomplicated and easy to use."), |
|
106 |
'fonts': "Fonts: adobe-source-code-pro, adobe-source-sans-pro, jsmath, lohit\n" |
|
107 |
"oldstand, openarch, otf-bitter, otf-goudy, andika, anonymous-pro\n" |
|
108 |
"cantarell, cardo, chromeos-fonts, comfortaa, droid, google-fonts\n" |
|
109 |
"google-webfonts, inconsolata, kimberly_geswein_print, lekton\n" |
|
110 |
"medievalsharp, nova, oldstandard, opensans, oxygen, pt-mono\n" |
|
111 |
"pt-sans, roboto, sil-fonts, sortsmillgoudy, source-code-pro\n" |
|
112 |
"source-sans-pro, ubuntu-font-family, vollkorn, fira-mono\n" |
|
113 |
"fira-sans and lato.", |
|
114 | ||
115 |
'games': _("Steam is one of the most popular gaming clients that supports\n" |
|
116 |
"linux in technology and gaming, while PlayOnLinux\n" |
|
117 |
"is a very easy manager to setting up games to play\n" |
|
118 |
"through wine, instead of doing it manually."), |
|
119 |
'graphic_drivers': _("Installs AMD or Nvidia proprietary graphics driver."), |
|
120 |
'lamp': _("This option installs a web server (you can choose\n" |
|
95 | 121 |
"Apache or Nginx) plus a database server (Mariadb)\n" |
96 | 122 |
"and PHP."), |
97 |
'lts': _("The linux-libre-lts package is an alternative kernel package\n"
|
|
98 |
"based upon Linux-libre kernel 3.14 and is available in the core repository.\n"
|
|
123 |
'lts': _("The linux-lts package is an alternative Arch kernel package\n"
|
|
124 |
"based upon Linux kernel 3.14 and is available in the core repository.\n" |
|
99 | 125 |
"This particular kernel version enjoys long-term support from upstream,\n" |
100 | 126 |
"including security fixes and some feature backports. Additionally, this\n" |
101 |
"package includes ext4 support. For Parabola users seeking a long-term\n"
|
|
127 |
"package includes ext4 support. For Antergos users seeking a long-term\n"
|
|
102 | 128 |
"support kernel, or who want a fallback kernel in case the latest kernel\n" |
103 | 129 |
"version causes problems, this option is the answer."), |
104 |
'office': _("LibreOffice is the power-packed Free Software\n"
|
|
130 |
'office': _("LibreOffice is the free power-packed Open Source\n"
|
|
105 | 131 |
"personal productivity suite for Windows, Macintosh\n" |
106 |
"and GNU/Linux, that gives you six feature-rich applications\n"
|
|
132 |
"and Linux, that gives you six feature-rich applications\n" |
|
107 | 133 |
"for all your document production and data processing\n" |
108 | 134 |
"needs: Writer, Calc, Impress, Draw, Math and Base."), |
109 | 135 |
'smb': _("In computer networking, Server Message Block (SMB)\n" |
110 | 136 |
"operates as an application-layer network protocol mainly used\n" |
111 | 137 |
"for providing shared access to files, printers, serial ports,\n" |
112 |
"and miscellaneous communications between nodes on a network.\n"), |
|
138 |
"and miscellaneous communications between nodes on a network.\n" |
|
139 |
"Most usage of SMB involves computers running Microsoft Windows."), |
|
140 |
'visual': _("Compton is a lightweight, standalone composite manager,\n" |
|
141 |
"suitable for use with window managers that do not natively\n" |
|
142 |
"provide compositing functionality. Compton itself is a fork\n" |
|
143 |
"of xcompmgr-dana, which in turn is a fork of xcompmgr.\n" |
|
144 |
"See the compton github page for further information.")} |
|
113 | 145 | |
114 | 146 |
# Delete previous _() dummy declaration |
115 | 147 |
del _ |
Cnchi-0.12.0.orig/cnchi/features.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# features.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
66 | 65 |
# This is initialized each time this screen is shown in prepare() |
67 | 66 |
self.features = None |
68 | 67 | |
69 |
# Only show ufw rules and pur disclaimer info once
|
|
70 |
self.info_already_shown = {"ufw": False, "pur": False}
|
|
68 |
# Only show ufw rules and aur disclaimer info once
|
|
69 |
self.info_already_shown = {"ufw": False, "aur": False}
|
|
71 | 70 | |
72 | 71 |
# Only load defaults the first time this screen is shown |
73 | 72 |
self.load_defaults = True |
74 | 73 | |
75 | 74 |
@staticmethod |
75 |
def nvidia_detected(): |
|
76 |
from hardware.nvidia import Nvidia |
|
77 |
if Nvidia().detect(): |
|
78 |
return True |
|
79 |
from hardware.nvidia_340xx import Nvidia_340xx |
|
80 |
if Nvidia_340xx().detect(): |
|
81 |
return True |
|
82 |
from hardware.nvidia_304xx import Nvidia_304xx |
|
83 |
if Nvidia_304xx().detect(): |
|
84 |
return True |
|
85 |
return False |
|
86 | ||
87 |
@staticmethod |
|
88 |
def amd_detected(): |
|
89 |
from hardware.catalyst import Catalyst |
|
90 |
return Catalyst().detect() |
|
91 | ||
92 |
@staticmethod |
|
76 | 93 |
def on_listbox_row_selected(listbox, listbox_row): |
77 | 94 |
""" Someone selected a different row of the listbox |
78 | 95 |
WARNING: IF LIST LAYOUT IS CHANGED THEN THIS SHOULD BE CHANGED ACCORDINGLY. """ |
96 |
if listbox_row is not None: |
|
97 |
for vbox in listbox_row: |
|
98 |
switch = vbox.get_children()[2] |
|
99 |
if switch: |
|
100 |
switch.set_active(not switch.get_active()) |
|
79 | 101 | |
80 | 102 |
def fill_listbox(self): |
81 | 103 |
for listbox_row in self.listbox.get_children(): |
... | ... | |
83 | 105 | |
84 | 106 |
self.listbox_rows = {} |
85 | 107 | |
108 |
# Only add graphic-driver feature if an AMD or Nvidia is detected |
|
109 |
# FIXME: Conflict between lib32-nvidia-libgl and lib32-mesa-libgl |
|
110 |
#if "graphic_drivers" in self.features: |
|
111 |
# if not self.amd_detected() and not self.nvidia_detected(): |
|
112 |
# logging.debug("Neither nvidia nor amd have been detected. Removing proprietary graphic driver feature") |
|
113 |
# self.features.remove("graphic_drivers") |
|
114 |
if "graphic_drivers" in self.features: |
|
115 |
self.features.remove("graphic_drivers") |
|
116 | ||
86 | 117 |
for feature in self.features: |
87 | 118 |
box = Gtk.Box(spacing=20) |
88 | 119 |
box.set_name(feature + "-row") |
... | ... | |
104 | 135 |
self.listbox_rows[feature].append(image) |
105 | 136 |
box.pack_start(image, False, False, 0) |
106 | 137 | |
138 |
text_box = Gtk.VBox() |
|
139 |
object_name = "label_title_" + feature |
|
140 |
label_title = Gtk.Label.new() |
|
141 |
label_title.set_halign(Gtk.Align.START) |
|
142 |
label_title.set_justify(Gtk.Justification.LEFT) |
|
143 |
label_title.set_name(object_name) |
|
144 |
self.listbox_rows[feature].append(label_title) |
|
145 |
text_box.pack_start(label_title, False, False, 0) |
|
146 | ||
107 | 147 |
object_name = "label_" + feature |
108 | 148 |
label = Gtk.Label.new() |
109 | 149 |
label.set_name(object_name) |
... | ... | |
168 | 208 |
txt = desktop_info.NAMES[desktop] + " - " + _("Feature Selection") |
169 | 209 |
self.header.set_subtitle(txt) |
170 | 210 | |
211 |
for feature in self.features: |
|
212 |
if feature == "graphic_drivers": |
|
213 |
# Only add this feature if NVIDIA or AMD are detected |
|
214 |
if not self.amd_detected() and not self.nvidia_detected(): |
|
215 |
continue |
|
216 |
title = _(features_info.TITLES[feature]) |
|
217 |
desc = _(features_info.DESCRIPTIONS[feature]) |
|
218 |
tooltip = _(features_info.TOOLTIPS[feature]) |
|
219 |
self.set_row_text(feature, title, desc, tooltip) |
|
220 | ||
171 | 221 |
# Sort listbox items |
172 | 222 |
self.listbox.invalidate_sort() |
173 | 223 | |
... | ... | |
190 | 240 |
row = self.listbox_rows['cups'] |
191 | 241 |
row[COL_SWITCH].set_active(True) |
192 | 242 | |
243 |
if 'visual' in self.features: |
|
244 |
row = self.listbox_rows['visual'] |
|
245 |
row[COL_SWITCH].set_active(True) |
|
246 | ||
193 | 247 |
def store_values(self): |
194 | 248 |
""" Get switches values and store them """ |
195 | 249 |
for feature in self.features: |
... | ... | |
204 | 258 |
self.show_info_dialog("ufw") |
205 | 259 |
self.info_already_shown["ufw"] = True |
206 | 260 | |
207 |
# Show PUR disclaimer if PUR is selected (show it only once)
|
|
208 |
#if self.settings.get("feature_pur") and not self.info_already_shown["pur"]:
|
|
209 |
# self.show_info_dialog("pur")
|
|
210 |
# self.info_already_shown["pur"] = True
|
|
261 |
# Show AUR disclaimer if AUR is selected (show it only once)
|
|
262 |
if self.settings.get("feature_aur") and not self.info_already_shown["aur"]:
|
|
263 |
self.show_info_dialog("aur")
|
|
264 |
self.info_already_shown["aur"] = True
|
|
211 | 265 | |
212 |
# GLAMP: Ask user if she wants Apache or Nginx
|
|
213 |
if self.settings.get("feature_glamp"):
|
|
266 |
# LAMP: Ask user if he wants Apache or Nginx
|
|
267 |
if self.settings.get("feature_lamp"): |
|
214 | 268 |
info = Gtk.MessageDialog( |
215 | 269 |
transient_for=self.get_toplevel(), |
216 | 270 |
modal=True, |
217 | 271 |
destroy_with_parent=True, |
218 | 272 |
message_type=Gtk.MessageType.INFO, |
219 | 273 |
buttons=Gtk.ButtonsType.YES_NO) |
220 |
info.set_markup("GLAMP / GLEMP")
|
|
274 |
info.set_markup("LAMP / LEMP")
|
|
221 | 275 |
msg = _("Do you want to install the Nginx server instead of the Apache server?") |
222 | 276 |
info.format_secondary_markup(msg) |
223 | 277 |
response = info.run() |
224 | 278 |
info.destroy() |
225 | 279 |
if response == Gtk.ResponseType.YES: |
226 |
self.settings.set("feature_glemp", True)
|
|
280 |
self.settings.set("feature_lemp", True) |
|
227 | 281 |
else: |
228 |
self.settings.set("feature_glemp", False)
|
|
282 |
self.settings.set("feature_lemp", False) |
|
229 | 283 | |
230 | 284 |
self.listbox_rows = {} |
231 | 285 | |
... | ... | |
233 | 287 | |
234 | 288 |
def show_info_dialog(self, feature): |
235 | 289 |
""" Some features show an information dialog when this screen is accepted """ |
236 |
#if feature == "pur":
|
|
237 |
# # Pur disclaimer
|
|
238 |
# txt1 = _("Parabola User Repository - Disclaimer")
|
|
239 |
# txt2 = _("The Parabola User Repository is a collection of user-submitted PKGBUILDs\n"
|
|
240 |
# "that supplement software available from the official repositories.\n\n"
|
|
241 |
# "The PUR is community-driven.\n")
|
|
290 |
if feature == "aur":
|
|
291 |
# Aur disclaimer
|
|
292 |
txt1 = _("Arch User Repository - Disclaimer")
|
|
293 |
txt2 = _("The Arch User Repository is a collection of user-submitted PKGBUILDs\n"
|
|
294 |
"that supplement software available from the official repositories.\n\n" |
|
295 |
"The AUR is community driven and NOT supported by Arch or Antergos.\n")
|
|
242 | 296 |
elif feature == "ufw": |
243 | 297 |
# Ufw rules info |
244 | 298 |
txt1 = _("Uncomplicated Firewall will be installed with these rules:") |
Cnchi-0.12.0.orig/cnchi/hardware/hardware.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# hardware.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
95 | 94 |
@staticmethod |
96 | 95 |
def is_proprietary(): |
97 | 96 |
""" Proprietary drivers are drivers for your hardware devices |
98 |
that are not freely-available, and must be |
|
99 |
avoided as much as possible. """
|
|
97 |
that are not freely-available or open source, and must be
|
|
98 |
obtained from the hardware manufacturer. """
|
|
100 | 99 |
return False |
101 | 100 | |
102 | 101 |
def is_graphic_driver(self): |
... | ... | |
160 | 159 | |
161 | 160 | |
162 | 161 |
class HardwareInstall(object): |
163 |
""" This class checks user's hardware """ |
|
162 |
""" This class checks user's hardware |
|
163 | ||
164 |
If 'use_proprietary_graphic_drivers' is True, this module will try to install the proprietary |
|
165 |
variants of the graphic drivers available (only if the hardware is detected). |
|
166 |
For non graphical drivers, the open one is always choosen as default. |
|
167 |
""" |
|
164 | 168 | |
165 | 169 |
def __init__(self, use_proprietary_graphic_drivers=False): |
166 | 170 |
self.use_proprietary_graphic_drivers = use_proprietary_graphic_drivers |
... | ... | |
230 | 234 |
for device in self.objects_found: |
231 | 235 |
drivers_available = self.objects_found[device] |
232 | 236 |
objects_selected = [] |
233 |
|
|
234 |
# Only one option, add it (it doesn't matter if it's free or not) |
|
237 |
if len(drivers_available) > 1: |
|
238 |
# We have more than one driver for this device! |
|
239 |
# We'll need to choose one |
|
240 | ||
241 |
# Check if there is a proprietary driver |
|
242 |
is_one_closed = False |
|
243 |
for driver in drivers_available: |
|
244 |
if driver.is_proprietary(): |
|
245 |
is_one_closed = True |
|
246 |
break |
|
247 | ||
248 |
for driver in drivers_available: |
|
249 |
if not driver.is_graphic_driver(): |
|
250 |
# For non graphical drivers, we choose the open one as default |
|
251 |
if not driver.is_proprietary(): |
|
252 |
objects_selected.append(driver) |
|
253 |
else: |
|
254 |
# It's a graphic driver |
|
255 |
# We choose the open one if the user does not want to |
|
256 |
# use proprietary (or if all the ones available are open) |
|
257 |
if not self.use_proprietary_graphic_drivers or not is_one_closed: |
|
258 |
# OK, we choose the open one |
|
259 |
if not driver.is_proprietary(): |
|
260 |
objects_selected.append(driver) |
|
261 |
else: |
|
262 |
# One of them is proprietary and user wants to use it |
|
263 |
if driver.is_proprietary(): |
|
264 |
objects_selected.append(driver) |
|
265 | ||
266 |
if len(objects_selected) > 1: |
|
267 |
# We still have two or more options, |
|
268 |
# let's check their priority |
|
269 |
priorities = [] |
|
270 |
for driver in objects_selected: |
|
271 |
priorities.append(driver.get_priority()) |
|
272 |
for driver in objects_selected: |
|
273 |
if driver.get_priority() == max(priorities): |
|
274 |
self.objects_used.append(driver) |
|
275 |
break |
|
276 |
else: |
|
277 |
self.objects_used.extend(objects_selected) |
|
278 |
else: |
|
279 |
# Only one option, add it (it doesn't matter if it's open or not) |
|
235 | 280 |
self.objects_used.append(drivers_available[0]) |
236 | 281 | |
237 | 282 |
@staticmethod |
... | ... | |
288 | 333 |
""" Run post install commands for all detected devices """ |
289 | 334 |
for obj in self.objects_used: |
290 | 335 |
obj.post_install(dest_dir) |
336 | ||
337 | ||
338 |
''' Test case ''' |
|
339 |
if __name__ == "__main__": |
|
340 |
def _(x): return x |
|
341 |
hardware_install = HardwareInstall(use_proprietary_graphic_drivers=False) |
|
342 |
# hardware_install = HardwareInstall(use_proprietary_graphic_drivers=True) |
|
343 |
hardware_pkgs = hardware_install.get_packages() |
|
344 |
print(hardware_install.get_found_driver_names()) |
|
345 |
if len(hardware_pkgs) > 0: |
|
346 |
txt = " ".join(hardware_pkgs) |
|
347 |
print("Hardware module added these packages :") |
|
348 |
print(txt) |
|
349 | ||
350 |
""" |
|
351 |
from nvidia import Nvidia |
|
352 |
if Nvidia().detect(): |
|
353 |
print("Nvidia detected") |
|
354 |
# Nvidia().post_install("/") |
|
355 | ||
356 |
from nvidia_340xx import Nvidia_340xx |
|
357 |
if Nvidia_340xx().detect(): |
|
358 |
print("Nvidia-340xx detected") |
|
359 | ||
360 |
from nvidia_304xx import Nvidia_304xx |
|
361 |
if Nvidia_304xx().detect(): |
|
362 |
print("nvidia-304xx detected") |
|
363 | ||
364 |
from catalyst import Catalyst |
|
365 |
if Catalyst().detect(): |
|
366 |
print("Catalyst detected") |
|
367 |
""" |
Cnchi-0.12.0.orig/cnchi/info.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
3 | 3 |
# |
4 | 4 |
# info.py |
5 | 5 |
# |
6 |
# Copyright © 2013-2016 Antergos |
|
7 |
# Copyright © 2016 Parabola |
|
6 |
# Copyright © 2013-2015 Antergos |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
31 | 30 |
""" Set some Cnchi global constants """ |
32 | 31 | |
33 | 32 |
CNCHI_VERSION = "0.12.47" |
34 |
CNCHI_WEBSITE = "https://www.parabola.nu"
|
|
33 |
CNCHI_WEBSITE = "http://www.antergos.com"
|
|
35 | 34 |
CNCHI_RELEASE_STAGE = "production" |
36 | 35 | |
37 | 36 |
if __name__ == '__main__': |
Cnchi-0.12.0.orig/cnchi/installation/advanced.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# advanced.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
171 | 170 |
for mount_point in fs.COMMON_MOUNT_POINTS: |
172 | 171 |
combo.append_text(mount_point) |
173 | 172 | |
174 |
self.bootloader = "grub" |
|
173 |
self.bootloader = "grub2"
|
|
175 | 174 |
self.bootloader_device = "" |
176 | 175 |
self.bootloader_entry = self.ui.get_object('bootloader_entry') |
177 | 176 |
self.bootloader_device_entry = self.ui.get_object('bootloader_device_entry') |
... | ... | |
341 | 340 |
self.bootloader_entry.remove_all() |
342 | 341 | |
343 | 342 |
if os.path.exists('/sys/firmware/efi'): |
344 |
self.bootloader_entry.append_text("Grub") |
|
343 |
self.bootloader_entry.append_text("Grub2")
|
|
345 | 344 |
self.bootloader_entry.append_text("Systemd-boot") |
346 | 345 |
if not self.select_combobox_value(self.bootloader_entry, self.bootloader): |
347 | 346 |
# Automatically select first entry |
... | ... | |
1703 | 1702 |
""" |
1704 | 1703 |
Check that all necessary mount points are specified. |
1705 | 1704 |
At least root (/) partition must be defined and in UEFI systems |
1706 |
a fat partition mounted in /boot (Systemd-boot) or /boot/efi (grub) must be defined too. |
|
1705 |
a fat partition mounted in /boot (Systemd-boot) or /boot/efi (grub2) must be defined too.
|
|
1707 | 1706 |
""" |
1708 | 1707 | |
1709 | 1708 |
check_parts = ["/", "/boot", "/boot/efi", "swap"] |
... | ... | |
1736 | 1735 |
part_label["/"].show() |
1737 | 1736 | |
1738 | 1737 |
if is_uefi: |
1739 |
if self.bootloader == "grub": |
|
1738 |
if self.bootloader == "grub2":
|
|
1740 | 1739 |
part_label["/boot/efi"].show() |
1741 | 1740 |
if self.bootloader == "systemd-boot": |
1742 | 1741 |
part_label["/boot"].show() |
... | ... | |
1766 | 1765 |
if is_uefi: |
1767 | 1766 |
# /boot or /boot/efi need to be fat32 in UEFI systems |
1768 | 1767 |
if "fat" in fsystem: |
1769 |
if self.bootloader == "grub" and mnt == "/boot/efi": |
|
1770 |
# Grub in UEFI |
|
1768 |
if self.bootloader == "grub2" and mnt == "/boot/efi":
|
|
1769 |
# Grub2 in UEFI
|
|
1771 | 1770 |
has_part["/boot/efi"] = True |
1772 | 1771 |
part_label["/boot/efi"].show() |
1773 | 1772 |
part_label["/boot/efi"].set_state(True) |
... | ... | |
1787 | 1786 |
check_ok = has_part["/"] |
1788 | 1787 | |
1789 | 1788 |
if is_uefi: |
1790 |
if self.bootloader == "grub": |
|
1791 |
# Grub needs a /boot/efi partition in UEFI |
|
1789 |
if self.bootloader == "grub2":
|
|
1790 |
# Grub2 needs a /boot/efi partition in UEFI
|
|
1792 | 1791 |
check_ok = check_ok and has_part["/boot/efi"] |
1793 | 1792 |
elif self.bootloader == "systemd-boot": |
1794 | 1793 |
# Systemd-boot (Gummiboot) needs a /boot partition |
... | ... | |
2009 | 2008 |
self.settings.set('bootloader_device', self.bootloader_device) |
2010 | 2009 | |
2011 | 2010 |
self.settings.set('bootloader', self.bootloader) |
2012 |
msg = "Parabola will install the bootloader {0} in device {1}"
|
|
2011 |
msg = "Antergos will install the bootloader {0} in device {1}"
|
|
2013 | 2012 |
msg = msg.format(self.bootloader, self.bootloader_device) |
2014 | 2013 |
logging.info(msg) |
2015 | 2014 |
Cnchi-0.12.0.orig/cnchi/installation/alongside.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# alongside.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
52 | 51 | |
53 | 52 |
from gtkbasebox import GtkBaseBox |
54 | 53 | |
55 |
# Leave at least 6.5GB for Parabola when shrinking
|
|
54 |
# Leave at least 6.5GB for Antergos when shrinking
|
|
56 | 55 |
MIN_ROOT_SIZE = 6500 |
57 | 56 | |
58 | 57 | |
... | ... | |
120 | 119 | |
121 | 120 |
@staticmethod |
122 | 121 |
def get_new_device(device_to_shrink): |
123 |
""" Get new device where Cnchi will install Parabola
|
|
122 |
""" Get new device where Cnchi will install Antergos
|
|
124 | 123 |
returns an empty string if no device is available """ |
125 | 124 |
number = int(device_to_shrink[len("/dev/sdX"):]) |
126 | 125 |
disk = device_to_shrink[:len("/dev/sdX")] |
... | ... | |
152 | 151 |
(min_size, part_size) = get_partition_size_info(device_to_shrink) |
153 | 152 |
max_size = part_size - (MIN_ROOT_SIZE * 1000.0) |
154 | 153 |
if max_size < 0: |
155 |
# Full Parabola does not fit but maybe base fits... ask user.
|
|
156 |
txt = _("Cnchi recommends at least 6.5GB free to install Parabola.") + "\n\n"
|
|
154 |
# Full Antergos does not fit but maybe base fits... ask user.
|
|
155 |
txt = _("Cnchi recommends at least 6.5GB free to install Antergos.") + "\n\n"
|
|
157 | 156 |
txt += _("New partition {0} resulting of shrinking {1} will not have enough free space for a full installation.").format(new_device, device_to_shrink) + "\n\n" |
158 |
txt += _("You can still install Parabola, but be carefull on which DE you choose as it might not fit in.") + "\n\n"
|
|
157 |
txt += _("You can still install Antergos, but be carefull on which DE you choose as it might not fit in.") + "\n\n"
|
|
159 | 158 |
txt += _("Install at your own risk!") |
160 | 159 |
show.warning(self.get_toplevel(), txt) |
161 | 160 |
max_size = part_size |
... | ... | |
175 | 174 |
icon_file = self.get_distributor_icon_file(self.oses[device_to_shrink]) |
176 | 175 |
self.resize_widget.set_part_icon('existing', icon_file=icon_file) |
177 | 176 | |
178 |
self.resize_widget.set_part_title('new', 'New Parabola', new_device)
|
|
179 |
icon_file = self.get_distributor_icon_file('Parabola')
|
|
177 |
self.resize_widget.set_part_title('new', 'New Antergos', new_device)
|
|
178 |
icon_file = self.get_distributor_icon_file('Antergos')
|
|
180 | 179 |
self.resize_widget.set_part_icon('new', icon_file=icon_file) |
181 | 180 | |
182 | 181 |
self.resize_widget.set_pref_size(max_size) |
... | ... | |
186 | 185 |
""" Gets an icon for the installed distribution """ |
187 | 186 |
os_name = os_name.lower() |
188 | 187 | |
189 |
# No numix icon for Parabola, use our own.
|
|
190 |
if "parabola" in os_name:
|
|
188 |
# No numix icon for Antergos, use our own.
|
|
189 |
if "antergos" in os_name:
|
|
191 | 190 |
icons_path = os.path.join(self.settings.get('data'), "icons/48x48") |
192 |
icon_file = os.path.join(icons_path, "distributor-logo-parabola.png")
|
|
191 |
icon_file = os.path.join(icons_path, "distributor-logo-antergos.png")
|
|
193 | 192 |
return icon_file |
194 | 193 | |
195 | 194 |
icon_names = [ |
... | ... | |
217 | 216 |
txt = _("Choose the partition that you want to shrink:") |
218 | 217 |
self.choose_partition_label.set_markup(txt) |
219 | 218 | |
220 |
self.header.set_subtitle(_("Parabola Alongside Installation"))
|
|
219 |
self.header.set_subtitle(_("Antergos Alongside Installation"))
|
|
221 | 220 | |
222 | 221 |
def on_choose_partition_combo_changed(self, combobox): |
223 | 222 |
txt = combobox.get_active_text() |
... | ... | |
418 | 417 |
if self.settings.get('bootloader_install'): |
419 | 418 |
self.settings.set('bootloader', "grub2") |
420 | 419 |
self.settings.set('bootloader_device', device_path) |
421 |
msg = "Parabola will install the bootloader {0} in device {1}"
|
|
420 |
msg = "Antergos will install the bootloader {0} in device {1}"
|
|
422 | 421 |
msg = msg.format(self.bootloader, self.bootloader_device) |
423 | 422 |
logging.info(msg) |
424 | 423 |
else: |
Cnchi-0.12.0.orig/cnchi/installation/ask.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# ask.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
228 | 227 |
# Automatic Install |
229 | 228 |
radio = self.ui.get_object("automatic_radiobutton") |
230 | 229 |
if len(oses_str) > 0: |
231 |
txt = _("Replace {0} with Parabola").format(oses_str)
|
|
230 |
txt = _("Replace {0} with Antergos").format(oses_str)
|
|
232 | 231 |
else: |
233 |
txt = _("Erase disk and install Parabola")
|
|
232 |
txt = _("Erase disk and install Antergos")
|
|
234 | 233 |
radio.set_label(txt) |
235 | 234 |
radio.set_name('auto_radio_btn') |
236 | 235 | |
... | ... | |
296 | 295 | |
297 | 296 |
# Alongside Install (For now, only works with Windows) |
298 | 297 |
# if len(oses_str) > 0: |
299 |
# txt = _("Install Parabola alongside {0}").format(oses_str)
|
|
298 |
# txt = _("Install Antergos alongside {0}").format(oses_str)
|
|
300 | 299 |
# radio = self.ui.get_object("alongside_radiobutton") |
301 | 300 |
# radio.set_label(txt) |
302 | 301 |
# |
303 | 302 |
# label = self.ui.get_object("alongside_description") |
304 |
# txt = _("Installs Parabola without removing {0}").format(oses_str)
|
|
303 |
# txt = _("Installs Antergos without removing {0}").format(oses_str)
|
|
305 | 304 |
# txt = description_style.format(txt) |
306 | 305 |
# label.set_markup(txt) |
307 | 306 |
# label.set_line_wrap(True) |
... | ... | |
321 | 320 | |
322 | 321 |
# Advanced Install |
323 | 322 |
radio = self.ui.get_object("advanced_radiobutton") |
324 |
radio.set_label(_("Choose exactly where Parabola should be installed."))
|
|
323 |
radio.set_label(_("Choose exactly where Antergos should be installed."))
|
|
325 | 324 |
radio.set_name("advanced_radio_btn") |
326 | 325 | |
327 | 326 |
label = self.ui.get_object("advanced_description") |
... | ... | |
348 | 347 |
self.settings.set('use_lvm', use_lvm) |
349 | 348 |
self.settings.set('use_luks', use_luks) |
350 | 349 |
self.settings.set('use_luks_in_root', True) |
351 |
self.settings.set('luks_root_volume', "cryptParabola")
|
|
350 |
self.settings.set('luks_root_volume', "cryptAntergos")
|
|
352 | 351 |
self.settings.set('use_home', use_home) |
353 | 352 |
else: |
354 | 353 |
# Set defaults. We don't know these yet. |
... | ... | |
359 | 358 |
self.settings.set('use_home', False) |
360 | 359 | |
361 | 360 |
if self.settings.get('use_luks'): |
362 |
logging.info("Parabola installation will be encrypted using LUKS")
|
|
361 |
logging.info("Antergos installation will be encrypted using LUKS")
|
|
363 | 362 | |
364 | 363 |
if self.settings.get('use_lvm'): |
365 |
logging.info("Parabola will be installed using LVM volumes")
|
|
364 |
logging.info("Antergos will be installed using LVM volumes")
|
|
366 | 365 |
if self.settings.get('use_home'): |
367 |
logging.info("Parabola will be installed using a separate /home volume.")
|
|
366 |
logging.info("Antergos will be installed using a separate /home volume.")
|
|
368 | 367 |
elif self.settings.get('use_home'): |
369 |
logging.info("Parabola will be installed using a separate /home partition.")
|
|
368 |
logging.info("Antergos will be installed using a separate /home partition.")
|
|
370 | 369 | |
371 | 370 |
if self.next_page == "installation_alongside": |
372 | 371 |
self.settings.set('partition_mode', 'alongside') |
Cnchi-0.12.0.orig/cnchi/installation/automatic.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# automatic.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
71 | 70 |
self.devices = {} |
72 | 71 |
self.installation = None |
73 | 72 | |
74 |
self.bootloader = "grub" |
|
73 |
self.bootloader = "grub2"
|
|
75 | 74 |
self.bootloader_entry = self.ui.get_object('bootloader_entry') |
76 | 75 |
self.bootloader_device_entry = self.ui.get_object('bootloader_device_entry') |
77 | 76 |
self.bootloader_devices = {} |
... | ... | |
90 | 89 |
label.set_markup(txt) |
91 | 90 | |
92 | 91 |
label = self.ui.get_object('info_label') |
93 |
txt = _("Select the drive we should use to install Parabola and then click above to start the process.")
|
|
92 |
txt = _("Select the drive we should use to install Antergos and then click above to start the process.")
|
|
94 | 93 |
label.set_markup(txt) |
95 | 94 | |
96 | 95 |
label = self.ui.get_object('label_luks_password') |
... | ... | |
226 | 225 |
self.bootloader_entry.remove_all() |
227 | 226 | |
228 | 227 |
if os.path.exists('/sys/firmware/efi'): |
229 |
self.bootloader_entry.append_text("Grub") |
|
228 |
self.bootloader_entry.append_text("Grub2")
|
|
230 | 229 |
self.bootloader_entry.append_text("Gummiboot") |
231 | 230 |
self.bootloader_entry.set_active(0) |
232 | 231 |
self.bootloader_entry.show() |
... | ... | |
342 | 341 |
self.settings.set('bootloader_device', self.bootloader_device) |
343 | 342 | |
344 | 343 |
self.settings.set('bootloader', self.bootloader) |
345 |
msg = _("Parabola will install the bootloader '{0}' in device '{1}'")
|
|
344 |
msg = _("Antergos will install the bootloader '{0}' in device '{1}'")
|
|
346 | 345 |
msg = msg.format(self.bootloader, self.bootloader_device) |
347 | 346 |
logging.info(msg) |
348 | 347 | |
349 | 348 |
def run_install(self, packages, metalinks): |
350 |
txt = _("Cnchi will install Parabola on device %s")
|
|
349 |
txt = _("Cnchi will install Antergos on device %s")
|
|
351 | 350 |
logging.info(txt, self.auto_device) |
352 | 351 | |
353 | 352 |
self.settings.set('auto_device', self.auto_device) |
Cnchi-0.12.0.orig/cnchi/installation/auto_partition.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# auto_partition.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
151 | 150 |
failed installation) """ |
152 | 151 | |
153 | 152 |
try: |
154 |
if os.path.exists("/dev/mapper/cryptParabola"):
|
|
155 |
subprocess.check_call(["cryptsetup", "luksClose", "/dev/mapper/cryptParabola"])
|
|
156 |
if os.path.exists("/dev/mapper/cryptParabolaHome"):
|
|
157 |
subprocess.check_call(["cryptsetup", "luksClose", "/dev/mapper/cryptParabolaHome"])
|
|
153 |
if os.path.exists("/dev/mapper/cryptAntergos"):
|
|
154 |
subprocess.check_call(["cryptsetup", "luksClose", "/dev/mapper/cryptAntergos"])
|
|
155 |
if os.path.exists("/dev/mapper/cryptAntergosHome"):
|
|
156 |
subprocess.check_call(["cryptsetup", "luksClose", "/dev/mapper/cryptAntergosHome"])
|
|
158 | 157 |
except subprocess.CalledProcessError as err: |
159 | 158 |
logging.warning("Can't close already opened LUKS devices, command %s failed: %s", err.cmd, err.output) |
160 | 159 | |
... | ... | |
467 | 466 |
else: |
468 | 467 |
part_num = 1 |
469 | 468 | |
470 |
if self.bootloader == "grub": |
|
469 |
if self.bootloader == "grub2":
|
|
471 | 470 |
devices['efi'] = "{0}{1}".format(device, part_num) |
472 | 471 |
part_num += 1 |
473 | 472 | |
... | ... | |
490 | 489 |
if self.lvm: |
491 | 490 |
# LUKS and LVM |
492 | 491 |
devices['luks_root'] = devices['root'] |
493 |
devices['lvm'] = "/dev/mapper/cryptParabola"
|
|
492 |
devices['lvm'] = "/dev/mapper/cryptAntergos"
|
|
494 | 493 |
else: |
495 | 494 |
# LUKS and no LVM |
496 | 495 |
devices['luks_root'] = devices['root'] |
497 |
devices['root'] = "/dev/mapper/cryptParabola"
|
|
496 |
devices['root'] = "/dev/mapper/cryptAntergos"
|
|
498 | 497 |
if self.home: |
499 | 498 |
# In this case we'll have two LUKS devices, one for root |
500 | 499 |
# and the other one for /home |
501 | 500 |
devices['luks_home'] = devices['home'] |
502 |
devices['home'] = "/dev/mapper/cryptParabolaHome"
|
|
501 |
devices['home'] = "/dev/mapper/cryptAntergosHome"
|
|
503 | 502 |
elif self.lvm: |
504 | 503 |
# No LUKS but using LVM |
505 | 504 |
devices['lvm'] = devices['root'] |
506 | 505 | |
507 | 506 |
if self.lvm: |
508 |
devices['root'] = "/dev/ParabolaVG/ParabolaRoot"
|
|
509 |
devices['swap'] = "/dev/ParabolaVG/ParabolaSwap"
|
|
507 |
devices['root'] = "/dev/AntergosVG/AntergosRoot"
|
|
508 |
devices['swap'] = "/dev/AntergosVG/AntergosSwap"
|
|
510 | 509 |
if self.home: |
511 |
devices['home'] = "/dev/ParabolaVG/ParabolaHome"
|
|
510 |
devices['home'] = "/dev/AntergosVG/AntergosHome"
|
|
512 | 511 | |
513 | 512 |
return devices |
514 | 513 | |
... | ... | |
518 | 517 |
devices = self.get_devices() |
519 | 518 |
mount_devices = {} |
520 | 519 | |
521 |
if self.GPT and self.bootloader == "grub": |
|
520 |
if self.GPT and self.bootloader == "grub2":
|
|
522 | 521 |
mount_devices['/boot/efi'] = devices['efi'] |
523 | 522 | |
524 | 523 |
mount_devices['/boot'] = devices['boot'] |
... | ... | |
546 | 545 | |
547 | 546 |
fs_devices = {} |
548 | 547 | |
549 |
if self.GPT and self.bootloader == "grub": |
|
548 |
if self.GPT and self.bootloader == "grub2":
|
|
550 | 549 |
fs_devices[devices['efi']] = "vfat" |
551 | 550 | |
552 | 551 |
if self.GPT and self.bootloader == "systemd-boot": |
... | ... | |
578 | 577 |
def get_part_sizes(self, disk_size, start_part_sizes=1): |
579 | 578 |
part_sizes = {'disk': disk_size, 'boot': 256, 'efi': 0} |
580 | 579 | |
581 |
if self.GPT and self.bootloader == "grub": |
|
580 |
if self.GPT and self.bootloader == "grub2":
|
|
582 | 581 |
part_sizes['efi'] = 200 |
583 | 582 | |
584 | 583 |
mem_total = check_output("grep MemTotal /proc/meminfo") |
... | ... | |
626 | 625 | |
627 | 626 |
def log_part_sizes(self, part_sizes): |
628 | 627 |
logging.debug("Total disk size: %dMiB", part_sizes['disk']) |
629 |
if self.GPT and self.bootloader == "grub": |
|
628 |
if self.GPT and self.bootloader == "grub2":
|
|
630 | 629 |
logging.debug("EFI System Partition (ESP) size: %dMiB", part_sizes['efi']) |
631 | 630 |
logging.debug("Boot partition size: %dMiB", part_sizes['boot']) |
632 | 631 | |
... | ... | |
710 | 709 |
sgdisk_new(device, part_num, "BIOS_BOOT", gpt_bios_grub_part_size, "EF02") |
711 | 710 |
part_num += 1 |
712 | 711 | |
713 |
if self.bootloader == "grub": |
|
712 |
if self.bootloader == "grub2":
|
|
714 | 713 |
# Create EFI System Partition (ESP) |
715 | 714 |
# GPT GUID: C12A7328-F81F-11D2-BA4B-00A0C93EC93B |
716 | 715 |
sgdisk_new(device, part_num, "UEFI_SYSTEM", part_sizes['efi'], "EF00") |
... | ... | |
718 | 717 | |
719 | 718 |
# Create Boot partition |
720 | 719 |
if self.bootloader == "systemd-boot": |
721 |
sgdisk_new(device, part_num, "PARABOLA_BOOT", part_sizes['boot'], "EF00")
|
|
720 |
sgdisk_new(device, part_num, "ANTERGOS_BOOT", part_sizes['boot'], "EF00")
|
|
722 | 721 |
else: |
723 |
sgdisk_new(device, part_num, "PARABOLA_BOOT", part_sizes['boot'], "8300")
|
|
722 |
sgdisk_new(device, part_num, "ANTERGOS_BOOT", part_sizes['boot'], "8300")
|
|
724 | 723 |
part_num += 1 |
725 | 724 | |
726 | 725 |
if self.lvm: |
727 | 726 |
# Create partition for lvm (will store root, swap and home (if desired) logical volumes) |
728 |
sgdisk_new(device, part_num, "PARABOLA_LVM", part_sizes['lvm_pv'], "8E00")
|
|
727 |
sgdisk_new(device, part_num, "ANTERGOS_LVM", part_sizes['lvm_pv'], "8E00")
|
|
729 | 728 |
part_num += 1 |
730 | 729 |
else: |
731 |
sgdisk_new(device, part_num, "PARABOLA_ROOT", part_sizes['root'], "8300")
|
|
730 |
sgdisk_new(device, part_num, "ANTERGOS_ROOT", part_sizes['root'], "8300")
|
|
732 | 731 |
part_num += 1 |
733 | 732 |
if self.home: |
734 |
sgdisk_new(device, part_num, "PARABOLA_HOME", part_sizes['home'], "8302")
|
|
733 |
sgdisk_new(device, part_num, "ANTERGOS_HOME", part_sizes['home'], "8302")
|
|
735 | 734 |
part_num += 1 |
736 |
sgdisk_new(device, part_num, "PARABOLA_SWAP", 0, "8200")
|
|
735 |
sgdisk_new(device, part_num, "ANTERGOS_SWAP", 0, "8200")
|
|
737 | 736 | |
738 | 737 |
logging.debug(check_output("sgdisk --print {0}".format(device))) |
739 | 738 |
else: |
... | ... | |
794 | 793 | |
795 | 794 |
devices = self.get_devices() |
796 | 795 | |
797 |
if self.GPT and self.bootloader == "grub": |
|
796 |
if self.GPT and self.bootloader == "grub2":
|
|
798 | 797 |
logging.debug("EFI: %s", devices['efi']) |
799 | 798 | |
800 | 799 |
logging.debug("Boot: %s", devices['boot']) |
... | ... | |
806 | 805 |
logging.debug("Swap: %s", devices['swap']) |
807 | 806 | |
808 | 807 |
if self.luks: |
809 |
setup_luks(devices['luks_root'], "cryptParabola", self.luks_password, key_files[0])
|
|
808 |
setup_luks(devices['luks_root'], "cryptAntergos", self.luks_password, key_files[0])
|
|
810 | 809 |
if self.home and not self.lvm: |
811 |
setup_luks(devices['luks_home'], "cryptParabolaHome", self.luks_password, key_files[1])
|
|
810 |
setup_luks(devices['luks_home'], "cryptAntergosHome", self.luks_password, key_files[1])
|
|
812 | 811 | |
813 | 812 |
if self.lvm: |
814 | 813 |
logging.debug("Cnchi will setup LVM on device %s", devices['lvm']) |
... | ... | |
824 | 823 |
raise InstallError(txt) |
825 | 824 | |
826 | 825 |
try: |
827 |
subprocess.check_call(["vgcreate", "-f", "-y", "ParabolaVG", devices['lvm']])
|
|
826 |
subprocess.check_call(["vgcreate", "-f", "-y", "AntergosVG", devices['lvm']])
|
|
828 | 827 |
except subprocess.CalledProcessError as err: |
829 | 828 |
txt = "Error creating LVM volume group in device {0}. Command {1} failed: {2}".format( |
830 | 829 |
devices['lvm'], err.cmd, err.Output) |
... | ... | |
835 | 834 | |
836 | 835 |
# Fix issue 180 |
837 | 836 |
# Check space we have now for creating logical volumes |
838 |
vg_info = check_output("vgdisplay -c ParabolaVG")
|
|
837 |
vg_info = check_output("vgdisplay -c AntergosVG")
|
|
839 | 838 |
# Get column number 12: Size of volume group in kilobytes |
840 | 839 |
vg_size = int(vg_info.split(":")[11]) / 1024 |
841 | 840 |
if part_sizes['lvm_pv'] > vg_size: |
842 |
logging.debug("Real ParabolaVG volume group size: %d MiB", vg_size)
|
|
841 |
logging.debug("Real AntergosVG volume group size: %d MiB", vg_size)
|
|
843 | 842 |
logging.debug("Reajusting logical volume sizes") |
844 | 843 |
diff_size = part_sizes['lvm_pv'] - vg_size |
845 | 844 |
part_sizes = self.get_part_sizes(disk_size - diff_size, start_part_sizes) |
... | ... | |
848 | 847 |
# Create LVM volumes |
849 | 848 |
try: |
850 | 849 |
size = str(int(part_sizes['root'])) |
851 |
cmd = ["lvcreate", "--name", "ParabolaRoot", "--size", size, "ParabolaVG"]
|
|
850 |
cmd = ["lvcreate", "--name", "AntergosRoot", "--size", size, "AntergosVG"]
|
|
852 | 851 |
subprocess.check_call(cmd) |
853 | 852 | |
854 | 853 |
if not self.home: |
855 | 854 |
# Use the remainig space for our swap volume |
856 |
cmd = ["lvcreate", "--name", "ParabolaSwap", "--extents", "100%FREE", "ParabolaVG"]
|
|
855 |
cmd = ["lvcreate", "--name", "AntergosSwap", "--extents", "100%FREE", "AntergosVG"]
|
|
857 | 856 |
subprocess.check_call(cmd) |
858 | 857 |
else: |
859 | 858 |
size = str(int(part_sizes['swap'])) |
860 |
cmd = ["lvcreate", "--name", "ParabolaSwap", "--size", size, "ParabolaVG"]
|
|
859 |
cmd = ["lvcreate", "--name", "AntergosSwap", "--size", size, "AntergosVG"]
|
|
861 | 860 |
subprocess.check_call(cmd) |
862 | 861 |
# Use the remaining space for our home volume |
863 |
cmd = ["lvcreate", "--name", "ParabolaHome", "--extents", "100%FREE", "ParabolaVG"]
|
|
862 |
cmd = ["lvcreate", "--name", "AntergosHome", "--extents", "100%FREE", "AntergosVG"]
|
|
864 | 863 |
subprocess.check_call(cmd) |
865 | 864 |
except subprocess.CalledProcessError as err: |
866 | 865 |
txt = "Error creating LVM logical volume. Command {0} failed: {1}".format(err.cmd, err.output) |
... | ... | |
879 | 878 | |
880 | 879 |
labels = { |
881 | 880 |
'efi': 'UEFI_SYSTEM', |
882 |
'boot': 'ParabolaBoot',
|
|
883 |
'root': 'ParabolaRoot',
|
|
884 |
'home': 'ParabolaHome',
|
|
885 |
'swap': 'ParabolaSwap'}
|
|
881 |
'boot': 'AntergosBoot',
|
|
882 |
'root': 'AntergosRoot',
|
|
883 |
'home': 'AntergosHome',
|
|
884 |
'swap': 'AntergosSwap'}
|
|
886 | 885 | |
887 | 886 |
fs_devices = self.get_fs_devices() |
888 | 887 | |
... | ... | |
897 | 896 |
self.mkfs(devices['boot'], fs_devices[devices['boot']], mount_points['boot'], labels['boot']) |
898 | 897 | |
899 | 898 |
# Note: Make sure the "boot" partition is defined before the "efi" one! |
900 |
if self.GPT and self.bootloader == "grub": |
|
899 |
if self.GPT and self.bootloader == "grub2":
|
|
901 | 900 |
# Format EFI System Partition (ESP) with vfat (fat32) |
902 | 901 |
self.mkfs(devices['efi'], fs_devices[devices['efi']], mount_points['efi'], labels['efi'], "-F 32") |
903 | 902 | |
... | ... | |
942 | 941 |
luks_password="luks", |
943 | 942 |
use_lvm=True, |
944 | 943 |
use_home=True, |
945 |
bootloader="grub", |
|
944 |
bootloader="grub2",
|
|
946 | 945 |
callback_queue=None) |
947 | 946 |
auto.run() |
Cnchi-0.12.0.orig/cnchi/installation/bootloader.py 2016-01-29 08:56:41.000000000 -0200 | ||
---|---|---|
4 | 4 |
# bootloader.py |
5 | 5 |
# |
6 | 6 |
# Copyright © 2013-2015 Antergos |
7 |
# Copyright © 2016 Parabola |
|
8 | 7 |
# |
9 | 8 |
# This file is part of Cnchi. |
10 | 9 |
# |
... | ... | |
79 | 78 |
self.freeze_unfreeze_xfs() |
80 | 79 | |
81 | 80 |
bootloader = self.settings.get('bootloader').lower() |
82 |
if bootloader == "grub": |
|
81 |
if bootloader == "grub2": |