Created attachment 145421 [details] devel/libvirt update to 1.2.7, switch state dir from /usr/local/var to /var - update to 1.2.7 - It would be very nice to move /usr/local/var into default /var/ directory causes it problems with the interaction between FreeBSD libvirt and not-FreeBSD libvirt systems. I'm not sure that this decision ( with so many directories ) the best, but I suggest this option. Tested on FreeBSD-HEAD/amd64 r269506.
Assign to maintainer. Few comments on this: * I think an UPDATING entry should be provided for /usr/local/var -> /var change as libvirt stored various stuff there like hypervisor pids, VM states etc and it would be safer to copy that stuff over to the new location. * I'm not sure that this path should be changeable for a port user: +LIBVIRT_RUNDIR?= ${VARDIR}/run/libvirt If a user wants to chance paths, it'd would be better to change it in the libvirt config file. Also, this way works for both ports and packages.
A little more on the reasoning behind /usr/local/var -> /var path change. When connecting using virsh or e.g. virt-manager from FreeBSD host to libvirtd running on Linux, it will look for libvird socket in /usr/local/var/run/libvirt, however, Linux systems store that in /var/run/libvirt. The connection will fail with an error that's not so easy to understand: it'll say something that the daemon is probably not running etc. The same happens when connecting from Linux hosts to libvirtd on FreeBSD -- it'll look for socket in /var/run/libvirt, but it's on /usr/local/var/run/libvirt.
I agree with Roman on this. The port already breaks hierarchy, and I have wanted to change this behavior for some time. Please update the patch so /var is not configurable in the Makefile. I will have time to work on this shortly. Thanks! -jgh
Created attachment 145424 [details] update patch according to Roman advice: VARDIR is not configurable update patch according to Roman advice: VARDIR is not configurable
Thank you very much for your time and work on this patch, however I am curious if if /var is unconfigurable, it seems that some of the complexity of the patch could be removed. For example, instead of defining the following: RUNDIR_NETWORK= ${LIBVIRT_RUNDIR}/network RUNDIR_QEMU= ${LIBVIRT_RUNDIR}/qemu RUNDIR_LOCKD= ${LIBVIRT_RUNDIR}/lockd I would simply define ${LIBVIRT_RUNDIR}, as you have: LIBVIRT_RUNDIR= ${VARDIR}/run/libvirt And then flat add the other directories. I don't see why they all need to be defined. .for dir in network qmu lockd ... ${MKDIR} ${STAGEDIR}${LIBVIRT_RUNDIR}${dir} ... .endfor Thanks, and thoughts are welcome!
Created attachment 146081 [details] libvirt 1.2.7 and /var
I worked out a patch today, that I believe should do the trick based on the original patch. Please let me know what you think. I do have to wait on an infrastructure change, though, as there is an issue with OPTIONS_DEFAULT at this point.
Please apply, and update to 1.2.9 while you're at it. Thanks.
(In reply to jgh from comment #7) > I do have to wait on an infrastructure change, though, as there is an issue > with OPTIONS_DEFAULT at this point. I think maybe Bryan fixed that with this commit[0]? You can't set OPTIONS_DEFAULt after including bsd.port.option.mk. [0]: https://github.com/freebsd/freebsd-ports/commit/bbd7d7a4df48bdeef2c0052a653632bb2b1c916c Thanks.
(In reply to Conrad Meyer from comment #8) > Please apply, and update to 1.2.9 while you're at it. Thanks. I fetched 1.2.10 from the git repo yesterday. And was required to remove -Werror from the tools/Makefile to keep going. It is IMHO sort of a wierd thing to include such an amount of W-flags, but then anyways. That part is probably not up to FreeBSD.
It could be configured with --disable-werror, no need to edit Makefiles. Also, it's disabled by default in the release builds IIRC. However, could you please paste the errors you get with -Werror?
(In reply to Roman Bogorodskiy from comment #11) > Also, it's disabled by default in the release builds IIRC. 1.2.10 doesn't actually exist yet, I think Willem means he fetched latest git.
(In reply to Conrad Meyer from comment #12) > 1.2.10 doesn't actually exist yet, I think Willem means he fetched latest > git. Probably more than true... "but" virsh version gives me 1.2.10. FreeBSD would probably call it HEAD. The error Roman was asking about: In tools: make all-am CC virsh-virsh.o cc1: warnings being treated as errors In file included from /usr/local/include/readline/readline.h:36, from virsh.c:53: /usr/local/include/readline/rltypedefs.h:34: warning: function declaration isn't a prototype [-Wstrict-prototypes] /usr/local/include/readline/rltypedefs.h:35: warning: function declaration isn't a prototype [-Wstrict-prototypes] /usr/local/include/readline/rltypedefs.h:36: warning: function declaration isn't a prototype [-Wstrict-prototypes] /usr/local/include/readline/rltypedefs.h:37: warning: function declaration isn't a prototype [-Wstrict-prototypes] In file included from virsh.c:53: /usr/local/include/readline/readline.h:381: warning: function declaration isn't a prototype [-Wstrict-prototypes] And looking at this part of the readline code is way to much for my fragile soul.
I finally starting making some headway on this last week after getting a proper build environment working. I should be able to update this week. Any thoughts on an UPDATING message for /var shift?
As for UPDATING, I think it would be enough to mention that users are advised to copy over contents of the old var directory to the new path if they want to preserve resources from the old setup.
Thanks, Roman! And also.... Well, I was getting 1.2.8 to build fine, however 1.2.9 is a different story... So far, failures to files, not sure if this is a build issue or something else. Will look later, but feel free to let me know if you see anything that jumps out. http://meatwad.mouf.net/rubick/poudriere/data/92amd64-jgh/2014-10-27_18h15m20s/logs/errors/libvirt-1.2.9.log pkg-static: lstat(/wrkdirs/usr/ports/devel/libvirt/work/stage/usr/local/lib/libvirt-lxc.so.0.1002.8): No such file or directory pkg-static: lstat(/wrkdirs/usr/ports/devel/libvirt/work/stage/usr/local/lib/libvirt-qemu.so.0.1002.8): No such file or directory pkg-static: lstat(/wrkdirs/usr/ports/devel/libvirt/work/stage/usr/local/lib/libvirt.so.0.1002.8): No such file or directory
Doh. Forget it :)
A commit references this bug: Author: jgh Date: Wed Oct 29 22:18:02 UTC 2014 New revision: 371717 URL: https://svnweb.freebsd.org/changeset/ports/371717 Log: - update libvirt,py-libvirt,libvirt-glib to 0.1.9 - shift var from ${PREFIX} to /var - bump shared libs of dep. port PR: 192441 (based on) Submitted by: olevole@olevole.ru Changes: head/UPDATING head/deskutils/virt-manager/Makefile head/devel/libvirt/Makefile head/devel/libvirt/distinfo head/devel/libvirt/files/libvirtd.in head/devel/libvirt/pkg-plist head/devel/libvirt-glib/Makefile head/devel/libvirt-glib/distinfo head/devel/libvirt-glib/pkg-plist head/devel/libvirt-java/Makefile head/devel/p5-Sys-Virt/Makefile head/devel/py-libvirt/Makefile head/devel/py-libvirt/distinfo head/net-mgmt/collectd/Makefile head/net-mgmt/collectd5/Makefile head/net-mgmt/virt-viewer/Makefile head/net-mgmt/virtinst/Makefile head/sysutils/cfengine33/Makefile head/sysutils/cfengine34/Makefile head/sysutils/cfengine35/Makefile head/sysutils/cfengine36/Makefile head/sysutils/cfengine36-rc/Makefile
Thanks!