Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'disableZRAM' into 'master'
[udisks2] Disable zram udev rule for now

See merge request mer-core/udisks2!5
  • Loading branch information
rainemak committed Apr 11, 2018
2 parents 1480864 + a48a75c commit 9719fc6
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 30 deletions.
22 changes: 11 additions & 11 deletions rpm/0001-Disable-libblockdev-mdraid-and-part-support-from-sou.patch
@@ -1,7 +1,7 @@
From 3d783c006bb77d9564f59f14d513de9eab6a2a0f Mon Sep 17 00:00:00 2001
From 2ed93f6461ef8c5facfec54e1f8a8d87a91612f9 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 1/5] Disable libblockdev-mdraid and part support from source
Subject: [PATCH 1/6] Disable libblockdev-mdraid and part support from source
tree

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
Expand All @@ -17,7 +17,7 @@ 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 488b27c..bc8f7af 100644
index 488b27c1..bc8f7af1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -575,10 +575,6 @@ AC_TRY_COMPILE([#include <blockdev/mdraid.h>], [],
Expand All @@ -32,7 +32,7 @@ index 488b27c..bc8f7af 100644
SAVE_CFLAGS=$CFLAGS
SAVE_LDFLAGS=$LDFLAGS
diff --git a/src/Makefile.am b/src/Makefile.am
index c6e89ca..96ea3cc 100644
index c6e89ca2..96ea3cc1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -67,7 +67,6 @@ libudisks_daemon_la_SOURCES = \
Expand All @@ -44,7 +44,7 @@ index c6e89ca..96ea3cc 100644
udiskslinuxfsinfo.h udiskslinuxfsinfo.c \
udisksbasejob.h udisksbasejob.c \
diff --git a/src/udisksdaemon.c b/src/udisksdaemon.c
index 9a013ec..aafd79e 100644
index 9a013ec9..aafd79ed 100644
--- a/src/udisksdaemon.c
+++ b/src/udisksdaemon.c
@@ -19,6 +19,14 @@
Expand Down Expand Up @@ -97,7 +97,7 @@ index 9a013ec..aafd79e 100644
error = NULL;

diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c
index 3ac48da..09fa90a 100644
index 3ac48da5..09fa90a0 100644
--- a/src/udiskslinuxblock.c
+++ b/src/udiskslinuxblock.c
@@ -20,6 +20,10 @@
Expand Down Expand Up @@ -164,7 +164,7 @@ index 3ac48da..09fa90a 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 157746f..3113301 100644
index 157746fc..31133019 100644
--- a/src/udiskslinuxmanager.c
+++ b/src/udiskslinuxmanager.c
@@ -18,6 +18,10 @@
Expand Down Expand Up @@ -271,7 +271,7 @@ index 157746f..3113301 100644


diff --git a/src/udiskslinuxmdraidobject.c b/src/udiskslinuxmdraidobject.c
index 8014664..ef77232 100644
index 8014664e..ef772320 100644
--- a/src/udiskslinuxmdraidobject.c
+++ b/src/udiskslinuxmdraidobject.c
@@ -36,6 +36,10 @@
Expand Down Expand Up @@ -314,7 +314,7 @@ index 8014664..ef77232 100644

/* ---------------------------------------------------------------------------------------------------- */
diff --git a/src/udiskslinuxpartition.c b/src/udiskslinuxpartition.c
index 5fa2048..70eb647 100644
index 5fa20482..70eb6477 100644
--- a/src/udiskslinuxpartition.c
+++ b/src/udiskslinuxpartition.c
@@ -18,6 +18,10 @@
Expand Down Expand Up @@ -446,7 +446,7 @@ index 5fa2048..70eb647 100644

/* ---------------------------------------------------------------------------------------------------- */
diff --git a/src/udiskslinuxpartitiontable.c b/src/udiskslinuxpartitiontable.c
index 7a92057..90c7cf2 100644
index 7a92057f..90c7cf24 100644
--- a/src/udiskslinuxpartitiontable.c
+++ b/src/udiskslinuxpartitiontable.c
@@ -18,6 +18,10 @@
Expand Down Expand Up @@ -489,5 +489,5 @@ index 7a92057..90c7cf2 100644

static int
--
2.7.4
2.14.3

10 changes: 5 additions & 5 deletions rpm/0002-Drop-smartata-dependencies.patch
@@ -1,7 +1,7 @@
From c7aed86fe13037ff763428d812e312eba154f273 Mon Sep 17 00:00:00 2001
From 8287ff270ce821ed03c4a89951cfe972a0332188 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 2/5] Drop smartata dependencies
Subject: [PATCH 2/6] Drop smartata dependencies

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
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 bc8f7af..52823f3 100644
index bc8f7af1..52823f3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -166,10 +166,6 @@ PKG_CHECK_MODULES(POLKIT_AGENT_1, [polkit-agent-1 >= 0.102])
Expand All @@ -25,7 +25,7 @@ index bc8f7af..52823f3 100644
[PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN, [libsystemd-login >= 44 libsystemd-daemon],
[have_libsystemd_login=yes],
diff --git a/src/udiskslinuxdriveata.c b/src/udiskslinuxdriveata.c
index 467f461..7829d44 100644
index 467f4612..7829d44a 100644
--- a/src/udiskslinuxdriveata.c
+++ b/src/udiskslinuxdriveata.c
@@ -18,6 +18,10 @@
Expand Down Expand Up @@ -118,5 +118,5 @@ index 467f461..7829d44 100644

/* ---------------------------------------------------------------------------------------------------- */
--
2.7.4
2.14.3

8 changes: 4 additions & 4 deletions rpm/0003-Loosen-up-mount-unmount-rights.patch
@@ -1,15 +1,15 @@
From 3357f5f291d0ae07bdcb6a4b039fb967f208296c Mon Sep 17 00:00:00 2001
From 3c65269d65fb0ea11b3480185e3bf13f325e8912 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 3/5] Loosen up mount/unmount rights
Subject: [PATCH 3/6] Loosen up mount/unmount rights

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
data/org.freedesktop.UDisks2.policy.in | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/data/org.freedesktop.UDisks2.policy.in b/data/org.freedesktop.UDisks2.policy.in
index d97528d..7b42f7e 100644
index d97528d4..7b42f7e0 100644
--- a/data/org.freedesktop.UDisks2.policy.in
+++ b/data/org.freedesktop.UDisks2.policy.in
@@ -16,8 +16,8 @@
Expand Down Expand Up @@ -50,5 +50,5 @@ index d97528d..7b42f7e 100644
</action>

--
2.7.4
2.14.3

@@ -1,7 +1,7 @@
From 6a85f8d3ccff83e679e2ada575c3d879bb0a5b2f Mon Sep 17 00:00:00 2001
From 1f3f452e09a5c3054f075bd9abdb74886d025346 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 4/5] Introduce mount-sd service that is executed as nemo
Subject: [PATCH 4/6] Introduce mount-sd service that is executed as nemo

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
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 cc81484..2e6ed15 100644
index cc81484e..2e6ed158 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 cc81484..2e6ed15 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 ddf9e3d..4c77ee5 100644
index ddf9e3d6..4c77ee56 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -15,7 +15,7 @@ dbusconf_DATA = $(dbusconf_in_files:.conf.in=.conf)
Expand All @@ -40,7 +40,7 @@ index ddf9e3d..4c77ee5 100644
systemdservicedir = $(systemdsystemunitdir)
diff --git a/data/mount-sd@.service b/data/mount-sd@.service
new file mode 100644
index 0000000..a981e30
index 00000000..a981e303
--- /dev/null
+++ b/data/mount-sd@.service
@@ -0,0 +1,12 @@
Expand All @@ -57,5 +57,5 @@ index 0000000..a981e30
+ExecStart=/usr/bin/udisksctl mount -b /dev/%i
+ExecStop=-/usr/bin/udisksctl unmount -b /dev/%i
--
2.7.4
2.14.3

