bareboxenv -s: output depends on filesystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

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?


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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux