makedeb


ventoy-bin 1.0.99-0


An utility to directly boot image files without reformating the USB

Click here to go back to the commit logs for ventoy-bin.

Commit:


Hash: bdc18e4b62e3a6ab7653b2068d1d8804fb063e60

Message: patch log location; remove warning about web ui

Diff


diff --git a/.SRCINFO b/.SRCINFO
index b56c0e2..be5f405 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,8 @@
 pkgbase = ventoy-bin
 	pkgdesc = A new multiboot USB solution (Binary)
 	pkgver = 1.0.36
-	pkgrel = 3
+	pkgrel = 4
 	url = http://www.ventoy.net/
-	install = ventoy.install
 	arch = i686
 	arch = x86_64
 	license = GPL3
@@ -17,10 +16,12 @@ pkgbase = ventoy-bin
 	conflicts = ventoy
 	source = https://github.com/ventoy/Ventoy/releases/download/v1.0.36/ventoy-1.0.36-linux.tar.gz
 	source = ventoy
+	source = ventoyweb
 	source = sanitize.patch
 	sha256sums = 4d3da8b7e1464e11e7325c5693fe92d6d086007f794c5de8c101e2661d494c58
 	sha256sums = 1ad5d314e02b84127a5a59f3871eb1d28617218cad07cde3eeddcac391473000
-	sha256sums = 27d6865faadd1d12958f864a2fcd17f9e73f50dbfd0d85cedf4c48585752a62d
+	sha256sums = c3d4463a878a89d96e5f0bc4e1a43e48f27af5965bd4c977567695d7cf91fe5f
+	sha256sums = 30238ab336160993b7ddc3987b3bf1671ad981b5a82043199f174a05f275cf1a
 
 pkgname = ventoy-bin
 
diff --git a/.gitignore b/.gitignore
index cff6491..947bfc9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,5 +6,5 @@
 !PKGBUILD
 !.SRCINFO
 !ventoy
+!ventoyweb
 !sanitize.patch
-!ventoy.install
diff --git a/PKGBUILD b/PKGBUILD
index 2ab6660..c597241 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
 
 pkgname=ventoy-bin
 pkgver=1.0.36
-pkgrel=3
+pkgrel=4
 pkgdesc='A new multiboot USB solution (Binary)'
 url='http://www.ventoy.net/'
 arch=('i686' 'x86_64')
