mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 12:43:56 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
@@ -0,0 +1,77 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=virt-manager
|
||||
PKG_VERSION:=5.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://releases.pagure.org/virt-manager/
|
||||
PKG_HASH:=skip
|
||||
|
||||
PKG_MAINTAINER:=jjm2473 <jjm2473@gmail.com>
|
||||
PKG_LICENSE:=LGPL-2.1-or-later
|
||||
PKG_LICENSE_FILES:=COPYING COPYING.LESSER
|
||||
PKG_CPE_ID:=cpe:/a:virt-manager:virt-manager
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/meson.mk
|
||||
|
||||
define Package/virt-manager/Default
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libvirt-glib +qemu-img +libvirt-python +libxml2-python
|
||||
TITLE:=GUI for managing virtual machines
|
||||
URL:=https://virt-manager.org/
|
||||
|
||||
endef
|
||||
|
||||
define Package/virt-manager
|
||||
$(call Package/virt-manager/Default)
|
||||
DEPENDS+= +libosinfo +python3-gobject
|
||||
VARIANT:=normal
|
||||
DEFAULT_VARIANT:=1
|
||||
endef
|
||||
|
||||
define Package/virt-manager/description
|
||||
The virt-manager application is a desktop user interface for managing virtual machines through libvirt.
|
||||
endef
|
||||
|
||||
define Package/virt-manager-nogir
|
||||
$(call Package/virt-manager/Default)
|
||||
TITLE+= (without GObject Introspection)
|
||||
VARIANT:=nogir
|
||||
CONFLICTS:=virt-manager
|
||||
endef
|
||||
|
||||
define Package/virt-manager-nogir/description
|
||||
$(call Package/virt-manager/description)
|
||||
This variant is built without GObject Introspection support.
|
||||
endef
|
||||
|
||||
ifeq ($(BUILD_VARIANT),nogir)
|
||||
define Build/Prepare
|
||||
$(Build/Prepare/Default)
|
||||
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)-nogir,nogir/)
|
||||
endef
|
||||
endif
|
||||
|
||||
MESON_ARGS += \
|
||||
-Dupdate-icon-cache=false \
|
||||
-Dcompile-schemas=false \
|
||||
-Dupdate-icon-cache=false
|
||||
|
||||
define Package/virt-manager/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_DIR) $(1)/usr/share/virt-manager
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/virt-manager/virtinst $(1)/usr/share/virt-manager
|
||||
ifeq ($(BUILD_VARIANT),nogir)
|
||||
$(CP) ./files/Libosinfo.py $(1)/usr/share/virt-manager/virtinst/
|
||||
endif
|
||||
endef
|
||||
|
||||
Package/virt-manager-nogir/install=$(Package/virt-manager/install)
|
||||
|
||||
$(eval $(call BuildPackage,virt-manager))
|
||||
$(eval $(call BuildPackage,virt-manager-nogir))
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
OS_PROP_FAMILY = "family"
|
||||
OS_PROP_DISTRO = "distro"
|
||||
OS_PROP_RELEASE_STATUS = "release-status"
|
||||
OS_PROP_KERNEL_URL_ARGUMENT = "kernel-url-argument"
|
||||
OS_PROP_CLOUD_IMAGE_USERNAME = "cloud-image-username"
|
||||
|
||||
OS_PROP_SHORT_ID = 'short-id'
|
||||
OS_PROP_NAME = 'name'
|
||||
|
||||
class Os:
|
||||
def __init__(self):
|
||||
self.short_id = None
|
||||
self.name = None
|
||||
pass
|
||||
def get_short_id(self):
|
||||
return self.short_id
|
||||
def get_id(self):
|
||||
return self.short_id
|
||||
def get_name(self):
|
||||
return self.name
|
||||
def get_family(self):
|
||||
return None
|
||||
def get_codename(self):
|
||||
return None
|
||||
def get_distro(self):
|
||||
return None
|
||||
def get_version(self):
|
||||
return None
|
||||
def get_eol_date(self):
|
||||
return None
|
||||
def get_release_date(self):
|
||||
return None
|
||||
def get_param_value(self, prop):
|
||||
return None
|
||||
def set_param(self, prop, value):
|
||||
if prop == OS_PROP_SHORT_ID:
|
||||
self.short_id = value
|
||||
elif prop == OS_PROP_NAME:
|
||||
self.name = value
|
||||
pass
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
--- a/virtinst/__init__.py
|
||||
+++ b/virtinst/__init__.py
|
||||
@@ -5,8 +5,10 @@
|
||||
|
||||
# pylint: disable=wrong-import-position
|
||||
|
||||
+"""
|
||||
import gi
|
||||
gi.require_version('Libosinfo', '1.0')
|
||||
+"""
|
||||
|
||||
from virtinst.buildconfig import BuildConfig
|
||||
|
||||
--- a/virtinst/install/unattended.py
|
||||
+++ b/virtinst/install/unattended.py
|
||||
@@ -13,7 +13,9 @@ import pwd
|
||||
import re
|
||||
import tempfile
|
||||
|
||||
+"""
|
||||
from gi.repository import Libosinfo
|
||||
+"""
|
||||
|
||||
from . import urlfetcher
|
||||
from .. import progress
|
||||
--- a/virtinst/osdict.py
|
||||
+++ b/virtinst/osdict.py
|
||||
@@ -10,7 +10,10 @@ import datetime
|
||||
import os
|
||||
import re
|
||||
|
||||
+"""
|
||||
from gi.repository import Libosinfo
|
||||
+"""
|
||||
+from . import Libosinfo
|
||||
|
||||
from . import xmlutil
|
||||
from .logger import log
|
||||
@@ -90,7 +93,7 @@ class _OSDB(object):
|
||||
###############
|
||||
|
||||
def lookup_os_by_full_id(self, full_id, raise_error=False):
|
||||
- osobj = self._os_db.get_os(full_id)
|
||||
+ osobj = None #self._os_db.get_os(full_id)
|
||||
if osobj is None:
|
||||
if raise_error:
|
||||
raise ValueError(_("Unknown libosinfo ID '%s'") % full_id)
|
||||
@@ -101,10 +104,10 @@ class _OSDB(object):
|
||||
if key == self._os_generic.name:
|
||||
return self._os_generic
|
||||
|
||||
- flt = Libosinfo.Filter()
|
||||
- flt.add_constraint(Libosinfo.PRODUCT_PROP_SHORT_ID,
|
||||
- key)
|
||||
- oslist = self._os_db.get_os_list().new_filtered(flt).get_elements()
|
||||
+ #flt = Libosinfo.Filter()
|
||||
+ #flt.add_constraint(Libosinfo.PRODUCT_PROP_SHORT_ID,
|
||||
+ # key)
|
||||
+ oslist = [] #self._os_db.get_os_list().new_filtered(flt).get_elements()
|
||||
if len(oslist) == 0:
|
||||
if raise_error:
|
||||
raise ValueError(_("Unknown OS name '%s'. "
|
||||
@@ -113,6 +116,7 @@ class _OSDB(object):
|
||||
return _OsVariant(oslist[0])
|
||||
|
||||
def guess_os_by_iso(self, location):
|
||||
+ return None
|
||||
try:
|
||||
media = _media_create_from_location(location)
|
||||
except Exception as e:
|
||||
@@ -154,8 +158,8 @@ class _OSDB(object):
|
||||
"""
|
||||
List all OSes in the DB, sorting by the passes _OsVariant attribute
|
||||
"""
|
||||
- oslist = [_OsVariant(osent) for osent in
|
||||
- self._os_db.get_os_list().get_elements()]
|
||||
+ oslist = [] # [_OsVariant(osent) for osent in
|
||||
+ # self._os_db.get_os_list().get_elements()]
|
||||
oslist.append(self._os_generic)
|
||||
|
||||
# human/natural sort, but with reverse sorted numbers
|
||||
@@ -0,0 +1,26 @@
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -15,18 +15,18 @@ pkgdir = datadir / 'virt-manager'
|
||||
git = run_command('test', '-e', '.git', check: false).returncode() == 0
|
||||
|
||||
subdir('scripts')
|
||||
-subdir('man')
|
||||
+# subdir('man')
|
||||
subdir('data')
|
||||
-subdir('ui')
|
||||
+# subdir('ui')
|
||||
subdir('virtinst')
|
||||
-subdir('virtManager')
|
||||
-subdir('po')
|
||||
+# subdir('virtManager')
|
||||
+# subdir('po')
|
||||
|
||||
bin_data = [
|
||||
{'pkgname': 'virtinst', 'filename': 'virtinstall', 'toolname': 'virt-install'},
|
||||
{'pkgname': 'virtinst', 'filename': 'virtclone', 'toolname': 'virt-clone'},
|
||||
{'pkgname': 'virtinst', 'filename': 'virtxml', 'toolname': 'virt-xml'},
|
||||
- {'pkgname': 'virtManager', 'filename': 'virtmanager', 'toolname': 'virt-manager'},
|
||||
+# {'pkgname': 'virtManager', 'filename': 'virtmanager', 'toolname': 'virt-manager'},
|
||||
]
|
||||
|
||||
foreach bin : bin_data
|
||||
Reference in new issue
Block a user