VirtualBox

Changeset 36714 in vbox for trunk/src/VBox/Installer


Ignore:
Timestamp:
Apr 18, 2011 1:18:33 PM (14 years ago)
Author:
vboxsync
Message:

Installer/linux: debian and rpm packaging of VBoxBalloonCtrl

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/debian/VBox.sh

    r34687 r36714  
    33# Oracle VM VirtualBox
    44#
    5 # Copyright (C) 2006-2010 Oracle Corporation
     5# Copyright (C) 2006-2011 Oracle Corporation
    66#
    77# This file is part of VirtualBox Open Source Edition (OSE), as
     
    8989    exec "/usr/lib/virtualbox/vboxwebsrv" "$@"
    9090    ;;
     91  VBoxBalloonCtrl|vboxballoonctrl)
     92    exec "/usr/lib/virtualbox/VBoxBalloonCtrl" "$@"
     93    ;;
    9194  *)
    9295    echo "Unknown application - $APP"
  • trunk/src/VBox/Installer/linux/debian/lintian-override.in

    r35301 r36714  
    8989%VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/components/VBoxXPCOMIPCC.so /usr/lib/virtualbox
    9090%VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/kchmviewer /usr/lib/virtualbox
     91%VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxBalloonCtrl /usr/lib/virtualbox
    9192%VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/vboxwebsrv /usr/lib/virtualbox
    9293%VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/webtest /usr/lib/virtualbox
  • trunk/src/VBox/Installer/linux/debian/postinst.in

    r35363 r36714  
    11#!/bin/sh
    22#
    3 # Copyright (C) 2006-2010 Oracle Corporation
     3# Copyright (C) 2006-2011 Oracle Corporation
    44#
    55# This file is part of VirtualBox Open Source Edition (OSE), as
     
    129129
    130130if [ "$1" = "configure" ]; then
    131   # Start vboxdrv/vboxweb-service manually as we use our own error handling in postrm
     131  # Start vboxdrv/vboxballoonctrl/vboxweb-service manually as we use our own error handling in postrm
    132132  if [ -x "/etc/init.d/vboxdrv" ]; then
    133133    update-rc.d vboxdrv defaults >/dev/null
     
    180180    fi
    181181  fi
     182  if [ -x "/etc/init.d/vboxballoonctrl-service" ]; then
     183    update-rc.d vboxballoonctrl-service defaults >/dev/null
     184    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
     185        invoke-rc.d vboxballoonctrl-service start || exit $?
     186    else
     187        /etc/init.d/vboxballoonctrl-service start || exit $?
     188    fi
     189  fi
    182190  if [ -x "/etc/init.d/vboxweb-service" ]; then
    183191    update-rc.d vboxweb-service defaults >/dev/null
  • trunk/src/VBox/Installer/linux/debian/preinst.in

    r32543 r36714  
    11#!/bin/bash
    22#
    3 # Copyright (C) 2006-2010 Oracle Corporation
     3# Copyright (C) 2006-2011 Oracle Corporation
    44#
    55# This file is part of VirtualBox Open Source Edition (OSE), as
     
    2929  VBOXSVC_PID=`pidof VBoxSVC 2> /dev/null || true`
    3030  if [ -n "$VBOXSVC_PID" ]; then
     31    if [ -f /etc/init.d/vboxballoonctrl-service ]; then
     32      # try graceful termination; terminate the ballon control service first
     33      if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
     34        invoke-rc.d vboxballoonctrl-service stop || true
     35      else
     36        /etc/init.d/vboxballoonctrl-service stop || true
     37      fi
     38    fi
    3139    if [ -f /etc/init.d/vboxweb-service ]; then
    3240      # try graceful termination; terminate the webservice first
     
    3644        /etc/init.d/vboxweb-service stop || true
    3745      fi
    38       kill -USR1 $VBOXSVC_PID
    3946    fi
     47    kill -USR1 $VBOXSVC_PID
    4048    sleep 1
    4149    if pidof VBoxSVC > /dev/null 2>&1; then
  • trunk/src/VBox/Installer/linux/debian/prerm.in

    r34603 r36714  
    3838  VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null`
    3939  if [ -n "$VBOXSVC_PID" ]; then
     40    # try graceful termination; terminate the balloon control servic first
     41    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
     42      invoke-rc.d vboxballoonctrl-service stop || true
     43    else
     44      /etc/init.d/vboxballoonctrl-service stop || true
     45    fi
    4046    # try graceful termination; terminate the webservice first
    4147    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  • trunk/src/VBox/Installer/linux/debian/rules

    r36554 r36714  
    11#!/usr/bin/make -f
    22#
    3 # Copyright (C) 2006-2010 Oracle Corporation
     3# Copyright (C) 2006-2011 Oracle Corporation
    44#
    55# This file is part of VirtualBox Open Source Edition (OSE), as
     
    178178        dh_testroot
    179179        rm -f debian/changelog debian/preinst debian/postinst debian/prerm
    180         rm -f debian/$(package).init debian/vboxdrv.init debian/vboxweb-service.init
     180        rm -f debian/$(package).init debian/vboxdrv.init
     181        rm -f debian/vboxballoonctrl-service.init debian/vboxweb-service.init
    181182        rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh
    182183        rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp
     
    249250        for i in VBoxManage VBoxSVC $(if $(HEADLESS),,VBoxSDL) \
    250251            $(if $(NOQT),,VirtualBox) VBoxHeadless \
    251             VBoxExtPackHelperApp \
     252            VBoxExtPackHelperApp VBoxBalloonCtrl \
    252253            $(if $(NOWEBSVC),,vboxwebsrv webtest); do \
    253254            mv $(archdir)/$$i $(prefix)/usr/lib/$(package); done
     
    295296            usr/bin/VBox                        usr/bin/VBoxHeadless \
    296297            usr/bin/VBox                        usr/bin/vboxheadless \
     298            usr/bin/VBox                        usr/bin/VBoxBalloonCtrl \
     299            usr/bin/VBox                        usr/bin/vboxballoonctrl \
    297300            $(if $(NOWEBSVC),,usr/bin/VBox      usr/bin/vboxwebsrv) \
    298301            usr/share/virtualbox/src/vboxhost   usr/src/vboxhost-$(ver)
     
    306309            $(vboxroot)/src/VBox/Installer/linux/vboxdrv.sh.in > debian/vboxdrv.init
    307310        dh_installinit --name=vboxdrv --noscripts
     311        sed \
     312            -e 's|%NOLSB%||g' \
     313            -e 's|%DEBIAN%|yes|g' \
     314            -e 's|%PACKAGE%|virtualbox|g' \
     315            $(vboxroot)/src/VBox/Installer/linux/vboxballoonctrl-service.sh.in > debian/vboxballoonctrl-service.init
     316        dh_installinit --name=vboxballoonctrl-service --noscripts
    308317        sed \
    309318            -e 's|%NOLSB%||g' \
  • trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec

    r35363 r36714  
    44
    55#
    6 # Copyright (C) 2006-2010 Oracle Corporation
     6# Copyright (C) 2006-2011 Oracle Corporation
    77#
    88# This file is part of VirtualBox Open Source Edition (OSE), as
     
    105105rmdir icons
    106106mv virtualbox.xml $RPM_BUILD_ROOT/usr/share/mime/packages
    107 for i in VBoxManage VBoxSVC VBoxSDL VirtualBox VBoxHeadless VBoxExtPackHelperApp vboxwebsrv webtest; do
     107for i in VBoxManage VBoxSVC VBoxSDL VirtualBox VBoxHeadless VBoxExtPackHelperApp VBoxBalloonCtrl vboxwebsrv webtest; do
    108108  mv $i $RPM_BUILD_ROOT/usr/lib/virtualbox; done
    109109for i in VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl; do
     
    138138ln -sf ../etc/init.d/vboxdrv $RPM_BUILD_ROOT/sbin/rcvboxdrv
    139139%endif
     140install -D -m 755 vboxballoonctrl-service.init $RPM_BUILD_ROOT%{_initrddir}/vboxballoonctrl-service
    140141install -D -m 755 vboxweb-service.init $RPM_BUILD_ROOT%{_initrddir}/vboxweb-service
    141142%if %{?rpm_suse:1}%{!?rpm_suse:0}
     143ln -sf ../etc/init.d/vboxballoonctrl-service $RPM_BUILD_ROOT/sbin/rcvboxballoonctrl-service
    142144ln -sf ../etc/init.d/vboxweb-service $RPM_BUILD_ROOT/sbin/rcvboxweb-service
    143145%endif
     
    151153ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxHeadless
    152154ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxheadless
     155ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxBalloonCtrl
     156ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxballoonctrl
    153157ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxwebsrv
    154158ln -s /usr/share/virtualbox/src/vboxhost $RPM_BUILD_ROOT/usr/src/vboxhost-%VER%
     
    165169if [ -n "$VBOXSVC_PID" ]; then
    166170  # executed before the new package is installed!
     171  if [ -f /etc/init.d/vboxballoonctrl-service ]; then
     172    # try graceful termination; terminate the balloon control service first
     173    /etc/init.d/vboxballoonctrl-service stop 2>/dev/null || true
     174  fi
    167175  if [ -f /etc/init.d/vboxweb-service ]; then
    168176    # try graceful termination; terminate the webservice first
    169177    /etc/init.d/vboxweb-service stop 2>/dev/null || true
    170     # ask the daemon to terminate immediately
    171     kill -USR1 $VBOXSVC_PID
    172   fi
     178  fi
     179  # ask the daemon to terminate immediately
     180  kill -USR1 $VBOXSVC_PID
    173181  sleep 1
    174182  if pidof VBoxSVC > /dev/null 2>&1; then
     
    275283  chcon -t java_exec_t    /usr/lib/virtualbox/VBoxHeadless > /dev/null 2>&1
    276284  chcon -t java_exec_t    /usr/lib/virtualbox/VBoxExtPackHelperApp > /dev/null 2>&1
     285  chcon -t java_exec_t    /usr/lib/virtualbox/VBoxBalloonCtrl > /dev/null 2>&1
    277286  chcon -t java_exec_t    /usr/lib/virtualbox/vboxwebsrv > /dev/null 2>&1
    278287fi
     
    288297%if %{?rpm_redhat:1}%{!?rpm_redhat:0}
    289298/sbin/chkconfig --add vboxdrv
     299/sbin/chkconfig --add vboxballoonctrl-service
    290300/sbin/chkconfig --add vboxweb-service
    291301%endif
    292302%if %{?rpm_suse:1}%{!?rpm_suse:0}
    293 %{fillup_and_insserv -f -y -Y vboxdrv vboxweb-service}
     303%{fillup_and_insserv -f -y -Y vboxdrv vboxballoonctrl-service vboxweb-service}
    294304%endif
    295305%if %{?rpm_mdv:1}%{!?rpm_mdv:0}
    296306/sbin/ldconfig
    297307%_post_service vboxdrv
     308%_post_service vboxballoonctrl-service
    298309%_post_service vboxweb-service
    299310%update_menus
     
    339350  /etc/init.d/vboxdrv start > /dev/null
    340351fi
     352/etc/init.d/vboxballoonctrl-service start > /dev/null
    341353/etc/init.d/vboxweb-service start > /dev/null
    342354
     
    347359# $1>=2: upgrade
    348360%if %{?rpm_suse:1}%{!?rpm_suse:0}
     361%stop_on_removal vboxballoonctrl-service
    349362%stop_on_removal vboxweb-service
    350363%endif
    351364%if %{?rpm_mdv:1}%{!?rpm_mdv:0}
     365%_preun_service vboxballoonctrl-service
    352366%_preun_service vboxweb-service
    353367%endif
    354368%if %{?rpm_redhat:1}%{!?rpm_redhat:0}
    355369if [ "$1" = 0 ]; then
     370  /sbin/service vboxballoonctrl-service stop > /dev/null
     371  /sbin/chkconfig --del vboxballoonctrl-service
    356372  /sbin/service vboxweb-service stop > /dev/null
    357373  /sbin/chkconfig --del vboxweb-service
     
    400416if [ "$1" -ge 1 ]; then
    401417  /sbin/service vboxdrv restart > /dev/null 2>&1
     418  /sbin/service vboxballoonctrl-service restart > /dev/null 2>&1
    402419  /sbin/service vboxweb-service restart > /dev/null 2>&1
    403420fi
    404421%endif
    405422%if %{?rpm_suse:1}%{!?rpm_suse:0}
    406 %restart_on_update vboxdrv vboxweb-service
     423%restart_on_update vboxdrv vboxballoonctrl-service vboxweb-service
    407424%insserv_cleanup
    408425%endif
     
    428445%doc VirtualBox*.chm
    429446%{_initrddir}/vboxdrv
     447%{_initrddir}/vboxballoonctrl-service
    430448%{_initrddir}/vboxweb-service
    431449%{?rpm_suse: %{py_sitedir}/*}
    432450%{!?rpm_suse: %{python_sitelib}/*}
    433451%{?rpm_suse: /sbin/rcvboxdrv}
     452%{?rpm_suse: /sbin/rcvboxballoonctrl-service}
    434453%{?rpm_suse: /sbin/rcvboxweb-service}
    435454/lib/modules
  • trunk/src/VBox/Installer/linux/rpm/rules

    r36554 r36714  
    22
    33#
    4 # Copyright (C) 2006-2010 Oracle Corporation
     4# Copyright (C) 2006-2011 Oracle Corporation
    55#
    66# This file is part of VirtualBox Open Source Edition (OSE), as
     
    182182           -e 's|%DEBIAN%||g' \
    183183           -e 's|%PACKAGE%|virtualbox|g' \
     184           vboxballoonctrl-service.sh.in > $(archdir)/vboxballoonctrl-service.init
     185        sed \
     186           -e 's|%NOLSB%|yes|g' \
     187           -e 's|%DEBIAN%||g' \
     188           -e 's|%PACKAGE%|virtualbox|g' \
    184189           vboxweb-service.sh.in > $(archdir)/vboxweb-service.init
    185190        cp debian/VBox.sh $(archdir)
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