summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorYegor Yefremov <yegor_sub1@visionsystems.de>2011-07-22 16:58:19 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2011-07-27 21:07:54 +0200
commit1f2879ccb7ebb13fed94607da3c8a27506a18e5b (patch)
treeea17492d9e3cec45f7d2bcba6ecbabc1daf29de2 /package
parent4ee9d569f9ae5da199b6e64a45d83dc6aa9c78ce (diff)
usbmount fixes
- create mounting points - fix dependencies - fix udev rules - fix fs type detection [Peter: fix Config.in deps, create usb7, only remove /media/usb?] Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package')
-rw-r--r--package/usbmount/Config.in8
-rw-r--r--package/usbmount/usbmount-fstype-detection-fix.patch25
-rw-r--r--package/usbmount/usbmount-rules-fix.patch19
-rw-r--r--package/usbmount/usbmount.mk17
4 files changed, 65 insertions, 4 deletions
diff --git a/package/usbmount/Config.in b/package/usbmount/Config.in
index 33e1f05f9..dbbc72d0a 100644
--- a/package/usbmount/Config.in
+++ b/package/usbmount/Config.in
@@ -1,9 +1,17 @@
config BR2_PACKAGE_USBMOUNT
bool "usbmount"
+ depends on BR2_LARGEFILE # util-linux
+ depends on BR2_USE_WCHAR # util-linux
select BR2_PACKAGE_UDEV
select BR2_PACKAGE_LOCKFILE_PROGS
+ select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # util-linux
+ select BR2_PACKAGE_UTIL_LINUX
+ select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
help
The usbmount package automatically mounts USB mass storage devices
when they are plugged in, and unmounts them when they are removed.
http://usbmount.alioth.debian.org/
+
+comment "usbmount requires a toolchain with LARGEFILE + WCHAR support"
+ depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
diff --git a/package/usbmount/usbmount-fstype-detection-fix.patch b/package/usbmount/usbmount-fstype-detection-fix.patch
new file mode 100644
index 000000000..a3686f1c4
--- /dev/null
+++ b/package/usbmount/usbmount-fstype-detection-fix.patch
@@ -0,0 +1,25 @@
+newer blkid version shows two parameter with TYPE within:
+
+/dev/sda1: VERSION="0.0" TYPE="ext2" USAGE="filesystem" PART_ENTRY_SCHEME="dos"
+PART_ENTRY_TYPE="0xc" PART_ENTRY_FLAGS="0x80" PART_ENTRY_NUMBER="1"
+
+change regular expression to take " TYPE" only
+
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+---
+ usbmount | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: b/usbmount
+===================================================================
+--- a/usbmount
++++ b/usbmount
+@@ -88,7 +88,7 @@
+ # FIXME: improvement: implement mounting by label (notice that labels
+ # can contain spaces, which makes things a little bit less comfortable).
+ DEVINFO=$(/sbin/blkid -p $DEVNAME)
+- FSTYPE=$(echo "$DEVINFO" | sed 's/.*TYPE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;')
++ FSTYPE=$(echo "$DEVINFO" | sed 's/.* TYPE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;')
+ UUID=$(echo "$DEVINFO" | sed 's/.*UUID="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;')
+ USAGE=$(echo "$DEVINFO" | sed 's/.*USAGE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;')
+
diff --git a/package/usbmount/usbmount-rules-fix.patch b/package/usbmount/usbmount-rules-fix.patch
new file mode 100644
index 000000000..c71b613c8
--- /dev/null
+++ b/package/usbmount/usbmount-rules-fix.patch
@@ -0,0 +1,19 @@
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+---
+ usbmount.rules | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: b/usbmount.rules
+===================================================================
+--- a/usbmount.rules
++++ b/usbmount.rules
+@@ -1,7 +1,7 @@
+ # Rules for USBmount -*- conf -*-
+
+ KERNEL=="sd*", DRIVERS=="sbp2", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add"
+-KERNEL=="sd*", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add"
+-KERNEL=="ub*", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add"
++KERNEL=="sd*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add"
++KERNEL=="ub*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add"
+ KERNEL=="sd*", ACTION=="remove", RUN+="/usr/share/usbmount/usbmount remove"
+ KERNEL=="ub*", ACTION=="remove", RUN+="/usr/share/usbmount/usbmount remove"
diff --git a/package/usbmount/usbmount.mk b/package/usbmount/usbmount.mk
index abe349dcf..0f93e5bab 100644
--- a/package/usbmount/usbmount.mk
+++ b/package/usbmount/usbmount.mk
@@ -6,20 +6,29 @@
USBMOUNT_VERSION = 0.0.21
USBMOUNT_SOURCE = usbmount_$(USBMOUNT_VERSION).tar.gz
USBMOUNT_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/u/usbmount
-USBMOUNT_DEPENDENCIES = udev lockfile-progs
+USBMOUNT_DEPENDENCIES = udev lockfile-progs util-linux
define USBMOUNT_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D $(@D)/usbmount $(TARGET_DIR)/usr/share/usbmount/usbmount
+
+ $(INSTALL) -m 0755 -D $(@D)/00_create_model_symlink \
+ $(TARGET_DIR)/etc/usbmount/usbmount.d/00_create_model_symlink
+ $(INSTALL) -m 0755 -D $(@D)/00_remove_model_symlink \
+ $(TARGET_DIR)/etc/usbmount/usbmount.d/00_remove_model_symlink
+
$(INSTALL) -m 0644 -D $(@D)/usbmount.rules $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules
@if [ ! -f $(TARGET_DIR)/etc/usbmount/usbmount.conf ]; then \
$(INSTALL) -m 0644 -D $(@D)/usbmount.conf $(TARGET_DIR)/etc/usbmount/usbmount.conf; \
fi
+
+ mkdir -p $(addprefix $(TARGET_DIR)/media/usb,0 1 2 3 4 5 6 7)
endef
define USBMOUNT_UNINSTALL_TARGET_CMDS
- rm -rf $(TARGET_DIR)/etc/usbmount \
- $(TARGET_DIR)/usr/share/usbmount/usbmount \
- $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules
+ rm -rf $(TARGET_DIR)/etc/usbmount \
+ $(TARGET_DIR)/usr/share/usbmount/usbmount \
+ $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules \
+ $(TARGET_DIR)/media/usb?
endef
$(eval $(call GENTARGETS,package,usbmount))