Commit f74cf405 authored by Matthias Klumpp's avatar Matthias Klumpp

Import Upstream version 3.28.0

parent c50f9e72
3.28.0
* Translation updates
* Sync string changes with gnome-software
3.27.90
* Adjust session components to recent changes
* Improve sorting in the language list
* Memory leak fixes
* Update titlebar when title changes
* Translation updates
3.26.0
* Translation updates
......
This diff is collapsed.
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for gnome-initial-setup 3.26.0.
# Generated by GNU Autoconf 2.69 for gnome-initial-setup 3.28.0.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
......@@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='gnome-initial-setup'
PACKAGE_TARNAME='gnome-initial-setup'
PACKAGE_VERSION='3.26.0'
PACKAGE_STRING='gnome-initial-setup 3.26.0'
PACKAGE_VERSION='3.28.0'
PACKAGE_STRING='gnome-initial-setup 3.28.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
......@@ -1407,7 +1407,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures gnome-initial-setup 3.26.0 to adapt to many kinds of systems.
\`configure' configures gnome-initial-setup 3.28.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1478,7 +1478,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of gnome-initial-setup 3.26.0:";;
short | recursive ) echo "Configuration of gnome-initial-setup 3.28.0:";;
esac
cat <<\_ACEOF
......@@ -1626,7 +1626,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
gnome-initial-setup configure 3.26.0
gnome-initial-setup configure 3.28.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1991,7 +1991,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by gnome-initial-setup $as_me 3.26.0, which was
It was created by gnome-initial-setup $as_me 3.28.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -2856,7 +2856,7 @@ fi
# Define the identity of the package.
PACKAGE='gnome-initial-setup'
VERSION='3.26.0'
VERSION='3.28.0'
cat >>confdefs.h <<_ACEOF
......@@ -16049,7 +16049,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by gnome-initial-setup $as_me 3.26.0, which was
This file was extended by gnome-initial-setup $as_me 3.28.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -16115,7 +16115,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
gnome-initial-setup config.status 3.26.0
gnome-initial-setup config.status 3.28.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
AC_INIT([gnome-initial-setup],[3.26.0])
AC_INIT([gnome-initial-setup],[3.28.0])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([dist-xz no-dist-gzip foreign tar-ustar])
......
......@@ -6,3 +6,4 @@ OnlyShowIn=GNOME;
NoDisplay=true
X-GNOME-AutoRestart=false
X-GNOME-Autostart-Phase=EarlyInitialization
AutostartCondition=unless-exists gnome-initial-setup-done
[GNOME Session]
Name=GNOME Initial Setup
RequiredComponents=setup-shell;gnome-initial-setup;org.gnome.SettingsDaemon.A11yKeyboard;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Clipboard;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Mouse;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings;
RequiredComponents=setup-shell;gnome-initial-setup;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Clipboard;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Mouse;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings;
gnome-initial-setup (3.26.0-2pureos5) green; urgency=medium
* luks/localegen: Ensure pkexec finds a working shell set
-- Matthias Klumpp <matthias.klumpp@puri.sm> Thu, 22 Mar 2018 22:26:14 +0100
gnome-initial-setup (3.26.0-2pureos4) green; urgency=medium
* Rebuild initramfs in cryptestup helper
* cryptsetup-helper: Rewrite crypttab with the appropriate settings
* pureos oem: Check for encrypted_partitions.json in the right location
-- Matthias Klumpp <matthias.klumpp@puri.sm> Wed, 21 Mar 2018 22:44:15 +0100
gnome-initial-setup (3.26.0-2pureos3) green; urgency=medium
* Switch all data-transmission privacy options to default-off
* Spawn PureOS OEM installer after session setup on OEM live image
* Add experimental disk encryption setup page for OEM setups
-- Matthias Klumpp <matthias.klumpp@puri.sm> Fri, 16 Mar 2018 10:52:42 +0100
gnome-initial-setup (3.26.0-2pureos2) green; urgency=medium
* pureos-default-goa-providers.patch: Set default GOA providers that
align a bit better with PureOS' goals.
-- Matthias Klumpp <matthias.klumpp@puri.sm> Wed, 14 Mar 2018 22:44:48 +0100
gnome-initial-setup (3.26.0-2pureos1) green; urgency=medium
* Fork for PureOS:
+ Set dev@puri.sm as maintainer, prefixing original XSBC-Original-.
+ Set myself as uploader, dropping original.
* Build without software sources enabled (there is nothing non-free in
PureOS).
Stop build-depend on libpackagekit-glib2-dev.
Closes: PureOS:T246.
* Add patch to have localed set and rebuild locale.gen stuff (hack -
needs better solution later).
Closes: PureOS:T245.
-- Jonas Smedegaard <jonas.smedegaard@puri.sm> Sun, 31 Dec 2017 22:12:57 +0100
gnome-initial-setup (3.26.0-2) unstable; urgency=medium
* Lower dependency on gdm3 to Suggests.
* Update Vcs fields for conversion to git
* Add debian/gbp.conf
* Bump Standards-Version to 4.1.2
* Bump debhelper compat to 11
* Disable the Software Sources page since there is no obvious easy way
to change this setting later
-- Jeremy Bicha <jbicha@debian.org> Mon, 25 Dec 2017 09:22:53 -0500
gnome-initial-setup (3.26.0-1) unstable; urgency=medium
* New upstream translations release
-- Jeremy Bicha <jbicha@debian.org> Wed, 13 Sep 2017 21:22:37 -0400
gnome-initial-setup (3.25.92-1) unstable; urgency=medium
* New upstream translations release (Closes: #862675)
-- Jeremy Bicha <jbicha@debian.org> Mon, 04 Sep 2017 20:14:08 -0400
gnome-initial-setup (3.25.4-1) unstable; urgency=medium
* New upstream release
* Drop all patches, applied in new release
* debian/links:
+ Symlink the gdm greeter .desktop to /usr/share/applications
so that "Initial Setup" has a proper window title
* Bump Standards-Version to 4.1.0
-- Jeremy Bicha <jbicha@debian.org> Wed, 30 Aug 2017 12:11:56 -0400
gnome-initial-setup (3.24.2-1) unstable; urgency=medium
* New upstream release (Closes: #869942)
- Adapt gnome-session file for gnome-settings-daemon 3.24
* debian/control.in:
- Update NetworkManager related Build-Depends
- Add explicit dependency on gnome-settings-daemon >= 3.24
* Add adapt-to-gsd325.patch:
- Don't require the orientation or xrandr plugins that will
be dropped in gnome-settings-daemon 3.26 to smooth that
transition
-- Jeremy Bicha <jbicha@ubuntu.com> Sun, 06 Aug 2017 17:41:28 -0400
gnome-initial-setup (3.22.1-1) unstable; urgency=medium
* New upstream release.
-- Laurent Bigonville <bigon@debian.org> Tue, 06 Dec 2016 18:05:21 +0100
gnome-initial-setup (3.22.0-1) unstable; urgency=medium
* New upstream release.
* Bump debhelper compat to 10 (automatic autoreconf).
* Set libexecdir to non-multiarch dir, following current practice.
* Update Build-Depends as per configure.ac.
* Explicitly enable the software sources page.
* Refresh polkit-allow-NM.patch.
* Avoid using full path to deluser in postrm script to quieten lintian.
* Tweak copyright file to add some text to the public-domain block.
-- Jordi Mallach <jordi@debian.org> Sat, 24 Sep 2016 01:59:12 +0200
gnome-initial-setup (3.20.1-1) unstable; urgency=low
[ Javier Martinez ]
* Initial release (Closes: #766388)
[ Sjoerd Simons ]
* debian/patches/pollkit-allow-NM.patch:
- Added. Allow the gnome-initial-setup user to control the network
[ Jordi Mallach ]
* New upstream release.
* Update Build-Depends as per configure.ac.
* Add missing GPL-2+ license to copyright.
* Add missing ${shlibs:Depends} substitution variable.
* Add dependency on adduser.
[ Jeremy Bicha ]
* New upstream release. Update build-dependencies accordingly.
* Use dh
* Set Arch to linux-any since it needs gdm to build and run
* Set libexecdir
* Add to description and d/copyright
[ Jordi Mallach ]
* Add a pkla rules file for compat with policykit-1 < 0.106.
-- Jordi Mallach <jordi@debian.org> Wed, 03 Aug 2016 12:22:21 +0200
# This file is autogenerated. DO NOT EDIT!
#
# Modifications should be made to debian/control.in instead.
# This file is regenerated automatically in the clean target.
Source: gnome-initial-setup
Section: gnome
Priority: optional
Maintainer: PureOS Maintainers <pureos-project@lists.puri.sm>
Uploaders:
Jonas Smedegaard <jonas.smedegaard@puri.sm>,
Matthias Klumpp <matthias.klumpp@puri.sm>,
XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Build-Depends: debhelper (>= 11),
geoclue-2.0 (>= 2.3.1),
gnome-common,
gnome-pkg-tools (>= 0.13),
intltool (>= 0.40),
iso-codes,
libaccountsservice-dev,
libcheese-gtk-dev (>= 3.3.5),
libfontconfig1-dev,
libgdm-dev (>= 3.8.3),
libgeoclue-2-dev (>= 2.3.1),
libgeocode-glib-dev,
libglib2.0-dev (>= 2.46.0),
libgnome-desktop-3-dev (>= 3.7.5),
libgoa-1.0-dev,
libgoa-backend-1.0-dev,
libgtk-3-dev (>= 3.19.12),
libgweather-3-dev (>= 3.13.91),
libibus-1.0-dev (>= 1.5.2),
libjson-glib-dev,
libkrb5-dev,
libnm-dev (>= 1.2),
libnma-dev (>= 1.0),
libpango1.0-dev (>= 1.32.5),
libpolkit-gobject-1-dev (>= 0.103),
libpwquality-dev,
librest-dev,
libsecret-1-dev,
libwebkit2gtk-4.0-dev
Standards-Version: 4.1.2
Vcs-Git: https://code.puri.sm/pureos/gnome-initial-setup.git
Vcs-Browser: https://code.puri.sm/pureos/gnome-initial-setup
Homepage: https://git.gnome.org/browse/gnome-initial-setup/
Package: gnome-initial-setup
Architecture: linux-any
Depends: adduser,
gnome-settings-daemon (>= 3.24),
policykit-1 (>= 0.103),
python3,
${misc:Depends},
${shlibs:Depends}
Recommends: gnome-getting-started-docs
Suggests: gdm3
Description: Initial GNOME system setup helper
After acquiring or installing a new system there are a few essential things
to set up before use. GNOME Initial Setup aims to provide a simple, easy,
and safe way to prepare a new system.
.
GNOME Initial Setup runs the first time you log in to the GNOME desktop
and lets you easily configure your language, keyboard layout, online accounts
integration, and more.
.
If you want to configure these things at any other time, run the Settings app.
Source: gnome-initial-setup
Section: gnome
Priority: optional
Maintainer: PureOS Maintainers <pureos-project@lists.puri.sm>
Uploaders:
Jonas Smedegaard <jonas.smedegaard@puri.sm>,
Matthias Klumpp <matthias.klumpp@puri.sm>,
XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Build-Depends: debhelper (>= 11),
geoclue-2.0 (>= 2.3.1),
gnome-common,
gnome-pkg-tools (>= 0.13),
intltool (>= 0.40),
iso-codes,
libaccountsservice-dev,
libcheese-gtk-dev (>= 3.3.5),
libfontconfig1-dev,
libgdm-dev (>= 3.8.3),
libgeoclue-2-dev (>= 2.3.1),
libgeocode-glib-dev,
libglib2.0-dev (>= 2.46.0),
libgnome-desktop-3-dev (>= 3.7.5),
libgoa-1.0-dev,
libgoa-backend-1.0-dev,
libgtk-3-dev (>= 3.19.12),
libgweather-3-dev (>= 3.13.91),
libibus-1.0-dev (>= 1.5.2),
libjson-glib-dev,
libkrb5-dev,
libnm-dev (>= 1.2),
libnma-dev (>= 1.0),
libpango1.0-dev (>= 1.32.5),
libpolkit-gobject-1-dev (>= 0.103),
libpwquality-dev,
librest-dev,
libsecret-1-dev,
libwebkit2gtk-4.0-dev
Standards-Version: 4.1.2
Vcs-Git: https://code.puri.sm/pureos/gnome-initial-setup.git
Vcs-Browser: https://code.puri.sm/pureos/gnome-initial-setup
Homepage: https://git.gnome.org/browse/gnome-initial-setup/
Package: gnome-initial-setup
Architecture: linux-any
Depends: adduser,
gnome-settings-daemon (>= 3.24),
policykit-1 (>= 0.103),
python3,
${misc:Depends},
${shlibs:Depends}
Recommends: gnome-getting-started-docs
Suggests: gdm3
Description: Initial GNOME system setup helper
After acquiring or installing a new system there are a few essential things
to set up before use. GNOME Initial Setup aims to provide a simple, easy,
and safe way to prepare a new system.
.
GNOME Initial Setup runs the first time you log in to the GNOME desktop
and lets you easily configure your language, keyboard layout, online accounts
integration, and more.
.
If you want to configure these things at any other time, run the Settings app.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: gnome-initial-setup
Source: https://download.gnome.org/sources/gnome-initial-setup/
Files: *
Copyright: 2009-2016 Red Hat
2012-2016 Mattias Clasen <mclasen@redhat.com>
2012-2015 Jasper St. Pierre <jstpierre@mecheye.net>
2012, 2015 Ray Strode <rstrode@redhat.com>
2011-2013 Giovanni Campagna <scampa.giovanni@gmail.com>
2010 Intel, Inc
2009 Canonical Ltd
2000-2001 Ximian, Inc
William Jon McCann <jmccann@redhat.com>
Jakub Steiner <jimmac@gmail.com>
License: GPL-2+
This program 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 2 of the License, or
(at your option) any later version.
.
This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-2'.
Files: gnome-initial-setup/pages/account/um-realm-manager.*
Copyright: 2009-2014, Red Hat, Inc
These files may be GPL-2+. See https://bugzilla.gnome.org/733593
License: GPL-3+
This program 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.
.
This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-3'.
Files: gnome-initial-setup/pages/timezone/backward
Copyright: None
Copied from tzdata: https://www.iana.org/time-zones
License: public-domain
This file is in the public domain, so clarified as of
2009-05-17 by Arthur David Olson.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 Matthias Klumpp <matthias.klumpp@puri.sm>
#
# This program 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 2 of the
# License, or (at your option) any later version.
#
# This program 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 this program; if not, see <http://www.gnu.org/licenses/>.
import os
import argparse
import subprocess
import shlex
import json
ENCRYPT_BYPASS_INITRAMFS_HOOK = '/usr/share/initramfs-tools/hooks/bypass_encrypt_hook'
CRYPTTAB_FILE = '/etc/crypttab'
KEYFILE = '/crypto_keyfile.bin'
KEYFILE_OLD = '/crypto_keyfile.bin.old'
CALAMARES_LUKS_PARTITION_FILE = '/encrypted_partitions.json'
CRYPTTAB_HEADER = """# /etc/crypttab: mappings for encrypted partitions.
#
# Each mapped device will be created in /dev/mapper, so your /etc/fstab
# should use the /dev/mapper/<name> paths for encrypted devices.
#
# See crypttab(5) for the supported syntax.
#
# NOTE: Do not list your root (/) partition here, it must be set up
# beforehand by the initramfs (/etc/mkinitcpio.conf). The same applies
# to encrypted swap, which should be set up with mkinitcpio-openswap
# for resume support.
#
# <name> <device> <password> <options>"""
def run_command(command, input=None):
if not isinstance(command, list):
command = shlex.split(command)
if not input:
input = None
elif isinstance(input, str):
input = input.encode('utf-8')
elif not isinstance(input, bytes):
input = input.read()
try:
pipe = subprocess.Popen(command,
shell=False,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
except OSError:
return (None, None, -1)
(output, stderr) = pipe.communicate(input=input)
(output, stderr) = (c.decode('utf-8', errors='ignore') for c in (output, stderr))
return (output, stderr, pipe.returncode)
def generate_crypttab_line_info(partition, crypttab_options, use_password=False):
""" Generates information for each crypttab entry. """
if 'luksMapperName' not in partition or 'luksUuid' not in partition:
return None
mapper_name = partition['luksMapperName']
luks_uuid = partition['luksUuid']
if not mapper_name or not luks_uuid:
return None
if use_password:
pwd_s = 'none'
else:
pwd_s = '/crypto_keyfile.bin'
return dict(
name=mapper_name,
device='UUID=' + luks_uuid,
password=pwd_s,
options=crypttab_options)
def print_crypttab_line(dct, file=None):
""" Prints line to '/etc/crypttab' file. """
line = "{:21} {:<45} {} {}".format(dct['name'],
dct['device'],
dct['password'],
dct['options'])
print(line, file=file)
def run(new_password):
luks_partitions = json.load(open(CALAMARES_LUKS_PARTITION_FILE, 'r'))
luks_root_device = luks_partitions.get('rootDevice')
additional_luks_devices = luks_partitions.get('additionalDevices', [])
if not new_password:
raise Exception("New disk password is empty")
if not luks_root_device:
raise Exception("No LUKS root device set in encrypted_partitions.json")
# move old keyfile out of the way
os.rename(KEYFILE, KEYFILE_OLD)
# Generate random keyfile
out, err, ret = run_command(['dd',
'bs=512',
'count=4',
'if=/dev/urandom',
'of=/crypto_keyfile.bin'])
if ret != 0:
raise Exception("Unable to create new crypto_keyfile.bin: {} - {}".format(out, err))
# make a list of all partitions we deal with
partitions = additional_luks_devices.copy()
partitions.insert(0, luks_root_device)
for partition in partitions:
out, err, ret = run_command(['cryptsetup',
'luksAddKey',
partition['device'],
KEYFILE,
'--key-file', KEYFILE_OLD])
if ret != 0:
raise Exception("Unable to add key file: {} - {}".format(out, err))
out, err, ret = run_command(['cryptsetup',
'luksRemoveKey',
partition['device'],
KEYFILE_OLD])
if ret != 0:
raise Exception("Unable to remove old key file: {} - {}".format(out, err))
# only add a real password to the root partition.
# once that is unlocked, the system has access to the keyfile and can automatically
# decrypt all other partitions
if partition['device'] == luks_root_device['device']:
out, err, ret = run_command(['cryptsetup',
'luksAddKey',
partition['device'],
'--key-file', KEYFILE,
'-q'],
input=new_password)
if ret != 0:
raise Exception("Unable to add key: {} - {}".format(out, err))
out, err, ret = run_command(['chmod',
'g-rwx,o-rwx',
KEYFILE])
if ret != 0:
raise Exception("Unable to set permissions on key file: {} - {}".format(out, err))
os.remove(KEYFILE_OLD)
os.remove(ENCRYPT_BYPASS_INITRAMFS_HOOK)
os.remove(CALAMARES_LUKS_PARTITION_FILE)
# rewrite crypttab with the new options
with open(CRYPTTAB_FILE, 'w') as crypttab_f:
print(CRYPTTAB_HEADER, file=crypttab_f)
# the root partition is decrypted using a password, not a keyfile
dct = generate_crypttab_line_info(luks_root_device, 'luks', True)
if dct:
print_crypttab_line(dct, file=crypttab_f)
# all other partitions are decrypted using a keyfile
for partition in additional_luks_devices:
dct = generate_crypttab_line_info(partition, 'luks,keyscript=/bin/cat')
if dct:
print_crypttab_line(dct, file=crypttab_f)
# update initramfs to make changes permanent
os.system('update-initramfs -u')
def main():
parser = argparse.ArgumentParser(description="Set a new disk password, replacing existing ones")
parser.add_argument('-p', '--password', type=str, required=True)
args = parser.parse_args()
if not os.path.isfile(ENCRYPT_BYPASS_INITRAMFS_HOOK) or not os.path.isfile(CALAMARES_LUKS_PARTITION_FILE):
print('Encrypt bypass initramfs hook does not exist, script will not do anything')
return
run(args.password)
if __name__ == '__main__':
main()
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
from subprocess import call
def install_locale(locale):
lgen = []
# toggle the selected locale in the locale.gen list
with open('/etc/locale.gen', 'r') as lf:
lgen = lf.read().split('\n')
for i in range(0, len(lgen)):
parts = lgen[i].split(' ')
if len(parts) != 3:
if len(parts) == 2:
if parts[0].startswith('en_US') or parts[0].startswith('en_DK'):
# ignore default locale
continue
lgen[i] = '# ' + lgen[i]
continue
if parts[1] == locale:
lgen[i] = ' '.join(parts[1:])
with open('/etc/locale.gen', 'w') as lf:
lf.write('\n'.join(lgen))
# run locale-gen to actually activate the changes
call(['locale-gen'])
return 0
if __name__ == '__main__':
if len(sys.argv) != 2:
raise Exception('Invalid number of arguments passed.')
r = install_locale(sys.argv[1])
sys.exit(r)
[Allow the gnome-initial-setup user to mount disks, set the locale, keyboard, date/time, control the network and create users without prompting]
Identity=unix-user:gnome-initial-setup
Action=org.freedesktop.policykit.exec;org.freedesktop.udisks2.filesystem-mount-system;org.freedesktop.hostname1.*;org.freedesktop.NetworkManager.*;org.freedesktop.locale1.*;org.freedesktop.accounts.*;org.freedesktop.timedate1.*;org.freedesktop.realmd.*;org.freedesktop.RealtimeKit1.*
ResultAny=no
ResultInactive=no
ResultActive=yes
debian/extra/cryptsetup-helper.py /usr/lib/gnome-initial-setup/
debian/extra/install-locale.py /usr/lib/gnome-initial-setup/
debian/gnome-initial-setup.pkla /var/lib/polkit-1/localauthority/10-vendor.d/
usr/share/gdm/greeter/applications/gnome-initial-setup.desktop usr/share/applications/gnome-initial-setup.desktop
Description: Set default GOA providers for PureOS
Set a few Online Account providers that fit better with
PureOS goals than the default ones.
Author: Matthias Klumpp <matthias.klumpp@puri.sm>
Last-Update: 2018-02-28
--- a/gnome-initial-setup/pages/goa/gis-goa-page.c
+++ b/gnome-initial-setup/pages/goa/gis-goa-page.c