[PATCH] Ditch udev rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>

New udev/blkid expose more ISO9660 properties that apps can grab and
set on install media for detection to work. As a result our udev rule
becomes redundant.

This improves system bootup time conciderably if there is an ISO9660
media inserted during bootup as our udev rule needed to parse the XML
etc and is therefore pretty slow (keeping in mind that a few seconds are
a long time in the land of modern udev/systemd).
---
 configure.ac      | 20 --------------------
 data/Makefile.am  | 14 +-------------
 libosinfo.spec.in |  4 +---
 3 files changed, 2 insertions(+), 36 deletions(-)

diff --git a/configure.ac b/configure.ac
index cf46f4d..5dedddd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,26 +137,6 @@ if test "x$enable_introspection" = "xyes" ; then
 fi
 AM_CONDITIONAL([WITH_VALA], [test "x$enable_vala" = "xyes"])
 
-AC_ARG_ENABLE([udev],
-        AS_HELP_STRING([--enable-udev], [enable Udev support]),
-        [], [enable_udev=no])
-AM_CONDITIONAL([WITH_UDEV], [test "x$enable_udev" = "xyes"])
-
-AC_ARG_WITH([udev-rulesdir],
-             [AS_HELP_STRING([--with-udev-rulesdir],[UDev rules directory])],
-             [], [])
-
-if test "x$with_udev_rulesdir" = "x"; then
-        if test "x$prefix" = "x/usr" ; then
-                with_udev_rulesdir=/lib/udev/rules.d
-        else
-                with_udev_rulesdir=$prefix/lib/udev/rules.d
-        fi
-fi
-
-UDEV_RULESDIR="$with_udev_rulesdir"
-AC_SUBST(UDEV_RULESDIR)
-
 AC_ARG_ENABLE([coverage],
         AS_HELP_STRING([--enable-coverage], [enable GCC code coverage]),
         [], [enable_coverage=no])
diff --git a/data/Makefile.am b/data/Makefile.am
index 747f0e9..848eeff 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,23 +1,11 @@
 
 SUBDIRS = datamaps devices oses hypervisors install-scripts schemas
 
-EXTRA_DIST = usb.ids pci.ids 95-osinfo.rules.in
+EXTRA_DIST = usb.ids pci.ids
 
 databasedir = $(pkgdatadir)/db/
 database_DATA = usb.ids pci.ids
 
-if WITH_UDEV
-BUILT_SOURCES = 95-osinfo.rules
-
-95-osinfo.rules: 95-osinfo.rules.in
-	sed 's,\@bindir\@,$(exec_prefix)/bin,' $< > $@
-
-install-data-hook: 95-osinfo.rules
-	mkdir -p $(DESTDIR)$(UDEV_RULESDIR)
-	$(INSTALL) -m 0644 95-osinfo.rules $(DESTDIR)$(UDEV_RULESDIR)
-
-endif
-
 CLEANFILES = usb.ids pci.ids
 
 usb.ids:
diff --git a/libosinfo.spec.in b/libosinfo.spec.in
index 9aa9d13..42984ed 100644
--- a/libosinfo.spec.in
+++ b/libosinfo.spec.in
@@ -30,7 +30,6 @@ BuildRequires: libsoup-devel
 %if %{with_gir}
 BuildRequires: gobject-introspection-devel
 %endif
-Requires: udev
 
 %description
 libosinfo is a library that allows virtualization provisioning tools to
@@ -73,7 +72,7 @@ This package provides the Vala bindings for libosinfo library.
 %define gir_arg --enable-introspection=no
 %endif
 
-%configure %{gir_arg} --enable-vala=yes --enable-udev=yes
+%configure %{gir_arg} --enable-vala=yes
 %__make %{?_smp_mflags} V=1
 
 chmod a-x examples/*.js examples/*.py
@@ -119,7 +118,6 @@ rm -fr %{buildroot}
 %{_mandir}/man1/osinfo-query.1*
 %{_mandir}/man1/osinfo-install-script.1*
 %{_libdir}/%{name}-1.0.so.*
-/lib/udev/rules.d/95-osinfo.rules
 %if %{with_gir}
 %{_libdir}/girepository-1.0/Libosinfo-1.0.typelib
 %endif
-- 
1.8.1.2

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux