[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-devel
Subject:    [oe] [meta-gnome][PATCH 1/4] libuser: Upgrade to 0.63
From:       "Khem Raj" <raj.khem () gmail ! com>
Date:       2022-08-30 21:37:04
Message-ID: 20220830213707.1413842-1-raj.khem () gmail ! com
[Download RAW message or body]

Do not build docs, it needs sgml tools which are not available in OE
Fix python type mismatch problems
Generate needed files for reconfiguring the package

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../libuser/0001-docs-Disable-building.patch  | 29 +++++++
 ...parse_field-fix-string-formating-in-.patch | 34 --------
 ...3-python-Compilation-warnings-update.patch | 84 +++++++++++++++++++
 .../{libuser_0.62.bb => libuser_0.63.bb}      | 23 +++--
 4 files changed, 129 insertions(+), 41 deletions(-)
 create mode 100644 meta-gnome/recipes-support/libuser/libuser/0001-docs-Disable-building.patch
  delete mode 100644 \
meta-gnome/recipes-support/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch
  create mode 100644 \
meta-gnome/recipes-support/libuser/libuser/0003-python-Compilation-warnings-update.patch
  rename meta-gnome/recipes-support/libuser/{libuser_0.62.bb => libuser_0.63.bb} \
(58%)

diff --git a/meta-gnome/recipes-support/libuser/libuser/0001-docs-Disable-building.patch \
b/meta-gnome/recipes-support/libuser/libuser/0001-docs-Disable-building.patch new \
file mode 100644 index 0000000000..add2872cca
--- /dev/null
+++ b/meta-gnome/recipes-support/libuser/libuser/0001-docs-Disable-building.patch
@@ -0,0 +1,29 @@
+From e6bdf74a424652c4f9a38457c7fa93a2051157f5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 30 Aug 2022 13:09:07 -0700
+Subject: [PATCH] docs: Disable building
+
+It needs linuxdoc-tools which we do not have in OE anymore
+
+Upstream-Status: Inappropriate [OE-Specific]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ docs/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/docs/Makefile.am b/docs/Makefile.am
+index daa2288..b355185 100644
+--- a/docs/Makefile.am
++++ b/docs/Makefile.am
+@@ -8,7 +8,7 @@ CLEANFILES = $(man_MANS) $(SGML_OUTPUTS)
+ EXTRA_DIST = attributes.txt libuser.conf.5.in rfc2307.txt sgml/libuser.sgml \
+ 	$(SGML_OUTPUTS)
+
+-all: sgml/libuser.txt sgml/libuser.html
++all:
+
+ libuser.conf.5: $(srcdir)/libuser.conf.5.in Makefile
+ 	sed 's,@sysconfdir\@,$(sysconfdir),g' \
+--
+2.37.2
+
diff --git a/meta-gnome/recipes-support/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch \
b/meta-gnome/recipes-support/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch
 deleted file mode 100644
index 7c47df22e4..0000000000
--- a/meta-gnome/recipes-support/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch
                
+++ /dev/null
@@ -1,34 +0,0 @@
-From a4857911ece5ebfcdef42aee4c070eb216f39597 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Aníbal Limón?= <anibal.limon@linux.intel.com>
-Date: Fri, 13 May 2016 11:40:13 -0500
-Subject: [PATCH] modules/files.c: parse_field fix string formating in
- g_warnings
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-[YOCTO #9547]
-
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-
-Upstream-Status: Pending
----
- modules/files.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/modules/files.c b/modules/files.c
-index 4ef0a57..35eafc9 100644
---- a/modules/files.c
-+++ b/modules/files.c
-@@ -534,7 +534,7 @@ parse_field(const struct format_specifier *format, GValue \
                *value,
- 						 string, &err);
- 	if (ret == FALSE) {
- 		g_assert(err != NULL);
--		g_warning(lu_strerror(err));
-+		g_warning(lu_strerror(err), NULL);
- 		lu_error_free(&err);
- 	}
- 	return ret;
---
-2.1.4
-
diff --git a/meta-gnome/recipes-support/libuser/libuser/0003-python-Compilation-warnings-update.patch \
b/meta-gnome/recipes-support/libuser/libuser/0003-python-Compilation-warnings-update.patch
 new file mode 100644
index 0000000000..45d6952150
--- /dev/null
+++ b/meta-gnome/recipes-support/libuser/libuser/0003-python-Compilation-warnings-update.patch
 @@ -0,0 +1,84 @@
+From acd7b051993d501f4b5e3a593e0f18d1336ba2de Mon Sep 17 00:00:00 2001
+From: Tomas Halman <thalman@redhat.com>
+Date: Wed, 21 Jul 2021 15:36:59 +0200
+Subject: [PATCH] python: Compilation warnings update
+
+The compilation produces few warnings about discard const qualifier
+and pointer to int conversion. This patch fixes the const qualifiers
+and replaces the tp_print inicialization in PyTypeObject with 0 instead
+of NULL
+
+Upstream-Status: Backport \
[https://pagure.io/libuser/c/3cb7ea54e7b50da6ea313a0e7c7187c8aa5e6ee9?branch=master] \
+Signed-off-by: Khem Raj <raj.khem@gmail.com> +---
+ python/admin.c | 2 +-
+ python/ent.c   | 8 ++++----
+ python/misc.c  | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/python/admin.c b/python/admin.c
+index 83595af..e92fca4 100644
+--- a/python/admin.c
++++ b/python/admin.c
+@@ -1512,7 +1512,7 @@ PyTypeObject AdminType = {
+ 	sizeof(struct libuser_admin), /* tp_basicsize */
+ 	0,			/* tp_itemsize */
+ 	libuser_admin_destroy,	/* tp_dealloc */
+-	NULL,			/* tp_print */
++	0,	            /* tp_print */
+ 	NULL,			/* tp_getattr */
+ 	NULL,			/* tp_setattr */
+ 	NULL,			/* tp_compare */
+diff --git a/python/ent.c b/python/ent.c
+index ee712d2..fc3d654 100644
+--- a/python/ent.c
++++ b/python/ent.c
+@@ -255,7 +255,7 @@ libuser_convert_to_value(PyObject *item, GValue *value)
+ static int
+ libuser_entity_setattro(PyObject *self, PyObject *attr_name, PyObject *value)
+ {
+-	char *name;
++	const char *name;
+ 	struct libuser_entity *me;
+ 	PyObject *list;
+ 	struct lu_ent *copy;
+@@ -616,7 +616,7 @@ static PyObject *
+ libuser_entity_get_item(PyObject *self, PyObject *item)
+ {
+ 	struct libuser_entity *me;
+-	char *attr;
++	const char *attr;
+
+ 	DEBUG_ENTRY;
+ 	me = (struct libuser_entity *)self;
+@@ -664,7 +664,7 @@ static int
+ libuser_entity_set_item(PyObject *self, PyObject *item, PyObject *args)
+ {
+ 	struct libuser_entity *me;
+-	char *attr = NULL;
++	const char *attr = NULL;
+ 	Py_ssize_t i, size;
+ 	int ret;
+ 	GValue value;
+@@ -800,7 +800,7 @@ PyTypeObject EntityType = {
+ 	sizeof(struct libuser_entity), /* tp_basicsize */
+ 	0,			/* tp_itemsize */
+ 	libuser_entity_destroy, /* tp_dealloc */
+-	NULL,			/* tp_print */
++	0,              /* tp_print */
+ 	NULL,			/* tp_getattr */
+ 	NULL,			/* tp_setattr */
+ 	NULL,			/* tp_compare */
+diff --git a/python/misc.c b/python/misc.c
+index c4ce819..810a846 100644
+--- a/python/misc.c
++++ b/python/misc.c
+@@ -488,7 +488,7 @@ PyTypeObject PromptType = {
+ 	sizeof(struct libuser_prompt), /* tp_basicsize */
+ 	0,			/* tp_itemsize */
+ 	libuser_prompt_destroy,	/* tp_dealloc */
+-	NULL,			/* tp_print */
++	0,              /* tp_print */
+ 	NULL,			/* tp_getattr */
+ 	NULL,			/* tp_setattr */
+ 	NULL,			/* tp_compare */
diff --git a/meta-gnome/recipes-support/libuser/libuser_0.62.bb \
b/meta-gnome/recipes-support/libuser/libuser_0.63.bb similarity index 58%
rename from meta-gnome/recipes-support/libuser/libuser_0.62.bb
rename to meta-gnome/recipes-support/libuser/libuser_0.63.bb
index 22ddd10a63..e266fdc7a3 100644
--- a/meta-gnome/recipes-support/libuser/libuser_0.62.bb
+++ b/meta-gnome/recipes-support/libuser/libuser_0.63.bb
@@ -12,22 +12,31 @@ LIC_FILES_CHKSUM = \
"file://COPYING;md5_30f0716dfdd0d91eb439ebec522ec2 \  SECTION = "base"

 SRC_URI = "https://releases.pagure.org/libuser/libuser-${PV}.tar.xz \
+           file://0001-docs-Disable-building.patch \
            file://0002-remove-unused-execinfo.h.patch \
-           file://0001-modules-files.c-parse_field-fix-string-formating-in-.patch \
+           file://0003-python-Compilation-warnings-update.patch \
            "

-SRC_URI[md5sum] = "63e5e5c551e99dc5302b40b80bd6d4f2"
-SRC_URI[sha256sum] = \
"a58ff4fabb01a25043b142185a33eeea961109dd60d4b40b6a9df4fa3cace20b" \
+SRC_URI[sha256sum] = \
"8dc377255452a68e82c4837ba22c3ee4ae3658971bf0f2ef67ed0b77fc497f91"

-DEPENDS = "popt libpam glib-2.0 python3"
+DEPENDS = "bison-native popt libpam glib-2.0 python3"

-inherit features_check
-REQUIRED_DISTRO_FEATURES = "pam"
+inherit autotools features_check gettext python3native python3-dir pkgconfig gtk-doc

-inherit autotools gettext python3native python3-dir pkgconfig gtk-doc
+REQUIRED_DISTRO_FEATURES = "pam"

 EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"

+GTKDOC_DOCDIR = "${S}/docs/reference"
+
+# run autopoint since it needs ABOUT-NLS and admin/config.rpath from gettext
+#EXTRA_AUTORECONF:remove = "--exclude=autopoint"
+
+do_configure:prepend() {
+    touch ${S}/ABOUT-NLS ${S}/admin/config.rpath
+    (cd ${S}/lib && bison getdate.y -o getdate.c)
+}
+
 PACKAGES += "${PN}-python "

 FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
--
2.37.2



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#98564): https://lists.openembedded.org/g/openembedded-devel/message/98564
Mute This Topic: https://lists.openembedded.org/mt/93358977/4455120
Group Owner: openembedded-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [openembedded-devel@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic