Index: head/devel/libvirt/Makefile =================================================================== --- head/devel/libvirt/Makefile +++ head/devel/libvirt/Makefile @@ -3,6 +3,7 @@ PORTNAME= libvirt PORTVERSION= 1.2.20 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://libvirt.org/sources/ \ ftp://libvirt.org/libvirt/ @@ -86,6 +87,8 @@ SHLIB_VER=${SHLIB_VER} PORTDOCS= * +SUB_FILES= pkg-message + .include .if (exists(/usr/sbin/bhyve) && ${OSVERSION} >= 100051) @@ -107,11 +110,20 @@ @${MV} ${WRKSRC}/daemon/libvirtd.conf ${WRKSRC}/daemon/libvirtd.conf.sample @${REINPLACE_CMD} -e 's|libvirtd\.conf|libvirtd.conf.sample|' \ ${WRKSRC}/daemon/Makefile.in + + @${REINPLACE_CMD} -e 's|ln -s ../default.xml|true|' \ + -e 's|$$(DESTDIR)$$(confdir)/qemu/networks|${STAGEDIR}${EXAMPLESDIR}/networks|' \ + ${WRKSRC}/src/Makefile.in @${MV} ${WRKSRC}/src/libvirt.conf ${WRKSRC}/src/libvirt.conf.sample @${REINPLACE_CMD} -e 's|conf_DATA = libvirt.conf|conf_DATA = libvirt.conf.sample|' \ ${WRKSRC}/src/Makefile.in + @${MV} ${WRKSRC}/src/locking/virtlockd.conf ${WRKSRC}/src/locking/virtlockd.conf.sample + @${REINPLACE_CMD} -e 's|virtlockd.conf |virtlockd.conf.sample |' \ + -e 's|virtlockd.conf$$|virtlockd.conf.sample|' \ + ${WRKSRC}/src/Makefile.in + @${MV} ${WRKSRC}/src/qemu/qemu.conf ${WRKSRC}/src/qemu/qemu.conf.sample @${REINPLACE_CMD} -e 's|qemu.conf |qemu.conf.sample |' \ ${WRKSRC}/src/Makefile.in @@ -128,6 +140,8 @@ ${WRKSRC}/src/Makefile.in post-install: + @${RMDIR} ${STAGEDIR}${EXAMPLESDIR}/networks/autostart + @${MKDIR} ${STAGEDIR}${ETCDIR}/qemu/networks/autostart @${MKDIR} ${STAGEDIR}${DOCSDIR} .for doc in AUTHORS ChangeLog INSTALL NEWS README TODO ${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR} Index: head/devel/libvirt/files/pkg-message.in =================================================================== --- head/devel/libvirt/files/pkg-message.in +++ head/devel/libvirt/files/pkg-message.in @@ -0,0 +1,21 @@ + +To enable libvirtd please add libvirtd_enable="YES" to +/etc/rc.conf. + +NOTE ON CONFIGURATION: + +The libvirt port does not come with networking configuration enabled. +The 'default' network definition is available at: + + %%EXAMPLESDIR%%/networks/default.xml + +To enable this network please do the following: + + cp %%EXAMPLESDIR%%/networks/default.xml %%ETCDIR%%/qemu/networks + +To configure this network for autostart, execute the following: + + ln -s ../default.xml %%ETCDIR%%/qemu/networks/autostart/default.xml + +If you have libvirtd already running you'll need to restart it for changes +to take effect. Index: head/devel/libvirt/pkg-message =================================================================== --- head/devel/libvirt/pkg-message +++ head/devel/libvirt/pkg-message @@ -1,3 +0,0 @@ - -To enable libvirtd please add libvirtd_enable="YES" to -/etc/rc.conf. Index: head/devel/libvirt/pkg-plist =================================================================== --- head/devel/libvirt/pkg-plist +++ head/devel/libvirt/pkg-plist @@ -10,11 +10,10 @@ man/man8/virtlockd.8.gz @sample %%ETCDIR%%/libvirt.conf.sample @sample %%ETCDIR%%/libvirtd.conf.sample +@sample %%ETCDIR%%/virtlockd.conf.sample +%%EXAMPLESDIR%%/networks/default.xml %%QEMU%%@sample %%ETCDIR%%/qemu.conf.sample %%XEN%%@sample %%ETCDIR%%/libxl.conf.sample -%%ETCDIR%%/virtlockd.conf -%%ETCDIR%%/qemu/networks/default.xml -%%ETCDIR%%/qemu/networks/autostart/default.xml %%QEMU%%%%ETCDIR%%/qemu-lockd.conf %%XEN%%%%ETCDIR%%/libxl-lockd.conf etc/logrotate.d/libvirtd @@ -300,6 +299,7 @@ %%XEN%%@dir /var/lib/libvirt/libxl %%XEN%%@dir /var/log/libvirt/libxl %%XEN%%@dir /var/run/libvirt/libxl +@dir %%ETCDIR%%/qemu/networks/autostart @dir /var/cache/libvirt @dir /var/lib/libvirt/boot @dir /var/lib/libvirt/dnsmasq