Re: Vagrant in Fedora

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/10/13 23:49, Nathanael D. Noblet wrote:
On 10/15/2013 01:06 PM, Alex Drahon wrote:
On 26/09/13 22:09, Alex Drahon wrote:
On 24/09/13 06:43, Nathanael Noblet wrote:
On 09/23/2013 06:37 AM, Alexandre Drahon wrote:
Hi all,

I wanted to give an update on the status of Vagrant in Fedora 20, I
just realised it's my first post to the list so I'll take this
opportunity to introduce myself. I'm Alex, I work at Red Hat as a
Solution Architect (ie. nothing engineering related), I wrote the
vagrant-kvm plugin on my spare time to make it work on my Fedora
laptop, though there's now a (much more qualified) second maintainer
who is also providing support for Ubuntu through a PPA. Matthew
asked me if I wanted to work on packaging Vagrant and the KVM plugin
for Fedora 20, and I foolishly accepted ;)

It's quite exhilarating having the opportunity to contribute to
Fedora, and at the same time I feel totally lost. I don't mean this
as a criticism, it's just this "first week at school" feeling, it
will take me some time to get an idea of how things work. That said,
here's the Vagrant situation:

1. I have a vagrant RPM that installs and works as expected, there's
some minimal patching involved which has to do with the fact that
Vagrant expect to be running in it's own Ruby 1.9.3 environment in /opt
2. There was also some patching involved to make the plugin system
work, although I haven't tested plugins extensively (some stuff
breaks like rubygems loading path) and providing common plugins as
RPMs looks like the better way in Fedora.
3. I had to build my own rubygems-childprocess (current Fedora
package is very old) and rubygems-log4r (not provided in Fedora)
RPMs, but I don't know how I should submit them (package review
ticket?). There's a existing ticket for log4r
https://bugzilla.redhat.com/show_bug.cgi?id=905240, I added it as a
dependency to the Vagrant ticket.
4. I've packaged vagrant-kvm as a RPM and it installs, but I'm
running into serious issues with Policykit. I don't think I'll be
able to solve that without help, I'm not even sure what's the right
way to do it.

So, as a summary:
 - yum install vagrant should work, at which point you need to
install VirtualBox and it will run as expected
 - vagrant-kvm installs but I don't know how to add the right polkit
rules (I need help)

Looks pretty good, right?

It does... Since some of the work needed to get this working requires
packages that aren't in fedora already are you able to provide a link
to a bunch of src.rpms of everything needed. I'd like to test and
wanted to help with this feature awhile back but got sidetracked...
However I don't have F20 running on anything so would likely use mock
to compile for F18 and see if I can help resolve/test/do something
like that.


I posted the current source packages here http://srpms.adrahon.org/

Vagrant should work with VirtualBox
(http://download.virtualbox.org/virtualbox/4.2.18/VirtualBox-4.2-4.2.18_88780_fedora18-1.x86_64.rpm
).

vagrant-kvm still has issues, not sure it's in a testable state yet.


After trying several solutions, I think I have found the right
compromise and finally have working packages (with a some caveats).
Again the source packages are at http://srpms.adrahon.org/ :
  - vagrant looks for plugins both in the user's ~/.vagrant.d directory
and /usr/share/gems for system-wide plugins (like vagrant-kvm)
  - my patched vagrant version looks in /etc/vagrant for the system-wide
plugin registry
  - I added commands to vagrant plugin to manage registration of
system-wide plugins (installed with yum)
  - rpm-packaged plugins register/unregister themselves at
installation/uninstallation

This means that Vagrant's behaviour hasn't changed and we can still
package plugins as RPMs.

How to test:
  - you need to install rubygem-log4r, then vagrant, then
rubygem-vagrant-kvm
  - "vagrant init fedora19" (name of your box) then edit the Vagrantfile
(you need a private network with a 192.168.192.0 address)
  - "vagrant up --provider=kvm" should work

When installing rubygem-vagrant-kvm I get this output on a F19 box...
Running transaction
  Installing : rubygem-vagrant-kvm-0.1.4-1.fc19.noarch 1/1
translation missing: en.vagrant.commands.plugin.unregistering
translation missing: en.vagrant.commands.plugin.unregistering
/usr/share/gems/gems/vagrant-1.3.3/plugins/commands/plugin/state_file.rb:51:in `initialize': No such file or directory - /etc/vagrant/plugins.json (Errno::ENOENT)
... long stack trace.

There is no /etc/vagrant directory. and querying the packages built from your source none of them have a /etc/vagrant directory. I see your vagrant.spec file creates the directory in the buildroot but doesn't claim it in the %files section.

When I add
%dir %{_sysconfdir}/vagrant

to your vagrant.spec and rebuild I get further. At least its attempting to fire up a new vagrant instance and I get the polkit prompt...


Also a small packaging issue/suggestion. Typically when trying to get a package included in Fedora you go through issues where you have to regenerate a package. When I was submitting my first packages I don't know how many times I had to make changes, however it is still good to bump the 'Release' tag so that updates continue to function. With the packages you've posted the release number is still 1 so I have to yum remove them and then yum install them. When I did this I was told that its good to use 0.x as the release version so that once submitted to the packagedb the release number starts at 1. Just a thought, either way it would be nice if the release version changed with each of your changes.


I missed the /etc/vagrant issue, bad testing. It seems strange that I didn't get an alert about having `install -d -m 755 %{buildroot}/etc/vagrant` in %install but no reference to it in %files (`%dir %{_sysconfdir}/vagrant` goes in %files I guess).

Well noted for the release number issue and it makes sense.

Thanks for the feedback.
_______________________________________________
cloud mailing list
cloud@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/cloud
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Big List of Linux Books]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

  Powered by Linux