From 8d23351755ef023dc68e90de539ae086dda7dcec Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 12 Jul 2010 02:15:38 +0200 Subject: updates Signed-off-by: Florian Pritz --- fb-client/.gitignore | 1 + fb-client/PKGBUILD | 6 +-- inxi/PKGBUILD | 2 +- libmediainfo/PKGBUILD | 34 +++++++++++++ mediainfo/PKGBUILD | 22 +++++++++ mozplugger/PKGBUILD | 4 +- oss-hg/.gitignore | 1 + oss-hg/PKGBUILD | 83 ++++++++++++++++++------------- oss-hg/oss.rc | 82 +++++++++++++++++++++---------- oss-hg/oss.soundon.patch | 28 +++++++++++ oss-hg/ossxmix.desktop | 10 ++++ oss-hg/ossxmix.png | Bin 0 -> 6689 bytes vhba-module/PKGBUILD | 4 +- virtualbox_bin/.gitignore | 1 + virtualbox_bin/PKGBUILD | 58 +++++++++++----------- virtualbox_bin/vboxdrv | 54 ++++++++++++++++++++ virtualbox_bin/virtualbox.install | 100 ++++++++++++++++++++++++-------------- 17 files changed, 358 insertions(+), 132 deletions(-) create mode 100644 fb-client/.gitignore create mode 100644 libmediainfo/PKGBUILD create mode 100644 mediainfo/PKGBUILD create mode 100644 oss-hg/.gitignore create mode 100644 oss-hg/oss.soundon.patch create mode 100644 oss-hg/ossxmix.desktop create mode 100644 oss-hg/ossxmix.png create mode 100644 virtualbox_bin/.gitignore create mode 100644 virtualbox_bin/vboxdrv diff --git a/fb-client/.gitignore b/fb-client/.gitignore new file mode 100644 index 0000000..d29844a --- /dev/null +++ b/fb-client/.gitignore @@ -0,0 +1 @@ +fb-* diff --git a/fb-client/PKGBUILD b/fb-client/PKGBUILD index 436bae1..0a20c95 100644 --- a/fb-client/PKGBUILD +++ b/fb-client/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Florian "Bluewind" Pritz pkgname=fb-client -pkgver=0.6.1 +pkgver=0.6.3.2 pkgrel=1 pkgdesc="Client for paste.xinu.at" arch=('any') @@ -17,7 +17,7 @@ build() { } # vim:set ts=2 sw=2 et: -md5sums=('5686e5a439f098a5d724f0cd399cf98e' +md5sums=('8afaf9b3973b7fe2259aa8b02264b541' 'dcd8c4d69ca6c3eba9bee2599456e4ac') -sha1sums=('af245f1462a78c3f9d35950b43e4f8ff757d26a9' +sha1sums=('746df5071497ee4467adbeb9bfde50c9a7afce32' '497e6c7df473efe197c4f1450348dd0e893c706e') diff --git a/inxi/PKGBUILD b/inxi/PKGBUILD index f3ff5dc..e57184f 100644 --- a/inxi/PKGBUILD +++ b/inxi/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Florian Pritz pkgname=inxi -pkgver=1.4.9 +pkgver=1.4.10 pkgrel=1 pkgdesc="script to get system information" arch=('any') diff --git a/libmediainfo/PKGBUILD b/libmediainfo/PKGBUILD new file mode 100644 index 0000000..1a652f6 --- /dev/null +++ b/libmediainfo/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: hydro + +pkgname=libmediainfo +pkgver=0.7.34 +pkgrel=1 +pkgdesc="shared library for mediainfo" +arch=('i686' 'x86_64') +url="http://mediainfo.sourceforge.net" +license=('GPL') +depends=( 'curl' 'libmms>=0.5-2' 'libzen>=0.4.15') +makedepends=('libtool' 'automake' 'autoconf') +options=(!libtool) +source=(http://downloads.sourceforge.net/mediainfo/${pkgname}_${pkgver}.tar.bz2) +md5sums=('e4884e71667c7ab817755cdef9888f7d') + +build() { + cd $srcdir/MediaInfoLib/Project/GNU/Library + chmod +x autogen + ./autogen + ./configure --prefix=/usr --enable-shared --disable-static --with-libcurl --with-libmms + make clean + make || return 1 + make DESTDIR=$pkgdir install || return 1 + + for i in MediaInfo MediaInfoDLL; do + install -dm 755 $pkgdir/usr/include/$i + install -m 644 $srcdir/MediaInfoLib/Source/$i/*.h $pkgdir/usr/include/$i + done + + install -dm 755 $pkgdir/usr/lib/pkgconfig + install -m 644 $srcdir/MediaInfoLib/Project/GNU/Library/libmediainfo.pc $pkgdir/usr/lib/pkgconfig + sed -i -e 's|Version: |Version: '$pkgver'|g' $pkgdir/usr/lib/pkgconfig/libmediainfo.pc + +} diff --git a/mediainfo/PKGBUILD b/mediainfo/PKGBUILD new file mode 100644 index 0000000..5d0b94e --- /dev/null +++ b/mediainfo/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: hydro + +pkgname=mediainfo +pkgver=0.7.34 +pkgrel=1 +pkgdesc="supplies technical and tag information about a video or audio file" +arch=('i686' 'x86_64') +url="http://mediainfo.sourceforge.net" +license=('GPL') +depends=('libmediainfo>=0.7.34') +makedepends=('libtool' 'automake' 'autoconf') +source=(http://downloads.sourceforge.net/mediainfo/${pkgname}_${pkgver}.tar.bz2) +md5sums=('6b67c1ff9e10b510fcd5b8b810550bec') + +build() { + cd $srcdir/MediaInfo/Project/GNU/CLI + chmod +x autogen + ./autogen + ./configure --prefix=/usr + make || return 1 + make DESTDIR=$pkgdir install || return 1 +} diff --git a/mozplugger/PKGBUILD b/mozplugger/PKGBUILD index 4111b07..097187e 100644 --- a/mozplugger/PKGBUILD +++ b/mozplugger/PKGBUILD @@ -4,7 +4,7 @@ # Contributor: Todd Musall pkgname=mozplugger -pkgver=1.13.3 +pkgver=1.14.0 pkgrel=1 pkgdesc="A Mozilla & Firefox multimedia plugin." arch=('i686' 'x86_64') @@ -14,7 +14,7 @@ depends=('m4' 'libx11') backup=('etc/mozpluggerrc') install=$pkgname.install source=(http://mozplugger.mozdev.org/files/$pkgname-$pkgver.tar.gz) -md5sums=('42d2ac76d8bf6902743323fefd1801ba') +md5sums=('700f24297d12ce291bedf80f9d0340dc') build() { cd $pkgname-$pkgver diff --git a/oss-hg/.gitignore b/oss-hg/.gitignore new file mode 100644 index 0000000..62ab099 --- /dev/null +++ b/oss-hg/.gitignore @@ -0,0 +1 @@ +oss diff --git a/oss-hg/PKGBUILD b/oss-hg/PKGBUILD index 0267f56..79f1ad9 100644 --- a/oss-hg/PKGBUILD +++ b/oss-hg/PKGBUILD @@ -1,70 +1,85 @@ -# Contributor: lh +# Archlive + pkgname=oss-hg -pkgver=666 +pkgver=907 pkgrel=1 pkgdesc="Open Sound System UNIX audio architecture" arch=('i686' 'x86_64') -url="http://developer.opensound.com/" +url="http://www.opensound.com/" license=('GPL2') -depends=('gcc' 'make' 'kernel-headers' 'module-init-tools' 'libtool' 'sed') -makedepends=('pkgconfig' 'gawk' 'gtk2' 'mercurial') -provides=('oss') +depends=('module-init-tools' 'libtool' 'sed') +makedepends=('pkgconfig' 'gawk' 'gtk2' 'mercurial' 'gcc' 'make') +provides=('oss' 'oss4') conflicts=('oss-linux' 'oss-linux-free' 'oss-testing' 'oss' 'oss-mercurial') install='oss.install' -source=('oss.rm-init-scripts.patch' 'oss.rc' 'oss.install') -md5sums=('b9a380a0ac8896390d71ac13676f27e1' - '8ca7cdf94c56ab02890eb4aba6a4995f' - '1494a2304a1eb7a1979e7e83d894c67a') +backup=('usr/lib/oss/soundon.user') +source=('oss.rm-init-scripts.patch' 'oss.soundon.patch' 'oss.rc' 'oss.install' + 'ossxmix.png' 'ossxmix.desktop') +md5sums=() optdepends=('gtk2: for graphical mixer (ossxmix)' - 'hal: for automatic USB audio configuration' - 'libflashsupport-oss: for Flash plugin support') + 'hal: for automatic USB audio configuration') -[ "$CARCH" = "x86_64" ] && optdepends[2]='lib32-libflashsupport-oss: for Flash plugin support' +_hgroot="http://opensound.hg.sourceforge.net:8000/hgroot/opensound/opensound" +_hgrepo="oss" -_hgroot=http://mercurial.opensound.com -_hgrepo=oss build() { - cd $srcdir + cd $startdir if [ -d ${_hgrepo} ]; then - cd ${srcdir}/${_hgrepo} - hg pull -u + cd ${_hgrepo} && hg pull -u -r ${pkgver} else hg clone ${_hgroot} ${_hgrepo} || return 1 - cd ${srcdir}/${_hgrepo} fi + + [ -d $srcdir/${_hgrepo} ] && rm -rf $srcdir/${_hgrepo} + hg clone $startdir/${_hgrepo} $srcdir/${_hgrepo} + cd $srcdir/${_hgrepo} + zsh # Avoid these flags conflicting with OSS build system. unset CFLAGS unset OSFLAGS unset LIBRARIES export NO_WARNING_CHECKS=yes - - # Remove libflashsupport, as it belongs to a separate package. - rm -f "$srcdir/$_hgrepo/oss/lib/flashsupport.c" &> /dev/null - msg "Preparing the build environment." + # Compile libflashsupport.so only in packaging time, so we avoid + # conflicts with other packages and ease package management. + msg "Building libflashsupport.so." + cd "oss/lib" + gcc -shared -fPIC -O2 -Wall -Werror flashsupport.c -o libflashsupport.so || return 1 + install -Dm755 libflashsupport.so "${pkgdir}/usr/lib/libflashsupport.so" || return 1 + #rm -f "flashsupport.c" "libflashsupport.so" &> /dev/null - # have to remove this dir. because maybe the scource is different now. - rm -rf $srcdir/$_hgrepo-build - # Create build directory and configure - mkdir $srcdir/$_hgrepo-build && cd srcdir/$_hgrepo-build - "$srcdir/$_hgrepo/configure" --enable-libsalsa=NO || return 1 + msg "Preparing the build environment." + cd $srcdir/${_hgrepo} + [ -d build ] && rm -rf build + mkdir build && cd build + ../configure --regparm --config-midi=YES --enable-timings --portable-build || return 1 + #../configure --enable-libsalsa=YES || return 1 msg "Building OSS." make build || return 1 msg "Patching init scripts." - cd "$srcdir/build/prototype" + cd prototype rm usr/lib/oss/etc/S89oss - patch -b -p0 < "$srcdir/oss.rm-init-scripts.patch" || return 1 + patch -Np0 -i "$srcdir/oss.rm-init-scripts.patch" || return 1 + patch -Np0 -i "$srcdir/oss.soundon.patch" || return 1 msg "Copying files." - cp -R * "$pkgdir" - chmod 755 "$pkgdir/usr/sbin/" "$pkgdir/usr/lib/oss/etc/" "$pkgdir/usr/lib/oss/build/" + cp -a * "${pkgdir}" + chmod -R a+r "${pkgdir}" + find "${pkgdir}" -type d -exec chmod a+x '{}' \; install -D -m755 "$srcdir/oss.rc" "$pkgdir/etc/rc.d/oss" - + install -D -m755 "$srcdir/ossxmix.desktop" "$pkgdir/usr/share/applications/ossxmix.desktop" + install -D -m644 "$srcdir/ossxmix.png" "$pkgdir/usr/share/pixmaps/ossxmix.png" } - +md5sums=('b9a380a0ac8896390d71ac13676f27e1' + '65f07fe241bfbf912f76d8b6d8f276b5' + 'b70f139f73c2f1ee9db2680ce48121fb' + '1494a2304a1eb7a1979e7e83d894c67a' + 'f6a0fa9d274d21ab92cd03fca885add7' + '81e0f51ec04379dee64c31c32b045028') +# vim: set ft=zsh: diff --git a/oss-hg/oss.rc b/oss-hg/oss.rc index 3f63378..1724aa2 100644 --- a/oss-hg/oss.rc +++ b/oss-hg/oss.rc @@ -1,32 +1,64 @@ #!/bin/bash . /etc/rc.conf . /etc/rc.d/functions - case "$1" in - start) - stat_busy 'Starting Open Sound System' - if /usr/sbin/soundon - then - add_daemon oss - stat_done + start) + if [ "${msg_lang}" = "cn" ]; then + stat_busy "正在启动 OSS 开源驱动" else - stat_fail + stat_busy "Starting OSS/Open source driver" fi - ;; - stop) - stat_busy 'Stopping Open Sound System' - if /usr/sbin/soundoff - then - rm_daemon oss - stat_done - else - stat_fail - fi - ;; - restart) - $0 stop - $0 start - ;; - *) - echo "Usage: $0 {start|stop|restart}" + # start + /usr/sbin/soundon + if [ $? -gt 0 ]; then + stat_fail + else + grep '^softoss' /proc/modules >/dev/null 2>/dev/null +# if [ $? -eq 0 ]; then +# stat_busy "Replacing old \"softoss\" module with \"vmix\"" +# rmmod softoss +# modprobe vmix +# sed -i 's/^softoss.*$/vmix/' /usr/lib/oss/etc/installed_drivers +# fi + add_daemon oss4 + stat_done + fi + ;; + stop) + if [ "${msg_lang}" = "cn" ]; then + stat_busy "正在保存 OSS 设置" + else + stat_busy "Saving OSS mixer" + fi + /usr/sbin/savemixer + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + grep '^"cuckoo"' /proc/modules >/dev/null 2>/dev/null + if [ $? -eq 0 ]; then + stat_busy "Removing \"cuckoo\" module" + rmmod \"cuckoo\" + fi + if [ "${msg_lang}" = "cn" ]; then + stat_busy "正在关闭 OSS 开源驱动" + else + stat_busy "Stopping OSS/Open source driver" + fi + /usr/sbin/soundoff + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon oss4 + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" esac diff --git a/oss-hg/oss.soundon.patch b/oss-hg/oss.soundon.patch new file mode 100644 index 0000000..4702b86 --- /dev/null +++ b/oss-hg/oss.soundon.patch @@ -0,0 +1,28 @@ +--- usr/sbin/soundon.old 2009-09-04 06:35:26.000000000 +0100 ++++ usr/sbin/soundon 2009-11-15 13:59:53.000000000 +0000 +@@ -255,7 +255,10 @@ + then + if test "`uname -m` " = "x86_64 " + then +- ln -sf $OSSLIBDIR/lib/libsalsa.so.2.0.0 /usr/lib64/libasound.so.2 ++ # Fix for compatibility with Arch's directory structure ++ # Not that we use it, there is no $OSSLIBDIR/.libsalsa_installed ++ ln -sf $OSSLIBDIR/lib/libsalsa.so.2.0.0 /usr/lib/libasound.so.2 ++ #ln -sf $OSSLIBDIR/lib/libsalsa.so.2.0.0 /usr/lib64/libasound.so.2 + #ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib64 + else + if test -s /lib/libasound.so.2 +@@ -278,8 +281,11 @@ + then + if test "`uname -m` " = "x86_64 " + then +- ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib64 +- ln -sf $OSSLIBDIR/lib/libossmix.so /usr/lib64 ++ # Fix for compatibility with Arch's directory structure ++ ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib ++ ln -sf $OSSLIBDIR/lib/libossmix.so /usr/lib ++ #ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib64 ++ #ln -sf $OSSLIBDIR/lib/libossmix.so /usr/lib64 + else + if test -s /lib/libasound.so.2 + then diff --git a/oss-hg/ossxmix.desktop b/oss-hg/ossxmix.desktop new file mode 100644 index 0000000..2022bd7 --- /dev/null +++ b/oss-hg/ossxmix.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=OSS X Mixer +Name[zh_CN]=OSS 声音设置 +Type=Application +Comment=OSS Setup +Exec=ossxmix +Categories=System;Application; +GenericName=OSS X Mixer +Icon=/usr/share/pixmaps/ossxmix.png diff --git a/oss-hg/ossxmix.png b/oss-hg/ossxmix.png new file mode 100644 index 0000000..8758fdb Binary files /dev/null and b/oss-hg/ossxmix.png differ diff --git a/vhba-module/PKGBUILD b/vhba-module/PKGBUILD index cf6b507..58842cc 100644 --- a/vhba-module/PKGBUILD +++ b/vhba-module/PKGBUILD @@ -4,13 +4,13 @@ pkgname=vhba-module pkgver=1.2.1 -_kernver='2.6.32-ARCH' +_kernver='2.6.34-ARCH' pkgrel=6 pkgdesc="Kernel module that emulates SCSI devices" arch=('i686' 'x86_64') url="http://cdemu.sourceforge.net/" license=('GPL2') -depends=('kernel26>=2.6.32.2' 'kernel26<2.6.33') +depends=('kernel26>=2.6.34' 'kernel26<2.6.35') makedepends=('kernel26-headers>=2.6.32.2') install=vhba-module.install source=(http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.bz2) diff --git a/virtualbox_bin/.gitignore b/virtualbox_bin/.gitignore new file mode 100644 index 0000000..9857323 --- /dev/null +++ b/virtualbox_bin/.gitignore @@ -0,0 +1 @@ +*.run diff --git a/virtualbox_bin/PKGBUILD b/virtualbox_bin/PKGBUILD index 605710a..6e82e75 100644 --- a/virtualbox_bin/PKGBUILD +++ b/virtualbox_bin/PKGBUILD @@ -6,8 +6,8 @@ # Contributor: iggy pkgname="virtualbox_bin" -pkgver="3.2.0" -_build="61806" +pkgver="3.2.6" +_build="63112" pkgrel=1 pkgdesc="Powerful x86 virtualization (Personal Use Binaries Edition)." arch=('i686' 'x86_64') @@ -23,28 +23,28 @@ optdepends=("qt: for VirtualBox GUI" provides=("virtualbox=${pkgver}") conflicts=('virtualbox-ose' 'virtualbox-modules') install='virtualbox.install' -_architect='x86' -[ "$CARCH" = "x86_64" ] && _architect='amd64' -source=("VirtualBox-${pkgver}-${_build}-Linux_${_architect}.run::http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}-${_build}-Linux_${_architect}.run" +_arch='x86' +[ "$CARCH" = "x86_64" ] && _arch='amd64' +source=("VirtualBox-${pkgver}-${_build}-Linux_${_arch}.run::http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}-${_build}-Linux_${_arch}.run" '10-vboxdrv.rules' - 'vbox_build_module') -md5sums=('003c36b1704dda450b6b21e99afc2d85' + 'vboxdrv') +md5sums=('a32de974d0e06196e7fd4581d93535b1' '98859bfca9ef2ebf2ea43eb9123316fc' - 'dcb2d165b25274f77426a895d6dc41af') -[ "$CARCH" = "x86_64" ] && md5sums[0]='6fc4475dc26af6aa64bd9fb37ea9ca6a' + '160fc08a43cd9a719d306b5f023dea42') +[ "$CARCH" = "x86_64" ] && md5sums[0]='c88939c097f9e077b3941f5752b9e6d7' build() { # Check and unpack the run package via sh(1) - sh "VirtualBox-${pkgver}-${_build}-Linux_${_architect}.run" --check || return 1 - echo yes | sh "VirtualBox-${pkgver}-${_build}-Linux_${_architect}.run" --target "$srcdir" \ + sh "VirtualBox-${pkgver}-${_build}-Linux_${_arch}.run" --check || return 1 + echo yes | sh "VirtualBox-${pkgver}-${_build}-Linux_${_arch}.run" --target "$srcdir" \ --nox11 --noexec &> /dev/null || return 1 # Unpack bundled files - mkdir -p "$pkgdir/opt/VirtualBox" || return 1 + install -d "$pkgdir/opt/VirtualBox" || return 1 cd "$pkgdir/opt/VirtualBox" tar -xjf "$srcdir/VirtualBox.tar.bz2" || return 1 - mkdir -p "$pkgdir/usr/"{bin,share/applications,share/pixmaps} || return 1 + install -d "$pkgdir/usr/"{bin,share/applications,share/pixmaps} || return 1 # Hardened build: Mark binaries suid root, create symlinks for working around # unsupported $ORIGIN/.. in VBoxC.so and make sure the @@ -73,6 +73,18 @@ build() { #cd "$pkgdir/opt/VirtualBox" rm -Rf sdk vboxshell.py VBoxPython* + # Install rc.d script for module compilation + install -Dm0755 "${srcdir}/vboxdrv" "${pkgdir}/etc/rc.d/vboxdrv" || return 1 + + # Replace init script stuff + sed -i -e 's,sudo /etc/init.d/vboxdrv setup,/etc/rc.d/vboxdrv setup,g' \ + "$pkgdir/opt/VirtualBox/VBox.sh" + sed -i -e 's,sudo /etc/init.d/vboxdrv restart,modprobe vboxdrv,g' \ + "$pkgdir/opt/VirtualBox/VBox.sh" + + # Install udev rules + install -Dm0644 "$srcdir/10-vboxdrv.rules" "$pkgdir/lib/udev/rules.d/10-vboxdrv.rules" || return 1 + # Symlink the launchers for _bin in VirtualBox VBox{Headless,Manage,SDL,SVC,Tunctl,NetAdpCtl} rdesktop-vrdp; do ln -s "/opt/VirtualBox/${_bin}" "$pkgdir/usr/bin/${_bin}" @@ -82,23 +94,11 @@ build() { ln -s "/opt/VirtualBox/VBox.png" "$pkgdir/usr/share/pixmaps/VBox.png" ln -s "/opt/VirtualBox/virtualbox.desktop" "$pkgdir/usr/share/applications/VirtualBox.desktop" - # Install vbox_build_module - install -Dm0744 "$srcdir/vbox_build_module" "$pkgdir/usr/bin/vbox_build_module" || return 1 - - # Replace some init scripts by simplified stuff - sed -i -e 's,sudo /etc/init.d/vboxdrv setup,/usr/bin/vbox_build_module,g' \ - "$pkgdir/opt/VirtualBox/VBox.sh" - sed -i -e 's,sudo /etc/init.d/vboxdrv restart,modprobe vboxdrv,g' \ - "$pkgdir/opt/VirtualBox/VBox.sh" - - # Install udev rules - install -Dm0644 "$srcdir/10-vboxdrv.rules" "$pkgdir/lib/udev/rules.d/10-vboxdrv.rules" || return 1 + # Symlink the license + install -d "$pkgdir/usr/share/licenses/$pkgname" || return 1 + ln -s "/opt/VirtualBox/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/PUEL" # Setup configuration - mkdir -p "$pkgdir/etc/vbox" || return 1 + install -d "$pkgdir/etc/vbox" || return 1 echo 'INSTALL_DIR="/opt/VirtualBox"' > "$pkgdir/etc/vbox/vbox.cfg" - - # Symlink the license - mkdir -p "$pkgdir/usr/share/licenses/$pkgname" || return 1 - ln -s "/opt/VirtualBox/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/PUEL" } diff --git a/virtualbox_bin/vboxdrv b/virtualbox_bin/vboxdrv new file mode 100644 index 0000000..df1bfeb --- /dev/null +++ b/virtualbox_bin/vboxdrv @@ -0,0 +1,54 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/vbox/vbox.cfg + +LOG="/var/log/vbox-install.log" +if [ -n "$INSTALL_DIR" ]; then + VBOXMANAGE="$INSTALL_DIR/VBoxManage" + BUILDVBOXDRV="$INSTALL_DIR/src/vboxdrv/build_in_tmp" + BUILDVBOXNETFLT="$INSTALL_DIR/src/vboxnetflt/build_in_tmp" + BUILDVBOXNETADP="$INSTALL_DIR/src/vboxnetadp/build_in_tmp" +else + echo "missing vbox.cfg" + exit 0 +fi +case "$1" in + setup) + if find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|grep -q vboxnetadp; then + stat_busy "Removing old VirtualBox netadp kernel module" + find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|xargs rm -f 2>/dev/null + stat_done + fi + if find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|grep -q vboxnetflt; then + stat_busy "Removing old VirtualBox netflt kernel module" + find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2>/dev/null + stat_done + fi + if find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then + stat_busy "Removing old VirtualBox kernel module" + find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null + stat_done + fi + stat_busy "Recompiling VirtualBox kernel modules" + if ! $BUILDVBOXDRV \ + --save-module-symvers /tmp/vboxdrv-Module.symvers \ + --no-print-directory install > $LOG 2>&1; then + echo "Look at $LOG to find out what went wrong" + fi + if ! $BUILDVBOXNETFLT \ + --use-module-symvers /tmp/vboxdrv-Module.symvers \ + --no-print-directory install >> $LOG 2>&1; then + echo "Look at $LOG to find out what went wrong" + fi + if ! $BUILDVBOXNETADP \ + --use-module-symvers /tmp/vboxdrv-Module.symvers \ + --no-print-directory install >> $LOG 2>&1; then + echo "Look at $LOG to find out what went wrong" + fi + stat_done + ;; + *) + echo "usage: $0 {setup}" +esac diff --git a/virtualbox_bin/virtualbox.install b/virtualbox_bin/virtualbox.install index 6831b68..e41a22b 100644 --- a/virtualbox_bin/virtualbox.install +++ b/virtualbox_bin/virtualbox.install @@ -1,21 +1,3 @@ -_install_notes() { - echo - echo '---------------------------------------------------------------------------' - echo ' IMPORTANT NOTES:' - echo - echo '- Run "vbox_build_module" as root every time your kernel is upgraded, to' - echo ' compile the module for the new kernel version.' - echo '- Add your user to the vboxusers group:' - echo ' gpasswd -a USERNAME vboxusers' - echo '- Add "vboxdrv" to the MODULES array in your "/etc/rc.conf"' - echo '- Add "vboxnetflt" to MODULES if you want Host Interface networking.' - echo '- Add "vboxnetadp" to MODULES if you want Host-Only networking.' - echo '- If USB does not work for you out-of-the-box, add the following line' - echo ' to "/etc/fstab":' - echo ' none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=0664 0 0' - echo "---------------------------------------------------------------------------" -} - # $1: The new package version post_install() { # Unload modules (if any) @@ -24,8 +6,7 @@ post_install() { done # Build new module - echo "Building VirtualBox modules..." - /usr/bin/vbox_build_module &> /dev/null + /etc/rc.d/vboxdrv setup # Add vboxusers group, GID 108 is reserved (http://wiki.archlinux.org/index.php/UID_and_GID_list), # but in some systems it may be being used - please replace if needed. @@ -38,17 +19,39 @@ post_install() { udevadm control --reload-rules # Show the license - echo '---------------------------------------------------------------------------' >&2 - echo ' You must agree to the following license in order to use this program:' >&2 + echo >&2 + echo '==> You must agree to the following license in order to use this program:' >&2 + echo '------------------------------------------------------------------------' >&2 echo >&2 cat "/opt/VirtualBox/LICENSE" >&2 echo >&2 - echo '---------------------------------------------------------------------------' >&2 - - # Load the new module - modprobe vboxdrv - - _install_notes + echo '------------------------------------------------------------------------' >&2 + + /bin/cat < Add your user to the vboxusers group: +==> # gpasswd -a USERNAME vboxusers +==> +==> You must load vboxdrv module before starting VirtualBox: +==> # modprobe vboxdrv +==> +==> You must load vboxnetflt for Host Interface Networking: +==> # modprobe vboxnetflt +==> +==> You must load vboxnetadp for Host-Only networking: +==> # modprobe vboxnetadp +==> +==> To load it automatically, add vboxdrv module to the "MODULES" array +==> "/etc/rc.conf". +==> +==> Run \`/etc/rc.d/vboxdrv setup\` as root every time your kernel is +==> upgraded, to compile the module for the new kernel version. +==> +==> If USB does not work for you out-of-the-box, add the following line +==> to "/etc/fstab": +==> "none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=0664 0 0" + +EOF } # $1: The new package version @@ -70,18 +73,43 @@ post_upgrade() { if [ "$1" != "$2" ]; then rm -Rf "/opt/virtualbox" &> /dev/null fi + + # Build new module + /etc/rc.d/vboxdrv setup # Create the directory below if it doesn't exist mkdir -p "/var/run/VirtualBox" - # Build new module - echo "Building VirtualBox modules..." - /usr/bin/vbox_build_module &> /dev/null - - # Load the new module - modprobe vboxdrv - - _install_notes + /bin/cat < You must load vboxdrv module before starting VirtualBox: +==> # modprobe vboxdrv +==> +==> You must load vboxnetflt for Host Interface Networking: +==> # modprobe vboxnetflt +==> +==> You must load vboxnetadp for Host-Only networking: +==> # modprobe vboxnetadp +==> +==> To load it automatically, add vboxdrv module to the "MODULES" array +==> "/etc/rc.conf". +==> +==> Run \`/etc/rc.d/vboxdrv setup\` as root every time your kernel is +==> upgraded, to compile the module for the new kernel version. +==> +==> If USB does not work for you out-of-the-box, add the following line +==> to "/etc/fstab": +==> "none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=0664 0 0" + +EOF + + if [ "`vercmp $_OLDVERSION 3.2.2`" -lt 0 ]; then + /bin/cat < IMPORTANT: This package now uses \`/etc/rc.d/vboxdrv setup\` instead +==> of the old "vbox_build_module" script. + +EOF + fi } # $1: The old package version -- cgit v1.2.3-24-g4f1b