diff mbox series

[kirkstone,v2,3/4] opkg_archive: support ACLs, extended flags and attributes

Message ID 20230403122409.3067997-3-p.lobacz@welotec.com
State New, archived
Headers show
Series [kirkstone,v2,1/4] package.bbclase: Add ACLs and xattrs to perform_packagecopy | expand

Commit Message

Piotr Łobacz April 3, 2023, 12:24 p.m. UTC
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
diff mbox series

Patch

diff --git a/meta/recipes-devtools/opkg/opkg/0002-opkg_archive-support-ACLs-extended-flags-and-attributes.patch b/meta/recipes-devtools/opkg/opkg/0002-opkg_archive-support-ACLs-extended-flags-and-attributes.patch
new file mode 100644
index 0000000000..9a90795245
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0002-opkg_archive-support-ACLs-extended-flags-and-attributes.patch
@@ -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
+
diff --git a/meta/recipes-devtools/opkg/opkg_0.5.0.bb b/meta/recipes-devtools/opkg/opkg_0.5.0.bb
index 7bddaa3016..8ce2cd7863 100644
--- a/meta/recipes-devtools/opkg/opkg_0.5.0.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.5.0.bb
@@ -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 \
 "