vbox的更動 23991 路徑 trunk/debian
- 時間撮記:
- 2009-10-22 下午02:44:39 (15 年 以前)
- 位置:
- trunk/debian
- 檔案:
-
- 修改 3 筆資料
- 移動 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/debian/postinst.in
r23977 r23991 12 12 # 13 13 14 # we can be called with the following arguments: 15 # configure: (our version): installing/configuring new version 16 # abort-upgrade: (old version): upgrading to a new version failed 17 # abort-remove: (our version): removing this package failed 18 # abort-deconfigure: (our version): error during resolving conflicts 19 14 20 LOG="/var/log/vbox-install.log" 15 21 16 # for debconf 17 . /usr/share/debconf/confmodule 18 db_version 2.0 22 if [ "$1" = "configure" ]; then 19 23 20 # remove old cruft 21 if [ -f /etc/init.d/vboxdrv.sh ]; then 22 echo "Found old version of /etc/init.d/vboxdrv.sh, removing." 23 rm /etc/init.d/vboxdrv.sh 24 update-rc.d vboxdrv.sh remove >/dev/null 25 fi 26 if [ -f /etc/init.d/virtualbox ]; then 27 echo "Found old version of /etc/init.d/virtualbox, removing." 28 rm /etc/init.d/virtualbox 29 update-rc.d virtualbox remove >/dev/null 30 fi 31 if [ -f /etc/vbox/vbox.cfg ]; then 32 echo "Found old version of /etc/vbox/vbox.cfg, removing." 33 rm /etc/vbox/vbox.cfg 34 fi 24 # for debconf 25 . /usr/share/debconf/confmodule 26 db_version 2.0 35 27 36 # install udev rule 37 if [ -d /etc/udev/rules.d ]; then 38 udev_out=`udevinfo -V 2> /dev/null` 39 udev_ver=`expr "$udev_out" : '[^0-9]*\([0-9]*\)'` 40 if [ "$udev_ver" = "" -o "$udev_ver" -lt 55 ]; then 41 echo 'KERNEL="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"' \ 42 > /etc/udev/rules.d/60-vboxdrv.rules 43 else 44 echo 'KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"' \ 28 # remove old cruft 29 if [ -f /etc/init.d/vboxdrv.sh ]; then 30 echo "Found old version of /etc/init.d/vboxdrv.sh, removing." 31 rm /etc/init.d/vboxdrv.sh 32 update-rc.d vboxdrv.sh remove >/dev/null 33 fi 34 if [ -f /etc/vbox/vbox.cfg ]; then 35 echo "Found old version of /etc/vbox/vbox.cfg, removing." 36 rm /etc/vbox/vbox.cfg 37 fi 38 39 # install udev rule 40 if [ -d /etc/udev/rules.d ]; then 41 udev_call="" 42 udev_app=`which udevadm 2> /dev/null` 43 if [ $? -eq 0 ]; then 44 udev_call="${udev_app} version 2> /dev/null" 45 else 46 udev_app=`which udevinfo 2> /dev/null` 47 if [ $? -eq 0 ]; then 48 udev_call="${udev_app} -V 2> /dev/null" 49 fi 50 fi 51 udev_fix="=" 52 if [ "${udev_call}" != "" ]; then 53 udev_out=`${udev_call}` 54 udev_ver=`expr "$udev_out" : '[^0-9]*\([0-9]*\)'` 55 if [ "$udev_ver" = "" -o "$udev_ver" -lt 55 ]; then 56 udev_fix="" 57 fi 58 fi 59 echo "KERNEL=${udev_fix}\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"root\", MODE=\"0600\"" \ 45 60 > /etc/udev/rules.d/60-vboxdrv.rules 46 61 fi 47 fi48 62 49 # create users groups50 db_input high virtualbox/group-vboxusers || true51 db_go || true52 addgroup --system vboxusers 63 # create users groups 64 db_input high virtualbox/group-vboxusers || true 65 db_go || true 66 addgroup --system vboxusers || true 53 67 54 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then 55 db_get virtualbox/module-compilation-allowed 56 if [ "$RET" = "false" ]; then 57 cat << EOF 68 REGISTER_DKMS=1 69 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then 70 db_get virtualbox/module-compilation-allowed 71 if [ "$RET" = "false" ]; then 72 cat << EOF 58 73 Unable to find a precompiled module for the current kernel 59 74 though module compilation denied by debconf setting. 60 75 EOF 61 else62 db_input critical virtualbox/module-compilation-allowed || true63 db_go || true64 db_get virtualbox/module-compilation-allowed65 if [ "$RET" = "true" ]; then66 # Compile module. Don't show a message box here if everything works well.67 cat << EOF76 else 77 db_input critical virtualbox/module-compilation-allowed || true 78 db_go || true 79 db_get virtualbox/module-compilation-allowed 80 if [ "$RET" = "true" ]; then 81 # Compile module. Don't show a message box here if everything works well. 82 cat << EOF 68 83 Messages emitted during module compilation will be logged to $LOG. 69 84 EOF 70 rm -f /etc/vbox/module_not_compiled 71 echo "** Compiling vboxdrv" > /var/log/vbox-install.log 72 if ! /usr/share/virtualbox/src/vboxdrv/build_in_tmp \ 73 --save-module-symvers /tmp/vboxdrv-Module.symvers \ 74 --no-print-directory KBUILD_VERBOSE= \ 75 install >> /var/log/vbox-install.log 2>&1; then 76 db_fset virtualbox/module-compilation-failed seen false 77 db_input critical virtualbox/module-compilation-failed || true 78 db_go || true 79 touch /etc/vbox/module_not_compiled 80 # don't abort the installation! 81 else 82 echo "** Compiling vboxnetflt" >> /var/log/vbox-install.log 83 if ! /usr/share/virtualbox/src/vboxnetflt/build_in_tmp \ 84 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 85 rm -f /etc/vbox/module_not_compiled 86 echo "** Compiling vboxdrv" > /var/log/vbox-install.log 87 if ! /usr/share/virtualbox/src/vboxdrv/build_in_tmp \ 88 --save-module-symvers /tmp/vboxdrv-Module.symvers \ 85 89 --no-print-directory KBUILD_VERBOSE= \ 86 90 install >> /var/log/vbox-install.log 2>&1; then … … 91 95 # don't abort the installation! 92 96 else 93 echo "** Compiling vboxnet adp" >> /var/log/vbox-install.log94 if ! /usr/share/virtualbox/src/vboxnet adp/build_in_tmp \97 echo "** Compiling vboxnetflt" >> /var/log/vbox-install.log 98 if ! /usr/share/virtualbox/src/vboxnetflt/build_in_tmp \ 95 99 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 96 100 --no-print-directory KBUILD_VERBOSE= \ … … 101 105 touch /etc/vbox/module_not_compiled 102 106 # don't abort the installation! 107 else 108 echo "** Compiling vboxnetadp" >> /var/log/vbox-install.log 109 if ! /usr/share/virtualbox/src/vboxnetadp/build_in_tmp \ 110 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 111 --no-print-directory KBUILD_VERBOSE= \ 112 install >> /var/log/vbox-install.log 2>&1; then 113 db_fset virtualbox/module-compilation-failed seen false 114 db_input critical virtualbox/module-compilation-failed || true 115 db_go || true 116 touch /etc/vbox/module_not_compiled 117 # don't abort the installation! 118 fi 103 119 fi 104 120 fi 105 fi 106 if [ ! -f /etc/vbox/module_not_compiled ]; then 107 # success 108 cat << EOF 121 # cleanup 122 rm -f /tmp/vboxdrv-Module.symvers 123 if [ ! -f /etc/vbox/module_not_compiled ]; then 124 # success 125 cat << EOF 109 126 Success! 110 127 EOF 128 REGISTER_DKMS= 129 fi 111 130 fi 112 131 fi 113 132 fi 114 fi115 133 116 # There might be an old module active (e.g. manually loaded) 117 if lsmod | grep -q "vboxdrv[^_-]"; then 118 /etc/init.d/vboxdrv stop || true 119 fi 134 # Register at DKMS. If the modules were built above, they are already registered 135 if [ -n "$REGISTER_DKMS" ]; then 136 DKMS=`which dkms 2>/dev/null` 137 if [ -n "$DKMS" ]; then 138 for m in vboxdrv vboxnetflt vboxnetadp; do 139 $DKMS status -m $m | while read line; do 140 if echo "$line" | grep -q added > /dev/null || 141 echo "$line" | grep -q built > /dev/null || 142 echo "$line" | grep -q installed > /dev/null; then 143 v=`echo "$line" | sed "s/$m,\([^,]*\)[,:].*/\1/;t;d"` 144 $DKMS remove -m $m -v $v --all 145 fi 146 done 147 $DKMS add -m $m -v %VER% 148 done 149 fi 150 fi 120 151 121 # The starters need to be Suid root. They drop the privileges before starting 122 # the real frontend. 123 if ! dpkg-statoverride --list /usr/lib/virtualbox/VirtualBox > /dev/null 2>&1; then 124 chmod 4511 /usr/lib/virtualbox/VirtualBox 125 fi 126 if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxHeadless > /dev/null 2>&1; then 127 chmod 4511 /usr/lib/virtualbox/VBoxHeadless 128 fi 129 if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxSDL > /dev/null 2>&1; then 130 chmod 4511 /usr/lib/virtualbox/VBoxSDL 131 fi 132 if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetDHCP > /dev/null 2>&1; then 133 chmod 4511 /usr/lib/virtualbox/VBoxNetDHCP 134 fi 135 if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetAdpCtl > /dev/null 2>&1; then 136 chmod 4511 /usr/lib/virtualbox/VBoxNetAdpCtl 137 fi 152 # There might be an old module active (e.g. manually loaded) 153 if lsmod | grep -q "vboxdrv[^_-]"; then 154 /etc/init.d/vboxdrv stop || true 155 fi 156 157 # The starters need to be Suid root. They drop the privileges before starting 158 # the real frontend. 159 if ! dpkg-statoverride --list /usr/lib/virtualbox/VirtualBox > /dev/null 2>&1; then 160 chmod 4511 /usr/lib/virtualbox/VirtualBox 161 fi 162 if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxHeadless > /dev/null 2>&1; then 163 chmod 4511 /usr/lib/virtualbox/VBoxHeadless 164 fi 165 if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxSDL > /dev/null 2>&1; then 166 chmod 4511 /usr/lib/virtualbox/VBoxSDL 167 fi 168 if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetDHCP > /dev/null 2>&1; then 169 chmod 4511 /usr/lib/virtualbox/VBoxNetDHCP 170 fi 171 if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetAdpCtl > /dev/null 2>&1; then 172 chmod 4511 /usr/lib/virtualbox/VBoxNetAdpCtl 173 fi 174 175 fi # $1 = "configure" 138 176 139 177 #DEBHELPER# -
trunk/debian/preinst.in
r13540 r23991 12 12 # 13 13 14 . /usr/share/debconf/confmodule 15 db_version 2.0 16 db_capb backup 14 # we can be called with the following arguments: 15 # install: (our version): install our version 16 # upgrade: (our version): upgrade to our version 17 # abort-upgrade: (old version): upgrade to a new version failed 17 18 18 # check for old installation 19 if [ -r /etc/vbox/vbox.cfg ]; then 20 . /etc/vbox/vbox.cfg 21 if [ "x$INSTALL_DIR" != "x" -a -d "$INSTALL_DIR" ]; then 22 db_fset virtualbox/old-installation-found seen false || true 23 db_input high virtualbox/old-installation-found || true 19 if [ "$1" = "install" -o "$1" = "upgrade" ]; then 20 21 . /usr/share/debconf/confmodule 22 db_version 2.0 23 db_capb backup 24 25 # check for active VMs 26 if pidof VBoxSVC > /dev/null 2>&1; then 27 db_fset virtualbox/old-running seen false || true 28 db_input high virtualbox/old-running || true 24 29 db_go || true 25 30 exit 1 26 31 fi 27 # we will remove that file in postinst28 fi29 32 30 # check for old vboxdrv modules 31 if find /lib/modules -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then 32 # old modules found 33 db_get virtualbox/delete-old-modules || true 34 if [ "$RET" = "false" ]; then 35 cat << EOF 33 # check for old installation 34 if [ -r /etc/vbox/vbox.cfg ]; then 35 . /etc/vbox/vbox.cfg 36 if [ "x$INSTALL_DIR" != "x" -a -d "$INSTALL_DIR" ]; then 37 db_fset virtualbox/old-installation-found seen false || true 38 db_input high virtualbox/old-installation-found || true 39 db_go || true 40 exit 1 41 fi 42 # we will remove that file in postinst 43 fi 44 45 # check for old vboxdrv modules 46 if find /lib/modules -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then 47 # old modules found 48 db_get virtualbox/delete-old-modules || true 49 if [ "$RET" = "false" ]; then 50 cat << EOF 36 51 Old vboxdrv kernel modules found in 37 52 EOF 38 find /lib/modules -name "vboxdrv\.*" 2>/dev/null|sed "s+\(.*\)+ \1+g"39 cat << EOF53 find /lib/modules -name "vboxdrv\.*" 2>/dev/null|sed "s+\(.*\)+ \1+g" 54 cat << EOF 40 55 Removing of these modules denied by debconf setting 41 56 EOF 42 else 43 db_input critical virtualbox/delete-old-modules || true 44 db_go || true 45 db_get virtualbox/delete-old-modules || true 46 if [ "$RET" = "true" ]; then 47 find /lib/modules -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null 57 else 58 db_input critical virtualbox/delete-old-modules || true 59 db_go || true 60 db_get virtualbox/delete-old-modules || true 61 if [ "$RET" = "true" ]; then 62 find /lib/modules -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null 63 fi 48 64 fi 49 65 fi 50 fi 66 67 fi # "$1" = "install" -o "$1" = "upgrade" 51 68 52 69 #DEBHELPER# -
trunk/debian/rules
r23889 r23991 71 71 endif 72 72 73 # shipping Linux kernel modules with bleeding-edge releases doesn't make sense 74 instmod := $(if $(filter _Ubuntu_karmic _Debian_sid,$(debrel)),,1) 75 73 76 # Locations of custom built Qt libraries (see below) 74 77 qtstdc5 := /home/vbox/Qt-4.4.3-stdc++5-$(arch) … … 83 86 $(if $(filter _Debian_etch,$(debrel)),$(if $(ose),,--build-libcurl),) \ 84 87 $(if $(filter _Debian_sarge _xandros4.1 _ucs1.3,$(debrel)),--with-qt4-dir=$(qtstdc5)) \ 85 $(if $(filter _Debian_etch _Ubuntu_dapper _Ubuntu_edgy _Ubuntu_feisty ,$(debrel)),--with-qt4-dir=$(qtstdc6)) \88 $(if $(filter _Debian_etch _Ubuntu_dapper _Ubuntu_edgy _Ubuntu_feisty _Ubuntu_gutsy _Ubuntu_hardy,$(debrel)),--with-qt4-dir=$(qtstdc6)) \ 86 89 $(if $(filter _xandros4.1 _ucs1.3,$(debrel)),--disable-sdl-ttf,) \ 87 90 $(if $(filter _Debian_sarge _Ubuntu_dapper _Ubuntu_edgy _xandros4.1 _ucs1.3,$(debrel)),--disable-pulse,) \ … … 136 139 if [ -L $$d/build ]; then \ 137 140 make -C $(builddir)/bin/src/vboxdrv KERN_DIR=$$d/build MODULE_DIR=$$d clean && \ 138 make - C $(builddir)/bin/src/vboxdrv KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all &&\139 install -D -m 0644 -g 0 -o 0 \140 $(builddir)/bin/src/vboxdrv/vboxdrv.ko $(moddir)/$$(basename $$d)/vboxdrv.ko &&\141 make -j4 -C $(builddir)/bin/src/vboxdrv KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \ 142 $(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \ 143 $(builddir)/bin/src/vboxdrv/vboxdrv.ko $(moddir)/$$(basename $$d)/vboxdrv.ko); \ 141 144 make -C $(builddir)/bin/src/vboxnetflt KERN_DIR=$$d/build MODULE_DIR=$$d clean && \ 142 145 (cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetflt || true) && \ 143 make - C $(builddir)/bin/src/vboxnetflt KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all &&\144 install -D -m 0644 -g 0 -o 0 \145 $(builddir)/bin/src/vboxnetflt/vboxnetflt.ko $(moddir)/$$(basename $$d)/vboxnetflt.ko ; \146 make -j4 -C $(builddir)/bin/src/vboxnetflt KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \ 147 $(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \ 148 $(builddir)/bin/src/vboxnetflt/vboxnetflt.ko $(moddir)/$$(basename $$d)/vboxnetflt.ko); \ 146 149 make -C $(builddir)/bin/src/vboxnetadp KERN_DIR=$$d/build MODULE_DIR=$$d clean && \ 147 150 (cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetadp || true) && \ 148 make - C $(builddir)/bin/src/vboxnetadp KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all &&\149 install -D -m 0644 -g 0 -o 0 \150 $(builddir)/bin/src/vboxnetadp/vboxnetadp.ko $(moddir)/$$(basename $$d)/vboxnetadp.ko ; \151 make -j4 -C $(builddir)/bin/src/vboxnetadp KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \ 152 $(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \ 153 $(builddir)/bin/src/vboxnetadp/vboxnetadp.ko $(moddir)/$$(basename $$d)/vboxnetadp.ko); \ 151 154 fi; \ 152 155 done … … 159 162 dh_testdir 160 163 dh_testroot 164 rm -f debian/preinst debian/postinst 161 165 rm -f debian/$(package).init debian/vboxdrv.init 162 rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh debian/preinst166 rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh 163 167 rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp 164 168 rm -rf $(builddir) $(moddir) … … 219 223 mv $(archdir)/VBoxTunctl $(prefix)/usr/bin 220 224 $(if $(NOMODS),,for d in $(moddir)/*; do \ 221 install -D -g 0 -o 0 -m 0644 \ 222 $$d/vboxdrv.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxdrv.ko; \ 223 install -D -g 0 -o 0 -m 0644 \ 224 $$d/vboxnetflt.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetflt.ko; \ 225 install -D -g 0 -o 0 -m 0644 \ 226 $$d/vboxnetadp.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetadp.ko; \ 225 if [ -f $$d/vboxdrv.ko -a -f $$d/vboxnetflt.ko -a -f $$d/vboxnetadp.ko ]; then \ 226 install -D -g 0 -o 0 -m 0644 \ 227 $$d/vboxdrv.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxdrv.ko; \ 228 install -D -g 0 -o 0 -m 0644 \ 229 $$d/vboxnetflt.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetflt.ko; \ 230 install -D -g 0 -o 0 -m 0644 \ 231 $$d/vboxnetadp.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetadp.ko; \ 232 fi \ 227 233 done) 228 234 ifeq ($(ose),) … … 261 267 dh_installinit --name=vboxdrv 262 268 cat debian/preinst.in | sed -e 's|%VER%|$(ver)|g' > debian/preinst 269 cat debian/postinst.in | sed -e 's|%VER%|$(ver)|g' > debian/postinst 263 270 if [ "$(debrel)" = "_Ubuntu_dapper" -o "$(debrel)" = "_Debian_sarge" ]; then \ 264 271 cat debian/postrm.dapper > debian/postrm; fi … … 293 300 -Vpulse=$(if $(HEADLESS),,libpulse0) \ 294 301 -Vsdlttf=$(if $(HEADLESS),,libsdl-ttf2.0-0) \ 295 -Vdkms=$(if $(filter _Ubuntu_gutsy _Ubuntu_hardy _Ubuntu_intrepid _Ubuntu_jaunty ,$(debrel)),dkms,)302 -Vdkms=$(if $(filter _Ubuntu_gutsy _Ubuntu_hardy _Ubuntu_intrepid _Ubuntu_jaunty _Ubuntu_karmic,$(debrel)),dkms,) 296 303 dh_md5sums 297 304 dh_builddeb --destdir $(pkgdir) -
trunk/debian/templates
r13540 r23991 95 95 bevor Sie fortfahren. In der Datei /etc/vbox/vbox.cfg finden Sie das Verzeichnis der alten 96 96 Version. Nachdem Sie diese entfernt haben, können Sie /etc/vbox/vbox.cfg löschen. 97 98 Template: virtualbox/old-running 99 Type: note 100 Description: Running VMs found 101 A copy of VirtualBox is currently running. Please close it and try again. Please note 102 that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to 103 finish running. 104 Description-de.UTF-8: VirtualBox VMs werden ausgeführt 105 Mindestens eine virtuelle Maschine wird noch ausgeführt. Bitte beenden Sie alle VMs und 106 warten Sie 10 Sekunden, bis sich der VBoxSVC-Daemon beendet hat. 107
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器