From b8c1730f65974d67be6916dee6520adc234267b1 Mon Sep 17 00:00:00 2001 From: boltgolt Date: Fri, 9 Nov 2018 15:45:59 +0100 Subject: [PATCH] Removed link to collect data about camera --- debian/control | 2 +- debian/postinst | 48 ++---------------------------------------------- 2 files changed, 3 insertions(+), 47 deletions(-) diff --git a/debian/control b/debian/control index 812792b..31cb6a9 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Vcs-Git: https://github.com/boltgolt/howdy Package: howdy Homepage: https://github.com/boltgolt/howdy Architecture: all -Depends: ${misc:Depends}, git, python3, python3-pip, python3-dev, python3-setuptools, libpam-python, fswebcam, libopencv-dev, python-opencv +Depends: ${misc:Depends}, git, python3, python3-pip, python3-dev, python3-setuptools, libpam-python, fswebcam, libopencv-dev, python-opencv, cmake Description: Howdy: Windows Hello style authentication for Linux. Use your built-in IR emitters and camera in combination with face recognition to prove who you are. diff --git a/debian/postinst b/debian/postinst index b80b0b9..7812aeb 100755 --- a/debian/postinst +++ b/debian/postinst @@ -80,25 +80,9 @@ log("Upgrading pip to the latest version") # Update pip handleStatus(subprocess.call(["pip3 install --upgrade pip"], shell=True)) -log("Cloning dlib") - -# Clone the dlib git to /tmp, but only the last commit -# handleStatus(subprocess.call(["git", "clone", "--depth", "1", "https://github.com/davisking/dlib.git", "/tmp/dlib_clone"])) - -log("Building dlib") - -# Start the build without GPU -# handleStatus(subprocess.call(["cd /tmp/dlib_clone/; python3 setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA"], shell=True)) - -log("Cleaning up dlib") - -# Remove the no longer needed git clone -handleStatus(subprocess.call(["rm", "-rf", "/tmp/dlib_clone"])) -print("Temporary dlib files removed") - log("Installing python dependencies") -# Install face_recognition though pip +# Install exact dependencies through pip handleStatus(subprocess.call(["pip3", "install", "--cache-dir", "/tmp/pip_howdy", "face_recognition_models==0.3.0", "Click>=6.0", "numpy", "Pillow", "dlib", "opencv-python"])) log("Installing face_recognition") @@ -198,33 +182,5 @@ common_auth = open("/etc/pam.d/common-auth", "w") common_auth.write("".join(outlines)) common_auth.close() -# From here onwards the installation is complete -# We want to gather more information about the types or IR camera's -# used though, and the following lines are data gathering -# No data is ever uploaded without permission - -if "HOWDY_NO_PROMPT" not in os.environ: - # List all video devices - diag_out = "Video devices [IR=" + picked + "]\n" - diag_out += "```\n" - diag_out += subprocess.check_output(['ls /dev/ | grep video'], shell=True).decode("utf-8") - diag_out += "```\n" - - # Get some info from the USB kernel listings - diag_out += "Lsusb output\n" - diag_out += "```\n" - diag_out += subprocess.check_output(['lsusb -vvvv | grep -i "Camera\|iFunction"'], shell=True).decode("utf-8") - diag_out += "```\n" - - # Get camera information from video4linux - diag_out += "Udevadm\n" - diag_out += "```\n" - diag_out += subprocess.check_output(['udevadm info -r --query=all -n /dev/video' + picked + ' | grep -i "ID_BUS\|ID_MODEL_ID\|ID_VENDOR_ID\|ID_V4L_PRODUCT\|ID_MODEL"'], shell=True).decode("utf-8") - diag_out += "```" - - # Print it all as a clickable link to a new github issue - print("https://github.com/boltgolt/howdy-reports/issues/new?title=Post-installation%20camera%20information&body=" + urllib.parse.quote_plus(diag_out) + "\n") - -# Let the user know what to do with the link +# Sign off print("Installation complete.") -print(col(2) + "If you want to help the development, please use the link above to post some camera-related information to github!" + col(0))