<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 1, 2022 at 11:25 AM <<a href="mailto:oss@c-mauderer.de">oss@c-mauderer.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Gedare,<br>
<br>
Am 31.10.22 um 20:01 schrieb Gedare Bloom:<br>
> Resending without the first patch since it may trigger size filters.<br>
> <br>
> ---------- Forwarded message ---------<br>
> From: Gedare Bloom <<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>><br>
> Date: Mon, Oct 31, 2022 at 12:55 PM<br>
> Subject: Identify 3rd party source in spec?<br>
> To: <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a> <<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a>><br>
> <br>
> <br>
> Hello all,<br>
> <br>
> I would like to float the idea of managing 3rd party source tracking<br>
> through the build system spec files. I believe this would be the most<br>
> efficient way to maintain this information, and we can leverage the<br>
> existing build system code for tasks such as automatic format checks,<br>
> generating lists of third-party code, etc.<br>
<br>
Sounds like a good idea to have it in the build specification items.<br>
<br>
> <br>
> This will require refactoring some spec files to pull 3rd party code<br>
> out to a separate .yml file that gets linked. Once that is done, then<br>
> we could add another attribute for this tracking purpose. I would like<br>
> to keep it simple as a boolean, maybe just "third-party: true/false"<br>
> Attached is an example patch showing how this might work for the<br>
> dtc/libfdt code as a build objects item type 'obj', and for zlib<br>
> library as a build library item type 'lib' with some proof-of-concept<br>
> code for generating a listing of third party source files.<br>
<br>
Is it a good idea to make it a mandatory attribute? It makes the yaml <br>
files bigger. It will only mean that we have to look for copy and paste <br>
bugs instead of missing attributes if someone adds a new third party <br>
library.<br></blockquote><div> </div><div>I agree that an implicit "third-party: false" is preferable. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Do we need some additional information / scripts / stuff for third party <br>
code? Like an upstream source or upstream version? For example the JFFS2 <br>
code has a VERSION file with lots of information:<br>
<br>
<a href="https://git.rtems.org/rtems/tree/cpukit/libfs/src/jffs2/VERSION" rel="noreferrer" target="_blank">https://git.rtems.org/rtems/tree/cpukit/libfs/src/jffs2/VERSION</a></blockquote><div><br></div><div>I don't think this should be required for the initial implementation with existing 3rd party source, but it would be good to define how we do this for any new 3rd party source that is brought in. Adding this for existing 3rd party inclusions could easily be a janitor task.</div><div><br></div><div>For rtems-lwip, I've been enforcing addition of an ORIGIN.* file for new source imports with an upstream commit hash in the commit message, but that was added basically from the beginning and almost all directories in the root of that project are 3rd party source imports that have pretty clear origin, upstream, and licensing.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
For the imxrt I added something similar in the commit description:<br>
<br>
<a href="https://git.rtems.org/rtems/commit/bsps/arm/imxrt/nxp?id=48f6a6c302a3e1a3f8915e2503d0fe618d1af285" rel="noreferrer" target="_blank">https://git.rtems.org/rtems/commit/bsps/arm/imxrt/nxp?id=48f6a6c302a3e1a3f8915e2503d0fe618d1af285</a><br>
<br>
Full text is a bit big for an attribute but maybe the location of a <br>
VERSION file in the source tree? Or a minimal link to an upstream code <br>
and a version info?<br>
<br>
Best regards<br>
<br>
Christian<br>
<br>
> <br>
> As an initial step before making this refactoring, I have added an<br>
> explicit default "third-party: false" attribute to every yml file<br>
> preceding the enabled-by: attribute, using the following bit of shell:<br>
> rtems.git/spec/build$ find . -name "*.yml" | xargs sed -i -e<br>
> 's/\(enabled-by.*\)/third-party: false\n\1/'<br>
> <br>
> This touches 2333 files adding that one line, which is the contents of<br>
> the first 1 MiB patch attached in the series. The remaining patches<br>
> then layer on the top and are functional, outputting:<br>
> <br>
> rtems.git$ ./waf third_party_list<br>
> cpukit/dtc/libfdt/fdt.c<br>
> cpukit/dtc/libfdt/fdt_addresses.c<br>
> cpukit/dtc/libfdt/fdt_empty_tree.c<br>
> cpukit/dtc/libfdt/fdt_ro.c<br>
> cpukit/dtc/libfdt/fdt_rw.c<br>
> cpukit/dtc/libfdt/fdt_strerror.c<br>
> cpukit/dtc/libfdt/fdt_sw.c<br>
> cpukit/dtc/libfdt/fdt_wip.c<br>
> cpukit/zlib/adler32.c<br>
> cpukit/zlib/compress.c<br>
> cpukit/zlib/crc32.c<br>
> cpukit/zlib/deflate.c<br>
> cpukit/zlib/gzclose.c<br>
> cpukit/zlib/gzlib.c<br>
> cpukit/zlib/gzread.c<br>
> cpukit/zlib/gzwrite.c<br>
> cpukit/zlib/infback.c<br>
> cpukit/zlib/inffast.c<br>
> cpukit/zlib/inflate.c<br>
> cpukit/zlib/inftrees.c<br>
> cpukit/zlib/trees.c<br>
> cpukit/zlib/uncompr.c<br>
> cpukit/zlib/zutil.c<br>
> <br>
> I'll continue to work on this, feedback is requested though if this is<br>
> a good direction or how to improve.<br>
> <br>
> Gedare<br>
> <br>
> <br>
> _______________________________________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div></div>