<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/chunkeey/scripts, branch v19.07.4</title>
<subtitle>Staging tree of Christian Lamparter</subtitle>
<id>https://git.openwrt.org/openwrt/staging/chunkeey/atom?h=v19.07.4</id>
<link rel='self' href='https://git.openwrt.org/openwrt/staging/chunkeey/atom?h=v19.07.4'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/chunkeey/'/>
<updated>2020-08-24T13:56:27Z</updated>
<entry>
<title>Revert "scripts/download: add sources CDN as first mirror"</title>
<updated>2020-08-24T13:56:27Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2020-08-24T13:53:17Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/chunkeey/commit/?id=350883bb90e05433d755cbe87eb7c75a7af9a535'/>
<id>urn:sha1:350883bb90e05433d755cbe87eb7c75a7af9a535</id>
<content type='text'>
This reverts commit c737a9ee6a9c47b6e553ac81bf293b1161e59799.

The source CDN has been discontinued in its current form and will take a
while to be reestablished. Even then it makes little sense to put a CDN
before other CDNs such as kernel.org, apache.org, sourceforge etc.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
(cherry picked from commit bf96eb55c82191701030b68810e6f19adbb91eeb)
</content>
</entry>
<entry>
<title>scripts: Add Buildbot dump-target-info.pl script</title>
<updated>2020-08-09T23:43:15Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-08-03T17:31:43Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/chunkeey/commit/?id=7db09853a83b2feaf2604e4fcc074100be377280'/>
<id>urn:sha1:7db09853a83b2feaf2604e4fcc074100be377280</id>
<content type='text'>
The script comes from buildbot.git[0] and is used to print available
targets and architectures, which are then build.

As the buildbot clones openwrt.git anyway, the script might as well live
here to be used for other cases as well, e.g. determining what
architectures are available when building Docker containers or show
developers an overview which architectures are used by which target.

It's called with either the parameter `architectures` or `targets`,
showing architectures followed by supported targets or targets, followed
by the supported architectures:

$ ./scripts/dump-target-info.pl architectures
aarch64_cortex-a53 bcm27xx/bcm2710 mediatek/mt7622 mvebu/cortexa53 sunxi/cortexa53
aarch64_cortex-a72 bcm27xx/bcm2711 mvebu/cortexa72
...

$ ./scripts/dump-target-info.pl targets
apm821xx/nand powerpc_464fp
apm821xx/sata powerpc_464fp
...

In the future the the script could be removed from the buildbot
repository and maintained only here.

Rename `dumpinfo.pl` to `dump-target-info.pl` to improve verbosity of
filename.

[0]: https://git.openwrt.org/?p=buildbot.git;a=blob;f=scripts/dumpinfo.pl;h=aa97f8d60379076a41b968402e9337cea824ece5;hb=HEAD

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
(cherry picked from commit 656b562aff36d92b0e8586833b59896a55b8a993)
</content>
</entry>
<entry>
<title>build,json: fix compatibility with Python 3.5</title>
<updated>2020-07-13T20:24:30Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-07-12T04:44:55Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/chunkeey/commit/?id=b9a89bf7b55d37ef750015e0be2378cf8e35285f'/>
<id>urn:sha1:b9a89bf7b55d37ef750015e0be2378cf8e35285f</id>
<content type='text'>
The f-string feature was introduced in Python 3.6. As Buildbots may run
on Debian 9, which comes per default with Python 3.5, this would cause
an issue. Instead of f-strings use the *legacy* `.format()` function.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>build: fix compatibility with python 3.6</title>
<updated>2020-07-13T20:24:30Z</updated>
<author>
<name>Huangbin Zhan</name>
</author>
<published>2020-07-06T23:14:42Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/chunkeey/commit/?id=9c0ad7f1d5e564420ae1e6493c2fc2622fd27c8c'/>
<id>urn:sha1:9c0ad7f1d5e564420ae1e6493c2fc2622fd27c8c</id>
<content type='text'>
On a system python3 is linked to python3.6, fail to perform json_overview_image_info
 and got `TypeError: __init__() got an unexpected keyword argument 'capture_output'`.
This patch emulate the behaviour on python 3.7+.

Signed-off-by: Huangbin Zhan &lt;zhanhb88@gmail.com&gt;
(cherry picked from commit 3caad5150c2011a7dac462acaa06d0e69f8ed005)
</content>
</entry>
<entry>
<title>build,json: fix build failure in case no data is found</title>
<updated>2020-07-13T20:24:30Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2020-07-03T20:57:52Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/chunkeey/commit/?id=78f57fbce61ca26a04d2fcab4887228290ee2303'/>
<id>urn:sha1:78f57fbce61ca26a04d2fcab4887228290ee2303</id>
<content type='text'>
Only collect arch_packages if actually generating any output.

