scripts/autobuild-run: create host-distro file
PATCH v2 1/1 scripts/autobuild-run: create host-distro file
Sometimes autobuilder failures occur only on a specific distribution. To ease the research for the maintainer/developers add the host distribution information to the result archive.
The distribution information comes from '/etc/os-release' (or '/usr/lib/os-release') that seems to be present on the most common distros:
Debian: https://manpages.debian.org/buster/systemd/os-release.5.en.html
Ubuntu: http://manpages.ubuntu.com/manpages/bionic/man5/os-release.5.html
Red Red: https://www.freedesktop.org/software/systemd/man/os-release.html
Open-Suse: https://en.opensuse.org/SDB:Find_openSUSE_version
---
v2:
- implement comments from Yann
- copy the whole file (os-release) as host-distro to the result archive
- reword the commit log
--- scripts/autobuild-run | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
scripts/autobuild-run +17 -0
@@ -699,6 +699,23 @@ class Builder: with open(os.path.join(self.resultdir, "submitter"), "w+") as submitterf: submitterf.write(self.submitter) + def get_os_release_path(): + for p in ['/etc/os-release', '/usr/lib/os-release']: + if os.path.exists(p): + return p + return None + + def save_host_distro_info(): + host_distro = os.path.join(self.resultdir, "host-distro") + os_release = get_os_release_path() + if os_release is None: + with open(host_distro, "w") as f: + f.write('Unknown') + else: + shutil.copyfile(os_release, host_distro) + + save_host_distro_info() + # Yes, shutil.make_archive() would be nice, but it doesn't exist # in Python 2.6. ret = subprocess.call(["tar", "cjf", "results.tar.bz2", "results"],
Signature · 1 line
2.20.1
PATCH v2 1/1 scripts/autobuild-run: create host-distro file
Heiko, Thomas, All,
On 2020-09-14 22:41 +0200, Heiko Thiery spake thusly:
Quoted 7 lines
Sometimes autobuilder failures occur only on a specific distribution. To ease the research for the maintainer/developers add the host distribution information to the result archive.
The distribution information comes from '
/etc/os-release' (or '/usr/lib/os-release') that seems to be present on the most common distros:
Quoted 6 lines
Debian: https://manpages.debian.org/buster/systemd/os-release.5.en.html
Ubuntu: http://manpages.ubuntu.com/manpages/bionic/man5/os-release.5.html
Red Red: https://www.freedesktop.org/software/systemd/man/os-release.html
Open-Suse: https://en.opensuse.org/SDB:Find_openSUSE_versionSigned-off-by Heiko Thiery <[email protected]>
Regards,
Yann E. MORIN.
Quoted 41 lines
---
v2:
- implement comments from Yann
- copy the whole file (os-release) as host-distro to the result archive
- reword the commit log--- scripts/autobuild-run | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)scripts/autobuild-run +17
-0@@ -699,6 +699,23 @@ class Builder: with open(os.path.join(self.resultdir, "submitter"), "w+") as submitterf: submitterf.write(self.submitter) + def get_os_release_path(): + for p in ['/etc/os-release', '/usr/lib/os-release']: + if os.path.exists(p): + return p + return None + + def save_host_distro_info(): + host_distro = os.path.join(self.resultdir, "host-distro") + os_release = get_os_release_path() + if os_release is None: + with open(host_distro, "w") as f: + f.write('Unknown') + else: + shutil.copyfile(os_release, host_distro) + + save_host_distro_info() + # Yes, shutil.make_archive() would be nice, but it doesn't exist # in Python 2.6. ret = subprocess.call(["tar", "cjf", "results.tar.bz2", "results"],Signature · 1 line
2.20.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/1 scripts/autobuild-run: create host-distro file
Hi Yann, Hi Thomas,
Am Mo., 14. Sept. 2020 um 22:52 Uhr schrieb Yann E. MORIN <[email protected]>:
Quoted 16 lines
Heiko, Thomas, All,
On 2020-09-14 22:41 +0200, Heiko Thiery spake thusly:
Quoted 12 lines
Sometimes autobuilder failures occur only on a specific distribution. To ease the research for the maintainer/developers add the host distribution information to the result archive.
The distribution information comes from '
/etc/os-release' (or '/usr/lib/os-release') that seems to be present on the most common distros:Debian: https://manpages.debian.org/buster/systemd/os-release.5.en.html
Ubuntu: http://manpages.ubuntu.com/manpages/bionic/man5/os-release.5.html
Red Red: https://www.freedesktop.org/software/systemd/man/os-release.html
Open-Suse: https://en.opensuse.org/SDB:Find_openSUSE_version
Quoted 7 lines
Quoted 1 line
Signed-off-by Heiko Thiery <[email protected]>Acked-by Yann E. MORIN <[email protected]>Regards,
Yann E. MORIN.
I'm hunting an issue with building libnetconf2 in autobuilder [1]. Meanwhile I think I figured out the issue. But it would be great to know the host system and version used by the autobuilder. Any chance to get this patch in?
[1] http://autobuild.buildroot.net/results/2be8b4c60a618ab58590c1fe2d470efa06f6460f/
[2] http://autobuild.buildroot.net/results/bc494a109899f423293d079ae817e69dc52b809e/
--
Heiko
PATCH v2 1/1 scripts/autobuild-run: create host-distro file
In reply to Heiko ThieryQuoted 12 lines · On Mon, 14 Sep 2020 22:41:02 +0200 Heiko Thiery <[email protected]> wrote:
Sometimes autobuilder failures occur only on a specific distribution. To ease the research for the maintainer/developers add the host distribution information to the result archive.
The distribution information comes from '
/etc/os-release' (or '/usr/lib/os-release') that seems to be present on the most common distros:Debian: https://manpages.debian.org/buster/systemd/os-release.5.en.html
Ubuntu: http://manpages.ubuntu.com/manpages/bionic/man5/os-release.5.html
Red Red: https://www.freedesktop.org/software/systemd/man/os-release.html
Open-Suse: https://en.opensuse.org/SDB:Find_openSUSE_version
Quoted 6 lines
Signed-off-by Heiko Thiery <[email protected]>---
v2:
- implement comments from Yann
- copy the whole file (os-release) as host-distro to the result archive
- reword the commit log
Applied to buildroot-test. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com