summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDX372020-09-27 19:43:28 +0700
committerDX372020-09-27 19:43:28 +0700
commit99ee895b26213029a6a69cb2e2e69fc964f08031 (patch)
tree09ff56ea279671f76eee5b368a2230da02a8ec31
parent3224dda2ef0270393db354a372266cf305ae8f2c (diff)
downloadaur-99ee895b26213029a6a69cb2e2e69fc964f08031.tar.gz
fixes
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD14
-rw-r--r--fixes.patch138
3 files changed, 152 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1df53cbf9557..de496ec98072 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = multibootusb
pkgdesc = Boot multiple live Linux distros from a usb flash drive.
pkgver = 9.2.0
- pkgrel = 4
+ pkgrel = 5
url = http://multibootusb.org
arch = any
license = GPL
@@ -12,7 +12,9 @@ pkgbase = multibootusb
depends = p7zip
depends = python-pyudev
source = https://github.com/mbusb/multibootusb/archive/v9.2.0.tar.gz
+ source = fixes.patch
sha512sums = 461ce6edd835b2a017d96c3987338cd9004894949ac0b121fc289d100b7945dd89970f966e48310b97f312221a2f5a047190c55802d3a07a9eec0bf6ec22356d
+ sha512sums = 35d351100cf7a0bf0dd8647fd51c4e16732caf87f4750db2ce9ba9a08d1871de1b63e1a1e1ab2015e19ee6c44de98e1ee95bb965ad98fc90d11a596d51cfee46
pkgname = multibootusb
diff --git a/PKGBUILD b/PKGBUILD
index 85df56e0a09d..73048f206964 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,15 +6,23 @@
pkgname=multibootusb
pkgver=9.2.0
-pkgrel=4
+pkgrel=5
pkgdesc="Boot multiple live Linux distros from a usb flash drive."
arch=('any')
url="http://multibootusb.org"
license=('GPL')
depends=('python-pyqt5' 'python-dbus' 'mtools' 'parted' 'p7zip' 'python-pyudev')
-sha512sums=('461ce6edd835b2a017d96c3987338cd9004894949ac0b121fc289d100b7945dd89970f966e48310b97f312221a2f5a047190c55802d3a07a9eec0bf6ec22356d')
-source=("https://github.com/mbusb/$pkgname/archive/v${pkgver}.tar.gz")
+sha512sums=('461ce6edd835b2a017d96c3987338cd9004894949ac0b121fc289d100b7945dd89970f966e48310b97f312221a2f5a047190c55802d3a07a9eec0bf6ec22356d'
+ 'e10ddbd1588bb17d05040c001e4ca4f85d5da5a77de95154ac34d0fc7b3310a464077c88636a008b92af09b0920711d7b057f4c7542e1576708bed5a591e76d3')
+source=("https://github.com/mbusb/$pkgname/archive/v${pkgver}.tar.gz"
+ "fixes.patch")
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ patch -Np1 < "$srcdir/fixes.patch"
+}
build() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/fixes.patch b/fixes.patch
new file mode 100644
index 000000000000..89b0ada039ad
--- /dev/null
+++ b/fixes.patch
@@ -0,0 +1,138 @@
+diff --git a/multibootusb b/multibootusb
+index ae831e0..5f8db76 100644
+--- a/multibootusb
++++ b/multibootusb
+@@ -102,7 +102,7 @@ Example for installing multiple distros without user intervention:
+
+ Windows:
+ python3 multibootusb -c -y -i ../../favourite.iso,../../other-distro.iso -t G:
+-
++
+ Example for writing ISO image to target USB disk (will destroy data on USB disk):
+
+ Linux:
+@@ -184,25 +184,33 @@ if __name__ == '__main__':
+ sys.exit()
+ '''
+
++if platform.system() == 'Linux':
++ if os.getuid() != 0:
++ exit("You need to have root privileges to run this application."
++ "\nPlease try again using 'sudo'. Exiting.")
++elif platform.system() == 'Windows':
++ if ctypes.windll.shell32.IsUserAnAdmin() != 1:
++ exit("You need to have admin privileges to run this application."
++ "\nPlease open command window with admin rights. Exiting.")
++
+ if config.debug is True:
+ from scripts.debug import colors
+ log(colors.HEADER + "=== DEBUG ENABLED ===")
+
+
+ if gui is False:
+- check_admin()
+- if uninstall is True and config.usb_disk is not '':
++ if uninstall is True and config.usb_disk is not None:
+ cli_uninstall_distro()
+- elif uninstall is True and config.usb_disk is '':
++ elif uninstall is True and config.usb_disk is None:
+ log('\nYou must provide \'-t\' option to point to your USB disk for uninstalling a distro.\n'
+ 'See the usage example below.')
+ usage()
+- elif config.image_path is '' and config.usb_disk is '':
++ elif config.image_path is None and config.usb_disk is None:
+ log('\nNo option provided. See the usage below.')
+ usage()
+- elif config.cli_syslinux is True and config.usb_disk is not '':
++ elif config.cli_syslinux is True and config.usb_disk is not None:
+ cli_install_syslinux()
+- elif config.image_path is '' or config.usb_disk is '':
++ elif config.image_path is None or config.usb_disk is None:
+ log('\nOptions \'-i\' and \'-t\' must be supplied together. See the usage below.')
+ usage()
+ elif config.cli_dd is True:
+diff --git a/scripts/gen.py b/scripts/gen.py
+index f29dc6e..2f2218d 100644
+--- a/scripts/gen.py
++++ b/scripts/gen.py
+@@ -137,7 +137,8 @@ def mbusb_log_file():
+ if platform.system() == "Linux":
+ # home_dir = os.path.expanduser('~')
+ # log_file = os.path.join(home_dir, "multibootusb.log")
+- log_file = os.path.join(tempfile.gettempdir(), "multibootusb.log")
++ # log_file = os.path.join(tempfile.gettempdir(), "multibootusb.log")
++ log_file = "/var/log/multibootusb.log"
+ elif platform.system() == "Windows":
+ # log_file = os.path.join(tempfile.gettempdir(), "multibootusb", "multibootusb.log")
+ log_file = os.path.join("multibootusb.log")
+@@ -241,7 +242,7 @@ def copy_mbusb_dir_usb(usb_disk):
+ if not os.path.exists(os.path.join(usb_mount_path, 'multibootusb', 'grub', 'core-msdos.img')):
+ shutil.copy(resource_path(os.path.join('data', 'multibootusb', 'grub', 'core-msdos.img')),
+ os.path.join(usb_mount_path, 'multibootusb', 'grub', 'core-msdos.img'))
+-
++
+ if not os.path.exists(os.path.join(usb_mount_path, 'multibootusb', 'grub', 'x86_64-efi')):
+ log("New EFI modules does not exist. Copying now.")
+ shutil.copytree(resource_path(os.path.join('data', 'multibootusb', 'grub', 'x86_64-efi')),
+@@ -443,7 +444,7 @@ class MemoryCheck():
+ Cross platform way to checks memory of a given system. Works on Linux and Windows.
+ psutil is a good option to get memory info. But version 5.0 and only will work.
+ Source: https://doeidoei.wordpress.com/2009/03/22/python-tip-3-checking-available-ram-with-python/
+- Call this class like this:
++ Call this class like this:
+ mem_info = memoryCheck()
+ print(mem_info.value)
+ """
+@@ -500,7 +501,7 @@ def wmi_get_drive_info(usb_disk):
+ if disk.Caption == usb_disk:
+ return (partition, disk)
+ raise RuntimeError('Failed to obtain drive information ' + usb_disk)
+-
++
+ def get_physical_disk_number(usb_disk):
+ """
+ Get the physical disk number as detected ny Windows.
+diff --git a/scripts/mbusb_gui.py b/scripts/mbusb_gui.py
+index ba87a30..440aa1f 100644
+--- a/scripts/mbusb_gui.py
++++ b/scripts/mbusb_gui.py
+@@ -753,9 +753,6 @@ class GuiInstallProgress(QtCore.QThread):
+ def __init__(self):
+ QtCore.QThread.__init__(self)
+
+- def __del__(self):
+- self.wait()
+-
+ def run(self):
+ install_dir = os.path.join(config.usb_mount, "multibootusb", iso_basename(config.image_path))
+ self.thread = GenericThread(install_progress)
+@@ -797,9 +794,6 @@ class GuiUninstallProgress(QtCore.QThread):
+ QtCore.QThread.__init__(self)
+ self.thread = GenericThread(uninstall_progress)
+
+- def __del__(self):
+- self.wait()
+-
+ def run(self):
+ self.thread.start()
+
+@@ -840,9 +834,6 @@ class DD_Progress(QtCore.QThread):
+ elif platform.system() == 'Windows':
+ self.thread = GenericThread(dd_win)
+
+- def __del__(self):
+- self.wait()
+-
+ def run(self):
+ self.thread.start()
+ while self.thread.isRunning():
+@@ -870,9 +861,6 @@ class GenericThread(QtCore.QThread):
+ self.args = args
+ self.kwargs = kwargs
+
+- def __del__(self):
+- self.wait()
+-
+ def run(self):
+ self.function(*self.args, **self.kwargs)
+ return