summaryrefslogtreecommitdiff
path: root/udev/Makefile.in
Commit message (Collapse)AuthorAgeFilesLines
* makefiles: avoid grepZdenek Kabelac2023-02-231-1/+1
| | | | | Avoid getting annoyting grep warning and use just awk to get the value.
* configure.ac: support systemd-run binary pathZdenek Kabelac2023-02-101-3/+3
| | | | | | | | | Allow users to specify their path to systemd-run binary: configure --with-systemd-run=/my/path/system-run By defaults it autodetected in $PATH and fallbacks to: /usr/bin/systemd-run.
* configure.ac: remove some lvmetad leftoversZdenek Kabelac2023-02-101-9/+1
| | | | Remove unused parts of configure and udev rules since lvmetad is gone.
* Revert "makefiles: fix grep warning from make"dev-mcsontos-fix-make-rpmMarian Csontos2023-01-251-1/+1
| | | | | | This reverts commit 92199ad0b98586182a52e2f8cd82c06336e306f1. This breaks make rpm.
* makefiles: fix grep warning from makeZdenek Kabelac2023-01-161-1/+1
| | | | Remove unnecessary '\'.
* new udev autoactivationDavid Teigland2021-10-071-1/+1
| | | | | | | | | | | | | | new udev rule 69-dm-lvm.rules replaces 69-dm-lvm-meta.rules and lvm2-pvscan.service udev rule calls pvscan directly on the added device pvscan output indicates if a complete VG can be activated udev env var LVM_VG_NAME_COMPLETE is used to pass complete VG name from pvscan to the udev rule udev rule uses systemd-run to run vgchange -aay <vgname>
* udev: 69-dm-lvm-metad.rules is still neededMarian Csontos2018-12-061-4/+1
|
* makefiles: updates for less verbosityZdenek Kabelac2018-11-291-2/+3
|
* udev: keep systemd vars on change event in 69-dm-lvm-metad.rules for systemd ↵Martin Wilck2018-04-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reload The current logic that avoids setting SYSTEMD_ALIAS and SYSTEMD_WANTS on "change" events is flawed in the default "systemd background job" configuration. For systemd, it's important that device properties don't change spuriously. If an "add" event starts lvm2-pvscan@.service for a device, and a "change" event follows, removing SYSTEMD_ALIAS and SYSTEMD_WANTS from the udev db, information about unit dependencies between the device and the pvscan service can be lost in systemd, in particular if the daemon configuration is reloaded. Steps to reproduce problem: - create a device with an LVM PV - remove device - add device (generates "add" and "change" uevents for the device) (at this point SYSTEMD_ALIAS and SYSTEMD_WANTS are clear in udev db) - systemctl daemon-reload (systemd reloads udev db) - vgchange -a n - remove device => the lvm2-pvscan@.service for the device is still active although the device is gone. - add device again => the PV is not detected, because systemd sees the lvm2-pvscan@.service as active and thus doesn't restart it. The original purpose of this logic was to avoid volumes being scanned over and over again. With systemd background jobs, that isn't necessary, because systemd will not restart the job as long as it's active. Signed-off-by: Martin Wilck <mwilck@suse.com>
* udev: explicit pvscan rule in 69-dm-lvm-metad.rulesMartin Wilck2018-04-171-3/+4
| | | | | | | | | | | Make the distinction between the cases with and without systemd background jobs explicit in 69-dm-lvm-metad.rules rather than substituting the rule from the Makefile. At this stage, this improves only readibility, at the cost of one GOTO statement. This patch introduces no functional change to the udev rules. Signed-off-by: Martin Wilck <mwilck@suse.com>
* makefiles: use configure varsZdenek Kabelac2017-02-141-1/+1
| | | | Use binaries found in configure.
* makefiles: avoid using vpath for rules filesZdenek Kabelac2016-03-101-2/+1
| | | | | | | | | | | | | Fixing vpath usage as it has been checking for existance of generated file also in the $(scrdir) e.g.: No need to remake target '10-dm.rules.in'; using VPATH name '...' If the $(srcdir) had been also $(builddir) and contained already generated rules file, it's been used instead generating new one. (See: http://make.mad-scientist.net/papers/how-not-to-use-vpath/)
* doc: change fsf addressZdenek Kabelac2016-01-211-1/+1
| | | | | Hmm rpmlint suggest fsf is using a different address these days, so lets keep it up-to-date
* udev: fix missing escape for +Zdenek Kabelac2015-08-121-1/+1
| | | | | Commit 3ea396e9d220cec55fd4e139be7ae486cb4ddb91 missed to escape + which is used by 'sed' as separator for 's'.
* udev: use += for SYSTEMD_WANTS instead of =Thomas Bächler2015-08-121-1/+1
| | | | | Instead of using = to override SYSTEMD_WANTS, use += to add the pvscan service.
* makefiles: compile files on makeZdenek Kabelac2014-04-181-0/+2
| | | | Make install should install already compiled/generated files.
* udev: run pvscan --cache via systemd-run in udev if the PV label is detected ↵Peter Rajnoha2014-03-051-1/+1
| | | | | | | | | | | | | | | | | lost If the PV label is lost (e.g. by doing a dd on the device), call "systemd-run pvscan --cache <major>:<minor>" in 69-dm-lvm-metad.rules to inform lvmetad about this state. The reason for this is that ENV{SYSTEMD_WANTS}="lvm2-pvscan@<major>:<minor>" logic will not cause the pvscan to be fired in this case since this works only on proper device addition/removal cycle - the lvm2-pvscan service's ExecStop is called only on proper REMOVE event - the service is bound to device existence. Hence we need pvscan call via systemd-run (that instantiates a quick transient service just to call the command). See also https://bugzilla.redhat.com/show_bug.cgi?id=1063813.
* make: correct sed line in udev's MakefilePeter Rajnoha2013-10-221-3/+1
|
* udev+systemd: refine lvm2-pvscan@.service to better track device existencePeter Rajnoha2013-10-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using ENV{SYSTEMD_WANTS}=lvm2-pvscan@... to instantiate a service for lvmetad scan when the new PV appears in the system, the service is started and executed. However, to track device removal, we need to bind it (the "BindsTo" systemd directive) to a certain .device systemd unit. In default systemd setup, the device is tracked by it's name and sysfs path (there's normally a sysfs path .device systemd unit for a device and then the device name .device unit as an alias for it). Neither of these two is useful for lvmetad update as we need to bind it to device's <major>:<minor> pair. The /dev/block/<major>:<minor> is the essential symlink under /dev that exists for each block device (created by default udev rules provided by udev directly). So let's use this as an alias for the device's .device unit as well by means of "ENV{SYSTEMD_ALIAS}" declaration within udev rules which systemd understands (this will create a new alias "dev-block-<major>:<minor>.device". Then we can easily bind the "dev-block-<major>:<minor>" device systemd unit with instantiated lvm2-pvscan@<major>:<minor>.service. So once the device is removed from the systemd, the lvm-pvscan@<major>:<minor>.service executes it's ExecStop action (which in turn notifies lvmetad about the device being gone). This completes the udev-systemd-lvmetad interaction then.
* udev+systemd: make pvscan --cache -aay run as systemd background job from udevPeter Rajnoha2013-10-181-1/+7
| | | | | | | | | | | | | | | | | | | The new lvm2-pvscan@.service is responsible for on-demand execution of "pvscan --cache --activate ay" which causes lvmetad to be updated and LVM activation done if the VG is complete. Also, use udev-systemd mechanism to instantiate the job as the lvm2-pvscan@$devnode.service on each newly appeared PV in the system. This prevents the background job to be killed (that would happen if it was directly forked from udev rule - this behaviour is seen in recent versions of udev with the help of systemd that can track detached processes - the detached process would still be in the same cgroup). To enable this official udev-systemd protocol for instantiating background jobs, use new --enable-udev-systemd-background-jobs configure switch (it's disabled by default). This option is highly recommended wherever systemd is used!
* udev: udev rules cleanupPeter Rajnoha2012-06-271-11/+22
| | | | | | | | | | | | | | | | Remove executable path detection in udev rules and use sbindir that is configured, but still provide the original functionality by means of 'configure --enable-udev-rule-exec-detection'. Normally, the exec path for the tools called in udev rules should not differ from the sbindir used, however, there are cases this is necessary. For example different environments could be assembled in a way that these path differ for some reason (distribution installer, initrd ...). This functionality is kept for compatibility only. Any environment moving the binaries around and using different paths should be fixed eventually!
* Add skeleton for lvmetad udev rules - 69-dm-lvm-metad.rules.Peter Rajnoha2012-02-241-0/+4
| | | | | | | | | | | | | | | | | | | | Why using the order 69: - Storage processing in general happens in 60-persistent-storage.rules, including the blkid call that adds some usable information we can use for filtering and speedup (these rules are part of upstream udev and the order is preserved on most distros) - There's still some other storage-related processing done after 60-persistent-storage.rules in general. These might add some detailed storage-related information we might use to filter devices effectively (e.g. MD udev rules, ...). - We need lvmetad rules to be processed before any consumers can use the output - so the metadata cache is ready soon enough (e.g. udisks rules). - There's no official (upstream udev) document about assigning the order, so this number is chosen in best belief it will suit all scenarios.
* Clean intermediate files.Peter Rajnoha2012-02-231-1/+1
|
* Call built-in blkid conditionaly (udev version >= 176), call standard blkidPeter Rajnoha2012-02-201-1/+7
| | | | with full path otherwise.
* Update install rules for udev.Zdenek Kabelac2010-04-091-18/+7
| | | | | | | | | | | | Fix unwanted modification of $(top_builddir)/make.tmpl. Using dependency rules to install rules for udev. There is minor problem, with concurent usage of builddir and srcdir could lead to missuse of 10-dm.rules which could be found in VPATH from different builddir. However current solution uses intermediate target so the generated 10-dm.rules exists only for short period of time during make install execution.
* Use vpath instead of VPATH.Zdenek Kabelac2010-04-091-1/+2
| | | | | | | | | | | | | | | Usage of VPATH makes troubles when used within $(builddir). Not only source files are being found through VPATH, but targets as well. (make --debug=v) Thus if user builds the code in $(srcdir) and also in some $(builddir) he gets mangled results as some generated files (i.e. .export.sym) are 'reused' from $(srcdir) instead of $(builddir). This patch switches to use vpath were we could explicitly name suffixes that should be looked via vpath - we must take care, we do not generate files with these suffixes: .c, .in, .po, .exported_symbols
* Install generated 10-dm.rules from builddir.Zdenek Kabelac2010-03-311-1/+2
| | | | | Patch just check whether file is generated in builddir otherwise srcdir file is used.
* Use $(top_builddir) for inclusion of make.tmpl in Makefiles.Zdenek Kabelac2010-03-041-1/+1
|
* Several changes to udev support code:Peter Rajnoha2009-10-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | - we have these levels when the udev rules are processed: 10-dm.rules --> [11-dm-<subsystem>.rules] --> [12-dm-permissions.rules] --> 13-dm-disk.rules --> [...all the other foreign rules...] --> 95-dm-notify.rules - each level can be disabled now by DM_UDEV_DISABLE_{DM, SUBSYSTEM, DISK, OTHER}_RULES_FLAG - add DM_UDEV_DISABLE_DM_RULES_FLAG to disable 10-dm.rules - add DM_UDEV_DISABLE_OTHER_RULES_FLAG to disable all the other (non-dm) rules. We cutoff these rules by using the 'last_rule', so this one should really be used with great care and in well-founded situations. We use this for lvm's hidden and layer devices now. - add a parameter for add_dev_node, rm_dev_node and rename_dev_node so it's possible to switch on/off udev checks - use DM_UDEV_DISABLE_DM_RULES_FLAG and DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG if there's no cookie set and we have resume, remove and rename ioctl. This could happen when someone uses the libdevmapper that is compiled with udev_sync but the software does not make use of it. This way we can switch off the rules and fallback to libdevmapper node creation so there's no udev/libdevmapper race.
* Allow for a build directory separate from the source.Alasdair Kergon2009-10-021-6/+7
|
* Add default udev rules.Alasdair Kergon2009-08-031-0/+29
| | | | Update dm-ioctl.h comments.
* dummy makefile for now to keep builds happyAlasdair Kergon2009-07-311-0/+16