Commit Graph

209 Commits

Author SHA1 Message Date
Pavel Hrdina
5f34dea0ed meson: add tests
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2024-11-12 23:18:32 +01:00
Pavel Hrdina
1f80a62239 meson: rename and modify spec file
We will create the final spec file by meson to have virt-manager version
in single place.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2024-11-12 23:18:32 +01:00
Cole Robinson
62e7f1c521 spec: Move virt-manager.spec.in -> virt-manager.spec
Drop the VERSION templating. Tools today like packit and tito
work best when a working .spec file exists. The extra burden is
we need to update the version at release time, but that's no
big deal

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-07-17 16:00:32 -04:00
Pino Toscano
81ccaae739 spec: drop intltool BuildRequires
It is no more used now.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-11 14:59:56 -04:00
Pino Toscano
a1f0e07cd9 setup: use msgmerge for updating translations
Switch from intltool to msgmerge to merge the translations to the
catalog, as it is much easier.

Remove the writing of the temporary POTFILES.in, as it is no more needed
now.

Also, since now gettext is used at installation time:
- mention the gettext requirement in INSTALL.md
- add the gettext BuildRequires in the RPM spec file

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-11 14:59:56 -04:00
Cole Robinson
371bcb547a spec: Switch to latest Fedora bytecompile macros
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#manual-bytecompilation

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-05-27 15:06:53 -04:00
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