From e7a8936c6fc4bc6a70f1c0bba7d3619e40a2e14c Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Fri, 6 Feb 2015 10:48:26 +0200 Subject: [PATCH] UBUNTU: SAUCE: ubuntu: (no-squash) vbox -- infrastructure and updater Signed-off-by: Andy Whitcroft --- ubuntu/Makefile | 6 ++++++ ubuntu/vbox-update | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100755 ubuntu/vbox-update diff --git a/ubuntu/Makefile b/ubuntu/Makefile index 5823ca0b2f65..2069569052db 100644 --- a/ubuntu/Makefile +++ b/ubuntu/Makefile @@ -15,6 +15,12 @@ ## ## ## +ifneq ($(filter $(ARCH), i386 x86_64),) +obj-y += vbox/ +endif +## +## +## # This is a stupid trick to get kbuild to create ubuntu/built-in.o obj- += foo.o diff --git a/ubuntu/vbox-update b/ubuntu/vbox-update new file mode 100755 index 000000000000..83b0ebf341b7 --- /dev/null +++ b/ubuntu/vbox-update @@ -0,0 +1,49 @@ +#!/bin/bash +# +# vbox-update + +# +# NOTE: update vbox/BOM if you get the source from anywhere other than +# the archive. +# +# To update: +# TMP=$HOME/tmp +# wget -O $TMP/virtualbox-guest-dkms.deb http://ports.ubuntu.com/pool/multiverse/v/virtualbox/virtualbox-guest-dkms_4.3.22-dfsg-1_all.deb +# dpkg-deb -R $TMP/virtualbox-guest-dkms.deb $TMP/virtualbox-guest-update +# vbox-update $TMP/virtualbox-guest-update +# +# To test build: +# fakeroot debian/rules prepare-generic +# make O=debian/build/build-generic/ ubuntu/vbox/vboxguest/vboxguest.ko ubuntu/vbox/vboxvideo/vboxvideo.ko ubuntu/vbox/vboxsf/vboxsf.ko +# + +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " 1>&2 + exit 1 +fi +vbox="$1" + +# Update vbox ... +git rm -rf vbox +mkdir vbox +cp -rp "$vbox/usr/src/"*/* vbox + +# Work out what version this represents. +ver=`awk '($1 == "Version:") { print $2 }' <"$vbox/DEBIAN/control"` + +# Fix up the KBUILD_EXTMOD as we are not building externally. +for make in vbox/*/Makefile +do + sed -i -e '1iKBUILD_EXTMOD=${srctree}/ubuntu/vbox' $make +done + +# Record the version number and nominal source. +{ + echo "Source: http://ports.ubuntu.com/pool/multiverse/v/virtualbox/virtualbox-guest-dkms_${ver}_all.deb" + echo "Version: $ver" +} >vbox/BOM + +git add vbox +{ + echo "UBUNTU: ubuntu: vbox -- update to $ver" +} | git commit -s -F - -- 2.39.2