Fixes: commit f09b9319 ("build,json: store arch_packages in profiles.json"(
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
(cherry picked from commit 3b0f698760ae3a62173a28f18e9e1e3adef9c492)
</content>
</entry>
<entry>
<title>build,json: store arch_packages in profiles.json</title>
<updated>2020-07-13T20:24:30Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-07-01T02:00:25Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/chunkeey/commit/?id=270711b8eddbc00dae88ad588927d8abce925b9f'/>
<id>urn:sha1:270711b8eddbc00dae88ad588927d8abce925b9f</id>
<content type='text'>
The `arch_packages` contains the supported package architecture.

Previously it was necessary to parse the `Packages` index for the line
`Architecture:`, requiring both an additional parser and file download.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
(cherry picked from commit f09b9319c666e343763c7618878a503ad7eb7531)
</content>
</entry>
<entry>
<title>build: store default/device packages in JSON</title>
<updated>2020-07-13T20:24:30Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-06-30T11:02:43Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/chunkeey/commit/?id=e3618eb2cc210763fe1b309fd7e337fdf8a98f0b'/>
<id>urn:sha1:e3618eb2cc210763fe1b309fd7e337fdf8a98f0b</id>
<content type='text'>
With this commit the `profiles.json` contain both the target specific
`default_packages` as well as the device specific `device_packages` as a
array of strings.

This information is required for downstream projects like the various
web-based interactive firmware generators.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
(cherry picked from commit 263f7e5bbd119ebed1f514c16f659a2e2a2b132c)
</content>
</entry>
<entry>
<title>scripts: JSON merge don't crash if no JSON found</title>
<updated>2020-06-30T20:13:05Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-04-08T20:17:01Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/chunkeey/commit/?id=938839a56586c13defe3e824c2445310ca50c7dc'/>
<id>urn:sha1:938839a56586c13defe3e824c2445310ca50c7dc</id>
<content type='text'>
The JSON `WORK_DIR` ($(KDIR)/json_info_files) is only created if the new
image generation methods from `image.mk` are used. However some targets
like `armvirt` do not use it yet, so the folder is never created.

The `json_overview_image_info.py` script used to raise an error if the
given `WORK_DIR` isn't a folder, however it should just notify about
missing JSON files.

This patch removes the Python assert and exists with code 0 even if no
JSON files were found, as this is not necessarily an error but simply
not yet implemented. Using `glob` on an not existing `Path` results in
an empty list, therefore the for loop won't run.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
CC: Petr Štetiar &lt;ynezz@true.cz&gt;
(cherry picked from commit 14cbd8fb2dd8c81bad06d3c3bb45213685c19c98)
</content>
</entry>
<entry>
<title>build: refactor JSON info files to `profiles.json`</title>
<updated>2020-06-30T20:12:58Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-03-12T22:55:41Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/chunkeey/commit/?id=3572711e3cea24dd5276666860f57a2c3a72525e'/>
<id>urn:sha1:3572711e3cea24dd5276666860f57a2c3a72525e</id>
<content type='text'>
JSON info files contain machine readable information of built profiles
and resulting images. These files were added in commit 881ed09ee6e2
("build: create JSON files containing image info").

They are useful for firmware wizards and script checking for
reproducibility.

Currently all JSON files are stored next to the built images, resulting
in up to 168 individual files for the ath79/generic target.

This patch refactors the JSON creation to store individual per image
(not per profile) files in $(BUILD_DIR)/json_info_files and create an
single overview file called `profiles.json` in the target directory.

Storing per image files and not per profile solves the problem of
parallel file writes. If a profiles sysupgrade and factory image are
finished at the same time both processes would write to the same JSON
file, resulting in randomly broken outputs.

Some target like x86/64 do not use the image code yet, resulting in
missing JSON files. If no JSON info files were created, no
`profiles.json` files is created as it would be empty anyway.

As before, this creation is enabled by default only if `BUILDBOT` is set.

Tested via buildroot &amp; ImageBuilder on ath79/generic, imx6 and x86/64.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
[json_info_files dir handling in Make, if case refactoring]
Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
(backported from commit 07449f692ce4c4525e946401f4c3ed0cbbc8c4df)
Signed-off-by: Adrian Schmutzler &lt;freifunk@adrianschmutzler.de&gt;
</content>
</entry>
<entry>
<title>build: create JSON files containing image info</title>
<updated>2020-06-30T20:12:39Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2019-08-18T19:56:45Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/chunkeey/commit/?id=8a0362c6992d2a432ecb79905531a6c7324fa6a8'/>
<id>urn:sha1:8a0362c6992d2a432ecb79905531a6c7324fa6a8</id>
<content type='text'>
The JSON info files contain details about the created firmware images
per device and are stored next to the created images.

The JSON files are stored as "$(IMAGE_PREFIX).json" and contain some
device/image meta data as well as a list of created firmware images.

An example of openwrt-ramips-rt305x-aztech_hw550-3g.json

    {
      "id": "aztech_hw550-3g",
      "image_prefix": "openwrt-ramips-rt305x-aztech_hw550-3g",
      "images": [
        {
          "name": "openwrt-ramips-rt305x-aztech_hw550-3g-squashfs-sysupgrade.bin",
          "sha256": "db2b34b0ec4a83d9bf612cf66fab0dc3722b191cb9bedf111e5627a4298baf20",
          "type": "sysupgrade"
        }
      ],
      "metadata_version": 1,
      "supported_devices": [
        "aztech,hw550-3g",
        "hw550-3g"
      ],
      "target": "ramips/rt305x",
      "titles": [
        {
          "model": "HW550-3G",
          "vendor": "Aztech"
        },
        {
          "model": "ALL0239-3G",
          "vendor": "Allnet"
        }
      ],
      "version_commit": "r10920+123-0cc87b3bac",
      "version_number": "SNAPSHOT"
    }

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
(backported from commit 881ed09ee6e23f6c224184bb7493253c4624fb9f)
Signed-off-by: Adrian Schmutzler &lt;freifunk@adrianschmutzler.de&gt;
</content>
</entry>
</feed>
