Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[udisks2] Upgrade to 2.8.0. Contributes to JB#42802
  • Loading branch information
rainemak committed Sep 18, 2018
1 parent 328839b commit aaac9ed
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 51 deletions.
52 changes: 26 additions & 26 deletions rpm/0001-Disable-libblockdev-mdraid-and-part-support-from-sou.patch
@@ -1,4 +1,4 @@
From d2bb5ff5f9a26797f69c04bd8bd8966e670d1149 Mon Sep 17 00:00:00 2001
From eed3d5281b6dec96c8d9ca137b21a0c7fe7bb99a Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 5 Dec 2017 11:17:50 +0200
Subject: [PATCH 01/10] Disable libblockdev-mdraid and part support from source
Expand All @@ -17,10 +17,10 @@ Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
8 files changed, 105 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 488b27c1..bc8f7af1 100644
index 5f1b0af4..61972a62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -575,10 +575,6 @@ AC_TRY_COMPILE([#include <blockdev/mdraid.h>], [],
@@ -611,10 +611,6 @@ AC_TRY_COMPILE([#include <blockdev/mdraid.h>], [],
CFLAGS=$SAVE_CFLAGS
LDFLAGS=$SAVE_LDFLAGS

Expand All @@ -32,7 +32,7 @@ index 488b27c1..bc8f7af1 100644
SAVE_CFLAGS=$CFLAGS
SAVE_LDFLAGS=$LDFLAGS
diff --git a/src/Makefile.am b/src/Makefile.am
index c6e89ca2..96ea3cc1 100644
index 7fd1943c..49c7e04c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -67,7 +67,6 @@ libudisks_daemon_la_SOURCES = \
Expand All @@ -44,7 +44,7 @@ index c6e89ca2..96ea3cc1 100644
udiskslinuxfsinfo.h udiskslinuxfsinfo.c \
udisksbasejob.h udisksbasejob.c \
diff --git a/src/udisksdaemon.c b/src/udisksdaemon.c
index 9a013ec9..aafd79ed 100644
index 1f649d7c..eb404503 100644
--- a/src/udisksdaemon.c
+++ b/src/udisksdaemon.c
@@ -19,6 +19,14 @@
Expand All @@ -62,7 +62,7 @@ index 9a013ec9..aafd79ed 100644
#include "config.h"
#include <glib/gi18n-lib.h>
#include <blockdev/blockdev.h>
@@ -248,18 +256,33 @@ udisks_daemon_constructed (GObject *object)
@@ -269,18 +277,33 @@ udisks_daemon_constructed (GObject *object)
gboolean ret = FALSE;

/* NULL means no specific so_name (implementation) */
Expand Down Expand Up @@ -97,7 +97,7 @@ index 9a013ec9..aafd79ed 100644
error = NULL;

diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c
index 3ac48da5..09fa90a0 100644
index 6a69bf3e..2a8ed305 100644
--- a/src/udiskslinuxblock.c
+++ b/src/udiskslinuxblock.c
@@ -20,6 +20,10 @@
Expand All @@ -121,7 +121,7 @@ index 3ac48da5..09fa90a0 100644
#include <blockdev/fs.h>

#include "udiskslogging.h"
@@ -2722,7 +2728,10 @@ udisks_linux_block_handle_format (UDisksBlock *block,
@@ -2889,7 +2895,10 @@ udisks_linux_block_handle_format (UDisksBlock *block,
GVariant *config_items = NULL;
gboolean teardown_flag = FALSE;
gboolean no_discard_flag = FALSE;
Expand All @@ -132,7 +132,7 @@ index 3ac48da5..09fa90a0 100644

error = NULL;
object = udisks_daemon_util_dup_object (block, &error);
@@ -3083,11 +3092,13 @@ udisks_linux_block_handle_format (UDisksBlock *block,
@@ -3263,11 +3272,13 @@ udisks_linux_block_handle_format (UDisksBlock *block,
}
}

Expand All @@ -146,7 +146,7 @@ index 3ac48da5..09fa90a0 100644
{
/* Build and run mkfs shell command */
const gchar *device = udisks_block_get_device (block_to_mkfs);
@@ -3115,6 +3126,8 @@ udisks_linux_block_handle_format (UDisksBlock *block,
@@ -3295,6 +3306,8 @@ udisks_linux_block_handle_format (UDisksBlock *block,
goto out;
}
}
Expand All @@ -155,7 +155,7 @@ index 3ac48da5..09fa90a0 100644
else
{
/* Create the partition table. */
@@ -3124,6 +3137,7 @@ udisks_linux_block_handle_format (UDisksBlock *block,
@@ -3304,6 +3317,7 @@ udisks_linux_block_handle_format (UDisksBlock *block,
goto out;
}
}
Expand All @@ -164,7 +164,7 @@ index 3ac48da5..09fa90a0 100644
/* The mkfs program may not generate all the uevents we need - so explicitly
* trigger an event here
diff --git a/src/udiskslinuxmanager.c b/src/udiskslinuxmanager.c
index 157746fc..31133019 100644
index 8c2096a5..bdaf9dc0 100644
--- a/src/udiskslinuxmanager.c
+++ b/src/udiskslinuxmanager.c
@@ -18,6 +18,10 @@
Expand Down Expand Up @@ -206,7 +206,7 @@ index 157746fc..31133019 100644
UDisksLinuxManager *manager = UDISKS_LINUX_MANAGER (_object);
UDisksObject *array_object = NULL;
uid_t caller_uid;
@@ -845,6 +854,9 @@ handle_mdraid_create (UDisksManager *_object,
@@ -846,6 +855,9 @@ handle_mdraid_create (UDisksManager *_object,
g_clear_object (&array_object);

return TRUE; /* returning TRUE means that we handled the method invocation */
Expand All @@ -216,15 +216,15 @@ index 157746fc..31133019 100644
}

/* ---------------------------------------------------------------------------------------------------- */
@@ -935,6 +947,7 @@ handle_can_resize (UDisksManager *object,
@@ -936,6 +948,7 @@ handle_can_resize (UDisksManager *object,
GDBusMethodInvocation *invocation,
const gchar *type)
{
+#if BLOCKDEV_MDRAID_ENABLED
GError *error = NULL;
gchar *required_utility = NULL;
BDFsResizeFlags mode;
@@ -956,6 +969,9 @@ handle_can_resize (UDisksManager *object,
@@ -957,6 +970,9 @@ handle_can_resize (UDisksManager *object,
g_free (required_utility);

return TRUE;
Expand All @@ -234,15 +234,15 @@ index 157746fc..31133019 100644
}

static gboolean
@@ -963,6 +979,7 @@ handle_can_check (UDisksManager *object,
@@ -964,6 +980,7 @@ handle_can_check (UDisksManager *object,
GDBusMethodInvocation *invocation,
const gchar *type)
{
+#if BLOCKDEV_MDRAID_ENABLED
GError *error = NULL;
gchar *required_utility = NULL;
gboolean ret;
@@ -983,6 +1000,9 @@ handle_can_check (UDisksManager *object,
@@ -984,6 +1001,9 @@ handle_can_check (UDisksManager *object,
g_free (required_utility);

return TRUE;
Expand All @@ -252,15 +252,15 @@ index 157746fc..31133019 100644
}

static gboolean
@@ -990,6 +1010,7 @@ handle_can_repair (UDisksManager *object,
@@ -991,6 +1011,7 @@ handle_can_repair (UDisksManager *object,
GDBusMethodInvocation *invocation,
const gchar *type)
{
+#if BLOCKDEV_MDRAID_ENABLED
GError *error = NULL;
gchar *required_utility = NULL;
gboolean ret;
@@ -1010,6 +1031,9 @@ handle_can_repair (UDisksManager *object,
@@ -1011,6 +1032,9 @@ handle_can_repair (UDisksManager *object,
g_free (required_utility);

return TRUE;
Expand All @@ -271,7 +271,7 @@ index 157746fc..31133019 100644


diff --git a/src/udiskslinuxmdraidobject.c b/src/udiskslinuxmdraidobject.c
index 8014664e..ef772320 100644
index 51bdf708..0d8e96c1 100644
--- a/src/udiskslinuxmdraidobject.c
+++ b/src/udiskslinuxmdraidobject.c
@@ -36,6 +36,10 @@
Expand All @@ -285,7 +285,7 @@ index 8014664e..ef772320 100644
/**
* SECTION:udiskslinuxmdraidobject
* @title: UDisksLinuxMDRaidObject
@@ -430,7 +434,11 @@ mdraid_update (UDisksLinuxMDRaidObject *object,
@@ -428,7 +432,11 @@ mdraid_update (UDisksLinuxMDRaidObject *object,
const gchar *uevent_action,
GDBusInterface *_iface)
{
Expand All @@ -297,15 +297,15 @@ index 8014664e..ef772320 100644
}

/* ---------------------------------------------------------------------------------------------------- */
@@ -604,6 +612,7 @@ udisks_linux_mdraid_object_uevent (UDisksLinuxMDRaidObject *object,
@@ -614,6 +622,7 @@ udisks_linux_mdraid_object_uevent (UDisksLinuxMDRaidObject *object,
UDisksLinuxDevice *device,
gboolean is_member)
{
+#if BLOCKDEV_MDRAID_ENABLED
gboolean conf_changed = FALSE;

g_return_if_fail (UDISKS_IS_LINUX_MDRAID_OBJECT (object));
@@ -720,6 +729,7 @@ udisks_linux_mdraid_object_uevent (UDisksLinuxMDRaidObject *object,
@@ -730,6 +739,7 @@ udisks_linux_mdraid_object_uevent (UDisksLinuxMDRaidObject *object,
}
out:
;
Expand Down Expand Up @@ -446,7 +446,7 @@ index 5fa20482..7260c00f 100644

/* ---------------------------------------------------------------------------------------------------- */
diff --git a/src/udiskslinuxpartitiontable.c b/src/udiskslinuxpartitiontable.c
index 7a92057f..90c7cf24 100644
index a52d4084..9cdc2368 100644
--- a/src/udiskslinuxpartitiontable.c
+++ b/src/udiskslinuxpartitiontable.c
@@ -18,6 +18,10 @@
Expand All @@ -470,15 +470,15 @@ index 7a92057f..90c7cf24 100644
#include <blockdev/fs.h>

#include "udiskslogging.h"
@@ -255,6 +261,7 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta
@@ -254,6 +260,7 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta
const gchar *name,
GVariant *options)
{
+#if BLOCKDEV_PART_ENABLED
const gchar *action_id = NULL;
const gchar *message = NULL;
UDisksBlock *block = NULL;
@@ -563,6 +570,9 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta
@@ -562,6 +569,9 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta
if (part_spec)
bd_part_spec_free (part_spec);
return partition_object;
Expand Down
12 changes: 6 additions & 6 deletions rpm/0002-Drop-smartata-dependencies.patch
@@ -1,4 +1,4 @@
From 15170ae4c4a9d0b12dc6d25184020dfea35b743f Mon Sep 17 00:00:00 2001
From a74354efa70a5e5578e581e1e3a6df5d4fa1b2d2 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Thu, 7 Dec 2017 13:15:34 +0200
Subject: [PATCH 02/10] Drop smartata dependencies
Expand All @@ -10,7 +10,7 @@ Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index bc8f7af1..52823f3e 100644
index 61972a62..8bdb5a9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -166,10 +166,6 @@ PKG_CHECK_MODULES(POLKIT_AGENT_1, [polkit-agent-1 >= 0.102])
Expand All @@ -21,11 +21,11 @@ index bc8f7af1..52823f3e 100644
-AC_SUBST(LIBATASMART_CFLAGS)
-AC_SUBST(LIBATASMART_LIBS)
-
PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN, [libsystemd >= 209], [have_libsystemd_login=yes],
[PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN, [libsystemd-login >= 44 libsystemd-daemon],
[have_libsystemd_login=yes],
PKG_CHECK_MODULES(LIBMOUNT, [mount >= 2.30],
[have_libmount=yes],
[have_libmount=no])
diff --git a/src/udiskslinuxdriveata.c b/src/udiskslinuxdriveata.c
index 467f4612..7829d44a 100644
index da349cd8..978b57a2 100644
--- a/src/udiskslinuxdriveata.c
+++ b/src/udiskslinuxdriveata.c
@@ -18,6 +18,10 @@
Expand Down
2 changes: 1 addition & 1 deletion rpm/0003-Loosen-up-mount-unmount-rights.patch
@@ -1,4 +1,4 @@
From 209bdc355e416d05292273d15e59303892391389 Mon Sep 17 00:00:00 2001
From 760d8ddfd816c8c62038792373a27531e23ff458 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 6 Feb 2018 14:01:16 +0200
Subject: [PATCH 03/10] Loosen up mount/unmount rights
Expand Down
@@ -1,4 +1,4 @@
From 197d54eae6fdee57babc0071c712ca534c429d6d Mon Sep 17 00:00:00 2001
From 25b0331b27801f54e24aba4b21738309ebf05062 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 6 Feb 2018 14:08:59 +0200
Subject: [PATCH 04/10] Introduce mount-sd service that is executed as nemo
Expand All @@ -12,7 +12,7 @@ Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
create mode 100644 data/mount-sd@.service

diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules
index cc81484e..2e6ed158 100644
index e8f7c5ee..6e042977 100644
--- a/data/80-udisks2.rules
+++ b/data/80-udisks2.rules
@@ -41,6 +41,9 @@ ENV{ID_VENDOR}=="*IOMEGA*", ENV{ID_MODEL}=="*ZIP*", ENV{ID_DRIVE_FLOPPY_ZIP}="1"
Expand All @@ -26,7 +26,7 @@ index cc81484e..2e6ed158 100644
KERNEL=="msblk[0-9]|mspblk[0-9]", SUBSYSTEMS=="memstick", ENV{DEVTYPE}=="disk", ENV{ID_DRIVE_FLASH_MS}="1", ENV{ID_DRIVE_MEDIA_FLASH_MS}="1"

diff --git a/data/Makefile.am b/data/Makefile.am
index ddf9e3d6..4c77ee56 100644
index b38928c8..85a231a0 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -15,7 +15,7 @@ dbusconf_DATA = $(dbusconf_in_files:.conf.in=.conf)
Expand Down
4 changes: 2 additions & 2 deletions rpm/0005-Add-udev-rule-for-the-sda-drives.patch
@@ -1,4 +1,4 @@
From 577b5a4c6ed031f08daed8d08c48e8942f09736a Mon Sep 17 00:00:00 2001
From d6088c3ab42931929dbd0bb6fa6cf3e6706d8499 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Mon, 12 Mar 2018 10:18:03 +0200
Subject: [PATCH 05/10] Add udev rule for the sda drives
Expand All @@ -9,7 +9,7 @@ Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules
index 2e6ed158..f738e897 100644
index 6e042977..0bb0fe47 100644
--- a/data/80-udisks2.rules
+++ b/data/80-udisks2.rules
@@ -41,8 +41,10 @@ ENV{ID_VENDOR}=="*IOMEGA*", ENV{ID_MODEL}=="*ZIP*", ENV{ID_DRIVE_FLOPPY_ZIP}="1"
Expand Down
6 changes: 3 additions & 3 deletions rpm/0006-Disable-zram-rule-for-now.patch
@@ -1,4 +1,4 @@
From 08fb02a4ce23719d33dc66f56ad5b276bba5aafb Mon Sep 17 00:00:00 2001
From 1020693fef82bb586fbcc4c85356cf6d832564d8 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Wed, 11 Apr 2018 11:11:53 +0300
Subject: [PATCH 06/10] Disable zram rule for now
Expand All @@ -9,10 +9,10 @@ Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules
index f738e897..82221726 100644
index 0bb0fe47..559ca268 100644
--- a/data/80-udisks2.rules
+++ b/data/80-udisks2.rules
@@ -171,7 +171,7 @@ KERNEL=="sr*", ENV{ID_VENDOR}=="ASMT",ENV{ID_MODEL}=="VirtualCDROM", ENV{ID_FS_L
@@ -174,7 +174,7 @@ KERNEL=="sr*", ENV{ID_VENDOR}=="Linux", ENV{ID_MODEL}=="File-CD_Gadget*", ENV{ID
ENV{ID_PART_TABLE_TYPE}=="dos", ENV{ID_PART_ENTRY_TYPE}=="0x0|0x17", ENV{ID_PART_ENTRY_NUMBER}=="1", ENV{ID_FS_TYPE}=="iso9660|udf", ENV{UDISKS_IGNORE}="0"

# Zram devices setup
Expand Down
6 changes: 3 additions & 3 deletions rpm/0007-Create-mount-path-with-755-rights.patch
@@ -1,4 +1,4 @@
From f0ba7213af52451d0fc70c90682f3f8ba8606f5b Mon Sep 17 00:00:00 2001
From c7b6cc4dda761baf5d7ba1c9657c9728dc75ec97 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Wed, 18 Apr 2018 18:00:00 +0300
Subject: [PATCH 07/10] Create mount path with 755 rights
Expand All @@ -9,10 +9,10 @@ Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c
index c91a1279..6366bd76 100644
index 8d1bff42..97f1d1a4 100644
--- a/src/udiskslinuxfilesystem.c
+++ b/src/udiskslinuxfilesystem.c
@@ -939,7 +939,7 @@ calculate_mount_point (UDisksDaemon *daemon,
@@ -984,7 +984,7 @@ calculate_mount_point (UDisksDaemon *daemon,
}
/* Then create the per-user MOUNT_BASE/$USER */
#ifdef HAVE_ACL
Expand Down
@@ -1,4 +1,4 @@
From 51e65e9728ecb5acdb717a54e89b9bb036e46982 Mon Sep 17 00:00:00 2001
From 7d909d3f15d4398edc976733f8c3dc56b564a109 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Mon, 16 Jul 2018 15:40:23 +0300
Subject: [PATCH 08/10] Make it possible to format from another seat. Fixes
Expand Down
@@ -1,4 +1,4 @@
From 7bd4f8232b8c726f11bd989c3249f19a80cfb46a Mon Sep 17 00:00:00 2001
From 3191d582ff350950036895aec8e521dee25b7c53 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Fri, 3 Aug 2018 09:39:20 +0300
Subject: [PATCH 09/10] Make it possible to unlock from another seat
Expand Down
@@ -1,4 +1,4 @@
From c810cbae8bbdf5ca168170d37259f7f1a0534ec9 Mon Sep 17 00:00:00 2001
From 18963bbaf1422255f24f3d71bc96733083d60e5c Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 18 Sep 2018 17:04:36 +0300
Subject: [PATCH 10/10] Make it possible to encrypt mmcblk* (format with
Expand All @@ -10,10 +10,10 @@ Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
1 file changed, 5 insertions(+)

diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c
index 09fa90a0..996cde55 100644
index 2a8ed305..87aa924f 100644
--- a/src/udiskslinuxblock.c
+++ b/src/udiskslinuxblock.c
@@ -2129,8 +2129,13 @@ wait_for_luks_uuid (UDisksDaemon *daemon,
@@ -2257,8 +2257,13 @@ wait_for_luks_uuid (UDisksDaemon *daemon,
if (block == NULL)
goto out;

Expand Down
4 changes: 3 additions & 1 deletion rpm/udisks2.spec
Expand Up @@ -7,7 +7,7 @@

Name: udisks2
Summary: Disk Manager
Version: 2.7.5
Version: 2.8.0
Release: 1
License: GPLv2+
Group: System Environment/Libraries
Expand All @@ -31,6 +31,7 @@ BuildRequires: pkgconfig(polkit-agent-1) >= %{polkit_version}
BuildRequires: pkgconfig(polkit-gobject-1) >= %{polkit_version}
BuildRequires: pkgconfig(systemd) >= %{systemd_version}
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(mount) >= 2.30
BuildRequires: gettext-devel
BuildRequires: autoconf
BuildRequires: automake
Expand Down Expand Up @@ -70,6 +71,7 @@ Requires: e2fsprogs
#Requires: gdisk
# For ejecting removable disks
#Requires: eject
Requires: libmount >= 2.30

Requires: lib%{name} = %{version}-%{release}

Expand Down
2 changes: 1 addition & 1 deletion udisks2
Submodule udisks2 updated 141 files

0 comments on commit aaac9ed

Please sign in to comment.