Compare commits

...

3 Commits

Author SHA1 Message Date
Adriaan de Groot
ff7ceb2e2b [fstab] Replace two-step attribute-setting with one step 2022-05-24 15:56:34 +02:00
Adriaan de Groot
cada0f2547 Changes: pre-release housekeeping 2022-05-24 15:25:31 +02:00
Adriaan de Groot
f4e5e08aa8 [fstab] Be more careful in setting up btrfs swap
- do not use subprocess module in Python bits,
- do +C (no-CoW) after turning compression off
2022-05-24 15:18:50 +02:00
3 changed files with 11 additions and 8 deletions

View File

@@ -8,6 +8,14 @@ contributors are listed. Note that Calamares does not have a historical
changelog -- this log starts with version 3.2.0. The release notes on the
website will have to do for older versions.
# 3.2.58.2 (2022-05-24)
This is a extra-quick release for an issue that shows up when using a
swap **file** on a btrfs filesystem; the installation would fail with
a Python error, raised from btrfs-progs. Reported by Evan James, Erik
Dubois, TechXero.
# 3.2.58.1 (2022-05-20)
This is a hot-fix release for a regression in the *partition* module where

View File

@@ -41,7 +41,7 @@
# TODO:3.3: Require CMake 3.12
cmake_minimum_required( VERSION 3.3 FATAL_ERROR )
project( CALAMARES
VERSION 3.2.58.1
VERSION 3.2.58.2
LANGUAGES C CXX
)

View File

@@ -173,7 +173,6 @@ class FstabGenerator(object):
for p in self.partitions]):
password = "none"
crypttab_options = ""
return dict(
name=mapper_name,
@@ -342,10 +341,7 @@ def create_swapfile(root_mount_point, root_btrfs):
swapfile_path = os.path.join(root_mount_point, "swap/swapfile")
with open(swapfile_path, "wb") as f:
pass
o = subprocess.check_output(["chattr", "+C", swapfile_path])
libcalamares.utils.debug("swapfile attributes: {!s}".format(o))
o = subprocess.check_output(["btrfs", "property", "set", swapfile_path, "compression", "none"])
libcalamares.utils.debug("swapfile compression: {!s}".format(o))
libcalamares.utils.host_env_process_output(["chattr", "+C", "+m", swapfile_path]) # No Copy-on-Write, no compression
else:
swapfile_path = os.path.join(root_mount_point, "swapfile")
with open(swapfile_path, "wb") as f:
@@ -363,8 +359,7 @@ def create_swapfile(root_mount_point, root_btrfs):
libcalamares.job.setprogress(0.2 + 0.3 * ( total / desired_size ) )
total += chunk
os.chmod(swapfile_path, 0o600)
o = subprocess.check_output(["mkswap", swapfile_path])
libcalamares.utils.debug("swapfile mkswap: {!s}".format(o))
libcalamares.utils.host_env_process_output(["mkswap", swapfile_path])
libcalamares.job.setprogress(0.5)