mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Baeuerle, Florian" <Florian.Baeuerle@allegion.com>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: bareboxenv -s: output depends on filesystem
Date: Mon, 17 Dec 2018 11:53:43 +0100	[thread overview]
Message-ID: <20181217105343.kkfo4ihynrcv7dis@pengutronix.de> (raw)
In-Reply-To: <24299a5b0abeaa6e99252753c9043121678bd0ce.camel@allegion.com>

Hi Florian,

On Thu, Dec 13, 2018 at 03:47:20PM +0000, Baeuerle, Florian wrote:
> Hi,
> 
> I'm currently trying to get reproducible barebox binaries.
> 
> One problem I'm facing is, that the barebox defaultenv generated during build
> depends on the filesystem used on the build machine. That is, because
> envfs_save() uses recursive_action(), which in turn uses readdir() without
> sorting the entries afterwards.
> 
> quoting man readdir:
>   The order in which filenames are read by successive calls to readdir() depends
> on the filesystem implementation; it is unlikely that the names will be sorted
> in any fashion.
> 
> In fact, on ext4 I get a different barebox binary as on XFS.
> 
> 
> Is this considered something worth being fixed?

Yes, sure.

> 
> It should be sufficient to build a list of directories and sort it before
> recursing. It is, however, shared code which is also used by the saveenv command
> and I'm not sure if malloc'ing recursively is a good idea on all targets where
> saveenv is used.
> 
> I would go ahead and implement it if no one opposes.
> 
> Should I introduce a flag for recursive_action() that allows taking an
> "unsorted" (non-malloc) code path for use with the saveenv command?

Yes, that would be good. I guess there's no point in letting barebox
sort the entries.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-12-17 10:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 15:47 Baeuerle, Florian
2018-12-17 10:53 ` Sascha Hauer [this message]
2018-12-18 13:22   ` [PATCH 1/2] recursive_action: add ACTION_SORT flag Baeuerle, Florian
2018-12-18 13:22     ` [PATCH 2/2] envfs: new flag for sorting env before saving Baeuerle, Florian
2018-12-19 12:42     ` [PATCH 1/2] recursive_action: add ACTION_SORT flag Baeuerle, Florian
2018-12-19 14:02     ` [PATCH v2 " Baeuerle, Florian
2018-12-19 14:02       ` [PATCH v2 2/2] envfs: new flag for sorting env before saving Baeuerle, Florian
2019-01-03 10:59       ` [PATCH v2 1/2] recursive_action: add ACTION_SORT flag Sascha Hauer
2019-01-03 11:53         ` Baeuerle, Florian
2019-01-07  7:58           ` s.hauer
2019-01-08  9:47             ` Baeuerle, Florian
2019-01-08  9:48               ` [PATCH 1/2] envfs: fix problem #1 Baeuerle, Florian
2019-01-08  9:48                 ` [PATCH 2/2] envfs: fix problem #2 Baeuerle, Florian
2019-01-08 15:40               ` [PATCH v2 1/2] recursive_action: add ACTION_SORT flag s.hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181217105343.kkfo4ihynrcv7dis@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=Florian.Baeuerle@allegion.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox