All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-selinux][dunfell][PATCH 0/3] Fix dunfell build
@ 2021-10-27 14:03 Jason Andryuk
  2021-10-27 14:03 ` [meta-selinux][dunfell][PATCH 1/3] e2fsprogs: Remove misc_create_inode.c-label_rootfs.patch Jason Andryuk
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jason Andryuk @ 2021-10-27 14:03 UTC (permalink / raw)
  To: yocto; +Cc: Joe MacDonald, Philip Tricca, Yi Zhao, Jason Andryuk

meta-selinux fails to build libselinux and e2fsprogs.  These patches
fix that and then removes the unused e2fsprogs overrides.

Jason Andryuk (3):
  e2fsprogs: Remove misc_create_inode.c-label_rootfs.patch
  Remove e2fsprogs override
  libselinux: Fix restorecon_set_sehandle.patch context

 .../e2fsprogs/e2fsprogs_%.bbappend            |  1 -
 .../e2fsprogs/e2fsprogs_selinux.inc           |  3 --
 ...t2fs-ext2_ext_attr.h-add-xattr-index.patch | 20 ---------
 .../misc_create_inode.c-label_rootfs.patch    | 45 -------------------
 ...e-in-selinux_restorecon_set_sehandle.patch |  4 +-
 5 files changed, 2 insertions(+), 71 deletions(-)
 delete mode 100644 recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend
 delete mode 100644 recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc
 delete mode 100644 recipes-devtools/e2fsprogs/files/lib-ext2fs-ext2_ext_attr.h-add-xattr-index.patch
 delete mode 100644 recipes-devtools/e2fsprogs/files/misc_create_inode.c-label_rootfs.patch

-- 
2.31.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [meta-selinux][dunfell][PATCH 1/3] e2fsprogs: Remove misc_create_inode.c-label_rootfs.patch
  2021-10-27 14:03 [meta-selinux][dunfell][PATCH 0/3] Fix dunfell build Jason Andryuk
@ 2021-10-27 14:03 ` Jason Andryuk
  2021-10-27 14:03 ` [meta-selinux][dunfell][PATCH 2/3] Remove e2fsprogs override Jason Andryuk
  2021-10-27 14:03 ` [meta-selinux][dunfell][PATCH 3/3] libselinux: Fix restorecon_set_sehandle.patch context Jason Andryuk
  2 siblings, 0 replies; 4+ messages in thread
From: Jason Andryuk @ 2021-10-27 14:03 UTC (permalink / raw)
  To: yocto; +Cc: Joe MacDonald, Philip Tricca, Yi Zhao, Jason Andryuk

An equivalent patch was merged into 1.45.7: commit 7616fd6a599e
"create_inode: set xattrs to the root directory as well".  The existing
one still applies and actualy breaks building because of duplicate
lables.  Remove it.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
---
 .../e2fsprogs/e2fsprogs_selinux.inc           |  2 -
 .../misc_create_inode.c-label_rootfs.patch    | 45 -------------------
 2 files changed, 47 deletions(-)
 delete mode 100644 recipes-devtools/e2fsprogs/files/misc_create_inode.c-label_rootfs.patch

diff --git a/recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc b/recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc
index 9cbb7fe..81fe7b7 100644
--- a/recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc
+++ b/recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc
@@ -1,3 +1 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-SRC_URI += "file://misc_create_inode.c-label_rootfs.patch"
diff --git a/recipes-devtools/e2fsprogs/files/misc_create_inode.c-label_rootfs.patch b/recipes-devtools/e2fsprogs/files/misc_create_inode.c-label_rootfs.patch
deleted file mode 100644
index 046e521..0000000
--- a/recipes-devtools/e2fsprogs/files/misc_create_inode.c-label_rootfs.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Philip Tricca <flihp@twobit.us>
-To: tytso@mit.edu
-Cc: liezhi.yang@windriver.com
-Date: Sat, 20 Feb 2016 18:58:58 +0000
-Subject: [PATCH] misc/create_inode.c: Copy xattrs from root directory when populating fs.
-
-When copying a file system using the -d option the xattrs from the root
-directory need to be copied before the populate_fs recusion starts.
-
-Signed-off-by: Philip Tricca <flihp@twobit.us>
-Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
-
----
- misc/create_inode.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index a7b6d348..cfd15922 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -979,6 +979,13 @@ errcode_t populate_fs2(ext2_filsys fs, ext2_ino_t parent_ino,
- 		return retval;
- 	}
- 
-+	retval = set_inode_xattr(fs, root, source_dir);
-+	if (retval) {
-+		com_err(__func__, retval,
-+			_("while setting xattrs for \"%s\""), source_dir);
-+		goto out;
-+	}
-+
- 	file_info.path_len = 0;
- 	file_info.path_max_len = 255;
- 	file_info.path = calloc(file_info.path_max_len, 1);
-@@ -987,6 +994,7 @@ errcode_t populate_fs2(ext2_filsys fs, ext2_ino_t parent_ino,
- 			       &file_info, fs_callbacks);
- 
- 	free(file_info.path);
-+out:
- 	free(hdlinks.hdl);
- 	return retval;
- }
--- 
-2.11.1
-
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [meta-selinux][dunfell][PATCH 2/3] Remove e2fsprogs override
  2021-10-27 14:03 [meta-selinux][dunfell][PATCH 0/3] Fix dunfell build Jason Andryuk
  2021-10-27 14:03 ` [meta-selinux][dunfell][PATCH 1/3] e2fsprogs: Remove misc_create_inode.c-label_rootfs.patch Jason Andryuk
@ 2021-10-27 14:03 ` Jason Andryuk
  2021-10-27 14:03 ` [meta-selinux][dunfell][PATCH 3/3] libselinux: Fix restorecon_set_sehandle.patch context Jason Andryuk
  2 siblings, 0 replies; 4+ messages in thread
From: Jason Andryuk @ 2021-10-27 14:03 UTC (permalink / raw)
  To: yocto; +Cc: Joe MacDonald, Philip Tricca, Yi Zhao, Jason Andryuk

commit b2b3ea27e3e3 "e2fsprogs: Superseded by upstream." removed
lib-ext2fs-ext2_ext_attr.h-add-xattr-index.patch from SRC_URI.  It was
no longer applied, but the file was not deleted.  Do that now.

e2fsprogs_%.bbappend/e2fsprogs_selinux.inc now do nothing, so remove
them as well.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
---
 .../e2fsprogs/e2fsprogs_%.bbappend            |  1 -
 .../e2fsprogs/e2fsprogs_selinux.inc           |  1 -
 ...t2fs-ext2_ext_attr.h-add-xattr-index.patch | 20 -------------------
 3 files changed, 22 deletions(-)
 delete mode 100644 recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend
 delete mode 100644 recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc
 delete mode 100644 recipes-devtools/e2fsprogs/files/lib-ext2fs-ext2_ext_attr.h-add-xattr-index.patch

diff --git a/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend b/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend
deleted file mode 100644
index 7719d3b..0000000
--- a/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', '${BPN}_selinux.inc', '', d)}
diff --git a/recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc b/recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc
deleted file mode 100644
index 81fe7b7..0000000
--- a/recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc
+++ /dev/null
@@ -1 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
diff --git a/recipes-devtools/e2fsprogs/files/lib-ext2fs-ext2_ext_attr.h-add-xattr-index.patch b/recipes-devtools/e2fsprogs/files/lib-ext2fs-ext2_ext_attr.h-add-xattr-index.patch
deleted file mode 100644
index b87c414..0000000
--- a/recipes-devtools/e2fsprogs/files/lib-ext2fs-ext2_ext_attr.h-add-xattr-index.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Add xattr name index for xattrs with the 'security' prefix. These are defined
-in the ext(2|3|4)/xattr.h in the kernel. We use the EXT2 prefix for consistency
-with e2fslibs naming.
-
-Signed-off-by: Philip Tricca <flihp@twobit.us>
-
-Index: e2fsprogs-1.42.9/lib/ext2fs/ext2_ext_attr.h
-===================================================================
---- e2fsprogs-1.42.9.orig/lib/ext2fs/ext2_ext_attr.h
-+++ e2fsprogs-1.42.9/lib/ext2fs/ext2_ext_attr.h
-@@ -15,6 +15,9 @@
- /* Maximum number of references to one attribute block */
- #define EXT2_EXT_ATTR_REFCOUNT_MAX	1024
- 
-+/* Name indexes */
-+#define EXT2_XATTR_INDEX_SECURITY               6
-+
- struct ext2_ext_attr_header {
- 	__u32	h_magic;	/* magic number for identification */
- 	__u32	h_refcount;	/* reference count */
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [meta-selinux][dunfell][PATCH 3/3] libselinux: Fix restorecon_set_sehandle.patch context
  2021-10-27 14:03 [meta-selinux][dunfell][PATCH 0/3] Fix dunfell build Jason Andryuk
  2021-10-27 14:03 ` [meta-selinux][dunfell][PATCH 1/3] e2fsprogs: Remove misc_create_inode.c-label_rootfs.patch Jason Andryuk
  2021-10-27 14:03 ` [meta-selinux][dunfell][PATCH 2/3] Remove e2fsprogs override Jason Andryuk
@ 2021-10-27 14:03 ` Jason Andryuk
  2 siblings, 0 replies; 4+ messages in thread
From: Jason Andryuk @ 2021-10-27 14:03 UTC (permalink / raw)
  To: yocto; +Cc: Joe MacDonald, Philip Tricca, Yi Zhao, Jason Andryuk

0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch added
in commit d6ff5a0e67af "libselinux: Backport NULL pointer fix from 3.1"
fails to apply because there is a extra level in the patch context.
The patch cannot apply and do_patch fails.  Fix the context so it builds
again.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
---
 ...-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes-security/selinux/libselinux/0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch b/recipes-security/selinux/libselinux/0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch
index 8a9fb7c..f392f68 100644
--- a/recipes-security/selinux/libselinux/0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch
+++ b/recipes-security/selinux/libselinux/0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch
@@ -17,8 +17,8 @@ Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
 
 diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_restorecon.c
 index d1ce830c5..6993be6fd 100644
---- a/libselinux/src/selinux_restorecon.c
-+++ b/libselinux/src/selinux_restorecon.c
+--- libselinux/src/selinux_restorecon.c
++++ libselinux/src/selinux_restorecon.c
 @@ -1154,6 +1154,8 @@ void selinux_restorecon_set_sehandle(struct selabel_handle *hndl)
  	size_t num_specfiles, fc_digest_len;
  
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-27 14:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 14:03 [meta-selinux][dunfell][PATCH 0/3] Fix dunfell build Jason Andryuk
2021-10-27 14:03 ` [meta-selinux][dunfell][PATCH 1/3] e2fsprogs: Remove misc_create_inode.c-label_rootfs.patch Jason Andryuk
2021-10-27 14:03 ` [meta-selinux][dunfell][PATCH 2/3] Remove e2fsprogs override Jason Andryuk
2021-10-27 14:03 ` [meta-selinux][dunfell][PATCH 3/3] libselinux: Fix restorecon_set_sehandle.patch context Jason Andryuk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.