8 changes: 4 additions & 4 deletions rpm/0005-Add-udev-rule-for-the-sda-drives.patch
@@ -1,15 +1,15 @@
From 419f5f3299b68b663aad3b9de96f979610ddbe7e Mon Sep 17 00:00:00 2001
From fd532c0758787d5f57e65ef3ad9520b550b173af 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 5/5] Add udev rule for the sda drives
Subject: [PATCH 5/6] Add udev rule for the sda drives

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
data/80-udisks2.rules | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules
index 2e6ed15..f738e89 100644
index 2e6ed158..f738e897 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 All @@ -26,5 +26,5 @@ index 2e6ed15..f738e89 100644
# ditto for memstick
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"
--
2.7.4
2.14.3

26 changes: 26 additions & 0 deletions rpm/0006-Disable-zram-rule-for-now.patch
@@ -0,0 +1,26 @@
From 124b3423084437bd62838f4c496f9a05419aab31 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 6/6] Disable zram rule for now

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
data/80-udisks2.rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules
index f738e897..82221726 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
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
-KERNEL=="zram[0-9]", ENV{SYSTEMD_WANTS}="zram-setup@zram%n.service", TAG+="systemd"
+# KERNEL=="zram[0-9]", ENV{SYSTEMD_WANTS}="zram-setup@zram%n.service", TAG+="systemd"

# Explicitly ignore ram block devices, they don't work with udev
KERNEL=="ram*", ENV{UDISKS_IGNORE}="1"
--
2.14.3

2 changes: 2 additions & 0 deletions rpm/udisks2.spec
Expand Up @@ -18,6 +18,7 @@ Patch2: 0002-Drop-smartata-dependencies.patch
Patch3: 0003-Loosen-up-mount-unmount-rights.patch
Patch4: 0004-Introduce-mount-sd-service-that-is-executed-as-nemo.patch
Patch5: 0005-Add-udev-rule-for-the-sda-drives.patch
Patch6: 0006-Disable-zram-rule-for-now.patch

BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gobject-introspection-1.0)
Expand Down Expand Up @@ -99,6 +100,7 @@ dynamic library, which provides access to the udisksd daemon.
%patch3 -p1 -b .loosen-up-rights
%patch4 -p1 -b .mount-sd-service
%patch5 -p1 -b .udev-rules-for-sda
%patch6 -p1 -b .udev-disable-zram

# Disable gtk-doc
sed -i 's/SUBDIRS = data udisks src tools modules po doc/SUBDIRS = data udisks src tools modules po/' Makefile.am
Expand Down

0 comments on commit 9719fc6

Please sign in to comment.