Re: [PATCH] build: Fix default network generation on FreeBSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/21/2016 06:05 AM, Andrea Bolognani wrote:
> FreeBSD's sed(1) doesn't support using "\n" to insert a newline,
> so the installed default.xml file ends up containing a literal
> "n" between tags; to work around this problem, add a tr(1)
> invocation as suggested by the sed FAQ[1].
> 
> [1] http://sed.sourceforge.net/sedfaq4.html (4.1 c)
> ---
>  src/Makefile.am | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index c639e37..f020545 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -3072,8 +3072,9 @@ if WITH_NETWORK
>  	$(INSTALL_DATA) $(srcdir)/network/default.xml \
>  	  $(DESTDIR)$(confdir)/qemu/networks/default.xml
>  	test -z "$(UUID)" || \
> -	  { sed -e "s,</name>,</name>\n  <uuid>$(UUID)</uuid>," \
> -	      $(DESTDIR)$(confdir)/qemu/networks/default.xml > \
> +	  { sed -e "s,</name>,</name>;  <uuid>$(UUID)</uuid>," \
> +	      $(DESTDIR)$(confdir)/qemu/networks/default.xml | \
> +	      tr ";" "\n" > \
>  	      $(DESTDIR)$(confdir)/qemu/networks/default.xml.t && \
>  	    cp $(DESTDIR)$(confdir)/qemu/networks/default.xml.t \
>  	      $(DESTDIR)$(confdir)/qemu/networks/default.xml && \
> 

ACK

- Cole

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]