All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] fs: fix fakeroot issue with SElinux contexts
@ 2016-10-29  8:26 Yann E. MORIN
  2016-10-29  8:26 ` [Buildroot] [PATCH 1/2] package/pseudo: new package Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Yann E. MORIN @ 2016-10-29  8:26 UTC (permalink / raw)
  To: buildroot

Hello All!

This series is an attempt at fixing fakeroot, which has issues with
SElinux contexts (in extended attributes), as reported as one of our
bug report, but also reported in Fedora Core and Debian:
    https://bugzilla.redhat.com/show_bug.cgi?id=1238802
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799858

Since there has been absolutely no activity on the upstream (== Debian)
report since it was filled more than a year ago, follow the path
suggested in the FC report, and switch to using pseudo as a replacement
for fakeroot.

This can probably go in right now. If there are issues, we can still
revert this before the end of the stabilisation month.


Regards,
Yann E. MORIN.


The following changes since commit 566858f6a1d65dda466942e4c84e40e3ce95e06f

  package/libglob: fix license typo (2016-10-28 15:17:43 +0200)


are available in the git repository at:

  git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to d21df0f20a6f45cf718263e40037bedb390064bf

  fs: use pseudo instead of fakeroot (2016-10-29 10:19:35 +0200)


----------------------------------------------------------------
Yann E. MORIN (2):
      package/pseudo: new package
      fs: use pseudo instead of fakeroot

 fs/common.mk               |  4 ++--
 package/pseudo/pseudo.hash |  2 ++
 package/pseudo/pseudo.mk   | 15 +++++++++++++++
 3 files changed, 19 insertions(+), 2 deletions(-)
 create mode 100644 package/pseudo/pseudo.hash
 create mode 100644 package/pseudo/pseudo.mk

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/2] package/pseudo: new package
  2016-10-29  8:26 [Buildroot] [PATCH 0/2] fs: fix fakeroot issue with SElinux contexts Yann E. MORIN
@ 2016-10-29  8:26 ` Yann E. MORIN
  2016-11-03 20:41   ` Thomas Petazzoni
  2016-10-29  8:26 ` [Buildroot] [PATCH 2/2] fs: use pseudo instead of fakeroot Yann E. MORIN
  2016-10-29  8:33 ` [Buildroot] [PATCH 0/2] fs: fix fakeroot issue with SElinux contexts Thomas Petazzoni
  2 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2016-10-29  8:26 UTC (permalink / raw)
  To: buildroot

Pseudo is a program that can either be used directly or as an
LD_PRELOAD, which allows these operations to succeed as if the
user did have system administrator privileges even though they
are an ordinary user.

Pseudo has a lot of similarities to fakeroot but is a new
implementation that improves on the problems seen using fakeroot.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Andrey Yurovsky <yurovsky@gmail.com>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/pseudo/pseudo.hash |  2 ++
 package/pseudo/pseudo.mk   | 15 +++++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 package/pseudo/pseudo.hash
 create mode 100644 package/pseudo/pseudo.mk

diff --git a/package/pseudo/pseudo.hash b/package/pseudo/pseudo.hash
new file mode 100644
index 0000000..5822d0e
--- /dev/null
+++ b/package/pseudo/pseudo.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256  d7767c9a73b0df4f1f26952cf5eca4c6ff6fc4bc5ef15a904ea3839c70161936  pseudo-7abc9396731149df5eaf43c84fed4f3053b64de6.tar.gz
diff --git a/package/pseudo/pseudo.mk b/package/pseudo/pseudo.mk
new file mode 100644
index 0000000..314fa82
--- /dev/null
+++ b/package/pseudo/pseudo.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# pseudo
+#
+################################################################################
+
+PSEUDO_VERSION = 7abc9396731149df5eaf43c84fed4f3053b64de6
+PSEUDO_SITE = https://git.yoctoproject.org/git/pseudo
+PSEUDO_SITE_METHOD = git
+
+# No "or later" clause.
+PSEUDO_LICENSE = LGPLv2.1
+PSEUDO_LICENSE_FILES = COPYING
+
+$(eval $(host-autotools-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 2/2] fs: use pseudo instead of fakeroot
  2016-10-29  8:26 [Buildroot] [PATCH 0/2] fs: fix fakeroot issue with SElinux contexts Yann E. MORIN
  2016-10-29  8:26 ` [Buildroot] [PATCH 1/2] package/pseudo: new package Yann E. MORIN
@ 2016-10-29  8:26 ` Yann E. MORIN
  2016-10-29  8:33 ` [Buildroot] [PATCH 0/2] fs: fix fakeroot issue with SElinux contexts Thomas Petazzoni
  2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2016-10-29  8:26 UTC (permalink / raw)
  To: buildroot

fakeroot misbhaves when there are SElinux contexts, as reported in #9386,
and further detailed in https://bugzilla.redhat.com/show_bug.cgi?id=1238802

A proposal in the FC bug is to use pseudo instead of fakeroot. Pseudo is
a from-scratch re-implementation of fakeroot; it is used in Poky/OE
instead of fakeroot.

Fixes #9386.

Reported-by: Andrey Yurovsky <yurovsky@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Andrey Yurovsky <yurovsky@gmail.com>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 fs/common.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/common.mk b/fs/common.mk
index 2b31e12..2dbef4d 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -43,7 +43,7 @@ ROOTFS_USERS_TABLES = $(call qstrip,$(BR2_ROOTFS_USERS_TABLES))
 define ROOTFS_TARGET_INTERNAL
 
 # extra deps
-ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs \
+ROOTFS_$(2)_DEPENDENCIES += host-pseudo host-makedevs \
 	$$(if $$(PACKAGES_USERS)$$(ROOTFS_USERS_TABLES),host-mkpasswd)
 
 ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y)
@@ -97,7 +97,7 @@ endif
 		echo $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) >> $$(FAKEROOT_SCRIPT)$$(sep))
 	$$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT)
 	chmod a+x $$(FAKEROOT_SCRIPT)
-	PATH=$$(BR_PATH) $$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT)
+	PATH=$$(BR_PATH) $$(HOST_DIR)/usr/bin/pseudo -- $$(FAKEROOT_SCRIPT)
 	$$(INSTALL) -m 0644 support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE)
 	- at rm -f $$(FAKEROOT_SCRIPT) $$(FULL_DEVICE_TABLE)
 ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),)
-- 
2.7.4

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

* [Buildroot] [PATCH 0/2] fs: fix fakeroot issue with SElinux contexts
  2016-10-29  8:26 [Buildroot] [PATCH 0/2] fs: fix fakeroot issue with SElinux contexts Yann E. MORIN
  2016-10-29  8:26 ` [Buildroot] [PATCH 1/2] package/pseudo: new package Yann E. MORIN
  2016-10-29  8:26 ` [Buildroot] [PATCH 2/2] fs: use pseudo instead of fakeroot Yann E. MORIN
@ 2016-10-29  8:33 ` Thomas Petazzoni
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2016-10-29  8:33 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 29 Oct 2016 10:26:38 +0200, Yann E. MORIN wrote:

> This series is an attempt at fixing fakeroot, which has issues with
> SElinux contexts (in extended attributes), as reported as one of our
> bug report, but also reported in Fedora Core and Debian:
>     https://bugzilla.redhat.com/show_bug.cgi?id=1238802
>     https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799858
> 
> Since there has been absolutely no activity on the upstream (== Debian)
> report since it was filled more than a year ago, follow the path
> suggested in the FC report, and switch to using pseudo as a replacement
> for fakeroot.
> 
> This can probably go in right now. If there are issues, we can still
> revert this before the end of the stabilisation month.

There are lots of other references to fakeroot all over the place, both
in fs/common.mk, but also the relatively new option we have to call a
script within the fakeroot context.

Do we keep them as-is, or do we rename everything to "pseudo" ? I find
the name "pseudo" very confusing, while "fakeroot" is a lot clearer, so
perhaps it is OK to keep everything named fakeroot even though in
practice we're using pseudo.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 1/2] package/pseudo: new package
  2016-10-29  8:26 ` [Buildroot] [PATCH 1/2] package/pseudo: new package Yann E. MORIN
@ 2016-11-03 20:41   ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2016-11-03 20:41 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 29 Oct 2016 10:26:41 +0200, Yann E. MORIN wrote:
> Pseudo is a program that can either be used directly or as an
> LD_PRELOAD, which allows these operations to succeed as if the
> user did have system administrator privileges even though they
> are an ordinary user.
> 
> Pseudo has a lot of similarities to fakeroot but is a new
> implementation that improves on the problems seen using fakeroot.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Andrey Yurovsky <yurovsky@gmail.com>
> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  package/pseudo/pseudo.hash |  2 ++
>  package/pseudo/pseudo.mk   | 15 +++++++++++++++
>  2 files changed, 17 insertions(+)
>  create mode 100644 package/pseudo/pseudo.hash
>  create mode 100644 package/pseudo/pseudo.mk

Both patches applied, thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2016-11-03 20:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-29  8:26 [Buildroot] [PATCH 0/2] fs: fix fakeroot issue with SElinux contexts Yann E. MORIN
2016-10-29  8:26 ` [Buildroot] [PATCH 1/2] package/pseudo: new package Yann E. MORIN
2016-11-03 20:41   ` Thomas Petazzoni
2016-10-29  8:26 ` [Buildroot] [PATCH 2/2] fs: use pseudo instead of fakeroot Yann E. MORIN
2016-10-29  8:33 ` [Buildroot] [PATCH 0/2] fs: fix fakeroot issue with SElinux contexts Thomas Petazzoni

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.