summaryrefslogtreecommitdiff
path: root/virt-manager.spec.in
blob: 3394c5e5059e50fa37a450abe3ff0658b4fd953e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
# -*- rpm-spec -*-

%define _package @PACKAGE@
%define _version @VERSION@
%define _release 1
%define virtinst_version @VIRTINST_VERSION@

%define qemu_user                  ""
%define preferred_distros          ""
%define kvm_packages               ""
%define libvirt_packages           ""
%define askpass_package            ""
%define disable_unsupported_rhel   0

%define with_guestfs               0
%define with_tui                   0

%define with_spice                 0

# End local config
# Default option handling

%if %{with_spice}
%define default_graphics "spice"
%endif


# Compat for use of spec in multiple distros

%if 0%{?gconf_schema_prepare} == 0
%define gconf_schema_prepare() \
if [ "$1" -gt 1 ]; then \
    export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
    gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/%1.schemas > /dev/null || : \
fi \
%{nil}
%endif

%if 0%{?gconf_schema_upgrade} == 0
%define gconf_schema_upgrade() \
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/%1.schemas > /dev/null || : \
%{nil}
%endif

%if 0%{?gconf_schema_remove} == 0
%define gconf_schema_remove() \
if [ "$1" -eq 0 ]; then \
    export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
    gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/%1.schemas > /dev/null || : \
fi \
%{nil}
%endif


# This macro is used for the continuous automated builds. It just
# allows an extra fragment based on the timestamp to be appended
# to the release. This distinguishes automated builds, from formal
# Fedora RPM builds
%define _extra_release %{?dist:%{dist}}%{?extra_release:%{extra_release}}

Name: %{_package}
Version: %{_version}
Release: %{_release}%{_extra_release}
%define verrel %{version}-%{release}

Summary: Virtual Machine Manager
Group: Applications/Emulators
License: GPLv2+
URL: http://virt-manager.org/
Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch

# These two are just the oldest version tested
Requires: pygtk2 >= 1.99.12-6
Requires: gnome-python2-gconf >= 1.99.11-7
# This version not strictly required: virt-manager should work with older,
# however varying amounts of functionality will not be enabled.
Requires: libvirt-python >= 0.7.0
# Definitely does not work with earlier due to python API changes
Requires: dbus-python >= 0.61
Requires: dbus-x11
%if 0%{?rhel} > 6
# Might work with earlier, but this is what we've tested
Requires: gnome-keyring >= 0.4.9
%else
Requires: libgnome-keyring
%endif
# Minimum we've tested with
# Although if you don't have this, comment it out and the app
# will work just fine - keyring functionality will simply be
# disabled
Requires: gnome-python2-gnomekeyring >= 2.15.4
# Minimum we've tested with
Requires: libxml2-python >= 2.6.23
# Absolutely require this version or later
Requires: python-virtinst >= %{virtinst_version}
# Earlier vte had broken python binding module
Requires: vte >= 0.12.2
# For online help
Requires: scrollkeeper
# For console widget
Requires: gtk-vnc-python >= 0.3.8
%if %{with_spice}
Requires: spice-gtk-python
%endif
%if %{with_guestfs}
Requires: python-libguestfs
%endif

%if %{with_tui} == 0
Obsoletes: virt-manager-common <= %{verrel}
Conflicts: virt-manager-common > %{verrel}
%else
Requires: virt-manager-common = %{verrel}
%endif

BuildRequires: gettext
BuildRequires: scrollkeeper
BuildRequires: intltool
BuildRequires: GConf2
BuildRequires: /usr/bin/pod2man

Requires(pre): GConf2
Requires(post): GConf2
Requires(preun): GConf2
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils

%description
Virtual Machine Manager provides a graphical tool for administering virtual
machines for KVM, Xen, and QEmu. Start, stop, add or remove virtual devices,
connect to a graphical or serial console, and see resource usage statistics
for existing VMs on local or remote machines. Uses libvirt as the backend
management API.

# TUI package setup
%if %{with_tui}
%package tui
Summary: Virtual Machine Manager text user interface
Group: Applications/Emulators

Requires: virt-manager-common = %{verrel}
Requires: python-newt_syrup >= 0.1.2
Requires: libuser-python
Requires: python-IPy

