From owner-svn-ports-head@freebsd.org Sun Nov 1 15:11:08 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E041FA23C14; Sun, 1 Nov 2015 15:11:08 +0000 (UTC) (envelope-from novel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AA561AE4; Sun, 1 Nov 2015 15:11:08 +0000 (UTC) (envelope-from novel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA1FB7iF022280; Sun, 1 Nov 2015 15:11:07 GMT (envelope-from novel@FreeBSD.org) Received: (from novel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA1FB7Lc022277; Sun, 1 Nov 2015 15:11:07 GMT (envelope-from novel@FreeBSD.org) Message-Id: <201511011511.tA1FB7Lc022277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: novel set sender to novel@FreeBSD.org using -f From: Roman Bogorodskiy Date: Sun, 1 Nov 2015 15:11:07 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r400619 - in head/devel/libvirt: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 15:11:09 -0000 Author: novel Date: Sun Nov 1 15:11:07 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 Added: head/devel/libvirt/files/pkg-message.in - copied, changed from r400618, head/devel/libvirt/pkg-message Deleted: head/devel/libvirt/pkg-message Modified: head/devel/libvirt/Makefile head/devel/libvirt/pkg-plist Modified: head/devel/libvirt/Makefile ============================================================================== --- head/devel/libvirt/Makefile Sun Nov 1 15:06:18 2015 (r400618) +++ head/devel/libvirt/Makefile Sun Nov 1 15:11:07 2015 (r400619) @@ -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 @@ PLIST_SUB= PORTVERSION="-${PORTVERSION}" SHLIB_VER=${SHLIB_VER} PORTDOCS= * +SUB_FILES= pkg-message + .include .if (exists(/usr/sbin/bhyve) && ${OSVERSION} >= 100051) @@ -107,11 +110,20 @@ post-patch: @${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 @@ post-patch: ${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} Copied and modified: head/devel/libvirt/files/pkg-message.in (from r400618, head/devel/libvirt/pkg-message) ============================================================================== --- head/devel/libvirt/pkg-message Sun Nov 1 15:06:18 2015 (r400618, copy source) +++ head/devel/libvirt/files/pkg-message.in Sun Nov 1 15:11:07 2015 (r400619) @@ -1,3 +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. Modified: head/devel/libvirt/pkg-plist ============================================================================== --- head/devel/libvirt/pkg-plist Sun Nov 1 15:06:18 2015 (r400618) +++ head/devel/libvirt/pkg-plist Sun Nov 1 15:11:07 2015 (r400619) @@ -10,11 +10,10 @@ man/man8/libvirtd.8.gz 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 @@ lib/libvirt/connection-driver/libvirt_dr %%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