diff --git a/vbox_fix_for_gcc7.patch b/vbox_fix_for_gcc7.patch new file mode 100644 index 0000000..e4cd3ae --- /dev/null +++ b/vbox_fix_for_gcc7.patch @@ -0,0 +1,27 @@ +Index: VirtualBox-5.1.22/configure +=================================================================== +--- VirtualBox-5.1.22.orig/configure ++++ VirtualBox-5.1.22/configure +@@ -447,8 +447,8 @@ check_gcc() + -o \( $cc_maj -eq 4 -a $cc_min -gt 9 \) \ + -o \( $cc_maj -eq 5 -a $cc_min -gt 9 \) \ + -o \( $cc_maj -eq 6 -a $cc_min -gt 9 \) \ +- -o $cc_maj -gt 6 ]; then +- log_failure "gcc version $cc_maj.$cc_min found, expected gcc 4.x, gcc 5.x or gcc 6.x" ++ -o $cc_maj -gt 7 ]; then ++ log_failure "gcc version $cc_maj.$cc_min found, expected gcc 4.x, gcc 5.x, gcc 6.x or gcc7.x" + fail really + else + log_success "found version $cc_ver" +Index: VirtualBox-5.1.22/src/VBox/Devices/PC/ipxe/src/arch/i386/interface/pxe/pxe_preboot.c +=================================================================== +--- VirtualBox-5.1.22.orig/src/VBox/Devices/PC/ipxe/src/arch/i386/interface/pxe/pxe_preboot.c ++++ VirtualBox-5.1.22/src/VBox/Devices/PC/ipxe/src/arch/i386/interface/pxe/pxe_preboot.c +@@ -262,6 +262,7 @@ pxenv_restart_tftp ( struct s_PXENV_TFTP + + /* Restart NBP */ + rmlongjmp ( pxe_restart_nbp, PXENV_RESTART_TFTP ); ++ return 0; + } + + /* PXENV_START_UNDI diff --git a/virtualbox.changes b/virtualbox.changes index 05448b5..4eae8ea 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 17 20:33:08 UTC 2017 - Larry.Finger@lwfinger.net + +- Made changes to build with gcc 7.x. This adds new file "vbox_fix_for_gcc7.patch". + Changed the building of VBoxVNC to remove the hack used earlier. + ------------------------------------------------------------------- Wed May 10 17:39:57 UTC 2017 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index 255c4aa..8b4a0dc 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -96,6 +96,8 @@ Patch112: modify_for_4_8_bo_move.patch Patch113: vbox_remove_smp_mflags.patch # Fix change in API for get_user_pages() Patch114: vbox_fix_42.3_api.patch +# Allow use of gcc7 +Patch115: vbox_fix_for_gcc7.patch # Fix for missing include needed for server 1.19 Patch116: Fix_for_server_1.19.patch # @@ -370,6 +372,7 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL. %if 0%{?sle_version} == 120300 %patch114 -p1 %endif +%patch115 -p1 %patch116 -p1 #copy user manual @@ -745,13 +748,9 @@ getent group vboxsf >/dev/null || groupadd -r vboxsf %post websrv %post vnc -# There is a major hack here. The extpack option for VBoxManage is supposed to accept the sha256sum hash -# of the license file using the --accept-license option. This does not work. To get around the issue, a -# file (yes) containing a single "Y" is created and that is piped to the standard input of VBoxManage. -# With this hack, VBoxManage silently accepts the GPL V2 license. The new file is then deleted. -echo "Y" > yes -VBoxManage extpack install --replace "/usr/share/virtualbox/extensions/VNC-%{version}.vbox-extpack" > /dev/null < yes -rm yes +EXTPACK="/usr/share/virtualbox/extensions/VNC-%{version}.vbox-extpack" +ACCEPT="$(tar --to-stdout -xf "${EXTPACK}" ./ExtPack-license.txt | sha256sum | head --bytes=64)" +VBoxManage extpack install --replace "${EXTPACK}" --accept-license="${ACCEPT}" > /dev/null ####################################################### # scriptlets preun