Commit Graph

203 Commits

Author SHA1 Message Date
Cole Robinson 8fe0a208db Move virt-* code into their modules
This layout is closer to what most python modules have nowadays.
It also simplifies testing and static analysis setup.

Keep virt-* wrappers locally, for ease of running these commands
from a git checkout.

Adjust the wrapper binaries we install on via packaging to be
pure python, which makes things like running gdb easier.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 18:27:20 -05:00
Cole Robinson ee9f93074b Remove virt-convert
This was raised here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

Quoting from that:

"""
virt-convert takes an ovf/ova or vmx file and spits
out libvirt XML. It started as a code drop a long time ago that could
translate back and forth between vmx, ovf, and virt-image, a long dead
appliance format. In 2014 I converted it to do vmx -> libvirt and ovf ->
libvirt which was a CLI breaking change, but I never heard a peep of a
complaint. It doesn't seem to do a particularly thorough job at its
intended goal, I've seen 2-3 bug reports in the past 5 years and
generally it doesn't seem to have any users. Let's kill it. If anyone
has the desire to keep it alive it could live as a separate project
that's a wrapper around virt-install but there's no compelling reason to
keep it in virt-manager.git IMO
"""

Nothing has changed since then, so here is the removal.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 17:04:29 -05:00
Pino Toscano 9b7c819c64 Install the AppStream file to the canonical location
The canonical location for AppStream XML files has been changed to
/usr/share/metainfo four years ago at least, with /usr/share/appdata
left as legacy location. It is time to switch to the right location.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-01-14 12:40:44 -05:00
Cole Robinson 876c0c014d INSTALL.md: Document dep on gtksourceview
https://bugzilla.redhat.com/show_bug.cgi?id=1721341
2019-06-18 09:55:01 -04:00
Cole Robinson c92693a276 setup: Remove dep on importing virtinst
Import BuildConfig directly from the source file using import hackery.
buildconfig.py is independent of virtinst code so it already does
the right thing. Add some checking to make sure this doesn't regress
in the future.

Drop the now unneeded RPM deps.
2019-06-17 13:18:50 -04:00
Pavel Hrdina d097e66324 spec: add build dependencies that are now required for build
Recent changes refactored a code in a whey that running setup.py
requires more python modules and we need to reflect that in our
spec file in order to build RPMs.

We should not need all of these as they are not used but that will
require a lot of code changes.  We should eventually fix it.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-06-17 12:08:34 +02:00
Cole Robinson 9ed926a898 spec: Add --with=virtconvert
We may consider removing virt-convert in the future, and we
don't want to ship it on RHEL. So app some spec machinery to
exclude it from the RPM
2019-06-16 15:00:39 -04:00
Cole Robinson ab7b3c189f Move virtcli/cliconfig.py to virtinst/buildconfig.py
There's really no reason for the split, just contain it all
within virtinst for simplicity
2019-06-14 17:12:19 -04:00
Fabiano Fidêncio fd5bd5d90f installer: Prefer "cdrom" over "floppy"
Instead of using "floppy" as the way to perform unattended installations
for Windoes, let's prefer using "cdrom" instead.

The main reasons behind this change are:
- VMs using q35 may have floppy device disabled in some systems;
- We can drop mstools dependency;

Generating the ISO depends on genisofs, tho. However, it's not a big
deal as genisofs is already a virt-manager dependency.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-06-07 13:41:57 -04:00
Pino Toscano a9277d22b5 spec: suggest python3-libguestfs
virt-manager can optionally use libguestfs for inspecting the guests, so
at least add it as suggestion.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-04-17 19:11:12 -04:00
Fabiano Fidêncio e7a1e1ca5b Add perform_floppy_injections()
Similar to perform_initrd_injections(), which is used by Linux(es)
unattended installations, perform_floppy_injections() is going to be
used by Windows(es) unattended installations.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-04-01 16:28:52 -04:00
Cole Robinson d5c4a808c9 spec: Remove outdated Group: tag 2019-02-03 16:34:52 -05:00
Cole Robinson 705107bbb0 spec: install bashcompletion files 2018-12-18 14:23:01 -05:00
Miro Hrončok 5f5b49f289 https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 2018-11-15 13:28:45 -05:00
Cole Robinson 88cacb0295 setup: Remove configure --openssh-askpass
For one, we don't offer to install it anymore because we dropped
packagekit stuff. But even having a single package here isn't
really the whole story because different desktops have their
own askpass providers, like Fedora has openssh-askpass for GNOME,
but ksshaskpass for KDE

