aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiacoLenzo21092021-02-25 15:36:50 +0100
committerGiacoLenzo21092021-02-25 15:36:50 +0100
commit2482f972e9cbf2e5c4e1104f88f4d3436f121b7d (patch)
tree22e51b5756edcf82b9c9cac7c52de9019615d657
downloadaur-2482f972e9cbf2e5c4e1104f88f4d3436f121b7d.tar.gz
Upload
-rw-r--r--.SRCINFO47
-rw-r--r--PKGBUILD77
-rw-r--r--README.md3
-rw-r--r--croco-btrfs.patch303
-rw-r--r--croco-fswhitelist.patch88
5 files changed, 518 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9641ab0f3450
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,47 @@
+pkgbase = calamares-croco-git
+ pkgdesc = Distribution-independent installer framework (patched croco version)
+ pkgver = 3.2.36.r8590.b8a9c4c3b
+ pkgrel = 1
+ url = https://github.com/calamares/calamares
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ makedepends = extra-cmake-modules
+ makedepends = qt5-tools
+ makedepends = qt5-translations
+ makedepends = git
+ makedepends = boost
+ depends = kconfig
+ depends = kcoreaddons
+ depends = kiconthemes
+ depends = ki18n
+ depends = kio
+ depends = solid
+ depends = yaml-cpp
+ depends = kpmcore>=4.1.0
+ depends = mkinitcpio-openswap
+ depends = boost-libs
+ depends = ckbcomp
+ depends = hwinfo
+ depends = qt5-svg
+ depends = polkit-qt5
+ depends = gtk-update-icon-cache
+ depends = plasma-framework
+ depends = qt5-xmlpatterns
+ depends = squashfs-tools
+ depends = libpwquality
+ depends = appstream-qt
+ provides = calamares
+ provides = calamares-dev
+ conflicts = calamares
+ conflicts = calamares-dev
+ replaces = calamares-dev
+ source = git+https://github.com/calamares/calamares.git
+ source = croco-fswhitelist.patch
+ source = croco-btrfs.patch
+ sha256sums = SKIP
+ sha256sums = dfe2aeb4c8efc887127a4683b01dc677a3906ca968dec4e4b74bdcbf6ac4b948
+ sha256sums = 39a5f6c79d6c70442e7a289cdc0d3090c2009fe518edecccdd53c0fdeb6fb8e4
+
+pkgname = calamares-croco-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8ac50f061aa9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,77 @@
+# Manitainer: GiacoLenzo2109 <GiacoLenzo2109@gmail.com>
+# Contributor: Philip Müller <philm[at]manjaro[dog]org>
+
+pkgname=calamares-croco-git
+pkgver=3.2.36.r8590.b8a9c4c3b
+pkgrel=1
+pkgdesc='Distribution-independent installer framework (patched croco version)'
+arch=('i686' 'x86_64')
+license=(GPL)
+url="https://github.com/calamares/calamares"
+license=('LGPL')
+conflicts=('calamares' 'calamares-dev')
+provides=('calamares' 'calamares-dev')
+replaces=('calamares-dev')
+depends=('kconfig' 'kcoreaddons' 'kiconthemes' 'ki18n' 'kio' 'solid' 'yaml-cpp' 'kpmcore>=4.1.0' 'mkinitcpio-openswap'
+ 'boost-libs' 'ckbcomp' 'hwinfo' 'qt5-svg' 'polkit-qt5' 'gtk-update-icon-cache' 'plasma-framework'
+ 'qt5-xmlpatterns' 'squashfs-tools' 'libpwquality' 'appstream-qt') # 'pythonqt>=3.2')
+makedepends=('extra-cmake-modules' 'qt5-tools' 'qt5-translations' 'git' 'boost')
+# backup=('usr/share/calamares/modules/bootloader.conf'
+# 'usr/share/calamares/modules/displaymanager.conf'
+# 'usr/share/calamares/modules/initcpio.conf'
+# 'usr/share/calamares/modules/unpackfs.conf')
+
+source+=(git+https://github.com/calamares/calamares.git croco-fswhitelist.patch croco-btrfs.patch)
+sha256sums=('SKIP'
+ 'dfe2aeb4c8efc887127a4683b01dc677a3906ca968dec4e4b74bdcbf6ac4b948'
+ '39a5f6c79d6c70442e7a289cdc0d3090c2009fe518edecccdd53c0fdeb6fb8e4')
+
+pkgver() {
+ cd ${srcdir}/calamares
+ _ver="$(cat CMakeLists.txt | grep -m3 -e " VERSION" | grep -o "[[:digit:]]*" | xargs | sed s'/ /./g')"
+ _git=".r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
+ printf '%s%s' "${_ver}" "${_git}"
+ sed -i -e "s|\${CALAMARES_VERSION_MAJOR}.\${CALAMARES_VERSION_MINOR}.\${CALAMARES_VERSION_PATCH}|${_ver}${_git}|g" CMakeLists.txt
+ sed -i -e "s|CALAMARES_VERSION_RC 1|CALAMARES_VERSION_RC 0|g" CMakeLists.txt
+}
+
+prepare() {
+ cd ${srcdir}/calamares
+ # Check out latest tag
+ git reset --hard "$(git describe --abbrev=0)"
+ sed -i -e 's/"Install configuration files" OFF/"Install configuration files" ON/' CMakeLists.txt
+
+ # patches here
+ patch -p1 -N -i "$srcdir/croco-fswhitelist.patch"
+ patch -p1 -N -i "$srcdir/croco-btrfs.patch"
+}
+
+
+build() {
+ cd ${srcdir}/calamares
+
+ mkdir -p build
+ cd build
+ cmake .. \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DWITH_PYTHONQT:BOOL=ON \
+ -DBoost_NO_BOOST_CMAKE=ON \
+ -DSKIP_MODULES="webview interactiveterminal initramfs \
+ initramfscfg dracut dracutlukscfg \
+ dummyprocess dummypython dummycpp \
+ dummypythonqt services-openrc"
+ make
+}
+
+package() {
+ cd ${srcdir}/calamares/build
+ make DESTDIR="$pkgdir" install
+
+ # rename services-systemd back to services
+ mv "$pkgdir/usr/lib/calamares/modules/services-systemd" "$pkgdir/usr/lib/calamares/modules/services"
+ mv "$pkgdir/usr/share/calamares/modules/services-systemd.conf" "$pkgdir/usr/share/calamares/modules/services.conf"
+ sed -i -e 's/-systemd//' "$pkgdir/usr/lib/calamares/modules/services/module.desc"
+ sed -i -e 's/-systemd//' "$pkgdir/usr/share/calamares/settings.conf"
+}
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..52d2baac88ee
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# calamares-git
+
+PKGBUILD for calamares-git
diff --git a/croco-btrfs.patch b/croco-btrfs.patch
new file mode 100644
index 000000000000..c5637f3862cf
--- /dev/null
+++ b/croco-btrfs.patch
@@ -0,0 +1,303 @@
+From a62f0179e61fc5ca3b9c47f7482ce38a85572bdb Mon Sep 17 00:00:00 2001
+From: TotallyNotElite <totallynotelite@gmail.com>
+Date: Mon, 18 Jan 2021 22:56:27 +0100
+Subject: [PATCH] Croco BTRFS patches
+
+---
+ src/modules/fstab/main.py | 38 +++++++
+ src/modules/grubcfg/main.py | 2 +-
+ src/modules/initcpiocfg/main.py | 2 +-
+ src/modules/mount/main.py | 178 ++++++++++++++++++++++++++++++--
+ 4 files changed, 210 insertions(+), 10 deletions(-)
+
+diff --git a/src/modules/fstab/main.py b/src/modules/fstab/main.py
+index 6977ccad1..63352128a 100644
+--- a/src/modules/fstab/main.py
++++ b/src/modules/fstab/main.py
+@@ -206,6 +206,41 @@ class FstabGenerator(object):
+ dct = self.generate_fstab_line_info(home_entry)
+ if dct:
+ self.print_fstab_line(dct, file=fstab_file)
++ elif line.endswith(b'path @root'):
++ rootuser_entry = partition
++ rootuser_entry["mountPoint"] = "/root"
++ rootuser_entry["subvol"] = "@root"
++ dct = self.generate_fstab_line_info(rootuser_entry)
++ if dct:
++ self.print_fstab_line(dct, file=fstab_file)
++ elif line.endswith(b'path @srv'):
++ srv_entry = partition
++ srv_entry["mountPoint"] = "/srv"
++ srv_entry["subvol"] = "@srv"
++ dct = self.generate_fstab_line_info(srv_entry)
++ if dct:
++ self.print_fstab_line(dct, file=fstab_file)
++ elif line.endswith(b'path @cache'):
++ cache_entry = partition
++ cache_entry["mountPoint"] = "/var/cache"
++ cache_entry["subvol"] = "@cache"
++ dct = self.generate_fstab_line_info(cache_entry)
++ if dct:
++ self.print_fstab_line(dct, file=fstab_file)
++ elif line.endswith(b'path @log'):
++ log_entry = partition
++ log_entry["mountPoint"] = "/var/log"
++ log_entry["subvol"] = "@log"
++ dct = self.generate_fstab_line_info(log_entry)
++ if dct:
++ self.print_fstab_line(dct, file=fstab_file)
++ elif line.endswith(b'path @tmp'):
++ tmp_entry = partition
++ tmp_entry["mountPoint"] = "/var/tmp"
++ tmp_entry["subvol"] = "@tmp"
++ dct = self.generate_fstab_line_info(tmp_entry)
++ if dct:
++ self.print_fstab_line(dct, file=fstab_file)
+ elif line.endswith(b'path @swap'):
+ swap_part_entry = partition
+ swap_part_entry["mountPoint"] = "/swap"
+@@ -326,6 +361,9 @@ def create_swapfile(root_mount_point, root_btrfs):
+ The swapfile-creation covers progress from 0.2 to 0.5
+ """
+ libcalamares.job.setprogress(0.2)
++ swapfile_path = os.path.join(root_mount_point, "var", "cache", "swapfile")
++ with open(swapfile_path, "wb") as f:
++ pass
+ if root_btrfs:
+ # btrfs swapfiles must reside on a subvolume that is not snapshotted to prevent file system corruption
+ swapfile_path = os.path.join(root_mount_point, "swap/swapfile")
+diff --git a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py
+index 9e9615a0c..cc017d5a0 100644
+--- a/src/modules/grubcfg/main.py
++++ b/src/modules/grubcfg/main.py
+@@ -98,7 +98,7 @@ def modify_grub_default(partitions, root_mount_point, distributor):
+ break
+
+ if have_plymouth:
+- use_splash = "splash"
++ use_splash = "splash rd.udev.log_priority=3 vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1"
+
+ cryptdevice_params = []
+
+diff --git a/src/modules/initcpiocfg/main.py b/src/modules/initcpiocfg/main.py
+index cdfeadd0f..ca7f96914 100644
+--- a/src/modules/initcpiocfg/main.py
++++ b/src/modules/initcpiocfg/main.py
+@@ -116,7 +116,7 @@ def modify_mkinitcpio_conf(partitions, root_mount_point):
+ btrfs = ""
+ lvm2 = ""
+ hooks = ["base", "udev", "autodetect", "modconf", "block", "keyboard",
+- "keymap"]
++ "keymap", "consolefont"]
+ modules = []
+ files = []
+ encrypt_hook = False
+diff --git a/src/modules/mount/main.py b/src/modules/mount/main.py
+index 3982176df..27b9f79df 100644
+--- a/src/modules/mount/main.py
++++ b/src/modules/mount/main.py
+@@ -82,12 +82,52 @@ def mount_partition(root_mount_point, partition, partitions):
+ # Finally we remount all of the above on the correct paths.
+ if fstype == "btrfs" and partition["mountPoint"] == '/':
+ has_home_mount_point = False
++ has_rootuser_mount_point = False
++ has_srv_mount_point = False
++ has_cache_mount_point = False
++ has_log_mount_point = False
++ has_tmp_mount_point = False
+ for p in partitions:
+ if "mountPoint" not in p or not p["mountPoint"]:
+ continue
+ if p["mountPoint"] == "/home":
+ has_home_mount_point = True
+ break
++
++ for p in partitions:
++ if "mountPoint" not in p or not p["mountPoint"]:
++ continue
++ if p["mountPoint"] == "/root":
++ has_rootuser_mount_point = True
++ break
++
++ for p in partitions:
++ if "mountPoint" not in p or not p["mountPoint"]:
++ continue
++ if p["mountPoint"] == "/srv":
++ has_srv_mount_point = True
++ break
++
++ for p in partitions:
++ if "mountPoint" not in p or not p["mountPoint"]:
++ continue
++ if p["mountPoint"] == "/var/cache":
++ has_cache_mount_point = True
++ break
++
++ for p in partitions:
++ if "mountPoint" not in p or not p["mountPoint"]:
++ continue
++ if p["mountPoint"] == "/var/log":
++ has_log_mount_point = True
++ break
++
++ for p in partitions:
++ if "mountPoint" not in p or not p["mountPoint"]:
++ continue
++ if p["mountPoint"] == "/var/tmp":
++ has_tmp_mount_point = True
++ break
+ needs_swap_subvolume = False
+ swap_choice = global_storage.value( "partitionChoices" )
+ if swap_choice:
+@@ -105,18 +145,140 @@ def mount_partition(root_mount_point, partition, partitions):
+ subprocess.check_call(['btrfs', 'subvolume', 'create',
+ root_mount_point + '/@swap'])
+
+- subprocess.check_call(["umount", "-v", root_mount_point])
++ if not has_rootuser_mount_point:
++ subprocess.check_call(['btrfs', 'subvolume', 'create',
++ root_mount_point + '/@root'])
++
++ if not has_srv_mount_point:
++ subprocess.check_call(['btrfs', 'subvolume', 'create',
++ root_mount_point + '/@srv'])
++
++ if not has_cache_mount_point:
++ subprocess.check_call(['btrfs', 'subvolume', 'create',
++ root_mount_point + '/@cache'])
++
++ if not has_log_mount_point:
++ subprocess.check_call(['btrfs', 'subvolume', 'create',
++ root_mount_point + '/@log'])
++
++ if not has_tmp_mount_point:
++ subprocess.check_call(['btrfs', 'subvolume', 'create',
++ root_mount_point + '/@tmp'])
+
+- device = partition["device"]
++ subprocess.check_call(["umount", "-v", root_mount_point])
+
+ if "luksMapperName" in partition:
+- device = os.path.join("/dev/mapper", partition["luksMapperName"])
++ libcalamares.utils.mount(
++ "/dev/mapper/{!s}".format(partition["luksMapperName"]),
++ mount_point,
++ fstype,
++ ",".join(
++ ["subvol=@", partition.get("options", "")]),
++ )
++ if not has_home_mount_point:
++ libcalamares.utils.mount(
++ "/dev/mapper/{!s}".format(partition["luksMapperName"]),
++ root_mount_point + "/home",
++ fstype,
++ ",".join(
++ ["subvol=@home", partition.get("options", "")]),
++ )
++ if not has_rootuser_mount_point:
++ libcalamares.utils.mount(
++ "/dev/mapper/{!s}".format(partition["luksMapperName"]),
++ root_mount_point + "/root",
++ fstype,
++ ",".join(
++ ["subvol=@root", partition.get("options", "")]),
++ )
++ if not has_srv_mount_point:
++ libcalamares.utils.mount(
++ "/dev/mapper/{!s}".format(partition["luksMapperName"]),
++ root_mount_point + "/srv",
++ fstype,
++ ",".join(
++ ["subvol=@srv", partition.get("options", "")]),
++ )
++ if not has_cache_mount_point:
++ libcalamares.utils.mount(
++ "/dev/mapper/{!s}".format(partition["luksMapperName"]),
++ root_mount_point + "/var/cache",
++ fstype,
++ ",".join(
++ ["subvol=@cache", partition.get("options", "")]),
++ )
++ if not has_log_mount_point:
++ libcalamares.utils.mount(
++ "/dev/mapper/{!s}".format(partition["luksMapperName"]),
++ root_mount_point + "/var/log",
++ fstype,
++ ",".join(
++ ["subvol=@log", partition.get("options", "")]),
++ )
++ if not has_tmp_mount_point:
++ libcalamares.utils.mount(
++ "/dev/mapper/{!s}".format(partition["luksMapperName"]),
++ root_mount_point + "/var/tmp",
++ fstype,
++ ",".join(
++ ["subvol=@tmp", partition.get("options", "")]),
++ )
++ else:
++ libcalamares.utils.mount(
++ partition["device"],
++ mount_point,
++ fstype,
++ ",".join(["subvol=@", partition.get("options", "")]),
++ )
++ if not has_home_mount_point:
++ libcalamares.utils.mount(
++ partition["device"],
++ root_mount_point + "/home",
++ fstype,
++ ",".join(
++ ["subvol=@home", partition.get("options", "")]),
++ )
++ if not has_rootuser_mount_point:
++ libcalamares.utils.mount(
++ partition["device"],
++ root_mount_point + "/root",
++ fstype,
++ ",".join(
++ ["subvol=@root", partition.get("options", "")]),
++ )
++ if not has_srv_mount_point:
++ libcalamares.utils.mount(
++ partition["device"],
++ root_mount_point + "/srv",
++ fstype,
++ ",".join(
++ ["subvol=@srv", partition.get("options", "")]),
++ )
++ if not has_cache_mount_point:
++ libcalamares.utils.mount(
++ partition["device"],
++ root_mount_point + "/var/cache",
++ fstype,
++ ",".join(
++ ["subvol=@cache", partition.get("options", "")]),
++ )
++ if not has_log_mount_point:
++ libcalamares.utils.mount(
++ partition["device"],
++ root_mount_point + "/var/log",
++ fstype,
++ ",".join(
++ ["subvol=@log", partition.get("options", "")]),
++ )
++ if not has_tmp_mount_point:
++ libcalamares.utils.mount(
++ partition["device"],
++ root_mount_point + "/var/tmp",
++ fstype,
++ ",".join(
++ ["subvol=@tmp", partition.get("options", "")]),
++ )
+
+- if libcalamares.utils.mount(device,
+- mount_point,
+- fstype,
+- ",".join(["subvol=@", partition.get("options", "")])) != 0:
+- libcalamares.utils.warning("Cannot mount {}".format(device))
+
+ if not has_home_mount_point:
+ if libcalamares.utils.mount(device,
+--
+2.30.0
+
diff --git a/croco-fswhitelist.patch b/croco-fswhitelist.patch
new file mode 100644
index 000000000000..df2d921ade6d
--- /dev/null
+++ b/croco-fswhitelist.patch
@@ -0,0 +1,88 @@
+From 12c9ef699641c4ead59e92b4a521acf7e835ab59 Mon Sep 17 00:00:00 2001
+From: TotallyNotElite <totallynotelite@gmail.com>
+Date: Mon, 18 Jan 2021 23:34:09 +0100
+Subject: [PATCH] Croco hardcoded FS whitelist
+
+---
+ src/libcalamares/partition/FileSystem.cpp | 9 +++++++++
+ src/libcalamares/partition/FileSystem.h | 2 ++
+ src/modules/partition/gui/CreatePartitionDialog.cpp | 5 +++--
+ .../partition/gui/EditExistingPartitionDialog.cpp | 5 +++--
+ 4 files changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/src/libcalamares/partition/FileSystem.cpp b/src/libcalamares/partition/FileSystem.cpp
+index ad4df31ed..526b6a8ea 100644
+--- a/src/libcalamares/partition/FileSystem.cpp
++++ b/src/libcalamares/partition/FileSystem.cpp
+@@ -13,12 +13,21 @@
+ #include "FileSystem.h"
+
+ #include <QObject>
++#include <QSet>
+
+ namespace CalamaresUtils
+ {
+ namespace Partition
+ {
+
++QSet< FileSystem::Type > croco_allowed_fs( { FileSystem::Btrfs,
++ FileSystem::Fat32,
++ FileSystem::LinuxSwap,
++ FileSystem::Luks,
++ FileSystem::Luks2,
++ FileSystem::Unformatted,
++ FileSystem::Lvm2_PV } );
++
+ QString
+ prettyNameForFileSystemType( FileSystem::Type t )
+ {
+diff --git a/src/libcalamares/partition/FileSystem.h b/src/libcalamares/partition/FileSystem.h
+index 6696f0df9..e72db07ae 100644
+--- a/src/libcalamares/partition/FileSystem.h
++++ b/src/libcalamares/partition/FileSystem.h
+@@ -26,6 +26,8 @@ namespace CalamaresUtils
+ {
+ namespace Partition
+ {
++extern QSet< FileSystem::Type > croco_allowed_fs;
++
+ QString DLLEXPORT prettyNameForFileSystemType( FileSystem::Type t );
+
+ /** @brief Returns a machine-readable identifier for the filesystem type
+diff --git a/src/modules/partition/gui/CreatePartitionDialog.cpp b/src/modules/partition/gui/CreatePartitionDialog.cpp
+index 3b51010b8..054bd7847 100644
+--- a/src/modules/partition/gui/CreatePartitionDialog.cpp
++++ b/src/modules/partition/gui/CreatePartitionDialog.cpp
+@@ -106,9 +106,10 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device,
+ int defaultFsIndex = -1;
+ int fsCounter = 0;
+ QStringList fsNames;
+- for ( auto fs : FileSystemFactory::map() )
++ for ( auto allowed_fs : CalamaresUtils::Partition::croco_allowed_fs )
+ {
+- if ( fs->supportCreate() != FileSystem::cmdSupportNone && fs->type() != FileSystem::Extended )
++ auto fs = FileSystemFactory::map()[ allowed_fs ];
++ if ( fs->supportCreate() != FileSystem::cmdSupportNone )
+ {
+ fsNames << userVisibleFS( fs ); // This is put into the combobox
+ if ( fs->type() == defaultFSType )
+diff --git a/src/modules/partition/gui/EditExistingPartitionDialog.cpp b/src/modules/partition/gui/EditExistingPartitionDialog.cpp
+index 3de6e0c4c..577607549 100644
+--- a/src/modules/partition/gui/EditExistingPartitionDialog.cpp
++++ b/src/modules/partition/gui/EditExistingPartitionDialog.cpp
+@@ -83,9 +83,10 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device,
+
+ // File system
+ QStringList fsNames;
+- for ( auto fs : FileSystemFactory::map() )
++ for ( auto allowed_fs : CalamaresUtils::Partition::croco_allowed_fs )
+ {
+- if ( fs->supportCreate() != FileSystem::cmdSupportNone && fs->type() != FileSystem::Extended )
++ auto fs = FileSystemFactory::map()[ allowed_fs ];
++ if ( fs->supportCreate() != FileSystem::cmdSupportNone )
+ {
+ fsNames << userVisibleFS( fs ); // For the combo box
+ }
+--
+2.30.0
+