All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] buildhistory: don't output ownership for the sysroot
@ 2019-07-08 12:32 Ross Burton
  0 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2019-07-08 12:32 UTC (permalink / raw)
  To: openembedded-core

As the sysroot isn't ran inside pseudo the ownership is whoever is running the
builds.  In a setup where multiple builders all contribute to a shared
buildhistory writing the ownership data isn't useful, so just replace it with "-
-".

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/buildhistory.bbclass | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index baa7c8e2799..5bf27268107 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -67,7 +67,7 @@ PATCH_GIT_USER_NAME ?= "OpenEmbedded"
 
 buildhistory_emit_sysroot() {
 	mkdir --parents ${BUILDHISTORY_DIR_PACKAGE}
-	buildhistory_list_files ${SYSROOT_DESTDIR} ${BUILDHISTORY_DIR_PACKAGE}/sysroot
+	buildhistory_list_files_no_owners ${SYSROOT_DESTDIR} ${BUILDHISTORY_DIR_PACKAGE}/sysroot
 }
 
 #
@@ -537,6 +537,20 @@ buildhistory_list_files() {
 	fi | sort -k5 | sed 's/ * -> $//' > $2 )
 }
 
+buildhistory_list_files_no_owners() {
+	# List the files in the specified directory, but exclude date/time etc.
+	# Also don't output the ownership data, but instead output just - - so
+	# that the same parsing code as for _list_files works.
+	# This is somewhat messy, but handles where the size is not printed for device files under pseudo
+	( cd $1
+	find_cmd='find . ! -path . -printf "%M -          -          %10s %p -> %l\n"'
+	if [ "$3" = "fakeroot" ] ; then
+		eval ${FAKEROOTENV} ${FAKEROOTCMD} "$find_cmd"
+	else
+		eval "$find_cmd"
+	fi | sort -k5 | sed 's/ * -> $//' > $2 )
+}
+
 buildhistory_list_pkg_files() {
 	# Create individual files-in-package for each recipe's package
 	for pkgdir in $(find ${PKGDEST}/* -maxdepth 0 -type d); do
-- 
2.20.1



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

* Re: [PATCH] buildhistory: don't output ownership for the sysroot
  2019-07-09  1:11 ` akuster808
@ 2019-07-09  9:20   ` Burton, Ross
  0 siblings, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2019-07-09  9:20 UTC (permalink / raw)
  To: akuster808; +Cc: OE-core

On Tue, 9 Jul 2019 at 02:11, akuster808 <akuster808@gmail.com> wrote:
> On 7/8/19 4:46 PM, Ross Burton wrote:
> > As the sysroot isn't ran inside pseudo the ownership is whoever is running the
> > builds.  In a setup where multiple builders all contribute to a shared
> > buildhistory writing the ownership data isn't useful, so just replace it with "-
> > -".
>
> Should this be backported?

No, because the sysroot writing patches are not backported. :)

Ross


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

* Re: [PATCH] buildhistory: don't output ownership for the sysroot
  2019-07-08 23:46 Ross Burton
@ 2019-07-09  1:11 ` akuster808
  2019-07-09  9:20   ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: akuster808 @ 2019-07-09  1:11 UTC (permalink / raw)
  To: Ross Burton, openembedded-core



On 7/8/19 4:46 PM, Ross Burton wrote:
> As the sysroot isn't ran inside pseudo the ownership is whoever is running the
> builds.  In a setup where multiple builders all contribute to a shared
> buildhistory writing the ownership data isn't useful, so just replace it with "-
> -".

Should this be backported?

- armin
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/classes/buildhistory.bbclass | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
> index baa7c8e2799..5bf27268107 100644
> --- a/meta/classes/buildhistory.bbclass
> +++ b/meta/classes/buildhistory.bbclass
> @@ -67,7 +67,7 @@ PATCH_GIT_USER_NAME ?= "OpenEmbedded"
>  
>  buildhistory_emit_sysroot() {
>  	mkdir --parents ${BUILDHISTORY_DIR_PACKAGE}
> -	buildhistory_list_files ${SYSROOT_DESTDIR} ${BUILDHISTORY_DIR_PACKAGE}/sysroot
> +	buildhistory_list_files_no_owners ${SYSROOT_DESTDIR} ${BUILDHISTORY_DIR_PACKAGE}/sysroot
>  }
>  
>  #
> @@ -537,6 +537,20 @@ buildhistory_list_files() {
>  	fi | sort -k5 | sed 's/ * -> $//' > $2 )
>  }
>  
> +buildhistory_list_files_no_owners() {
> +	# List the files in the specified directory, but exclude date/time etc.
> +	# Also don't output the ownership data, but instead output just - - so
> +	# that the same parsing code as for _list_files works.
> +	# This is somewhat messy, but handles where the size is not printed for device files under pseudo
> +	( cd $1
> +	find_cmd='find . ! -path . -printf "%M -          -          %10s %p -> %l\n"'
> +	if [ "$3" = "fakeroot" ] ; then
> +		eval ${FAKEROOTENV} ${FAKEROOTCMD} "$find_cmd"
> +	else
> +		eval "$find_cmd"
> +	fi | sort -k5 | sed 's/ * -> $//' > $2 )
> +}
> +
>  buildhistory_list_pkg_files() {
>  	# Create individual files-in-package for each recipe's package
>  	for pkgdir in $(find ${PKGDEST}/* -maxdepth 0 -type d); do



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

* [PATCH] buildhistory: don't output ownership for the sysroot
@ 2019-07-08 23:46 Ross Burton
  2019-07-09  1:11 ` akuster808
  0 siblings, 1 reply; 4+ messages in thread
From: Ross Burton @ 2019-07-08 23:46 UTC (permalink / raw)
  To: openembedded-core

As the sysroot isn't ran inside pseudo the ownership is whoever is running the
builds.  In a setup where multiple builders all contribute to a shared
buildhistory writing the ownership data isn't useful, so just replace it with "-
-".

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/buildhistory.bbclass | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index baa7c8e2799..5bf27268107 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -67,7 +67,7 @@ PATCH_GIT_USER_NAME ?= "OpenEmbedded"
 
 buildhistory_emit_sysroot() {
 	mkdir --parents ${BUILDHISTORY_DIR_PACKAGE}
-	buildhistory_list_files ${SYSROOT_DESTDIR} ${BUILDHISTORY_DIR_PACKAGE}/sysroot
+	buildhistory_list_files_no_owners ${SYSROOT_DESTDIR} ${BUILDHISTORY_DIR_PACKAGE}/sysroot
 }
 
 #
@@ -537,6 +537,20 @@ buildhistory_list_files() {
 	fi | sort -k5 | sed 's/ * -> $//' > $2 )
 }
 
+buildhistory_list_files_no_owners() {
+	# List the files in the specified directory, but exclude date/time etc.
+	# Also don't output the ownership data, but instead output just - - so
+	# that the same parsing code as for _list_files works.
+	# This is somewhat messy, but handles where the size is not printed for device files under pseudo
+	( cd $1
+	find_cmd='find . ! -path . -printf "%M -          -          %10s %p -> %l\n"'
+	if [ "$3" = "fakeroot" ] ; then
+		eval ${FAKEROOTENV} ${FAKEROOTCMD} "$find_cmd"
+	else
+		eval "$find_cmd"
+	fi | sort -k5 | sed 's/ * -> $//' > $2 )
+}
+
 buildhistory_list_pkg_files() {
 	# Create individual files-in-package for each recipe's package
 	for pkgdir in $(find ${PKGDEST}/* -maxdepth 0 -type d); do
-- 
2.20.1



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

end of thread, other threads:[~2019-07-09  9:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 12:32 [PATCH] buildhistory: don't output ownership for the sysroot Ross Burton
2019-07-08 23:46 Ross Burton
2019-07-09  1:11 ` akuster808
2019-07-09  9:20   ` Burton, Ross

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.