Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VirtualBox 7.1.x Support #13503

Closed
wants to merge 1 commit into from
Closed

Conversation

hswong3i
Copy link
Contributor

@hswong3i hswong3i commented Sep 18, 2024

With some simple regex + manual confirmation, e.g. find . -type f | xargs fgrep -nH '7.0'

Also reference changes from #12953 and #13046

Fixes #13501

Fixes hashicorp#13501

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/hashicorp-vagrant that referenced this pull request Sep 18, 2024
    git clean -xdf
    git submodule sync --recursive
    git submodule update --recursive --init
    git submodule foreach --recursive git clean -xdf
    gem build vagrant.gemspec -o ../vagrant-2.4.1.gem
    bundle config set --local path ./bundle
    bundle install --verbose --standalone
    bundle config set --local cache_all true
    bundle config set --local cache_all_platforms true
    bundle cache
    mv ../vagrant-2.4.1.gem ./vendor/cache/
    rm -rf .bundle bundle vendor/bundle Gemfile.lock
    tar zcvf ../vagrant_2.4.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp vagrant.spec ../vagrant_2.4.1-1.spec
    cp vagrant.rpmlintrc /osc/home\:alvistack/hashicorp-vagrant-2.4.1/
    cp ../vagrant*2.4.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/hashicorp-vagrant-2.4.1/
    rm -rf ../vagrant*2.4.1*.*

See https://salsa.debian.org/ruby-team/vagrant/-/blob/master/debian/patches/0001-bin-vagrant-silence-warning-about-installer.patch
See https://salsa.debian.org/ruby-team/vagrant/-/blob/master/debian/patches/0005-Relax-dependency-resolution.patch
See https://build.opensuse.org/package/show/openSUSE:Factory/vagrant
See hashicorp#13390
See hashicorp#13499
See hashicorp#13503

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
@egel
Copy link

egel commented Sep 19, 2024

thanks @hswong3i for PR! It would be great to add soon the support for [email protected]! 😁

I am not familiar with code repo but I am wondering what still needs to be done to deliver this feature except fixing the tests?

PS. I've landed here from #13501 as on macOS M1 there is currently no other option (known to me) to use vagrant - as the trick with modifying /usr/local/bin/VBoxManage did not work for me.

@koppor
Copy link

koppor commented Sep 19, 2024

Reading the test output, maybe more has to be done?

 Failed examples:

rspec ./test/unit/plugins/providers/virtualbox/driver/version_7_1_test.rb:200 # VagrantPlugins::ProviderVirtualBox::Driver::Version_7_1#read_bridged_interfaces when hostonlynets are enabled should return all interfaces in list
rspec ./test/unit/plugins/providers/virtualbox/driver/version_7_1_test.rb:213 # VagrantPlugins::ProviderVirtualBox::Driver::Version_7_1#read_bridged_interfaces when hostonlynets are enabled when hostonly networks are defined should not return all interfaces in list
rspec ./test/unit/plugins/providers/virtualbox/driver/version_7_1_test.rb:217 # VagrantPlugins::ProviderVirtualBox::Driver::Version_7_1#read_bridged_interfaces when hostonlynets are enabled when hostonly networks are defined should not include hostonly network devices

networks
end

# The initial VirtualBox 7.1 release has an issue with displaying port

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was actual only for the 7.0.0 release and is not needed here

Copy link

@sergeypayu sergeypayu Oct 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in fact, the only code you need is:

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1

require File.expand_path("../version_7_0", __FILE__)

module VagrantPlugins
  module ProviderVirtualBox
    module Driver
      # Driver for VirtualBox 7.1.x
      class Version_7_1 < Version_7_0
        def initialize(uuid)
          super

          @logger = Log4r::Logger.new("vagrant::provider::virtualbox_7_1")
        end
      end
    end
  end
end

this will also fix the tests errors, since they are failed due to constant redefinition (like HOSTONLY_NET_REQUIREMENT)

billerby added a commit to billerby/vagrant that referenced this pull request Oct 29, 2024
billerby added a commit to billerby/vagrant that referenced this pull request Oct 29, 2024
@billerby
Copy link

billerby commented Oct 29, 2024

Hi @hswong3i, I noticed the reviewer has provided the exact changes needed for this PR. Since the modifications are already specified, I'd be happy to quickly implement these requested changes if you're currently busy with other commitments. Would you prefer to make these updates yourself, or would you be open to having someone help move this forward?

Noticed there is actually a new one implementing it the way its proposed by @sergeypayu
#13513

@slonopotamus
Copy link

There already exists #13513

@hswong3i
Copy link
Contributor Author

Hi @hswong3i, I noticed the reviewer has provided the exact changes needed for this PR. Since the modifications are already specified, I'd be happy to quickly implement these requested changes if you're currently busy with other commitments. Would you prefer to make these updates yourself, or would you be open to having someone help move this forward?

Noticed there is actually a new one implementing it the way its proposed by @sergeypayu #13513

There are some minor missing from #13513 and I had counter propose for it.

Anyway, work could go with #13513, let's close this ;-)

@hswong3i hswong3i closed this Oct 29, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recent version of Virtualbox 7.1.0 is not supported by vagrant 2.4.1
6 participants