From 298cd8eaa21a21eee85f9551a26ad294347b1d5a Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Tue, 3 Feb 2015 14:52:07 +0100 Subject: package/*: rename patches according to the new policy Autogenerated from rename-patch.py (http://patchwork.ozlabs.org/patch/403345) Signed-off-by: Samuel Martin Signed-off-by: Peter Korsgaard --- package/usbmount/0001-rules-fix.patch | 19 ++++++ ...002-use-udev-environment-instead-of-blkid.patch | 71 ++++++++++++++++++++++ package/usbmount/usbmount-rules-fix.patch | 19 ------ ...unt-use-udev-environment-instead-of-blkid.patch | 71 ---------------------- 4 files changed, 90 insertions(+), 90 deletions(-) create mode 100644 package/usbmount/0001-rules-fix.patch create mode 100644 package/usbmount/0002-use-udev-environment-instead-of-blkid.patch delete mode 100644 package/usbmount/usbmount-rules-fix.patch delete mode 100644 package/usbmount/usbmount-use-udev-environment-instead-of-blkid.patch (limited to 'package/usbmount') diff --git a/package/usbmount/0001-rules-fix.patch b/package/usbmount/0001-rules-fix.patch new file mode 100644 index 0000000000..c71b613c8a --- /dev/null +++ b/package/usbmount/0001-rules-fix.patch @@ -0,0 +1,19 @@ +Signed-off-by: Yegor Yefremov +--- + 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/0002-use-udev-environment-instead-of-blkid.patch b/package/usbmount/0002-use-udev-environment-instead-of-blkid.patch new file mode 100644 index 0000000000..27928b5d54 --- /dev/null +++ b/package/usbmount/0002-use-udev-environment-instead-of-blkid.patch @@ -0,0 +1,71 @@ +udev can provide all the values that usbmount determined using the +blkid binary. This patch drops use of blkid in favor of using the +environment variables set by udev. Thus it removes the dependency +on blkid from usbmount. + +Signed-off-by: Sven Neumann +--- usbmount-0.0.22/usbmount.orig 2013-06-18 14:44:40.143096147 +0200 ++++ usbmount-0.0.22/usbmount 2013-06-19 16:13:09.882434896 +0200 +@@ -59,11 +59,6 @@ + exit 0 + fi + +-if [ ! -x /sbin/blkid ]; then +- log err "cannot execute /sbin/blkid" +- exit 1 +-fi +- + # Per Policy 9.3.2, directories under /var/run have to be created + # after every reboot. + if [ ! -e /var/run/usbmount ]; then +@@ -83,15 +78,7 @@ + trap '( lockfile-remove /var/run/usbmount/.mount )' 0 + log debug "acquired lock /var/run/usbmount/.mount.lock" + +- # Grab device information from device and "divide it" +- # 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/.*[[:blank:]]TYPE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +- UUID=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]UUID="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +- USAGE=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]USAGE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +- +- if ! echo $USAGE | egrep -q "(filesystem|disklabel)"; then ++ if ! echo $ID_FS_USAGE | egrep -q "(filesystem|disklabel)"; then + log info "$DEVNAME does not contain a filesystem or disklabel" + exit 1 + fi +@@ -101,14 +88,14 @@ + log info "executing command: mount $DEVNAME" + mount $DEVNAME || log err "mount by DEVNAME with $DEVNAME wasn't successful; return code $?" + +- elif grep -q "^[[:blank:]]*UUID=$UUID" /etc/fstab; then +- log info "executing command: mount -U $UUID" +- mount -U $UUID || log err "mount by UUID with $UUID wasn't successful; return code $?" ++ elif grep -q "^[[:blank:]]*UUID=$ID_FS_UUID" /etc/fstab; then ++ log info "executing command: mount -U $ID_FS_UUID" ++ mount -U $ID_FS_UUID || log err "mount by UUID with $ID_FS_UUID wasn't successful; return code $?" + + else +- log debug "$DEVNAME contains filesystem type $FSTYPE" ++ log debug "$DEVNAME contains filesystem type $ID_FS_TYPE" + +- fstype=$FSTYPE ++ fstype=$ID_FS_TYPE + # Test if the filesystem type is in the list of filesystem + # types to mount. + if in_list "$fstype" "$FILESYSTEMS"; then +@@ -176,11 +163,13 @@ + + # Run hook scripts; ignore errors. + export UM_DEVICE="$DEVNAME" ++ export UM_UUID="$ID_FS_UUID" + export UM_MOUNTPOINT="$mountpoint" + export UM_FILESYSTEM="$fstype" + export UM_MOUNTOPTIONS="$options" + export UM_VENDOR="$vendor" + export UM_MODEL="$model" ++ export UM_LABEL="$ID_FS_LABEL" + log info "executing command: run-parts /etc/usbmount/mount.d" + run-parts /etc/usbmount/mount.d || : + else diff --git a/package/usbmount/usbmount-rules-fix.patch b/package/usbmount/usbmount-rules-fix.patch deleted file mode 100644 index c71b613c8a..0000000000 --- a/package/usbmount/usbmount-rules-fix.patch +++ /dev/null @@ -1,19 +0,0 @@ -Signed-off-by: Yegor Yefremov ---- - 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-use-udev-environment-instead-of-blkid.patch b/package/usbmount/usbmount-use-udev-environment-instead-of-blkid.patch deleted file mode 100644 index 27928b5d54..0000000000 --- a/package/usbmount/usbmount-use-udev-environment-instead-of-blkid.patch +++ /dev/null @@ -1,71 +0,0 @@ -udev can provide all the values that usbmount determined using the -blkid binary. This patch drops use of blkid in favor of using the -environment variables set by udev. Thus it removes the dependency -on blkid from usbmount. - -Signed-off-by: Sven Neumann ---- usbmount-0.0.22/usbmount.orig 2013-06-18 14:44:40.143096147 +0200 -+++ usbmount-0.0.22/usbmount 2013-06-19 16:13:09.882434896 +0200 -@@ -59,11 +59,6 @@ - exit 0 - fi - --if [ ! -x /sbin/blkid ]; then -- log err "cannot execute /sbin/blkid" -- exit 1 --fi -- - # Per Policy 9.3.2, directories under /var/run have to be created - # after every reboot. - if [ ! -e /var/run/usbmount ]; then -@@ -83,15 +78,7 @@ - trap '( lockfile-remove /var/run/usbmount/.mount )' 0 - log debug "acquired lock /var/run/usbmount/.mount.lock" - -- # Grab device information from device and "divide it" -- # 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/.*[[:blank:]]TYPE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') -- UUID=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]UUID="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') -- USAGE=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]USAGE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') -- -- if ! echo $USAGE | egrep -q "(filesystem|disklabel)"; then -+ if ! echo $ID_FS_USAGE | egrep -q "(filesystem|disklabel)"; then - log info "$DEVNAME does not contain a filesystem or disklabel" - exit 1 - fi -@@ -101,14 +88,14 @@ - log info "executing command: mount $DEVNAME" - mount $DEVNAME || log err "mount by DEVNAME with $DEVNAME wasn't successful; return code $?" - -- elif grep -q "^[[:blank:]]*UUID=$UUID" /etc/fstab; then -- log info "executing command: mount -U $UUID" -- mount -U $UUID || log err "mount by UUID with $UUID wasn't successful; return code $?" -+ elif grep -q "^[[:blank:]]*UUID=$ID_FS_UUID" /etc/fstab; then -+ log info "executing command: mount -U $ID_FS_UUID" -+ mount -U $ID_FS_UUID || log err "mount by UUID with $ID_FS_UUID wasn't successful; return code $?" - - else -- log debug "$DEVNAME contains filesystem type $FSTYPE" -+ log debug "$DEVNAME contains filesystem type $ID_FS_TYPE" - -- fstype=$FSTYPE -+ fstype=$ID_FS_TYPE - # Test if the filesystem type is in the list of filesystem - # types to mount. - if in_list "$fstype" "$FILESYSTEMS"; then -@@ -176,11 +163,13 @@ - - # Run hook scripts; ignore errors. - export UM_DEVICE="$DEVNAME" -+ export UM_UUID="$ID_FS_UUID" - export UM_MOUNTPOINT="$mountpoint" - export UM_FILESYSTEM="$fstype" - export UM_MOUNTOPTIONS="$options" - export UM_VENDOR="$vendor" - export UM_MODEL="$model" -+ export UM_LABEL="$ID_FS_LABEL" - log info "executing command: run-parts /etc/usbmount/mount.d" - run-parts /etc/usbmount/mount.d || : - else -- cgit v1.2.1