So drop it all, make the error more generic, and point people
to setting up SSH keys too
2018-10-08 13:59:13 -04:00
Cole Robinson f3889927e1 spec: Add weak dependencies on libvirt-daemon-* packages
Prefer kvm if available, otherwise pull in libvirt-daemon-qemu
Pull in the default network config too
2018-10-08 08:44:21 -04:00
Cole Robinson f1d169ad7b setup: Remove configure --{libvirt,kvm}-package-names
This was really only useful with packagekit integration, which
is now gone
2018-10-07 14:27:20 -04:00
Cole Robinson 7eaf036acf virtinst: Remove stable_defaults concept
This switch says: if we detect a rhel host, use special version
checks that match rhel backports. This pattern sucks. The way
forward is to have libvirt advertise the bits that are supported,
through domcapabilities. Then virt-manager/virtinst can react
as appropriate.
2018-10-06 19:45:51 -04:00
Cole Robinson c9f0641700 cliconfig: Remove --preferred-distros
It's less relevant with our new search based OS list
2018-10-06 12:33:15 -04:00
Cole Robinson e6738d9827 cliconfig: Remove --default-qemu-user
Libvirt has given us this info in capabilities for a long time,
this shouldn't matter anymore
2018-10-06 12:30:59 -04:00
Daniel P. Berrangé b1460ba065 Chagne most URIs to use https:// instead of http://
All URLs were checked to see if they supported https://, those which did
were converted.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-30 13:35:39 -04:00
Cole Robinson 118d21e076 spec: Move regular deps before big comment strings 2018-04-03 15:25:25 -04:00
Cole Robinson 37eb7e9f3f spec: Fix build on fedora 28 2018-04-03 15:25:17 -04:00
Cole Robinson d692b6d51e spec: Document the explicit dconf dep 2018-03-21 17:10:30 -04:00
Cole Robinson 60888fb7f5 spec: Drop dbus-x11 dep
This came from: https://bugzilla.redhat.com/show_bug.cgi?id=1039803

Seems dconf and gconf before it would use dbus-libs which would
in turn try to use dbus-launch from dbus-x11. They didn't have
a dep on dbus-x11 for *reasons*

Nowadays dconf and virt-manager both use gdbus which is a native
dbus implementation and does not use dbus-launch or have any hard
dependency on x11 AFAICT, so this dep is not required.
2018-03-21 17:02:06 -04:00
Cole Robinson 8bca2526ab spec: Drop gnome-icon-theme dep
We don't build for rhel7 anymore, and modern gnome stack has
proper deps on adwaita-icon-theme nowadays
2018-03-21 16:49:00 -04:00
Cole Robinson 465b04ea18 Remove gconf->gsettings conversion script
It was first released with v1.2.0 in May 2015. I think that's long
enough for people to have run the app and had their settings
converted.
2018-03-16 14:41:53 -04:00
Cole Robinson 48037fcf6f spec: Remove obsolete icon/desktop cache commands
Handled in Fedora for a while now
2018-02-06 19:02:53 -05:00
Cole Robinson 03971cef11 spec: Update for python3
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2018-02-06 19:02:53 -05:00
Radostin Stoyanov 5553cbeb38 Replace ipaddr module with ipaddress
The `ipaddress` is available in Python 3.3+ [1] and backport for
Python 2 is available on PyPI [2].

The main differences between ipaddr and ipaddress are:

- ipaddress *Network classes are equivalent to the ipaddr *Network
  class counterparts with the strict flag set to True.
- ipaddress *Interface classes are equivalent to the ipaddr *Network
  class counterparts with the strict flag set to False.
- The factory functions in ipaddress were renamed to disambiguate them
  from classes.
- A few attributes were renamed to disambiguate their purpose as well.
  (eg. network -> network_address, numhosts -> num_addresses)
- A number of methods and functions which returned containers in ipaddr
  now return iterators. This includes subnets, address_exclude,
  summarize_address_range and collapse_address_list.

Another major difference is that in Python 2 the `ipaddress` module
must use unicode. [3]

[1] https://www.python.org/dev/peps/pep-3144/
[2] https://pypi.python.org/pypi/ipaddress
[3] https://github.com/phihag/ipaddress
2018-02-06 18:49:17 -05:00
Cole Robinson fe04438832 spec: Add dep on genisoimage, for isoinfo 2018-01-06 14:18:19 -05:00
Cole Robinson 405b5ea804 spec: Remove duplicate libxml2 dep 2017-03-06 22:15:46 -05:00
Mario Trangoni 83a40a932f NEWS: convert to Markdown format. 2017-02-16 19:02:22 -05:00
Cole Robinson 9bfd9f66c8 spec: README->README.md
And fix the MANIFEST as well
2017-02-05 15:47:36 -05:00
Cole Robinson 4a365046d6 spec: Add virt-install libvirt-client dep (bz 1416752)
Since we unconditionally attempt to call 'virsh console' for certain
configs.

