new file mode 100644
@@ -0,0 +1,41 @@
+From 3b433f1df6c80bc380a367b86fdc149eb33e2674 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20=C5=81obacz?= <p.lobacz@welotec.com>
+Date: Mon, 3 Apr 2023 03:12:17 +0200
+Subject: [PATCH] opkg_archive: support ACLs, extended flags and attributes
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Libarchive is supporting extracting ACLS, extended flags
+and extended attributes, so from now we can turn on this
+extract flags.
+
+Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
+---
+ libopkg/opkg_archive.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c
+index 03a4afb..632bef8 100644
+--- a/libopkg/opkg_archive.c
++++ b/libopkg/opkg_archive.c
+@@ -905,12 +905,14 @@ struct opkg_ar *ar_open_pkg_data_archive(const char *filename)
+
+ /** Flags:
+ *
+- * TODO: Do we want to support ACLs, extended flags and extended
++ * TODO: This should be done with some verification from configure,
++ * if we want to support ACLs, extended flags and extended
+ * attributes? (ARCHIVE_EXTRACT_ACL, ARCHIVE_EXTRACT_FFLAGS,
+ * ARCHIVE_EXTRACT_XATTR).
+ */
+ ar->extract_flags = ARCHIVE_EXTRACT_OWNER | ARCHIVE_EXTRACT_PERM |
+- ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_UNLINK | ARCHIVE_EXTRACT_NO_OVERWRITE;
++ ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_UNLINK | ARCHIVE_EXTRACT_NO_OVERWRITE |
++ ARCHIVE_EXTRACT_ACL | ARCHIVE_EXTRACT_FFLAGS | ARCHIVE_EXTRACT_XATTR;
+
+ if (opkg_config->ignore_uid)
+ ar->extract_flags &= ~ARCHIVE_EXTRACT_OWNER;
+--
+2.34.1
+
@@ -15,6 +15,7 @@ PE = "1"
SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
file://opkg.conf \
file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
+ file://0002-opkg_archive-support-ACLs-extended-flags-and-attributes.patch
file://run-ptest \
"
Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com> --- ...t-ACLs-extended-flags-and-attributes.patch | 41 +++++++++++++++++++ meta/recipes-devtools/opkg/opkg_0.5.0.bb | 1 + 2 files changed, 42 insertions(+) create mode 100644 meta/recipes-devtools/opkg/opkg/0002-opkg_archive-support-ACLs-extended-flags-and-attributes.patch