[libvirt] [PATCH] spec: Don't mix commands with macro definitions
Eric Blake
eblake at redhat.com
Tue Jul 30 14:55:53 UTC 2013
On 07/30/2013 08:07 AM, Jiri Denemark wrote:
> %build section should first define all required macros and then run
> commands. Interleaving them makes it harder to spot what commands are
> run.
> ---
> libvirt.spec.in | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
ACK with one observation:
>
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index 6d6203b..0fdba54 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -1333,10 +1333,6 @@ of recent versions of Linux (and other OSes).
> %define init_scripts --with-init_script=redhat
> %endif
>
> -%if 0%{?enable_autotools}
> - autoreconf -if
> -%endif
> -
> %if %{with_selinux}
> %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
> %define with_selinux_mount --with-selinux-mount="/sys/fs/selinux"
> @@ -1345,6 +1341,11 @@ of recent versions of Linux (and other OSes).
> %endif
> %endif
>
Perhaps it deserves a comment here, along the lines of:
# place macros above and build commands below this comment
> +
> +%if 0%{?enable_autotools}
> + autoreconf -if
> +%endif
> +
> %configure %{?_without_xen} \
> %{?_without_qemu} \
> %{?_without_openvz} \
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130730/571678f7/attachment-0001.sig>
More information about the libvir-list
mailing list