update to 1.1.2 [release 1.1.2-1mamba;Mon Aug 10 2015]

This commit is contained in:
Silvan Calarco 2024-01-05 21:03:41 +01:00
parent 9d4942fdc4
commit 06a88c4146
9 changed files with 189 additions and 181 deletions

View File

@ -1,41 +0,0 @@
diff -Nru calamares-1.0.1.orig/src/modules/packages/main.py calamares-1.0.1/src/modules/packages/main.py
--- calamares-1.0.1.orig/src/modules/packages/main.py 2015-02-03 22:15:35.000000000 +0100
+++ calamares-1.0.1/src/modules/packages/main.py 2015-02-19 14:18:41.072354821 +0100
@@ -40,6 +40,8 @@
check_chroot_call(["apt-get", "-q", "-y", "install"] + pkgs)
elif self.backend == "pacman":
check_chroot_call(["pacman", "-Sy", "--noconfirm"] + pkgs)
+ elif self.backend == "smart":
+ check_chroot_call(["smart", "install", "-y"] + pkgs)
def remove(self, pkgs):
if self.backend == "packagekit":
@@ -59,6 +61,8 @@
check_chroot_call(["apt-get", "--purge", "-q", "-y", "autoremove"])
elif self.backend == "pacman":
check_chroot_call(["pacman", "-Rs", "--noconfirm"] + pkgs)
+ elif self.backend == "smart":
+ check_chroot_call(["smart", "remove", "-y"] + pkgs)
def run_operations(pkgman, entry):
for key in entry.keys():
@@ -69,7 +73,7 @@
def run():
backend = libcalamares.job.configuration.get("backend")
- if backend not in ("packagekit", "zypp", "yum", "dnf", "urpmi", "apt", "pacman"):
+ if backend not in ("packagekit", "zypp", "yum", "dnf", "urpmi", "apt", "pacman", "smart"):
return ("Bad backend", "backend=\"{}\"".format(backend))
pkgman = PackageManager(backend)
diff -Nru calamares-1.0.1.orig/src/modules/packages/packages.conf calamares-1.0.1/src/modules/packages/packages.conf
--- calamares-1.0.1.orig/src/modules/packages/packages.conf 2015-02-03 22:15:35.000000000 +0100
+++ calamares-1.0.1/src/modules/packages/packages.conf 2015-02-19 14:18:58.076363601 +0100
@@ -8,6 +8,7 @@
# - urpmi - Mandriva package manager
# - apt - APT frontend for DEB and RPM
# - pacman - Pacman
+# - smart - Smart package manager
#
backend: packagekit
#

View File

@ -1,31 +0,0 @@
--- calamares-1.0.1/src/modules/displaymanager/main.py.orig 2015-02-03 22:15:35.000000000 +0100
+++ calamares-1.0.1/src/modules/displaymanager/main.py 2015-02-20 12:52:59.619944277 +0100
@@ -30,7 +30,7 @@
desktop_environments = [
DesktopEnvironment('/usr/bin/startkde', 'plasma'), # KDE Plasma 5
- DesktopEnvironment('/usr/bin/startkde', 'kde-plasma'), # KDE Plasma 4
+ DesktopEnvironment('/opt/kde/bin/startkde', 'kde-plasma'), # KDE Plasma 4
DesktopEnvironment('/usr/bin/gnome-session', 'gnome'),
DesktopEnvironment('/usr/bin/startxfce4', 'xfce'),
DesktopEnvironment('/usr/bin/cinnamon-session', 'cinnamon-session'),
@@ -50,7 +50,9 @@
return None
def have_dm(dm_name, root_mount_point):
- return os.path.exists("%s/usr/bin/%s" % (root_mount_point, dm_name)) or os.path.exists("%s/usr/sbin/%s" % (root_mount_point, dm_name))
+ return os.path.exists("%s/usr/bin/%s" % (root_mount_point, dm_name)) \
+ or os.path.exists("%s/usr/sbin/%s" % (root_mount_point, dm_name)) \
+ or os.path.exists("%s/opt/kde/bin/%s" % (root_mount_point, dm_name))
def set_autologin(username, displaymanagers, default_desktop_environment, root_mount_point):
""" Enables automatic login for the installed desktop managers """
@@ -104,7 +106,7 @@
if "kdm" in displaymanagers:
# Systems with KDM as Desktop Manager
kdm_conf_path = os.path.join(
- root_mount_point, "usr/share/config/kdm/kdmrc")
+ root_mount_point, "opt/kde/share/config/kdm/kdmrc")
text = []
if os.path.exists(kdm_conf_path):
with open(kdm_conf_path, 'r') as kdm_conf:

View File

@ -1,11 +0,0 @@
--- calamares-1.0.1/src/modules/dracut/main.py.orig 2015-02-20 13:25:10.608600896 +0100
+++ calamares-1.0.1/src/modules/dracut/main.py 2015-02-20 13:25:20.870604022 +0100
@@ -22,7 +22,7 @@
from libcalamares.utils import chroot_call
def run_dracut():
- return chroot_call(['dracut', '-f'])
+ return chroot_call(['dracut', '-f', '-H'])
def run():
returnCode = run_dracut()

View File

@ -1,82 +0,0 @@
--- calamares-1.0.1/src/modules/partition/gui/EraseDiskPage.cpp.orig 2015-05-21 12:53:55.003623191 +0200
+++ calamares-1.0.1/src/modules/partition/gui/EraseDiskPage.cpp 2015-05-21 15:26:40.937147517 +0200
@@ -36,6 +36,7 @@
#include <QFormLayout>
#include <QListView>
#include <QLabel>
+#include <QProcess>
EraseDiskPage::EraseDiskPage( QWidget* parent )
: QWidget( parent )
@@ -170,18 +171,70 @@
m_core->createPartitionTable( dev, PartitionTable::msdos );
}
+#define GiB * 1024ul * 1024ul * 1024ul
+
+ qint64 total_size = (dev->totalSectors() - first_free_sector) * dev->logicalSectorSize();
+ qint64 root_size = 30 GiB;
+
+ QProcess p;
+ p.start( "awk", { "/MemTotal/ {print $2}", "/proc/meminfo" } );
+ p.waitForFinished();
+ QString memoryLine = p.readAllStandardOutput().simplified();
+ // Set automatic swap size to RAM * 1.1
+ qint64 swap_size = memoryLine.toLongLong() * 1152ul;
+ // No swap on small disks
+ if (total_size - swap_size < 30 GiB) swap_size = 0;
+
+ // home partition if big enough disk
+ qint64 home_size = total_size - swap_size - 30 GiB;
+ if (home_size < 30 GiB) {
+ home_size = 0;
+ root_size = total_size - swap_size;
+ }
+
Partition* rootPartition = PMUtils::createNewPartition(
dev->partitionTable(),
*dev,
PartitionRole( PartitionRole::Primary ),
FileSystem::Ext4,
first_free_sector,
- dev->totalSectors() - 1 //last sector
+ first_free_sector + root_size / dev->logicalSectorSize() - 1
);
PartitionInfo::setMountPoint( rootPartition, "/" );
PartitionInfo::setFormat( rootPartition, true );
m_core->createPartition( dev, rootPartition );
+ first_free_sector = first_free_sector + root_size / dev->logicalSectorSize();
+
+ if (swap_size > 0) {
+ Partition* swapPartition = PMUtils::createNewPartition(
+ dev->partitionTable(),
+ *dev,
+ PartitionRole( PartitionRole::Primary ),
+ FileSystem::LinuxSwap,
+ first_free_sector,
+ first_free_sector + swap_size / dev->logicalSectorSize() - 1
+ );
+ //PartitionInfo::setMountPoint( swapPartition, "" );
+ PartitionInfo::setFormat( swapPartition, true );
+ m_core->createPartition( dev, swapPartition );
+ first_free_sector = first_free_sector + swap_size / dev->logicalSectorSize();
+ }
+
+ if (home_size > 0) {
+ Partition* homePartition = PMUtils::createNewPartition(
+ dev->partitionTable(),
+ *dev,
+ PartitionRole( PartitionRole::Primary ),
+ FileSystem::Ext4,
+ first_free_sector,
+ first_free_sector + home_size / dev->logicalSectorSize() - 1
+ );
+ PartitionInfo::setMountPoint( homePartition, "/home" );
+ PartitionInfo::setFormat( homePartition, true );
+ m_core->createPartition( dev, homePartition );
+ }
+ m_core->setBootLoaderInstallPath( dev->deviceNode() );
{
qDeleteAll( m_previewFrame->children() );

View File

@ -0,0 +1,41 @@
diff -Nru calamares-1.1.2.orig/src/modules/packages/main.py calamares-1.1.2/src/modules/packages/main.py
--- calamares-1.1.2.orig/src/modules/packages/main.py 2015-08-10 16:20:20.000000000 +0200
+++ calamares-1.1.2/src/modules/packages/main.py 2015-08-13 09:08:59.320685283 +0200
@@ -62,6 +62,8 @@
check_chroot_call(["emerge", "-v"] + pkgs)
elif self.backend == "entropy":
check_chroot_call(["equo", "i"] + pkgs)
+ elif self.backend == "smart":
+ check_chroot_call(["smart", "install", "-y"] + pkgs)
def remove(self, pkgs):
""" Removes packages.
@@ -89,6 +91,8 @@
check_chroot_call(["emerge", "-C"] + pkgs)
elif self.backend == "entropy":
check_chroot_call(["equo", "rm"] + pkgs)
+ elif self.backend == "smart":
+ check_chroot_call(["smart", "remove", "-y"] + pkgs)
def run_operations(pkgman, entry):
@@ -114,7 +118,7 @@
"""
backend = libcalamares.job.configuration.get("backend")
- if backend not in ("packagekit", "zypp", "yum", "dnf", "urpmi", "apt", "pacman", "portage", "entropy"):
+ if backend not in ("packagekit", "zypp", "yum", "dnf", "urpmi", "apt", "pacman", "portage", "entropy", "smart"):
return "Bad backend", "backend=\"{}\"".format(backend)
pkgman = PackageManager(backend)
diff -Nru calamares-1.1.2.orig/src/modules/packages/packages.conf calamares-1.1.2/src/modules/packages/packages.conf
--- calamares-1.1.2.orig/src/modules/packages/packages.conf 2015-08-10 16:20:20.000000000 +0200
+++ calamares-1.1.2/src/modules/packages/packages.conf 2015-08-13 09:09:57.105431680 +0200
@@ -10,6 +10,7 @@
# - pacman - Pacman
# - portage - Gentoo package manager
# - entropy - Sabayon package manager
+# - smart - Smart package manage
#
backend: packagekit
#

View File

@ -0,0 +1,30 @@
--- calamares-1.1.2.orig/src/modules/displaymanager/main.py 2015-08-10 16:20:20.000000000 +0200
+++ calamares-1.1.2/src/modules/displaymanager/main.py 2015-08-13 09:15:44.573602915 +0200
@@ -30,7 +30,7 @@
desktop_environments = [
DesktopEnvironment('/usr/bin/startkde', 'plasma'), # KDE Plasma 5
- DesktopEnvironment('/usr/bin/startkde', 'kde-plasma'), # KDE Plasma 4
+ DesktopEnvironment('/opt/kde/bin/startkde', 'kde-plasma'), # KDE Plasma 4
DesktopEnvironment('/usr/bin/gnome-session', 'gnome'),
DesktopEnvironment('/usr/bin/startxfce4', 'xfce'),
DesktopEnvironment('/usr/bin/cinnamon-session-cinnamon', 'cinnamon'),
@@ -72,7 +72,8 @@
"""
return os.path.exists(
"{!s}/usr/bin/{!s}".format(root_mount_point, dm_name)) or os.path.exists(
- "{!s}/usr/sbin/{!s}".format(root_mount_point, dm_name))
+ "{!s}/usr/sbin/{!s}".format(root_mount_point, dm_name)) or os.path.exists(
+ "{!s}/opt/kde/bin/{!s}".format(root_mount_point, dm_name))
def set_autologin(username, displaymanagers, default_desktop_environment, root_mount_point):
@@ -156,7 +157,7 @@
if "kdm" in displaymanagers:
# Systems with KDM as Desktop Manager
- kdm_conf_path = os.path.join(root_mount_point, "usr/share/config/kdm/kdmrc")
+ kdm_conf_path = os.path.join(root_mount_point, "opt/kde/share/config/kdm/kdmrc")
text = []
if os.path.exists(kdm_conf_path):

View File

@ -0,0 +1,11 @@
--- calamares-1.1.2.orig/src/modules/dracut/main.py 2015-08-10 16:20:20.000000000 +0200
+++ calamares-1.1.2/src/modules/dracut/main.py 2015-08-13 09:21:59.439535568 +0200
@@ -28,7 +28,7 @@
:return:
"""
- return chroot_call(['dracut', '-f'])
+ return chroot_call(['dracut', '-f', '-H'])
def run():

View File

@ -0,0 +1,90 @@
--- calamares-1.1.2.orig/src/modules/partition/gui/EraseDiskPage.cpp 2015-08-10 16:20:20.000000000 +0200
+++ calamares-1.1.2/src/modules/partition/gui/EraseDiskPage.cpp 2015-08-13 10:32:06.442017396 +0200
@@ -181,24 +181,35 @@
m_core->createPartitionTable( dev, PartitionTable::msdos );
}
+ qint64 suggestedRootSizeB =
+ ( Calamares::JobQueue::instance()->
+ globalStorage()->
+ value( "requiredStorageGB" ).toDouble() + 0.1 + 20.0 ) GiB;
+
bool shouldCreateSwap = false;
qint64 availableSpaceB = ( dev->totalSectors() - firstFreeSector ) * dev->logicalSectorSize();
qint64 suggestedSwapSizeB = swapSuggestion( availableSpaceB );
- qint64 requiredSpaceB =
- ( Calamares::JobQueue::instance()->
- globalStorage()->
- value( "requiredStorageGB" ).toDouble() + 0.1 + 2.0 ) GiB +
- suggestedSwapSizeB;
+ qint64 requiredSpaceB = suggestedRootSizeB + suggestedSwapSizeB;
// If there is enough room for ESP + root + swap, create swap, otherwise don't.
shouldCreateSwap = availableSpaceB > requiredSpaceB;
- qint64 lastSectorForRoot = dev->totalSectors() - 1; //last sector of the device
- if ( shouldCreateSwap )
- {
- lastSectorForRoot -= suggestedSwapSizeB / dev->logicalSectorSize() + 1;
+ bool shouldCreateHome = false;
+ if ( shouldCreateSwap ) {
+ availableSpaceB -= requiredSpaceB;
+ qint64 suggestedHomeSizeB = 30 GiB;
+ requiredSpaceB += suggestedHomeSizeB;
+
+ // If there is enough room for ESP + root + swap, create swap, otherwise don't.
+ shouldCreateHome = availableSpaceB > requiredSpaceB;
+ if ( !shouldCreateHome ) {
+ suggestedRootSizeB = availableSpaceB - suggestedSwapSizeB;
+ }
+ } else {
+ suggestedRootSizeB = availableSpaceB;
}
+ qint64 lastSectorForRoot = firstFreeSector + suggestedRootSizeB / dev->logicalSectorSize() - 1;
Partition* rootPartition = PMUtils::createNewPartition(
dev->partitionTable(),
*dev,
@@ -210,21 +221,40 @@
PartitionInfo::setFormat( rootPartition, true );
PartitionInfo::setMountPoint( rootPartition, "/" );
m_core->createPartition( dev, rootPartition );
+ firstFreeSector = firstFreeSector + suggestedRootSizeB / dev->logicalSectorSize();
if ( shouldCreateSwap )
{
+ qint64 lastSectorForSwap = firstFreeSector + suggestedSwapSizeB / dev->logicalSectorSize() - 1;
Partition* swapPartition = PMUtils::createNewPartition(
dev->partitionTable(),
*dev,
PartitionRole( PartitionRole::Primary ),
FileSystem::LinuxSwap,
- lastSectorForRoot + 1,
- dev->totalSectors() - 1
+ firstFreeSector,
+ lastSectorForSwap
);
PartitionInfo::setFormat( swapPartition, true );
m_core->createPartition( dev, swapPartition );
+ firstFreeSector = firstFreeSector + suggestedSwapSizeB / dev->logicalSectorSize();
}
+ if ( shouldCreateHome )
+ {
+ Partition* homePartition = PMUtils::createNewPartition(
+ dev->partitionTable(),
+ *dev,
+ PartitionRole( PartitionRole::Primary ),
+ FileSystem::Ext4,
+ firstFreeSector,
+ dev->totalSectors() - 1
+ );
+ PartitionInfo::setFormat( homePartition, true );
+ m_core->createPartition( dev, homePartition );
+ }
+
+ m_core->setBootLoaderInstallPath( dev->deviceNode() );
+
updatePreviews();
m_core->dumpQueue();

View File

@ -1,6 +1,6 @@
Name: calamares Name: calamares
Version: 1.0.1 Version: 1.1.2
Release: 8mamba Release: 1mamba
Summary: Distribution-independent installer framework Summary: Distribution-independent installer framework
Group: Graphical Desktop/Applications/Utilities Group: Graphical Desktop/Applications/Utilities
Vendor: openmamba Vendor: openmamba
@ -10,14 +10,14 @@ URL: https://github.com/calamares/calamares
## GITSOURCE https://github.com/calamares/calamares.git v1.0.1 ## GITSOURCE https://github.com/calamares/calamares.git v1.0.1
Source: https://github.com/calamares/calamares.git/v%{version}/calamares-%{version}.tar.bz2 Source: https://github.com/calamares/calamares.git/v%{version}/calamares-%{version}.tar.bz2
Source1: https://github.com/calamares/partitionmanager.git/calamares/partitionmanager-%{version}.tar.bz2 Source1: https://github.com/calamares/partitionmanager.git/calamares/partitionmanager-%{version}.tar.bz2
Patch0: calamares-1.0.1-add_smart_package_manager_support.patch Patch0: calamares-1.1.2-add_smart_package_manager_support.patch
Patch1: calamares-1.0.1-plymouth_path.patch Patch1: calamares-1.0.1-plymouth_path.patch
Patch2: calamares-1.0.1-displaymanager_fix_paths_openmamba.patch Patch2: calamares-1.1.2-displaymanager_fix_paths_openmamba.patch
Patch3: calamares-1.0.1-fix_reboot.patch Patch3: calamares-1.0.1-fix_reboot.patch
Patch4: calamares-1.0.1-dracut_hostonly.patch Patch4: calamares-1.1.2-dracut_hostonly.patch
Patch5: calamares-1.0.1-locale_use_LANG.patch Patch5: calamares-1.0.1-locale_use_LANG.patch
Patch6: calamares-1.0.1-replace_chroot_call.patch Patch6: calamares-1.0.1-replace_chroot_call.patch
Patch7: calamares-1.0.1-openmamba_autopartitioning.patch Patch7: calamares-1.1.2-openmamba_autopartitioning.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
@ -73,12 +73,12 @@ This package contains libraries and header files for developing applications tha
#-D -T #-D -T
#:<< _EOF #:<< _EOF
%patch0 -p1 %patch0 -p1
%patch1 -p1 #%patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 #%patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p1 #%patch6 -p1
%patch7 -p1 %patch7 -p1
rmdir src/modules/partition/partitionmanager rmdir src/modules/partition/partitionmanager
@ -142,10 +142,6 @@ install -D -m0755 src/branding/default/squid.png %{buildroot}%{_datadir}/pixmaps
%{_libdir}/calamares/modules/finished/* %{_libdir}/calamares/modules/finished/*
%dir %{_libdir}/calamares/modules/fstab %dir %{_libdir}/calamares/modules/fstab
%{_libdir}/calamares/modules/fstab/* %{_libdir}/calamares/modules/fstab/*
%dir %{_libdir}/calamares/modules/greeting
%{_libdir}/calamares/modules/greeting/*
%dir %{_libdir}/calamares/modules/grub
%{_libdir}/calamares/modules/grub/*
%dir %{_libdir}/calamares/modules/grubcfg %dir %{_libdir}/calamares/modules/grubcfg
%{_libdir}/calamares/modules/grubcfg/* %{_libdir}/calamares/modules/grubcfg/*
%dir %{_libdir}/calamares/modules/hwclock %dir %{_libdir}/calamares/modules/hwclock
@ -172,8 +168,8 @@ install -D -m0755 src/branding/default/squid.png %{buildroot}%{_datadir}/pixmaps
%{_libdir}/calamares/modules/packages/* %{_libdir}/calamares/modules/packages/*
%dir %{_libdir}/calamares/modules/partition %dir %{_libdir}/calamares/modules/partition
%{_libdir}/calamares/modules/partition/* %{_libdir}/calamares/modules/partition/*
%dir %{_libdir}/calamares/modules/prepare %dir %{_libdir}/calamares/modules/removeuser
%{_libdir}/calamares/modules/prepare/* %{_libdir}/calamares/modules/removeuser/*
%dir %{_libdir}/calamares/modules/services %dir %{_libdir}/calamares/modules/services
%{_libdir}/calamares/modules/services/* %{_libdir}/calamares/modules/services/*
%dir %{_libdir}/calamares/modules/summary %dir %{_libdir}/calamares/modules/summary
@ -184,6 +180,8 @@ install -D -m0755 src/branding/default/squid.png %{buildroot}%{_datadir}/pixmaps
%{_libdir}/calamares/modules/unpackfs/* %{_libdir}/calamares/modules/unpackfs/*
%dir %{_libdir}/calamares/modules/users %dir %{_libdir}/calamares/modules/users
%{_libdir}/calamares/modules/users/* %{_libdir}/calamares/modules/users/*
%dir %{_libdir}/calamares/modules/welcome
%{_libdir}/calamares/modules/welcome/*
%doc AUTHORS LICENSE %doc AUTHORS LICENSE
%files -n lib%{name}-devel %files -n lib%{name}-devel
@ -198,10 +196,13 @@ install -D -m0755 src/branding/default/squid.png %{buildroot}%{_datadir}/pixmaps
%{_libdir}/cmake/Calamares/Calamares*.cmake %{_libdir}/cmake/Calamares/Calamares*.cmake
%{_libdir}/libcalamares.so %{_libdir}/libcalamares.so
%{_libdir}/libcalamaresui.so %{_libdir}/libcalamaresui.so
%doc README.md #%doc README.md
%changelog %changelog
* Mon Aug 10 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.2-1mamba
- update to 1.1.2
* Thu May 21 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.1-8mamba * Thu May 21 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.1-8mamba
- added openmamba automatic partitioning patch - added openmamba automatic partitioning patch