VirtualBox

Changeset 57969 in vbox for trunk/src/VBox/Installer/linux


Ignore:
Timestamp:
Sep 30, 2015 2:48:47 PM (9 years ago)
Author:
vboxsync
Message:

Installers/linux: drop DKMS support.

Location:
trunk/src/VBox/Installer/linux
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/Makefile.include.footer

    r56299 r57969  
    8888endif # eq($(MAKECMDGOALS),clean)
    8989
    90 # important: Don't remove Module.symvers! DKMS does 'make clean' before building ...
    9190clean:
    9291        for f in $(MOD_CLEAN); do rm -f $$f/*.o $$f/.*.cmd $$f/.*.flags; done
  • trunk/src/VBox/Installer/linux/debian/control

    r55078 r57969  
    1818Pre-Depends: debconf (>= 1.1) | debconf-2.0
    1919Depends: ${shlibs:Depends}, debconf (>= 0.5) | debconf-2.0, psmisc, adduser
    20 Recommends: ${alsa}, ${pulse}, ${sdlttf}, ${dkms},
    21   linux-headers, gcc, make, binutils,
     20Recommends: ${alsa}, ${pulse}, ${sdlttf}, kmod | kldutils | module-init-tools,
     21  linux-headers-generic | linux-headers-generic-pae | linux-headers-686-pae | linux-headers-amd64 | linux-headers-2.6-686 | linux-headers-2.6-amd64 | linux-headers,
     22  linux-image, gcc, make | build-essential | dpkg-dev, binutils,
    2223  pdf-viewer, libgl1
    2324Provides: virtualbox
  • trunk/src/VBox/Installer/linux/debian/postinst.in

    r57888 r57969  
    120120
    121121# Install and start the new service scripts.
    122 PRERM_DKMS=
    123 test "${REGISTER_MODULES}" = 1 && PRERM_DKMS="--dkms %VER%"
    124122POSTINST_START=--start
    125123test "${INSTALL_NO_VBOXDRV}" = 1 && POSTINST_START=
    126 /usr/lib/virtualbox/prerm-common.sh ${PRERM_DKMS} || true
     124/usr/lib/virtualbox/prerm-common.sh || true
    127125/usr/lib/virtualbox/postinst-common.sh /usr/lib/virtualbox "${POSTINST_START}" > /dev/null || true
    128126
  • trunk/src/VBox/Installer/linux/debian/prerm.in

    r57888 r57969  
    3030db_capb backup
    3131
    32 if ! /usr/lib/virtualbox/prerm-common.sh --dkms %VER% > /dev/null 2>&1; then
     32if ! /usr/lib/virtualbox/prerm-common.sh > /dev/null 2>&1; then
    3333  if [ "$1" != "failed-upgrade" ]; then
    3434    db_fset virtualbox/old-running seen false || true
  • trunk/src/VBox/Installer/linux/debian/rules

    r57888 r57969  
    293293          -Valsa=$(if $(HEADLESS),,libasound2) \
    294294          -Vpulse=$(if $(HEADLESS),,libpulse0) \
    295           -Vsdlttf=$(if $(HEADLESS),,libsdl-ttf2.0-0) \
    296           -Vdkms=$(if $(filter _Debian_lenny,$(debrel)),,dkms)
     295          -Vsdlttf=$(if $(HEADLESS),,libsdl-ttf2.0-0)
    297296        dh_md5sums
    298297        dh_builddeb --destdir $(pkgdir) -- \
  • trunk/src/VBox/Installer/linux/install.sh

    r57940 r57969  
    4343ACTION=""
    4444SELF=$1
    45 DKMS=`which dkms 2> /dev/null`
    4645RC_SCRIPT=0
    4746if [ -n "$HARDENED" ]; then
     
    216215
    217216    # Remove previous installation
    218     if [ ! "$VERSION" = "$INSTALL_VER" -a ! "$BUILD_MODULE" = "true" -a -n "$DKMS" ]
    219     then
    220         # Not doing this can confuse dkms
    221         info "Rebuilding the kernel module after version change"
    222         BUILD_MODULE=true
    223     fi
    224217    test "${BUILD_MODULE}" = true || VBOX_DONT_REMOVE_OLD_MODULES=1
    225218
  • trunk/src/VBox/Installer/linux/postinst-common.sh

    r57712 r57969  
    5151fi
    5252
     53# Remove any traces of DKMS from previous installations.
     54for i in vboxhost vboxdrv vboxnetflt vboxnetadp; do
     55    rm -rf "/var/lib/dkms/${i}"*
     56done
     57
    5358# Install runlevel scripts and systemd unit files
    5459install_init_script "${TARGET}/vboxdrv.sh" vboxdrv
  • trunk/src/VBox/Installer/linux/prerm-common.sh

    r57868 r57969  
    3131. "./routines.sh"
    3232
    33 DO_DKMS=
    34 VERSION=
    35 while true
    36 do
    37     test -z "${1}" && break
    38     case "${1}" in
    39         --dkms)
    40             DO_DKMS=true
    41             shift
    42             VERSION="${1}"
    43             if test -z "${VERSION}"; then
    44                 echo "--dkms requires a version"
    45                 exit 1
    46             fi
    47             ;;
    48         *)
    49             echo "Bad argument ${1}" >&2
    50             exit 1
    51             ;;
    52     esac
    53     shift
    54 done
    55 
    5633# Stop the ballon control service
    5734stop_init_script vboxballoonctrl-service 2>/dev/null
     
    7350delrunlevel vboxweb-service
    7451remove_init_script vboxweb-service
    75 DKMS=`which dkms 2>/dev/null`
    76 if test "$DO_DKMS" = true && test -n "$DKMS"; then
    77   $DKMS remove -m vboxhost -v "${VERSION}" --all > /dev/null 2>&1
    78   $DKMS remove -m vboxdrv -v "${VERSION}" --all > /dev/null 2>&1
    79   $DKMS remove -m vboxnetflt -v "${VERSION}" --all > /dev/null 2>&1
    80   $DKMS remove -m vboxnetadp -v "${VERSION}" --all > /dev/null 2>&1
    81 fi
    8252# Stop kernel module and uninstall runlevel script
    8353stop_init_script vboxdrv 2>/dev/null
  • trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec

    r57876 r57969  
    319319fi
    320320# Install and start the new service scripts.
    321 PRERM_DKMS=
    322 test "${REGISTER_MODULES}" = 1 && PRERM_DKMS="--dkms %VER%"
    323321POSTINST_START=--start
    324322test "${INSTALL_NO_VBOXDRV}" = 1 && POSTINST_START=
    325 /usr/lib/virtualbox/prerm-common.sh ${PRERM_DKMS} || true
     323/usr/lib/virtualbox/prerm-common.sh || true
    326324/usr/lib/virtualbox/postinst-common.sh /usr/lib/virtualbox "${POSTINST_START}" > /dev/null || true
    327325
     
    333331# $1>=1: upgrade
    334332if [ "$1" = 0 ]; then
    335   /usr/lib/virtualbox/prerm-common.sh --dkms || exit 1
     333  /usr/lib/virtualbox/prerm-common.sh || exit 1
    336334  rm -f /etc/udev/rules.d/60-vboxdrv.rules
    337335  rm -f /etc/vbox/license_agreed
  • trunk/src/VBox/Installer/linux/uninstall.sh

    r57940 r57969  
    3030check_root
    3131
    32 [ -z "$DKMS"       ]    && DKMS=`which dkms 2> /dev/null`
    3332[ -z "$CONFIG_DIR" ]    && CONFIG_DIR="/etc/vbox"
    3433[ -z "$CONFIG" ]        && CONFIG="vbox.cfg"
     
    5049# Do pre-removal common to all installer types, currently service script
    5150# clean-up.
    52 test "${BUILD_MODULE}" = true && DO_DKMS="--dkms ${INSTALL_VER}"
    53 `dirname $0`/prerm-common.sh ${DO_DKMS} || exit 1  # Arguments intentionally not quoted.
     51`dirname $0`/prerm-common.sh || exit 1  # Arguments intentionally not quoted.
    5452
    5553# Remove kernel module installed
    56 if [ -n "$DKMS" ]; then
    57     $DKMS remove -m vboxhost -v $INSTALL_VER --all > /dev/null 2>&1
    58 fi
    5954if [ -z "$VBOX_DONT_REMOVE_OLD_MODULES" ]; then
    6055    find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2> /dev/null
  • trunk/src/VBox/Installer/linux/vboxdrv.sh.in

    r57945 r57969  
    2727### END INIT INFO
    2828
    29 ## @todo get rid of the autogeneration, perhaps write "version" and "group" to
     29## @todo get rid of the autogeneration, perhaps write "group" to
    3030##       a configuration file in /etc
    3131
     
    3333DEVICE=/dev/vboxdrv
    3434LOG="/var/log/vbox-install.log"
    35 VERSION=%VERSION%
    3635MODPROBE=/sbin/modprobe
    3736SCRIPTNAME=vboxdrv
     
    5453fi
    5554BUILDINTMP="$MODULE_SRC/build_in_tmp"
    56 DODKMS="$MODULE_SRC/do_dkms"
    5755
    5856# silently exit if the package was uninstalled but not purged,
     
    236234{
    237235    stop
    238     DKMS=`which dkms 2>/dev/null`
    239     if [ -n "$DKMS" ]; then
    240       begin_msg "Uninstalling old VirtualBox DKMS kernel modules"
    241       $DODKMS uninstall vboxhost vboxdrv vboxnetflt vboxnetadp > $LOG
    242       succ_msg
    243     fi
    244236    if find /lib/modules/`uname -r` -name "vboxpci\.*" 2>/dev/null|grep -q vboxpci; then
    245237        begin_msg "Removing old VirtualBox pci kernel module"
     
    262254        succ_msg
    263255    fi
    264     if [ -n "$DKMS" ]; then
    265       begin_msg "Trying to register the VirtualBox kernel modules using DKMS"
    266       if ! $DODKMS install vboxhost $VERSION >> $LOG; then
    267         fail_msg "Failed, trying without DKMS"
    268         DKMS=""
    269       fi
    270     fi
    271     if [ -z "$DKMS" ]; then
    272       begin_msg "Recompiling VirtualBox kernel modules"
    273       if ! $BUILDINTMP \
    274           --save-module-symvers /tmp/vboxdrv-Module.symvers \
    275           --module-source "$MODULE_SRC/vboxdrv" \
    276           --no-print-directory install >> $LOG 2>&1; then
    277           failure "Look at $LOG to find out what went wrong"
    278       fi
    279       if ! $BUILDINTMP \
    280           --use-module-symvers /tmp/vboxdrv-Module.symvers \
    281           --module-source "$MODULE_SRC/vboxnetflt" \
    282           --no-print-directory install >> $LOG 2>&1; then
    283           failure "Look at $LOG to find out what went wrong"
    284       fi
    285       if ! $BUILDINTMP \
    286           --use-module-symvers /tmp/vboxdrv-Module.symvers \
    287           --module-source "$MODULE_SRC/vboxnetadp" \
    288           --no-print-directory install >> $LOG 2>&1; then
    289           failure "Look at $LOG to find out what went wrong"
    290       fi
    291       if ! $BUILDINTMP \
    292           --use-module-symvers /tmp/vboxdrv-Module.symvers \
    293           --module-source "$MODULE_SRC/vboxpci" \
    294           --no-print-directory install >> $LOG 2>&1; then
    295           failure "Look at $LOG to find out what went wrong"
    296       fi
     256    begin_msg "Recompiling VirtualBox kernel modules"
     257    if ! $BUILDINTMP \
     258        --save-module-symvers /tmp/vboxdrv-Module.symvers \
     259        --module-source "$MODULE_SRC/vboxdrv" \
     260        --no-print-directory install >> $LOG 2>&1; then
     261        failure "Look at $LOG to find out what went wrong"
     262    fi
     263    if ! $BUILDINTMP \
     264        --use-module-symvers /tmp/vboxdrv-Module.symvers \
     265        --module-source "$MODULE_SRC/vboxnetflt" \
     266        --no-print-directory install >> $LOG 2>&1; then
     267        failure "Look at $LOG to find out what went wrong"
     268    fi
     269    if ! $BUILDINTMP \
     270        --use-module-symvers /tmp/vboxdrv-Module.symvers \
     271        --module-source "$MODULE_SRC/vboxnetadp" \
     272        --no-print-directory install >> $LOG 2>&1; then
     273        failure "Look at $LOG to find out what went wrong"
     274    fi
     275    if ! $BUILDINTMP \
     276        --use-module-symvers /tmp/vboxdrv-Module.symvers \
     277        --module-source "$MODULE_SRC/vboxpci" \
     278        --no-print-directory install >> $LOG 2>&1; then
     279        failure "Look at $LOG to find out what went wrong"
    297280    fi
    298281    rm -f /etc/vbox/module_not_compiled
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