patch packages module to support smart package manager

patch to fix plymouth path in grubcfg module for openmamba
patch to fix path in displaymanager module for openmamba
install icon for desktop file [release 1.0.1-5mamba;Thu Feb 19 2015]
This commit is contained in:
Silvan Calarco 2024-01-05 21:03:40 +01:00
parent 68df96f679
commit ad263cf8a0
4 changed files with 91 additions and 1 deletions

View File

@ -0,0 +1,41 @@
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

@ -0,0 +1,20 @@
--- calamares-1.0.1/src/modules/displaymanager/main.py.orig 2015-02-19 16:30:17.096993788 +0100
+++ calamares-1.0.1/src/modules/displaymanager/main.py 2015-02-19 16:31:34.302058388 +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'),
@@ -104,7 +104,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

@ -0,0 +1,12 @@
diff -Nru calamares-1.0.1.orig/src/modules/grubcfg/main.py calamares-1.0.1/src/modules/grubcfg/main.py
--- calamares-1.0.1.orig/src/modules/grubcfg/main.py 2015-02-03 22:15:35.000000000 +0100
+++ calamares-1.0.1/src/modules/grubcfg/main.py 2015-02-19 14:46:59.134060816 +0100
@@ -25,7 +25,7 @@
default_dir = os.path.join(root_mount_point, "etc/default")
default_grub = os.path.join(default_dir, "grub")
- plymouth_bin = os.path.join(root_mount_point, "usr/bin/plymouth")
+ plymouth_bin = os.path.join(root_mount_point, "bin/plymouth")
use_splash = ""
swap_uuid = ""

View File

@ -1,6 +1,6 @@
Name: calamares
Version: 1.0.1
Release: 4mamba
Release: 5mamba
Summary: Distribution-independent installer framework
Group: Graphical Desktop/Applications/Utilities
Vendor: openmamba
@ -10,6 +10,9 @@ URL: https://github.com/calamares/calamares
## GITSOURCE https://github.com/calamares/calamares.git v1.0.1
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
Patch0: calamares-1.0.1-add_smart_package_manager_support.patch
Patch1: calamares-1.0.1-plymouth_path.patch
Patch2: calamares-1.0.1-displaymanager_fix_paths_openmamba.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -31,6 +34,8 @@ BuildRequires: libyaml-cpp-devel
BuildRequires: cmake
BuildRequires: libpolkit-qt5-1-devel
BuildRequires: libboost-devel >= 1.57.0-3mamba
Requires: libqt5-plugins
Requires: squashfs
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
@ -56,6 +61,9 @@ This package contains libraries and header files for developing applications tha
%prep
%setup -q -a1
%patch0 -p1
%patch1 -p1
%patch2 -p1
rmdir src/modules/partition/partitionmanager
mv partitionmanager-%{version} src/modules/partition/partitionmanager
@ -70,6 +78,8 @@ mv partitionmanager-%{version} src/modules/partition/partitionmanager
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
install -D -m0755 src/branding/default/squid.png %{buildroot}%{_datadir}/pixmaps/calamares.png
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -80,6 +90,7 @@ mv partitionmanager-%{version} src/modules/partition/partitionmanager
%defattr(-,root,root)
%{_bindir}/calamares
%{_datadir}/applications/calamares.desktop
%{_datadir}/pixmaps/calamares.png
%dir %{_datadir}/calamares
%dir %{_datadir}/calamares/branding
%dir %{_datadir}/calamares/branding/default
@ -175,6 +186,12 @@ mv partitionmanager-%{version} src/modules/partition/partitionmanager
%changelog
* Thu Feb 19 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.1-5mamba
- patch packages module to support smart package manager
- patch to fix plymouth path in grubcfg module for openmamba
- patch to fix path in displaymanager module for openmamba
- install icon for desktop file
* Sat Feb 07 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.1-4mamba
- rebuilt with WITH_PARTITIONMANAGER=ON