diff options
author | j.r | 2022-02-26 23:15:00 +0100 |
---|---|---|
committer | j.r | 2022-02-26 23:16:17 +0100 |
commit | 6a51532a69c6e33e701d7592319111d9192b76f3 (patch) | |
tree | 7a83a1217a1704fa5ebe97f518e39fdd0099a73e | |
parent | a3d8dd29023697e1be28426597498b90f9f03423 (diff) | |
download | aur-6a51532a69c6e33e701d7592319111d9192b76f3.tar.gz |
python-validity: fix YAML loading crash
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 0001-update-dbus-loader-Remove-Loader-from-safe_load.patch | 31 | ||||
-rw-r--r-- | PKGBUILD | 13 |
3 files changed, 44 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = python-validity pkgdesc = Validity fingerprint sensor driver pkgver = 0.12 - pkgrel = 4 + pkgrel = 5 url = https://github.com/uunicorn/python-validity arch = any license = MIT @@ -18,6 +18,8 @@ pkgbase = python-validity provides = python-validity conflicts = python-validity source = https://github.com/uunicorn/python-validity/archive/0.12.tar.gz + source = 0001-update-dbus-loader-Remove-Loader-from-safe_load.patch md5sums = 1e7cb6079b95541dd2dd898c868ec107 + md5sums = ff4cb9a27f8bc75e8a2afbc6fc897c7f pkgname = python-validity diff --git a/0001-update-dbus-loader-Remove-Loader-from-safe_load.patch b/0001-update-dbus-loader-Remove-Loader-from-safe_load.patch new file mode 100644 index 000000000000..13de1c6adac5 --- /dev/null +++ b/0001-update-dbus-loader-Remove-Loader-from-safe_load.patch @@ -0,0 +1,31 @@ +From 8d4a69979cd531f920c9073855fbcb0ca5b81bf1 Mon Sep 17 00:00:00 2001 +From: Takeshi HAMASAKI <hmatrjp@users.sourceforge.jp> +Date: Sat, 14 Aug 2021 08:36:06 +0900 +Subject: [PATCH] update dbus-loader: Remove Loader from safe_load() + +As I commented on the commit c0bf88e, https://github.com/uunicorn/python-validity/commit/c0bf88ea050c446dc12d81a0de8d30a4f81cc797 +python3-validity.service does not start, at least on Debian buster, since +safe_load() does not have arg Loader on its prototype. +Removing Loader here, +config = yaml.safe_load(configfd) +makes it back to normal starting. +--- + dbus_service/dbus-service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dbus_service/dbus-service b/dbus_service/dbus-service +index 7a1a1bc..8655547 100755 +--- a/dbus_service/dbus-service ++++ b/dbus_service/dbus-service +@@ -242,7 +242,7 @@ def main(): + # Load and perform basic validation of config file. + try: + with (args.configpath / 'dbus-service.yaml').open(mode='rt') as configfd: +- config = yaml.load(configfd) ++ config = yaml.safe_load(configfd) + except FileNotFoundError: + # No configuration file. Create default + config = {'user_to_sid': {}} +-- +2.35.1 + @@ -2,7 +2,7 @@ # Contributor: Matthew Murray <matt@mattmurr.xyz> pkgname=python-validity pkgver=0.12 -pkgrel=4 +pkgrel=5 pkgdesc="Validity fingerprint sensor driver" arch=(any) license=(MIT) @@ -12,8 +12,15 @@ makedepends=(python-setuptools) conflicts=($pkgname) provides=($pkgname) url="https://github.com/uunicorn/${pkgname}" -source=("${url}/archive/${pkgver}.tar.gz") -md5sums=('1e7cb6079b95541dd2dd898c868ec107') +source=("${url}/archive/${pkgver}.tar.gz" + "0001-update-dbus-loader-Remove-Loader-from-safe_load.patch") +md5sums=('1e7cb6079b95541dd2dd898c868ec107' + 'ff4cb9a27f8bc75e8a2afbc6fc897c7f') + +prepare() { + cd $srcdir/$pkgname-$pkgver + patch -p1 -i "$srcdir/0001-update-dbus-loader-Remove-Loader-from-safe_load.patch" +} build() { cd $srcdir/$pkgname-$pkgver |