%description tui
An interactive text user interface for Virtual Machine Manager.

%package common
Summary: Common files used by the different Virtual Machine Manager interfaces
Group: Applications/Emulators

# This version not strictly required: virt-manager should work with older,
# however varying amounts of functionality will not be enabled.
Requires: libvirt-python >= 0.7.0
Requires: dbus-python
# Minimum we've tested with
Requires: libxml2-python >= 2.6.23
# Absolutely require this version or later
Requires: python-virtinst >= %{virtinst_version}

%description common
Common files used by the different Virtual Machine Manager interfaces.
%endif

%prep
%setup -q

%build
%if %{qemu_user}
%define _qemu_user --with-qemu_user=%{qemu_user}
%endif

%if %{kvm_packages}
%define _kvm_packages --with-kvm-packages=%{kvm_packages}
%endif

%if %{preferred_distros}
%define _preferred_distros --with-preferred-distros=%{preferred_distros}
%endif

%if %{libvirt_packages}
%define _libvirt_packages --with-libvirt-package-names=%{libvirt_packages}
%endif

%if %{askpass_package}
%define _askpass_package --with-askpass-package=%{askpass_package}
%endif

%if %{disable_unsupported_rhel}
%define _disable_unsupported_rhel --disable-unsupported-rhel-options
%endif

%if 0%{?default_graphics:1}
%define _default_graphics --with-default-graphics=%{default_graphics}
%endif

%if %{with_tui}
%define _tui_opt --with-tui
%else
%define _tui_opt --without-tui
%endif

%configure  %{?_tui_opt} \
            %{?_qemu_user} \
            %{?_kvm_packages} \
            %{?_libvirt_packages} \
            %{?_askpass_package} \
            %{?_preferred_distros} \
            %{?_disable_unsupported_rhel} \
            %{?_default_graphics}
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install  DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%pre
%gconf_schema_prepare %{name}

%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
update-desktop-database -q %{_datadir}/applications
%gconf_schema_upgrade %{name}

%postun
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
update-desktop-database -q %{_datadir}/applications

%preun
%gconf_schema_remove %{name}

%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%if %{with_tui}
%files
%else
%files -f %{name}.lang
%endif
%defattr(-,root,root,-)
%doc README COPYING COPYING-DOCS AUTHORS ChangeLog NEWS
%{_sysconfdir}/gconf/schemas/%{name}.schemas
%{_bindir}/%{name}
%{_libexecdir}/%{name}-launch

%{_mandir}/man1/%{name}.1*

