brkas 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- brkas-0.1.0/COPYING +343 -0
- brkas-0.1.0/PKG-INFO +327 -0
- brkas-0.1.0/README.md +314 -0
- brkas-0.1.0/brkas/__init__.py +3 -0
- brkas-0.1.0/brkas/__main__.py +6 -0
- brkas-0.1.0/brkas/buildroot.py +328 -0
- brkas-0.1.0/brkas/cli.py +264 -0
- brkas-0.1.0/brkas/config.py +206 -0
- brkas-0.1.0/brkas/container/Dockerfile +27 -0
- brkas-0.1.0/brkas/container/brkas.sh +16 -0
- brkas-0.1.0/brkas/container.py +190 -0
- brkas-0.1.0/brkas/repos.py +253 -0
- brkas-0.1.0/brkas/schema.json +114 -0
- brkas-0.1.0/brkas.egg-info/PKG-INFO +327 -0
- brkas-0.1.0/brkas.egg-info/SOURCES.txt +21 -0
- brkas-0.1.0/brkas.egg-info/dependency_links.txt +1 -0
- brkas-0.1.0/brkas.egg-info/entry_points.txt +3 -0
- brkas-0.1.0/brkas.egg-info/requires.txt +4 -0
- brkas-0.1.0/brkas.egg-info/top_level.txt +1 -0
- brkas-0.1.0/pyproject.toml +29 -0
- brkas-0.1.0/setup.cfg +4 -0
- brkas-0.1.0/tests/test_config.py +159 -0
- brkas-0.1.0/tests/test_integration.py +216 -0
brkas-0.1.0/COPYING
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
brkas is distributed under the terms of the GNU General Public License,
|
|
2
|
+
reproduced below; either version 2 of the License, or (at your option)
|
|
3
|
+
any later version, as Buildroot.
|
|
4
|
+
|
|
5
|
+
GNU GENERAL PUBLIC LICENSE
|
|
6
|
+
Version 2, June 1991
|
|
7
|
+
|
|
8
|
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
|
9
|
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
10
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
11
|
+
of this license document, but changing it is not allowed.
|
|
12
|
+
|
|
13
|
+
Preamble
|
|
14
|
+
|
|
15
|
+
The licenses for most software are designed to take away your
|
|
16
|
+
freedom to share and change it. By contrast, the GNU General Public
|
|
17
|
+
License is intended to guarantee your freedom to share and change free
|
|
18
|
+
software--to make sure the software is free for all its users. This
|
|
19
|
+
General Public License applies to most of the Free Software
|
|
20
|
+
Foundation's software and to any other program whose authors commit to
|
|
21
|
+
using it. (Some other Free Software Foundation software is covered by
|
|
22
|
+
the GNU Lesser General Public License instead.) You can apply it to
|
|
23
|
+
your programs, too.
|
|
24
|
+
|
|
25
|
+
When we speak of free software, we are referring to freedom, not
|
|
26
|
+
price. Our General Public Licenses are designed to make sure that you
|
|
27
|
+
have the freedom to distribute copies of free software (and charge for
|
|
28
|
+
this service if you wish), that you receive source code or can get it
|
|
29
|
+
if you want it, that you can change the software or use pieces of it
|
|
30
|
+
in new free programs; and that you know you can do these things.
|
|
31
|
+
|
|
32
|
+
To protect your rights, we need to make restrictions that forbid
|
|
33
|
+
anyone to deny you these rights or to ask you to surrender the rights.
|
|
34
|
+
These restrictions translate to certain responsibilities for you if you
|
|
35
|
+
distribute copies of the software, or if you modify it.
|
|
36
|
+
|
|
37
|
+
For example, if you distribute copies of such a program, whether
|
|
38
|
+
gratis or for a fee, you must give the recipients all the rights that
|
|
39
|
+
you have. You must make sure that they, too, receive or can get the
|
|
40
|
+
source code. And you must show them these terms so they know their
|
|
41
|
+
rights.
|
|
42
|
+
|
|
43
|
+
We protect your rights with two steps: (1) copyright the software, and
|
|
44
|
+
(2) offer you this license which gives you legal permission to copy,
|
|
45
|
+
distribute and/or modify the software.
|
|
46
|
+
|
|
47
|
+
Also, for each author's protection and ours, we want to make certain
|
|
48
|
+
that everyone understands that there is no warranty for this free
|
|
49
|
+
software. If the software is modified by someone else and passed on, we
|
|
50
|
+
want its recipients to know that what they have is not the original, so
|
|
51
|
+
that any problems introduced by others will not reflect on the original
|
|
52
|
+
authors' reputations.
|
|
53
|
+
|
|
54
|
+
Finally, any free program is threatened constantly by software
|
|
55
|
+
patents. We wish to avoid the danger that redistributors of a free
|
|
56
|
+
program will individually obtain patent licenses, in effect making the
|
|
57
|
+
program proprietary. To prevent this, we have made it clear that any
|
|
58
|
+
patent must be licensed for everyone's free use or not licensed at all.
|
|
59
|
+
|
|
60
|
+
The precise terms and conditions for copying, distribution and
|
|
61
|
+
modification follow.
|
|
62
|
+
|
|
63
|
+
GNU GENERAL PUBLIC LICENSE
|
|
64
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
65
|
+
|
|
66
|
+
0. This License applies to any program or other work which contains
|
|
67
|
+
a notice placed by the copyright holder saying it may be distributed
|
|
68
|
+
under the terms of this General Public License. The "Program", below,
|
|
69
|
+
refers to any such program or work, and a "work based on the Program"
|
|
70
|
+
means either the Program or any derivative work under copyright law:
|
|
71
|
+
that is to say, a work containing the Program or a portion of it,
|
|
72
|
+
either verbatim or with modifications and/or translated into another
|
|
73
|
+
language. (Hereinafter, translation is included without limitation in
|
|
74
|
+
the term "modification".) Each licensee is addressed as "you".
|
|
75
|
+
|
|
76
|
+
Activities other than copying, distribution and modification are not
|
|
77
|
+
covered by this License; they are outside its scope. The act of
|
|
78
|
+
running the Program is not restricted, and the output from the Program
|
|
79
|
+
is covered only if its contents constitute a work based on the
|
|
80
|
+
Program (independent of having been made by running the Program).
|
|
81
|
+
Whether that is true depends on what the Program does.
|
|
82
|
+
|
|
83
|
+
1. You may copy and distribute verbatim copies of the Program's
|
|
84
|
+
source code as you receive it, in any medium, provided that you
|
|
85
|
+
conspicuously and appropriately publish on each copy an appropriate
|
|
86
|
+
copyright notice and disclaimer of warranty; keep intact all the
|
|
87
|
+
notices that refer to this License and to the absence of any warranty;
|
|
88
|
+
and give any other recipients of the Program a copy of this License
|
|
89
|
+
along with the Program.
|
|
90
|
+
|
|
91
|
+
You may charge a fee for the physical act of transferring a copy, and
|
|
92
|
+
you may at your option offer warranty protection in exchange for a fee.
|
|
93
|
+
|
|
94
|
+
2. You may modify your copy or copies of the Program or any portion
|
|
95
|
+
of it, thus forming a work based on the Program, and copy and
|
|
96
|
+
distribute such modifications or work under the terms of Section 1
|
|
97
|
+
above, provided that you also meet all of these conditions:
|
|
98
|
+
|
|
99
|
+
a) You must cause the modified files to carry prominent notices
|
|
100
|
+
stating that you changed the files and the date of any change.
|
|
101
|
+
|
|
102
|
+
b) You must cause any work that you distribute or publish, that in
|
|
103
|
+
whole or in part contains or is derived from the Program or any
|
|
104
|
+
part thereof, to be licensed as a whole at no charge to all third
|
|
105
|
+
parties under the terms of this License.
|
|
106
|
+
|
|
107
|
+
c) If the modified program normally reads commands interactively
|
|
108
|
+
when run, you must cause it, when started running for such
|
|
109
|
+
interactive use in the most ordinary way, to print or display an
|
|
110
|
+
announcement including an appropriate copyright notice and a
|
|
111
|
+
notice that there is no warranty (or else, saying that you provide
|
|
112
|
+
a warranty) and that users may redistribute the program under
|
|
113
|
+
these conditions, and telling the user how to view a copy of this
|
|
114
|
+
License. (Exception: if the Program itself is interactive but
|
|
115
|
+
does not normally print such an announcement, your work based on
|
|
116
|
+
the Program is not required to print an announcement.)
|
|
117
|
+
|
|
118
|
+
These requirements apply to the modified work as a whole. If
|
|
119
|
+
identifiable sections of that work are not derived from the Program,
|
|
120
|
+
and can be reasonably considered independent and separate works in
|
|
121
|
+
themselves, then this License, and its terms, do not apply to those
|
|
122
|
+
sections when you distribute them as separate works. But when you
|
|
123
|
+
distribute the same sections as part of a whole which is a work based
|
|
124
|
+
on the Program, the distribution of the whole must be on the terms of
|
|
125
|
+
this License, whose permissions for other licensees extend to the
|
|
126
|
+
entire whole, and thus to each and every part regardless of who wrote it.
|
|
127
|
+
|
|
128
|
+
Thus, it is not the intent of this section to claim rights or contest
|
|
129
|
+
your rights to work written entirely by you; rather, the intent is to
|
|
130
|
+
exercise the right to control the distribution of derivative or
|
|
131
|
+
collective works based on the Program.
|
|
132
|
+
|
|
133
|
+
In addition, mere aggregation of another work not based on the Program
|
|
134
|
+
with the Program (or with a work based on the Program) on a volume of
|
|
135
|
+
a storage or distribution medium does not bring the other work under
|
|
136
|
+
the scope of this License.
|
|
137
|
+
|
|
138
|
+
3. You may copy and distribute the Program (or a work based on it,
|
|
139
|
+
under Section 2) in object code or executable form under the terms of
|
|
140
|
+
Sections 1 and 2 above provided that you also do one of the following:
|
|
141
|
+
|
|
142
|
+
a) Accompany it with the complete corresponding machine-readable
|
|
143
|
+
source code, which must be distributed under the terms of Sections
|
|
144
|
+
1 and 2 above on a medium customarily used for software interchange; or,
|
|
145
|
+
|
|
146
|
+
b) Accompany it with a written offer, valid for at least three
|
|
147
|
+
years, to give any third party, for a charge no more than your
|
|
148
|
+
cost of physically performing source distribution, a complete
|
|
149
|
+
machine-readable copy of the corresponding source code, to be
|
|
150
|
+
distributed under the terms of Sections 1 and 2 above on a medium
|
|
151
|
+
customarily used for software interchange; or,
|
|
152
|
+
|
|
153
|
+
c) Accompany it with the information you received as to the offer
|
|
154
|
+
to distribute corresponding source code. (This alternative is
|
|
155
|
+
allowed only for noncommercial distribution and only if you
|
|
156
|
+
received the program in object code or executable form with such
|
|
157
|
+
an offer, in accord with Subsection b above.)
|
|
158
|
+
|
|
159
|
+
The source code for a work means the preferred form of the work for
|
|
160
|
+
making modifications to it. For an executable work, complete source
|
|
161
|
+
code means all the source code for all modules it contains, plus any
|
|
162
|
+
associated interface definition files, plus the scripts used to
|
|
163
|
+
control compilation and installation of the executable. However, as a
|
|
164
|
+
special exception, the source code distributed need not include
|
|
165
|
+
anything that is normally distributed (in either source or binary
|
|
166
|
+
form) with the major components (compiler, kernel, and so on) of the
|
|
167
|
+
operating system on which the executable runs, unless that component
|
|
168
|
+
itself accompanies the executable.
|
|
169
|
+
|
|
170
|
+
If distribution of executable or object code is made by offering
|
|
171
|
+
access to copy from a designated place, then offering equivalent
|
|
172
|
+
access to copy the source code from the same place counts as
|
|
173
|
+
distribution of the source code, even though third parties are not
|
|
174
|
+
compelled to copy the source along with the object code.
|
|
175
|
+
|
|
176
|
+
4. You may not copy, modify, sublicense, or distribute the Program
|
|
177
|
+
except as expressly provided under this License. Any attempt
|
|
178
|
+
otherwise to copy, modify, sublicense or distribute the Program is
|
|
179
|
+
void, and will automatically terminate your rights under this License.
|
|
180
|
+
However, parties who have received copies, or rights, from you under
|
|
181
|
+
this License will not have their licenses terminated so long as such
|
|
182
|
+
parties remain in full compliance.
|
|
183
|
+
|
|
184
|
+
5. You are not required to accept this License, since you have not
|
|
185
|
+
signed it. However, nothing else grants you permission to modify or
|
|
186
|
+
distribute the Program or its derivative works. These actions are
|
|
187
|
+
prohibited by law if you do not accept this License. Therefore, by
|
|
188
|
+
modifying or distributing the Program (or any work based on the
|
|
189
|
+
Program), you indicate your acceptance of this License to do so, and
|
|
190
|
+
all its terms and conditions for copying, distributing or modifying
|
|
191
|
+
the Program or works based on it.
|
|
192
|
+
|
|
193
|
+
6. Each time you redistribute the Program (or any work based on the
|
|
194
|
+
Program), the recipient automatically receives a license from the
|
|
195
|
+
original licensor to copy, distribute or modify the Program subject to
|
|
196
|
+
these terms and conditions. You may not impose any further
|
|
197
|
+
restrictions on the recipients' exercise of the rights granted herein.
|
|
198
|
+
You are not responsible for enforcing compliance by third parties to
|
|
199
|
+
this License.
|
|
200
|
+
|
|
201
|
+
7. If, as a consequence of a court judgment or allegation of patent
|
|
202
|
+
infringement or for any other reason (not limited to patent issues),
|
|
203
|
+
conditions are imposed on you (whether by court order, agreement or
|
|
204
|
+
otherwise) that contradict the conditions of this License, they do not
|
|
205
|
+
excuse you from the conditions of this License. If you cannot
|
|
206
|
+
distribute so as to satisfy simultaneously your obligations under this
|
|
207
|
+
License and any other pertinent obligations, then as a consequence you
|
|
208
|
+
may not distribute the Program at all. For example, if a patent
|
|
209
|
+
license would not permit royalty-free redistribution of the Program by
|
|
210
|
+
all those who receive copies directly or indirectly through you, then
|
|
211
|
+
the only way you could satisfy both it and this License would be to
|
|
212
|
+
refrain entirely from distribution of the Program.
|
|
213
|
+
|
|
214
|
+
If any portion of this section is held invalid or unenforceable under
|
|
215
|
+
any particular circumstance, the balance of the section is intended to
|
|
216
|
+
apply and the section as a whole is intended to apply in other
|
|
217
|
+
circumstances.
|
|
218
|
+
|
|
219
|
+
It is not the purpose of this section to induce you to infringe any
|
|
220
|
+
patents or other property right claims or to contest validity of any
|
|
221
|
+
such claims; this section has the sole purpose of protecting the
|
|
222
|
+
integrity of the free software distribution system, which is
|
|
223
|
+
implemented by public license practices. Many people have made
|
|
224
|
+
generous contributions to the wide range of software distributed
|
|
225
|
+
through that system in reliance on consistent application of that
|
|
226
|
+
system; it is up to the author/donor to decide if he or she is willing
|
|
227
|
+
to distribute software through any other system and a licensee cannot
|
|
228
|
+
impose that choice.
|
|
229
|
+
|
|
230
|
+
This section is intended to make thoroughly clear what is believed to
|
|
231
|
+
be a consequence of the rest of this License.
|
|
232
|
+
|
|
233
|
+
8. If the distribution and/or use of the Program is restricted in
|
|
234
|
+
certain countries either by patents or by copyrighted interfaces, the
|
|
235
|
+
original copyright holder who places the Program under this License
|
|
236
|
+
may add an explicit geographical distribution limitation excluding
|
|
237
|
+
those countries, so that distribution is permitted only in or among
|
|
238
|
+
countries not thus excluded. In such case, this License incorporates
|
|
239
|
+
the limitation as if written in the body of this License.
|
|
240
|
+
|
|
241
|
+
9. The Free Software Foundation may publish revised and/or new versions
|
|
242
|
+
of the General Public License from time to time. Such new versions will
|
|
243
|
+
be similar in spirit to the present version, but may differ in detail to
|
|
244
|
+
address new problems or concerns.
|
|
245
|
+
|
|
246
|
+
Each version is given a distinguishing version number. If the Program
|
|
247
|
+
specifies a version number of this License which applies to it and "any
|
|
248
|
+
later version", you have the option of following the terms and conditions
|
|
249
|
+
either of that version or of any later version published by the Free
|
|
250
|
+
Software Foundation. If the Program does not specify a version number of
|
|
251
|
+
this License, you may choose any version ever published by the Free Software
|
|
252
|
+
Foundation.
|
|
253
|
+
|
|
254
|
+
10. If you wish to incorporate parts of the Program into other free
|
|
255
|
+
programs whose distribution conditions are different, write to the author
|
|
256
|
+
to ask for permission. For software which is copyrighted by the Free
|
|
257
|
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
|
258
|
+
make exceptions for this. Our decision will be guided by the two goals
|
|
259
|
+
of preserving the free status of all derivatives of our free software and
|
|
260
|
+
of promoting the sharing and reuse of software generally.
|
|
261
|
+
|
|
262
|
+
NO WARRANTY
|
|
263
|
+
|
|
264
|
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
|
265
|
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
266
|
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
267
|
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
268
|
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
269
|
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
270
|
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
271
|
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
272
|
+
REPAIR OR CORRECTION.
|
|
273
|
+
|
|
274
|
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
275
|
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
|
276
|
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
|
277
|
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
|
278
|
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
|
279
|
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
|
280
|
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|
281
|
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|
282
|
+
POSSIBILITY OF SUCH DAMAGES.
|
|
283
|
+
|
|
284
|
+
END OF TERMS AND CONDITIONS
|
|
285
|
+
|
|
286
|
+
How to Apply These Terms to Your New Programs
|
|
287
|
+
|
|
288
|
+
If you develop a new program, and you want it to be of the greatest
|
|
289
|
+
possible use to the public, the best way to achieve this is to make it
|
|
290
|
+
free software which everyone can redistribute and change under these terms.
|
|
291
|
+
|
|
292
|
+
To do so, attach the following notices to the program. It is safest
|
|
293
|
+
to attach them to the start of each source file to most effectively
|
|
294
|
+
convey the exclusion of warranty; and each file should have at least
|
|
295
|
+
the "copyright" line and a pointer to where the full notice is found.
|
|
296
|
+
|
|
297
|
+
<one line to give the program's name and a brief idea of what it does.>
|
|
298
|
+
Copyright (C) <year> <name of author>
|
|
299
|
+
|
|
300
|
+
This program is free software; you can redistribute it and/or modify
|
|
301
|
+
it under the terms of the GNU General Public License as published by
|
|
302
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
303
|
+
(at your option) any later version.
|
|
304
|
+
|
|
305
|
+
This program is distributed in the hope that it will be useful,
|
|
306
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
307
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
308
|
+
GNU General Public License for more details.
|
|
309
|
+
|
|
310
|
+
You should have received a copy of the GNU General Public License along
|
|
311
|
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
312
|
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
313
|
+
|
|
314
|
+
Also add information on how to contact you by electronic and paper mail.
|
|
315
|
+
|
|
316
|
+
If the program is interactive, make it output a short notice like this
|
|
317
|
+
when it starts in an interactive mode:
|
|
318
|
+
|
|
319
|
+
Gnomovision version 69, Copyright (C) year name of author
|
|
320
|
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
321
|
+
This is free software, and you are welcome to redistribute it
|
|
322
|
+
under certain conditions; type `show c' for details.
|
|
323
|
+
|
|
324
|
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
325
|
+
parts of the General Public License. Of course, the commands you use may
|
|
326
|
+
be called something other than `show w' and `show c'; they could even be
|
|
327
|
+
mouse-clicks or menu items--whatever suits your program.
|
|
328
|
+
|
|
329
|
+
You should also get your employer (if you work as a programmer) or your
|
|
330
|
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
|
331
|
+
necessary. Here is a sample; alter the names:
|
|
332
|
+
|
|
333
|
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
|
334
|
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
|
335
|
+
|
|
336
|
+
<signature of Ty Coon>, 1 April 1989
|
|
337
|
+
Ty Coon, President of Vice
|
|
338
|
+
|
|
339
|
+
This General Public License does not permit incorporating your program into
|
|
340
|
+
proprietary programs. If your program is a subroutine library, you may
|
|
341
|
+
consider it more useful to permit linking proprietary applications with the
|
|
342
|
+
library. If this is what you want to do, use the GNU Lesser General
|
|
343
|
+
Public License instead of this License.
|
brkas-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: brkas
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: kas-like YAML project files for Buildroot
|
|
5
|
+
License-Expression: GPL-2.0-or-later
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: COPYING
|
|
9
|
+
Requires-Dist: PyYAML
|
|
10
|
+
Provides-Extra: schema
|
|
11
|
+
Requires-Dist: jsonschema; extra == "schema"
|
|
12
|
+
Dynamic: license-file
|
|
13
|
+
|
|
14
|
+
<img src="docs/brkas-logo.png" alt="BRKAS: making Buildroot projects easy" width="100%">
|
|
15
|
+
|
|
16
|
+
brkas does for [Buildroot](https://buildroot.org) what kas does for Yocto.
|
|
17
|
+
|
|
18
|
+
You describe your project in a YAML file:
|
|
19
|
+
|
|
20
|
+
- which Buildroot version to use;
|
|
21
|
+
- which br2-external trees to add;
|
|
22
|
+
- which defconfig to start from;
|
|
23
|
+
- which configuration changes to apply on top of it.
|
|
24
|
+
|
|
25
|
+
Then brkas downloads everything, configures Buildroot and builds the project with a
|
|
26
|
+
single command.
|
|
27
|
+
|
|
28
|
+
Here is a small project file:
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
header:
|
|
32
|
+
version: 1
|
|
33
|
+
|
|
34
|
+
buildroot:
|
|
35
|
+
release: "2026.08.1"
|
|
36
|
+
sha256: 38a6c152490096018720a9ade379ee1e571c9bf5f93a3657a166566945a98b0d
|
|
37
|
+
|
|
38
|
+
externals:
|
|
39
|
+
yabi:
|
|
40
|
+
url: https://github.com/angeloc/yabi.git
|
|
41
|
+
refspec: main
|
|
42
|
+
path: br-yabi
|
|
43
|
+
|
|
44
|
+
defconfig: arietta_xterm01_yabi
|
|
45
|
+
|
|
46
|
+
config:
|
|
47
|
+
BR2_TARGET_GENERIC_HOSTNAME: demo
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
To build it:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
brkas build project.yml
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If you know kas, this table shows what each part of kas becomes in brkas:
|
|
57
|
+
|
|
58
|
+
| kas (Yocto) | brkas (Buildroot) |
|
|
59
|
+
|----------------------------------|-----------------------------------------------------|
|
|
60
|
+
| `repos:` | `buildroot:` and `externals:` |
|
|
61
|
+
| `machine:`, `distro:` | `defconfig:` |
|
|
62
|
+
| `local_conf_header:` | `fragments:` (files) and `config:` (single options) |
|
|
63
|
+
| `kas build`, `checkout`, `shell` | `brkas build`, `checkout`, `shell` |
|
|
64
|
+
| `kas dump --lock`, lock files | `brkas dump --lock`, `brkas lock`, `*.lock.yml` |
|
|
65
|
+
| `kas-container` | `brkas-container` |
|
|
66
|
+
| `kas menu` | `brkas menuconfig`, `xconfig` |
|
|
67
|
+
|
|
68
|
+
## Installation
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
pipx install . # or: pipx install '.[schema]' to also check the project files
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
This installs two commands, `brkas` and `brkas-container`.
|
|
75
|
+
|
|
76
|
+
brkas needs Python 3.10 or newer and PyYAML. To build directly on your machine, you also
|
|
77
|
+
need the tools Buildroot itself needs (make, gcc, git and so on). If you use
|
|
78
|
+
`brkas-container` instead, you only need Python and Docker or Podman.
|
|
79
|
+
|
|
80
|
+
## Quick start
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
brkas build examples/x86_64.yml
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
This command:
|
|
87
|
+
|
|
88
|
+
1. downloads Buildroot 2026.08.1 and checks its SHA-256;
|
|
89
|
+
2. configures a small x86_64 system (`examples/configs/x86_64_defconfig`) that uses the
|
|
90
|
+
Bootlin prebuilt toolchain, adds SSH (`examples/fragments/ssh.config`) and sets a host
|
|
91
|
+
name;
|
|
92
|
+
3. builds the result in `build/x86_64`. There is no compiler and no kernel to build, so
|
|
93
|
+
it only takes a few minutes.
|
|
94
|
+
|
|
95
|
+
The `examples` directory has more projects:
|
|
96
|
+
|
|
97
|
+
| File | What it shows |
|
|
98
|
+
|-----------------------------|----------------------------------------------------------------|
|
|
99
|
+
| `x86_64.yml` | a Buildroot release tarball and a defconfig file of your own |
|
|
100
|
+
| `aarch64.yml` | a generic ARM system, with Buildroot cloned from git at a tag |
|
|
101
|
+
| `arietta-xterm01-yabi.yml` | a br2-external tree taken from another git repository |
|
|
102
|
+
|
|
103
|
+
## The project file
|
|
104
|
+
|
|
105
|
+
You can split a project into several files. `brkas build a.yml:b.yml` reads `a.yml` first,
|
|
106
|
+
then `b.yml`. Values in `b.yml` replace the ones in `a.yml`.
|
|
107
|
+
|
|
108
|
+
Here is every section, with comments:
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
header:
|
|
112
|
+
version: 1 # required, always 1 for now
|
|
113
|
+
includes: # other files to read first; this file wins over them
|
|
114
|
+
- common.yml # a path, relative to this file
|
|
115
|
+
- repo: yabi # or a file inside a repository
|
|
116
|
+
file: br-yabi/brkas/base.yml
|
|
117
|
+
|
|
118
|
+
buildroot: # where Buildroot comes from, pick one way:
|
|
119
|
+
url: https://gitlab.com/buildroot.org/buildroot.git
|
|
120
|
+
refspec: 2026.08.1 # a git repository, at a branch, tag or commit;
|
|
121
|
+
# release: "2026.08.1" # an official release tarball;
|
|
122
|
+
# tarball: <url or file> # any other tarball;
|
|
123
|
+
# sha256: <hash> # (the expected SHA-256 of the tarball)
|
|
124
|
+
# dir: ../buildroot # a directory you already have, used as it is
|
|
125
|
+
patches: # patches applied after the download
|
|
126
|
+
fix: patches/buildroot # a patch file, or a directory of *.patch files
|
|
127
|
+
other: # or patches from a repository
|
|
128
|
+
repo: yabi
|
|
129
|
+
path: patches/buildroot
|
|
130
|
+
|
|
131
|
+
externals: # br2-external trees, same choices as buildroot:
|
|
132
|
+
yabi:
|
|
133
|
+
url: https://github.com/angeloc/yabi.git
|
|
134
|
+
refspec: main
|
|
135
|
+
path: br-yabi # where the external is inside the repository
|
|
136
|
+
local:
|
|
137
|
+
dir: ../my-external
|
|
138
|
+
|
|
139
|
+
defconfig: arietta_xterm01_yabi # a defconfig name from Buildroot or an external,
|
|
140
|
+
# or a file path (with a /), or {repo:, file:}
|
|
141
|
+
|
|
142
|
+
fragments: # configuration fragments added to the defconfig, in order
|
|
143
|
+
debug: fragments/debug.config
|
|
144
|
+
board:
|
|
145
|
+
repo: yabi
|
|
146
|
+
file: br-yabi/fragments/x.config
|
|
147
|
+
|
|
148
|
+
config: # single options, applied last
|
|
149
|
+
BR2_TARGET_GENERIC_HOSTNAME: demo # strings get quotes automatically
|
|
150
|
+
BR2_PACKAGE_DROPBEAR: y # y, n or m
|
|
151
|
+
BR2_TARGET_ROOTFS_EXT2_SIZE: "128M"
|
|
152
|
+
|
|
153
|
+
build:
|
|
154
|
+
dir: build # where outputs go (default: build/)
|
|
155
|
+
name: demo # the output directory name (default: the file name)
|
|
156
|
+
targets: [all] # what "brkas build" makes by default
|
|
157
|
+
dl_dir: ~/.cache/brkas/dl # download cache, shared between projects
|
|
158
|
+
|
|
159
|
+
env: # environment variables for make
|
|
160
|
+
MAKEFLAGS: -j12 # with BR2_PER_PACKAGE_DIRECTORIES: y, builds
|
|
161
|
+
# several packages at the same time
|
|
162
|
+
|
|
163
|
+
container: # default settings for brkas-container
|
|
164
|
+
image: brkas:0.1.0
|
|
165
|
+
engine: podman
|
|
166
|
+
options: [--network=host]
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Some rules to know:
|
|
170
|
+
|
|
171
|
+
- When two files set the same section, their contents are merged. Inside a section, a
|
|
172
|
+
later value replaces an earlier one.
|
|
173
|
+
- Setting a key to `null` removes it. For example, `fragments: {debug: null}` removes a
|
|
174
|
+
fragment that an included file added.
|
|
175
|
+
- A path is relative to the file where it is written.
|
|
176
|
+
- Quote values that look like numbers, such as `release: "2026.08"`. Otherwise YAML reads
|
|
177
|
+
them as numbers and brkas rejects them.
|
|
178
|
+
|
|
179
|
+
After configuring, brkas checks the result. If an option you asked for is not in the final
|
|
180
|
+
configuration, brkas prints a warning. This usually means the option depends on another
|
|
181
|
+
option that is not enabled.
|
|
182
|
+
|
|
183
|
+
## Commands
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
brkas checkout project.yml # download everything and configure
|
|
187
|
+
brkas build project.yml [targets] # the same, then build
|
|
188
|
+
brkas shell project.yml [-c cmd] # open a shell to build other software for the target
|
|
189
|
+
brkas menuconfig project.yml --save fragments/mine.config # or xconfig
|
|
190
|
+
brkas dump project.yml [--lock] # print the merged project
|
|
191
|
+
brkas lock project.yml # write project.lock.yml
|
|
192
|
+
brkas for-all-repos project.yml 'git log -1 --oneline'
|
|
193
|
+
brkas clean project.yml [--all] # remove the output (--all: the repositories too)
|
|
194
|
+
brkas clean --all # remove everything brkas made in the work directory
|
|
195
|
+
brkas clean --cache project.yml # remove only the download cache (build.dl_dir)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
brkas puts the downloaded repositories in the work directory: `buildroot/`, plus one
|
|
199
|
+
directory for each external. Builds go in `build/`. The work directory is the current
|
|
200
|
+
directory, unless you set `--work-dir` or `$BRKAS_WORK_DIR`.
|
|
201
|
+
|
|
202
|
+
Two options control the repositories:
|
|
203
|
+
|
|
204
|
+
- `--update` fetches new commits, so that a branch moves forward.
|
|
205
|
+
- `--force` throws away your local changes in the repositories. Without it, brkas stops
|
|
206
|
+
instead of touching them.
|
|
207
|
+
|
|
208
|
+
### brkas shell
|
|
209
|
+
|
|
210
|
+
`brkas shell` opens a bash shell in the output directory, ready to cross-compile other
|
|
211
|
+
software for your target. It loads Buildroot's SDK environment (`host/environment-setup`):
|
|
212
|
+
|
|
213
|
+
- the cross compiler is in `PATH`;
|
|
214
|
+
- `CC`, `CFLAGS`, `ARCH`, `CROSS_COMPILE` and `KERNELDIR` are set;
|
|
215
|
+
- the `configure` and `cmake` aliases use the right options.
|
|
216
|
+
|
|
217
|
+
`make` still works in this shell.
|
|
218
|
+
|
|
219
|
+
The first time, brkas enables the Buildroot option that creates this environment
|
|
220
|
+
(`BR2_PACKAGE_HOST_ENVIRONMENT_SETUP`). If the SDK is not built yet, brkas runs
|
|
221
|
+
`make sdk` before opening the shell. It does the same when the project configuration
|
|
222
|
+
changed since the last SDK, so that the SDK always matches the project. While it builds, brkas shows a spinner and writes
|
|
223
|
+
the build output to `brkas-sdk.log` in the output directory. The option stays enabled
|
|
224
|
+
after that. You can still turn it off in `config:`.
|
|
225
|
+
|
|
226
|
+
Here is the first `brkas shell` of the x86_64 example, run in the container:
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
$ brkas-container shell examples/x86_64.yml
|
|
230
|
+
brkas: buildroot: downloading https://buildroot.org/downloads/buildroot-2026.08.1.tar.gz
|
|
231
|
+
brkas: buildroot: unpacking buildroot-2026.08.1.tar.gz
|
|
232
|
+
brkas: configuring /home/user/work/build/x86_64 from x86_64_defconfig
|
|
233
|
+
brkas: building the SDK: make sdk, output in /home/user/work/build/x86_64/brkas-sdk.log
|
|
234
|
+
brkas: building the SDK: done in 01:20
|
|
235
|
+
brkas: shell in /home/user/work/build/x86_64: exit to leave
|
|
236
|
+
_ _ _ _ _
|
|
237
|
+
| |__ _ _(_) | __| |_ __ ___ ___ | |_
|
|
238
|
+
| '_ \| | | | | |/ _` | '__/ _ \ / _ \| __|
|
|
239
|
+
| |_) | |_| | | | (_| | | | (_) | (_) | |_
|
|
240
|
+
|_.__/ \__,_|_|_|\__,_|_| \___/ \___/ \__|
|
|
241
|
+
|
|
242
|
+
Making embedded Linux easy!
|
|
243
|
+
|
|
244
|
+
Some tips:
|
|
245
|
+
* PATH now contains the SDK utilities
|
|
246
|
+
* Standard autotools variables (CC, LD, CFLAGS) are exported
|
|
247
|
+
* Kernel compilation variables (ARCH, CROSS_COMPILE, KERNELDIR) are exported
|
|
248
|
+
* To configure do "./configure $CONFIGURE_FLAGS" or use
|
|
249
|
+
the "configure" alias
|
|
250
|
+
* To build CMake-based projects, use the "cmake" alias
|
|
251
|
+
|
|
252
|
+
(brkas) user@cd1fc8f3192e:/home/user/work/build/x86_64$
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### brkas menuconfig and xconfig
|
|
256
|
+
|
|
257
|
+
These commands open Buildroot's configuration tools: `brkas menuconfig`, or `brkas xconfig`
|
|
258
|
+
for the graphical one. xconfig needs Qt 5, and it is not available in `brkas-container`.
|
|
259
|
+
|
|
260
|
+
When you close the tool, brkas finds what you changed. With `--save FILE`, it writes only
|
|
261
|
+
those changes to a fragment file, which you can then add to `fragments:`.
|
|
262
|
+
|
|
263
|
+
### Lock files
|
|
264
|
+
|
|
265
|
+
`brkas lock project.yml` writes `project.lock.yml`. This file records the exact commit
|
|
266
|
+
of every git repository and the SHA-256 of every tarball.
|
|
267
|
+
|
|
268
|
+
When a lock file sits next to a project file, brkas reads it automatically. If you commit
|
|
269
|
+
the lock file, everyone builds from exactly the same sources.
|
|
270
|
+
|
|
271
|
+
To move to newer sources, run `brkas lock --update project.yml`, or delete the lock file.
|
|
272
|
+
|
|
273
|
+
## Building in a container
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
brkas-container build project.yml # run any brkas command inside it
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
The first time, brkas-container builds its image (`brkas:<version>`) from the Dockerfile it
|
|
280
|
+
ships with, which takes a few minutes. Later runs reuse it. `brkas-container --build-image`
|
|
281
|
+
builds it again, for example after updating brkas.
|
|
282
|
+
|
|
283
|
+
The image is a plain Debian with the packages that the Buildroot manual asks for, cmake,
|
|
284
|
+
and brkas. With cmake in the image, Buildroot does not need to compile its own, and the
|
|
285
|
+
`cmake` alias of `brkas shell` works. When the project builds cmake in the SDK
|
|
286
|
+
(`BR2_PACKAGE_HOST_CMAKE`), the shell uses that one instead. Nothing in it comes from Buildroot, so it can build any Buildroot version.
|
|
287
|
+
|
|
288
|
+
- The work directory, the project files and the download cache appear inside the
|
|
289
|
+
container at the same paths as on your machine.
|
|
290
|
+
- The container runs as your user, so the files it creates belong to you.
|
|
291
|
+
- Your home directory has the same path inside the container, so `~` means the same
|
|
292
|
+
thing. It starts empty: only the directories above are shared from it.
|
|
293
|
+
|
|
294
|
+
Other directories are not visible inside the container. To work on your own software from
|
|
295
|
+
`brkas-container shell`, share its directory with `--mount DIR` (you can repeat it):
|
|
296
|
+
|
|
297
|
+
```
|
|
298
|
+
brkas-container --mount ~/src/myapp shell project.yml
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
The directory appears at the same path inside the container, and you can read and write
|
|
302
|
+
it. So in the shell you can `cd ~/src/myapp` and build it with the cross compiler. The
|
|
303
|
+
option exists only on the command line, so that your local paths stay out of the project
|
|
304
|
+
files.
|
|
305
|
+
|
|
306
|
+
Nothing of your SSH setup is passed to the container by default. For private
|
|
307
|
+
repositories, there are two options, as in kas-container:
|
|
308
|
+
|
|
309
|
+
- `--ssh-agent` forwards your running SSH agent to the container;
|
|
310
|
+
- `--ssh-dir DIR` (or `$BRKAS_SSH_DIR`) shares a directory with SSH keys and configuration.
|
|
311
|
+
The directory is mounted read-only and copied to `~/.ssh` inside the container.
|
|
312
|
+
|
|
313
|
+
With `--ssh-dir`, the container can read every key in that directory. So it is better to
|
|
314
|
+
use a directory with only the keys the project needs, not your whole `~/.ssh`.
|
|
315
|
+
|
|
316
|
+
## Tests
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
python3 -m pytest tests
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
The integration tests need a Buildroot git tree. They use `$BRKAS_TEST_BUILDROOT`, or
|
|
323
|
+
`~/buildroot` by default.
|
|
324
|
+
|
|
325
|
+
## License
|
|
326
|
+
|
|
327
|
+
GPL-2.0-or-later. See COPYING.
|