Package init
This commit is contained in:
commit
badf0da409
42
fix-test-assertion-with-umockdev.patch
Normal file
42
fix-test-assertion-with-umockdev.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From bf8664a028d8cbc55f9dbc65fef926e2119b9579 Mon Sep 17 00:00:00 2001
|
||||||
|
From: James Clarke <jrtc27@jrtc27.com>
|
||||||
|
Date: Tue, 23 Jan 2018 21:03:51 +0000
|
||||||
|
Subject: tests: Fix test assertion with umockdev
|
||||||
|
|
||||||
|
Since 0.9.4, rather than checking for libumockdev-preload being in
|
||||||
|
LD_PRELOAD, umockdev_in_mock_environment now checks whether /sys is
|
||||||
|
being redirected. This only occurs when $UMOCKDEV_DIR is set, which
|
||||||
|
happens inside umockdev_testbed_new, so the assertion must come after
|
||||||
|
this call.
|
||||||
|
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=792845
|
||||||
|
---
|
||||||
|
tests/test-enumerator-filter.c | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test-enumerator-filter.c b/tests/test-enumerator-filter.c
|
||||||
|
index 9c97903..dfcdba2 100644
|
||||||
|
--- a/tests/test-enumerator-filter.c
|
||||||
|
+++ b/tests/test-enumerator-filter.c
|
||||||
|
@@ -37,6 +37,9 @@ test_enumerator_filter (void)
|
||||||
|
/* create test bed */
|
||||||
|
UMockdevTestbed *testbed = umockdev_testbed_new ();
|
||||||
|
|
||||||
|
+ /* Relies on a test bed having been set up */
|
||||||
|
+ g_assert (umockdev_in_mock_environment ());
|
||||||
|
+
|
||||||
|
/* Add 2 devices in the USB subsystem, and one in the DRM subsystem */
|
||||||
|
umockdev_testbed_add_device (testbed, "usb", "dev1", NULL,
|
||||||
|
"idVendor", "0815", "idProduct", "AFFE", NULL,
|
||||||
|
@@ -74,8 +77,6 @@ int main(int argc, char **argv)
|
||||||
|
setlocale (LC_ALL, NULL);
|
||||||
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
|
- g_assert (umockdev_in_mock_environment ());
|
||||||
|
-
|
||||||
|
g_test_add_func ("/gudev/enumerator_filter", test_enumerator_filter);
|
||||||
|
|
||||||
|
return g_test_run ();
|
||||||
|
--
|
||||||
|
cgit v0.12
|
||||||
|
|
||||||
BIN
libgudev-232.tar.xz
Normal file
BIN
libgudev-232.tar.xz
Normal file
Binary file not shown.
67
libgudev.spec
Normal file
67
libgudev.spec
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
Name: libgudev
|
||||||
|
Version: 232
|
||||||
|
Release: 5
|
||||||
|
Summary: Library that provides GObject bindings for libudev
|
||||||
|
License: LGPLv2+
|
||||||
|
URL: https://wiki.gnome.org/Projects/libgudev
|
||||||
|
Source0: https://download.gnome.org/sources/libgudev/%{version}/%{name}-%{version}.tar.xz
|
||||||
|
Patch1: fix-test-assertion-with-umockdev.patch
|
||||||
|
|
||||||
|
BuildRequires: glib2-devel umockdev-devel gobject-introspection-devel pkgconfig libudev-devel gtk-doc
|
||||||
|
Provides: libgudev1 = %{version}-%{release}
|
||||||
|
Obsoletes: libgudev1
|
||||||
|
|
||||||
|
%description
|
||||||
|
Library provides GObject bindings for libudev. It used to be part
|
||||||
|
of udev, then merged into systemd. It's now a project on its own.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Include files and Header files for %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Provides: libgudev1-devel = %{version}-%{release}
|
||||||
|
Obsoletes: libgudev1-devel
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The %{name}-devel package contains libraries and header files for
|
||||||
|
developing applications that use %{name}.
|
||||||
|
|
||||||
|
%package_help
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure --enable-gtk-doc
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
%delete_la
|
||||||
|
|
||||||
|
%check
|
||||||
|
make check
|
||||||
|
|
||||||
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%license COPYING
|
||||||
|
%{_libdir}/girepository-1.0/*
|
||||||
|
%{_libdir}/libgudev-1.0.so.*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_libdir}/libgudev-1.0.so
|
||||||
|
%{_libdir}/pkgconfig/gudev-1.0.pc
|
||||||
|
%{_includedir}/gudev-1.0/gudev/*.h
|
||||||
|
%{_datadir}/gir-1.0/GUdev-1.0.gir
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%doc NEWS
|
||||||
|
%dir %{_datadir}/gtk-doc/html/gudev
|
||||||
|
%{_datadir}/gtk-doc/html/gudev/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Sep 5 2019 openEuler Buildteam <buildteam@openeuler.org> - 232-5
|
||||||
|
- Package init
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user