See https://bugzilla.redhat.com/show_bug.cgi?id=1348671 for an example of this elsewhere. Now I added: https://github.com/projectatomic/rpm-ostree/pull/364 But vagrant appears to do truncate-in-place: Jul 01 15:14:02 icarus.verbum.local rpm-ostreed[15270]: from -e:4:in `<main>' Jul 01 15:14:02 icarus.verbum.local rpm-ostreed[15270]: from /usr/share/vagrant/lib/vagrant/plugin/state_file.rb:39:in `add_plugin' Jul 01 15:14:02 icarus.verbum.local rpm-ostreed[15270]: from /usr/share/vagrant/lib/vagrant/plugin/state_file.rb:94:in `save!' Jul 01 15:14:02 icarus.verbum.local rpm-ostreed[15270]: from /usr/share/vagrant/lib/vagrant/plugin/state_file.rb:94:in `open' Jul 01 15:14:02 icarus.verbum.local rpm-ostreed[15270]: from /usr/share/vagrant/lib/vagrant/plugin/state_file.rb:94:in `open' Jul 01 15:14:02 icarus.verbum.local rpm-ostreed[15270]: /usr/share/vagrant/lib/vagrant/plugin/state_file.rb:94:in `initialize': Read-only file system @ rb_sysopen - /var/lib/vagrant/plugins.json (Errno::EROFS) So the minimal fix for this is to change the code to do create-new-then-rename, like I did for texinfo (and most other software does). Additionally, would be nice to also move the state cache to /usr/lib/vagrant directly in the RPM, so we wouldn't have to carry the change in rpm-ostree.
Hi Colin, Let me think about it, since TBH, I am quite negative about such change. It will be just additional complexity without obvious reasons ... Also, I'd be much happier, if upstream was using something completely different then this single plugin configuration file. If each plugin had its own configuration file, we would not need to register the plugin neither have something stored in /var. Just FTR, this is the snipped used in %post section: http://pkgs.fedoraproject.org/cgit/rpms/vagrant.git/tree/macros.vagrant#n36 and this is where it fails for your use case: https://github.com/mitchellh/vagrant/blob/master/lib/vagrant/plugin/state_file.rb#L94
Created attachment 1176679 [details] Write out via create-new-then-rename
Also submitted upstream https://github.com/mitchellh/vagrant/pull/7550
This was included in 1.8.5 if I am not mistaken, so this should be part of F25.