1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 11:32:03 +00:00
nixpkgs/pkgs/os-specific/linux/udisks/purity.patch

75 lines
3.8 KiB
Diff
Raw Normal View History

diff --git a/data/80-udisks.rules.in b/data/80-udisks.rules.in
index 6720394..60b67ed 100644
--- a/data/80-udisks.rules.in
+++ b/data/80-udisks.rules.in
@@ -23,7 +23,7 @@ LABEL="ata_port_cardbus_end"
# this is the case we can trigger a 'change' on the sas_expander device
# when the bsg device appears)
#
-SUBSYSTEM=="sas_expander", ACTION=="add|change", IMPORT{program}="udisks-probe-sas-expander /sys/%p"
+SUBSYSTEM=="sas_expander", ACTION=="add|change", IMPORT{program}="@slashlibdir@/udev/udisks-probe-sas-expander /sys/%p"
##############################################################################################################
@@ -54,7 +54,7 @@ ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="udisks_end"
# import UDISKS_DM_* and UDISKS_LVM2_* properties - the long-term plan is to make the lvm2 and
# device-mapper packages provide this information
#
-KERNEL=="dm-*", IMPORT{program}="udisks-dm-export %M %m"
+KERNEL=="dm-*", IMPORT{program}="@slashlibdir@/udev/udisks-dm-export %M %m"
# Make udevd synthesize a 'change' uevent when last opener of a rw-fd closes the fd - this
# should be part of the device-mapper rules
@@ -63,7 +63,7 @@ KERNEL=="dm-*", OPTIONS+="watch"
##############################################################################################################
# Probe LVM2 Physical Volumes - this will eventually be part of the LVM2 package
-ENV{ID_FS_TYPE}=="LVM2_member", TEST=="/lib/udev/udisks-lvm-pv-export", IMPORT{program}="udisks-lvm-pv-export $env{ID_FS_UUID}"
+ENV{ID_FS_TYPE}=="LVM2_member", TEST=="@slashlibdir@/udev/udisks-lvm-pv-export", IMPORT{program}="@slashlibdir@/udev/udisks-lvm-pv-export $env{ID_FS_UUID}"
##############################################################################################################
@@ -85,7 +85,7 @@ KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="", GOTO="probe_parttable_e
# scan for partition tables both on whole-disk and partitions
#
-IMPORT{program}="udisks-part-id $tempnode"
+IMPORT{program}="@slashlibdir@/udev/udisks-part-id $tempnode"
LABEL="probe_parttable_end"
@@ -109,13 +109,13 @@ LABEL="md_end"
#
# USB ATA enclosures with a SAT layer
-KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="usb", ENV{DEVTYPE}=="disk", IMPORT{program}="udisks-probe-ata-smart $tempnode"
+KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="usb", ENV{DEVTYPE}=="disk", IMPORT{program}="@slashlibdir@/udev/udisks-probe-ata-smart $tempnode"
# ATA disks driven by libata
-KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="ata", ENV{DEVTYPE}=="disk", IMPORT{program}="udisks-probe-ata-smart $tempnode"
+KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="ata", ENV{DEVTYPE}=="disk", IMPORT{program}="@slashlibdir@/udev/udisks-probe-ata-smart $tempnode"
# ATA disks connected via SAS (not driven by libata)
-KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="scsi", ENV{DEVTYPE}=="disk", ENV{ID_VENDOR}=="ATA", IMPORT{program}="udisks-probe-ata-smart $tempnode"
+KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="scsi", ENV{DEVTYPE}=="disk", ENV{ID_VENDOR}=="ATA", IMPORT{program}="@slashlibdir@/udev/udisks-probe-ata-smart $tempnode"
# Example rule for tagging a device with a specific media type. Where and
diff --git a/data/Makefile.am b/data/Makefile.am
index ca6d8ac..ed9faa3 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -25,7 +25,11 @@ $(dbusconf_DATA): $(dbusconf_in_files) Makefile
cp $< $@
udevrulesdir = $(slashlibdir)/udev/rules.d
-udevrules_DATA = 80-udisks.rules
+udevrules_in_files = 80-udisks.rules.in
+udevrules_DATA = $(udevrules_in_files:.rules.in=.rules)
+
+$(udevrules_DATA): $(udevrules_in_files) Makefile
+ @sed -e "s|\@slashlibdir\@|$(slashlibdir)|g" $< > $@
pkgconfigdir = $(datadir)/pkgconfig
pkgconfig_DATA = udisks.pc