@@ -13,11 +13,11 @@ depends=('bash' 'util-linux' 'xz' 'exfat-utils' 'dosfstools' 'lib32-glibc')
 provides=("${pkgname%-bin}")
 conflicts=("${pkgname%-bin}")
 source=("https://github.com/ventoy/Ventoy/releases/download/v${pkgver}/${pkgname%-bin}-${pkgver}-linux.tar.gz"
-        "${pkgname%-bin}" 'sanitize.patch')
-install="${pkgname%-bin}.install"
+        "${pkgname%-bin}" "${pkgname%-bin}web" 'sanitize.patch')
 sha256sums=('4d3da8b7e1464e11e7325c5693fe92d6d086007f794c5de8c101e2661d494c58'
             '1ad5d314e02b84127a5a59f3871eb1d28617218cad07cde3eeddcac391473000'
-            '27d6865faadd1d12958f864a2fcd17f9e73f50dbfd0d85cedf4c48585752a62d')
+            'c3d4463a878a89d96e5f0bc4e1a43e48f27af5965bd4c977567695d7cf91fe5f'
+            '30238ab336160993b7ddc3987b3bf1671ad981b5a82043199f174a05f275cf1a')
 
 prepare() {
   msg2 "Decompress tools..."
@@ -33,6 +33,7 @@ prepare() {
   msg2 "Applying sanitize patch..."
   cd ../..
   patch --verbose -p0 < "$srcdir/sanitize.patch"
+  sed -i 's|log\.txt|/var/log/ventoy.log|g' WebUI/static/js/languages.js
 
   msg2 "Cleaning up unused binaries..."
   rm -fv tool/$CARCH/{mkextfatfs_{32,64},mount.exfat-fuse_{32,64},ash,hexdump,xzcat}
@@ -58,5 +59,5 @@ package() {
   ln -svf /usr/bin/mount.exfat-fuse "$pkgdir/opt/${pkgname%-bin}/tool/mount.exfat-fuse_64"
 
   msg2 "Creating /usr/bin entries..."
-  install -Dm755 "$srcdir/${pkgname%-bin}" -t "$pkgdir"/usr/bin/
+  install -Dm755 "$srcdir/${pkgname%-bin}"{,web} -t "$pkgdir"/usr/bin/
 }
diff --git a/sanitize.patch b/sanitize.patch
index 43caee1..2024eef 100644
--- a/sanitize.patch
+++ b/sanitize.patch
@@ -6,8 +6,17 @@ Let me do some optimisations.
 If you are interested to improve this patch, welcome to mail me.
 
 diff -ru --color old/tool/ventoy_lib.sh new/tool/ventoy_lib.sh
---- tool/ventoy_lib.sh	2021-01-06 15:01:53.769565092 +0100
-+++ tool/ventoy_lib.sh	2021-01-06 15:02:54.579355808 +0100
+--- tool/ventoy_lib.sh	2021-02-28 17:38:10.896891394 +0100
++++ tool/ventoy_lib.sh	2021-02-28 17:40:59.206686303 +0100
+@@ -29,7 +29,7 @@
+ }
+ 
+ vtdebug() {
+-    echo "$*" >> ./log.txt
++    echo "$*" >>/var/log/ventoy.log
+ }
+ 
+ vtoy_gen_uuid() {
 @@ -52,30 +52,6 @@
  
  check_tool_work_ok() {
@@ -39,9 +48,30 @@ diff -ru --color old/tool/ventoy_lib.sh new/tool/ventoy_lib.sh
      vtdebug "tool check success ..."
      ventoy_true
  }
+@@ -264,7 +240,7 @@
+     else
+     vtdebug "format disk by fdisk ..."
+     
+-fdisk $DISK >>./log.txt 2>&1 <<EOF
++fdisk $DISK >>/var/log/ventoy.log 2>&1 <<EOF
+ o
+ n
+ p
+diff -ru --color old/tool/VentoyWorker.sh new/tool/VentoyWorker.sh
+--- tool/VentoyWorker.sh	2021-02-28 17:38:24.396873895 +0100
++++ tool/VentoyWorker.sh	2021-02-28 17:41:08.906675262 +0100
+@@ -96,7 +96,7 @@
+ if check_tool_work_ok; then
+     vtdebug "check tool work ok"
+ else
+-    vterr "Some tools can not run on current system. Please check log.txt for details."
++    vterr "Some tools can not run on current system. Please check /var/log/ventoy.log for details."
+     exit 1
+ fi
+ 
 diff -ru --color old/Ventoy2Disk.sh new/Ventoy2Disk.sh
---- Ventoy2Disk.sh	2021-01-06 15:02:09.699509722 +0100
-+++ Ventoy2Disk.sh	2021-01-06 15:04:23.009060704 +0100
+--- Ventoy2Disk.sh	2021-02-28 17:38:39.106855053 +0100
++++ Ventoy2Disk.sh	2021-02-28 17:41:14.176669295 +0100
 @@ -30,46 +30,4 @@
  echo '**********************************************'
  echo ''
@@ -90,3 +120,30 @@ diff -ru --color old/Ventoy2Disk.sh new/Ventoy2Disk.sh
 -    fi
 -fi
 +./tool/VentoyWorker.sh $*
+diff -ru --color old/VentoyWeb.sh new/VentoyWeb.sh
+--- VentoyWeb.sh	2021-02-28 17:38:47.476844437 +0100
++++ VentoyWeb.sh	2021-02-28 17:41:18.036664939 +0100
+@@ -15,12 +15,6 @@
+     echo ""
+ }
+ 
+-uid=$(id -u)
+-if [ $uid -ne 0 ]; then
+-    print_err "Please use sudo or run the script as root."
+-    exit 1
+-fi
+-
+ OLDDIR=$(pwd)
+ 
+ if uname -a | egrep -q 'aarch64|arm64'; then
+@@ -82,8 +76,8 @@
+     exit 1
+ fi
+ 
+-LOGFILE=log.txt
+-#delete the log.txt if it's more than 8MB
++LOGFILE=/var/log/ventoy.log
++#delete the ventoy.log if it's more than 8MB
+ if [ -f $LOGFILE ]; then
+     logsize=$(stat -c '%s' $LOGFILE)
+     if [ $logsize -gt 8388608 ]; then
diff --git a/ventoy.install b/ventoy.install
deleted file mode 100644
index 6ae0885..0000000
--- a/ventoy.install
+++ /dev/null
@@ -1,9 +0,0 @@
-post_upgrade() {
-    [ $(vercmp $2 1.0.36) -eq -1 ] && post_install
-}
-
-post_install() {
-    echo -e "\e[1;32m==>\e[0;1m  ventoy-bin"
-    echo -e "\e[1;34m  ->\e[0;1m Please note that usage of the newly added web UI is not yet recommended."
-    echo -e "\e[1;34m  ->\e[0;1m It needs to be adapted to the Arch Linux file system hierarchy first."
-}
diff --git a/ventoyweb b/ventoyweb
new file mode 100755
index 0000000..fefe649
--- /dev/null
+++ b/ventoyweb
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd /opt/ventoy || exit 1
+exec ./VentoyWeb.sh "$@"