VirtualBox

Changeset 34603 in vbox for trunk/debian


Ignore:
Timestamp:
Dec 2, 2010 12:35:37 PM (14 years ago)
Author:
vboxsync
Message:

Linux deb/rpm: more fixes

Location:
trunk/debian
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/debian/postinst.in

    r32543 r34603  
    6363      > /etc/udev/rules.d/10-vboxdrv.rules
    6464    if [ "$INSTALL_NO_GROUP" != "1" ]; then
    65       echo "SUBSYSTEM=${udev_fix}\"usb_device\", GROUP=\"vboxusers\", MODE=\"0664\"" \
     65        usb_group=vboxusers
     66    else
     67        usb_group=root
     68    fi
     69    usb_createnode="/usr/share/virtualbox/VBoxCreateUSBNode.sh"
     70    echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"add\", RUN=${usb_createnode} \$major \$minor \$attr{bDeviceClass}\"" ${usb_group} \
    6671        >> /etc/udev/rules.d/10-vboxdrv.rules
    67       echo "SUBSYSTEM=${udev_fix}\"usb\", ENV{DEVTYPE}==\"usb_device\", GROUP=\"vboxusers\", MODE=\"0664\"" \
     72    echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"add\", ENV{DEVTYPE}==\"usb_device\", RUN=${usb_createnode} \$major \$minor \$attr{bDeviceClass}\"" ${usb_group} \
    6873        >> /etc/udev/rules.d/10-vboxdrv.rules
    69     else
    70       echo "SUBSYSTEM=${udev_fix}\"usb_device\", GROUP=\"root\", MODE=\"0664\"" \
     74    echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"remove\", RUN=${usb_createnode} --remove \$major \$minor\"" \
    7175        >> /etc/udev/rules.d/10-vboxdrv.rules
    72       echo "SUBSYSTEM=${udev_fix}\"usb\", ENV{DEVTYPE}==\"usb_device\", GROUP=\"root\", MODE=\"0664\"" \
     76    echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"remove\", ENV{DEVTYPE}==\"usb_device\", RUN=${usb_createnode} --remove \$major \$minor\"" \
    7377        >> /etc/udev/rules.d/10-vboxdrv.rules
    74     fi
    7578  fi
    7679  # Remove old udev description file
     
    7881      rm -f /etc/udev/rules.d/60-vboxdrv.rules 2> /dev/null
    7982  fi
    80   # Push the permissions to the USB device nodes.  One of these should match.
    81   # Rather nasty to use udevadm trigger for this, but I don't know of any
    82   # better way.
    83   udevadm trigger --subsystem-match=usb > /dev/null 2>&1
    84   udevtrigger --subsystem-match=usb > /dev/null 2>&1
    85   udevtrigger --subsystem-match=usb_device > /dev/null 2>&1
    86   udevplug -Busb > /dev/null 2>&1
     83  # Build our device tree
     84  for i in /sys/bus/usb/devices/*; do
     85    if test -r "$i/dev"; then
     86      dev="`cat "$i/dev" 2> /dev/null`"
     87      major="`expr "$dev" : '\(.*\):' 2> /dev/null`"
     88      minor="`expr "$dev" : '.*:\(.*\)' 2> /dev/null`"
     89      class="`cat $i/bDeviceClass 2> /dev/null`"
     90      sh ${usb_createnode} "$major" "$minor" "$class" ${usb_group} 2>/dev/null
     91    fi
     92  done
    8793
    8894  # create users groups (disable with INSTALL_NO_GROUP=1 in /etc/default/virtualbox)
  • trunk/debian/prerm.in

    r32543 r34603  
    2323rm -f /etc/vbox/license_agreed
    2424rm -f /etc/vbox/module_not_compiled
     25
     26# remove our USB device tree
     27rm -rf /dev/vboxusb 2> /dev/null
    2528
    2629# defaults
     
    6265fi
    6366
    64 # Stop vboxnet/vboxdrv manually as we use our own error handling in postrm
     67# stop vboxnet/vboxdrv manually as we use our own error handling in postrm
    6568if [ -x "/etc/init.d/vboxdrv" ]; then
    6669  if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  • trunk/debian/rules

    r34319 r34603  
    153153        rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh
    154154        rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp
     155        rm -f debian/virtualbox-*.substvars debian/virtualbox*.debhelper
     156        rm -f debian/$(verpkg).mime
    155157        rm -rf $(builddir) $(moddir)
    156158        dh_clean
     
    176178           $(prefix)/usr/share/applications/virtualbox.desktop)
    177179        install -d -g 0 -o 0 $(prefix)/usr/share/pixmaps
     180        install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor
     181        cd $(archdir)/icons; for i in *; do \
     182            install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor/$$i/mimetypes; \
     183            mv $$i/* $(prefix)/usr/share/icons/hicolor/$$i/mimetypes; \
     184            rmdir $$i; \
     185        done
     186        rmdir $(archdir)/icons
     187        mv $(archdir)/virtualbox.xml debian/$(verpkg).sharedmimeinfo
    178188        install -d -g 0 -o 0 $(prefix)/usr/share/lintian/overrides
    179189        sed \
     
    206216        install -D -g 0 -o 0 -m 644 debian/VBox.sh $(prefix)/usr/bin/VBox
    207217        mv $(archdir)/VBoxSysInfo.sh $(prefix)/usr/share/$(package)
     218        mv $(archdir)/VBoxCreateUSBNode.sh $(prefix)/usr/share/$(package)
    208219        for i in VBoxManage VBoxSVC $(if $(HEADLESS),,VBoxSDL) \
    209220            $(if $(NOQT),,VirtualBox) VBoxHeadless \
     
    256267            usr/share/virtualbox/src/vboxhost   usr/src/vboxhost-$(ver)
    257268        dh_desktop
    258         dh_installmenu
    259269        $(if $(NOMODS),,dh_installmodules)
    260270        sed \
     
    276286        dh_installchangelogs
    277287        dh_installmenu
     288        dh_installmime
    278289        dh_link
    279290ifeq ($(DEBUG),)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette