summaryrefslogtreecommitdiff
path: root/app-admin/calamares/files/calamares-kpmcore-3.2.patch
blob: 07e506ec2854c6438a817cf8d46da9e5e2f02d93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
diff -Naur calamares-3.1.8/src/modules/partition/CMakeLists.txt calamares-3.1.8-p/src/modules/partition/CMakeLists.txt
--- calamares-3.1.8/src/modules/partition/CMakeLists.txt	2017-11-14 16:18:58.000000000 +0100
+++ calamares-3.1.8-p/src/modules/partition/CMakeLists.txt	2017-11-18 13:16:38.335840619 +0100
@@ -5,14 +5,10 @@
 include(GenerateExportHeader)
 find_package( KF5 REQUIRED CoreAddons )
 
-# These are needed because KPMcore links publicly against ConfigCore, I18n, IconThemes, KIOCore and Service
-find_package( KF5 REQUIRED Config I18n IconThemes KIO Service )
+find_package( Qt5 REQUIRED DBus )
+find_package( KF5 REQUIRED Config I18n WidgetsAddons Service )
 
-find_package( KPMcore 3.1.50 QUIET )
-if ( KPMcore_FOUND )
-    add_definitions(-DWITH_KPMCORE22)
-endif()
-find_package( KPMcore 3.0.3 QUIET )
+find_package( KPMcore 3.2 QUIET )
 # 3.0.3 and newer has fixes for NVMe support; allow 3.0.2, but warn
 # about it .. needs to use a different feature name because it otherwise
 # gets reported as KPMcore (the package).
@@ -25,15 +21,6 @@
     add_feature_info( KPMcoreNVMe KPMcore_FOUND "Older KPMcore with no NVMe support" )
 endif()
 
-find_library( atasmart_LIB atasmart )
-find_library( blkid_LIB blkid )
-if( NOT atasmart_LIB )
-  message( WARNING "atasmart library not found." )
-endif()
-if( NOT blkid_LIB )
-  message( WARNING "blkid library not found." )
-endif()
-
 
 include_directories( ${KPMCORE_INCLUDE_DIR} )
 include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
diff -Naur calamares-3.1.8/src/modules/partition/core/KPMHelpers.cpp calamares-3.1.8-p/src/modules/partition/core/KPMHelpers.cpp
--- calamares-3.1.8/src/modules/partition/core/KPMHelpers.cpp	2017-11-14 16:18:58.000000000 +0100
+++ calamares-3.1.8-p/src/modules/partition/core/KPMHelpers.cpp	2017-11-18 13:11:35.255540490 +0100
@@ -116,9 +116,7 @@
                     PartitionTable::Flags flags )
 {
     FileSystem* fs = FileSystemFactory::create( fsType, firstSector, lastSector
-#ifdef WITH_KPMCORE22
                                                 ,device.logicalSize()
-#endif
     );
     return new Partition(
                parent,
@@ -153,9 +151,7 @@
                            FileSystemFactory::create( FileSystem::Luks,
                                                       firstSector,
                                                       lastSector
-#ifdef WITH_KPMCORE22
                                                      ,device.logicalSize()
-#endif
                                                       ) );
     if ( !fs )
     {
@@ -186,9 +182,7 @@
                          partition->fileSystem().type(),
                          partition->firstSector(),
                          partition->lastSector()
-#ifdef WITH_KPMCORE22
                         ,device->logicalSize()
-#endif
                      );
     return new Partition( partition->parent(),
                           *device,
diff -Naur calamares-3.1.8/src/modules/partition/jobs/FillGlobalStorageJob.cpp calamares-3.1.8-p/src/modules/partition/jobs/FillGlobalStorageJob.cpp
--- calamares-3.1.8/src/modules/partition/jobs/FillGlobalStorageJob.cpp	2017-11-14 16:18:58.000000000 +0100
+++ calamares-3.1.8-p/src/modules/partition/jobs/FillGlobalStorageJob.cpp	2017-11-18 13:11:35.256540518 +0100
@@ -77,50 +77,6 @@
     return uuid;
 }
 
-// TODO: this will be available from KPMCore soon
-static const char* filesystem_labels[] = {
-    "unknown",
-    "extended",
-
-    "ext2",
-    "ext3",
-    "ext4",
-    "linuxswap",
-    "fat16",
-    "fat32",
-    "ntfs",
-    "reiser",
-    "reiser4",
-    "xfs",
-    "jfs",
-    "hfs",
-    "hfsplus",
-    "ufs",
-    "unformatted",
-    "btrfs",
-    "hpfs",
-    "luks",
-    "ocfs2",
-    "zfs",
-    "exfat",
-    "nilfs2",
-    "lvm2 pv",
-    "f2fs",
-    "udf",
-    "iso9660",
-};
-
-Q_STATIC_ASSERT_X((sizeof(filesystem_labels) / sizeof(char *)) >= FileSystem::__lastType, "Mismatch in filesystem labels");
-
-static QString
-untranslatedTypeName(FileSystem::Type t)
-{
-
-    Q_ASSERT( t >= 0 );
-    Q_ASSERT( t <= FileSystem::__lastType );
-
-    return QLatin1String(filesystem_labels[t]);
-}
 
 static QVariant
 mapForPartition( Partition* partition, const QString& uuid )
@@ -129,7 +85,7 @@
     map[ "device" ] = partition->partitionPath();
     map[ "mountPoint" ] = PartitionInfo::mountPoint( partition );
     map[ "fsName" ] = partition->fileSystem().name();
-    map[ "fs" ] = untranslatedTypeName( partition->fileSystem().type() );
+    map[ "fs" ] = partition->fileSystem().name( { QStringLiteral("C") } );  // Untranslated
     if ( partition->fileSystem().type() == FileSystem::Luks &&
          dynamic_cast< FS::luks& >( partition->fileSystem() ).innerFS() )
         map[ "fs" ] = dynamic_cast< FS::luks& >( partition->fileSystem() ).innerFS()->name();
diff -Naur calamares-3.1.8/src/modules/partition/tests/PartitionJobTests.cpp calamares-3.1.8-p/src/modules/partition/tests/PartitionJobTests.cpp
--- calamares-3.1.8/src/modules/partition/tests/PartitionJobTests.cpp	2017-11-14 16:18:58.000000000 +0100
+++ calamares-3.1.8-p/src/modules/partition/tests/PartitionJobTests.cpp	2017-11-18 13:11:35.255540490 +0100
@@ -219,9 +219,7 @@
     else
         lastSector = freeSpacePartition->lastSector();
     FileSystem* fs = FileSystemFactory::create( type, firstSector, lastSector
-#ifdef WITH_KPMCORE22
         ,m_device->logicalSize()
-#endif
     );
 
     Partition* partition = new Partition(