Summary: | devel/libvirt: Installation clobbers libvirt/qemu/networks/default.xml (use @sample) | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | packet | ||||
Component: | Individual Port(s) | Assignee: | Roman Bogorodskiy <novel> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | Keywords: | needs-patch, needs-qa | ||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(novel) |
||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
packet
2015-10-19 07:42:45 UTC
Here's the proposed fix: https://reviews.freebsd.org/D3938. Would appreciate if you could test. I'll give some more testing tomorrow as well. (In reply to Roman Bogorodskiy from comment #1) Thanks for taking your time. The patch looks good, but I can't test it at the moment. I will look what I can do tomorrow. (In reply to Roman Bogorodskiy from comment #1) Okay, now it tested the patch with default settings and default make.conf: Patch does not apply cleanly (whitespace issues). When manually "applied", it doesn't clobber default.xml anymore. But: If default.xml is deleted, it is recreated. If autostart is disabled for default.xml, it is again set to start automatically. Thanks for testing the patch. As for persisting autostart configuration I'm not sure how that could be done, because we somehow need to figure out if it's a fresh install or update over existing configuration. At this moment the only idea I have is to disable configuring of autostart completely and update pkg-message with an instruction how to enable autostart for the default network. Thoughts? (In reply to Roman Bogorodskiy from comment #4) Yes, that sounds good. I would also suggest moving the default network config to /usr/local/share/examples, as it would otherwise pop up again after each upgrade if it was deleted before. This makes first time configuration a bit harder, but does not alter customized configurations when upgrading. (In reply to packet from comment #5) Yeah, that sounds good. I'll prepare a patch during this weekend (I hope) and will also provide some starter instructions in the pkg-message. Maybe it is worth to create a wiki page as well because could be not easy at first. Created attachment 162441 [details]
libvirt configuration handling improvements
Here's a new patch. It wasn't that easy to test, hope I didn't miss anything.
Basically, it does the following:
- Networks configuration goes into %%EXAMPLESDIR%%
- pkg-message moved to files/pkg-message.in to allow substitution and updated with instructions how to enable default network
- While here, convert virtlockd.conf to use @sample
Feedback appreciated.
A commit references this bug: Author: novel Date: Sun Nov 1 15:11:07 UTC 2015 New revision: 400619 URL: https://svnweb.freebsd.org/changeset/ports/400619 Log: devel/libvirt: improve configuration handling libvirt stores various configuration objects in XML files and also uses symlinks to enable/disable various things. While using @sample could prevent from touching user-modified configs, it is quite cumbersome to preserve state of enabled or disabled symlink controlled objects across reinstall. In order to address this situation: * Install these configuration files into %%EXAMPLESDIR%%, * Update pkg-message with instructions how to apply the default configuration if user wants to. Also, pkg-message moved to files/pkg-message.in to allow substitution, * While here, convert virtlockd.conf to @sample * Bump PORTREVISION PR: 203865 Differential Revision: D3938 Changes: head/devel/libvirt/Makefile head/devel/libvirt/files/pkg-message.in head/devel/libvirt/pkg-message head/devel/libvirt/pkg-plist Last revision of the patch committed. Please let me know if you have any issues still. |