Debian package updates
This commit is contained in:
parent
1c5dab4e1c
commit
8bedd5f2c0
4 changed files with 57 additions and 73 deletions
|
|
@ -9,7 +9,7 @@ Vcs-Git: https://github.com/boltgolt/howdy
|
||||||
Package: howdy
|
Package: howdy
|
||||||
Homepage: https://github.com/boltgolt/howdy
|
Homepage: https://github.com/boltgolt/howdy
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}, curl|wget, python3, python3-pip, python3-dev, python3-setuptools, libopencv-dev, cmake
|
Depends: ${misc:Depends}, libc6, libgcc-s1, libpam0g, libstdc++6, curl | wget, python3, python3-pip, python3-dev, python3-setuptools, python3-numpy, python-opencv, libopencv-dev, cmake
|
||||||
Recommends: libatlas-base-dev | libopenblas-dev | liblapack-dev, howdy-gtk
|
Recommends: libatlas-base-dev | libopenblas-dev | liblapack-dev, howdy-gtk
|
||||||
Suggests: nvidia-cuda-dev (>= 7.5)
|
Suggests: nvidia-cuda-dev (>= 7.5)
|
||||||
Description: Howdy: Windows Hello style authentication for Linux.
|
Description: Howdy: Windows Hello style authentication for Linux.
|
||||||
|
|
|
||||||
|
|
@ -40,84 +40,68 @@ def col(id):
|
||||||
# Create shorthand for subprocess creation
|
# Create shorthand for subprocess creation
|
||||||
sc = subprocess.call
|
sc = subprocess.call
|
||||||
|
|
||||||
# We're not in fresh configuration mode so don't continue the setup
|
# If the package is being upgraded
|
||||||
if not os.path.exists("/tmp/howdy_picked_device"):
|
if "upgrade" in sys.argv:
|
||||||
# Check if we have an older config we can restore
|
# If preinst has made a config backup
|
||||||
if len(sys.argv) > 2:
|
if os.path.exists("/tmp/howdy_config_backup_v" + sys.argv[2] + ".ini"):
|
||||||
if os.path.exists("/tmp/howdy_config_backup_v" + sys.argv[2] + ".ini"):
|
# Get the config parser
|
||||||
# Get the config parser
|
import configparser
|
||||||
import configparser
|
|
||||||
|
|
||||||
# Load th old and new config files
|
# Load th old and new config files
|
||||||
oldConf = configparser.ConfigParser()
|
oldConf = configparser.ConfigParser()
|
||||||
oldConf.read("/tmp/howdy_config_backup_v" + sys.argv[2] + ".ini")
|
oldConf.read("/tmp/howdy_config_backup_v" + sys.argv[2] + ".ini")
|
||||||
newConf = configparser.ConfigParser()
|
newConf = configparser.ConfigParser()
|
||||||
newConf.read("/lib/security/howdy/config.ini")
|
newConf.read("/lib/security/howdy/config.ini")
|
||||||
|
|
||||||
# Go through every setting in the old config and apply it to the new file
|
# Go through every setting in the old config and apply it to the new file
|
||||||
for section in oldConf.sections():
|
for section in oldConf.sections():
|
||||||
for (key, value) in oldConf.items(section):
|
for (key, value) in oldConf.items(section):
|
||||||
|
|
||||||
# MIGRATION 2.3.1 -> 2.4.0
|
# MIGRATION 2.3.1 -> 2.4.0
|
||||||
# If config is still using the old device_id parameter, convert it to a path
|
# If config is still using the old device_id parameter, convert it to a path
|
||||||
if key == "device_id":
|
if key == "device_id":
|
||||||
key = "device_path"
|
key = "device_path"
|
||||||
value = "/dev/video" + value
|
value = "/dev/video" + value
|
||||||
|
|
||||||
# MIGRATION 2.4.0 -> 2.5.0
|
# MIGRATION 2.4.0 -> 2.5.0
|
||||||
# Finally correct typo in "timout" config value
|
# Finally correct typo in "timout" config value
|
||||||
if key == "timout":
|
if key == "timout":
|
||||||
key = "timeout"
|
key = "timeout"
|
||||||
|
|
||||||
# MIGRATION 2.5.0 -> 2.5.1
|
# MIGRATION 2.5.0 -> 2.5.1
|
||||||
# Remove unsafe automatic dismissal of lock screen
|
# Remove unsafe automatic dismissal of lock screen
|
||||||
if key == "dismiss_lockscreen":
|
if key == "dismiss_lockscreen":
|
||||||
if value == "true":
|
if value == "true":
|
||||||
print("DEPRECATION: Config value dismiss_lockscreen is no longer supported because of login loop issues.")
|
print("DEPRECATION: Config value dismiss_lockscreen is no longer supported because of login loop issues.")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# MIGRATION 2.6.1 -> 3.0.0
|
# MIGRATION 2.6.1 -> 3.0.0
|
||||||
# Fix capture being enabled by default
|
# Fix capture being enabled by default
|
||||||
if key == "capture_failed" or key == "capture_successful":
|
if key == "capture_failed" or key == "capture_successful":
|
||||||
if value == "true":
|
if value == "true":
|
||||||
print("NOTICE: Howdy login image captures have been disabled by default, change the config to enable them again")
|
print("NOTICE: Howdy login image captures have been disabled by default, change the config to enable them again")
|
||||||
value = "false"
|
value = "false"
|
||||||
|
|
||||||
# MIGRATION 2.6.1 -> 3.0.0
|
# MIGRATION 2.6.1 -> 3.0.0
|
||||||
# Rename config options so they don't do the opposite of what is commonly expected
|
# Rename config options so they don't do the opposite of what is commonly expected
|
||||||
if key == "ignore_ssh":
|
if key == "ignore_ssh":
|
||||||
key = "abort_if_ssh"
|
key = "abort_if_ssh"
|
||||||
if key == "ignore_closed_lid":
|
if key == "ignore_closed_lid":
|
||||||
key = "abort_if_lid_closed"
|
key = "abort_if_lid_closed"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
newConf.set(section, key, value)
|
newConf.set(section, key, value)
|
||||||
# Add a new section where needed
|
# Add a new section where needed
|
||||||
except configparser.NoSectionError:
|
except configparser.NoSectionError:
|
||||||
newConf.add_section(section)
|
newConf.add_section(section)
|
||||||
newConf.set(section, key, value)
|
newConf.set(section, key, value)
|
||||||
|
|
||||||
# Write it all to file
|
# Write it all to file
|
||||||
with open("/lib/security/howdy/config.ini", "w") as configfile:
|
with open("/lib/security/howdy/config.ini", "w") as configfile:
|
||||||
newConf.write(configfile)
|
newConf.write(configfile)
|
||||||
|
|
||||||
# Install dlib data files if needed
|
|
||||||
if not os.path.exists("/lib/security/howdy/dlib-data/shape_predictor_5_face_landmarks.dat"):
|
|
||||||
print("Attempting installation of missing data files")
|
|
||||||
handleStatus(subprocess.call(["./install.sh"], shell=True, cwd="/lib/security/howdy/dlib-data"))
|
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
log("Upgrading pip to the latest version")
|
|
||||||
|
|
||||||
# Update pip
|
|
||||||
handleStatus(sc(["pip3", "install", "--upgrade", "pip"]))
|
|
||||||
|
|
||||||
log("Upgrading numpy to the latest version")
|
|
||||||
|
|
||||||
# Update numpy
|
|
||||||
handleStatus(subprocess.call(["pip3", "install", "--upgrade", "numpy"]))
|
|
||||||
|
|
||||||
log("Downloading and unpacking data files")
|
log("Downloading and unpacking data files")
|
||||||
|
|
||||||
# Run the bash script to download and unpack the .dat files needed
|
# Run the bash script to download and unpack the .dat files needed
|
||||||
|
|
@ -193,10 +177,6 @@ rmtree(DLIB_DIR)
|
||||||
|
|
||||||
print("Temporary dlib files removed")
|
print("Temporary dlib files removed")
|
||||||
|
|
||||||
log("Installing OpenCV")
|
|
||||||
|
|
||||||
handleStatus(subprocess.call(["pip3", "install", "--no-cache-dir", "opencv-python"]))
|
|
||||||
|
|
||||||
log("Configuring howdy")
|
log("Configuring howdy")
|
||||||
|
|
||||||
# Manually change the camera id to the one picked
|
# Manually change the camera id to the one picked
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,13 @@ include /usr/share/dpkg/default.mk
|
||||||
build:
|
build:
|
||||||
# Create build dir
|
# Create build dir
|
||||||
meson setup -Dinih:with_INIReader=true build src/pam
|
meson setup -Dinih:with_INIReader=true build src/pam
|
||||||
# Compile shared object
|
# Compile shared object
|
||||||
meson compile -C build
|
meson compile -C build
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
# Delete mason build directory
|
# Delete mason build directory
|
||||||
rm -rf ./build
|
rm -rf ./build
|
||||||
|
# Force remove temp debian build directory
|
||||||
|
rm -rf ./debian/howdy
|
||||||
|
# Make sure subprojects get pulled locally
|
||||||
|
meson subprojects download --sourcedir src/pam
|
||||||
|
|
|
||||||
2
howdy/src/pam/.gitignore
vendored
2
howdy/src/pam/.gitignore
vendored
|
|
@ -1 +1 @@
|
||||||
subprojects/*/
|
subprojects/inih/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue