mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 16:44:23 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
0d155c70be
commit
32600acc60
14258 files changed
+3954570
No files matched your search
@@ -0,0 +1,65 @@
|
||||
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libosinfo
|
||||
PKG_VERSION:=1.12.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://gitlab.com/libosinfo/libosinfo/-/archive/v$(PKG_VERSION)/
|
||||
PKG_HASH:=skip
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=jjm2473 <jjm2473@gmail.com>
|
||||
PKG_LICENSE:=LGPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_CPE_ID:=cpe:/a:libosinfo:libosinfo
|
||||
|
||||
PKG_BUILD_DEPENDS:=glib2 libsoup3 libxml2 libxslt
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/meson.mk
|
||||
|
||||
define Package/libosinfo
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=library for managing OS information for virtualization
|
||||
DEPENDS:=+glib2 +libsoup3 +libxml2 +libxslt +pciids +usbids +osinfo-db
|
||||
URL:=https://libosinfo.org/
|
||||
endef
|
||||
|
||||
define Package/libosinfo/description
|
||||
The libosinfo project comprises three parts:
|
||||
|
||||
1. A database of metadata about operating systems, hypervisors, virtual hardware and more
|
||||
2. A GObject based library API for querying information from the database
|
||||
3. Command line tools for querying & extracting information from the database
|
||||
endef
|
||||
|
||||
define Package/libosinfo/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
|
||||
# $(CP) $(PKG_INSTALL_DIR)/usr/lib/girepository-1.0 $(1)/usr/lib/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
|
||||
$(SED) 's,=/usr,=$(STAGING_DIR)/usr,g' $(1)/usr/lib/pkgconfig/*.pc
|
||||
endef
|
||||
|
||||
MESON_ARGS += \
|
||||
-Db_lto=true \
|
||||
-Denable-gtk-doc=false \
|
||||
-Denable-introspection=disabled \
|
||||
-Denable-tests=false \
|
||||
-Denable-vala=disabled \
|
||||
-Dwith-pci-ids-path=/usr/share/hwdata/pci.ids \
|
||||
-Dwith-usb-ids-path=/usr/share/hwdata/usb.ids
|
||||
|
||||
$(eval $(call BuildPackage,libosinfo))
|
||||
@@ -0,0 +1,78 @@
|
||||
https://bugs.gentoo.org/955816
|
||||
https://gitlab.com/libosinfo/libosinfo/-/issues/58
|
||||
https://gitlab.com/libosinfo/libosinfo/-/merge_requests/162
|
||||
|
||||
From 0adf38535637ec668e658d43f04f60f11f51574f Mon Sep 17 00:00:00 2001
|
||||
From: Roman Bogorodskiy <bogorodskiy@gmail.com>
|
||||
Date: Thu, 10 Apr 2025 13:54:02 +0200
|
||||
Subject: [PATCH] loader: don't use libxml2 deprecated APIs
|
||||
|
||||
Address the following items:
|
||||
|
||||
- Deprecated direct access to buf's content
|
||||
- Mismatching error function signature
|
||||
- Deprecated direct access to ctxt's lastError
|
||||
|
||||
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
|
||||
--- a/osinfo/osinfo_loader.c
|
||||
+++ b/osinfo/osinfo_loader.c
|
||||
@@ -354,7 +354,7 @@ osinfo_loader_doc(const char *xpath,
|
||||
xmlXPathFreeObject(obj);
|
||||
OSINFO_LOADER_SET_ERROR(err, "Cannot format stylesheet");
|
||||
}
|
||||
- ret = g_strdup((char *)buf->content);
|
||||
+ ret = g_strdup((char *)xmlBufferContent(buf));
|
||||
|
||||
xmlBufferFree(buf);
|
||||
xmlXPathFreeObject(obj);
|
||||
@@ -1902,28 +1902,32 @@ static void osinfo_loader_root(OsinfoLoa
|
||||
}
|
||||
|
||||
static void
|
||||
-catchXMLError(void *ctx, const char *msg ATTRIBUTE_UNUSED, ...)
|
||||
+catchXMLError(void *ctx, const char *msg, ...)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
+ const xmlError *xmlErr = NULL;
|
||||
+ g_autofree gchar *xmlmsg = NULL;
|
||||
|
||||
- if (ctxt && ctxt->_private) {
|
||||
- GError **err = ctxt->_private;
|
||||
- if (!error_is_set(err)) {
|
||||
- gchar *xmlmsg;
|
||||
- if (ctxt->lastError.file) {
|
||||
- xmlmsg = g_strdup_printf("%s:%d: %s",
|
||||
- ctxt->lastError.file,
|
||||
- ctxt->lastError.line,
|
||||
- ctxt->lastError.message);
|
||||
- } else {
|
||||
- xmlmsg = g_strdup_printf("at line %d: %s",
|
||||
- ctxt->lastError.line,
|
||||
- ctxt->lastError.message);
|
||||
- }
|
||||
- OSINFO_LOADER_SET_ERROR(ctxt->_private, xmlmsg);
|
||||
- g_free(xmlmsg);
|
||||
- }
|
||||
+ if (!ctxt || !ctxt->_private)
|
||||
+ return;
|
||||
+
|
||||
+ if (error_is_set(ctxt->_private))
|
||||
+ return;
|
||||
+
|
||||
+ if (!(xmlErr = xmlCtxtGetLastError(ctx)))
|
||||
+ return;
|
||||
+
|
||||
+ if (xmlErr->file) {
|
||||
+ xmlmsg = g_strdup_printf("%s:%d: %s",
|
||||
+ xmlErr->file,
|
||||
+ xmlErr->line,
|
||||
+ xmlErr->message);
|
||||
+ } else {
|
||||
+ xmlmsg = g_strdup_printf("at line %d: %s",
|
||||
+ xmlErr->line,
|
||||
+ xmlErr->message);
|
||||
}
|
||||
+ OSINFO_LOADER_SET_ERROR(ctxt->_private, xmlmsg);
|
||||
}
|
||||
|
||||
static void osinfo_loader_process_xml(OsinfoLoader *loader,
|
||||
Reference in new issue
Block a user