Paolo Bonzini
2014-Aug-19 17:20 UTC
[PATCH 2/2] Install udev rules in system-default directory
Il 07/08/2014 15:09, Amit Shah ha scritto:> +udevrules_DATA = 90-virtio-rng.rulesIf rng-tools is packaged with "make dist" you need this to be dist_udevrules_DATA = 90-virtio-rng.rules or alternatively EXTRA_DIST = 90-virtio-rng.rules udevrules_DATA = 90-virtio-rng.rules> +AC_ARG_WITH([udevrulesdir], > + AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules]), > + [], > + [with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)"/rules.d"]) > +AC_SUBST([udevrulesdir], [$with_udevrulesdir])You can use AM_CONDITIONAL to skip the installation if $with_udevrulesdir is "no" (aka --without-udevrulesdir). Then you'd have EXTRA_DIST = 90-virtio-rng.rules if INSTALL_UDEV_RULES udevrules_DATA = 90-virtio-rng.rules endif I don't know offhand if this works: if INSTALL_UDEV_RULES dist_udevrules_DATA = 90-virtio-rng.rules endif but I think so; you can check with "./configure --without-udevrulesdir && make && make dist". Thanks, Paolo
Amit Shah
2014-Aug-20 04:36 UTC
[PATCH 2/2] Install udev rules in system-default directory
On (Tue) 19 Aug 2014 [19:20:20], Paolo Bonzini wrote:> Il 07/08/2014 15:09, Amit Shah ha scritto: > > +udevrules_DATA = 90-virtio-rng.rules > > If rng-tools is packaged with "make dist" you need this to be > > dist_udevrules_DATA = 90-virtio-rng.rules > > or alternatively > > EXTRA_DIST = 90-virtio-rng.rules > udevrules_DATA = 90-virtio-rng.rules > > > +AC_ARG_WITH([udevrulesdir], > > + AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules]), > > + [], > > + [with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)"/rules.d"]) > > +AC_SUBST([udevrulesdir], [$with_udevrulesdir]) > > You can use AM_CONDITIONAL to skip the installation if > $with_udevrulesdir is "no" (aka --without-udevrulesdir). Then you'd have > > EXTRA_DIST = 90-virtio-rng.rules > if INSTALL_UDEV_RULES > udevrules_DATA = 90-virtio-rng.rules > endif > > I don't know offhand if this works: > > if INSTALL_UDEV_RULES > dist_udevrules_DATA = 90-virtio-rng.rules > endif > > but I think so; you can check with "./configure --without-udevrulesdir > && make && make dist".Thanks! Will give this a shot for curiosity's sake. The khwrngd-based patch has already been merged upstream, so this is now obsolete. Amit
Seemingly Similar Threads
- [PATCH 2/2] Install udev rules in system-default directory
- [PATCH 0/2] rng-tools: add udev rule for virtio-rng
- [PATCH 0/2] rng-tools: add udev rule for virtio-rng
- [PATCH v3 0/3] Add support for disk labels and hotplugging.
- [PATCH v4 0/5] Finish hotplugging support.