Permalink
Browse files

Better patch for ubiquity to fix issues when zram is enabled

  • Loading branch information...
1 parent 9aa256d commit 467590c5542ba6a32c3a9c55e1e6c109132a2633 @hugegreenbug hugegreenbug committed Jan 1, 2015
Showing with 29 additions and 19 deletions.
  1. +0 −13 crypto-base.sh.patch
  2. +5 −6 distroshare-ubuntu-imager.sh
  3. +24 −0 ubiquity.patch
View
@@ -1,13 +0,0 @@
---- crypto-base.orig.sh 2014-12-31 20:18:23.215164157 -0500
-+++ crypto-base.sh 2014-12-31 20:23:11.395158996 -0500
-@@ -160,6 +160,10 @@
- /dev/mapper/*)
- dm_is_safe ${swap%% *} || return 1
- ;;
-+ /dev/zram*)
-+ apt-get -q2 remove zram-config
-+ swapoff $(echo $swap | cut -f 1 -d " ")
-+ ;;
- *)
- # Presume not safe
- return 1
@@ -111,12 +111,11 @@ patch < plugininstall.patch
cp plugininstall.py /usr/share/ubiquity/plugininstall.py
rm -f plugininstall.py
-echo "Patching Ubiquity crypto-base.sh to disable zram"
-echo " when a user chooses to encrypt the drive/home"
-cp /lib/partman/lib/crypto-base.sh .
-patch < crypto-base.sh.patch
-cp crypto-base.sh /lib/partman/lib/
-rm -f crypto-base.sh
+echo "Patching Ubiquity to stop it from freaking out if zram is enabled"
+cp /usr/bin/ubiquity .
+patch < ubiquity.patch
+cp ubiquity /usr/bin/
+rm -f ubiquity
#Copy the filesystem
echo "Copying the current system to the new directories"
View
@@ -0,0 +1,24 @@
+--- ubiquity 2015-01-01 16:48:12.378547695 -0500
++++ ubiquity 2015-01-01 16:50:43.994544980 -0500
+@@ -11,7 +11,7 @@
+ sys.path.insert(0, '/usr/lib/ubiquity')
+
+ from ubiquity import osextras
+-
++from subprocess import call
+
+ def main():
+ newargv = []
+@@ -34,7 +34,11 @@
+
+ if os.getuid() == 0:
+ # no privilege escalation required
+- inner = ['/usr/lib/ubiquity/bin/ubiquity'] + newargv
++
++ #Turn off all swaps to fix issues with zram
++ call(["swapoff", "--all"])
++
++ inner = ['/usr/lib/ubiquity/bin/ubiquity'] + newargv
+
+ # Make sure ibus works
+ if (os.getenv("GTK_IM_MODULE") == "ibus" and

0 comments on commit 467590c

Please sign in to comment.