%if %{with_tui} == 0
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/virtManager/
%{_datadir}/%{name}/virtManager/*.py*
%endif

%{_datadir}/%{name}/*.ui
%{_datadir}/%{name}/%{name}.py*

%{_datadir}/%{name}/icons
%{_datadir}/icons/hicolor/*/apps/*

%{_datadir}/applications/%{name}.desktop
%{_datadir}/dbus-1/services/%{name}.service

%if %{with_tui}
%files common -f %{name}.lang
%defattr(-,root,root,-)
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/virtManager/

%{_datadir}/%{name}/virtManager/*.py*

%files tui
%defattr(-,root,root,-)

%{_bindir}/%{name}-tui
%{_datadir}/%{name}/%{name}-tui.py*

%{_datadir}/%{name}/virtManagerTui
%endif

%changelog
* Sun Jul 29 2012 Cole Robinson <crobinso@redhat.com> - 0.9.4-1
- virt-manager release 0.9.4
- Fix VNC keygrab issues

* Mon Jul 09 2012 Cole Robinson <crobinso@redhat.com> - 0.9.3-1
- virt-manager release 0.9.3
- Fix broken release tar.gz of version 0.9.2

* Mon Jul 09 2012 Cole Robinson <crobinso@redhat.com> - 0.9.2-1
- virt-manager release 0.9.2
- Convert to gtkbuilder: UI can now be editted with modern glade tool
- virt-manager no longer runs on RHEL5, but can manage a remote RHEL5
  host
- Option to configure spapr net and disk devices for pseries (Li Zhang)
- Many bug fixes and improvements

* Tue Jan 31 2012 Cole Robinson <crobinso@redhat.com> - 0.9.1-1
- Support for adding usb redirection devices (Marc-André Lureau)
- Option to switch usb controller to support usb2.0 (Marc-André Lureau)
- Option to specify machine type for non-x86 guests (Li Zhang)
- Support for filesystem device type and write policy (Deepak C Shetty)
- Many bug fixes!

* Tue Jul 26 2011 Cole Robinson <crobinso@redhat.com> - 0.9.0-1
- Use a hiding toolbar for fullscreen mode
- Use libguestfs to show guest packagelist and more (Richard W.M. Jones)
- Basic 'New VM' wizard support for LXC guests
- Remote serial console access (with latest libvirt)
- Remote URL guest installs (with latest libvirt)
- Add Hardware: Support <filesystem> devices
- Add Hardware: Support <smartcard> devices (Marc-André Lureau)
- Enable direct interface selection for qemu/kvm (Gerhard Stenzel)
- Allow viewing and changing disk serial number

* Thu Mar 24 2011 Cole Robinson <crobinso@redhat.com> - 0.8.7-1
- Allow renaming an offline VM
- Spice password support (Marc-André Lureau)
- Allow editting NIC <virtualport> settings (Gerhard Stenzel)
- Allow enabling/disabling individual CPU features
- Allow easily changing graphics type between VNC and SPICE for existing
  VM
- Allow easily changing network source device for existing VM

* Fri Jan 14 2011 Cole Robinson <crobinso@redhat.com> - 0.8.6-1
- SPICE support (requires spice-gtk) (Marc-André Lureau)
- Option to configure CPU model
- Option to configure CPU topology
- Save and migration cancellation (Wen Congyang)
- Save and migration progress reporting
- Option to enable bios boot menu
- Option to configure direct kernel/initrd boot

* Tue Aug 24 2010 Cole Robinson <crobinso@redhat.com> - 0.8.5-1
- Improved save/restore support
- Option to view and change disk cache mode
- Configurable VNC keygrab sequence (Michal Novotny)

* Wed Mar 24 2010 Cole Robinson <crobinso@redhat.com> - 0.8.4-1
- 'Import' install option, to create a VM around an existing OS image
- Support multiple boot devices and boot order
- Watchdog device support
- Enable setting a human readable VM description.
- Option to manually specifying a bridge name, if bridge isn't detected

* Mon Feb  8 2010 Cole Robinson <crobinso@redhat.com> - 0.8.3-1
- Manage network interfaces: start, stop, view, provision bridges, bonds, etc.
- Option to 'customize VM before install'.

* Mon Dec 14 2009 Cole Robinson <crobinso@redhat.com> - 0.8.2-1
- Fix right click in the manager window to operate on the clicked row
- Running on a new machine / user account no longer produces a traceback.
- Allow ejecting and connecting floppy media

* Thu Dec  3 2009 Cole Robinson <crobinso@redhat.com> - 0.8.1-1
- VM Migration wizard, exposing various migration options
- Enumerate CDROM and bridge devices on remote connections
- Support storage pool source enumeration for LVM, NFS, and SCSI

* Tue Jul 28 2009 Cole Robinson <crobinso@redhat.com> - 0.8.0-1
- New 'Clone VM' Wizard
- Improved UI, including an overhaul of the main 'manager' view
- System tray icon for easy VM access (start, stop, view console/details)
- Wizard for adding serial, parallel, and video devices to existing VMs.

* Mon Mar  9 2009 Cole Robinson <crobinso@redhat.com> - 0.7.0-1
- Redesigned 'New Virtual Machine' wizard (Jeremy Perry, Cole Robinson)
- Option to remove storage when deleting a virtual machine.
- File browser for libvirt storage pools and volumes
- Physical device assignment (PCI, USB) for existing virtual machines.

* Mon Jan 26 2009 Cole Robinson <crobinso@redhat.com> - 0.6.1-1
- VM disk and network stats reporting (Guido Gunther)
- VM Migration support (Shigeki Sakamoto)
- Support for adding sound devices to an existing VM
- Enumerate host devices attached to an existing VM

* Wed Sep 10 2008 Cole Robinson <crobinso@redhat.com> - 0.6.0-1
- Add libvirt storage management support
- Basic support for remote guest installation
- Merge VM console and details windows
- Poll avahi for libvirtd advertisement
- Hypervisor autoconnect option
- Add sound emulation when creating new guests

* Mon Mar 10 2008 Daniel P Berrange <berrange@redhat.com> - 0.5.4-1
- Use capabilities XML when creating guests
- Allow scaling of VNC window

* Thu Jan 10 2008 Daniel P Berrange <berrange@redhat.com> - 0.5.3-1
- Reintroduce 'new' button
- Make restore work again
- Add menu for sending special keys
- Fix license headers on all source
- Lots of misc bug fixes

* Thu Oct  4 2007 Daniel P. Berrange <berrange@redhat.com> - 0.5.2-1
- No scrollbars for high res guest in low res host (rhbz 273181)
- Unable to remove network device (rhbz 242900)
- Fixed broken menu items (rhbz 307551)
- Allow adding of graphics console (rhbz 215524)

* Tue Sep 25 2007 Daniel P. Berrange <berrange@redhat.com> - 0.5.1-1
- Open connections in background
- Make VNC connection retries more robust
- Allow changing of CDROM media on the fly
- Add PXE boot installation of HVM guests
- Allow tunnelling VNC over SSH

* Wed Aug 29 2007 Daniel P. Berrange <berrange@redhat.com> - 0.5.0-1
- Support for managing remote hosts
- Switch to use GTK-VNC for the guest console

* Mon Apr 16 2007 Daniel P. Berrange <berrange@redhat.com> - 0.4.0-1
- Support for managing virtual networks
- Ability to attach guest to virtual networks
- Automatically set VNC keymap based on local keymap
- Support for disk & network device addition/removal

* Tue Mar 20 2007 Daniel P. Berrange <berrange@redhat.com> - 0.3.2-1
- Added online help to all windows
- Bug fixes to virtual console popup, key grab & accelerator override

* Tue Feb 20 2007 Daniel P. Berrange <berrange@redhat.com> - 0.3.1-1
- Added support for managing QEMU domains
- Automatically grab mouse pointer to workaround dual-cursor crazyness

* Mon Jan 22 2007 Daniel P. Berrange <berrange@redhat.com> - 0.3.0-1
- Added support for managing inactive domains
- Require virt-inst >= 0.100.0 and libvirt >= 0.1.11 for ianctive
  domain management capabilities
- Add progress bars during VM creation stage
- Improved reliability of VNC console
- Updated translations again
- Added destroy option to menu bar to forceably kill a guest
- Visually differentiate allocated memory, from actual used memory on host
- Validate file magic when restoring a guest from a savd file
- Performance work on domain listing
- Allow creation of non-sparse files
- Fix backspace key in serial console

* Thu Nov  9 2006 Daniel P. Berrange <berrange@redhat.com> - 0.2.6-1
- Imported translations from Fedora i18n repository
- Make (most) scrollbar policies automatic
- Set busy cursor while creating new VMs
- Preference for controlling keygrab policy
- Preference for when to automatically open console (bz 211385)
- Re-try VNC connection attempt periodically in case VNC daemon
  hasn't finished starting up
- Added activation of URLs for about dialog (bz 210782)
- Improved error reporting when connecting to HV (bz 211229)
- Add command line args to open specific windows
- Don't skip para/full virt wizard step - instead gray out full
  virt option & tell user why
- Change 'physical' to 'logical' when refering to host CPUs
- Include hostname in titlebar
- Disable wizard sensitivity while creating VM

* Thu Oct 19 2006 Daniel P. Berrange <berrange@redhat.com> - 0.2.5-1
- Switch to use python-virtinst instead of python-xeninst due to
  renaming of original package
- Disable keyboard accelerators when grabbing mouse to avoid things like
  Ctrl-W closing the local window, instead of remote window bz 210364
- Fix host memory reporting bz 211281
- Remove duplicate application menu entry bz 211230

* Thu Oct 12 2006 Daniel Berrange <berrange@redhat.com> - 0.2.4-1
- Fix duplicated mnemonics (bz 208408)
- Use blktap backed disks if available
- Use a drop down list to remember past URLs (bz 209479)
- Remove unused help button from preferences dialog (bz 209251)
- Fix exception when no VNC graphics is defined
- Force immediate refresh of VMs after creating a new one
- Improve error reporting if run on a kernel without Xen (bz 209122)
- Clamp CPU utilization between 0 & 100 pcent (bz 208185)
- Fix array underflow SEGV when no data points available (bz 208185)
- More fixes to avoid stuck modifier keys on focus-out (bz 207949)

* Tue Sep 26 2006 Daniel Berrange <berrange@redhat.com> - 0.2.3-1
- Require xeninst >= 0.93.0 to fix block backed devices
- Skip para/fully-virt step when going back in wizard if not HVM host (bz 207409)
- Fix handling of modifier keys in VNC console so Alt key doesn't get stuck (bz 207949)
- Allow sticky modifier keys by pressing same key 3 times in row (enables Ctrl-Alt-F1
  by doing Ctrl Ctrl Ctrl  Alt-F1)
- Improved error handling during guest creation
- Log errors with python logging, instead of to stdout
- Remove unused buttons from main domain list window
- Switch out of full screen & release key grab when closing console
- Trim sparkline CPU history graph to 40 samples max
- Constraint VCPU adjuster to only allow upto guest's max VCPU count
- Show guest's max & current VCPU count in details page
- Fix rounding of disk sizes to avoid a 1.9 GB disk being rounded down to 1 GB
- Use raw block device path to CDROM not mount point for HVM guest (bz 206965)
- Fix visibility of file size spin box (bz 206186 part 2)
- Check for GTK failing to open X11 display (bz 205938)

* Fri Sep 15 2006 Daniel Berrange <berrange@redhat.com> - 0.2.2-1
- Fix event handling in create VM wizard (bz 206660 & 206186)
- Fix close button in about dialog (bz 205943)
- Refresh .pot files
- Turn on VNC scrollbars fulltime to avoid GTK window sizing issue
  which consistently resize too small.

* Mon Sep 11 2006 Daniel Berrange <berrange@redhat.com> - 0.2.1-3
- Added requires on pygtk2-libglade & librsvg2 (bz 205941 & 205942)
- Re-arrange to use console-helper to launch app
- Added 'dist' component to release number

* Wed Sep  6 2006 Jeremy Katz <katzj@redhat.com> - 0.2.1-2
- don't ghost pyo files (#205448)

* Mon Sep  4 2006 Daniel Berrange <berrange@redhat.com> - 0.2.1-1
- Updated to 0.2.1 tar.gz
- Added rules to install/uninstall gconf schemas in preun,post,pre
  scriptlets

* Thu Aug 24 2006 Jeremy Katz <katzj@redhat.com> - 0.2.0-3
- BR gettext

* Thu Aug 24 2006 Jeremy Katz <katzj@redhat.com> - 0.2.0-2
- only build on arches with virt

* Tue Aug 22 2006 Daniel Berrange <berrange@redhat.com> - 0.2.0-1
- Added wizard for creating virtual machines
- Added embedded serial console
- Added ability to take screenshots

* Mon Jul 24 2006 Daniel Berrange <berrange@redhat.com> - 0.1.5-2
- Prefix *.pyo files with 'ghost' macro
- Use fully qualified URL in Source  tag

* Thu Jul 20 2006 Daniel Berrange <berrange@redhat.com> - 0.1.5-1
- Update to new 0.1.5 release snapshot

* Thu Jul 20 2006 Daniel Berrange <berrange@redhat.com> - 0.1.4-1
- Update to new 0.1.4 release snapshot

* Mon Jul 17 2006 Daniel Berrange <berrange@redhat.com> - 0.1.3-1
- Fix License tag
- Updated for new release

* Wed Jun 28 2006 Daniel Berrange <berrange@redhat.com> - 0.1.2-3
- Added missing copyright headers on all .py files

* Wed Jun 28 2006 Daniel Berrange <berrange@redhat.com> - 0.1.2-2
- Added python-devel to BuildRequires

* Wed Jun 28 2006 Daniel Berrange <berrange@redhat.com> - 0.1.2-1
- Change URL to public location

* Fri Jun 16 2006 Daniel Berrange <berrange@redhat.com> - 0.1.0-1
- Added initial support for using VNC console

* Thu Apr 20 2006 Daniel Berrange <berrange@redhat.com> - 0.0.2-1
- Added DBus remote control service

* Wed Mar 29 2006 Daniel Berrange <berrange@redhat.com> - 0.0.1-1
- Initial RPM build