VirtualBox

Ignore:
Timestamp:
May 28, 2021 7:24:37 PM (4 years ago)
Author:
vboxsync
Message:

Host drivers: SUPDrv-linux: print revision number and optional extra version string on module load, bugref:9958.

Also, export_modules.sh was extended with --override-svn-rev
and --extra-version-string optional command line parameters in
order to get more flexibility when creating src tar for kmod SRPM
package.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/linux/export_modules.sh

    r85386 r89370  
    3232# What this script does:
    3333usage_msg="\
    34 Usage: `basename ${0}` --file <path>|--folder <path> [--without-hardening]
     34Usage: `basename ${0}` --file <path>|--folder <path> \
     35    [--override-svn-rev <rev>] [--extra-version-string <string>] [--without-hardening]
    3536
    3637Exports the VirtualBox host kernel modules to the tar.gz archive or folder in \
     
    6869        FOLDER="${2}"
    6970        shift 2 ;;
     71    --override-svn-rev)
     72        OVERRIDE_SVN_REV="${2}"
     73        shift 2 ;;
     74    --extra-version-string)
     75        EXTRA_VERSION_STRING="${2}"
     76        shift 2 ;;
    7077    --without-hardening)
    7178        unset VBOX_WITH_HARDENING
     
    104111VBOX_SVN_CONFIG_REV=`sed -e 's/^ *VBOX_SVN_REV_CONFIG_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Config.kmk`
    105112VBOX_SVN_VERSION_REV=`sed -e 's/^ *VBOX_SVN_REV_VERSION_FALLBACK *:= \+\$(patsubst *%:,, *\$Rev: *\([0-9]\+\) *\$ *) */\1/;t;d' $PATH_ROOT/Version.kmk`
    106 if [ "$VBOX_SVN_CONFIG_REV" -gt "$VBOX_SVN_VERSION_REV" ]; then
     113
     114if [ -n "$OVERRIDE_SVN_REV" ]; then
     115    VBOX_SVN_REV=$OVERRIDE_SVN_REV
     116elif [ "$VBOX_SVN_CONFIG_REV" -gt "$VBOX_SVN_VERSION_REV" ]; then
    107117    VBOX_SVN_REV=$VBOX_SVN_CONFIG_REV
    108118else
     
    136146echo "#define VBOX_VERSION_STRING \"$VBOX_VERSION_STRING\"" >> $PATH_TMP/version-generated.h
    137147echo "#define VBOX_API_VERSION_STRING \"${VBOX_VERSION_MAJOR}_${VBOX_VERSION_MINOR}\"" >> $PATH_TMP/version-generated.h
     148[ -n "$EXTRA_VERSION_STRING" ] && echo "#define VBOX_EXTRA_VERSION_STRING \" ${EXTRA_VERSION_STRING}\"" >> $PATH_TMP/version-generated.h
    138149echo "#define VBOX_PRIVATE_BUILD_DESC \"Private build with export_modules\"" >> $PATH_TMP/version-generated.h
    139150echo "" >> $PATH_TMP/version-generated.h
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