https://bugzilla.redhat.com/show_bug.cgi?id=1416752
2017-02-05 15:44:33 -05:00
Cole Robinson b7d4267cd2 spec: Add dep on python2-devel
This is needed to pull in the __python2 RPM macro
2016-06-18 16:58:21 -04:00
Cole Robinson 47dd38eb3e Use #!/usr/bin/env for python scripts
This is recommended for upstream, but not for downstream, like Fedora.
So change /usr/bin/env to /usr/bin/python2 at RPM install time to
match the ideal Fedora config.

https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython
https://bugzilla.redhat.com/show_bug.cgi?id=1303282
2016-06-17 12:56:14 -04:00
Cole Robinson 2204de62d9 spec: Move BuildArch before Source
My patch scripts like it better that way
2016-05-20 17:15:36 -04:00
Cole Robinson 35e3bf1715 spec: Replace %define with %global 2015-12-29 12:00:40 -05:00
Cole Robinson 437d25f356 spec: Depend on latest vte package vte291
The vte291 package is actually the latest vte with API version 2.91, while
the vte3 package is effectively a compat package with API version 2.90.
virt-manager works fine with either, so pull the latest bits so there's
no ambiguity.
2015-12-24 12:29:46 -05:00
Cole Robinson fe722b99cb setup: Make gsettings always work regardless of install dir (bz #1267377)
Most of this is lifted from 'meld'. The bits are

- compile gsettings schemas at setup.py install time
- add options to disable that, and use them in the RPM
- always pass GSETTINGS_SCHEMA_DIR so gsettings loading always works
  regardless of the install dir

https://bugzilla.redhat.com/show_bug.cgi?id=1267377
2015-11-02 21:02:42 -05:00
Cole Robinson d5d6cfff2c Copy urlgrabber progress bar code into virt-manager.git
This is so we can drop the dep on system python-urlgrabber, which will
block us from going to python3.

All we need is like 300 lines from python-urlgrabber for the progress
bar. In reality our needs are much lower, we don't need the fancy
progress bar that urlgrabber provides, but it's nice to have. So if
keeping a copy of this code causes issues in the future, we can probably
come up with something simpler (or hopefully there's a more common
python progressbar impl that we can use at that point).
2015-09-18 20:55:44 -04:00
Cole Robinson 5584863d18 urlfetcher: Switch to requests and urllib2 instead of urlgrabber
urlgrabber is largely dead upstream and isn't going to be ported to
python3 AFAIK. So we will need to move off of it eventually.

Use requests for http handling which is the most common library nowadays,
and just plain old urllib2 for ftp fetching.
2015-09-18 19:50:35 -04:00
Cole Robinson a722e3d5e3 Update documentation to point to github, other minor tweaks 2015-09-03 12:44:02 -04:00
Cole Robinson 59b30c81a0 spec: Add LXC to default connection list (bz 1235972) 2015-08-09 18:15:37 -04:00
Pavel Hrdina cbd7e33a09 spec: we don't need to depend on qemu-kvm
Similarly as in commit 95cda553, just remove the dependency on qemu-kvm
package for RHEL builds.  We don't need it, becase libvirt-daemon-kvm
will handle this dependency correctly for us even in case that only
qemu-kvm-rhev is present.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1046651

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-06-21 15:06:10 -04:00
Cole Robinson 95cda55376 spec: Don't use hardcode lookup of qemu-system-x86
libvirt-daemon-kvm pulls in the correct emulator dep per architecture
2015-05-02 18:25:41 -04:00
Cole Robinson 7c3f9dfcc2 spec: Don't install GConf conversion script
We have shipped several releases of RPMs that use gsettings. People
have already rebuilt their settings by hand. Installing the conversion
script could overwrite their latest bits with old gconf bits (this
happened to me).
2015-04-11 11:14:04 -04:00
Cole Robinson ef5552d0aa configure: Add --default-hvs, kill --with-bhyve
Takes a comma separated list of HVs, and only shows those as options in
the 'Open Connection' wizard. This option can be used to hide the bhyve
option as well, so drop --with-bhyve
2015-04-06 16:29:28 -04:00
Cole Robinson 1e2f605e81 virtcli: Drop custom version handling
No one uses it, and it can be handled easy enough with a wrapper script or
similar.
Message-Id: <1b33f161591b86407f78fb307aa4f89f6eee9e4e.1428346382.git.crobinso@redhat.com>
2015-04-06 15:54:35 -04:00