commit:     faa876cc70a5314333bf8b1df056a865e752ffb3
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 23 20:46:10 2020 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Wed Sep 23 21:53:52 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faa876cc

sys-apps/hw-probe: disable automatic data upload

Closes: https://bugs.gentoo.org/727034
Package-Manager: Portage-3.0.6, Repoman-3.0.1
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../hw-probe-1.5-disable-automatic-upload.patch    | 36 +++++++++++
 sys-apps/hw-probe/hw-probe-1.5-r1.ebuild           | 64 ++++++++++++++++++++
 sys-apps/hw-probe/hw-probe-1.6_beta2-r1.ebuild     | 70 ++++++++++++++++++++++
 3 files changed, 170 insertions(+)

diff --git 
a/sys-apps/hw-probe/files/hw-probe-1.5-disable-automatic-upload.patch 
b/sys-apps/hw-probe/files/hw-probe-1.5-disable-automatic-upload.patch
new file mode 100644
index 00000000000..4f16c0d87fa
--- /dev/null
+++ b/sys-apps/hw-probe/files/hw-probe-1.5-disable-automatic-upload.patch
@@ -0,0 +1,36 @@
+From 6a211f965c21f1aa2e8612bcd7e2966ce8e8c607 Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <[email protected]>
+Date: Wed, 23 Sep 2020 22:26:45 +0200
+Subject: [PATCH] hw-probe.pl: disable automatic upload
+
+Due security concerns, running 'hw-probe.pl' without any parameters
+shouldn't upload directly by default all data. Instead, the user should
+add '-upload' if he really wants that.
+
+Signed-off-by: Conrad Kostecki <[email protected]>
+---
+ hw-probe.pl | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/hw-probe.pl b/hw-probe.pl
+index b71f250..1bceb0e 100644
+--- a/hw-probe.pl
++++ b/hw-probe.pl
+@@ -217,15 +217,13 @@
+ 
+ if($#ARGV_COPY==-1)
+ { # Run from STDIN
+-    print "Executing hw-probe -all -upload\n\n";
++    print "Executing hw-probe -all\n\n";
+     $Opt{"All"} = 1;
+-    $Opt{"Upload"} = 1;
+ }
+ elsif($#ARGV_COPY==0 and grep { $ARGV_COPY[0] eq $_ } ("-snap", "-flatpak"))
+ { # Run by desktop file
+-    print "Executing hw-probe -all -upload\n\n";
++    print "Executing hw-probe -all\n\n";
+     $Opt{"All"} = 1;
+-    $Opt{"Upload"} = 1;
+     
+     if($SNAP_DESKTOP or $FLATPAK_DESKTOP)
+     { # Desktop

diff --git a/sys-apps/hw-probe/hw-probe-1.5-r1.ebuild 
b/sys-apps/hw-probe/hw-probe-1.5-r1.ebuild
new file mode 100644
index 00000000000..3d73d2db78a
--- /dev/null
+++ b/sys-apps/hw-probe/hw-probe-1.5-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit optfeature readme.gentoo-r1
+
+DESCRIPTION="A tool to probe for hardware, check it's operability and find 
drivers"
+HOMEPAGE="https://github.com/linuxhw/hw-probe/";
+SRC_URI="https://github.com/linuxhw/hw-probe/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+       dev-lang/perl
+       dev-perl/Digest-SHA1
+       net-misc/curl
+       sys-apps/dmidecode
+       sys-apps/edid-decode
+       sys-apps/hwinfo
+       sys-apps/pciutils
+       sys-apps/smartmontools
+       sys-apps/usbutils
+       virtual/perl-Data-Dumper
+"
+
+PATCHES=( "${FILESDIR}/${PN}-1.5-disable-automatic-upload.patch" )
+
+src_compile() {
+       :;
+}
+
+src_install() {
+       default
+
+       readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+       readme.gentoo_print_elog
+
+       optfeature "showing Machine Check Exceptions." app-admin/mcelog
+       optfeature "showing additional I/O statistics." app-admin/sysstat
+       optfeature "showing smart card (reader) information." dev-libs/opensc
+       optfeature "showing Vulkan GPU hardware information." 
dev-util/vulkan-tools
+       optfeature "showing information of attached scanners." 
media-gfx/sane-backends
+       optfeature "showing GPU information provided by MESA." media-libs/mesa
+       optfeature "showing zeroconf statistics." net-dns/avahi
+       optfeature "showing HP printer statistics." net-print/hplip
+       optfeature "showing status about rfkill switches on communication 
devices." net-wireless/rfkill
+       optfeature "showing additional CPU capabilities." sys-apps/cpuid
+       optfeature "showing hard disk (HDD, SSD, ..) capabilities." 
sys-apps/hdparm
+       optfeature "showing available I2C sensors." sys-apps/i2c-tools
+       optfeature "showing additional hardware and system information detected 
by inxi." sys-apps/inxi
+       optfeature "showing information about tested memory for faults." 
sys-apps/memtester
+       optfeature "showing 'Plug & Play' devices." sys-apps/pnputils
+       optfeature "showing systemd boot process information." sys-apps/systemd
+       optfeature "showing ACPI statistics and tables." sys-power/iasl
+       optfeature "showing information about NUMA." sys-process/numactl
+       optfeature "showing additional GPU information provided by MESA progs." 
x11-apps/mesa-progs
+       optfeature "showing available Xinput devices." x11-apps/xinput
+}

diff --git a/sys-apps/hw-probe/hw-probe-1.6_beta2-r1.ebuild 
b/sys-apps/hw-probe/hw-probe-1.6_beta2-r1.ebuild
new file mode 100644
index 00000000000..10f2227e577
--- /dev/null
+++ b/sys-apps/hw-probe/hw-probe-1.6_beta2-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PV="${PV/_/-}"
+MY_PV_BETA="${MY_PV/2/}"
+
+inherit optfeature readme.gentoo-r1
+
+DESCRIPTION="A tool to probe for hardware, check it's operability and find 
drivers"
+HOMEPAGE="https://github.com/linuxhw/hw-probe/";
+SRC_URI="https://github.com/linuxhw/hw-probe/archive/${MY_PV_BETA}.tar.gz -> 
${P}.tar.gz"
+
+S="${WORKDIR}/${PN}-${MY_PV_BETA}"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+       dev-lang/perl
+       dev-perl/Digest-SHA1
+       net-misc/curl
+       sys-apps/dmidecode
+       sys-apps/edid-decode
+       sys-apps/hwinfo
+       sys-apps/pciutils
+       sys-apps/smartmontools
+       sys-apps/usbutils
+       virtual/perl-Data-Dumper
+"
+
+PATCHES=( "${FILESDIR}/${PN}-1.5-disable-automatic-upload.patch" )
+
+src_compile() {
+       :;
+}
+
+src_install() {
+       default
+
+       readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+       readme.gentoo_print_elog
+
+       optfeature "showing Machine Check Exceptions." app-admin/mcelog
+       optfeature "showing additional I/O statistics." app-admin/sysstat
+       optfeature "showing display data channel (ddc) information." 
app-misc/ddcutil
+       optfeature "showing smart card (reader) information." dev-libs/opensc
+       optfeature "showing Vulkan GPU hardware information." 
dev-util/vulkan-tools
+       optfeature "showing information of attached scanners." 
media-gfx/sane-backends
+       optfeature "showing GPU information provided by MESA." media-libs/mesa
+       optfeature "showing zeroconf statistics." net-dns/avahi
+       optfeature "showing HP printer statistics." net-print/hplip
+       optfeature "showing status about rfkill switches on communication 
devices." net-wireless/rfkill
+       optfeature "showing additional CPU capabilities." sys-apps/cpuid
+       optfeature "showing hard disk (HDD, SSD, ..) capabilities." 
sys-apps/hdparm
+       optfeature "showing available I2C sensors." sys-apps/i2c-tools
+       optfeature "showing additional hardware and system information detected 
by inxi." sys-apps/inxi
+       optfeature "showing information about tested memory for faults." 
sys-apps/memtester
+       optfeature "showing 'Plug & Play' devices." sys-apps/pnputils
+       optfeature "showing systemd boot process information." sys-apps/systemd
+       optfeature "showing ACPI statistics and tables." sys-power/iasl
+       optfeature "showing information about NUMA." sys-process/numactl
+       optfeature "showing additional GPU information provided by MESA progs." 
x11-apps/mesa-progs
+       optfeature "showing available Xinput devices." x11-apps/xinput
+}

Reply via email to