diff --git a/vbox-python-detection.diff b/vbox-python-detection.diff new file mode 100644 index 0000000..bb3edee --- /dev/null +++ b/vbox-python-detection.diff @@ -0,0 +1,47 @@ +--- VirtualBox-4.0.2_OSE.orig/src/libs/xpcom18a4/python/gen_python_deps.py 2011-01-14 20:15:09.000000000 +0000 ++++ VirtualBox-4.0.2_OSE/src/libs/xpcom18a4/python/gen_python_deps.py 2011-02-07 05:36:42.427567000 +0000 +@@ -68,7 +68,7 @@ + else: + multi = 1 + +- if multi == 0: ++ if not multi: + prefixes = ["/usr"] + versions = [str(sys.version_info[0])+'.'+str(sys.version_info[1])] + +@@ -86,22 +86,23 @@ + for v in versions: + for p in prefixes: + c = checkPair(p, v, dllpre, dllsuff, bitness_magic) +- if c is not None: ++ if c: + known[v] = c + break +- keys = known.keys() +- # we want default to be the lowest versioned Python +- keys.sort() +- d = None + # We need separator other than newline, to sneak through $(shell) + sep = "|" +- for k in keys: +- if d is None: +- d = k +- vers = k.replace('.', '') +- print_vars(vers, known[k], sep, bitness_magic) +- if d is not None: +- print_vars("DEF", known[d], sep, bitness_magic) ++ ++ if not known: ++ # this type of problem should be detected in configure ++ # print_vars("DEF", defaultpaths, sep, bitness_magic) ++ pass ++ if multi: ++ for ver, paths in known.items(): ++ print_vars(ver.replace('.', ''), paths, sep, bitness_magic) ++ else: ++ ver = versions[0] ++ paths = known[ver] ++ print_vars(ver.replace('.', ''), paths, sep, bitness_magic) + + if __name__ == '__main__': + main(sys.argv) diff --git a/vbox-xpcom-kmk.diff b/vbox-xpcom-kmk.diff new file mode 100644 index 0000000..7e1cccb --- /dev/null +++ b/vbox-xpcom-kmk.diff @@ -0,0 +1,15 @@ +--- VirtualBox-4.0.2_OSE.orig/src/libs/xpcom18a4/Makefile.kmk 2011-01-14 20:19:30.000000000 +0000 ++++ VirtualBox-4.0.2_OSE/src/libs/xpcom18a4/Makefile.kmk 2011-02-05 18:09:05.797482000 +0000 +@@ -471,9 +471,11 @@ + xpidl_CFLAGS = \ + $(libIDL_config_cflags) + xpidl_LDFLAGS = \ +- $(libIDL_config_libs) ++ $(filter-out -l%,$(libIDL_config_libs)) + xpidl_LDFLAGS.linux = \ + $(VBOX_LD_as_needed) ++ xpidl_LIBS = \ ++ $(patsubst -l%,%,$(filter -l%,$(libIDL_config_libs))) + endif + + # diff --git a/virtualbox.changes b/virtualbox.changes index 0308894..e902526 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Feb 8 07:36:53 UTC 2011 - cshorler@googlemail.com + +- The python package isn't installed correctly, and contains an + unnecessary shared library due to a build / config bug. It is + also missing pre-compiled python (pyc). +- added vbox-python-detection.diff and vbox-xpcom-kmk.diff + ------------------------------------------------------------------- Mon Jan 31 01:52:58 UTC 2011 - cshorler@googlemail.com diff --git a/virtualbox.spec b/virtualbox.spec index 1201f57..9dc67ba 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -1,7 +1,7 @@ # -# spec file for package virtualbox +# spec file for package virtualbox (Version 3.9.80) # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,7 +32,7 @@ BuildRequires: e2fsprogs-devel libcap-devel libcurl-devel python-devel update-d BuildRequires: hal-devel pulseaudio-devel xorg-x11 xorg-x11-devel xorg-x11-server xorg-x11-server-sdk BuildRequires: LibVNCServer-devel gcc43-c++ kbuild pam-devel udev %if %suse_version > 1110 -BuildRequires: zlib-devel-static +BuildRequires: zlib-devel-static %endif %ifarch amd64 x86_64 ia32e em64t BuildRequires: hal-32bit @@ -43,7 +43,7 @@ BuildRequires: gcc43-32bit libstdc++43-devel-32bit # ExclusiveArch: %ix86 x86_64 Version: 4.0.2 -Release: 2 +Release: 1 Summary: VirtualBox is an Emulator License: GPLv2+ Group: System/Emulators/PC @@ -82,6 +82,9 @@ Patch5: vbox-config.diff #file :http://www.virtualbox.org/browser/trunk/src/VBox/Devices/PC/vbox.ds #see thread : http://lists.freebsd.org/pipermail/freebsd-acpi/2010-October/006795.html Patch6: vbox-smc-napa.diff +#fix build of Python and dev package on openSUSE 11.3 +Patch7: vbox-xpcom-kmk.diff +Patch8: vbox-python-detection.diff #PATCH-FIX-OPENSUSE implement messagebox (VBoxPermissionMessage app), which is displayed, when user #try to start VirtualBox and is not memeber of vboxusers group Patch99: vbox-permissions_warning.diff @@ -89,7 +92,7 @@ Patch99: vbox-permissions_warning.diff Patch100: vbox-no-build-dates.diff Patch101: vbox-default-os-type.diff #disable update in vbox gui -Patch102: vbox-disable-updates.diff +Patch102: vbox-disable-updates.diff # Patch103: vbox-2.6.38.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -119,6 +122,7 @@ Provides: %{name}-ose:/usr/lib/virtualbox/VirtualBox.so Provides: %{name}-ose-qt = %version Obsoletes: %{name}-ose-qt < %version + %description qt Qt GUI part for %{name}. ######################################### @@ -171,7 +175,6 @@ VirtualBox guest addition tools. ########################################### %package -n python-%{name} - Summary: Python bindings for %{name} Group: Development/Libraries/Python Requires: %{name} = %{version} @@ -202,6 +205,8 @@ Development file for %{name} %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 +%patch8 -p1 %patch99 -p1 %patch100 %patch101 @@ -220,17 +225,21 @@ export SUSE_ASNEEDED=0 # --nofatal try to avoid build fail caused by missing makeself package ./configure \ --disable-kmods \ - --with-gcc=/usr/bin/gcc-4.3 \ - --with-g++=/usr/bin/g++-4.3 \ + --with-gcc=gcc-4.3 \ + --with-g++=g++-4.3 \ --disable-java \ --disable-docs \ --nofatal + +# configure actually warns we should source env.sh (which seems like it could influence the build...) +source env.sh + # # VBOX_PATH_PACKAGE_DOCS set propper path for link to pdf in .desktop file # VBOX_WITH_REGISTRATION_REQUEST= VBOX_WITH_UPDATE_REQUEST= just disable some functionality in gui -# -j1 disable parallel build to avoid "Out of memory: Kill process" crash of build in buildservice +# -j1 disable parallel build to avoid "Out of memory: Kill process" crash of build in buildservice /usr/bin/kmk \ - -j1 \ + -j1 \ KBUILD_VERBOSE=2 \ VBOX_WITH_REGISTRATION_REQUEST= VBOX_WITH_UPDATE_REQUEST= \ TOOL_YASM_AS=yasm \ @@ -277,10 +286,9 @@ done ################################# echo "create directory structure" ################################# +%__install -d -m 755 %{buildroot}/sbin %__install -d -m 755 %{buildroot}%{_bindir} %__install -d -m 755 %{buildroot}%{_sbindir} -%__install -d -m 755 %{buildroot}/sbin -%__install -d -m 755 %{buildroot}%{_datadir}/virtualbox %__install -d -m 755 %{buildroot}%{_datadir}/virtualbox/nls %__install -d -m 755 %{buildroot}%{_datadir}/pixmaps %__install -d -m 755 %{buildroot}%{_datadir}/applications @@ -290,7 +298,8 @@ echo "create directory structure" #since 11.3 we don't use hal to detect vbox mouse %__install -d -m 755 %{buildroot}%{_datadir}/hal/fdi/policy/20thirdparty %endif -%__install -d -m 755 %{buildroot}%{_vbox_instdir} +%__install -d -m 755 %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom +#%__install -d -m 755 %{buildroot}%{_vbox_instdir}/sdk/bindings/glue %__install -d -m 755 %{buildroot}%{_vbox_instdir}/components %__install -d -m 755 %{buildroot}%{_libdir}/dri %__install -d -m 755 %{buildroot}%{_libdir}/xorg/modules/drivers @@ -300,7 +309,6 @@ echo "create directory structure" %__install -d -m 755 %{buildroot}%{_sysconfdir}/vbox %__install -d -m 755 %{buildroot}%{_sysconfdir}/udev/rules.d %__install -d -m 755 %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d -%__install -d -m 755 %{buildroot}%{python_sitelib}/virtualbox #################################################################################### echo "entering virtualbox-kmp-guest and virtualbox-kmp-host install section" @@ -417,9 +425,13 @@ pushd out/linux.*/release/bin # install languages %__install -m 644 nls/* %{buildroot}%{_datadir}/virtualbox/nls/ popd + +# the build process tells us the desktop file is missing a semicolon...(repackage?) +%__sed 's/^MimeType.*[^;]$/&;/' out/linux.*/release/bin/virtualbox.desktop > %{_tmppath}/virtualbox.desktop # install desktop file -%__install -m 644 out/linux.*/release/bin/virtualbox.desktop \ - %{buildroot}%{_datadir}/applications/%{name}.desktop +%__install -m 644 %{_tmppath}/virtualbox.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop +%suse_update_desktop_file %{buildroot}%{_datadir}/applications/%{name}.desktop 'System Emulator' + # create a menu entry %__install -m 644 out/linux.*/release/bin/VBox.png \ %{buildroot}%{_datadir}/pixmaps/ @@ -429,7 +441,10 @@ popd %__install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/default/virtualbox #install wrapper script %__install -m 644 %{S:9} %{buildroot}%{_bindir}/VirtualBox + + # modify and install the vboxdrv init script +# TODO: some of this stuff breaks the fillup macros below? %__sed -i "s|%NOLSB%|yes|g;s|%DEBIAN%||g;s|%PACKAGE%|virtualbox|g" src/VBox/Installer/linux/vboxdrv.sh.in %__install -m 744 src/VBox/Installer/linux/vboxdrv.sh.in \ %{buildroot}%{_sysconfdir}/init.d/vboxdrv @@ -442,13 +457,31 @@ popd %__install -d -m 755 %{buildroot}%{_var}/adm/fillup-templates install -m 700 %{S:13} %{buildroot}%{_var}/adm/fillup-templates/sysconfig.vbox -%suse_update_desktop_file -i %{buildroot}%{_datadir}/applications/%{name}.desktop System Emulator + ###################################################### -echo "entrering python-virtualbox and virtualbox-devel install section" +echo "entrering python-virtualbox install section" ###################################################### -%__mv out/linux.*/release/bin/sdk/ \ - %{buildroot}%{_vbox_instdir} +pushd out/linux.*/release/bin/sdk/installer +VBOX_INSTALL_PATH=%{_vbox_instdir} python vboxapisetup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=%{_tmppath}/SITE_FILES +popd +%__install -d -m 755 %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom +%__cp -r out/linux.*/release/bin/sdk/bindings/xpcom/python %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom +%py_compile %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom/python + +###################################################### +echo "entering virtualbox-devel install section" +###################################################### +%__cp -r out/linux.*/release/bin/sdk/bindings/auth %{buildroot}%{_vbox_instdir}/sdk/bindings + +pushd out/linux.*/release/bin/sdk/bindings/xpcom +%__cp -r include %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom +%__cp -r idl %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom +%__cp -r cbinding %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom +%__cp -r samples %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom +popd + +%__cp out/linux.*/release/bin/sdk/bindings/VirtualBox.xidl %{buildroot}%{_vbox_instdir}/sdk/bindings ###################################################### # run fdupes @@ -492,11 +525,11 @@ exit 0 %insserv_cleanup %verifyscript %if %suse_version > 1110 -%verify_permissions -e %{_vbox_instdir}/VBoxBFE -e %{_vbox_instdir}/VBoxHeadless -e %{_vbox_instdir}/VBoxSDL -e %{_vbox_instdir}/VirtualBox -e %{_vbox_instdir}/VBoxNetAdpCtl +%verify_permissions -e %{_vbox_instdir}/VBoxBFE -e %{_vbox_instdir}/VBoxHeadless -e %{_vbox_instdir}/VBoxSDL -e %{_vbox_instdir}/VirtualBox -e %{_vbox_instdir}/VBoxNetAdpCtl %else -%verify_permissions -e %{_vbox_instdir}/VBoxBFE -e %{_vbox_instdir}/VBoxHeadless -e %{_vbox_instdir}/VBoxSDL -e %{_vbox_instdir}/VirtualBox +%verify_permissions -e %{_vbox_instdir}/VBoxBFE -e %{_vbox_instdir}/VBoxHeadless -e %{_vbox_instdir}/VBoxSDL -e %{_vbox_instdir}/VirtualBox %endif -#-e %{_vbox_instdir}/VBoxNetDHCP + %clean [ -d "%{buildroot}" -a "%{buildroot}" != "" ] && %__rm -rf "%{buildroot}" @@ -570,7 +603,6 @@ exit 0 #%verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxNetDHCP %{_vbox_instdir}/VBoxNetDHCP # - %files qt %defattr(-, root, root) %{_vbox_instdir}/VBoxPermissionMessage @@ -614,30 +646,29 @@ exit 0 %{_sbindir}/rcvboxadd # -%files -n python-%{name} -%defattr(-,root, root) +%files -n python-%{name} -f %{_tmppath}/SITE_FILES +%defattr(-, root, root) %dir %{_vbox_instdir}/sdk %dir %{_vbox_instdir}/sdk/bindings %dir %{_vbox_instdir}/sdk/bindings/xpcom %{_vbox_instdir}/sdk/bindings/xpcom/python -%{_vbox_instdir}/VBoxPython.so %if 0%{?suse_version} > 1130 -%{_vbox_instdir}/VBoxPython2_7.so +%attr(0755, root, root) %{_vbox_instdir}/VBoxPython2_7.so %else -%{_vbox_instdir}/VBoxPython2_6.so +%attr(0755, root, root) %{_vbox_instdir}/VBoxPython2_6.so %endif -#path with vboxapi -%{_vbox_instdir}/sdk/installer -# %files devel %defattr(-,root, root) +%dir %{_vbox_instdir}/sdk +%dir %{_vbox_instdir}/sdk/bindings +%dir %{_vbox_instdir}/sdk/bindings/xpcom %{_vbox_instdir}/sdk/bindings/VirtualBox.xidl %{_vbox_instdir}/sdk/bindings/xpcom/cbinding %{_vbox_instdir}/sdk/bindings/xpcom/idl %{_vbox_instdir}/sdk/bindings/xpcom/include %{_vbox_instdir}/sdk/bindings/xpcom/samples %{_vbox_instdir}/sdk/bindings/auth -%{_vbox_instdir}/sdk/bindings/glue +#%{_vbox_instdir}/sdk/bindings/glue/java %changelog