From 73d1ad805051db1711515c4c42aef5f65c839c51 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Fri, 14 Feb 2020 22:08:58 +0100 Subject: [PATCH] hw-probe: update to 1.5 --- root-packages/hw-probe/build.sh | 4 +- root-packages/hw-probe/hw-probe.pl.patch | 104 ++++++++++------------- 2 files changed, 49 insertions(+), 59 deletions(-) diff --git a/root-packages/hw-probe/build.sh b/root-packages/hw-probe/build.sh index 3bde4df56..43b042059 100644 --- a/root-packages/hw-probe/build.sh +++ b/root-packages/hw-probe/build.sh @@ -1,9 +1,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/linuxhw/hw-probe TERMUX_PKG_DESCRIPTION="Tool to probe for hardware and check its operability" TERMUX_PKG_LICENSE="GPL-2.0" -TERMUX_PKG_VERSION=1.4 +TERMUX_PKG_VERSION=1.5 TERMUX_PKG_SRCURL=https://github.com/linuxhw/hw-probe/archive/$TERMUX_PKG_VERSION.tar.gz -TERMUX_PKG_SHA256=90f3ea83bf641348b209e4a2a910f65d836ae7828c0be0f660236ea413bc46bb +TERMUX_PKG_SHA256=8bb7d6ff272c1412e26fcfd86e9df5c3e34e1584552404b930c281b8498b25ea TERMUX_PKG_DEPENDS="curl, hwinfo, net-tools, perl" TERMUX_PKG_PLATFORM_INDEPENDENT=true TERMUX_PKG_BUILD_IN_SRC=true diff --git a/root-packages/hw-probe/hw-probe.pl.patch b/root-packages/hw-probe/hw-probe.pl.patch index 237adcc8a..ad67fcb49 100644 --- a/root-packages/hw-probe/hw-probe.pl.patch +++ b/root-packages/hw-probe/hw-probe.pl.patch @@ -1,17 +1,16 @@ -diff -uNr hw-probe-1.4/hw-probe.pl hw-probe-1.4.mod/hw-probe.pl ---- hw-probe-1.4/hw-probe.pl 2018-04-14 17:15:35.000000000 +0300 -+++ hw-probe-1.4.mod/hw-probe.pl 2019-06-26 13:16:14.050656056 +0300 -@@ -81,7 +81,7 @@ - my $URL = "https://linux-hardware.org"; - my $GITHUB = "https://github.com/linuxhw/hw-probe"; +--- ./hw-probe.pl.orig 2020-01-15 12:58:41.000000000 +0100 ++++ ./hw-probe.pl 2020-02-14 21:30:39.736517524 +0100 +@@ -193,7 +193,7 @@ + } + } -my $PROBE_DIR = "/root/HW_PROBE"; +my $PROBE_DIR = "@TERMUX_HOME@/HW_PROBE"; - my $DATA_DIR = $PROBE_DIR."/LATEST/hw.info"; - my $LOG_DIR = $DATA_DIR."/logs"; - my $TEST_DIR = $DATA_DIR."/tests"; -@@ -1285,11 +1285,11 @@ - $Path = $PnpIDs; + + if($Opt{"Snap"}) { + $PROBE_DIR = $ENV{"SNAP_USER_COMMON"}."/HW_PROBE"; +@@ -2624,11 +2624,11 @@ + $Path = $Opt{"PnpIDs"}; } else { - $Path = "/usr/share/hwdata/pnp.ids"; # ROSA Fresh, RELS @@ -24,61 +23,52 @@ diff -uNr hw-probe-1.4/hw-probe.pl hw-probe-1.4.mod/hw-probe.pl } if(not -e $Path) { -@@ -1325,7 +1325,7 @@ +@@ -2664,7 +2664,7 @@ sub readVendorIds() { - my $Path = "/usr/share/hwdata/pci.ids"; + my $Path = "@TERMUX_PREFIX@/share/hwdata/pci.ids"; - if($PciIDs) { - $Path = $PciIDs; -@@ -4232,7 +4232,7 @@ - writeLog($LOG_DIR."/dmesg", $Dmesg); - - listProbe("logs", "xorg.log"); -- my $XLog = readFile("/var/log/Xorg.0.log"); -+ my $XLog = readFile("@TERMUX_PREFIX@/var/log/Xorg.0.log"); - $XLog = hideTags($XLog, "Serial#"); - if(my $HostName = $ENV{"HOSTNAME"}) { - $XLog=~s/ $HostName / NODE /g; -@@ -5817,7 +5817,7 @@ - } - - listProbe("logs", "xorg.log.1"); -- my $XLog_Old = readFile("/var/log/Xorg.0.log.old"); -+ my $XLog_Old = readFile("@TERMUX_PREFIX@/var/log/Xorg.0.log.old"); - $XLog_Old = hideTags($XLog_Old, "Serial#"); - if(my $HostName = $ENV{"HOSTNAME"}) { - $XLog_Old=~s/ $HostName / NODE /g; -@@ -5862,7 +5862,7 @@ - } - } - -- if(-f "/var/log/boot.log") -+ if(-f "/log/boot.log") + if($Opt{"PciIDs"}) { + $Path = $Opt{"PciIDs"}; +@@ -6492,7 +6492,7 @@ + else { - listProbe("logs", "boot.log"); - my $BootLog = clearLog(readFile("/var/log/boot.log")); -@@ -6533,7 +6533,7 @@ + listProbe("logs", "xorg.log"); +- $XLog = readFile("/var/log/Xorg.0.log"); ++ $XLog = readFile("@TERMUX_PREFIX@/var/log/Xorg.0.log"); + + if(not $XLog) { - if($Admin) +@@ -10394,7 +10394,7 @@ + if(enabledLog("xorg.log.1")) + { + listProbe("logs", "xorg.log.1"); +- my $XLog_Old = readFile("/var/log/Xorg.0.log.old"); ++ my $XLog_Old = readFile("@TERMUX_PREFIX@/var/log/Xorg.0.log.old"); + + if(not $XLog_Old) + { +@@ -11233,7 +11233,7 @@ + { + my $MAX_P_LEN = 1000; + +- my $ELog = "/var/log/cups/error_log"; ++ my $ELog = "@TERMUX_PREFIX@/var/log/cups/error_log"; + if(enabledLog("cups_error_log") and -e $ELog) { -- my $ELog = "/var/log/cups/error_log"; -+ my $ELog = "@TERMUX_PREFIX@/var/log/cups/error_log"; - if(-e $ELog) - { - listProbe("logs", "cups_error_log"); -@@ -6541,7 +6541,7 @@ - writeLog($LOG_DIR."/cups_error_log", $CupsError); - } - -- my $ALog = "/var/log/cups/access_log"; -+ my $ALog = "@TERMUX_PREFIX@/var/log/cups/access_log"; - if(-e $ALog) - { - listProbe("logs", "cups_access_log"); -@@ -7169,7 +7169,7 @@ + listProbe("logs", "cups_error_log"); +@@ -11244,7 +11244,7 @@ + writeLog($LOG_DIR."/cups_error_log", $CupsError); + } + +- my $ALog = "/var/log/cups/access_log"; ++ my $ALog = "@TERMUX_PREFIX@/var/log/cups/access_log"; + if(enabledLog("cups_access_log") and -e $ALog) + { + listProbe("logs", "cups_access_log"); +@@ -12246,7 +12246,7 @@ } sub readSdioIds_Sys() {