+ umockdev-0.14.4-1

Update to 0.14.4
This commit is contained in:
Bastien Nocera 2020-10-23 16:28:42 +02:00
parent 55548f4819
commit 22a37bbcdb
4 changed files with 8 additions and 47 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@
/0.14.1.tar.gz
/0.14.2.tar.gz
/0.14.3.tar.gz
/0.14.4.tar.gz

View File

@ -1,44 +0,0 @@
From 6b4851b7dafc9015f673d59c692fadd7912e7ad2 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 22 Oct 2020 17:16:03 +0200
Subject: [PATCH] preload: Better debug for functions missing from libc
If finding one of the symbols for a function fails, whichever function
it is, we'd get this error message:
python3: src/libumockdev-preload.c:81: get_libc_func: Assertion `fp' failed.
Update the code to throw an error on stderr before failing.
---
src/libumockdev-preload.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/libumockdev-preload.c b/src/libumockdev-preload.c
index 1011fac..9328dc1 100644
--- a/src/libumockdev-preload.c
+++ b/src/libumockdev-preload.c
@@ -78,15 +78,19 @@ get_libc_func(const char *f)
nextlib = dlopen("libc.so.6", RTLD_LAZY);
fp = dlsym(nextlib, f);
- assert(fp);
return fp;
}
#define libc_func(name, rettype, ...) \
static rettype (*_ ## name) (__VA_ARGS__) = NULL; \
- if (_ ## name == NULL) \
- _ ## name = get_libc_func(#name);
+ if (_ ## name == NULL) { \
+ _ ## name = get_libc_func(#name); \
+ if (_ ## name == NULL) { \
+ fprintf(stderr, "umockdev: could not get libc function "#name"\n"); \
+ abort(); \
+ } \
+ }
/* return rdev of a file descriptor */
static dev_t
--
2.28.0

View File

@ -1 +1 @@
SHA512 (0.14.3.tar.gz) = 20d74adcc25617af1ea7c5e3a9c55192635af2c1df2512a19545b2055ac9657dea6c09715c791039e897b562a51fe8d0d30bd247bdb099251f40211fef065d8d
SHA512 (0.14.4.tar.gz) = aa580a58a1dc251ca3eccd01da107d237040e22d091d2f17fc316e7a33d84cacc927f97241ec229bbf820399ffeb4a0511764dbe9fba0ed7da7c0605d7640d18

View File

@ -1,6 +1,6 @@
Name: umockdev
Version: 0.14.3
Release: 2%{?dist}
Version: 0.14.4
Release: 1%{?dist}
Summary: Mock hardware devices
License: LGPLv2+
@ -85,6 +85,10 @@ rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/umockdev
%{_datadir}/vala/vapi/umockdev-1.0.vapi
%changelog
* Fri Oct 23 2020 Bastien Nocera <bnocera@redhat.com> - 0.14.4-1
+ umockdev-0.14.4-1
- Update to 0.14.4
* Thu Oct 22 2020 Bastien Nocera <bnocera@redhat.com> - 0.14.3-2
+ umockdev-0.14.3-2
- Better debug for missing functions