[Libosinfo] [PATCH v2] Ditch udev rule
Christophe Fergeau
cfergeau at redhat.com
Wed Aug 26 09:26:48 UTC 2015
ACK with this squashed in:
diff --git a/data/Makefile.am b/data/Makefile.am
index b252036..407cc28 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,7 +1,7 @@
INSTALL_DATA_HOOK_DEPS =
SUBDIRS = datamaps devices oses hypervisors install-scripts schemas
-EXTRA_DIST = usb.ids pci.ids 95-osinfo.rules.in
+EXTRA_DIST = usb.ids pci.ids
CLEANFILES = usb.ids pci.ids
if USE_INTERNAL_USB_IDS
On Mon, Aug 24, 2015 at 06:37:42PM +0100, Zeeshan Ali (Khattak) wrote:
> 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/95-osinfo.rules.in | 2 --
> data/Makefile.am | 12 ------------
> libosinfo.spec.in | 19 +------------------
> 4 files changed, 1 insertion(+), 52 deletions(-)
> delete mode 100644 data/95-osinfo.rules.in
>
> diff --git a/configure.ac b/configure.ac
> index b618ee2..7e7e956 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -121,26 +121,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/95-osinfo.rules.in b/data/95-osinfo.rules.in
> deleted file mode 100644
> index e32811a..0000000
> --- a/data/95-osinfo.rules.in
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="iso9660|udf", \
> - IMPORT{program}="@bindir@/osinfo-detect -f env $tempnode"
> diff --git a/data/Makefile.am b/data/Makefile.am
> index 0d9e959..b252036 100644
> --- a/data/Makefile.am
> +++ b/data/Makefile.am
> @@ -32,17 +32,5 @@ pci_ids_install:
> INSTALL_DATA_HOOK_DEPS += pci_ids_install
> endif
>
> -if WITH_UDEV
> -BUILT_SOURCES = 95-osinfo.rules
> -
> -95-osinfo.rules: 95-osinfo.rules.in
> - sed 's,\@bindir\@,$(exec_prefix)/bin,' $< > $@
> -
> -95-osinfo.rules-install: 95-osinfo.rules
> - $(MKDIR_P) $(DESTDIR)$(UDEV_RULESDIR)
> - $(INSTALL) -m 0644 95-osinfo.rules $(DESTDIR)$(UDEV_RULESDIR)
> -
> -INSTALL_DATA_HOOK_DEPS += 95-osinfo.rules-install
> -endif
>
> install-data-hook: $(INSTALL_DATA_HOOK_DEPS)
> diff --git a/libosinfo.spec.in b/libosinfo.spec.in
> index fc2f2d1..68e1da4 100644
> --- a/libosinfo.spec.in
> +++ b/libosinfo.spec.in
> @@ -10,11 +10,6 @@
> %define with_gir 1
> %endif
>
> -%define with_udev 1
> -%if 0%{?fedora} >= 19
> -%define with_udev 0
> -%endif
> -
> Summary: A library for managing OS information for virtualization
> Name: libosinfo
> Version: @VERSION@
> @@ -37,9 +32,6 @@ BuildRequires: /usr/bin/pod2man
> BuildRequires: gobject-introspection-devel
> %endif
> Requires: hwdata
> -%if %{with_udev}
> -Requires: udev
> -%endif
>
> %description
> libosinfo is a library that allows virtualization provisioning tools to
> @@ -82,13 +74,7 @@ This package provides the Vala bindings for libosinfo library.
> %define gir_arg --enable-introspection=no
> %endif
>
> -%if %{with_udev}
> -%define udev_arg --enable-udev=yes
> -%else
> -%define udev_arg --enable-udev=no
> -%endif
> -
> -%configure %{gir_arg} %{udev_arg} --enable-vala=yes --with-usb-ids-path=/usr/share/hwdata/usb.ids --with-pci-ids-path=/usr/share/hwdata/pci.ids
> +%configure %{gir_arg} --enable-vala=yes --with-usb-ids-path=/usr/share/hwdata/usb.ids --with-pci-ids-path=/usr/share/hwdata/pci.ids
> %__make %{?_smp_mflags} V=1
>
> chmod a-x examples/*.js examples/*.py
> @@ -134,9 +120,6 @@ rm -fr %{buildroot}
> %{_mandir}/man1/osinfo-query.1*
> %{_mandir}/man1/osinfo-install-script.1*
> %{_libdir}/%{name}-1.0.so.*
> -%if %{with_udev}
> -/lib/udev/rules.d/95-osinfo.rules
> -%endif
> %if %{with_gir}
> %{_libdir}/girepository-1.0/Libosinfo-1.0.typelib
> %endif
> --
> 2.4.3
>
> _______________________________________________
> Libosinfo mailing list
> Libosinfo at redhat.com
> https://www.redhat.com/mailman/listinfo/libosinfo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20150826/a7a4693a/attachment.sig>
More information about the Libosinfo
mailing list